Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Client
    • TFClient

Index

Constructors

  • new TFClient(url: string, mnemonic: string, storeSecret: string | Uint8Array, keypairType?: KeypairType): TFClient

Properties

address: string
api: ApiPromise
balances: TFBalances = ...
contracts: TFContracts = ...
extSigner?: ExtSigner
farms: QueryFarms
keypair: KeyringPair
keypairType: KeypairType = KeypairType.sr25519
kvStore: TFKVStore = ...
mnemonic: string
mnemonicOrSecret?: string
nodes: Nodes
pricingPolicies: QueryPricingPolicies
storeSecret: string | Uint8Array
termsAndConditions: TFTermsAndConditions = ...
tftBridge: QueryTFTBridge
tftPrice: TFTPrice = ...
twins: TFTwins = ...
url: string
utility: Utility
connections: Map<string, ApiPromise>
lock: default

Methods

  • applyAllExtrinsics<T>(extrinsics: ExtrinsicResult<T>[]): Promise<T[]>
  • Type Parameters

    • T

    Parameters

    • extrinsics: ExtrinsicResult<T>[]

    Returns Promise<T[]>

  • applyExtrinsic<T>(extrinsic: SubmittableExtrinsic<"promise", ISubmittableResult>, resultSections?: string[], resultEvents?: string[]): Promise<T>
  • Type Parameters

    • T

    Parameters

    • extrinsic: SubmittableExtrinsic<"promise", ISubmittableResult>
    • Optional resultSections: string[]
    • Optional resultEvents: string[]

    Returns Promise<T>

  • checkInputs(): void
  • Returns void

  • connect(): Promise<void>
  • Returns Promise<void>

  • disconnect(): Promise<void>
  • Returns Promise<void>

  • disconnectAndExit(): Promise<void>
  • Returns Promise<void>

  • listenForEvent<T>(section: string, method: string, validator: validatorFunctionType, timeoutInMinutes?: number): Promise<T>
  • Listens for a specific event on the chain and resolves when the event matches the specified conditions.

    throws

    {Error} - If the section or method is not defined on the chain.

    rejects

    If no response is received within the given time or if an error occurs during validation.

    Type Parameters

    • T

    Parameters

    • section: string

      The section of the event to listen for.

    • method: string

      The method of the event to listen for.

    • validator: validatorFunctionType

      The validator function to validate the event data.

    • Optional timeoutInMinutes: number

      The timeout value in minutes. Default is 2 minutes.

    Returns Promise<T>

    • A promise that resolves with the event data when the event matches the conditions.
  • loadKeyPairOrSigner(): Promise<void>
  • Returns Promise<void>

  • patchExtrinsic<R>(extrinsic: Extrinsic, options?: PatchExtrinsicOptions<R>): ExtrinsicResult<R>
  • Type Parameters

    • R

    Parameters

    • extrinsic: Extrinsic
    • Optional options: PatchExtrinsicOptions<R>

    Returns ExtrinsicResult<R>

Generated using TypeDoc