Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@taquito/michelson-encoder

Package Overview
Dependencies
Maintainers
2
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taquito/michelson-encoder

converts michelson data and types into convenient JS/TS objects

  • 7.2.0-alpha.2
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-32.92%
Maintainers
2
Weekly downloads
 
Created
Source

pkgsign status

Taquito Michelson Encoder package

Our current smart contract abstraction feature is currently in preview. It's API is not final, and it may not cover every use case (yet). We will greatly appreciate any feedback on this feature.

@taquito/michelson-encoder provides a JavaScript abstraction based on a Tezos Smart contracts code, parameters and storage.

See the top-level project https://github.com/ecadlabs/taquito for details on reporting issues, contributing and versioning.

Example

Given the following michelson smart contract data, retrieved from a Tezos Nodes RPC:

{
  "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" }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}

@taquito/michelson-encoder will generate an abstraction in the form of a plain old javascript object:

{
  accounts: {},
  version: '1',
  totalSupply: '1000',
  name: 'Token B',
  symbol: 'B',
  owner: 'tz1ccqAEwfPgeoipnXtjAv1iucrpQv3DFmmS'
}

API Documentation

TypeDoc style documentation is available on-line here

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Keywords

FAQs

Package last updated on 19 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc