@arkade-os/sdk Documentation - v0.5.0-rc.11
    Preparing search index...

    Interface IReadonlyWallet

    Readonly wallet interface for Bitcoin transactions with Arkade protocol support.

    This interface defines the contract that all wallet implementations must follow. It provides methods for address management, balance checking, virtual output operations, and transaction management including sending, settling, and unrolling.

    IWallet

    interface IReadonlyWallet {
        activity: ActivityRegistry;
        assetManager: IReadonlyAssetManager;
        identity: ReadonlyIdentity;
        clear(): Promise<void>;
        getActivityHistory(): Promise<Activity[]>;
        getAddress(): Promise<string>;
        getArkadeInfo(opts?: GetArkadeInfoOptions): Promise<ArkadeInfo>;
        getArkadeReader(): Promise<ArkadeReader>;
        getBalance(): Promise<WalletBalance>;
        getBoardingAddress(): Promise<string>;
        getBoardingUtxos(): Promise<ExtendedCoin[]>;
        getContractManager(): Promise<IContractManager>;
        getSpendableVtxos(
            filter?: GetVtxosFilter,
        ): Promise<NormalizedExtendedVirtualCoin[]>;
        getTransactionHistory(): Promise<ArkTransaction[]>;
        getVtxos(filter?: GetVtxosFilter): Promise<NormalizedExtendedVirtualCoin[]>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    Resolvers that group/label getActivityHistory rows.

    assetManager: IReadonlyAssetManager

    Readonly asset manager bound to this wallet instance.

    Readonly identity associated with the wallet.

    Methods

    • Server info for the Arkade server this wallet is connected to — network, signer key, delays, dust, fees and limits.

      The wallet is the single place that knows which server it speaks to, so a plugin needs only the wallet, never a server URL of its own. Live info wins; when the server is unreachable this falls back to the snapshot persisted at construction, so an offline wallet still answers.

      With requireLive, that fallback is off: the read throws when the operator is unreachable instead of answering from cache. For callers about to bind signerPubkey or a delay into a covenant — a stale snapshot there derives an address the operator may no longer co-sign for, so failing closed is the correct shape.

      Parameters

      Returns Promise<ArkadeInfo>

      The Arkade server's info

      ArkadeInfo

    • Chain reads against this wallet's Arkade server, for scripts the wallet does not own — a plugin's covenant, say. getVtxos answers for the wallet's own outputs and reads from repositories; this one goes to the server.

      Returns Promise<ArkadeReader>

      A normalized reader bound to this wallet's server

      ArkadeReader

    • The subset of getVtxos that generic spending may select: the same filter, minus contracts the generic-spending gate closes, minus funds awaiting recovery under a past-cutoff signer, minus outpoints locked by an in-flight intent. Every implicit coin selection in the SDK reads this; getVtxos stays the raw reporting/recovery read.

      Both exclusion sets are derived from one contract snapshot, so they cannot disagree about which VTXOs exist.

      Parameters

      Returns Promise<NormalizedExtendedVirtualCoin[]>

      GetVtxosFilter