@thruputchain/client
    Preparing search index...

    Interface ProviderWalletClient

    Explicit prepare/sign/persist/submit flow without access to a raw signer. Allows one in-flight operation; concurrent calls fail with code -32002. Checks getSession before each operation and permanently invalidates on every change, a failed session read, or a mismatched session. Dispose and recreate after a change or reconnect; there is no automatic reconnect or retry.

    interface ProviderWalletClient {
        deployContractAndWait(
            deployment: ContractDeployment,
            options: DeploymentOptions,
            controls: ProviderExecutionOptions,
        ): Promise<ExecutionResult & { address: ContractAddress }>;
        dispose(): void;
        executeAndWait(
            request: PrepareExecutionRequest,
            options: ProviderExecutionOptions,
        ): Promise<ExecutionResult>;
        executeCallsAndWait<T extends readonly ContractCall<unknown, unknown>[]>(
            request: ExecuteCallsRequest<T>,
            options: ProviderExecutionOptions,
        ): Promise<ExecutionResult & { values: CallResults<T> }>;
        getCapabilities(): Promise<WalletCapabilities>;
        prepareBatchExecution(
            request: PrepareBatchExecutionRequest,
        ): Promise<Transaction>;
        prepareDeployment(
            deployment: ContractDeployment,
            options: DeploymentOptions,
        ): Promise<Transaction>;
        prepareExecution(request: PrepareExecutionRequest): Promise<Transaction>;
        signTransaction(transaction: Transaction): Promise<SignTransactionResult>;
        submitTransaction(
            signed: SignTransactionResult,
        ): Promise<SubmitTransactionResult>;
    }
    Index

    Methods

    • Idempotently unsubscribe and permanently invalidate this adapter, clearing its approval. Does not revoke provider permission or cancel pending requests. A late response cannot reactivate the adapter. Use provider disconnect to revoke permission; create a new adapter for a later authorized session.

      Returns void

    • Read fresh account/network capabilities; only 4200 falls back to unsupported.

      Returns Promise<WalletCapabilities>

    • Prepare a transaction using the default-wallet wrapper and existing nonce and expiry handling. Generates a random transaction nonce when none is supplied; this is separate from the account-derivation nonce. Snapshots input before asynchronous work and enforces the unsigned size bound. Does not sign or submit.

      Parameters

      Returns Promise<Transaction>

    • Request approval and sign without broadcasting. Snapshots the unsigned bytes, checks the account claim, and verifies exact bytes, strict network-bound signature, and canonical hash with verifySignTransactionResult. Once a new request passes local transaction and account-claim validation, it clears the previous approval before awaiting the session or provider. Failure or user rejection does not restore that approval. Only the latest successfully verified result can be submitted; invalid provider results invalidate the adapter. Await durable persistence of the result, account, and network before calling submitTransaction.

      Parameters

      • transaction: Transaction

      Returns Promise<SignTransactionResult>

    • Submit the exact signed bytes and hash of this adapter's latest approval. Consumes approval before requesting broadcast, including when that request fails; the adapter never retries. Returns a broadcast acknowledgement, not an execution receipt, and verifies its hash against the approved result.

      Treat a submit failure as potentially broadcast. Keep the previously persisted hash and query status/receipt on the original network; do not automatically prepare, sign, or execute a replacement transaction. A timeout, session change, or invalid response can occur after broadcast. See the factory's persistence example.

      Parameters

      Returns Promise<SubmitTransactionResult>