Options
All
  • Public
  • Public/Protected
  • All
Menu

@taikai/dappkit

Index

Namespaces

Classes

Interfaces

Type Aliases

Functions

Type Aliases

Call<T>: ((options?: CallOptions, callback?: ((err: Error, result: any) => void)) => Promise<T>)

Type Parameters

  • T = any

Type declaration

    • (options?: CallOptions, callback?: ((err: Error, result: any) => void)): Promise<T>
    • Parameters

      • Optional options: CallOptions
      • Optional callback: ((err: Error, result: any) => void)
          • (err: Error, result: any): void
          • Parameters

            • err: Error
            • result: any

            Returns void

      Returns Promise<T>

ContractCallMethod<ReturnData>: { call: Call<ReturnData> } & ContractSendMethod

Type Parameters

  • ReturnData = any

MinimalModel: Pick<Model, NeedsFromModel>
NeedsFromModel: "sendTx" | "sendUnsignedTx" | "callTx" | "contract" | "connection" | "account"
UseModelParams<ModelMethods>: Pick<Model<ModelMethods>, NeedsFromModel>

Type Parameters

  • ModelMethods = any

XEvents<V>: { [ K in keyof EventData]: EventData[K] extends V ? V : any }

Type Parameters

  • V

XPromiseEvent<V>: Promise<XEvents<V>[]>

Type Parameters

  • V

Functions

  • bounty(__namedParameters: Bounty, networkTokenDecimals?: number, transactionalTokenDecimals?: number, rewardTokenDecimals?: number): Bounty
  • Parameters

    • __namedParameters: Bounty
    • networkTokenDecimals: number = 18
    • transactionalTokenDecimals: number = 18
    • rewardTokenDecimals: number = 18

    Returns Bounty

  • eip4361Params(domain: string, verifyingContract: string, statement: string, uri: string, version: string, chainId: number, nonce: string, issuedAt: string, expirationTime: string, notBefore: string, requestId: string, resources: string[], contractName: string): EIP4361TypedData
  • Parameters

    • domain: string
    • verifyingContract: string
    • statement: string
    • uri: string
    • version: string
    • chainId: number
    • nonce: string
    • issuedAt: string
    • expirationTime: string
    • notBefore: string
    • requestId: string
    • resources: string[]
    • contractName: string

    Returns EIP4361TypedData

  • fromDecimals(value: string | number, decimals?: number): string
  • alias

    fromSmartContractDecimals

    Parameters

    • value: string | number
    • decimals: number = 18

    Returns string

  • fromSmartContractDate(date: number): number
  • converts from a smart contract date (s) to javascript date (ms)

    Parameters

    • date: number

    Returns number

  • fromSmartContractDecimals(value: string | number | BigNumber, decimals?: number, rounding?: null | number): string
  • convert a ERC20 token value into javascript number

    Parameters

    • value: string | number | BigNumber
    • decimals: number = 18
    • rounding: null | number = null

    Returns string

  • jsonRpcParams(method: string, params: string[], version?: string): { jsonrpc: string; method: string; params: string[] }
  • Parameters

    • method: string
    • params: string[]
    • Optional version: string

    Returns { jsonrpc: string; method: string; params: string[] }

    • jsonrpc: string
    • method: string
    • params: string[]
  • nameType(name: string, type: string): { name: string; type: string }
  • Parameters

    • name: string
    • type: string

    Returns { name: string; type: string }

    • name: string
    • type: string
  • oraclesResume(oracles: Oracle, delegations: Delegation[], settlerTokenDecimals?: number): OraclesResume
  • toSmartContractDate(date: number | Date): number
  • converts a javascript date (ms) to a smart contract date (s)

    Parameters

    • date: number | Date

    Returns number

  • toSmartContractDecimals(value: string | number, decimals?: number, rounding?: null | number): string
  • convert a simple number into a big number representation, usually used to convert to ERC20 token correct number

    Parameters

    • value: string | number
    • decimals: number = 18
    • rounding: null | number = null

    Returns string

  • transactionHandler(transaction: PromiEvent<Contract | TransactionReceipt>, resolve: ResolveReject, reject: ResolveReject, debug?: boolean): void
  • Parameters

    • transaction: PromiEvent<Contract | TransactionReceipt>
    • resolve: ResolveReject
    • reject: ResolveReject
    • Optional debug: boolean

    Returns void

Generated using TypeDoc