/// import { AlgorandAddress } from './cryptoModels'; /** Block producer participation information stored within the account if the account is eligible to produce blocks */ export type AlgorandProducerParticipationStruct = { partpkb64: string; votefst: number; votekd: number; votelst: number; vrfpkb64: string; }; /** Algorand assets held by an Algorand account */ export type AlgorandAssetStruct = { amount: number; 'asset-id': number; creator?: string; deleted?: boolean; 'is-frozen': boolean; 'opted-in-at-round': number; }; /** Algorand asset information stored on the chain */ export type AlgorandAssetParamsStruct = { assetname: string; clawbackaddr: AlgorandAddress; creator: AlgorandAddress; assetDecimals: number; assetDefaultFrozen: boolean; assetFreeze: AlgorandAddress; assetManager: AlgorandAddress; assetMetadataHash?: string; assetReserve: AlgorandAddress; total: number; unitname: string; url: URL; }; /** Algorand account information stored on the chain */ export type AlgorandAccountStruct = { address: AlgorandAddress; amount?: number; 'amount-without-pending-rewards'?: number; 'apps-local-state'?: any; 'apps-total-schema'?: any; assets?: AlgorandAssetStruct[]; 'created-apps'?: any; 'created-assets'?: any; 'created-at-round'?: number; deleted?: boolean; 'pending-rewards'?: number; 'reward-base'?: number; rewards?: number; round?: number; 'sig-type'?: string; status?: string; }; /** Latest chain state - from calling {chain}/transactions/params - useful for adding 'header' fields to a transaction */ export type AlgorandChainTransactionParamsStruct = { genesisHash: string; genesisID: string; firstRound: number; lastRound: number; minFee: number; suggestedFee: number; }; /** Account object generated - in the format returned from algosdk */ export type AlgorandGeneratedAccountStruct = { addr: string; sk: Uint8Array; }; /** Algorand's on-chain transaction type codes */ export declare enum AlgorandTransactionTypeCode { Application = "appl", AssetConfig = "acfg", AssetFreeze = "afrz", AssetTransfer = "axfer", KeyRegistration = "keyreg", Payment = "pay" } export type AlgorandAddressStruct = { publicKey: Uint8Array; checksum: Uint8Array; }; /** All possible fields in an Algorand transction */ export type AlgorandTxActionStruct = { to?: AlgorandAddressStruct; from?: AlgorandAddressStruct; amount?: number; note?: Uint8Array; name?: string; tag?: Buffer; lease?: Uint8Array; closeRemainderTo?: AlgorandAddressStruct; voteKey?: Buffer; selectionKey?: Buffer; voteFirst?: number; voteLast?: number; voteKeyDilution?: number; assetIndex?: number; assetTotal?: number; assetDecimals?: number; assetDefaultFrozen?: boolean; assetManager?: AlgorandAddressStruct; assetReserve?: AlgorandAddressStruct; assetFreeze?: AlgorandAddressStruct; assetClawback?: AlgorandAddressStruct; assetUnitName?: string; assetName?: string; assetURL?: string; assetMetadataHash?: string | Uint8Array; freezeAccount?: AlgorandAddressStruct; freezeState?: boolean; assetRevocationTarget?: AlgorandAddressStruct; type?: string; group?: Buffer; appIndex?: number; appOnComplete?: number; appLocalInts?: number; appLocalByteSlices?: number; appGlobalInts?: number; appGlobalByteSlices?: number; appApprovalProgram?: Uint8Array; appClearProgram?: Uint8Array; appArgs?: Uint8Array[]; appAccounts?: AlgorandAddressStruct[]; appForeignApps?: number[]; appForeignAssets?: number[]; reKeyTo?: AlgorandAddressStruct; genesisID?: string; genesisHash?: Buffer; firstRound?: number; lastRound?: number; fee?: number; flatFee?: boolean; nonParticipation?: boolean; extraPages?: number; }; /** Algorand transaction encoded and 'minified' ready to send to chain */ export type AlgorandTxEncodedForChain = { rcv?: Buffer; name?: string; tag?: Buffer; amt?: number | bigint; note?: Buffer; snd?: Buffer; type?: AlgorandTransactionTypeCode | string; fv?: number; lv?: number; fee?: number; gen?: string; gh?: Buffer; lx?: Buffer; grp?: Buffer; voteKey?: Buffer; selkey?: Buffer; votefst?: number; votelst?: number; votekd?: number; caid?: number; apar?: { t?: number | bigint; df?: boolean; dc?: number; m?: Buffer; r?: Buffer; f?: Buffer; c?: Buffer; an?: string; un?: string; au?: string; am?: Buffer; }; apid?: number; apan?: number; apls?: { nui?: number; nbs?: number; }; apgs?: { nui?: number; nbs?: number; }; apfa?: number[]; apas?: number[]; apap?: Buffer; apsu?: Buffer; apaa?: Buffer[]; apat?: Buffer[]; aclose?: Buffer; asnd?: Buffer; fadd?: Buffer; afrz?: boolean; reKeyTo?: Buffer; apep?: number; }; /** a signature object for multisig transaction */ export type AlgorandMultiSignatureStruct = { /** Public key - Buffer encoded string */ pk: Uint8Array; /** Signature - Buffer encoded Uint8Array */ s?: Uint8Array; }; export type AlgorandMultiSignatureMsigStruct = { /** multisig version */ v: number; /** multisig threshold */ thr: number; subsig: AlgorandMultiSignatureStruct[]; }; /** the object that can be encoded as a Uint8Array and sent to the chain */ export type AlgorandRawTransactionMultisigStruct = { /** JSON object */ txn: AlgorandTxEncodedForChain; msig: AlgorandMultiSignatureMsigStruct; }; /** the object that can be encoded as a Uint8Array and sent to the chain */ export type AlgorandRawTransactionStruct = { /** JSON object */ txn: AlgorandTxEncodedForChain; /** Signature - Buffer encoded Uint8Array */ sig: Buffer; /** Public key - Buffer encoded string - for signing key (only populated if different then the from address) */ sgnr?: Buffer; }; /** Results from calling an Algo SDK sign function */ export type AlgorandTxSignResults = { txID: string; blob: Uint8Array; }; export type AlgorandBlock = { rewards: any; round: number; seed: string; timestamp: number; transactions: any[]; };