Contains usefully Soroban methods

interface SrbUtils {
    buildChangeTrustLineXdrTx(params: TrustLineParams): Promise<string>;
    confirmTx(
        hash: string,
        secondsToWait?: number,
    ): Promise<GetTransactionResponse>;
    getBalanceLine(
        sender: string,
        tokenAddress: string,
    ): Promise<undefined | BalanceLineAsset>;
    sendTransactionSoroban(xdrTx: string): Promise<SendTransactionResponse>;
    simulateAndCheckRestoreTxRequiredSoroban(
        xdrTx: string,
        sourceAccount: string,
    ): Promise<undefined | string>;
    submitTransactionStellar(xdrTx: string): Promise<SubmitTransactionResponse>;
}

Methods

  • Confirm tx

    Parameters

    • hash: string
    • OptionalsecondsToWait: number

    Returns Promise<GetTransactionResponse>

  • Get Balance Line information if exists

    Parameters

    • sender: string
    • tokenAddress: string

    Returns Promise<undefined | BalanceLineAsset>

  • Submit tx

    Parameters

    • xdrTx: string

    Returns Promise<SendTransactionResponse>

  • Simulate and check if Restore needed

    Parameters

    • xdrTx: string

      restore

    • sourceAccount: string

    Returns Promise<undefined | string>

    xdrTx restore transaction if it required after check

  • Submit tx

    Parameters

    • xdrTx: string

    Returns Promise<SubmitTransactionResponse>