Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TrtlApp

Hierarchy

  • TrtlApp

Index

Methods

Static createAccount

Static getAccount

  • Parameters

    • accountId: string

    Returns Promise<[Account | undefined, undefined | ServiceError]>

    Returns the account object or an error.

Static getAccountQrCode

  • getAccountQrCode(accountId: string, amount: undefined | number, recipientName: undefined | string): Promise<[string | undefined, undefined | ServiceError]>
  • Parameters

    • accountId: string
    • Optional amount: undefined | number
    • Optional recipientName: undefined | string

    Returns Promise<[string | undefined, undefined | ServiceError]>

    Returns an image url string or an error.

Static getDeposit

Static getTransfer

Static getWithdrawal

Static initialize

  • initialize(appId: string, appSecret: string, options: InitOptions): void

Static setWithdrawAddress

  • setWithdrawAddress(accountId: string, address: string): Promise<[string | undefined, undefined | ServiceError]>
  • Parameters

    • accountId: string
    • address: string

    Returns Promise<[string | undefined, undefined | ServiceError]>

    Returns the newly set withdraw address or an error.

Static transfer

  • transfer(senderId: string, receiverId: string, amount: number): Promise<[Transfer | undefined, undefined | ServiceError]>
  • Parameters

    • senderId: string
    • receiverId: string
    • amount: number

    Returns Promise<[Transfer | undefined, undefined | ServiceError]>

    Returns the transfer object if the transfer succeeded or an error.

Static transferMany

Static validateAddress

  • validateAddress(address: string, allowIntegrated?: boolean): Promise<[boolean | undefined, undefined | ServiceError]>
  • Parameters

    • address: string
    • Default value allowIntegrated: boolean = true

    Returns Promise<[boolean | undefined, undefined | ServiceError]>

    Returns a boolean or an error.

Static withdraw

Static withdrawalPreview

  • withdrawalPreview(accountId: string, amount: number, sendAddress: undefined | string): Promise<[WithdrawalPreview | undefined, undefined | ServiceError]>
  • Parameters

    • accountId: string
    • amount: number
    • Optional sendAddress: undefined | string

    Returns Promise<[WithdrawalPreview | undefined, undefined | ServiceError]>

    Returns the withdrawal preview object or an error.

Generated using TypeDoc