aftermath-ts-sdk - v3.3.3
    Preparing search index...

    Wraps a staked SuiFren with vault fee accessors and unsigned stake-position transaction builders.

    The wrapper's isOwned flag comes from the fetch path and is used to guard harvest and accessory-removal methods. It is not a live ownership check.

    Hierarchy (View Summary)

    Index

    Optional low-level provider used by transaction builders.

    config: CallerConfig

    The mutable configuration used for subsequent requests.

    Staked SuiFren data and vault metadata.

    isOwned: boolean = false

    Caller-provided ownership flag for the position.

    suiFren: SuiFren

    SuiFren wrapper created from info.suiFren with isStaked: true.

    • Builds an unsigned transaction that adds an accessory to the underlying SuiFren.

      This method delegates to the underlying SuiFren wrapper.

      Parameters

      • inputs: { accessoryId: string; walletAddress: string }

        Accessory object ID and transaction sender address.

      Returns Promise<Transaction>

      An unsigned accessory transaction.

      Error when the delegated wrapper has no AftermathApi instance.

    • Builds an unsigned transaction that harvests fees from this position.

      The method requires both a position and an isOwned flag. The returned transaction transfers harvested fees to walletAddress.

      Parameters

      • inputs: { walletAddress: string }

        Wallet address that signs the transaction and receives fees.

      Returns Promise<Transaction>

      An unsigned harvest transaction.

      Error when no position is present, the wrapper is not marked owned, or no AftermathApi is available.

    • Builds an unsigned transaction that removes an accessory from this position.

      The method requires a position and an isOwned flag, then selects the staked-position removal Move call.

      Parameters

      • inputs: { accessoryType: string; walletAddress: string }

        Accessory type string and transaction sender address.

      Returns Promise<Transaction>

      An unsigned accessory-removal transaction.

      Error when no position is present, the wrapper is not marked owned, or no AftermathApi is available.

    • Builds an unsigned transaction that unstakes this position.

      The method requires info.position to contain the owned position object ID, derives the underlying SuiFren type, and sets walletAddress as sender. It does not enforce isOwned before building.

      Parameters

      • inputs: { walletAddress: string }

        Wallet address that signs and receives the unstake result.

      Returns Promise<Transaction>

      An unsigned transaction ready for signing and execution.

      Error when no position is present or no AftermathApi is available.

    • Returns the current per-mix fee stored in the staked metadata.

      Returns bigint

      The fee in the payment coin's smallest unit.

    • Returns the canonical Aftermath API host for a Sui network.

      To target a custom or local host, pass baseUrl in CallerConfig to the constructor instead.

      Parameters

      • network: SuiNetwork

        The Sui network whose host to return.

      Returns string

      The network's HTTPS or local HTTP API host.