Class WallectConnectSession

Hierarchy

  • WallectConnectSession

Constructors

Properties

connector: WalletConnect
wcAccounts: string[]

Methods

  • Create new session

    Parameters

    • force: boolean = false

      if true, kills an existing session and creates new one. By default force is false

    Returns Promise<void>

  • Creates an algosdk.Transaction object based on execParams and suggestedParams and signs it using walletconnect

    Returns

    array of algosdk.SignedTransaction objects

    Parameters

    • execParams: ExecParams[]

      execParams containing all txn info

    • txParams: SuggestedParams

      suggestedParams object

    Returns Promise<SignedTransaction[]>

  • Creates an algosdk.Transaction object based on execParams and suggestedParams

    Returns

    array of algosdk.Transaction objects

    Parameters

    • execParams: ExecParams[]

      execParams containing all txn info

    • txParams: SuggestedParams

      suggestedParams object

    Returns Transaction[]

  • Send signed transaction to network and wait for confirmation

    Returns

    TxnReceipt which includes confirmed txn response along with txID

    Parameters

    • rawTxns: Uint8Array | Uint8Array[]

      Signed Transaction(s)

    • waitRounds: number = WAIT_ROUNDS

      number of rounds to wait for transaction to be confirmed - default is 10

    Returns Promise<TxnReceipt>

  • Sends signedTransaction and waits for the response

    Returns

    TxnReceipt which includes confirmed txn response along with txID

    Parameters

    • transactions: SignedTransaction[]

      array of signedTransaction objects.

    • Optional rounds: number

      number of rounds to wait for response

    Returns Promise<TxnReceipt>

  • Sign a single transaction from a wallect connect session

    Returns

    raw signed txn

    Parameters

    • txn: Transaction

      { SDK transaction object, shouldSign, signers, msig } object

    • Optional message: string

      optional message with txn

    Returns Promise<Uint8Array>

  • Sign a group of transaction(s) from a wallect connect session

    Returns

    array of raw signed txns | null. null representes that the txn in array is NOT signed by wallet user (i.e signable by someone else). TODO: handle case of multiple signers in group transaction

    Parameters

    • txns: TransactionInGroup[]

      Array of [{ SDK transaction object, shouldSign, signers, msig }] object

    • Optional message: string

      optional message with txn

    Returns Promise<(null | Uint8Array)[]>

  • Signes a Transaction object using walletconnect

    Returns

    SignedTransaction

    Parameters

    • transaction: Transaction

      transaction object.

    Returns Promise<SignedTransaction>

  • Function used to wait for a tx confirmation

    Returns

    TxnReceipt which includes confirmed txn response along with txID

    Parameters

    • txId: string

      txn ID for which confirmation is required

    • waitRounds: number = WAIT_ROUNDS

      number of rounds to wait for transaction to be confirmed - default is 10

    Returns Promise<TxnReceipt>

Generated using TypeDoc