Facade class that surfaces all of the libraries capability and allow it's configuration

The RPC server to use

Constructors

Properties

batch: ((params?: ParamsWithKind[]) => OperationBatch)

Type declaration

    • (params?): OperationBatch
    • Parameters

      Returns OperationBatch

      Batch a group of operation together. Operations will be applied in the order in which they are added to the batch

TezosToolkit.batch has been deprecated in favor of TezosToolkit.contract.batch

format: ((from: undefined | Format, to: undefined | Format, amount: string | number | BigNumber) => string | number | BigNumber) = format

Accessors

Methods

  • Parameters

    Returns void

    Allow to add a module to the TezosToolkit instance. This method adds the appropriate Providers(s) required by the module to the internal context.

    Tezos.addExtension(new Tzip16Module());
    
  • Parameters

    • strategy: FieldNumberingStrategy

      a value of type FieldNumberingStrategy that controls how field numbers are calculated

    Returns void

    Sets the strategy used for field numbering in Token execute/encode/decode to convert Michelson values to/from javascript objects

  • Parameters

    • Optionalforger: Forger

    Returns void

    Sets forger provider on the Tezos Taquito instance The LocalForger from @taquito/local-forging is set by default.

    Tezos.setForgerProvider(this.getFactory(RpcForger)())
    
  • Parameters

    Returns void

    Sets global constants provider on the Tezos Taquito instance

    const globalConst = new DefaultGlobalConstantsProvider();
    globalConst.loadGlobalConstant({
    "expruu5BTdW7ajqJ9XPTF3kgcV78pRiaBW3Gq31mgp3WSYjjUBYxre": { prim: "int" },
    // ...
    })
    Tezos.setGlobalConstantsProvider(globalConst);
  • Parameters

    Returns void

    Sets Packer provider on the Tezos Taquito instance

    Tezos.setPackerProvider(new MichelCodecPacker())
    
  • Parameters

    • options: SetProviderOptions

      rpc url or rpcClient to use to interact with the Tezos network

    Returns void

    Sets configuration on the Tezos Taquito instance. Allows user to choose which signer, rpc client, rpc url, forger and so forth

    Tezos.setProvider({rpc: 'https://mainnet.ecadinfra.com/', signer: new InMemorySigner.fromSecretKey(“edsk...”)})
    
    Tezos.setProvider({ config: { confirmationPollingTimeoutSecond: 300 }})
    
  • Parameters

    Returns void

    Sets read provider on the Tezos Taquito instance By default reads are done from the RPC usign the RpcReadAdapter class, this can be overridden to read from an indexer that implements the TzReadProvider interface

  • Parameters

    • Optionalrpc: string | RpcClientInterface

    Returns void

    Sets rpc provider on the Tezos Taquito instance

    Tezos.setRpcProvider('https://mainnet.ecadinfra.com/')
    
  • Parameters

    Returns void

    Sets signer provider on the Tezos Taquito instance.

    Tezos.setSignerProvider(new InMemorySigner.fromSecretKey('edsk...'))