Hierarchy

Implements

Constructors

Properties

contract: Erdstall
signer: Signer
tokenCache: TokenProvider

Methods

  • Deposits the specified assets in Erdstall. This is interacting with the erdstall entity on the ledger.

    Returns

    A promise containing the stages of onchain transactions.

    Remarks

    Depositing is a multi-step process takes a different number of steps for each type of asset contained in the assets object passed to this function. For more information about stages look at the corresponding documentation.

    Parameters

    • assets: Assets

      The assets to be deposited.

    Returns Promise<TransactionGenerator>

  • Unregisters a callback for the given event.

    Type Parameters

    • T extends "Frozen" | "Deposited" | "Withdrawn" | "Challenged" | "ChallengeResponded" | "TokenTypeRegistered" | "TokenRegistered"

      Type of event the callback is parameterized on.

    Parameters

    • ev: T

      The event of interest.

    • cb: ErdstallEventHandler<T>

      The callback depending on the type of ev.

    Returns void

  • Registers a callback for the given event, s.t. it fires everytime until manually unregistered with off(ev, cb).

    Remarks

    The registered callback should always be manually unregistered.

    Type Parameters

    • T extends "Frozen" | "Deposited" | "Withdrawn" | "Challenged" | "ChallengeResponded" | "TokenTypeRegistered" | "TokenRegistered"

      Type of event the callback is parameterized on.

    Parameters

    • ev: T

      The event of interest.

    • cb: ErdstallEventHandler<T>

      The callback depending on the type of ev.

    Returns void

  • Registers a callback for the given event, s.t. it fires only ONCE. Once registered, a callback cannot be unregistered again.

    Type Parameters

    • T extends "Frozen" | "Deposited" | "Withdrawn" | "Challenged" | "ChallengeResponded" | "TokenTypeRegistered" | "TokenRegistered"

      Type of event the callback is parameterized on.

    Parameters

    • ev: T

      The event of interest.

    • cb: ErdstallEventHandler<T>

      The callback depending on the type of ev.

    Returns void

  • Withdraws funds by using the given balance proof. The assets contained within the balanceproof will be available onchain when done. This proof has to be signed by the TEE running Erdstall and have its exit flag set. The exit proof can be retrieved by calling Exiter.exit() and using its result.

    Returns

    A promise containing the stages of onchain transactions.

    Remarks

    Withdrawing is a multistep process which might contain different amount of steps for each type of asset contained in the balance proof.

    Parameters

    • exitProof: BalanceProof

      Signed balance proof with the exit flag set.

    Returns Promise<TransactionGenerator>

Generated using TypeDoc