Taquito

Taquito

  • 5.2.0-beta.1
  • Docs
  • Twitter
  • Github

›General

General

  • Quick start
  • Taquito boilerplate
  • Making Transfers
  • Originating Contracts
  • Set delegate

Signer

  • In Memory Signer
  • TezBridge Signer

Quick start

Installing the library

For quick-start, you may also like to try out our template/boilerplate app here

The following instructions assume you have a project already created, and you have npm installed and operable.

npm install @taquito/taquito

Import the library in your project

You can access Tezos Toolkit one of two ways:

Import Tezos (a singleton object) from @taquito/taquito.

import { Tezos } from '@taquito/taquito'

Import TezosToolkit from @taquito/taquito and instantiate it.

import { TezosToolkit } from '@taquito/taquito'
const tezos = new TezosToolkit();

NB: this approach is only required if you need to instantiate more than one toolkit.

Configuration

Changing the underlying rpc

Tezos.setProvider({rpc: "your_rpc"})

Changing the underlying signer

import { TezBridgeSigner } from '@taquito/tezbridge-signer';

Tezos.setProvider({signer: new TezBridgeSigner()})

Example

Get balance

Tezos.tz.getBalance('your_address')

Get balance history

Tezos.query.balanceHistory('your_address')

Import a key

This will import your private key in memory and will sign operation using this key automatically

Tezos.importKey("p2sk2obfVMEuPUnadAConLWk7Tf4Dt3n4svSgJwrgpamRqJXvaYcg1")

Transfer

Note: This requires a signer to be configured

const op = await Tezos.contract.transfer({to: 'tz1', amount: 2})
await op.confirmation()

Interact with a smart contract

Note: This requires a signer to be configured

const contract = await Tezos.contract.at('your_address')

const operation = contract.methods.mint('tz1', 100).send({ fee: 20000 })

await operation.confirmation()
Taquito boilerplate →
  • Installing the library
  • Import the library in your project
  • Configuration
    • Changing the underlying rpc
    • Changing the underlying signer
  • Example
    • Get balance
    • Get balance history
    • Import a key
    • Transfer
    • Interact with a smart contract
Docs
Quick StartStorybookTypeDoc reference
Community
Stack ExchangeTwitterCode of ConductGitHubStar
Contact
Report issuesContribute
Sponsored by - Copyright © 2019 ECAD Labs - Open Source MIT License