Description

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

Param: _rpc

The RPC server to use

Constructors

Properties

batch: ((params?) => OperationBatch)

Type declaration

Deprecated

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

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

Type declaration

    • (from, to, amount): string | number | BigNumber
    • Parameters

      • from: undefined | Format
      • to: undefined | Format
      • amount: string | number | BigNumber

      Returns string | number | BigNumber

Accessors

Methods

  • Parameters

    Returns void

    Description

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

    Example

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

    • strategy: FieldNumberingStrategy

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

    Returns void

    Description

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

  • Parameters

    • Optional forger: Forger

    Returns void

    Description

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

    Example

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

    Returns void

    Description

    Sets global constants provider on the Tezos Taquito instance

    Example

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

    Returns void

    Description

    Sets Packer provider on the Tezos Taquito instance

    Example

    Tezos.setPackerProvider(new MichelCodecPacker())
    
  • Parameters

    • options: SetProviderOptions

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

    Returns void

    Description

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

    Example

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

    Example

    Tezos.setProvider({ config: { confirmationPollingTimeoutSecond: 300 }})
    
  • Parameters

    Returns void

    Description

    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

    • Optional rpc: string | RpcClientInterface

    Returns void

    Description

    Sets rpc provider on the Tezos Taquito instance

    Example

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

    Returns void

    Description

    Sets signer provider on the Tezos Taquito instance.

    Example

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

Generated using TypeDoc