@ecadlabs/tezos-parser

v0.1.6
A typescript tool for decoding Tezos RPC response for smart contracts storage into usable json object

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

  • Address
  • String
  • Big Map
  • Map
  • Bool
  • Nat
  • Mutez
  • Or
  • Pair
  • Left
  • 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' 
}
npm i @ecadlabs/tezos-parser

Source Code

Metadata

  • MIT
  • >=6.0.0
  • Unknown
  • released 7/31/2019

Downloads