@algorandfoundation/algokit-utils 10.0.0-alpha.5 → 10.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/algod-client/index.d.ts +1 -4
  2. package/package.json +1 -1
  3. package/packages/algod_client/src/models/block.d.ts +2 -2
  4. package/packages/algod_client/src/models/block.js +1 -1
  5. package/packages/algod_client/src/models/block.js.map +1 -1
  6. package/packages/algod_client/src/models/block.mjs +1 -1
  7. package/packages/algod_client/src/models/block.mjs.map +1 -1
  8. package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.d.ts +3 -5
  9. package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.js +4 -6
  10. package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.js.map +1 -1
  11. package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.mjs +3 -5
  12. package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.mjs.map +1 -1
  13. package/packages/common/src/json.mjs +2 -2
  14. package/packages/common/src/json.mjs.map +1 -1
  15. package/packages/sdk/src/utils/utils.mjs +2 -2
  16. package/packages/sdk/src/utils/utils.mjs.map +1 -1
  17. package/packages/transact/src/multisig.d.ts +2 -2
  18. package/packages/transact/src/multisig.js +15 -15
  19. package/packages/transact/src/multisig.js.map +1 -1
  20. package/packages/transact/src/multisig.mjs +15 -15
  21. package/packages/transact/src/multisig.mjs.map +1 -1
  22. package/packages/transact/src/transactions/app-call.d.ts +8 -8
  23. package/packages/transact/src/transactions/app-call.js.map +1 -1
  24. package/packages/transact/src/transactions/app-call.mjs.map +1 -1
  25. package/packages/transact/src/transactions/reference-types-meta.d.ts +26 -0
  26. package/packages/transact/src/transactions/reference-types-meta.js +71 -0
  27. package/packages/transact/src/transactions/reference-types-meta.js.map +1 -0
  28. package/packages/transact/src/transactions/reference-types-meta.mjs +69 -0
  29. package/packages/transact/src/transactions/reference-types-meta.mjs.map +1 -0
  30. package/packages/transact/src/transactions/transaction-meta.js +22 -22
  31. package/packages/transact/src/transactions/transaction-meta.js.map +1 -1
  32. package/packages/transact/src/transactions/transaction-meta.mjs +22 -22
  33. package/packages/transact/src/transactions/transaction-meta.mjs.map +1 -1
  34. package/transact/index.d.ts +3 -2
  35. package/transact/index.js +4 -0
  36. package/transact/index.mjs +2 -1
  37. package/transactions/app-call.d.ts +2 -2
  38. package/transactions/app-call.js +15 -15
  39. package/transactions/app-call.js.map +1 -1
  40. package/transactions/app-call.mjs +15 -15
  41. package/transactions/app-call.mjs.map +1 -1
  42. package/transactions/asset-config.d.ts +1 -1
  43. package/transactions/asset-config.js +1 -1
  44. package/transactions/asset-config.js.map +1 -1
  45. package/transactions/asset-config.mjs +1 -1
  46. package/transactions/asset-config.mjs.map +1 -1
  47. package/types/algorand-client-transaction-creator.d.ts +81 -81
  48. package/types/algorand-client-transaction-sender.d.ts +84 -84
  49. package/types/app-client.d.ts +145 -145
  50. package/types/app-factory.d.ts +70 -70
  51. package/types/app-manager.js +5 -5
  52. package/types/app-manager.js.map +1 -1
  53. package/types/app-manager.mjs +5 -5
  54. package/types/app-manager.mjs.map +1 -1
  55. package/types/app-spec.js +12 -5
  56. package/types/app-spec.js.map +1 -1
  57. package/types/app-spec.mjs +12 -5
  58. package/types/app-spec.mjs.map +1 -1
  59. package/types/composer.js +3 -3
  60. package/types/composer.js.map +1 -1
  61. package/types/composer.mjs +3 -3
  62. package/types/composer.mjs.map +1 -1
  63. package/packages/algod_client/src/models/application-local-reference.d.ts +0 -20
  64. package/packages/algod_client/src/models/application-local-reference.js +0 -23
  65. package/packages/algod_client/src/models/application-local-reference.js.map +0 -1
  66. package/packages/algod_client/src/models/application-local-reference.mjs +0 -23
  67. package/packages/algod_client/src/models/application-local-reference.mjs.map +0 -1
  68. package/packages/algod_client/src/models/asset-holding-reference.d.ts +0 -20
  69. package/packages/algod_client/src/models/asset-holding-reference.js +0 -23
  70. package/packages/algod_client/src/models/asset-holding-reference.js.map +0 -1
  71. package/packages/algod_client/src/models/asset-holding-reference.mjs +0 -23
  72. package/packages/algod_client/src/models/asset-holding-reference.mjs.map +0 -1
  73. package/packages/algod_client/src/models/box-reference.d.ts +0 -17
  74. package/packages/algod_client/src/models/box-reference.js +0 -23
  75. package/packages/algod_client/src/models/box-reference.js.map +0 -1
  76. package/packages/algod_client/src/models/box-reference.mjs +0 -23
  77. package/packages/algod_client/src/models/box-reference.mjs.map +0 -1
@@ -20,8 +20,6 @@ import { AssetParams } from "../packages/algod_client/src/models/asset-params.js
20
20
  import { Asset } from "../packages/algod_client/src/models/asset.js";
21
21
  import { AssetHolding } from "../packages/algod_client/src/models/asset-holding.js";
22
22
  import { Account } from "../packages/algod_client/src/models/account.js";
23
- import { AssetHoldingReference } from "../packages/algod_client/src/models/asset-holding-reference.js";
24
- import { ApplicationLocalReference } from "../packages/algod_client/src/models/application-local-reference.js";
25
23
  import { AvmValue } from "../packages/algod_client/src/models/avm-value.js";
26
24
  import { AvmKeyValue } from "../packages/algod_client/src/models/avm-key-value.js";
27
25
  import { EvalDelta } from "../packages/algod_client/src/models/eval-delta.js";
@@ -33,7 +31,6 @@ import { SimulateTraceConfig } from "../packages/algod_client/src/models/simulat
33
31
  import { SimulateRequest } from "../packages/algod_client/src/models/simulate-request.js";
34
32
  import { Box } from "../packages/algod_client/src/models/box.js";
35
33
  import { BoxDescriptor } from "../packages/algod_client/src/models/box-descriptor.js";
36
- import { BoxReference } from "../packages/algod_client/src/models/box-reference.js";
37
34
  import { BuildVersion } from "../packages/algod_client/src/models/build-version.js";
38
35
  import { Version } from "../packages/algod_client/src/models/version.js";
39
36
  import { PendingTransactionResponse } from "../packages/algod_client/src/models/pending-transaction-response.js";
@@ -73,4 +70,4 @@ import { DisassembleResponse } from "../packages/algod_client/src/models/disasse
73
70
  import { SuggestedParams, SuggestedParamsMeta } from "../packages/algod_client/src/models/suggested-params.js";
74
71
  import { AlgodApi } from "../packages/algod_client/src/apis/api-service.js";
75
72
  import { AlgodClient } from "../packages/algod_client/src/client.js";
76
- export { Account, AccountApplicationResponse, AccountAssetResponse, AccountParticipation, AccountStateDelta, AlgodApi, AlgodClient, ApiError, ApiRequestOptions, Application, ApplicationInitialStates, ApplicationKvStorage, ApplicationLocalReference, ApplicationLocalState, ApplicationParams, ApplicationStateOperation, ApplicationStateSchema, ApplyData, Asset, AssetHolding, AssetHoldingReference, AssetParams, AvmKeyValue, AvmValue, BaseHttpRequest, Block, BlockAppEvalDelta, BlockEvalDelta, BlockHashResponse, BlockHeader, BlockResponse, BlockStateProofTrackingData, BlockTxidsResponse, Box, BoxDescriptor, BoxReference, BoxesResponse, BuildVersion, ClientConfig, CompileResponse, DisassembleResponse, EvalDelta, EvalDeltaKeyValue, FetchHttpRequest, Genesis, GenesisAllocation, GetBlockTimeStampOffsetResponse, GetSyncRoundResponse, LedgerStateDelta, LedgerStateDeltaForTransactionGroup, LightBlockHeaderProof, NodeStatusResponse, ParticipationUpdates, PendingTransactionResponse, PendingTransactionsResponse, PostTransactionsResponse, ScratchChange, SignedTxnInBlock, SignedTxnWithAD, SimulateInitialStates, SimulateRequest, SimulateRequestTransactionGroup, SimulateResponse, SimulateTraceConfig, SimulateTransactionGroupResult, SimulateTransactionResult, SimulateUnnamedResourcesAccessed, SimulationEvalOverrides, SimulationOpcodeTraceUnit, SimulationTransactionExecTrace, SourceMap, StateDelta, StateProof, StateProofMessage, SuggestedParams, SuggestedParamsMeta, SupplyResponse, TealKeyValue, TealKeyValueStore, TealValue, TransactionGroupLedgerStateDeltasForRoundResponse, TransactionParametersResponse, TransactionProof, Version, decodeJson, decodeMsgpack, encodeJson, encodeMsgpack, inputValueAsString };
73
+ export { Account, AccountApplicationResponse, AccountAssetResponse, AccountParticipation, AccountStateDelta, AlgodApi, AlgodClient, ApiError, ApiRequestOptions, Application, ApplicationInitialStates, ApplicationKvStorage, ApplicationLocalState, ApplicationParams, ApplicationStateOperation, ApplicationStateSchema, ApplyData, Asset, AssetHolding, AssetParams, AvmKeyValue, AvmValue, BaseHttpRequest, Block, BlockAppEvalDelta, BlockEvalDelta, BlockHashResponse, BlockHeader, BlockResponse, BlockStateProofTrackingData, BlockTxidsResponse, Box, BoxDescriptor, BoxesResponse, BuildVersion, ClientConfig, CompileResponse, DisassembleResponse, EvalDelta, EvalDeltaKeyValue, FetchHttpRequest, Genesis, GenesisAllocation, GetBlockTimeStampOffsetResponse, GetSyncRoundResponse, LedgerStateDelta, LedgerStateDeltaForTransactionGroup, LightBlockHeaderProof, NodeStatusResponse, ParticipationUpdates, PendingTransactionResponse, PendingTransactionsResponse, PostTransactionsResponse, ScratchChange, SignedTxnInBlock, SignedTxnWithAD, SimulateInitialStates, SimulateRequest, SimulateRequestTransactionGroup, SimulateResponse, SimulateTraceConfig, SimulateTransactionGroupResult, SimulateTransactionResult, SimulateUnnamedResourcesAccessed, SimulationEvalOverrides, SimulationOpcodeTraceUnit, SimulationTransactionExecTrace, SourceMap, StateDelta, StateProof, StateProofMessage, SuggestedParams, SuggestedParamsMeta, SupplyResponse, TealKeyValue, TealKeyValueStore, TealValue, TransactionGroupLedgerStateDeltasForRoundResponse, TransactionParametersResponse, TransactionProof, Version, decodeJson, decodeMsgpack, encodeJson, encodeMsgpack, inputValueAsString };
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "**"
7
7
  ],
8
8
  "name": "@algorandfoundation/algokit-utils",
9
- "version": "10.0.0-alpha.5",
9
+ "version": "10.0.0-alpha.7",
10
10
  "private": false,
11
11
  "description": "A set of core Algorand utilities written in TypeScript and released via npm that make it easier to build solutions on Algorand.",
12
12
  "author": "Algorand Foundation",
@@ -20,9 +20,9 @@ type BlockAppEvalDelta = {
20
20
  /** [ld] Local state deltas keyed by address index. */
21
21
  localDeltas?: Map<number, Map<Uint8Array, BlockEvalDelta>>;
22
22
  /** [itx] Inner transactions produced by this application execution. */
23
- innerTxns?: SignedTxnInBlock[];
23
+ innerTxns?: SignedTxnWithAD[];
24
24
  /** [sa] Shared accounts referenced by local deltas. */
25
- sharedAccounts?: string[];
25
+ sharedAccounts?: Address[];
26
26
  /** [lg] Application log outputs. */
27
27
  logs?: Uint8Array[];
28
28
  };
@@ -54,7 +54,7 @@ const BlockAppEvalDeltaMeta = {
54
54
  name: "innerTxns",
55
55
  wireKey: "itx",
56
56
  optional: true,
57
- codec: new require_array.ArrayCodec(new require_object_model.ObjectModelCodec(() => SignedTxnInBlockMeta))
57
+ codec: new require_array.ArrayCodec(new require_object_model.ObjectModelCodec(() => SignedTxnWithADMeta))
58
58
  },
59
59
  {
60
60
  name: "sharedAccounts",
@@ -1 +1 @@
1
- {"version":3,"file":"block.js","names":["BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta>","numberCodec","bytesCodec","bigIntCodec","BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta>","MapCodec","ObjectModelCodec","ArrayCodec","addressArrayCodec","bytesArrayCodec","BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData>","ApplyDataMeta: ObjectModelMetadata<ApplyData>","SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD>","SignedTransactionMeta","SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock>","booleanCodec","ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates>","BlockHeaderMeta: ObjectModelMetadata<BlockHeader>","stringCodec","addressCodec","BlockMeta: ObjectModelMetadata<Block>"],"sources":["../../../../../packages/algod_client/src/models/block.ts"],"sourcesContent":["import { type SignedTransaction, SignedTransactionMeta } from '@algorandfoundation/algokit-transact'\nimport {\n addressArrayCodec,\n addressCodec,\n Address,\n ArrayCodec,\n bigIntCodec,\n booleanCodec,\n bytesArrayCodec,\n bytesCodec,\n MapCodec,\n ObjectModelCodec,\n numberCodec,\n stringCodec,\n type ObjectModelMetadata,\n} from '@algorandfoundation/algokit-common'\n\n/** BlockEvalDelta represents a TEAL value delta (block/msgpack wire keys). */\nexport type BlockEvalDelta = {\n /** [at] delta action. */\n action: number\n /** [bs] bytes value. */\n bytes?: Uint8Array\n /** [ui] uint value. */\n uint?: bigint\n}\n\nexport const BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta> = {\n name: 'BlockEvalDelta',\n kind: 'object',\n fields: [\n { name: 'action', wireKey: 'at', optional: false, codec: numberCodec },\n { name: 'bytes', wireKey: 'bs', optional: true, codec: bytesCodec },\n { name: 'uint', wireKey: 'ui', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * State changes from application execution, including inner transactions and logs.\n */\nexport type BlockAppEvalDelta = {\n /** [gd] Global state delta for the application. */\n globalDelta?: Map<Uint8Array, BlockEvalDelta>\n /** [ld] Local state deltas keyed by address index. */\n localDeltas?: Map<number, Map<Uint8Array, BlockEvalDelta>>\n /** [itx] Inner transactions produced by this application execution. */\n innerTxns?: SignedTxnInBlock[]\n /** [sa] Shared accounts referenced by local deltas. */\n sharedAccounts?: string[]\n /** [lg] Application log outputs. */\n logs?: Uint8Array[]\n}\n\nexport const BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta> = {\n name: 'BlockAppEvalDelta',\n kind: 'object',\n fields: [\n {\n name: 'globalDelta',\n wireKey: 'gd',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta)),\n },\n {\n name: 'localDeltas',\n wireKey: 'ld',\n optional: true,\n codec: new MapCodec(numberCodec, new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta))),\n },\n {\n name: 'innerTxns',\n wireKey: 'itx',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(() => SignedTxnInBlockMeta)),\n },\n {\n name: 'sharedAccounts',\n wireKey: 'sa',\n optional: true,\n codec: addressArrayCodec,\n },\n { name: 'logs', wireKey: 'lg', optional: true, codec: bytesArrayCodec },\n ],\n}\n\n/** Tracking metadata for a specific StateProofType. */\nexport type BlockStateProofTrackingData = {\n /** [v] Vector commitment root of state proof voters. */\n stateProofVotersCommitment?: Uint8Array\n /** [t] Online total weight during state proof round. */\n stateProofOnlineTotalWeight?: bigint\n /** [n] Next round for which state proofs are accepted. */\n stateProofNextRound?: bigint\n}\n\nexport const BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData> = {\n name: 'BlockStateProofTrackingData',\n kind: 'object',\n fields: [\n { name: 'stateProofVotersCommitment', wireKey: 'v', optional: true, codec: bytesCodec },\n { name: 'stateProofOnlineTotalWeight', wireKey: 't', optional: true, codec: bigIntCodec },\n { name: 'stateProofNextRound', wireKey: 'n', optional: true, codec: bigIntCodec },\n ],\n}\n\nexport type ApplyData = {\n closingAmount?: bigint\n assetClosingAmount?: bigint\n senderRewards?: bigint\n receiverRewards?: bigint\n closeRewards?: bigint\n evalDelta?: BlockAppEvalDelta\n configAsset?: bigint\n applicationId?: bigint\n}\n\nexport const ApplyDataMeta: ObjectModelMetadata<ApplyData> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n { name: 'closingAmount', wireKey: 'ca', optional: true, codec: bigIntCodec },\n { name: 'assetClosingAmount', wireKey: 'aca', optional: true, codec: bigIntCodec },\n { name: 'senderRewards', wireKey: 'rs', optional: true, codec: bigIntCodec },\n { name: 'receiverRewards', wireKey: 'rr', optional: true, codec: bigIntCodec },\n { name: 'closeRewards', wireKey: 'rc', optional: true, codec: bigIntCodec },\n { name: 'evalDelta', wireKey: 'dt', optional: true, codec: new ObjectModelCodec(BlockAppEvalDeltaMeta) },\n { name: 'configAsset', wireKey: 'caid', optional: true, codec: bigIntCodec },\n { name: 'applicationId', wireKey: 'apid', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * SignedTxnWithAD is a SignedTransaction with additional ApplyData.\n */\nexport type SignedTxnWithAD = {\n /** The signed transaction. */\n signedTxn: SignedTransaction\n /** Apply data containing transaction execution information. */\n applyData?: ApplyData\n}\n\nexport const SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD> = {\n name: 'SignedTxnWithAD',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTransactionMeta),\n },\n {\n name: 'applyData',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ApplyDataMeta),\n },\n ],\n}\n\n/**\n * SignedTxnInBlock is a SignedTransaction with additional ApplyData and block-specific metadata.\n */\nexport type SignedTxnInBlock = {\n signedTxn: SignedTxnWithAD\n hasGenesisId?: boolean\n hasGenesisHash?: boolean\n}\n\nexport const SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTxnWithADMeta),\n },\n { name: 'hasGenesisId', wireKey: 'hgi', optional: true, codec: booleanCodec },\n { name: 'hasGenesisHash', wireKey: 'hgh', optional: true, codec: booleanCodec },\n ],\n}\n\nexport type ParticipationUpdates = {\n /** [partupdrmv] Expired participation accounts. */\n expiredParticipationAccounts?: string[]\n /** [partupdabs] Absent participation accounts. */\n absentParticipationAccounts?: string[]\n}\n\nexport const ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates> = {\n name: 'ParticipationUpdates',\n kind: 'object',\n fields: [\n {\n name: 'expiredParticipationAccounts',\n wireKey: 'partupdrmv',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'absentParticipationAccounts',\n wireKey: 'partupdabs',\n optional: true,\n codec: addressArrayCodec,\n },\n ],\n}\n\nexport type BlockHeader = {\n /** [rnd] Round number. */\n round?: bigint\n /** [prev] Previous block hash. */\n previousBlockHash?: Uint8Array\n /** [prev512] Previous block hash using SHA-512. */\n previousBlockHash512?: Uint8Array\n /** [seed] Sortition seed. */\n seed?: Uint8Array\n /** [txn] Root of transaction merkle tree using SHA512_256. */\n transactionsRoot?: Uint8Array\n /** [txn256] Root of transaction vector commitment using SHA256. */\n transactionsRootSha256?: Uint8Array\n /** [txn512] Root of transaction vector commitment using SHA512. */\n transactionsRootSha512?: Uint8Array\n /** [ts] Block timestamp in seconds since epoch. */\n timestamp?: bigint\n /** [gen] Genesis ID. */\n genesisId?: string\n /** [gh] Genesis hash. */\n genesisHash?: Uint8Array\n /** [prp] Proposer address. */\n proposer?: Address\n /** [fc] Fees collected in this block. */\n feesCollected?: bigint\n /** [bi] Bonus incentive for block proposal. */\n bonus?: bigint\n /** [pp] Proposer payout. */\n proposerPayout?: bigint\n /** [fees] FeeSink address. */\n feeSink?: Address\n /** [rwd] RewardsPool address. */\n rewardsPool?: Address\n /** [earn] Rewards level. */\n rewardsLevel?: bigint\n /** [rate] Rewards rate. */\n rewardsRate?: bigint\n /** [frac] Rewards residue. */\n rewardsResidue?: bigint\n /** [rwcalr] Rewards recalculation round. */\n rewardsRecalculationRound?: bigint\n /** [proto] Current consensus protocol. */\n currentProtocol?: string\n /** [nextproto] Next proposed protocol. */\n nextProtocol?: string\n /** [nextyes] Next protocol approvals. */\n nextProtocolApprovals?: bigint\n /** [nextbefore] Next protocol vote deadline. */\n nextProtocolVoteBefore?: bigint\n /** [nextswitch] Next protocol switch round. */\n nextProtocolSwitchOn?: bigint\n /** [upgradeprop] Upgrade proposal. */\n upgradePropose?: string\n /** [upgradedelay] Upgrade delay in rounds. */\n upgradeDelay?: bigint\n /** [upgradeyes] Upgrade approval flag. */\n upgradeApprove?: boolean\n /** [tc] Transaction counter. */\n txnCounter?: bigint\n /** [spt] State proof tracking data keyed by state proof type. */\n stateProofTracking?: Map<number, BlockStateProofTrackingData>\n /** Represents participation account data that needs to be checked/acted on by the network */\n participationUpdates?: ParticipationUpdates\n}\n\nexport const BlockHeaderMeta: ObjectModelMetadata<BlockHeader> = {\n name: 'BlockHeader',\n kind: 'object',\n fields: [\n { name: 'round', wireKey: 'rnd', optional: true, codec: bigIntCodec },\n { name: 'previousBlockHash', wireKey: 'prev', optional: true, codec: bytesCodec },\n { name: 'previousBlockHash512', wireKey: 'prev512', optional: true, codec: bytesCodec },\n { name: 'seed', wireKey: 'seed', optional: true, codec: bytesCodec },\n { name: 'transactionsRoot', wireKey: 'txn', optional: false, codec: bytesCodec },\n { name: 'transactionsRootSha256', wireKey: 'txn256', optional: true, codec: bytesCodec },\n { name: 'transactionsRootSha512', wireKey: 'txn512', optional: true, codec: bytesCodec },\n { name: 'timestamp', wireKey: 'ts', optional: true, codec: bigIntCodec },\n { name: 'genesisId', wireKey: 'gen', optional: true, codec: stringCodec },\n { name: 'genesisHash', wireKey: 'gh', optional: true, codec: bytesCodec },\n { name: 'proposer', wireKey: 'prp', optional: true, codec: addressCodec },\n { name: 'feesCollected', wireKey: 'fc', optional: true, codec: bigIntCodec },\n { name: 'bonus', wireKey: 'bi', optional: true, codec: bigIntCodec },\n { name: 'proposerPayout', wireKey: 'pp', optional: true, codec: bigIntCodec },\n { name: 'feeSink', wireKey: 'fees', optional: true, codec: addressCodec },\n { name: 'rewardsPool', wireKey: 'rwd', optional: true, codec: addressCodec },\n { name: 'rewardsLevel', wireKey: 'earn', optional: true, codec: bigIntCodec },\n { name: 'rewardsRate', wireKey: 'rate', optional: true, codec: bigIntCodec },\n { name: 'rewardsResidue', wireKey: 'frac', optional: true, codec: bigIntCodec },\n { name: 'rewardsRecalculationRound', wireKey: 'rwcalr', optional: true, codec: bigIntCodec },\n { name: 'currentProtocol', wireKey: 'proto', optional: true, codec: stringCodec },\n { name: 'nextProtocol', wireKey: 'nextproto', optional: true, codec: stringCodec },\n { name: 'nextProtocolApprovals', wireKey: 'nextyes', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolVoteBefore', wireKey: 'nextbefore', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolSwitchOn', wireKey: 'nextswitch', optional: true, codec: bigIntCodec },\n { name: 'upgradePropose', wireKey: 'upgradeprop', optional: true, codec: stringCodec },\n { name: 'upgradeDelay', wireKey: 'upgradedelay', optional: true, codec: bigIntCodec },\n { name: 'upgradeApprove', wireKey: 'upgradeyes', optional: true, codec: booleanCodec },\n { name: 'txnCounter', wireKey: 'tc', optional: true, codec: bigIntCodec },\n {\n name: 'stateProofTracking',\n wireKey: 'spt',\n optional: true,\n codec: new MapCodec(numberCodec, new ObjectModelCodec(BlockStateProofTrackingDataMeta)),\n },\n {\n name: 'participationUpdates',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ParticipationUpdatesMeta),\n },\n ],\n}\n\n/**\n * Block contains the BlockHeader and the list of transactions (Payset).\n */\nexport type Block = {\n /** The block information (Header) */\n header: BlockHeader\n\n /** [txns] Block transactions (Payset). */\n payset?: SignedTxnInBlock[]\n}\n\nexport const BlockMeta: ObjectModelMetadata<Block> = {\n name: 'Block',\n kind: 'object',\n fields: [\n { name: 'header', flattened: true, optional: false, codec: new ObjectModelCodec(BlockHeaderMeta) },\n {\n name: 'payset',\n wireKey: 'txns',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(SignedTxnInBlockMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,MAAaA,qBAA0D;CACrE,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAU,SAAS;GAAM,UAAU;GAAO,OAAOC;GAAa;EACtE;GAAE,MAAM;GAAS,SAAS;GAAM,UAAU;GAAM,OAAOC;GAAY;EACnE;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAOC;GAAa;EACpE;CACF;AAkBD,MAAaC,wBAAgE;CAC3E,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIC,qBAASH,0BAAY,IAAII,sCAAiB,mBAAmB,CAAC;GAC1E;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAID,qBAASJ,4BAAa,IAAII,qBAASH,0BAAY,IAAII,sCAAiB,mBAAmB,CAAC,CAAC;GACrG;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIC,yBAAW,IAAID,4CAAuB,qBAAqB,CAAC;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,IAAIA,sCAAiB,yBAAyB;GACtD;EACF;CACF;AAaD,MAAac,YAAwC;CACnD,MAAM;CACN,MAAM;CACN,QAAQ,CACN;EAAE,MAAM;EAAU,WAAW;EAAM,UAAU;EAAO,OAAO,IAAId,sCAAiB,gBAAgB;EAAE,EAClG;EACE,MAAM;EACN,SAAS;EACT,UAAU;EACV,OAAO,IAAIC,yBAAW,IAAID,sCAAiB,qBAAqB,CAAC;EAClE,CACF;CACF"}
1
+ {"version":3,"file":"block.js","names":["BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta>","numberCodec","bytesCodec","bigIntCodec","BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta>","MapCodec","ObjectModelCodec","ArrayCodec","addressArrayCodec","bytesArrayCodec","BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData>","ApplyDataMeta: ObjectModelMetadata<ApplyData>","SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD>","SignedTransactionMeta","SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock>","booleanCodec","ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates>","BlockHeaderMeta: ObjectModelMetadata<BlockHeader>","stringCodec","addressCodec","BlockMeta: ObjectModelMetadata<Block>"],"sources":["../../../../../packages/algod_client/src/models/block.ts"],"sourcesContent":["import {\n Address,\n ArrayCodec,\n MapCodec,\n ObjectModelCodec,\n addressArrayCodec,\n addressCodec,\n bigIntCodec,\n booleanCodec,\n bytesArrayCodec,\n bytesCodec,\n numberCodec,\n stringCodec,\n type ObjectModelMetadata,\n} from '@algorandfoundation/algokit-common'\nimport { SignedTransactionMeta, type SignedTransaction } from '@algorandfoundation/algokit-transact'\n\n/** BlockEvalDelta represents a TEAL value delta (block/msgpack wire keys). */\nexport type BlockEvalDelta = {\n /** [at] delta action. */\n action: number\n /** [bs] bytes value. */\n bytes?: Uint8Array\n /** [ui] uint value. */\n uint?: bigint\n}\n\nexport const BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta> = {\n name: 'BlockEvalDelta',\n kind: 'object',\n fields: [\n { name: 'action', wireKey: 'at', optional: false, codec: numberCodec },\n { name: 'bytes', wireKey: 'bs', optional: true, codec: bytesCodec },\n { name: 'uint', wireKey: 'ui', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * State changes from application execution, including inner transactions and logs.\n */\nexport type BlockAppEvalDelta = {\n /** [gd] Global state delta for the application. */\n globalDelta?: Map<Uint8Array, BlockEvalDelta>\n /** [ld] Local state deltas keyed by address index. */\n localDeltas?: Map<number, Map<Uint8Array, BlockEvalDelta>>\n /** [itx] Inner transactions produced by this application execution. */\n innerTxns?: SignedTxnWithAD[]\n /** [sa] Shared accounts referenced by local deltas. */\n sharedAccounts?: Address[]\n /** [lg] Application log outputs. */\n logs?: Uint8Array[]\n}\n\nexport const BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta> = {\n name: 'BlockAppEvalDelta',\n kind: 'object',\n fields: [\n {\n name: 'globalDelta',\n wireKey: 'gd',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta)),\n },\n {\n name: 'localDeltas',\n wireKey: 'ld',\n optional: true,\n codec: new MapCodec(numberCodec, new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta))),\n },\n {\n name: 'innerTxns',\n wireKey: 'itx',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(() => SignedTxnWithADMeta)),\n },\n {\n name: 'sharedAccounts',\n wireKey: 'sa',\n optional: true,\n codec: addressArrayCodec,\n },\n { name: 'logs', wireKey: 'lg', optional: true, codec: bytesArrayCodec },\n ],\n}\n\n/** Tracking metadata for a specific StateProofType. */\nexport type BlockStateProofTrackingData = {\n /** [v] Vector commitment root of state proof voters. */\n stateProofVotersCommitment?: Uint8Array\n /** [t] Online total weight during state proof round. */\n stateProofOnlineTotalWeight?: bigint\n /** [n] Next round for which state proofs are accepted. */\n stateProofNextRound?: bigint\n}\n\nexport const BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData> = {\n name: 'BlockStateProofTrackingData',\n kind: 'object',\n fields: [\n { name: 'stateProofVotersCommitment', wireKey: 'v', optional: true, codec: bytesCodec },\n { name: 'stateProofOnlineTotalWeight', wireKey: 't', optional: true, codec: bigIntCodec },\n { name: 'stateProofNextRound', wireKey: 'n', optional: true, codec: bigIntCodec },\n ],\n}\n\nexport type ApplyData = {\n closingAmount?: bigint\n assetClosingAmount?: bigint\n senderRewards?: bigint\n receiverRewards?: bigint\n closeRewards?: bigint\n evalDelta?: BlockAppEvalDelta\n configAsset?: bigint\n applicationId?: bigint\n}\n\nexport const ApplyDataMeta: ObjectModelMetadata<ApplyData> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n { name: 'closingAmount', wireKey: 'ca', optional: true, codec: bigIntCodec },\n { name: 'assetClosingAmount', wireKey: 'aca', optional: true, codec: bigIntCodec },\n { name: 'senderRewards', wireKey: 'rs', optional: true, codec: bigIntCodec },\n { name: 'receiverRewards', wireKey: 'rr', optional: true, codec: bigIntCodec },\n { name: 'closeRewards', wireKey: 'rc', optional: true, codec: bigIntCodec },\n { name: 'evalDelta', wireKey: 'dt', optional: true, codec: new ObjectModelCodec(BlockAppEvalDeltaMeta) },\n { name: 'configAsset', wireKey: 'caid', optional: true, codec: bigIntCodec },\n { name: 'applicationId', wireKey: 'apid', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * SignedTxnWithAD is a SignedTransaction with additional ApplyData.\n */\nexport type SignedTxnWithAD = {\n /** The signed transaction. */\n signedTxn: SignedTransaction\n /** Apply data containing transaction execution information. */\n applyData?: ApplyData\n}\n\nexport const SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD> = {\n name: 'SignedTxnWithAD',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTransactionMeta),\n },\n {\n name: 'applyData',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ApplyDataMeta),\n },\n ],\n}\n\n/**\n * SignedTxnInBlock is a SignedTransaction with additional ApplyData and block-specific metadata.\n */\nexport type SignedTxnInBlock = {\n signedTxn: SignedTxnWithAD\n hasGenesisId?: boolean\n hasGenesisHash?: boolean\n}\n\nexport const SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTxnWithADMeta),\n },\n { name: 'hasGenesisId', wireKey: 'hgi', optional: true, codec: booleanCodec },\n { name: 'hasGenesisHash', wireKey: 'hgh', optional: true, codec: booleanCodec },\n ],\n}\n\nexport type ParticipationUpdates = {\n /** [partupdrmv] Expired participation accounts. */\n expiredParticipationAccounts?: string[]\n /** [partupdabs] Absent participation accounts. */\n absentParticipationAccounts?: string[]\n}\n\nexport const ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates> = {\n name: 'ParticipationUpdates',\n kind: 'object',\n fields: [\n {\n name: 'expiredParticipationAccounts',\n wireKey: 'partupdrmv',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'absentParticipationAccounts',\n wireKey: 'partupdabs',\n optional: true,\n codec: addressArrayCodec,\n },\n ],\n}\n\nexport type BlockHeader = {\n /** [rnd] Round number. */\n round?: bigint\n /** [prev] Previous block hash. */\n previousBlockHash?: Uint8Array\n /** [prev512] Previous block hash using SHA-512. */\n previousBlockHash512?: Uint8Array\n /** [seed] Sortition seed. */\n seed?: Uint8Array\n /** [txn] Root of transaction merkle tree using SHA512_256. */\n transactionsRoot?: Uint8Array\n /** [txn256] Root of transaction vector commitment using SHA256. */\n transactionsRootSha256?: Uint8Array\n /** [txn512] Root of transaction vector commitment using SHA512. */\n transactionsRootSha512?: Uint8Array\n /** [ts] Block timestamp in seconds since epoch. */\n timestamp?: bigint\n /** [gen] Genesis ID. */\n genesisId?: string\n /** [gh] Genesis hash. */\n genesisHash?: Uint8Array\n /** [prp] Proposer address. */\n proposer?: Address\n /** [fc] Fees collected in this block. */\n feesCollected?: bigint\n /** [bi] Bonus incentive for block proposal. */\n bonus?: bigint\n /** [pp] Proposer payout. */\n proposerPayout?: bigint\n /** [fees] FeeSink address. */\n feeSink?: Address\n /** [rwd] RewardsPool address. */\n rewardsPool?: Address\n /** [earn] Rewards level. */\n rewardsLevel?: bigint\n /** [rate] Rewards rate. */\n rewardsRate?: bigint\n /** [frac] Rewards residue. */\n rewardsResidue?: bigint\n /** [rwcalr] Rewards recalculation round. */\n rewardsRecalculationRound?: bigint\n /** [proto] Current consensus protocol. */\n currentProtocol?: string\n /** [nextproto] Next proposed protocol. */\n nextProtocol?: string\n /** [nextyes] Next protocol approvals. */\n nextProtocolApprovals?: bigint\n /** [nextbefore] Next protocol vote deadline. */\n nextProtocolVoteBefore?: bigint\n /** [nextswitch] Next protocol switch round. */\n nextProtocolSwitchOn?: bigint\n /** [upgradeprop] Upgrade proposal. */\n upgradePropose?: string\n /** [upgradedelay] Upgrade delay in rounds. */\n upgradeDelay?: bigint\n /** [upgradeyes] Upgrade approval flag. */\n upgradeApprove?: boolean\n /** [tc] Transaction counter. */\n txnCounter?: bigint\n /** [spt] State proof tracking data keyed by state proof type. */\n stateProofTracking?: Map<number, BlockStateProofTrackingData>\n /** Represents participation account data that needs to be checked/acted on by the network */\n participationUpdates?: ParticipationUpdates\n}\n\nexport const BlockHeaderMeta: ObjectModelMetadata<BlockHeader> = {\n name: 'BlockHeader',\n kind: 'object',\n fields: [\n { name: 'round', wireKey: 'rnd', optional: true, codec: bigIntCodec },\n { name: 'previousBlockHash', wireKey: 'prev', optional: true, codec: bytesCodec },\n { name: 'previousBlockHash512', wireKey: 'prev512', optional: true, codec: bytesCodec },\n { name: 'seed', wireKey: 'seed', optional: true, codec: bytesCodec },\n { name: 'transactionsRoot', wireKey: 'txn', optional: false, codec: bytesCodec },\n { name: 'transactionsRootSha256', wireKey: 'txn256', optional: true, codec: bytesCodec },\n { name: 'transactionsRootSha512', wireKey: 'txn512', optional: true, codec: bytesCodec },\n { name: 'timestamp', wireKey: 'ts', optional: true, codec: bigIntCodec },\n { name: 'genesisId', wireKey: 'gen', optional: true, codec: stringCodec },\n { name: 'genesisHash', wireKey: 'gh', optional: true, codec: bytesCodec },\n { name: 'proposer', wireKey: 'prp', optional: true, codec: addressCodec },\n { name: 'feesCollected', wireKey: 'fc', optional: true, codec: bigIntCodec },\n { name: 'bonus', wireKey: 'bi', optional: true, codec: bigIntCodec },\n { name: 'proposerPayout', wireKey: 'pp', optional: true, codec: bigIntCodec },\n { name: 'feeSink', wireKey: 'fees', optional: true, codec: addressCodec },\n { name: 'rewardsPool', wireKey: 'rwd', optional: true, codec: addressCodec },\n { name: 'rewardsLevel', wireKey: 'earn', optional: true, codec: bigIntCodec },\n { name: 'rewardsRate', wireKey: 'rate', optional: true, codec: bigIntCodec },\n { name: 'rewardsResidue', wireKey: 'frac', optional: true, codec: bigIntCodec },\n { name: 'rewardsRecalculationRound', wireKey: 'rwcalr', optional: true, codec: bigIntCodec },\n { name: 'currentProtocol', wireKey: 'proto', optional: true, codec: stringCodec },\n { name: 'nextProtocol', wireKey: 'nextproto', optional: true, codec: stringCodec },\n { name: 'nextProtocolApprovals', wireKey: 'nextyes', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolVoteBefore', wireKey: 'nextbefore', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolSwitchOn', wireKey: 'nextswitch', optional: true, codec: bigIntCodec },\n { name: 'upgradePropose', wireKey: 'upgradeprop', optional: true, codec: stringCodec },\n { name: 'upgradeDelay', wireKey: 'upgradedelay', optional: true, codec: bigIntCodec },\n { name: 'upgradeApprove', wireKey: 'upgradeyes', optional: true, codec: booleanCodec },\n { name: 'txnCounter', wireKey: 'tc', optional: true, codec: bigIntCodec },\n {\n name: 'stateProofTracking',\n wireKey: 'spt',\n optional: true,\n codec: new MapCodec(numberCodec, new ObjectModelCodec(BlockStateProofTrackingDataMeta)),\n },\n {\n name: 'participationUpdates',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ParticipationUpdatesMeta),\n },\n ],\n}\n\n/**\n * Block contains the BlockHeader and the list of transactions (Payset).\n */\nexport type Block = {\n /** The block information (Header) */\n header: BlockHeader\n\n /** [txns] Block transactions (Payset). */\n payset?: SignedTxnInBlock[]\n}\n\nexport const BlockMeta: ObjectModelMetadata<Block> = {\n name: 'Block',\n kind: 'object',\n fields: [\n { name: 'header', flattened: true, optional: false, codec: new ObjectModelCodec(BlockHeaderMeta) },\n {\n name: 'payset',\n wireKey: 'txns',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(SignedTxnInBlockMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,MAAaA,qBAA0D;CACrE,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAU,SAAS;GAAM,UAAU;GAAO,OAAOC;GAAa;EACtE;GAAE,MAAM;GAAS,SAAS;GAAM,UAAU;GAAM,OAAOC;GAAY;EACnE;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAOC;GAAa;EACpE;CACF;AAkBD,MAAaC,wBAAgE;CAC3E,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIC,qBAASH,0BAAY,IAAII,sCAAiB,mBAAmB,CAAC;GAC1E;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAID,qBAASJ,4BAAa,IAAII,qBAASH,0BAAY,IAAII,sCAAiB,mBAAmB,CAAC,CAAC;GACrG;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIC,yBAAW,IAAID,4CAAuB,oBAAoB,CAAC;GACvE;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOE;GACR;EACD;GAAE,M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CACN,MAAM;CACN,QAAQ,CACN;EAAE,MAAM;EAAU,WAAW;EAAM,UAAU;EAAO,OAAO,IAAId,sCAAiB,gBAAgB;EAAE,EAClG;EACE,MAAM;EACN,SAAS;EACT,UAAU;EACV,OAAO,IAAIC,yBAAW,IAAID,sCAAiB,qBAAqB,CAAC;EAClE,CACF;CACF"}
@@ -54,7 +54,7 @@ const BlockAppEvalDeltaMeta = {
54
54
  name: "innerTxns",
55
55
  wireKey: "itx",
56
56
  optional: true,
57
- codec: new ArrayCodec(new ObjectModelCodec(() => SignedTxnInBlockMeta))
57
+ codec: new ArrayCodec(new ObjectModelCodec(() => SignedTxnWithADMeta))
58
58
  },
59
59
  {
60
60
  name: "sharedAccounts",
@@ -1 +1 @@
1
- {"version":3,"file":"block.mjs","names":["BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta>","BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta>","BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData>","ApplyDataMeta: ObjectModelMetadata<ApplyData>","SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD>","SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock>","ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates>","BlockHeaderMeta: ObjectModelMetadata<BlockHeader>","BlockMeta: ObjectModelMetadata<Block>"],"sources":["../../../../../packages/algod_client/src/models/block.ts"],"sourcesContent":["import { type SignedTransaction, SignedTransactionMeta } from '@algorandfoundation/algokit-transact'\nimport {\n addressArrayCodec,\n addressCodec,\n Address,\n ArrayCodec,\n bigIntCodec,\n booleanCodec,\n bytesArrayCodec,\n bytesCodec,\n MapCodec,\n ObjectModelCodec,\n numberCodec,\n stringCodec,\n type ObjectModelMetadata,\n} from '@algorandfoundation/algokit-common'\n\n/** BlockEvalDelta represents a TEAL value delta (block/msgpack wire keys). */\nexport type BlockEvalDelta = {\n /** [at] delta action. */\n action: number\n /** [bs] bytes value. */\n bytes?: Uint8Array\n /** [ui] uint value. */\n uint?: bigint\n}\n\nexport const BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta> = {\n name: 'BlockEvalDelta',\n kind: 'object',\n fields: [\n { name: 'action', wireKey: 'at', optional: false, codec: numberCodec },\n { name: 'bytes', wireKey: 'bs', optional: true, codec: bytesCodec },\n { name: 'uint', wireKey: 'ui', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * State changes from application execution, including inner transactions and logs.\n */\nexport type BlockAppEvalDelta = {\n /** [gd] Global state delta for the application. */\n globalDelta?: Map<Uint8Array, BlockEvalDelta>\n /** [ld] Local state deltas keyed by address index. */\n localDeltas?: Map<number, Map<Uint8Array, BlockEvalDelta>>\n /** [itx] Inner transactions produced by this application execution. */\n innerTxns?: SignedTxnInBlock[]\n /** [sa] Shared accounts referenced by local deltas. */\n sharedAccounts?: string[]\n /** [lg] Application log outputs. */\n logs?: Uint8Array[]\n}\n\nexport const BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta> = {\n name: 'BlockAppEvalDelta',\n kind: 'object',\n fields: [\n {\n name: 'globalDelta',\n wireKey: 'gd',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta)),\n },\n {\n name: 'localDeltas',\n wireKey: 'ld',\n optional: true,\n codec: new MapCodec(numberCodec, new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta))),\n },\n {\n name: 'innerTxns',\n wireKey: 'itx',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(() => SignedTxnInBlockMeta)),\n },\n {\n name: 'sharedAccounts',\n wireKey: 'sa',\n optional: true,\n codec: addressArrayCodec,\n },\n { name: 'logs', wireKey: 'lg', optional: true, codec: bytesArrayCodec },\n ],\n}\n\n/** Tracking metadata for a specific StateProofType. */\nexport type BlockStateProofTrackingData = {\n /** [v] Vector commitment root of state proof voters. */\n stateProofVotersCommitment?: Uint8Array\n /** [t] Online total weight during state proof round. */\n stateProofOnlineTotalWeight?: bigint\n /** [n] Next round for which state proofs are accepted. */\n stateProofNextRound?: bigint\n}\n\nexport const BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData> = {\n name: 'BlockStateProofTrackingData',\n kind: 'object',\n fields: [\n { name: 'stateProofVotersCommitment', wireKey: 'v', optional: true, codec: bytesCodec },\n { name: 'stateProofOnlineTotalWeight', wireKey: 't', optional: true, codec: bigIntCodec },\n { name: 'stateProofNextRound', wireKey: 'n', optional: true, codec: bigIntCodec },\n ],\n}\n\nexport type ApplyData = {\n closingAmount?: bigint\n assetClosingAmount?: bigint\n senderRewards?: bigint\n receiverRewards?: bigint\n closeRewards?: bigint\n evalDelta?: BlockAppEvalDelta\n configAsset?: bigint\n applicationId?: bigint\n}\n\nexport const ApplyDataMeta: ObjectModelMetadata<ApplyData> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n { name: 'closingAmount', wireKey: 'ca', optional: true, codec: bigIntCodec },\n { name: 'assetClosingAmount', wireKey: 'aca', optional: true, codec: bigIntCodec },\n { name: 'senderRewards', wireKey: 'rs', optional: true, codec: bigIntCodec },\n { name: 'receiverRewards', wireKey: 'rr', optional: true, codec: bigIntCodec },\n { name: 'closeRewards', wireKey: 'rc', optional: true, codec: bigIntCodec },\n { name: 'evalDelta', wireKey: 'dt', optional: true, codec: new ObjectModelCodec(BlockAppEvalDeltaMeta) },\n { name: 'configAsset', wireKey: 'caid', optional: true, codec: bigIntCodec },\n { name: 'applicationId', wireKey: 'apid', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * SignedTxnWithAD is a SignedTransaction with additional ApplyData.\n */\nexport type SignedTxnWithAD = {\n /** The signed transaction. */\n signedTxn: SignedTransaction\n /** Apply data containing transaction execution information. */\n applyData?: ApplyData\n}\n\nexport const SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD> = {\n name: 'SignedTxnWithAD',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTransactionMeta),\n },\n {\n name: 'applyData',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ApplyDataMeta),\n },\n ],\n}\n\n/**\n * SignedTxnInBlock is a SignedTransaction with additional ApplyData and block-specific metadata.\n */\nexport type SignedTxnInBlock = {\n signedTxn: SignedTxnWithAD\n hasGenesisId?: boolean\n hasGenesisHash?: boolean\n}\n\nexport const SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTxnWithADMeta),\n },\n { name: 'hasGenesisId', wireKey: 'hgi', optional: true, codec: booleanCodec },\n { name: 'hasGenesisHash', wireKey: 'hgh', optional: true, codec: booleanCodec },\n ],\n}\n\nexport type ParticipationUpdates = {\n /** [partupdrmv] Expired participation accounts. */\n expiredParticipationAccounts?: string[]\n /** [partupdabs] Absent participation accounts. */\n absentParticipationAccounts?: string[]\n}\n\nexport const ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates> = {\n name: 'ParticipationUpdates',\n kind: 'object',\n fields: [\n {\n name: 'expiredParticipationAccounts',\n wireKey: 'partupdrmv',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'absentParticipationAccounts',\n wireKey: 'partupdabs',\n optional: true,\n codec: addressArrayCodec,\n },\n ],\n}\n\nexport type BlockHeader = {\n /** [rnd] Round number. */\n round?: bigint\n /** [prev] Previous block hash. */\n previousBlockHash?: Uint8Array\n /** [prev512] Previous block hash using SHA-512. */\n previousBlockHash512?: Uint8Array\n /** [seed] Sortition seed. */\n seed?: Uint8Array\n /** [txn] Root of transaction merkle tree using SHA512_256. */\n transactionsRoot?: Uint8Array\n /** [txn256] Root of transaction vector commitment using SHA256. */\n transactionsRootSha256?: Uint8Array\n /** [txn512] Root of transaction vector commitment using SHA512. */\n transactionsRootSha512?: Uint8Array\n /** [ts] Block timestamp in seconds since epoch. */\n timestamp?: bigint\n /** [gen] Genesis ID. */\n genesisId?: string\n /** [gh] Genesis hash. */\n genesisHash?: Uint8Array\n /** [prp] Proposer address. */\n proposer?: Address\n /** [fc] Fees collected in this block. */\n feesCollected?: bigint\n /** [bi] Bonus incentive for block proposal. */\n bonus?: bigint\n /** [pp] Proposer payout. */\n proposerPayout?: bigint\n /** [fees] FeeSink address. */\n feeSink?: Address\n /** [rwd] RewardsPool address. */\n rewardsPool?: Address\n /** [earn] Rewards level. */\n rewardsLevel?: bigint\n /** [rate] Rewards rate. */\n rewardsRate?: bigint\n /** [frac] Rewards residue. */\n rewardsResidue?: bigint\n /** [rwcalr] Rewards recalculation round. */\n rewardsRecalculationRound?: bigint\n /** [proto] Current consensus protocol. */\n currentProtocol?: string\n /** [nextproto] Next proposed protocol. */\n nextProtocol?: string\n /** [nextyes] Next protocol approvals. */\n nextProtocolApprovals?: bigint\n /** [nextbefore] Next protocol vote deadline. */\n nextProtocolVoteBefore?: bigint\n /** [nextswitch] Next protocol switch round. */\n nextProtocolSwitchOn?: bigint\n /** [upgradeprop] Upgrade proposal. */\n upgradePropose?: string\n /** [upgradedelay] Upgrade delay in rounds. */\n upgradeDelay?: bigint\n /** [upgradeyes] Upgrade approval flag. */\n upgradeApprove?: boolean\n /** [tc] Transaction counter. */\n txnCounter?: bigint\n /** [spt] State proof tracking data keyed by state proof type. */\n stateProofTracking?: Map<number, BlockStateProofTrackingData>\n /** Represents participation account data that needs to be checked/acted on by the network */\n participationUpdates?: ParticipationUpdates\n}\n\nexport const BlockHeaderMeta: ObjectModelMetadata<BlockHeader> = {\n name: 'BlockHeader',\n kind: 'object',\n fields: [\n { name: 'round', wireKey: 'rnd', optional: true, codec: bigIntCodec },\n { name: 'previousBlockHash', wireKey: 'prev', optional: true, codec: bytesCodec },\n { name: 'previousBlockHash512', wireKey: 'prev512', optional: true, codec: bytesCodec },\n { name: 'seed', wireKey: 'seed', optional: true, codec: bytesCodec },\n { name: 'transactionsRoot', wireKey: 'txn', optional: false, codec: bytesCodec },\n { name: 'transactionsRootSha256', wireKey: 'txn256', optional: true, codec: bytesCodec },\n { name: 'transactionsRootSha512', wireKey: 'txn512', optional: true, codec: bytesCodec },\n { name: 'timestamp', wireKey: 'ts', optional: true, codec: bigIntCodec },\n { name: 'genesisId', wireKey: 'gen', optional: true, codec: stringCodec },\n { name: 'genesisHash', wireKey: 'gh', optional: true, codec: bytesCodec },\n { name: 'proposer', wireKey: 'prp', optional: true, codec: addressCodec },\n { name: 'feesCollected', wireKey: 'fc', optional: true, codec: bigIntCodec },\n { name: 'bonus', wireKey: 'bi', optional: true, codec: bigIntCodec },\n { name: 'proposerPayout', wireKey: 'pp', optional: true, codec: bigIntCodec },\n { name: 'feeSink', wireKey: 'fees', optional: true, codec: addressCodec },\n { name: 'rewardsPool', wireKey: 'rwd', optional: true, codec: addressCodec },\n { name: 'rewardsLevel', wireKey: 'earn', optional: true, codec: bigIntCodec },\n { name: 'rewardsRate', wireKey: 'rate', optional: true, codec: bigIntCodec },\n { name: 'rewardsResidue', wireKey: 'frac', optional: true, codec: bigIntCodec },\n { name: 'rewardsRecalculationRound', wireKey: 'rwcalr', optional: true, codec: bigIntCodec },\n { name: 'currentProtocol', wireKey: 'proto', optional: true, codec: stringCodec },\n { name: 'nextProtocol', wireKey: 'nextproto', optional: true, codec: stringCodec },\n { name: 'nextProtocolApprovals', wireKey: 'nextyes', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolVoteBefore', wireKey: 'nextbefore', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolSwitchOn', wireKey: 'nextswitch', optional: true, codec: bigIntCodec },\n { name: 'upgradePropose', wireKey: 'upgradeprop', optional: true, codec: stringCodec },\n { name: 'upgradeDelay', wireKey: 'upgradedelay', optional: true, codec: bigIntCodec },\n { name: 'upgradeApprove', wireKey: 'upgradeyes', optional: true, codec: booleanCodec },\n { name: 'txnCounter', wireKey: 'tc', optional: true, codec: bigIntCodec },\n {\n name: 'stateProofTracking',\n wireKey: 'spt',\n optional: true,\n codec: new MapCodec(numberCodec, new ObjectModelCodec(BlockStateProofTrackingDataMeta)),\n },\n {\n name: 'participationUpdates',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ParticipationUpdatesMeta),\n },\n ],\n}\n\n/**\n * Block contains the BlockHeader and the list of transactions (Payset).\n */\nexport type Block = {\n /** The block information (Header) */\n header: BlockHeader\n\n /** [txns] Block transactions (Payset). */\n payset?: SignedTxnInBlock[]\n}\n\nexport const BlockMeta: ObjectModelMetadata<Block> = {\n name: 'Block',\n kind: 'object',\n fields: [\n { name: 'header', flattened: true, optional: false, codec: new ObjectModelCodec(BlockHeaderMeta) },\n {\n name: 'payset',\n wireKey: 'txns',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(SignedTxnInBlockMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,MAAaA,qBAA0D;CACrE,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAU,SAAS;GAAM,UAAU;GAAO,OAAO;GAAa;EACtE;GAAE,MAAM;GAAS,SAAS;GAAM,UAAU;GAAM,OAAO;GAAY;EACnE;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAO;GAAa;EACpE;CACF;AAkBD,MAAaC,wBAAgE;CAC3E,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,YAAY,IAAI,iBAAiB,mBAAmB,CAAC;GAC1E;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,aAAa,IAAI,SAAS,YAAY,IAAI,iBAAiB,mBAAmB,CAAC,CAAC;GACrG;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,WAAW,IAAI,uBAAuB,qBAAqB,CAAC;GACxE;EACD;GACE,MAAM;GACN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AAE,MAAM;EAAU,WAAW;EAAM,UAAU;EAAO,OAAO,IAAI,iBAAiB,gBAAgB;EAAE,EAClG;EACE,MAAM;EACN,SAAS;EACT,UAAU;EACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,qBAAqB,CAAC;EAClE,CACF;CACF"}
1
+ {"version":3,"file":"block.mjs","names":["BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta>","BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta>","BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData>","ApplyDataMeta: ObjectModelMetadata<ApplyData>","SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD>","SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock>","ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates>","BlockHeaderMeta: ObjectModelMetadata<BlockHeader>","BlockMeta: ObjectModelMetadata<Block>"],"sources":["../../../../../packages/algod_client/src/models/block.ts"],"sourcesContent":["import {\n Address,\n ArrayCodec,\n MapCodec,\n ObjectModelCodec,\n addressArrayCodec,\n addressCodec,\n bigIntCodec,\n booleanCodec,\n bytesArrayCodec,\n bytesCodec,\n numberCodec,\n stringCodec,\n type ObjectModelMetadata,\n} from '@algorandfoundation/algokit-common'\nimport { SignedTransactionMeta, type SignedTransaction } from '@algorandfoundation/algokit-transact'\n\n/** BlockEvalDelta represents a TEAL value delta (block/msgpack wire keys). */\nexport type BlockEvalDelta = {\n /** [at] delta action. */\n action: number\n /** [bs] bytes value. */\n bytes?: Uint8Array\n /** [ui] uint value. */\n uint?: bigint\n}\n\nexport const BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta> = {\n name: 'BlockEvalDelta',\n kind: 'object',\n fields: [\n { name: 'action', wireKey: 'at', optional: false, codec: numberCodec },\n { name: 'bytes', wireKey: 'bs', optional: true, codec: bytesCodec },\n { name: 'uint', wireKey: 'ui', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * State changes from application execution, including inner transactions and logs.\n */\nexport type BlockAppEvalDelta = {\n /** [gd] Global state delta for the application. */\n globalDelta?: Map<Uint8Array, BlockEvalDelta>\n /** [ld] Local state deltas keyed by address index. */\n localDeltas?: Map<number, Map<Uint8Array, BlockEvalDelta>>\n /** [itx] Inner transactions produced by this application execution. */\n innerTxns?: SignedTxnWithAD[]\n /** [sa] Shared accounts referenced by local deltas. */\n sharedAccounts?: Address[]\n /** [lg] Application log outputs. */\n logs?: Uint8Array[]\n}\n\nexport const BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta> = {\n name: 'BlockAppEvalDelta',\n kind: 'object',\n fields: [\n {\n name: 'globalDelta',\n wireKey: 'gd',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta)),\n },\n {\n name: 'localDeltas',\n wireKey: 'ld',\n optional: true,\n codec: new MapCodec(numberCodec, new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta))),\n },\n {\n name: 'innerTxns',\n wireKey: 'itx',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(() => SignedTxnWithADMeta)),\n },\n {\n name: 'sharedAccounts',\n wireKey: 'sa',\n optional: true,\n codec: addressArrayCodec,\n },\n { name: 'logs', wireKey: 'lg', optional: true, codec: bytesArrayCodec },\n ],\n}\n\n/** Tracking metadata for a specific StateProofType. */\nexport type BlockStateProofTrackingData = {\n /** [v] Vector commitment root of state proof voters. */\n stateProofVotersCommitment?: Uint8Array\n /** [t] Online total weight during state proof round. */\n stateProofOnlineTotalWeight?: bigint\n /** [n] Next round for which state proofs are accepted. */\n stateProofNextRound?: bigint\n}\n\nexport const BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData> = {\n name: 'BlockStateProofTrackingData',\n kind: 'object',\n fields: [\n { name: 'stateProofVotersCommitment', wireKey: 'v', optional: true, codec: bytesCodec },\n { name: 'stateProofOnlineTotalWeight', wireKey: 't', optional: true, codec: bigIntCodec },\n { name: 'stateProofNextRound', wireKey: 'n', optional: true, codec: bigIntCodec },\n ],\n}\n\nexport type ApplyData = {\n closingAmount?: bigint\n assetClosingAmount?: bigint\n senderRewards?: bigint\n receiverRewards?: bigint\n closeRewards?: bigint\n evalDelta?: BlockAppEvalDelta\n configAsset?: bigint\n applicationId?: bigint\n}\n\nexport const ApplyDataMeta: ObjectModelMetadata<ApplyData> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n { name: 'closingAmount', wireKey: 'ca', optional: true, codec: bigIntCodec },\n { name: 'assetClosingAmount', wireKey: 'aca', optional: true, codec: bigIntCodec },\n { name: 'senderRewards', wireKey: 'rs', optional: true, codec: bigIntCodec },\n { name: 'receiverRewards', wireKey: 'rr', optional: true, codec: bigIntCodec },\n { name: 'closeRewards', wireKey: 'rc', optional: true, codec: bigIntCodec },\n { name: 'evalDelta', wireKey: 'dt', optional: true, codec: new ObjectModelCodec(BlockAppEvalDeltaMeta) },\n { name: 'configAsset', wireKey: 'caid', optional: true, codec: bigIntCodec },\n { name: 'applicationId', wireKey: 'apid', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * SignedTxnWithAD is a SignedTransaction with additional ApplyData.\n */\nexport type SignedTxnWithAD = {\n /** The signed transaction. */\n signedTxn: SignedTransaction\n /** Apply data containing transaction execution information. */\n applyData?: ApplyData\n}\n\nexport const SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD> = {\n name: 'SignedTxnWithAD',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTransactionMeta),\n },\n {\n name: 'applyData',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ApplyDataMeta),\n },\n ],\n}\n\n/**\n * SignedTxnInBlock is a SignedTransaction with additional ApplyData and block-specific metadata.\n */\nexport type SignedTxnInBlock = {\n signedTxn: SignedTxnWithAD\n hasGenesisId?: boolean\n hasGenesisHash?: boolean\n}\n\nexport const SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTxnWithADMeta),\n },\n { name: 'hasGenesisId', wireKey: 'hgi', optional: true, codec: booleanCodec },\n { name: 'hasGenesisHash', wireKey: 'hgh', optional: true, codec: booleanCodec },\n ],\n}\n\nexport type ParticipationUpdates = {\n /** [partupdrmv] Expired participation accounts. */\n expiredParticipationAccounts?: string[]\n /** [partupdabs] Absent participation accounts. */\n absentParticipationAccounts?: string[]\n}\n\nexport const ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates> = {\n name: 'ParticipationUpdates',\n kind: 'object',\n fields: [\n {\n name: 'expiredParticipationAccounts',\n wireKey: 'partupdrmv',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'absentParticipationAccounts',\n wireKey: 'partupdabs',\n optional: true,\n codec: addressArrayCodec,\n },\n ],\n}\n\nexport type BlockHeader = {\n /** [rnd] Round number. */\n round?: bigint\n /** [prev] Previous block hash. */\n previousBlockHash?: Uint8Array\n /** [prev512] Previous block hash using SHA-512. */\n previousBlockHash512?: Uint8Array\n /** [seed] Sortition seed. */\n seed?: Uint8Array\n /** [txn] Root of transaction merkle tree using SHA512_256. */\n transactionsRoot?: Uint8Array\n /** [txn256] Root of transaction vector commitment using SHA256. */\n transactionsRootSha256?: Uint8Array\n /** [txn512] Root of transaction vector commitment using SHA512. */\n transactionsRootSha512?: Uint8Array\n /** [ts] Block timestamp in seconds since epoch. */\n timestamp?: bigint\n /** [gen] Genesis ID. */\n genesisId?: string\n /** [gh] Genesis hash. */\n genesisHash?: Uint8Array\n /** [prp] Proposer address. */\n proposer?: Address\n /** [fc] Fees collected in this block. */\n feesCollected?: bigint\n /** [bi] Bonus incentive for block proposal. */\n bonus?: bigint\n /** [pp] Proposer payout. */\n proposerPayout?: bigint\n /** [fees] FeeSink address. */\n feeSink?: Address\n /** [rwd] RewardsPool address. */\n rewardsPool?: Address\n /** [earn] Rewards level. */\n rewardsLevel?: bigint\n /** [rate] Rewards rate. */\n rewardsRate?: bigint\n /** [frac] Rewards residue. */\n rewardsResidue?: bigint\n /** [rwcalr] Rewards recalculation round. */\n rewardsRecalculationRound?: bigint\n /** [proto] Current consensus protocol. */\n currentProtocol?: string\n /** [nextproto] Next proposed protocol. */\n nextProtocol?: string\n /** [nextyes] Next protocol approvals. */\n nextProtocolApprovals?: bigint\n /** [nextbefore] Next protocol vote deadline. */\n nextProtocolVoteBefore?: bigint\n /** [nextswitch] Next protocol switch round. */\n nextProtocolSwitchOn?: bigint\n /** [upgradeprop] Upgrade proposal. */\n upgradePropose?: string\n /** [upgradedelay] Upgrade delay in rounds. */\n upgradeDelay?: bigint\n /** [upgradeyes] Upgrade approval flag. */\n upgradeApprove?: boolean\n /** [tc] Transaction counter. */\n txnCounter?: bigint\n /** [spt] State proof tracking data keyed by state proof type. */\n stateProofTracking?: Map<number, BlockStateProofTrackingData>\n /** Represents participation account data that needs to be checked/acted on by the network */\n participationUpdates?: ParticipationUpdates\n}\n\nexport const BlockHeaderMeta: ObjectModelMetadata<BlockHeader> = {\n name: 'BlockHeader',\n kind: 'object',\n fields: [\n { name: 'round', wireKey: 'rnd', optional: true, codec: bigIntCodec },\n { name: 'previousBlockHash', wireKey: 'prev', optional: true, codec: bytesCodec },\n { name: 'previousBlockHash512', wireKey: 'prev512', optional: true, codec: bytesCodec },\n { name: 'seed', wireKey: 'seed', optional: true, codec: bytesCodec },\n { name: 'transactionsRoot', wireKey: 'txn', optional: false, codec: bytesCodec },\n { name: 'transactionsRootSha256', wireKey: 'txn256', optional: true, codec: bytesCodec },\n { name: 'transactionsRootSha512', wireKey: 'txn512', optional: true, codec: bytesCodec },\n { name: 'timestamp', wireKey: 'ts', optional: true, codec: bigIntCodec },\n { name: 'genesisId', wireKey: 'gen', optional: true, codec: stringCodec },\n { name: 'genesisHash', wireKey: 'gh', optional: true, codec: bytesCodec },\n { name: 'proposer', wireKey: 'prp', optional: true, codec: addressCodec },\n { name: 'feesCollected', wireKey: 'fc', optional: true, codec: bigIntCodec },\n { name: 'bonus', wireKey: 'bi', optional: true, codec: bigIntCodec },\n { name: 'proposerPayout', wireKey: 'pp', optional: true, codec: bigIntCodec },\n { name: 'feeSink', wireKey: 'fees', optional: true, codec: addressCodec },\n { name: 'rewardsPool', wireKey: 'rwd', optional: true, codec: addressCodec },\n { name: 'rewardsLevel', wireKey: 'earn', optional: true, codec: bigIntCodec },\n { name: 'rewardsRate', wireKey: 'rate', optional: true, codec: bigIntCodec },\n { name: 'rewardsResidue', wireKey: 'frac', optional: true, codec: bigIntCodec },\n { name: 'rewardsRecalculationRound', wireKey: 'rwcalr', optional: true, codec: bigIntCodec },\n { name: 'currentProtocol', wireKey: 'proto', optional: true, codec: stringCodec },\n { name: 'nextProtocol', wireKey: 'nextproto', optional: true, codec: stringCodec },\n { name: 'nextProtocolApprovals', wireKey: 'nextyes', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolVoteBefore', wireKey: 'nextbefore', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolSwitchOn', wireKey: 'nextswitch', optional: true, codec: bigIntCodec },\n { name: 'upgradePropose', wireKey: 'upgradeprop', optional: true, codec: stringCodec },\n { name: 'upgradeDelay', wireKey: 'upgradedelay', optional: true, codec: bigIntCodec },\n { name: 'upgradeApprove', wireKey: 'upgradeyes', optional: true, codec: booleanCodec },\n { name: 'txnCounter', wireKey: 'tc', optional: true, codec: bigIntCodec },\n {\n name: 'stateProofTracking',\n wireKey: 'spt',\n optional: true,\n codec: new MapCodec(numberCodec, new ObjectModelCodec(BlockStateProofTrackingDataMeta)),\n },\n {\n name: 'participationUpdates',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ParticipationUpdatesMeta),\n },\n ],\n}\n\n/**\n * Block contains the BlockHeader and the list of transactions (Payset).\n */\nexport type Block = {\n /** The block information (Header) */\n header: BlockHeader\n\n /** [txns] Block transactions (Payset). */\n payset?: SignedTxnInBlock[]\n}\n\nexport const BlockMeta: ObjectModelMetadata<Block> = {\n name: 'Block',\n kind: 'object',\n fields: [\n { name: 'header', flattened: true, optional: false, codec: new ObjectModelCodec(BlockHeaderMeta) },\n {\n name: 'payset',\n wireKey: 'txns',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(SignedTxnInBlockMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,MAAaA,qBAA0D;CACrE,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAU,SAAS;GAAM,UAAU;GAAO,OAAO;GAAa;EACtE;GAAE,MAAM;GAAS,SAAS;GAAM,UAAU;GAAM,OAAO;GAAY;EACnE;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAO;GAAa;EACpE;CACF;AAkBD,MAAaC,wBAAgE;CAC3E,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,YAAY,IAAI,iBAAiB,mBAAmB,CAAC;GAC1E;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,aAAa,IAAI,SAAS,YAAY,IAAI,iBAAiB,mBAAmB,CAAC,CAAC;GACrG;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,WAAW,IAAI,uBAAuB,oBAAoB,CAAC;GACvE;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAO;GAAiB;EACxE;CACF;AAYD,MAAaC,kCAAoF;CAC/F,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAA8B,SAAS;GAAK,UAAU;GAAM,OAAO;GAAY;EACvF;GAAE,MAAM;GAA+B,SAAS;GAAK,UAAU;GAAM,OAA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AAU;GAAM,OAAO;GAAa;EAC5E;GAAE,MAAM;GAAkB,SAAS;GAAQ,UAAU;GAAM,OAAO;GAAa;EAC/E;GAAE,MAAM;GAA6B,SAAS;GAAU,UAAU;GAAM,OAAO;GAAa;EAC5F;GAAE,MAAM;GAAmB,SAAS;GAAS,UAAU;GAAM,OAAO;GAAa;EACjF;GAAE,MAAM;GAAgB,SAAS;GAAa,UAAU;GAAM,OAAO;GAAa;EAClF;GAAE,MAAM;GAAyB,SAAS;GAAW,UAAU;GAAM,OAAO;GAAa;EACzF;GAAE,MAAM;GAA0B,SAAS;GAAc,UAAU;GAAM,OAAO;GAAa;EAC7F;GAAE,MAAM;GAAwB,SAAS;GAAc,UAAU;GAAM,OAAO;GAAa;EAC3F;GAAE,MAAM;GAAkB,SAAS;GAAe,UAAU;GAAM,OAAO;GAAa;EACtF;GAAE,MAAM;GAAgB,SAAS;GAAgB,UAAU;GAAM,OAAO;GAAa;EACrF;GAAE,MAAM;GAAkB,SAAS;GAAc,UAAU;GAAM,OAAO;GAAc;EACtF;GAAE,MAAM;GAAc,SAAS;GAAM,UAAU;GAAM,OAAO;GAAa;EACzE;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,aAAa,IAAI,iBAAiB,gCAAgC,CAAC;GACxF;EACD;GACE,MAAM;GACN,WAAW;GACX,UAAU;GACV,OAAO,IAAI,iBAAiB,yBAAyB;GACtD;EACF;CACF;AAaD,MAAaC,YAAwC;CACnD,MAAM;CACN,MAAM;CACN,QAAQ,CACN;EAAE,MAAM;EAAU,WAAW;EAAM,UAAU;EAAO,OAAO,IAAI,iBAAiB,gBAAgB;EAAE,EAClG;EACE,MAAM;EACN,SAAS;EACT,UAAU;EACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,qBAAqB,CAAC;EAClE,CACF;CACF"}
@@ -1,7 +1,5 @@
1
1
  import { Address } from "../../../common/src/address.js";
2
- import { AssetHoldingReference } from "./asset-holding-reference.js";
3
- import { ApplicationLocalReference } from "./application-local-reference.js";
4
- import { BoxReference } from "./box-reference.js";
2
+ import { BoxReference, HoldingReference, LocalsReference } from "../../../transact/src/transactions/app-call.js";
5
3
 
6
4
  //#region packages/algod_client/src/models/simulate-unnamed-resources-accessed.d.ts
7
5
 
@@ -32,11 +30,11 @@ type SimulateUnnamedResourcesAccessed = {
32
30
  /**
33
31
  * The unnamed asset holdings that were referenced. The order of this array is arbitrary.
34
32
  */
35
- assetHoldings?: AssetHoldingReference[];
33
+ assetHoldings?: HoldingReference[];
36
34
  /**
37
35
  * The unnamed application local states that were referenced. The order of this array is arbitrary.
38
36
  */
39
- appLocals?: ApplicationLocalReference[];
37
+ appLocals?: LocalsReference[];
40
38
  };
41
39
  //#endregion
42
40
  export { SimulateUnnamedResourcesAccessed };
@@ -1,9 +1,7 @@
1
1
  const require_number = require('../../../common/src/codecs/primitives/number.js');
2
2
  const require_array = require('../../../common/src/codecs/composite/array.js');
3
3
  const require_object_model = require('../../../common/src/codecs/models/object-model.js');
4
- const require_asset_holding_reference = require('./asset-holding-reference.js');
5
- const require_application_local_reference = require('./application-local-reference.js');
6
- const require_box_reference = require('./box-reference.js');
4
+ const require_reference_types_meta = require('../../../transact/src/transactions/reference-types-meta.js');
7
5
 
8
6
  //#region packages/algod_client/src/models/simulate-unnamed-resources-accessed.ts
9
7
  const SimulateUnnamedResourcesAccessedMeta = {
@@ -32,7 +30,7 @@ const SimulateUnnamedResourcesAccessedMeta = {
32
30
  name: "boxes",
33
31
  wireKey: "boxes",
34
32
  optional: true,
35
- codec: new require_array.ArrayCodec(new require_object_model.ObjectModelCodec(require_box_reference.BoxReferenceMeta))
33
+ codec: new require_array.ArrayCodec(new require_object_model.ObjectModelCodec(require_reference_types_meta.BoxReferenceMeta))
36
34
  },
37
35
  {
38
36
  name: "extraBoxRefs",
@@ -44,13 +42,13 @@ const SimulateUnnamedResourcesAccessedMeta = {
44
42
  name: "assetHoldings",
45
43
  wireKey: "asset-holdings",
46
44
  optional: true,
47
- codec: new require_array.ArrayCodec(new require_object_model.ObjectModelCodec(require_asset_holding_reference.AssetHoldingReferenceMeta))
45
+ codec: new require_array.ArrayCodec(new require_object_model.ObjectModelCodec(require_reference_types_meta.HoldingReferenceMeta))
48
46
  },
49
47
  {
50
48
  name: "appLocals",
51
49
  wireKey: "app-locals",
52
50
  optional: true,
53
- codec: new require_array.ArrayCodec(new require_object_model.ObjectModelCodec(require_application_local_reference.ApplicationLocalReferenceMeta))
51
+ codec: new require_array.ArrayCodec(new require_object_model.ObjectModelCodec(require_reference_types_meta.LocalsReferenceMeta))
54
52
  }
55
53
  ]
56
54
  };
@@ -1 +1 @@
1
- {"version":3,"file":"simulate-unnamed-resources-accessed.js","names":["SimulateUnnamedResourcesAccessedMeta: ObjectModelMetadata<SimulateUnnamedResourcesAccessed>","addressArrayCodec","bigIntArrayCodec","ArrayCodec","ObjectModelCodec","BoxReferenceMeta","numberCodec","AssetHoldingReferenceMeta","ApplicationLocalReferenceMeta"],"sources":["../../../../../packages/algod_client/src/models/simulate-unnamed-resources-accessed.ts"],"sourcesContent":["import type { Address, ObjectModelMetadata } from '@algorandfoundation/algokit-common'\nimport { numberCodec, ArrayCodec, bigIntArrayCodec, addressArrayCodec, ObjectModelCodec } from '@algorandfoundation/algokit-common'\nimport type { ApplicationLocalReference } from './application-local-reference'\nimport { ApplicationLocalReferenceMeta } from './application-local-reference'\nimport type { AssetHoldingReference } from './asset-holding-reference'\nimport { AssetHoldingReferenceMeta } from './asset-holding-reference'\nimport type { BoxReference } from './box-reference'\nimport { BoxReferenceMeta } from './box-reference'\n\n/**\n * These are resources that were accessed by this group that would normally have caused failure, but were allowed in simulation. Depending on where this object is in the response, the unnamed resources it contains may or may not qualify for group resource sharing. If this is a field in SimulateTransactionGroupResult, the resources do qualify, but if this is a field in SimulateTransactionResult, they do not qualify. In order to make this group valid for actual submission, resources that qualify for group sharing can be made available by any transaction of the group; otherwise, resources must be placed in the same transaction which accessed them.\n */\nexport type SimulateUnnamedResourcesAccessed = {\n /**\n * The unnamed accounts that were referenced. The order of this array is arbitrary.\n */\n accounts?: Address[]\n\n /**\n * The unnamed assets that were referenced. The order of this array is arbitrary.\n */\n assets?: bigint[]\n\n /**\n * The unnamed applications that were referenced. The order of this array is arbitrary.\n */\n apps?: bigint[]\n\n /**\n * The unnamed boxes that were referenced. The order of this array is arbitrary.\n */\n boxes?: BoxReference[]\n\n /**\n * The number of extra box references used to increase the IO budget. This is in addition to the references defined in the input transaction group and any referenced to unnamed boxes.\n */\n extraBoxRefs?: number\n\n /**\n * The unnamed asset holdings that were referenced. The order of this array is arbitrary.\n */\n assetHoldings?: AssetHoldingReference[]\n\n /**\n * The unnamed application local states that were referenced. The order of this array is arbitrary.\n */\n appLocals?: ApplicationLocalReference[]\n}\n\nexport const SimulateUnnamedResourcesAccessedMeta: ObjectModelMetadata<SimulateUnnamedResourcesAccessed> = {\n name: 'SimulateUnnamedResourcesAccessed',\n kind: 'object',\n fields: [\n {\n name: 'accounts',\n wireKey: 'accounts',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'assets',\n wireKey: 'assets',\n optional: true,\n codec: bigIntArrayCodec,\n },\n {\n name: 'apps',\n wireKey: 'apps',\n optional: true,\n codec: bigIntArrayCodec,\n },\n {\n name: 'boxes',\n wireKey: 'boxes',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(BoxReferenceMeta)),\n },\n {\n name: 'extraBoxRefs',\n wireKey: 'extra-box-refs',\n optional: true,\n codec: numberCodec,\n },\n {\n name: 'assetHoldings',\n wireKey: 'asset-holdings',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(AssetHoldingReferenceMeta)),\n },\n {\n name: 'appLocals',\n wireKey: 'app-locals',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(ApplicationLocalReferenceMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;;;AAiDA,MAAaA,uCAA8F;CACzG,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOA;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIC,yBAAW,IAAIC,sCAAiBC,uCAAiB,CAAC;GAC9D;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIH,yBAAW,IAAIC,sCAAiBG,0DAA0B,CAAC;GACvE;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIJ,yBAAW,IAAIC,sCAAiBI,kEAA8B,CAAC;GAC3E;EACF;CACF"}
1
+ {"version":3,"file":"simulate-unnamed-resources-accessed.js","names":["SimulateUnnamedResourcesAccessedMeta: ObjectModelMetadata<SimulateUnnamedResourcesAccessed>","addressArrayCodec","bigIntArrayCodec","ArrayCodec","ObjectModelCodec","BoxReferenceMeta","numberCodec","HoldingReferenceMeta","LocalsReferenceMeta"],"sources":["../../../../../packages/algod_client/src/models/simulate-unnamed-resources-accessed.ts"],"sourcesContent":["import type { Address, ObjectModelMetadata } from '@algorandfoundation/algokit-common'\nimport { numberCodec, ArrayCodec, bigIntArrayCodec, addressArrayCodec, ObjectModelCodec } from '@algorandfoundation/algokit-common'\nimport type { BoxReference, HoldingReference, LocalsReference } from '@algorandfoundation/algokit-transact'\nimport { BoxReferenceMeta, HoldingReferenceMeta, LocalsReferenceMeta } from '@algorandfoundation/algokit-transact'\n\n/**\n * These are resources that were accessed by this group that would normally have caused failure, but were allowed in simulation. Depending on where this object is in the response, the unnamed resources it contains may or may not qualify for group resource sharing. If this is a field in SimulateTransactionGroupResult, the resources do qualify, but if this is a field in SimulateTransactionResult, they do not qualify. In order to make this group valid for actual submission, resources that qualify for group sharing can be made available by any transaction of the group; otherwise, resources must be placed in the same transaction which accessed them.\n */\nexport type SimulateUnnamedResourcesAccessed = {\n /**\n * The unnamed accounts that were referenced. The order of this array is arbitrary.\n */\n accounts?: Address[]\n\n /**\n * The unnamed assets that were referenced. The order of this array is arbitrary.\n */\n assets?: bigint[]\n\n /**\n * The unnamed applications that were referenced. The order of this array is arbitrary.\n */\n apps?: bigint[]\n\n /**\n * The unnamed boxes that were referenced. The order of this array is arbitrary.\n */\n boxes?: BoxReference[]\n\n /**\n * The number of extra box references used to increase the IO budget. This is in addition to the references defined in the input transaction group and any referenced to unnamed boxes.\n */\n extraBoxRefs?: number\n\n /**\n * The unnamed asset holdings that were referenced. The order of this array is arbitrary.\n */\n assetHoldings?: HoldingReference[]\n\n /**\n * The unnamed application local states that were referenced. The order of this array is arbitrary.\n */\n appLocals?: LocalsReference[]\n}\n\nexport const SimulateUnnamedResourcesAccessedMeta: ObjectModelMetadata<SimulateUnnamedResourcesAccessed> = {\n name: 'SimulateUnnamedResourcesAccessed',\n kind: 'object',\n fields: [\n {\n name: 'accounts',\n wireKey: 'accounts',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'assets',\n wireKey: 'assets',\n optional: true,\n codec: bigIntArrayCodec,\n },\n {\n name: 'apps',\n wireKey: 'apps',\n optional: true,\n codec: bigIntArrayCodec,\n },\n {\n name: 'boxes',\n wireKey: 'boxes',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(BoxReferenceMeta)),\n },\n {\n name: 'extraBoxRefs',\n wireKey: 'extra-box-refs',\n optional: true,\n codec: numberCodec,\n },\n {\n name: 'assetHoldings',\n wireKey: 'asset-holdings',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(HoldingReferenceMeta)),\n },\n {\n name: 'appLocals',\n wireKey: 'app-locals',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(LocalsReferenceMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;AA6CA,MAAaA,uCAA8F;CACzG,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOA;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIC,yBAAW,IAAIC,sCAAiBC,8CAAiB,CAAC;GAC9D;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIH,yBAAW,IAAIC,sCAAiBG,kDAAqB,CAAC;GAClE;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIJ,yBAAW,IAAIC,sCAAiBI,iDAAoB,CAAC;GACjE;EACF;CACF"}
@@ -1,9 +1,7 @@
1
1
  import { numberCodec } from "../../../common/src/codecs/primitives/number.mjs";
2
2
  import { ArrayCodec, addressArrayCodec, bigIntArrayCodec } from "../../../common/src/codecs/composite/array.mjs";
3
3
  import { ObjectModelCodec } from "../../../common/src/codecs/models/object-model.mjs";
4
- import { AssetHoldingReferenceMeta } from "./asset-holding-reference.mjs";
5
- import { ApplicationLocalReferenceMeta } from "./application-local-reference.mjs";
6
- import { BoxReferenceMeta } from "./box-reference.mjs";
4
+ import { BoxReferenceMeta, HoldingReferenceMeta, LocalsReferenceMeta } from "../../../transact/src/transactions/reference-types-meta.mjs";
7
5
 
8
6
  //#region packages/algod_client/src/models/simulate-unnamed-resources-accessed.ts
9
7
  const SimulateUnnamedResourcesAccessedMeta = {
@@ -44,13 +42,13 @@ const SimulateUnnamedResourcesAccessedMeta = {
44
42
  name: "assetHoldings",
45
43
  wireKey: "asset-holdings",
46
44
  optional: true,
47
- codec: new ArrayCodec(new ObjectModelCodec(AssetHoldingReferenceMeta))
45
+ codec: new ArrayCodec(new ObjectModelCodec(HoldingReferenceMeta))
48
46
  },
49
47
  {
50
48
  name: "appLocals",
51
49
  wireKey: "app-locals",
52
50
  optional: true,
53
- codec: new ArrayCodec(new ObjectModelCodec(ApplicationLocalReferenceMeta))
51
+ codec: new ArrayCodec(new ObjectModelCodec(LocalsReferenceMeta))
54
52
  }
55
53
  ]
56
54
  };
@@ -1 +1 @@
1
- {"version":3,"file":"simulate-unnamed-resources-accessed.mjs","names":["SimulateUnnamedResourcesAccessedMeta: ObjectModelMetadata<SimulateUnnamedResourcesAccessed>"],"sources":["../../../../../packages/algod_client/src/models/simulate-unnamed-resources-accessed.ts"],"sourcesContent":["import type { Address, ObjectModelMetadata } from '@algorandfoundation/algokit-common'\nimport { numberCodec, ArrayCodec, bigIntArrayCodec, addressArrayCodec, ObjectModelCodec } from '@algorandfoundation/algokit-common'\nimport type { ApplicationLocalReference } from './application-local-reference'\nimport { ApplicationLocalReferenceMeta } from './application-local-reference'\nimport type { AssetHoldingReference } from './asset-holding-reference'\nimport { AssetHoldingReferenceMeta } from './asset-holding-reference'\nimport type { BoxReference } from './box-reference'\nimport { BoxReferenceMeta } from './box-reference'\n\n/**\n * These are resources that were accessed by this group that would normally have caused failure, but were allowed in simulation. Depending on where this object is in the response, the unnamed resources it contains may or may not qualify for group resource sharing. If this is a field in SimulateTransactionGroupResult, the resources do qualify, but if this is a field in SimulateTransactionResult, they do not qualify. In order to make this group valid for actual submission, resources that qualify for group sharing can be made available by any transaction of the group; otherwise, resources must be placed in the same transaction which accessed them.\n */\nexport type SimulateUnnamedResourcesAccessed = {\n /**\n * The unnamed accounts that were referenced. The order of this array is arbitrary.\n */\n accounts?: Address[]\n\n /**\n * The unnamed assets that were referenced. The order of this array is arbitrary.\n */\n assets?: bigint[]\n\n /**\n * The unnamed applications that were referenced. The order of this array is arbitrary.\n */\n apps?: bigint[]\n\n /**\n * The unnamed boxes that were referenced. The order of this array is arbitrary.\n */\n boxes?: BoxReference[]\n\n /**\n * The number of extra box references used to increase the IO budget. This is in addition to the references defined in the input transaction group and any referenced to unnamed boxes.\n */\n extraBoxRefs?: number\n\n /**\n * The unnamed asset holdings that were referenced. The order of this array is arbitrary.\n */\n assetHoldings?: AssetHoldingReference[]\n\n /**\n * The unnamed application local states that were referenced. The order of this array is arbitrary.\n */\n appLocals?: ApplicationLocalReference[]\n}\n\nexport const SimulateUnnamedResourcesAccessedMeta: ObjectModelMetadata<SimulateUnnamedResourcesAccessed> = {\n name: 'SimulateUnnamedResourcesAccessed',\n kind: 'object',\n fields: [\n {\n name: 'accounts',\n wireKey: 'accounts',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'assets',\n wireKey: 'assets',\n optional: true,\n codec: bigIntArrayCodec,\n },\n {\n name: 'apps',\n wireKey: 'apps',\n optional: true,\n codec: bigIntArrayCodec,\n },\n {\n name: 'boxes',\n wireKey: 'boxes',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(BoxReferenceMeta)),\n },\n {\n name: 'extraBoxRefs',\n wireKey: 'extra-box-refs',\n optional: true,\n codec: numberCodec,\n },\n {\n name: 'assetHoldings',\n wireKey: 'asset-holdings',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(AssetHoldingReferenceMeta)),\n },\n {\n name: 'appLocals',\n wireKey: 'app-locals',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(ApplicationLocalReferenceMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;;;AAiDA,MAAaA,uCAA8F;CACzG,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,iBAAiB,CAAC;GAC9D;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,0BAA0B,CAAC;GACvE;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,8BAA8B,CAAC;GAC3E;EACF;CACF"}
1
+ {"version":3,"file":"simulate-unnamed-resources-accessed.mjs","names":["SimulateUnnamedResourcesAccessedMeta: ObjectModelMetadata<SimulateUnnamedResourcesAccessed>"],"sources":["../../../../../packages/algod_client/src/models/simulate-unnamed-resources-accessed.ts"],"sourcesContent":["import type { Address, ObjectModelMetadata } from '@algorandfoundation/algokit-common'\nimport { numberCodec, ArrayCodec, bigIntArrayCodec, addressArrayCodec, ObjectModelCodec } from '@algorandfoundation/algokit-common'\nimport type { BoxReference, HoldingReference, LocalsReference } from '@algorandfoundation/algokit-transact'\nimport { BoxReferenceMeta, HoldingReferenceMeta, LocalsReferenceMeta } from '@algorandfoundation/algokit-transact'\n\n/**\n * These are resources that were accessed by this group that would normally have caused failure, but were allowed in simulation. Depending on where this object is in the response, the unnamed resources it contains may or may not qualify for group resource sharing. If this is a field in SimulateTransactionGroupResult, the resources do qualify, but if this is a field in SimulateTransactionResult, they do not qualify. In order to make this group valid for actual submission, resources that qualify for group sharing can be made available by any transaction of the group; otherwise, resources must be placed in the same transaction which accessed them.\n */\nexport type SimulateUnnamedResourcesAccessed = {\n /**\n * The unnamed accounts that were referenced. The order of this array is arbitrary.\n */\n accounts?: Address[]\n\n /**\n * The unnamed assets that were referenced. The order of this array is arbitrary.\n */\n assets?: bigint[]\n\n /**\n * The unnamed applications that were referenced. The order of this array is arbitrary.\n */\n apps?: bigint[]\n\n /**\n * The unnamed boxes that were referenced. The order of this array is arbitrary.\n */\n boxes?: BoxReference[]\n\n /**\n * The number of extra box references used to increase the IO budget. This is in addition to the references defined in the input transaction group and any referenced to unnamed boxes.\n */\n extraBoxRefs?: number\n\n /**\n * The unnamed asset holdings that were referenced. The order of this array is arbitrary.\n */\n assetHoldings?: HoldingReference[]\n\n /**\n * The unnamed application local states that were referenced. The order of this array is arbitrary.\n */\n appLocals?: LocalsReference[]\n}\n\nexport const SimulateUnnamedResourcesAccessedMeta: ObjectModelMetadata<SimulateUnnamedResourcesAccessed> = {\n name: 'SimulateUnnamedResourcesAccessed',\n kind: 'object',\n fields: [\n {\n name: 'accounts',\n wireKey: 'accounts',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'assets',\n wireKey: 'assets',\n optional: true,\n codec: bigIntArrayCodec,\n },\n {\n name: 'apps',\n wireKey: 'apps',\n optional: true,\n codec: bigIntArrayCodec,\n },\n {\n name: 'boxes',\n wireKey: 'boxes',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(BoxReferenceMeta)),\n },\n {\n name: 'extraBoxRefs',\n wireKey: 'extra-box-refs',\n optional: true,\n codec: numberCodec,\n },\n {\n name: 'assetHoldings',\n wireKey: 'asset-holdings',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(HoldingReferenceMeta)),\n },\n {\n name: 'appLocals',\n wireKey: 'app-locals',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(LocalsReferenceMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;AA6CA,MAAaA,uCAA8F;CACzG,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,iBAAiB,CAAC;GAC9D;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,qBAAqB,CAAC;GAClE;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,oBAAoB,CAAC;GACjE;EACF;CACF"}
@@ -1,7 +1,7 @@
1
- import JSONbigFactory from "json-bigint";
1
+ import JSONbigWithoutConfig from "json-bigint";
2
2
 
3
3
  //#region packages/common/src/json.ts
4
- const JSONbig = JSONbigFactory({
4
+ const JSONbig = JSONbigWithoutConfig({
5
5
  useNativeBigInt: true,
6
6
  strict: true
7
7
  });
@@ -1 +1 @@
1
- {"version":3,"file":"json.mjs","names":[],"sources":["../../../../packages/common/src/json.ts"],"sourcesContent":["import JSONbigFactory from 'json-bigint'\n\nconst JSONbig = JSONbigFactory({\n useNativeBigInt: true,\n strict: true,\n})\n\n/**\n * Parse JSON with bigint support.\n * @param str - The JSON string to parse.\n */\nexport function parseJson(str: string) {\n return JSONbig.parse(str, (_: string, value: unknown): unknown => {\n if (value != null && typeof value === 'object' && Object.getPrototypeOf(value) == null) {\n // JSONbig.parse objects are created with Object.create(null) and thus have a null prototype\n Object.setPrototypeOf(value, Object.prototype)\n }\n\n if (typeof value === 'bigint') {\n if (value > Number.MAX_SAFE_INTEGER) {\n return value\n }\n // JSONbig.parse converts number to BigInts if they are >= 10**15. This is smaller than\n // Number.MAX_SAFE_INTEGER, so we can convert some BigInts back to normal numbers.\n return Number(value)\n }\n\n return value\n })\n}\n\n/**\n * Convert a JavaScript value to a JSON string with bigint support.\n *\n * @param value - A JavaScript value, usually an object or array, to be converted.\n * @param replacer - A function that transforms the results.\n * @param space - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n */\nexport function stringifyJson(\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string {\n return JSONbig.stringify(value, replacer, space)\n}\n"],"mappings":";;;AAEA,MAAM,UAAU,eAAe;CAC7B,iBAAiB;CACjB,QAAQ;CACT,CAAC;;;;;AAMF,SAAgB,UAAU,KAAa;AACrC,QAAO,QAAQ,MAAM,MAAM,GAAW,UAA4B;AAChE,MAAI,SAAS,QAAQ,OAAO,UAAU,YAAY,OAAO,eAAe,MAAM,IAAI,KAEhF,QAAO,eAAe,OAAO,OAAO,UAAU;AAGhD,MAAI,OAAO,UAAU,UAAU;AAC7B,OAAI,QAAQ,OAAO,iBACjB,QAAO;AAIT,UAAO,OAAO,MAAM;;AAGtB,SAAO;GACP;;;;;;;;;AAUJ,SAAgB,cACd,OACA,UACA,OACQ;AACR,QAAO,QAAQ,UAAU,OAAO,UAAU,MAAM"}
1
+ {"version":3,"file":"json.mjs","names":["JSONbigFactory"],"sources":["../../../../packages/common/src/json.ts"],"sourcesContent":["import JSONbigFactory from 'json-bigint'\n\nconst JSONbig = JSONbigFactory({\n useNativeBigInt: true,\n strict: true,\n})\n\n/**\n * Parse JSON with bigint support.\n * @param str - The JSON string to parse.\n */\nexport function parseJson(str: string) {\n return JSONbig.parse(str, (_: string, value: unknown): unknown => {\n if (value != null && typeof value === 'object' && Object.getPrototypeOf(value) == null) {\n // JSONbig.parse objects are created with Object.create(null) and thus have a null prototype\n Object.setPrototypeOf(value, Object.prototype)\n }\n\n if (typeof value === 'bigint') {\n if (value > Number.MAX_SAFE_INTEGER) {\n return value\n }\n // JSONbig.parse converts number to BigInts if they are >= 10**15. This is smaller than\n // Number.MAX_SAFE_INTEGER, so we can convert some BigInts back to normal numbers.\n return Number(value)\n }\n\n return value\n })\n}\n\n/**\n * Convert a JavaScript value to a JSON string with bigint support.\n *\n * @param value - A JavaScript value, usually an object or array, to be converted.\n * @param replacer - A function that transforms the results.\n * @param space - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n */\nexport function stringifyJson(\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string {\n return JSONbig.stringify(value, replacer, space)\n}\n"],"mappings":";;;AAEA,MAAM,UAAUA,qBAAe;CAC7B,iBAAiB;CACjB,QAAQ;CACT,CAAC;;;;;AAMF,SAAgB,UAAU,KAAa;AACrC,QAAO,QAAQ,MAAM,MAAM,GAAW,UAA4B;AAChE,MAAI,SAAS,QAAQ,OAAO,UAAU,YAAY,OAAO,eAAe,MAAM,IAAI,KAEhF,QAAO,eAAe,OAAO,OAAO,UAAU;AAGhD,MAAI,OAAO,UAAU,UAAU;AAC7B,OAAI,QAAQ,OAAO,iBACjB,QAAO;AAIT,UAAO,OAAO,MAAM;;AAGtB,SAAO;GACP;;;;;;;;;AAUJ,SAAgB,cACd,OACA,UACA,OACQ;AACR,QAAO,QAAQ,UAAU,OAAO,UAAU,MAAM"}
@@ -1,8 +1,8 @@
1
1
  import intDecoding_default from "../types/intDecoding.mjs";
2
- import JSONbigFactory from "json-bigint";
2
+ import JSONbigWithoutConfig from "json-bigint";
3
3
 
4
4
  //#region packages/sdk/src/utils/utils.ts
5
- const JSONbig = JSONbigFactory({
5
+ const JSONbig = JSONbigWithoutConfig({
6
6
  useNativeBigInt: true,
7
7
  strict: true
8
8
  });
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","names":["JSONbigWithoutConfig","IntDecoding"],"sources":["../../../../../packages/sdk/src/utils/utils.ts"],"sourcesContent":["import JSONbigWithoutConfig from 'json-bigint'\nimport IntDecoding from '../types/intDecoding.js'\n\nconst JSONbig = JSONbigWithoutConfig({\n useNativeBigInt: true,\n strict: true,\n})\n\nexport interface ParseJSONOptions {\n intDecoding: IntDecoding\n}\n\n/**\n * Parse JSON with additional options.\n * @param str - The JSON string to parse.\n * @param options - Configures how integers in this JSON string will be decoded. See the\n * `IntDecoding` enum for more details.\n */\nexport function parseJSON(str: string, { intDecoding }: ParseJSONOptions) {\n if (\n intDecoding !== IntDecoding.SAFE &&\n intDecoding !== IntDecoding.UNSAFE &&\n intDecoding !== IntDecoding.BIGINT &&\n intDecoding !== IntDecoding.MIXED\n ) {\n throw new Error(`Invalid intDecoding option: ${intDecoding}`)\n }\n return JSONbig.parse(str, (_: string, value: any): any => {\n if (value != null && typeof value === 'object' && Object.getPrototypeOf(value) == null) {\n // JSONbig.parse objects are created with Object.create(null) and thus have a null prototype\n // let us remedy that\n Object.setPrototypeOf(value, Object.prototype)\n }\n\n if (typeof value === 'bigint') {\n if (intDecoding === IntDecoding.SAFE && value > Number.MAX_SAFE_INTEGER) {\n throw new Error(`Integer exceeds maximum safe integer: ${value.toString()}. Try parsing with a different intDecoding option.`)\n }\n if (intDecoding === IntDecoding.BIGINT || (intDecoding === IntDecoding.MIXED && value > Number.MAX_SAFE_INTEGER)) {\n return value\n }\n // JSONbig.parse converts number to BigInts if they are >= 10**15. This is smaller than\n // Number.MAX_SAFE_INTEGER, so we can convert some BigInts back to normal numbers.\n return Number(value)\n }\n\n if (typeof value === 'number') {\n if (intDecoding === IntDecoding.BIGINT && Number.isInteger(value)) {\n return BigInt(value)\n }\n }\n\n return value\n })\n}\n\n/**\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\n *\n * This functions differs from the built-in JSON.stringify in that it supports serializing BigInts.\n *\n * This function takes the same arguments as the built-in JSON.stringify function.\n *\n * @param value - A JavaScript value, usually an object or array, to be converted.\n * @param replacer - A function that transforms the results.\n * @param space - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n */\nexport function stringifyJSON(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string {\n return JSONbig.stringify(value, replacer, space)\n}\n\n/**\n * ArrayEqual takes two arrays and return true if equal, false otherwise\n */\nexport function arrayEqual<T>(a: ArrayLike<T>, b: ArrayLike<T>): boolean {\n if (a.length !== b.length) {\n return false\n }\n return Array.from(a).every((val, i) => val === b[i])\n}\n\n/**\n * ConcatArrays takes n number arrays and returns a joint Uint8Array\n * @param arrs - An arbitrary number of n array-like number list arguments\n * @returns [a,b]\n */\nexport function concatArrays(...arrs: ArrayLike<number>[]) {\n const size = arrs.reduce((sum, arr) => sum + arr.length, 0)\n const c = new Uint8Array(size)\n\n let offset = 0\n for (let i = 0; i < arrs.length; i++) {\n c.set(arrs[i], offset)\n offset += arrs[i].length\n }\n\n return c\n}\n\n/**\n * Remove undefined properties from an object\n * @param obj - An object, preferably one with some undefined properties\n * @returns A copy of the object with undefined properties removed\n */\nexport function removeUndefinedProperties(obj: Record<string | number | symbol, any>) {\n const mutableCopy = { ...obj }\n Object.keys(mutableCopy).forEach((key) => {\n if (typeof mutableCopy[key] === 'undefined') delete mutableCopy[key]\n })\n return mutableCopy\n}\n\n/**\n * Check whether the environment is Node.js (as opposed to the browser)\n * @returns True if Node.js environment, false otherwise\n */\nexport function isNode() {\n return (\n // @ts-ignore\n typeof process === 'object' &&\n // @ts-ignore\n typeof process.versions === 'object' &&\n // @ts-ignore\n typeof process.versions.node !== 'undefined'\n )\n}\n\n/**\n * Check whether the environment is ReactNative\n * @returns True if ReactNative, false otherwise\n */\nexport function isReactNative() {\n const { navigator } = globalThis as { navigator?: { product?: string } }\n if (typeof navigator === 'object' && navigator.product === 'ReactNative') {\n return true\n }\n return false\n}\n\nexport function ensureSafeInteger(value: unknown): number {\n if (typeof value === 'undefined') {\n throw new Error('Value is undefined')\n }\n if (typeof value === 'bigint') {\n if (value > BigInt(Number.MAX_SAFE_INTEGER) || value < BigInt(Number.MIN_SAFE_INTEGER)) {\n throw new Error(`BigInt value ${value} is not a safe integer`)\n }\n return Number(value)\n }\n if (typeof value === 'number') {\n if (Number.isSafeInteger(value)) {\n return value\n }\n throw new Error(`Value ${value} is not a safe integer`)\n }\n throw new Error(`Unexpected type ${typeof value}, ${value}`)\n}\n\nexport function ensureSafeUnsignedInteger(value: unknown): number {\n const intValue = ensureSafeInteger(value)\n if (intValue < 0) {\n throw new Error(`Value ${intValue} is negative`)\n }\n return intValue\n}\n\nexport function ensureBigInt(value: unknown): bigint {\n if (typeof value === 'undefined') {\n throw new Error('Value is undefined')\n }\n if (typeof value === 'bigint') {\n return value\n }\n if (typeof value === 'number') {\n if (!Number.isSafeInteger(value)) {\n throw new Error(`Value ${value} is not a safe integer`)\n }\n return BigInt(value)\n }\n throw new Error(`Unexpected type ${typeof value}, ${value}`)\n}\n\nexport function ensureUint64(value: unknown): bigint {\n const bigIntValue = ensureBigInt(value)\n if (bigIntValue < 0 || bigIntValue > BigInt('0xffffffffffffffff')) {\n throw new Error(`Value ${bigIntValue} is not a uint64`)\n }\n return bigIntValue\n}\n"],"mappings":";;;;AAGA,MAAM,UAAUA,eAAqB;CACnC,iBAAiB;CACjB,QAAQ;CACT,CAAC;;;;;;;AAYF,SAAgB,UAAU,KAAa,EAAE,eAAiC;AACxE,KACE,gBAAgBC,oBAAY,QAC5B,gBAAgBA,oBAAY,UAC5B,gBAAgBA,oBAAY,UAC5B,gBAAgBA,oBAAY,MAE5B,OAAM,IAAI,MAAM,+BAA+B,cAAc;AAE/D,QAAO,QAAQ,MAAM,MAAM,GAAW,UAAoB;AACxD,MAAI,SAAS,QAAQ,OAAO,UAAU,YAAY,OAAO,eAAe,MAAM,IAAI,KAGhF,QAAO,eAAe,OAAO,OAAO,UAAU;AAGhD,MAAI,OAAO,UAAU,UAAU;AAC7B,OAAI,gBAAgBA,oBAAY,QAAQ,QAAQ,OAAO,iBACrD,OAAM,IAAI,MAAM,yCAAyC,MAAM,UAAU,CAAC,oDAAoD;AAEhI,OAAI,gBAAgBA,oBAAY,UAAW,gBAAgBA,oBAAY,SAAS,QAAQ,OAAO,iBAC7F,QAAO;AAIT,UAAO,OAAO,MAAM;;AAGtB,MAAI,OAAO,UAAU,UACnB;OAAI,gBAAgBA,oBAAY,UAAU,OAAO,UAAU,MAAM,CAC/D,QAAO,OAAO,MAAM;;AAIxB,SAAO;GACP;;;;;;;;;;;;;AAcJ,SAAgB,cAAc,OAAY,UAAwD,OAAiC;AACjI,QAAO,QAAQ,UAAU,OAAO,UAAU,MAAM;;;;;AAMlD,SAAgB,WAAc,GAAiB,GAA0B;AACvE,KAAI,EAAE,WAAW,EAAE,OACjB,QAAO;AAET,QAAO,MAAM,KAAK,EAAE,CAAC,OAAO,KAAK,MAAM,QAAQ,EAAE,GAAG;;;;;;;AAQtD,SAAgB,aAAa,GAAG,M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cAAc;AAElD,QAAO;;AAGT,SAAgB,aAAa,OAAwB;AACnD,KAAI,OAAO,UAAU,YACnB,OAAM,IAAI,MAAM,qBAAqB;AAEvC,KAAI,OAAO,UAAU,SACnB,QAAO;AAET,KAAI,OAAO,UAAU,UAAU;AAC7B,MAAI,CAAC,OAAO,cAAc,MAAM,CAC9B,OAAM,IAAI,MAAM,SAAS,MAAM,wBAAwB;AAEzD,SAAO,OAAO,MAAM;;AAEtB,OAAM,IAAI,MAAM,mBAAmB,OAAO,MAAM,IAAI,QAAQ;;AAG9D,SAAgB,aAAa,OAAwB;CACnD,MAAM,cAAc,aAAa,MAAM;AACvC,KAAI,cAAc,KAAK,cAAc,OAAO,qBAAqB,CAC/D,OAAM,IAAI,MAAM,SAAS,YAAY,kBAAkB;AAEzD,QAAO"}
1
+ {"version":3,"file":"utils.mjs","names":["IntDecoding"],"sources":["../../../../../packages/sdk/src/utils/utils.ts"],"sourcesContent":["import JSONbigWithoutConfig from 'json-bigint'\nimport IntDecoding from '../types/intDecoding.js'\n\nconst JSONbig = JSONbigWithoutConfig({\n useNativeBigInt: true,\n strict: true,\n})\n\nexport interface ParseJSONOptions {\n intDecoding: IntDecoding\n}\n\n/**\n * Parse JSON with additional options.\n * @param str - The JSON string to parse.\n * @param options - Configures how integers in this JSON string will be decoded. See the\n * `IntDecoding` enum for more details.\n */\nexport function parseJSON(str: string, { intDecoding }: ParseJSONOptions) {\n if (\n intDecoding !== IntDecoding.SAFE &&\n intDecoding !== IntDecoding.UNSAFE &&\n intDecoding !== IntDecoding.BIGINT &&\n intDecoding !== IntDecoding.MIXED\n ) {\n throw new Error(`Invalid intDecoding option: ${intDecoding}`)\n }\n return JSONbig.parse(str, (_: string, value: any): any => {\n if (value != null && typeof value === 'object' && Object.getPrototypeOf(value) == null) {\n // JSONbig.parse objects are created with Object.create(null) and thus have a null prototype\n // let us remedy that\n Object.setPrototypeOf(value, Object.prototype)\n }\n\n if (typeof value === 'bigint') {\n if (intDecoding === IntDecoding.SAFE && value > Number.MAX_SAFE_INTEGER) {\n throw new Error(`Integer exceeds maximum safe integer: ${value.toString()}. Try parsing with a different intDecoding option.`)\n }\n if (intDecoding === IntDecoding.BIGINT || (intDecoding === IntDecoding.MIXED && value > Number.MAX_SAFE_INTEGER)) {\n return value\n }\n // JSONbig.parse converts number to BigInts if they are >= 10**15. This is smaller than\n // Number.MAX_SAFE_INTEGER, so we can convert some BigInts back to normal numbers.\n return Number(value)\n }\n\n if (typeof value === 'number') {\n if (intDecoding === IntDecoding.BIGINT && Number.isInteger(value)) {\n return BigInt(value)\n }\n }\n\n return value\n })\n}\n\n/**\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\n *\n * This functions differs from the built-in JSON.stringify in that it supports serializing BigInts.\n *\n * This function takes the same arguments as the built-in JSON.stringify function.\n *\n * @param value - A JavaScript value, usually an object or array, to be converted.\n * @param replacer - A function that transforms the results.\n * @param space - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n */\nexport function stringifyJSON(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string {\n return JSONbig.stringify(value, replacer, space)\n}\n\n/**\n * ArrayEqual takes two arrays and return true if equal, false otherwise\n */\nexport function arrayEqual<T>(a: ArrayLike<T>, b: ArrayLike<T>): boolean {\n if (a.length !== b.length) {\n return false\n }\n return Array.from(a).every((val, i) => val === b[i])\n}\n\n/**\n * ConcatArrays takes n number arrays and returns a joint Uint8Array\n * @param arrs - An arbitrary number of n array-like number list arguments\n * @returns [a,b]\n */\nexport function concatArrays(...arrs: ArrayLike<number>[]) {\n const size = arrs.reduce((sum, arr) => sum + arr.length, 0)\n const c = new Uint8Array(size)\n\n let offset = 0\n for (let i = 0; i < arrs.length; i++) {\n c.set(arrs[i], offset)\n offset += arrs[i].length\n }\n\n return c\n}\n\n/**\n * Remove undefined properties from an object\n * @param obj - An object, preferably one with some undefined properties\n * @returns A copy of the object with undefined properties removed\n */\nexport function removeUndefinedProperties(obj: Record<string | number | symbol, any>) {\n const mutableCopy = { ...obj }\n Object.keys(mutableCopy).forEach((key) => {\n if (typeof mutableCopy[key] === 'undefined') delete mutableCopy[key]\n })\n return mutableCopy\n}\n\n/**\n * Check whether the environment is Node.js (as opposed to the browser)\n * @returns True if Node.js environment, false otherwise\n */\nexport function isNode() {\n return (\n // @ts-ignore\n typeof process === 'object' &&\n // @ts-ignore\n typeof process.versions === 'object' &&\n // @ts-ignore\n typeof process.versions.node !== 'undefined'\n )\n}\n\n/**\n * Check whether the environment is ReactNative\n * @returns True if ReactNative, false otherwise\n */\nexport function isReactNative() {\n const { navigator } = globalThis as { navigator?: { product?: string } }\n if (typeof navigator === 'object' && navigator.product === 'ReactNative') {\n return true\n }\n return false\n}\n\nexport function ensureSafeInteger(value: unknown): number {\n if (typeof value === 'undefined') {\n throw new Error('Value is undefined')\n }\n if (typeof value === 'bigint') {\n if (value > BigInt(Number.MAX_SAFE_INTEGER) || value < BigInt(Number.MIN_SAFE_INTEGER)) {\n throw new Error(`BigInt value ${value} is not a safe integer`)\n }\n return Number(value)\n }\n if (typeof value === 'number') {\n if (Number.isSafeInteger(value)) {\n return value\n }\n throw new Error(`Value ${value} is not a safe integer`)\n }\n throw new Error(`Unexpected type ${typeof value}, ${value}`)\n}\n\nexport function ensureSafeUnsignedInteger(value: unknown): number {\n const intValue = ensureSafeInteger(value)\n if (intValue < 0) {\n throw new Error(`Value ${intValue} is negative`)\n }\n return intValue\n}\n\nexport function ensureBigInt(value: unknown): bigint {\n if (typeof value === 'undefined') {\n throw new Error('Value is undefined')\n }\n if (typeof value === 'bigint') {\n return value\n }\n if (typeof value === 'number') {\n if (!Number.isSafeInteger(value)) {\n throw new Error(`Value ${value} is not a safe integer`)\n }\n return BigInt(value)\n }\n throw new Error(`Unexpected type ${typeof value}, ${value}`)\n}\n\nexport function ensureUint64(value: unknown): bigint {\n const bigIntValue = ensureBigInt(value)\n if (bigIntValue < 0 || bigIntValue > BigInt('0xffffffffffffffff')) {\n throw new Error(`Value ${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OAAO,UAAU,SACnB,QAAO;AAET,KAAI,OAAO,UAAU,UAAU;AAC7B,MAAI,CAAC,OAAO,cAAc,MAAM,CAC9B,OAAM,IAAI,MAAM,SAAS,MAAM,wBAAwB;AAEzD,SAAO,OAAO,MAAM;;AAEtB,OAAM,IAAI,MAAM,mBAAmB,OAAO,MAAM,IAAI,QAAQ;;AAG9D,SAAgB,aAAa,OAAwB;CACnD,MAAM,cAAc,aAAa,MAAM;AACvC,KAAI,cAAc,KAAK,cAAc,OAAO,qBAAqB,CAC/D,OAAM,IAAI,MAAM,SAAS,YAAY,kBAAkB;AAEzD,QAAO"}
@@ -87,9 +87,9 @@ declare function appendSignRawMultisigSignature(multisigTxnBlob: Uint8Array, {
87
87
  declare function addressFromMultisigPreImg({
88
88
  version,
89
89
  threshold,
90
- pks
90
+ publicKeys
91
91
  }: Omit<MultisigMetadata, 'addrs'> & {
92
- pks: Uint8Array[];
92
+ publicKeys: Uint8Array[];
93
93
  }): Address;
94
94
  /**
95
95
  * Takes multisig parameters and returns a human readable Algorand address.
@@ -34,7 +34,7 @@ function addressFromMultisigSignature(multisigSignature) {
34
34
  return addressFromMultisigPreImg({
35
35
  version: multisigSignature.version,
36
36
  threshold: multisigSignature.threshold,
37
- pks: multisigSignature.subsignatures.map((subsig) => subsig.publicKey)
37
+ publicKeys: multisigSignature.subsignatures.map((subsig) => subsig.publicKey)
38
38
  });
39
39
  }
40
40
  /**
@@ -132,7 +132,7 @@ function createMultisigTransaction(txn, { version, threshold, addrs }) {
132
132
  const msigAddr = addressFromMultisigPreImg({
133
133
  version,
134
134
  threshold,
135
- pks
135
+ publicKeys: pks
136
136
  });
137
137
  let authAddress;
138
138
  if (!msigAddr.equals(txn.sender)) authAddress = msigAddr;
@@ -152,11 +152,11 @@ function createMultisigTransaction(txn, { version, threshold, addrs }) {
152
152
  * @param pks - ordered list of public keys in this multisig
153
153
  * @returns encoded multisig blob
154
154
  */
155
- function createMultisigTransactionWithSignature(txn, { rawSig, myPk }, { version, threshold, pks }) {
155
+ function createMultisigTransactionWithSignature(txn, { rawSig, myPk }, { version, threshold, publicKeys }) {
156
156
  const signedTxn = require_signed_transaction.decodeSignedTransaction(createMultisigTransaction(txn, {
157
157
  version,
158
158
  threshold,
159
- addrs: pks.map((pk) => new require_address.Address(pk))
159
+ addrs: publicKeys.map((pk) => new require_address.Address(pk))
160
160
  }));
161
161
  let keyExist = false;
162
162
  const updatedSubsigs = signedTxn.msig.subsignatures.map((subsig) => {
@@ -192,7 +192,7 @@ function mergeMultisigTransactions(multisigTxnBlobs) {
192
192
  const refMsigAddr = addressFromMultisigPreImg({
193
193
  version: refSigTx.msig.version,
194
194
  threshold: refSigTx.msig.threshold,
195
- pks: refSigTx.msig.subsignatures.map((subsig) => subsig.publicKey)
195
+ publicKeys: refSigTx.msig.subsignatures.map((subsig) => subsig.publicKey)
196
196
  });
197
197
  const newSubsigs = refSigTx.msig.subsignatures.map((sig) => ({ ...sig }));
198
198
  for (let i = 1; i < multisigTxnBlobs.length; i++) {
@@ -204,7 +204,7 @@ function mergeMultisigTransactions(multisigTxnBlobs) {
204
204
  const msgigAddr = addressFromMultisigPreImg({
205
205
  version: unisig.msig.version,
206
206
  threshold: unisig.msig.threshold,
207
- pks: unisig.msig.subsignatures.map((subsig) => subsig.publicKey)
207
+ publicKeys: unisig.msig.subsignatures.map((subsig) => subsig.publicKey)
208
208
  });
209
209
  if (refMsigAddr.toString() !== msgigAddr.toString()) throw new Error(MULTISIG_MERGE_WRONG_PREIMAGE_ERROR_MSG);
210
210
  unisig.msig.subsignatures.forEach((uniSubsig, index) => {
@@ -252,12 +252,12 @@ function partialSignWithMultisigSignature(transaction, metadata, signerAddr, sig
252
252
  * @returns object containing txID, and blob representing encoded multisig txn
253
253
  */
254
254
  function appendSignRawMultisigSignature(multisigTxnBlob, { version, threshold, addrs }, signerAddr, signature) {
255
- const pks = toPublicKeys(addrs);
255
+ const publicKeys = toPublicKeys(addrs);
256
256
  const multisigTxObj = require_signed_transaction.decodeSignedTransaction(multisigTxnBlob);
257
257
  const partialSignedBlob = partialSignWithMultisigSignature(multisigTxObj.txn, {
258
258
  version,
259
259
  threshold,
260
- pks
260
+ publicKeys
261
261
  }, signerAddr, signature);
262
262
  return {
263
263
  txID: multisigTxObj.txn.txId(),
@@ -273,18 +273,18 @@ function appendSignRawMultisigSignature(multisigTxnBlob, { version, threshold, a
273
273
  * @param threshold - multisig threshold
274
274
  * @param pks - array of typed array public keys
275
275
  */
276
- function addressFromMultisigPreImg({ version, threshold, pks }) {
276
+ function addressFromMultisigPreImg({ version, threshold, publicKeys }) {
277
277
  if (version > 255 || version < 0) throw new Error(`${INVALID_MSIG_VERSION_ERROR_MSG}: ${version}`);
278
- if (threshold === 0 || pks.length === 0 || threshold > pks.length || threshold > 255) throw new Error(INVALID_MSIG_THRESHOLD_ERROR_MSG);
278
+ if (threshold === 0 || publicKeys.length === 0 || threshold > publicKeys.length || threshold > 255) throw new Error(INVALID_MSIG_THRESHOLD_ERROR_MSG);
279
279
  const pkLen = require_address.ALGORAND_ADDRESS_BYTE_LENGTH - require_address.ALGORAND_CHECKSUM_BYTE_LENGTH;
280
280
  if (pkLen !== require_constants.PUBLIC_KEY_BYTE_LENGTH) throw new Error(UNEXPECTED_PK_LEN_ERROR_MSG);
281
- const merged = new Uint8Array(MULTISIG_PREIMG2ADDR_PREFIX.length + 2 + pkLen * pks.length);
281
+ const merged = new Uint8Array(MULTISIG_PREIMG2ADDR_PREFIX.length + 2 + pkLen * publicKeys.length);
282
282
  merged.set(MULTISIG_PREIMG2ADDR_PREFIX, 0);
283
283
  merged.set([version], MULTISIG_PREIMG2ADDR_PREFIX.length);
284
284
  merged.set([threshold], MULTISIG_PREIMG2ADDR_PREFIX.length + 1);
285
- for (let i = 0; i < pks.length; i++) {
286
- if (pks[i].length !== pkLen) throw new Error(INVALID_MSIG_PK_ERROR_MSG);
287
- merged.set(pks[i], MULTISIG_PREIMG2ADDR_PREFIX.length + 2 + i * pkLen);
285
+ for (let i = 0; i < publicKeys.length; i++) {
286
+ if (publicKeys[i].length !== pkLen) throw new Error(INVALID_MSIG_PK_ERROR_MSG);
287
+ merged.set(publicKeys[i], MULTISIG_PREIMG2ADDR_PREFIX.length + 2 + i * pkLen);
288
288
  }
289
289
  return new require_address.Address(Uint8Array.from(require_crypto.hash(merged)));
290
290
  }
@@ -299,7 +299,7 @@ function addressFromMultisigPreImgAddrs({ version, threshold, addrs }) {
299
299
  return addressFromMultisigPreImg({
300
300
  version,
301
301
  threshold,
302
- pks: toPublicKeys(addrs)
302
+ publicKeys: toPublicKeys(addrs)
303
303
  });
304
304
  }
305
305
  /**