Taquito TypeDocs
    Preparing search index...

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

    The RPC server to use

    Index

    Constructors

    Properties

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

    Accessors

    Methods

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

      Parameters

      Returns void

      Tezos.addExtension(new Tzip16Module());
      
    • Sets the strategy used for field numbering in Token execute/encode/decode to convert Michelson values to/from javascript objects

      Parameters

      • strategy: FieldNumberingStrategy

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

      Returns void

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

      Parameters

      • Optionalforger: Forger

        forger to use to interact with the Tezos network

      Returns void

      Tezos.setForgerProvider(this.getFactory(RpcForger)())
      
    • Sets global constants provider on the Tezos Taquito instance

      Parameters

      • OptionalglobalConstantsProvider: GlobalConstantsProvider

        globalConstantsProvider to use to interact with the Tezos network

      Returns void

      const globalConst = new DefaultGlobalConstantsProvider();
      globalConst.loadGlobalConstant({
      "expruu5BTdW7ajqJ9XPTF3kgcV78pRiaBW3Gq31mgp3WSYjjUBYxre": { prim: "int" },
      // ...
      })
      Tezos.setGlobalConstantsProvider(globalConst);
    • Sets injector provider on the Tezos Taquito instance

      Parameters

      • OptionalinjectorProvider: Injector

        Injector to use to interact with the Tezos network by default RpcInjector

      Returns void

    • Sets Packer provider on the Tezos Taquito instance

      Parameters

      • Optionalpacker: Packer

        packer to use to interact with the Tezos network

      Returns void

      Tezos.setPackerProvider(new MichelCodecPacker())
      
    • Sets configuration on the Tezos Taquito instance. Allows user to choose which signer, rpc client, rpc url, forger and so forth

      Parameters

      • options: SetProviderOptions

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

      Returns void

      Tezos.setProvider({rpc: 'https://mainnet.tezos.ecadinfra.com/', signer: new InMemorySigner.fromSecretKey(“edsk...”)})
      
      Tezos.setProvider({ config: { confirmationPollingTimeoutSecond: 300 }})
      
    • 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

      • OptionalreadProvider: TzReadProvider

        TzReadProvider to use to interact with the Tezos network

      Returns void

    • Sets rpc provider on the Tezos Taquito instance

      Parameters

      • Optionalrpc: string | RpcClientInterface

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

      Returns void

      Tezos.setRpcProvider('https://mainnet.tezos.ecadinfra.com/')
      
    • Sets signer provider on the Tezos Taquito instance.

      Parameters

      • Optionalsigner: Signer

        signer to use to interact with the Tezos network

      Returns void

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