import { UInt32, UInt64 } from './field-bigint.js'; import { Binable } from '../../bindings/lib/binable.js'; import { Common, Delegation, Payment, UserCommand, UserCommandEnum, PaymentJson, DelegationJson } from './sign-legacy.js'; import { PublicKey } from './curve-bigint.js'; import { Signature, SignatureJson } from './signature.js'; export { hashPayment, hashStakeDelegation, SignedCommand, SignedCommandV1, Common, userCommandToEnum, userCommandToV1, Signed, SignedLegacy, HashBase58, }; type Signed = { data: T; signature: string; }; type SignedLegacy = { data: T; signature: SignatureJson; }; declare function hashPayment(signed: SignedLegacy, { berkeley }?: { berkeley?: boolean | undefined; }): string; declare function hashStakeDelegation(signed: SignedLegacy, { berkeley }?: { berkeley?: boolean | undefined; }): string; declare function userCommandToEnum({ common, body }: UserCommand): UserCommandEnum; declare const Common: Binable; declare const Payment: Binable; declare const Delegation: Binable; type DelegationEnum = { type: 'SetDelegate'; value: Delegation; }; declare const DelegationEnum: Binable; declare const UserCommand: Binable<{ common: Common; body: { type: 'Payment'; value: Payment; } | { type: 'StakeDelegation'; value: DelegationEnum; }; }>; type SignedCommand = { payload: UserCommandEnum; signer: PublicKey; signature: Signature; }; declare const SignedCommand: Binable; declare const HashBase58: import("../../lib/util/base58.js").Base58; declare function userCommandToV1({ common, body }: UserCommand): UserCommandV1; type CommonV1 = { fee: UInt64; feePayer: PublicKey; nonce: UInt32; validUntil: UInt32; memo: string; feeToken: UInt64; }; declare const CommonV1: Binable; type PaymentV1 = Payment & { source: PublicKey; tokenId: UInt64; }; declare const PaymentV1: Binable; type DelegationV1 = Delegation & { delegator: PublicKey; }; declare const DelegationV1: Binable; type DelegationEnumV1 = { type: 'SetDelegate'; value: DelegationV1; }; declare const DelegationEnumV1: Binable; type BodyV1 = { type: 'Payment'; value: PaymentV1; } | { type: 'StakeDelegation'; value: DelegationEnumV1; }; declare const BodyV1: Binable<{ type: 'Payment'; value: PaymentV1; } | { type: 'StakeDelegation'; value: DelegationEnumV1; }>; type UserCommandV1 = { common: CommonV1; body: BodyV1; }; declare const UserCommandV1: Binable; type SignedCommandV1 = { payload: UserCommandV1; signer: PublicKey; signature: Signature; }; declare const SignedCommandV1: Binable & import("../../lib/util/base58.js").Base58;