import { g as BuildTransactionParams, H as Transaction, u as SignedTransactionResult } from './compression-B2GOyyvH.cjs'; export { A as AccountCompressionStatus, a as AccountOutcome, B as BatchSendAndTrackOptions, b as BatchSendAndTrackResult, c as BatchSendTransactionsOptions, d as BatchTrackStatus, e as BuildAndSignTransactionOptions, f as BuildTransactionOptions, C as CompressionError, h as CompressionErrorCode, i as CompressionJournal, j as CompressionOptions, k as CompressionResult, D as DecompressionOptions, F as Filter, l as FilterParamValue, I as InstructionContext, m as InstructionData, K as KeypairCompressionOptions, L as ListTransactionsForAccountOptions, P as PageRequest, n as PageRequestParams, o as PageResponse, p as PageResponseParams, q as PendingCompressionTransaction, R as RawTransactionQueryOptions, S as SendAndTrackTxnOptions, r as SendAndTrackTxnUpdate, s as Signature, t as SignatureInput, v as StreamTransactionUpdate, T as ThruClientConfig, x as ThruTransactionIntent, y as ThruTransactionReviewAbiReflection, z as ThruTransactionReviewPayload, E as ThruTransactionReviewSimulation, G as TrackTransactionUpdate, J as TransactionAccountsConfig, M as TransactionExecutionEvent, N as TransactionExecutionResultData, O as TransactionFeePayerConfig, Q as TransactionHeaderConfig, V as TransactionList, W as TransactionQueryOptions, X as TransactionSigningScheme, Y as TransactionStatusSnapshot, Z as UploadCleanup, _ as WalletCompressionOptions, aa as transactions } from './compression-B2GOyyvH.cjs'; export { P as Pubkey, a as PubkeyInput } from './Pubkey-5aF03Qyx.cjs'; export { A as ABI_MANAGER_PROGRAM_ADDRESS, C as COMPRESSION_PROGRAM_ADDRESS, E as EOA_PROGRAM_ID, M as MANAGER_PROGRAM_ADDRESS, a as MULTICALL_PROGRAM_ADDRESS, N as NOOP_PROGRAM_ADDRESS, P as PASSKEY_MANAGER_PROGRAM_ADDRESS, R as ROOT_MANAGER_PROGRAM_ADDRESS, S as SYSTEM_TEST_PROGRAM_ADDRESS, T as TOKEN_PROGRAM_ADDRESS, U as UPLOADER_PROGRAM_ADDRESS } from './core-program-addresses-CB51FSmT.cjs'; export { A as AccountNonceObserver, a as AccountNonceObserverOptions, b as AccountQueryOptions, B as Block, c as BlockList, d as BlockQueryOptions, e as BlockSelector, C as ChainEvent, f as CompressionModule, g as CreateAccountOptions, D as DeriveAddressInput, h as DeriveAddressResult, i as DeriveProgramAddressOptions, j as DeriveProgramAddressResult, F as FeePayerNonceAllocation, k as FeePayerNonceManager, l as FeePayerNonceManagerOptions, G as GenerateStateProofOptions, m as GenerateStateProofsOptions, n as GeneratedKeyPair, o as GetEventOptions, p as GetStateRootsOptions, H as HeightSnapshot, q as HeightSnapshotParams, L as ListAccountsOptions, r as ListBlocksOptions, s as ListSlotMetricsOptions, N as NonceRejectExecutionResult, R as RawAccountQueryOptions, t as RawBlockQueryOptions, S as StateProof, u as StateProofOutcome, v as StreamAccountUpdate, w as StreamAccountUpdatesOptions, x as StreamAccountUpdatesResult, y as StreamBlocksOptions, z as StreamBlocksResult, E as StreamEventsOptions, I as StreamEventsResult, J as StreamNodeRecordsOptions, K as StreamNodeRecordsResult, M as StreamSlotMetricsOptions, O as StreamSlotMetricsResult, P as StreamTransactionsOptions, Q as StreamTransactionsResult, T as Thru, U as TrackTransactionOptions, V as VersionContextInput, W as VersionInfo, X as WaitForNonceOptions, Y as accounts, Z as blocks, _ as chain, $ as collectStream, a0 as consensus, a1 as createThruClient, a2 as deriveAddress, a3 as deriveProgramAddress, a4 as events, a5 as expectedNonceFromExecutionResult, a6 as firstStreamValue, a7 as forEachStreamValue, a8 as height, a9 as keys, aa as node, ab as nonce, ac as proofs, ad as slots, ae as streaming } from './client-B8KcfD5b.cjs'; export { A as Account } from './Account-CZyLjJZO.cjs'; export { j as AccountView, C as ConsensusStatus } from './account_pb-nVy1q-D5.cjs'; export { C as BlockView, R as ExecutionStatus, V as FilterParamValueSchema, W as FilterSchema, bU as SubmissionStatus, c4 as TransactionView, c6 as TransactionVmError } from './query_service_pb-Ci7T_0DF.cjs'; import '@connectrpc/connect'; import '@connectrpc/connect-web'; import '@bufbuild/protobuf/wkt'; import './streaming_service_pb-CNGmJEsl.cjs'; import '@bufbuild/protobuf/codegenv2'; import '@bufbuild/protobuf'; declare class TransactionBuilder { build(params: BuildTransactionParams): Transaction; buildAndSign(params: BuildTransactionParams): Promise; } /** * EOA (externally-owned account) program instruction and authorization-message * builders. * * The EOA program is installed at its canonical managed genesis address * ({@link EOA_PROGRAM_ADDRESS}). Creating or deleting an EOA requires an * Ed25519 signature by the EOA's *own* key over a canonical, domain-separated * authorization message (see {@link buildEOACreateMessage} / * {@link buildEOADeleteMessage}). That message is signed **raw** with * PureEd25519 — it is short enough (82 bytes) that it is NOT pre-hashed, unlike * the outer transaction signature. The resulting 64-byte signature is embedded * in the instruction via {@link buildCreateEOAInstruction} / * {@link buildDeleteEOAInstruction}. * * The byte layouts here are byte-identical to what the runtime constructs * (tn_vm_syscall_account_create_eoa / tn_vm_syscall_account_delete) and to the * Rust/Go builders, so a signature produced against these messages is accepted * on chain. This makes them suitable for a bring-your-own-signer custody * partner that holds the EOA key in an HSM/MPC backend. */ /** Canonical managed EOA program address (32 bytes). */ declare const EOA_PROGRAM_ADDRESS: Uint8Array; /** EOA program instruction discriminants (tn_eoa_program.h). */ declare const EOA_INSTRUCTION_CREATE_ACCOUNT = 0; declare const EOA_INSTRUCTION_TRANSFER = 1; declare const EOA_INSTRUCTION_DELETE_ACCOUNT = 2; /** * Total size of the EOA create authorization message: * tag(16) + chain_id(2) + fee_payer(32) + eoa(32) = 82 bytes. */ declare const EOA_CREATE_MSG_SIZE: number; /** * Build the canonical domain-separated EOA create authorization message: * `"tn_eoa_create_v1" || chain_id || fee_payer || eoa`. * * chain_id is encoded little-endian. The result is byte-identical to what the * runtime constructs in tn_vm_syscall_account_create_eoa and to the Rust/Go * builders. The EOA's private key signs this message **raw** (PureEd25519, no * pre-hash); the resulting 64-byte signature is passed to * {@link buildCreateEOAInstruction}. */ declare function buildEOACreateMessage(chainId: number, feePayer: Uint8Array, eoa: Uint8Array): Uint8Array; /** * Total size of the EOA delete authorization message: * tag(16) + chain_id(2) + fee_payer(32) + eoa(32) = 82 bytes. */ declare const EOA_DELETE_MSG_SIZE: number; /** * Build the canonical domain-separated EOA delete authorization message: * `"tn_eoa_delete_v1" || chain_id || fee_payer || eoa`. * * chain_id is encoded little-endian. The result must be byte-identical to what * the runtime constructs in tn_vm_syscall_account_delete and to the Rust/Go * builders. The EOA's private key signs this message raw; the resulting * signature is passed to {@link buildDeleteEOAInstruction}. */ declare function buildEOADeleteMessage(chainId: number, feePayer: Uint8Array, eoa: Uint8Array): Uint8Array; /** * Build the CREATE_ACCOUNT instruction for the EOA program. * * Discriminant: 0. Wire format: * `[discriminant:4][proof_size:8][eoa_account_idx:2][signature:64][proof:variable]` * * `signature` is the EOA key's signature over the message from * {@link buildEOACreateMessage}. `eoaAccountIdx` is the index of the new EOA in * the transaction's account list (accounts are ordered * `[feePayer, program, ...readWrite, ...readOnly]`). When `proofData` is empty * the runtime re-creates a deleted (still-active) tombstone without a proof. */ declare function buildCreateEOAInstruction(eoaAccountIdx: number, signature: Uint8Array, proofData: Uint8Array): Uint8Array; /** * Build the DELETE_ACCOUNT instruction for the EOA program. * * Discriminant: 2. Wire format: * `[discriminant:4][eoa_account_idx:2][signature:64]` * * The runtime verifies `signature` over the message from * {@link buildEOADeleteMessage} before deleting the (unused) EOA at * `eoaAccountIdx`. */ declare function buildDeleteEOAInstruction(eoaAccountIdx: number, signature: Uint8Array): Uint8Array; declare const eoa_EOA_CREATE_MSG_SIZE: typeof EOA_CREATE_MSG_SIZE; declare const eoa_EOA_DELETE_MSG_SIZE: typeof EOA_DELETE_MSG_SIZE; declare const eoa_EOA_INSTRUCTION_CREATE_ACCOUNT: typeof EOA_INSTRUCTION_CREATE_ACCOUNT; declare const eoa_EOA_INSTRUCTION_DELETE_ACCOUNT: typeof EOA_INSTRUCTION_DELETE_ACCOUNT; declare const eoa_EOA_INSTRUCTION_TRANSFER: typeof EOA_INSTRUCTION_TRANSFER; declare const eoa_EOA_PROGRAM_ADDRESS: typeof EOA_PROGRAM_ADDRESS; declare const eoa_buildCreateEOAInstruction: typeof buildCreateEOAInstruction; declare const eoa_buildDeleteEOAInstruction: typeof buildDeleteEOAInstruction; declare const eoa_buildEOACreateMessage: typeof buildEOACreateMessage; declare const eoa_buildEOADeleteMessage: typeof buildEOADeleteMessage; declare namespace eoa { export { eoa_EOA_CREATE_MSG_SIZE as EOA_CREATE_MSG_SIZE, eoa_EOA_DELETE_MSG_SIZE as EOA_DELETE_MSG_SIZE, eoa_EOA_INSTRUCTION_CREATE_ACCOUNT as EOA_INSTRUCTION_CREATE_ACCOUNT, eoa_EOA_INSTRUCTION_DELETE_ACCOUNT as EOA_INSTRUCTION_DELETE_ACCOUNT, eoa_EOA_INSTRUCTION_TRANSFER as EOA_INSTRUCTION_TRANSFER, eoa_EOA_PROGRAM_ADDRESS as EOA_PROGRAM_ADDRESS, eoa_buildCreateEOAInstruction as buildCreateEOAInstruction, eoa_buildDeleteEOAInstruction as buildDeleteEOAInstruction, eoa_buildEOACreateMessage as buildEOACreateMessage, eoa_buildEOADeleteMessage as buildEOADeleteMessage }; } /** * Standardized Thru Ed25519 signing: RFC-8032 Ed25519 over a domain-separated * message M = DST_domain ‖ context, DST being a fixed 16-byte ASCII tag. This * is byte-identical to any stock Ed25519 signer over M (HSM/MPC/SDK), which is * exactly what a bring-your-own-signer custody partner (e.g. one using a TSM) * needs. See specs/mpc-hsm-signer-design.md §4.1. */ /** * Signing domain -- byte-for-byte in step with `tn_signature_domain_t` in * `src/thru/util/tn_signature.h` (values must not be reordered). */ declare enum SignatureDomain$1 { TXN = 0, BLOCK_HEADER = 1, BLOCK = 2, GOSSIP = 3, NODE_RECORD = 4, EOA_CREATE = 5, EOA_DELETE = 6, /** Generic user / wallet message signing (see {@link signMessage}). */ MSG = 7 } /** * Fresh copy of the 16-byte ASCII DST for `domain`. Callers building `M` * outside of {@link signWithDomain} (e.g. the EOA authorization builders) * should source the tag through this accessor rather than duplicating string * literals. */ declare function signatureDomainDST(domain: SignatureDomain$1): Uint8Array; /** M = DST_domain ‖ context. TXN context is SHA-256(message); else message. */ declare function buildSignedMessage(message: Uint8Array, domain: SignatureDomain$1): Uint8Array; /** * Sign M = DST_domain ‖ context with standard RFC-8032 Ed25519. */ declare function signWithDomain$1(message: Uint8Array, privateKey: Uint8Array, publicKey?: Uint8Array, domain?: SignatureDomain$1): Promise; /** * Strict/canonical verification: reject non-canonical A/R encodings, small-order * A/R, and non-canonical S, then the cofactorless equation [S]B == R + [k]A over * M = DST_domain ‖ context. Matches the C/Rust/Go strict policy. */ declare function verifyWithDomain$1(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array, domain?: SignatureDomain$1): Promise; /** * Low-level verify-before-attach primitive: verifies `signature` over * `M = buildSignedMessage(message, domain)` for `publicKey` under the * strict/canonical policy, then returns a fresh copy of the signature bytes. * * This primitive trusts the caller to pass the correct `publicKey` and `domain`; * for transactions prefer {@link buildTransactionSigningMessage} + * {@link attachTransactionSignature}, which derive the expected fee-payer from * the body and fix the domain so those cannot be mismatched. */ declare function attachSignature(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array, domain?: SignatureDomain$1): Promise; /** * An opaque, frozen transaction signing message. Its state lives in genuinely * private (`#`) fields set once at construction from a *copied* body, so it * cannot be structurally forged and its bytes cannot be mutated by a caller. * The fee-payer key is derived from the body (never independent caller input), * and {@link TransactionSigningMessage.attach} re-verifies against that private * body — so neither a hand-rolled message nor a post-build mutation can steer the * accepted key or desync the signature. */ declare class TransactionSigningMessage { #private; private constructor(); /** * Build from a transaction body (wire bytes before the trailing signature). * The expected key is the fee-payer taken from the body header (offset 48), * *not* an independent argument — so a caller cannot pair a body owned by * fee-payer A with a signer for key B and produce a locally-"valid" signature * the chain then rejects. Throws if `body` is shorter than the wire header. */ static fromBody(body: Uint8Array): TransactionSigningMessage; /** The exact 48 bytes `M = DST_TXN ‖ SHA-256(body)` to hand the HSM/MPC. */ get m(): Uint8Array; /** The fee-payer public key the signature must verify under (from the body). */ get expectedPublicKey(): Uint8Array; /** Immutable snapshot of the transaction body. */ get body(): Uint8Array; /** * Verify an externally-produced signature over `M` for the body's fee-payer * under the strict/canonical policy, then return the complete signed * transaction wire (`body ‖ sig`) as a fresh buffer. The signature is copied * up front (no TOCTOU), and verification/assembly use the private body — so a * wrong-key or garbage signature fails locally, not on chain. */ attach(signature: Uint8Array): Promise; } /** * Bring-your-own-signer surface (e.g. a custody partner via a Builder Vault TSM): * * const msg = buildTransactionSigningMessage(body); // derives fee-payer * const sig = await tsm.sign(msg.m); // stock Ed25519 over M * const signed = await attachTransactionSignature(msg, sig); // body ‖ sig * * Thin free-function wrappers over {@link TransactionSigningMessage} for parity * with the Rust `signer` surface. */ declare function buildTransactionSigningMessage(body: Uint8Array): TransactionSigningMessage; declare function attachTransactionSignature(message: TransactionSigningMessage, signature: Uint8Array): Promise; /** * Sign a generic user / wallet message under {@link SignatureDomain.MSG}. * Distinct DST from txn / block / node record / EOA authorizations, so a * signature produced by a wallet's "sign message" flow can never be replayed * as any of them. */ declare function signMessage(message: Uint8Array, privateKey: Uint8Array, publicKey?: Uint8Array): Promise; /** Verify a generic user / wallet message signature produced by {@link signMessage}. */ declare function verifyMessage(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array): Promise; /** * Signature domain types matching the C implementation. */ declare enum SignatureDomain { TXN = 0,/* Transaction */ BLOCK_HEADER = 1,/* Block header */ BLOCK = 2,/* Block */ GOSSIP = 3 } /** * Domain-separated Ed25519 signing that matches the Rust/C implementation: * r = H(domain || prefix || msg) * k = H(domain || R || A || msg) * S = (r + k * scalar) mod L */ declare function signWithDomain(message: Uint8Array, privateKey: Uint8Array, publicKey?: Uint8Array, domain?: SignatureDomain): Promise; /** * Domain-separated Ed25519 verification matching the Rust/C implementation. */ declare function verifyWithDomain(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array, domain?: SignatureDomain): Promise; type domainSigningLegacy_SignatureDomain = SignatureDomain; declare const domainSigningLegacy_SignatureDomain: typeof SignatureDomain; declare const domainSigningLegacy_signWithDomain: typeof signWithDomain; declare const domainSigningLegacy_verifyWithDomain: typeof verifyWithDomain; declare namespace domainSigningLegacy { export { domainSigningLegacy_SignatureDomain as SignatureDomain, domainSigningLegacy_signWithDomain as signWithDomain, domainSigningLegacy_verifyWithDomain as verifyWithDomain }; } export { SignatureDomain$1 as SignatureDomain, SignedTransactionResult, Transaction, TransactionBuilder, TransactionSigningMessage, attachSignature, attachTransactionSignature, buildSignedMessage, buildTransactionSigningMessage, eoa, domainSigningLegacy as legacySigning, signMessage, signWithDomain$1 as signWithDomain, signatureDomainDST, verifyMessage, verifyWithDomain$1 as verifyWithDomain };