@ecadlabs/tezos-parser
v0.1.6
Published
A typescript tool for decoding Tezos RPC response for smart contracts storage into usable json object
Downloads
22
Readme
Tezos parser
A typescript tool for decoding Tezos RPC response for smart contracts storage into usable json object
Running the example
npm install
npm run example
Data type supported
- [x] Address
- [x] String
- [x] Big Map
- [x] Map
- [x] Bool
- [x] Nat
- [x] Mutez
- [x] Or
- [x] Pair
- [x] Left
- [x] Right
- [ ] Contract
- [ ] List
In short
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'
}