Interface BladeSigner

Hierarchy

  • _default
    • BladeSigner

Properties

call: (<RequestT, ResponseT, OutputT>(request) => Promise<OutputT>)

Type declaration

    • <RequestT, ResponseT, OutputT>(request): Promise<OutputT>
    • Executes a given request. The request might be a transaction, a query, or a contract. If executed successfully, returns the result of the request.

      Type Parameters

      • RequestT

      • ResponseT

      • OutputT

      Parameters

      • request: default<RequestT, ResponseT, OutputT>

        Request to execute

      Returns Promise<OutputT>

checkTransaction: (<T_1>(transaction) => Promise<T_1>)

Type declaration

    • <T_1>(transaction): Promise<T_1>
    • Validates a given transaction by checking the following:

      1. Transaction ID was created with the active account;
      2. Node account IDs belong to the current network.

      Type Parameters

      • T_1 extends default<T_1>

      Parameters

      • transaction: T_1

        Transaction to validate

      Returns Promise<T_1>

getAccountBalance: (() => Promise<default>)

Type declaration

    • (): Promise<default>
    • Returns AccountBalance object with balance info.

      Returns Promise<default>

getAccountId: (() => default)

Type declaration

    • (): default
    • Returns account ID associated with the signer.

      Returns default

getAccountInfo: (() => Promise<default>)

Type declaration

    • (): Promise<default>
    • Returns AccountInfo object with detailed account info.

      Returns Promise<default>

getAccountKey?: (() => default)

Type declaration

    • (): default
    • Returns account key.

      Returns default

getAccountRecords: (() => Promise<default[]>)

Type declaration

    • (): Promise<default[]>
    • Returns a list of TransactionRecord objects, which contain detailed info about active account transactions.

      Returns Promise<default[]>

getLedgerId: (() => null | LedgerId)

Type declaration

    • (): null | LedgerId
    • Returns Hedera network ID (i.e. Mainnet, Testnet etc).

      Returns null | LedgerId

getMirrorNetwork: (() => string[])

Type declaration

    • (): string[]
    • Returns a list of Hedera mirror node accounts for the current network.

      Returns string[]

getNetwork: (() => Record<string, string | default>)

Type declaration

    • (): Record<string, string | default>
    • Returns a map of Hedera node accounts.

      Returns Record<string, string | default>

populateTransaction: (<T_2>(transaction) => Promise<T_2>)

Type declaration

    • <T_2>(transaction): Promise<T_2>
    • Modifies the transaction with transaction ID and Node account IDs using the active account.

      Type Parameters

      • T_2 extends default<T_2>

      Parameters

      • transaction: T_2

        Transaction to validate

      Returns Promise<T_2>

signTransaction: (<T>(transaction) => Promise<T>)

Type declaration

    • <T>(transaction): Promise<T>
    • Prompts a wallet user to sign a given transaction. If signed successfully, returns the signed transaction.

      Type Parameters

      • T extends default<T>

      Parameters

      • transaction: T

        Transaction to sign

      Returns Promise<T>

Methods

  • Prompts a wallet user to authorize a given payload. Typically, should be used, if backend needs to make sure, that wallet user surely has access to a wallet. Returns HandshakeResponse object with wallet user's signature and incoming data.

    Parameters

    • serverSigningAccount: string

      Backend account ID to perform a handshake by

    • serverSignature: string

      Backend signature to authorize by wallet user

    • payload: HandshakePayload

      Payload to authorize by wallet user

    • Optional signOptions: KeyPairSignOptions

      Optional params to authorize with

    Returns Promise<HandshakeResponse>

  • Prompts a wallet user to sign given messages. If signed successfully, returns a list of signatures.

    Parameters

    • messages: Uint8Array[]

      Messages to sign

    • Optional signOptions: KeyPairSignOptions

      Optional params to sign with

    Returns Promise<default[]>

Generated using TypeDoc