import { ClarityValue, PostConditionMode, PostCondition } from "@stacks/transactions"; import { type Network } from "../config/networks.js"; import type { WalletAddresses } from "../utils/storage.js"; /** * Reset the pending nonce for an address (called on wallet unlock/lock/switch * so the counter re-syncs with the chain on the next transaction). */ export declare function resetPendingNonce(address: string): Promise; /** * Force-resync the local pending nonce for an address. * Identical to resetPendingNonce but exported under a name that makes the * intent clear for the recover_sponsor_nonce tool's resync-local-nonce action. */ export declare function forceResyncNonce(address: string): Promise; /** * Record that a transaction with `nonce` was successfully broadcast for * `address`, so the next call advances past it. * * @param txid - Optional transaction ID for the pending log. Pass empty string * if not available (e.g., legacy callers). */ export declare function advancePendingNonce(address: string, nonce: bigint, txid?: string): void; export interface Account extends WalletAddresses { privateKey: string; /** * Bitcoin private key as raw bytes (32 bytes) for signing BTC transactions. * SECURITY: Never serialize to WIF/hex. Only held in memory during session. */ btcPrivateKey?: Uint8Array; /** * Bitcoin public key as raw bytes (33 bytes compressed) for building transactions. */ btcPublicKey?: Uint8Array; /** * Taproot private key as raw bytes (32 bytes) for signing Taproot transactions. * SECURITY: Never serialize. Only held in memory during session. */ taprootPrivateKey?: Uint8Array; /** * Taproot internal public key as raw bytes (32 bytes, x-only) for building Taproot transactions. */ taprootPublicKey?: Uint8Array; /** * Nostr private key as raw bytes (32 bytes) for BIP-340 Schnorr signing of NIP-01 events. * Derived via NIP-06 path m/44'/1237'/0'/0/0. * SECURITY: Never serialize. Only held in memory during session. */ nostrPrivateKey?: Uint8Array; /** * Nostr public key as x-only bytes (32 bytes, no 02/03 prefix). * Derived via NIP-06 path m/44'/1237'/0'/0/0. * This is the Nostr public key used in NIP-01 events. */ nostrPublicKey?: Uint8Array; network: Network; } export interface TransferResult { txid: string; rawTx: string; /** True when the tx was submitted directly (sender pays fee) as a relay fallback. */ fallback?: boolean; /** Human-readable reason for the fallback, e.g. "relay unhealthy" or relay error code. */ fallbackReason?: string; } export interface ContractCallOptions { contractAddress: string; contractName: string; functionName: string; functionArgs: ClarityValue[]; postConditionMode?: PostConditionMode; postConditions?: PostCondition[]; /** Optional fee in micro-STX. If omitted, fee is auto-estimated. */ fee?: bigint; } export interface ContractDeployOptions { contractName: string; codeBody: string; /** Optional fee in micro-STX. If omitted, fee is auto-estimated. */ fee?: bigint; /** Clarity version (1, 2, or 3). Defaults to latest supported. */ clarityVersion?: 1 | 2 | 3; } /** * Transfer STX tokens to a recipient * @param fee Optional fee in micro-STX. If omitted, a medium-priority clamped fee is resolved. */ export declare function transferStx(account: Account, recipient: string, amount: bigint, memo?: string, fee?: bigint): Promise; /** * Call a smart contract function */ export declare function callContract(account: Account, options: ContractCallOptions): Promise; /** * Deploy a smart contract */ export declare function deployContract(account: Account, options: ContractDeployOptions): Promise; /** * Sign a transaction without broadcasting (for offline signing) */ export declare function signStxTransfer(account: Account, recipient: string, amount: bigint, memo?: string, fee?: bigint): Promise<{ signedTx: string; txid: string; }>; /** * Sign a contract call without broadcasting */ export declare function signContractCall(account: Account, options: ContractCallOptions): Promise<{ signedTx: string; txid: string; }>; /** * Broadcast a pre-signed transaction */ export declare function broadcastSignedTransaction(signedTx: string, network: Network): Promise<{ txid: string; }>; export * from "./sponsor-builder.js"; //# sourceMappingURL=builder.d.ts.map