You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Daniel Larimer edited this page Sep 4, 2015
·
2 revisions
When using the [Wallet Login API](Wallet Login API) or the [Wallet Merchant API](Wallet Merchant API) it is necessary to pass arguments to and from the wallet. For security purposes these arguments are passed via the URL after the # so that they are kept secret from the wallet service provider. Because URLs are limited to about 2048 bytes of data the Wallet APIs pass arguments as a JSON string that has been compressed with LZMA and serialized to Base58.
Step 1: Compress your JSON representation
Using LZMA-JS library to compress the JSON into a binary array. This will be the most compact form of the data. This will reduce the size of the data by up to 50%.
Step 2: Convert to Base58
Using the bs58 library encode the compressed data in base58. Base58 is URL friendly and size efficient. After converting to base58 the result will be about 70% the size of the original JSON data.