import type { IntegerType } from '@stacks/common'; import type { StacksNetwork, StacksNetworkName } from '@stacks/network'; import type { BtcAddressRepr } from './btc-address'; import type { PostCondition, PostConditionModeName, UnsignedMultiSigOptions } from '@stacks/transactions'; export interface TxParamsBase { fee: IntegerType; nonce: IntegerType; network: StacksNetworkName | StacksNetwork; postConditions?: PostCondition[]; postConditionMode?: PostConditionModeName; } export interface SingleSigTxParams extends TxParamsBase { publicKey: string; publicKeys?: never; numSignatures?: never; } export type MultiSigTxParams = TxParamsBase & UnsignedMultiSigOptions & { publicKey?: never; }; export type TxParams = SingleSigTxParams | MultiSigTxParams; export interface PoxInfo { contractId: string; currentBurnchainBlockHeight: number; firstBurnchainBlockHeight: number; rewardCycleId: number; rewardCycleLength: number; prepareCycleLength: number; rewardSlots: number; currentCycle: CycleInfo; nextCycle: NextCycleInfo; contractVersions: PoxContractVersion[]; sbtcContract: string; sbtcRegistryContract: string; } export interface CycleInfo { id: number; stakedUstx: bigint; isPoxActive: boolean; } export interface NextCycleInfo { id: number; stakedUstx: bigint; } export interface PoxContractVersion { contractId: string; activationBurnchainBlockHeight: number; firstRewardCycleId: number; } export type StakerInfo = { staked: false; } | { staked: true; details: StakerInfoDetails; }; export interface StakerInfoDetails { amountUstx: bigint; firstRewardCycle: number; numCycles: number; signer: string; } export interface AccountStatus { balance: bigint; locked: bigint; nonce: bigint; unlockHeight: number; } export interface BondMembership { bondIndex: number; amountUstx: bigint; signer: string; isL1Lock: boolean; amountSats: bigint; } export interface Bond { bondIndex: number; targetRateBps: number; stxValueRatio: bigint; minUstxRatioBps: number; earlyUnlockBytes: string; } export type EarnedRewards = bigint; export interface BuildSetBondAdminArgs { newAdmin: string; } export interface BuildSetPauseAdminArgs { newAdmin: string; } export interface SignerKeyGrantOptions { signerManager: string; authId: IntegerType; chainId: number; } export interface SignerCalldataL1Payout { poxAddress: string | BtcAddressRepr; maxFeeSats: IntegerType; network?: StacksNetworkName | StacksNetwork; } export type BuildGrantSignerKeyTxArgs = TxParams & { signerKey: Uint8Array | string; signerManager: string; authId: IntegerType; signerSignature: Uint8Array | string; }; export type BuildRevokeSignerKeyTxArgs = TxParams & { signerKey: Uint8Array | string; signerManager: string; }; export interface BondL1LockupOutput { height: number; tx: Uint8Array | string; outputIndex: number; header: Uint8Array | string; leafHashes: (Uint8Array | string)[]; txCount: number; txIndex: number; amount: bigint; unlockBurnHeight: number; } export type BondLockup = { kind: 'btc'; outputs: BondL1LockupOutput[]; unlockBytes: Uint8Array | string; } | { kind: 'sbtc'; sbtcSats: IntegerType; }; export interface Utxo { txid: string; vout: number; value: IntegerType; scriptPubKey?: Uint8Array; }