Setup Legal Documents (optional)
To prompt users to review and accept your policies, like Terms and Conditions, Privacy Policy, or Cookie Policy, VeChainKit offers a simple plug-and-play solution.
You can avoid building your own if you haven't already.
By enabling also the tracking consent, you will allow VeChainKit to prompt your users to collect data to improve the kit.
When the legalDocuments
option is configured, the users will see:
Left: A modal prompt when connecting their wallet, requiring them to review and accept required and optional legal documents.
Right: A summary view under
Settings > General > Terms and Policies
, showing which policies they’ve accepted and when.


import { VechainKitProvider } from '@vechain/vechain-kit';
export default function App({ Component, pageProps }: AppProps) {
return (
<VechainKitProvider
legalDocuments={{
allowAnalytics: true, // Enables optional consent for VeChainKit tracking
cookiePolicy: [
{
displayName: 'MyApp Policy', // (Optional) Custom display label
url: 'https://www.myapp.com/cookie-policy',
version: 1, // Increment to re-prompt users
required: false, // Optional: User sees a checkbox to opt in
},
],
privacyPolicy: [
{
url: 'https://www.myapp.com/privacy-policy',
version: 1, // Increment to re-prompt users
required: false, // Optional: can be skipped or rejected
},
],
termsAndConditions: [
{
displayName: 'MyApp T&C',
url: 'https://www.myapp.com/terms-and-conditions',
version: 1, // Increment to re-prompt users
required: true, // Required: must be accepted to proceed
},
],
}}
// ... other props
>
{children}
</VechainKitProvider>
);
}
Key Options
allowAnalytics
boolean
No
If true
, prompts users with an optional tracking policy.
cookiePolicy
array
No
One or more cookie policy versions.
privacyPolicy
array
No
One or more privacy policy versions.
termsAndConditions
array
No
One or more T&C versions.
Last updated
Was this helpful?