Examples
walletAddressesData
Address data must be specified as a JSON Object like so:
{ "address": "1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX", "addressAdditionalData": null}
In the case of currencies that use a secondary address identifier/tag/memo, it can be specified in the addressAdditionalData field.
{
networks : {
'ethereum': {address : '0xfF21f4F75ea2BbEf96bC999fEB5Efec98bB3f6F4'},
'polygon': {address : 'bnb1dv5ps9vpj6clar79gkd0jrfmg8c0knrd6m090h', addressAdditionalData: '123456'}
},
coins : {
'BTC': {address : 'bc1qlah8pucrmw8l3evszn8a7ay62gpyg00rzl7p2m'},
'DAI': {address : '0xfF21f4F75ea2BbEf96bC999fEB5Efec98bB3f6F4'},
'BNB': {address : 'bnb1dv5ps9vpj6clar79gkd0jrfmg8c0knrd6m090h', addressAdditionalData: '123456'}
}
}
URL query string
If you are using the iFrame method or using the URL method to integrate with us, then use the below npm library to convert the object to the query string.
https://www.npmjs.com/package/query-string
Sample query string :-
&walletAddressesData=%7B%22networks%22%3A%7B%22ethereum%22%3A%7B%22address%22%3A%220xfF21f4F75ea2BbEf96bC999fEB5Efec98bB3f6F4%22%7D%2C%22polygon%22%3A%7B%22address%22%3A%22bnb1dv5ps9vpj6clar79gkd0jrfmg8c0knrd6m090h%22%2C%22addressAdditionalData%22%3A%22123456%22%7D%7D%2C%22coins%22%3A%7B%22BTC%22%3A%7B%22address%22%3A%22bc1qlah8pucrmw8l3evszn8a7ay62gpyg00rzl7p2m%22%7D%2C%22DAI%22%3A%7B%22address%22%3A%220xfF21f4F75ea2BbEf96bC999fEB5Efec98bB3f6F4%22%7D%2C%22BNB%22%3A%7B%22address%22%3A%22bnb1dv5ps9vpj6clar79gkd0jrfmg8c0knrd6m090h%22%2C%22addressAdditionalData%22%3A%22123456%22%7D%7D%7D
userData
Data Format
{
"firstName": "Satoshi",
"lastName": "Nakamoto",
"email": "[email protected]",
"mobileNumber": "+15417543010",
"dob": "1994-08-26",
"address": {
"addressLine1": "170 Pine St",
"addressLine2": "San Francisco",
"city": "San Francisco",
"state": "CA",
"postCode": "94111",
"countryCode": "US"
}
}
Convert the JSON to encoded data
encodeURIComponent(JSON.stringify({
"firstName": "Satoshi",
"lastName": "Nakamoto",
"email": "[email protected]",
"mobileNumber": "+15417543010",
"dob": "1994-08-26",
"address": {
"addressLine1": "170 Pine St",
"addressLine2": "San Francisco",
"city": "San Francisco",
"state": "CA",
"postCode": "94111",
"countryCode": "US"
}
}))
Usage
&userData=%7B%22firstName%22%3A%22Satoshi%22%2C%22lastName%22%3A%22Nakamoto%22%2C%22email%22%3A%22satoshi.nakamoto%40transak.com%22%2C%22mobileNumber%22%3A%22%2B15417543010%22%2C%22dob%22%3A%221994-08-26%22%2C%22address%22%3A%7B%22addressLine1%22%3A%22170%20Pine%20St%22%2C%22addressLine2%22%3A%22San%20Francisco%22%2C%22city%22%3A%22San%20Francisco%22%2C%22state%22%3A%22CA%22%2C%22postCode%22%3A%2294111%22%2C%22countryCode%22%3A%22US%22%7D%7D
Updated 4 months ago