A typescript tool for decoding Tezos RPC response for smart contracts storage into usable json object
npm install
npm run example
- Address
- String
- Big Map
- Map
- Bool
- Nat
- Mutez
- Or
- Pair
- Left
- Right
- Contract
- List
It convert this:
{
"storage": {
"prim": "Pair",
"args": [
[],
{
"prim": "Pair",
"args": [
{ "int": "1" },
{
"prim": "Pair",
"args": [
{ "int": "1000" },
{
"prim": "Pair",
"args": [
{ "string": "Token B" },
{
"prim": "Pair",
"args": [
{ "string": "B" },
{ "string": "tz1ccqAEwfPgeoipnXtjAv1iucrpQv3DFmmS" }
]
}
]
}
]
}
]
}
]
}
}
Into:
{
accounts: {},
version: '1',
totalSupply: '1000',
name: 'Token B',
symbol: 'B',
owner: 'tz1ccqAEwfPgeoipnXtjAv1iucrpQv3DFmmS'
}