@algorandfoundation/algokit-utils 10.0.0-alpha.3 → 10.0.0-alpha.31
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.
- package/_virtual/rolldown_runtime.js +10 -15
- package/abi/index.d.ts +2 -1
- package/abi/index.js +3 -0
- package/abi/index.mjs +2 -1
- package/algod-client/index.d.ts +3 -7
- package/algod-client/index.js +2 -5
- package/algod-client/index.mjs +2 -2
- package/index.d.ts +1 -2
- package/index.js +0 -7
- package/index.mjs +1 -2
- package/indexer-client/index.d.ts +2 -2
- package/indexer-client/index.js +6 -6
- package/indexer-client/index.mjs +2 -2
- package/{indexer-lookup.d.ts → indexer-client/indexer-lookup.d.ts} +8 -11
- package/{indexer-lookup.mjs → indexer-client/indexer-lookup.js} +6 -10
- package/indexer-client/indexer-lookup.js.map +1 -0
- package/{indexer-lookup.js → indexer-client/indexer-lookup.mjs} +3 -18
- package/indexer-client/indexer-lookup.mjs.map +1 -0
- package/kmd-client/index.d.ts +1 -2
- package/kmd-client/index.js +0 -5
- package/kmd-client/index.mjs +1 -2
- package/package.json +5 -6
- package/packages/abi/src/abi-method.d.ts +1 -1
- package/packages/abi/src/abi-method.js +1 -1
- package/packages/abi/src/abi-method.js.map +1 -1
- package/packages/abi/src/abi-method.mjs +1 -1
- package/packages/abi/src/abi-method.mjs.map +1 -1
- package/packages/abi/src/abi-type.d.ts +1 -3
- package/packages/abi/src/abi-type.js +7 -36
- package/packages/abi/src/abi-type.js.map +1 -1
- package/packages/abi/src/abi-type.mjs +7 -36
- package/packages/abi/src/abi-type.mjs.map +1 -1
- package/packages/abi/src/arc56-contract.js +1 -0
- package/packages/abi/src/arc56-contract.js.map +1 -1
- package/packages/abi/src/arc56-contract.mjs +1 -0
- package/packages/abi/src/arc56-contract.mjs.map +1 -1
- package/packages/abi/src/utils.d.ts +22 -0
- package/packages/abi/src/utils.js +57 -0
- package/packages/abi/src/utils.js.map +1 -0
- package/packages/abi/src/utils.mjs +55 -0
- package/packages/abi/src/utils.mjs.map +1 -0
- package/packages/algo25/src/index.js +1 -1
- package/packages/algo25/src/index.mjs +1 -1
- package/packages/algod_client/src/apis/api-service.d.ts +44 -44
- package/packages/algod_client/src/apis/api-service.js +155 -155
- package/packages/algod_client/src/apis/api-service.js.map +1 -1
- package/packages/algod_client/src/apis/api-service.mjs +155 -155
- package/packages/algod_client/src/apis/api-service.mjs.map +1 -1
- package/packages/algod_client/src/core/api-error.js +3 -1
- package/packages/algod_client/src/core/api-error.js.map +1 -1
- package/packages/algod_client/src/core/api-error.mjs +3 -1
- package/packages/algod_client/src/core/api-error.mjs.map +1 -1
- package/packages/algod_client/src/core/model-runtime.js +6 -6
- package/packages/algod_client/src/core/model-runtime.js.map +1 -1
- package/packages/algod_client/src/core/model-runtime.mjs +8 -8
- package/packages/algod_client/src/core/model-runtime.mjs.map +1 -1
- package/packages/algod_client/src/models/account-participation.js +4 -4
- package/packages/algod_client/src/models/account-participation.js.map +1 -1
- package/packages/algod_client/src/models/account-participation.mjs +4 -4
- package/packages/algod_client/src/models/account-participation.mjs.map +1 -1
- package/packages/algod_client/src/models/application-state-schema.d.ts +2 -2
- package/packages/algod_client/src/models/application-state-schema.js +2 -2
- package/packages/algod_client/src/models/application-state-schema.js.map +1 -1
- package/packages/algod_client/src/models/application-state-schema.mjs +2 -2
- package/packages/algod_client/src/models/application-state-schema.mjs.map +1 -1
- package/packages/algod_client/src/models/asset-params.js +2 -1
- package/packages/algod_client/src/models/asset-params.js.map +1 -1
- package/packages/algod_client/src/models/asset-params.mjs +2 -1
- package/packages/algod_client/src/models/asset-params.mjs.map +1 -1
- package/packages/algod_client/src/models/block-response.js +1 -2
- package/packages/algod_client/src/models/block-response.js.map +1 -1
- package/packages/algod_client/src/models/block-response.mjs +2 -3
- package/packages/algod_client/src/models/block-response.mjs.map +1 -1
- package/packages/algod_client/src/models/block.d.ts +60 -40
- package/packages/algod_client/src/models/block.js +184 -108
- package/packages/algod_client/src/models/block.js.map +1 -1
- package/packages/algod_client/src/models/block.mjs +184 -108
- package/packages/algod_client/src/models/block.mjs.map +1 -1
- package/packages/algod_client/src/models/eval-delta-key-value.js +2 -2
- package/packages/algod_client/src/models/eval-delta-key-value.js.map +1 -1
- package/packages/algod_client/src/models/eval-delta-key-value.mjs +2 -2
- package/packages/algod_client/src/models/eval-delta-key-value.mjs.map +1 -1
- package/packages/algod_client/src/models/eval-delta.js +2 -2
- package/packages/algod_client/src/models/eval-delta.js.map +1 -1
- package/packages/algod_client/src/models/eval-delta.mjs +2 -2
- package/packages/algod_client/src/models/eval-delta.mjs.map +1 -1
- package/packages/algod_client/src/models/ledger-state-delta.js +1 -1
- package/packages/algod_client/src/models/ledger-state-delta.js.map +1 -1
- package/packages/algod_client/src/models/ledger-state-delta.mjs +2 -2
- package/packages/algod_client/src/models/ledger-state-delta.mjs.map +1 -1
- package/packages/algod_client/src/models/simulate-request.js +1 -1
- package/packages/algod_client/src/models/simulate-request.mjs +1 -1
- package/packages/algod_client/src/models/simulate-response.d.ts +2 -1
- package/packages/algod_client/src/models/simulate-response.js +6 -1
- package/packages/algod_client/src/models/simulate-response.js.map +1 -1
- package/packages/algod_client/src/models/simulate-response.mjs +6 -2
- package/packages/algod_client/src/models/simulate-response.mjs.map +1 -1
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.d.ts +3 -5
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.js +4 -6
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.js.map +1 -1
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.mjs +3 -5
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.mjs.map +1 -1
- package/packages/algod_client/src/models/transaction-parameters-response.js +2 -2
- package/packages/algod_client/src/models/transaction-parameters-response.js.map +1 -1
- package/packages/algod_client/src/models/transaction-parameters-response.mjs +2 -2
- package/packages/algod_client/src/models/transaction-parameters-response.mjs.map +1 -1
- package/packages/common/src/address.d.ts +0 -1
- package/packages/common/src/address.js +4 -17
- package/packages/common/src/address.js.map +1 -1
- package/packages/common/src/address.mjs +5 -17
- package/packages/common/src/address.mjs.map +1 -1
- package/packages/common/src/codecs/composite/map.js +7 -4
- package/packages/common/src/codecs/composite/map.js.map +1 -1
- package/packages/common/src/codecs/composite/map.mjs +7 -4
- package/packages/common/src/codecs/composite/map.mjs.map +1 -1
- package/packages/common/src/codecs/composite/record.js +0 -1
- package/packages/common/src/codecs/composite/record.js.map +1 -1
- package/packages/common/src/codecs/primitives/address.js +0 -1
- package/packages/common/src/codecs/primitives/address.js.map +1 -1
- package/packages/common/src/codecs/primitives/bytes-base64.js +26 -0
- package/packages/common/src/codecs/primitives/bytes-base64.js.map +1 -0
- package/packages/common/src/codecs/primitives/bytes-base64.mjs +25 -0
- package/packages/common/src/codecs/primitives/bytes-base64.mjs.map +1 -0
- package/packages/common/src/codecs/primitives/bytes.js +0 -1
- package/packages/common/src/codecs/primitives/bytes.js.map +1 -1
- package/packages/common/src/codecs/primitives/fixed-bytes.js +0 -1
- package/packages/common/src/codecs/primitives/fixed-bytes.js.map +1 -1
- package/packages/common/src/codecs/wire.js +0 -1
- package/packages/common/src/codecs/wire.js.map +1 -1
- package/packages/common/src/json.mjs +2 -2
- package/packages/common/src/json.mjs.map +1 -1
- package/packages/common/src/msgpack.js +0 -1
- package/packages/common/src/msgpack.js.map +1 -1
- package/packages/{sdk/src/logic → common/src}/sourcemap.d.ts +2 -2
- package/packages/{sdk/src/logic → common/src}/sourcemap.js +2 -2
- package/packages/{sdk/src/logic → common/src}/sourcemap.js.map +1 -1
- package/packages/{sdk/src/logic → common/src}/sourcemap.mjs +1 -1
- package/packages/{sdk/src/logic → common/src}/sourcemap.mjs.map +1 -1
- package/packages/indexer_client/src/apis/api-service.d.ts +1 -1
- package/packages/indexer_client/src/apis/api-service.js +12 -12
- package/packages/indexer_client/src/apis/api-service.js.map +1 -1
- package/packages/indexer_client/src/apis/api-service.mjs +12 -12
- package/packages/indexer_client/src/apis/api-service.mjs.map +1 -1
- package/packages/indexer_client/src/core/api-error.js +3 -1
- package/packages/indexer_client/src/core/api-error.js.map +1 -1
- package/packages/indexer_client/src/core/api-error.mjs +3 -1
- package/packages/indexer_client/src/core/api-error.mjs.map +1 -1
- package/packages/indexer_client/src/core/model-runtime.js +0 -15
- package/packages/indexer_client/src/core/model-runtime.js.map +1 -1
- package/packages/indexer_client/src/core/model-runtime.mjs +1 -13
- package/packages/indexer_client/src/core/model-runtime.mjs.map +1 -1
- package/packages/indexer_client/src/models/account-participation.js +4 -4
- package/packages/indexer_client/src/models/account-participation.js.map +1 -1
- package/packages/indexer_client/src/models/account-participation.mjs +4 -4
- package/packages/indexer_client/src/models/account-participation.mjs.map +1 -1
- package/packages/indexer_client/src/models/application-state-schema.d.ts +2 -2
- package/packages/indexer_client/src/models/application-state-schema.js +2 -2
- package/packages/indexer_client/src/models/application-state-schema.js.map +1 -1
- package/packages/indexer_client/src/models/application-state-schema.mjs +2 -2
- package/packages/indexer_client/src/models/application-state-schema.mjs.map +1 -1
- package/packages/indexer_client/src/models/asset-params.js +2 -1
- package/packages/indexer_client/src/models/asset-params.js.map +1 -1
- package/packages/indexer_client/src/models/asset-params.mjs +2 -1
- package/packages/indexer_client/src/models/asset-params.mjs.map +1 -1
- package/packages/indexer_client/src/models/block.d.ts +5 -5
- package/packages/indexer_client/src/models/block.js +13 -13
- package/packages/indexer_client/src/models/block.js.map +1 -1
- package/packages/indexer_client/src/models/block.mjs +13 -13
- package/packages/indexer_client/src/models/block.mjs.map +1 -1
- package/packages/indexer_client/src/models/eval-delta-key-value.d.ts +1 -1
- package/packages/indexer_client/src/models/eval-delta-key-value.js +2 -2
- package/packages/indexer_client/src/models/eval-delta-key-value.js.map +1 -1
- package/packages/indexer_client/src/models/eval-delta-key-value.mjs +2 -2
- package/packages/indexer_client/src/models/eval-delta-key-value.mjs.map +1 -1
- package/packages/indexer_client/src/models/eval-delta.d.ts +1 -1
- package/packages/indexer_client/src/models/eval-delta.js +2 -2
- package/packages/indexer_client/src/models/eval-delta.js.map +1 -1
- package/packages/indexer_client/src/models/eval-delta.mjs +2 -2
- package/packages/indexer_client/src/models/eval-delta.mjs.map +1 -1
- package/packages/indexer_client/src/models/hb-proof-fields.js +6 -6
- package/packages/indexer_client/src/models/hb-proof-fields.js.map +1 -1
- package/packages/indexer_client/src/models/hb-proof-fields.mjs +6 -6
- package/packages/indexer_client/src/models/hb-proof-fields.mjs.map +1 -1
- package/packages/indexer_client/src/models/participation-updates.d.ts +2 -2
- package/packages/indexer_client/src/models/participation-updates.js +2 -2
- package/packages/indexer_client/src/models/participation-updates.js.map +1 -1
- package/packages/indexer_client/src/models/participation-updates.mjs +2 -2
- package/packages/indexer_client/src/models/participation-updates.mjs.map +1 -1
- package/packages/indexer_client/src/models/state-proof-verifier.js +2 -2
- package/packages/indexer_client/src/models/state-proof-verifier.js.map +1 -1
- package/packages/indexer_client/src/models/state-proof-verifier.mjs +2 -2
- package/packages/indexer_client/src/models/state-proof-verifier.mjs.map +1 -1
- package/packages/indexer_client/src/models/state-schema.d.ts +2 -2
- package/packages/indexer_client/src/models/state-schema.js +2 -2
- package/packages/indexer_client/src/models/state-schema.js.map +1 -1
- package/packages/indexer_client/src/models/state-schema.mjs +2 -2
- package/packages/indexer_client/src/models/state-schema.mjs.map +1 -1
- package/packages/indexer_client/src/models/teal-key-value.d.ts +1 -1
- package/packages/indexer_client/src/models/teal-key-value.js +2 -2
- package/packages/indexer_client/src/models/teal-key-value.js.map +1 -1
- package/packages/indexer_client/src/models/teal-key-value.mjs +2 -2
- package/packages/indexer_client/src/models/teal-key-value.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.js +2 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.mjs +2 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-keyreg.js +4 -4
- package/packages/indexer_client/src/models/transaction-keyreg.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-keyreg.mjs +4 -4
- package/packages/indexer_client/src/models/transaction-keyreg.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.js +2 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.mjs +2 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.js +3 -3
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.mjs +3 -3
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-state-proof.d.ts +1 -1
- package/packages/indexer_client/src/models/transaction-state-proof.js +2 -2
- package/packages/indexer_client/src/models/transaction-state-proof.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-state-proof.mjs +2 -2
- package/packages/indexer_client/src/models/transaction-state-proof.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction.d.ts +2 -2
- package/packages/indexer_client/src/models/transaction.js +6 -5
- package/packages/indexer_client/src/models/transaction.js.map +1 -1
- package/packages/indexer_client/src/models/transaction.mjs +6 -5
- package/packages/indexer_client/src/models/transaction.mjs.map +1 -1
- package/packages/kmd_client/src/apis/api-service.d.ts +5 -5
- package/packages/kmd_client/src/apis/api-service.js +32 -32
- package/packages/kmd_client/src/apis/api-service.js.map +1 -1
- package/packages/kmd_client/src/apis/api-service.mjs +32 -32
- package/packages/kmd_client/src/apis/api-service.mjs.map +1 -1
- package/packages/kmd_client/src/core/api-error.js +3 -1
- package/packages/kmd_client/src/core/api-error.js.map +1 -1
- package/packages/kmd_client/src/core/api-error.mjs +3 -1
- package/packages/kmd_client/src/core/api-error.mjs.map +1 -1
- package/packages/kmd_client/src/core/model-runtime.js +2 -12
- package/packages/kmd_client/src/core/model-runtime.js.map +1 -1
- package/packages/kmd_client/src/core/model-runtime.mjs +3 -11
- package/packages/kmd_client/src/core/model-runtime.mjs.map +1 -1
- package/packages/transact/src/logicsig.d.ts +35 -33
- package/packages/transact/src/logicsig.js +74 -76
- package/packages/transact/src/logicsig.js.map +1 -1
- package/packages/transact/src/logicsig.mjs +77 -78
- package/packages/transact/src/logicsig.mjs.map +1 -1
- package/packages/transact/src/multisig.d.ts +11 -116
- package/packages/transact/src/multisig.js +106 -136
- package/packages/transact/src/multisig.js.map +1 -1
- package/packages/transact/src/multisig.mjs +108 -118
- package/packages/transact/src/multisig.mjs.map +1 -1
- package/packages/transact/src/signer.js +9 -2
- package/packages/transact/src/signer.js.map +1 -1
- package/packages/transact/src/signer.mjs +10 -3
- package/packages/transact/src/signer.mjs.map +1 -1
- package/packages/transact/src/transactions/app-call.d.ts +10 -15
- package/packages/transact/src/transactions/app-call.js.map +1 -1
- package/packages/transact/src/transactions/app-call.mjs.map +1 -1
- package/packages/transact/src/transactions/asset-config.d.ts +1 -6
- package/packages/transact/src/transactions/asset-config.js.map +1 -1
- package/packages/transact/src/transactions/asset-config.mjs.map +1 -1
- package/packages/transact/src/transactions/asset-freeze.d.ts +1 -6
- package/packages/transact/src/transactions/asset-transfer.d.ts +1 -6
- package/packages/transact/src/transactions/key-registration.d.ts +1 -8
- package/packages/transact/src/transactions/reference-types-meta.d.ts +26 -0
- package/packages/transact/src/transactions/reference-types-meta.js +71 -0
- package/packages/transact/src/transactions/reference-types-meta.js.map +1 -0
- package/packages/transact/src/transactions/reference-types-meta.mjs +69 -0
- package/packages/transact/src/transactions/reference-types-meta.mjs.map +1 -0
- package/packages/transact/src/transactions/signed-transaction-meta.js +8 -9
- package/packages/transact/src/transactions/signed-transaction-meta.js.map +1 -1
- package/packages/transact/src/transactions/signed-transaction-meta.mjs +8 -8
- package/packages/transact/src/transactions/signed-transaction-meta.mjs.map +1 -1
- package/packages/transact/src/transactions/signed-transaction.d.ts +10 -6
- package/packages/transact/src/transactions/signed-transaction.js +1 -1
- package/packages/transact/src/transactions/signed-transaction.js.map +1 -1
- package/packages/transact/src/transactions/signed-transaction.mjs +1 -2
- package/packages/transact/src/transactions/signed-transaction.mjs.map +1 -1
- package/packages/transact/src/transactions/state-proof.d.ts +1 -1
- package/packages/transact/src/transactions/transaction-meta.js +29 -23
- package/packages/transact/src/transactions/transaction-meta.js.map +1 -1
- package/packages/transact/src/transactions/transaction-meta.mjs +29 -23
- package/packages/transact/src/transactions/transaction-meta.mjs.map +1 -1
- package/packages/transact/src/transactions/transaction.d.ts +5 -2
- package/packages/transact/src/transactions/transaction.js +5 -4
- package/packages/transact/src/transactions/transaction.js.map +1 -1
- package/packages/transact/src/transactions/transaction.mjs +5 -4
- package/packages/transact/src/transactions/transaction.mjs.map +1 -1
- package/testing/account.js +1 -2
- package/testing/account.js.map +1 -1
- package/testing/account.mjs +1 -2
- package/testing/account.mjs.map +1 -1
- package/testing/fixtures/algorand-fixture.d.ts +3 -3
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/testing/transaction-logger.js +1 -1
- package/testing/transaction-logger.mjs +1 -1
- package/transact/index.d.ts +11 -10
- package/transact/index.js +7 -31
- package/transact/index.mjs +7 -10
- package/transaction/transaction.js +2 -2
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +2 -2
- package/transaction/transaction.mjs.map +1 -1
- package/transactions/app-call.d.ts +5 -4
- package/transactions/app-call.js +16 -16
- package/transactions/app-call.js.map +1 -1
- package/transactions/app-call.mjs +16 -16
- package/transactions/app-call.mjs.map +1 -1
- package/transactions/asset-config.d.ts +1 -1
- package/transactions/asset-config.js +1 -1
- package/transactions/asset-config.js.map +1 -1
- package/transactions/asset-config.mjs +1 -1
- package/transactions/asset-config.mjs.map +1 -1
- package/transactions/key-registration.d.ts +1 -1
- package/transactions/key-registration.js.map +1 -1
- package/transactions/key-registration.mjs.map +1 -1
- package/transactions/method-call.d.ts +1 -1
- package/transactions/method-call.js +77 -84
- package/transactions/method-call.js.map +1 -1
- package/transactions/method-call.mjs +77 -84
- package/transactions/method-call.mjs.map +1 -1
- package/types/account-manager.d.ts +7 -9
- package/types/account-manager.js +17 -7
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +17 -7
- package/types/account-manager.mjs.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +53 -39
- package/types/algorand-client-transaction-creator.js +8 -0
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +8 -0
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +58 -44
- package/types/algorand-client-transaction-sender.js +8 -1
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +8 -0
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/amount.js +23 -4
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +20 -2
- package/types/amount.mjs.map +1 -1
- package/types/app-client.d.ts +111 -106
- package/types/app-client.js +2 -3
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +2 -2
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +1 -1
- package/types/app-deployer.js +3 -3
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +3 -3
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +44 -41
- package/types/app-factory.js +2 -2
- package/types/app-factory.js.map +1 -1
- package/types/app-factory.mjs +2 -2
- package/types/app-factory.mjs.map +1 -1
- package/types/app-manager.d.ts +3 -1
- package/types/app-manager.js +17 -11
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +17 -11
- package/types/app-manager.mjs.map +1 -1
- package/types/app-spec.js +12 -5
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +12 -5
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +2 -2
- package/types/app.js.map +1 -1
- package/types/app.mjs.map +1 -1
- package/types/asset-manager.js +1 -1
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +1 -1
- package/types/asset-manager.mjs.map +1 -1
- package/types/async-event-emitter.d.ts +3 -6
- package/types/async-event-emitter.js.map +1 -1
- package/types/async-event-emitter.mjs.map +1 -1
- package/types/client-manager.d.ts +1 -1
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +11 -3
- package/types/composer.js +55 -46
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +46 -36
- package/types/composer.mjs.map +1 -1
- package/types/debugging.d.ts +13 -9
- package/types/debugging.js.map +1 -1
- package/types/debugging.mjs.map +1 -1
- package/types/expand.d.ts +2 -9
- package/types/kmd-account-manager.d.ts +1 -0
- package/types/kmd-account-manager.js +22 -11
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +23 -12
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/lifecycle-events.d.ts +0 -1
- package/types/lifecycle-events.js.map +1 -1
- package/types/lifecycle-events.mjs.map +1 -1
- package/types/testing.d.ts +4 -4
- package/types/transaction.d.ts +1 -1
- package/_virtual/rolldown_runtime.mjs +0 -13
- package/indexer-lookup.js.map +0 -1
- package/indexer-lookup.mjs.map +0 -1
- package/packages/algod_client/src/core/model-runtime.d.ts +0 -10
- package/packages/algod_client/src/models/application-local-reference.d.ts +0 -20
- package/packages/algod_client/src/models/application-local-reference.js +0 -23
- package/packages/algod_client/src/models/application-local-reference.js.map +0 -1
- package/packages/algod_client/src/models/application-local-reference.mjs +0 -23
- package/packages/algod_client/src/models/application-local-reference.mjs.map +0 -1
- package/packages/algod_client/src/models/asset-holding-reference.d.ts +0 -20
- package/packages/algod_client/src/models/asset-holding-reference.js +0 -23
- package/packages/algod_client/src/models/asset-holding-reference.js.map +0 -1
- package/packages/algod_client/src/models/asset-holding-reference.mjs +0 -23
- package/packages/algod_client/src/models/asset-holding-reference.mjs.map +0 -1
- package/packages/algod_client/src/models/box-reference.d.ts +0 -17
- package/packages/algod_client/src/models/box-reference.js +0 -23
- package/packages/algod_client/src/models/box-reference.js.map +0 -1
- package/packages/algod_client/src/models/box-reference.mjs +0 -23
- package/packages/algod_client/src/models/box-reference.mjs.map +0 -1
- package/packages/indexer_client/src/core/model-runtime.d.ts +0 -10
- package/packages/kmd_client/src/core/model-runtime.d.ts +0 -10
- package/packages/sdk/src/convert.d.ts +0 -17
- package/packages/sdk/src/convert.js +0 -28
- package/packages/sdk/src/convert.js.map +0 -1
- package/packages/sdk/src/convert.mjs +0 -25
- package/packages/sdk/src/convert.mjs.map +0 -1
- package/packages/sdk/src/encoding/binarydata.d.ts +0 -34
- package/packages/sdk/src/encoding/binarydata.js +0 -65
- package/packages/sdk/src/encoding/binarydata.js.map +0 -1
- package/packages/sdk/src/encoding/binarydata.mjs +0 -60
- package/packages/sdk/src/encoding/binarydata.mjs.map +0 -1
- package/packages/sdk/src/encoding/encoding.d.ts +0 -237
- package/packages/sdk/src/encoding/encoding.js +0 -302
- package/packages/sdk/src/encoding/encoding.js.map +0 -1
- package/packages/sdk/src/encoding/encoding.mjs +0 -287
- package/packages/sdk/src/encoding/encoding.mjs.map +0 -1
- package/packages/sdk/src/encoding/schema/array.js +0 -35
- package/packages/sdk/src/encoding/schema/array.js.map +0 -1
- package/packages/sdk/src/encoding/schema/array.mjs +0 -35
- package/packages/sdk/src/encoding/schema/array.mjs.map +0 -1
- package/packages/sdk/src/encoding/schema/bytearray.js +0 -49
- package/packages/sdk/src/encoding/schema/bytearray.js.map +0 -1
- package/packages/sdk/src/encoding/schema/bytearray.mjs +0 -49
- package/packages/sdk/src/encoding/schema/bytearray.mjs.map +0 -1
- package/packages/sdk/src/encoding/schema/map.d.ts +0 -58
- package/packages/sdk/src/encoding/schema/map.js +0 -110
- package/packages/sdk/src/encoding/schema/map.js.map +0 -1
- package/packages/sdk/src/encoding/schema/map.mjs +0 -107
- package/packages/sdk/src/encoding/schema/map.mjs.map +0 -1
- package/packages/sdk/src/encoding/schema/optional.js +0 -46
- package/packages/sdk/src/encoding/schema/optional.js.map +0 -1
- package/packages/sdk/src/encoding/schema/optional.mjs +0 -46
- package/packages/sdk/src/encoding/schema/optional.mjs.map +0 -1
- package/packages/sdk/src/encoding/schema/uint64.js +0 -30
- package/packages/sdk/src/encoding/schema/uint64.js.map +0 -1
- package/packages/sdk/src/encoding/schema/uint64.mjs +0 -30
- package/packages/sdk/src/encoding/schema/uint64.mjs.map +0 -1
- package/packages/sdk/src/encoding/uint64.d.ts +0 -34
- package/packages/sdk/src/encoding/uint64.js +0 -34
- package/packages/sdk/src/encoding/uint64.js.map +0 -1
- package/packages/sdk/src/encoding/uint64.mjs +0 -33
- package/packages/sdk/src/encoding/uint64.mjs.map +0 -1
- package/packages/sdk/src/index.d.ts +0 -44
- package/packages/sdk/src/index.js +0 -62
- package/packages/sdk/src/index.js.map +0 -1
- package/packages/sdk/src/index.mjs +0 -58
- package/packages/sdk/src/index.mjs.map +0 -1
- package/packages/sdk/src/nacl/naclWrappers.js +0 -14
- package/packages/sdk/src/nacl/naclWrappers.js.map +0 -1
- package/packages/sdk/src/nacl/naclWrappers.mjs +0 -11
- package/packages/sdk/src/nacl/naclWrappers.mjs.map +0 -1
- package/packages/sdk/src/types/intDecoding.d.ts +0 -28
- package/packages/sdk/src/types/intDecoding.js +0 -32
- package/packages/sdk/src/types/intDecoding.js.map +0 -1
- package/packages/sdk/src/types/intDecoding.mjs +0 -31
- package/packages/sdk/src/types/intDecoding.mjs.map +0 -1
- package/packages/sdk/src/types/transactions/encoded.d.ts +0 -40
- package/packages/sdk/src/types/transactions/encoded.js +0 -64
- package/packages/sdk/src/types/transactions/encoded.js.map +0 -1
- package/packages/sdk/src/types/transactions/encoded.mjs +0 -59
- package/packages/sdk/src/types/transactions/encoded.mjs.map +0 -1
- package/packages/sdk/src/utils/utils.d.ts +0 -64
- package/packages/sdk/src/utils/utils.js +0 -140
- package/packages/sdk/src/utils/utils.js.map +0 -1
- package/packages/sdk/src/utils/utils.mjs +0 -128
- package/packages/sdk/src/utils/utils.mjs.map +0 -1
- package/packages/transact/src/transactions/common.d.ts +0 -37
- package/sdk/index.d.ts +0 -10
- package/sdk/index.js +0 -59
- package/sdk/index.mjs +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-meta.js","names":["Codec","TransactionType","normalizeWireString","transactionType: TransactionType","ObjectModelCodec","result: Record<string, unknown>","bigIntCodec","accessList: WireAccessReference[]","addressCodec","Address","numberCodec","bytesCodec","result: AccessReference[]","normalizeWireObject","appId: bigint","PaymentTransactionFieldsMeta: ObjectModelMetadata<PaymentTransactionFields>","AssetTransferTransactionFieldsMeta: ObjectModelMetadata<AssetTransferTransactionFields>","AssetFreezeTransactionFieldsMeta: ObjectModelMetadata<AssetFreezeTransactionFields>","booleanCodec","KeyRegistrationTransactionFieldsMeta: ObjectModelMetadata<KeyRegistrationTransactionFields>","fixedBytes32Codec","fixedBytes64Codec","AssetParamsMeta: ObjectModelMetadata<Omit<AssetConfigTransactionFields, 'assetId'>>","stringCodec","StateSchemaMeta: ObjectModelMetadata<StateSchema>","AppCallTransactionFieldsMeta: ObjectModelMetadata<AppCallTransactionFields>","bytesArrayCodec","addressArrayCodec","bigIntArrayCodec","MerkleArrayProofMeta: ObjectModelMetadata<MerkleArrayProof>","FalconVerifierMeta: ObjectModelMetadata<FalconVerifier>","fixedBytes1793Codec","SigslotCommitMeta: ObjectModelMetadata<SigslotCommit>","ParticipantMeta: ObjectModelMetadata<Participant>","RevealMeta: ObjectModelMetadata<Reveal>","StateProofMeta: ObjectModelMetadata<StateProof>","MapCodec","StateProofMessageMeta: ObjectModelMetadata<StateProofMessage>","StateProofTransactionFieldsMeta: ObjectModelMetadata<StateProofTransactionFields>","HeartbeatTransactionFieldsMeta: ObjectModelMetadata<HeartbeatTransactionFields>","TransactionParamsMeta: ObjectModelMetadata<TransactionParams>"],"sources":["../../../../../packages/transact/src/transactions/transaction-meta.ts"],"sourcesContent":["import type { EncodingFormat, ObjectModelMetadata, WireBigInt, WireObject, WireString } from '@algorandfoundation/algokit-common'\nimport {\n Address,\n Codec,\n MapCodec,\n ObjectModelCodec,\n addressArrayCodec,\n addressCodec,\n bigIntArrayCodec,\n bigIntCodec,\n booleanCodec,\n bytesArrayCodec,\n bytesCodec,\n fixedBytes1793Codec,\n fixedBytes32Codec,\n fixedBytes64Codec,\n normalizeWireObject,\n normalizeWireString,\n numberCodec,\n stringCodec,\n} from '@algorandfoundation/algokit-common'\nimport { AccessReference, AppCallTransactionFields, BoxReference, StateSchema } from './app-call'\nimport { AssetConfigTransactionFields } from './asset-config'\nimport { AssetFreezeTransactionFields } from './asset-freeze'\nimport { AssetTransferTransactionFields } from './asset-transfer'\nimport { HeartbeatProof, HeartbeatTransactionFields } from './heartbeat'\nimport { KeyRegistrationTransactionFields } from './key-registration'\nimport { PaymentTransactionFields } from './payment'\nimport {\n FalconSignatureStruct,\n FalconVerifier,\n HashFactory,\n MerkleArrayProof,\n MerkleSignatureVerifier,\n Participant,\n Reveal,\n SigslotCommit,\n StateProof,\n StateProofMessage,\n StateProofTransactionFields,\n} from './state-proof'\nimport type { TransactionParams } from './transaction'\nimport { TransactionType } from './transaction-type'\n\ntype WireBoxReference = {\n /** App index (0 or index into access list) */\n i?: number\n /** Box name */\n n?: WireString\n}\n\ntype WireAccessReference = {\n /** Account address */\n d?: WireString\n\n /** App index */\n p?: WireBigInt\n\n /** Asset index */\n s?: WireBigInt\n\n /** Box reference */\n b?: WireBoxReference\n\n /** Holding reference (1-based indices into access list) */\n h?: {\n /** Address index */\n d?: number\n /** Asset index (1-based index into access list) */\n s?: number\n }\n\n /** Local state reference (1-based indices into access list) */\n l?: {\n /** Address index */\n d?: number\n /** App index (0 means current app, or 1-based index into access list) */\n p?: number\n }\n}\n\nclass TransactionTypeCodec extends Codec<TransactionType, string, WireString> {\n public defaultValue(): TransactionType {\n // This ensure that we never omit the transaction type, as a transaction should never be created with this value\n return TransactionType.Unknown\n }\n\n protected toEncoded(value: TransactionType, _format: EncodingFormat): string {\n switch (value) {\n case TransactionType.Payment:\n return 'pay'\n case TransactionType.AssetTransfer:\n return 'axfer'\n case TransactionType.AssetFreeze:\n return 'afrz'\n case TransactionType.AssetConfig:\n return 'acfg'\n case TransactionType.KeyRegistration:\n return 'keyreg'\n case TransactionType.AppCall:\n return 'appl'\n case TransactionType.StateProof:\n return 'stpf'\n case TransactionType.Heartbeat:\n return 'hb'\n default:\n return 'unknown'\n }\n }\n\n protected fromEncoded(value: WireString, _format: EncodingFormat): TransactionType {\n // Convert Uint8Array to string if needed (msgpack may return transaction type as bytes)\n const typeString = normalizeWireString(value)\n\n switch (typeString) {\n case 'pay':\n return TransactionType.Payment\n case 'axfer':\n return TransactionType.AssetTransfer\n case 'afrz':\n return TransactionType.AssetFreeze\n case 'acfg':\n return TransactionType.AssetConfig\n case 'keyreg':\n return TransactionType.KeyRegistration\n case 'appl':\n return TransactionType.AppCall\n case 'stpf':\n return TransactionType.StateProof\n case 'hb':\n return TransactionType.Heartbeat\n default:\n return TransactionType.Unknown\n }\n }\n}\n\nclass TransactionDataCodec<\n T extends\n | PaymentTransactionFields\n | AssetTransferTransactionFields\n | AssetFreezeTransactionFields\n | KeyRegistrationTransactionFields\n | StateProofTransactionFields,\n> extends Codec<T | undefined, Record<string, unknown>> {\n private transactionDataCodec: ObjectModelCodec<T>\n\n constructor(\n private readonly transactionType: TransactionType,\n transactionTypeDataMetadata: ObjectModelMetadata<T>,\n ) {\n super()\n this.transactionDataCodec = new ObjectModelCodec<T>(transactionTypeDataMetadata)\n }\n\n public defaultValue(): T | undefined {\n return undefined\n }\n\n protected toEncoded(value: T | undefined, format: EncodingFormat): Record<string, unknown> {\n if (!value) {\n throw new Error('Transaction data is missing')\n }\n return this.transactionDataCodec.encode(value, format)\n }\n\n protected fromEncoded(value: Record<string, unknown>, format: EncodingFormat): T | undefined {\n if (value.type === undefined) {\n throw new Error('Transaction is missing type field')\n }\n const type = normalizeWireString(value.type as WireString)\n if (type === this.transactionType.toString()) {\n return this.transactionDataCodec.decode(value, format)\n }\n\n return undefined\n }\n}\n\nclass AssetConfigDataCodec extends Codec<AssetConfigTransactionFields | undefined, Record<string, unknown>> {\n private assetParamsCodec = new ObjectModelCodec<Omit<AssetConfigTransactionFields, 'assetId'>>(AssetParamsMeta)\n\n public defaultValue(): AssetConfigTransactionFields | undefined {\n return undefined\n }\n\n protected toEncoded(value: AssetConfigTransactionFields | undefined, format: EncodingFormat): Record<string, unknown> {\n const result: Record<string, unknown> = {}\n\n if (!value) {\n throw new Error('Transaction is not an asset config')\n }\n\n const { assetId, ...assetParams } = value\n\n const encodedAssetId = bigIntCodec.encodeOptional(assetId, format)\n if (encodedAssetId !== undefined) {\n result.caid = encodedAssetId\n }\n\n const encodedParams = this.assetParamsCodec.encodeOptional(assetParams, format)\n if (encodedParams && Object.keys(encodedParams).length > 0) {\n result.apar = encodedParams\n }\n\n return result\n }\n\n protected fromEncoded(value: Record<string, unknown>, format: EncodingFormat): AssetConfigTransactionFields | undefined {\n if (value.type === undefined) {\n throw new Error('Transaction is missing type field')\n }\n const type = normalizeWireString(value.type as WireString)\n const caid = value.caid as WireBigInt | undefined\n const apar = value.apar as WireObject | undefined\n\n if (type !== TransactionType.AssetConfig || (caid === undefined && !apar)) {\n return undefined\n }\n\n return {\n assetId: bigIntCodec.decode(caid, format),\n ...this.assetParamsCodec.decode(apar, format),\n } satisfies AssetConfigTransactionFields\n }\n\n public isDefaultValue(value: AssetConfigTransactionFields | undefined): boolean {\n return value === undefined\n }\n}\n\nclass AppCallDataCodec extends Codec<AppCallTransactionFields | undefined, Record<string, unknown>> {\n private appCallFieldsCodec = new ObjectModelCodec<Omit<AppCallTransactionFields, 'accessReferences' | 'boxReferences'>>(\n AppCallTransactionFieldsMeta,\n )\n\n public defaultValue(): AppCallTransactionFields | undefined {\n return undefined\n }\n\n private encodeAccessReferences(\n appId: bigint,\n accessReferences: AccessReference[] | undefined,\n format: EncodingFormat,\n ): WireAccessReference[] | undefined {\n if (!accessReferences || accessReferences.length === 0) return undefined\n\n const accessList: WireAccessReference[] = []\n\n // Helper to find or add a simple reference and return its 1-based index\n const ensure = (target: Pick<AccessReference, 'address' | 'assetId' | 'appId'>): number => {\n // Search for existing entry\n for (let idx = 0; idx < accessList.length; idx++) {\n const entry = accessList[idx]\n const matchesAddress =\n (!entry.d && !target.address) || (entry.d && target.address && addressCodec.decode(entry.d, format).equals(target.address))\n const matchesAssetId =\n (entry.s === undefined && target.assetId === undefined) ||\n (entry.s !== undefined && target.assetId !== undefined && bigIntCodec.decode(entry.s, format) === target.assetId)\n const matchesAppId =\n (entry.p === undefined && target.appId === undefined) ||\n (entry.p !== undefined && target.appId !== undefined && bigIntCodec.decode(entry.p, format) === target.appId)\n\n if (matchesAddress && matchesAssetId && matchesAppId) {\n return idx + 1 // Return 1-based index\n }\n }\n\n // Add new entries for each field\n if (target.address && !target.address.equals(Address.zeroAddress())) {\n accessList.push({ d: addressCodec.encodeOptional(target.address, format)! })\n }\n if (target.assetId !== undefined) {\n accessList.push({ s: bigIntCodec.encodeOptional(target.assetId, format)! })\n }\n if (target.appId !== undefined) {\n accessList.push({ p: bigIntCodec.encodeOptional(target.appId, format)! })\n }\n\n return accessList.length // Return 1-based index of last added\n }\n\n // Process each access reference\n for (const accessRef of accessReferences) {\n // Simple references (address, assetId, or appId)\n if (accessRef.address || accessRef.assetId !== undefined || accessRef.appId !== undefined) {\n ensure(accessRef)\n continue\n }\n\n // Holding reference\n if (accessRef.holding) {\n const holding = accessRef.holding\n let addressIndex = 0\n if (holding.address && !holding.address.equals(Address.zeroAddress())) {\n addressIndex = ensure({ address: holding.address })\n }\n const assetIndex = ensure({ assetId: holding.assetId })\n accessList.push({\n h: {\n d: numberCodec.encodeOptional(addressIndex, format),\n s: numberCodec.encodeOptional(assetIndex, format),\n },\n })\n continue\n }\n\n // Locals reference\n if (accessRef.locals) {\n const locals = accessRef.locals\n let addressIndex = 0\n if (locals.address && !locals.address.equals(Address.zeroAddress())) {\n addressIndex = ensure({ address: locals.address })\n }\n\n let appIndex = 0\n if (locals.appId && locals.appId !== appId) {\n appIndex = ensure({ appId: locals.appId })\n }\n if (addressIndex !== 0 || appIndex !== 0) {\n accessList.push({\n l: {\n d: numberCodec.encodeOptional(addressIndex, format),\n p: numberCodec.encodeOptional(appIndex, format),\n },\n })\n }\n continue\n }\n\n // Box reference\n if (accessRef.box) {\n const box = accessRef.box\n // Only add appId to access list if it's different from the calling app's ID\n // Use appIndex = 0 when box is for the current app\n let appIndex = 0\n if (box.appId && box.appId !== appId) {\n appIndex = ensure({ appId: box.appId })\n }\n accessList.push({\n b: {\n i: numberCodec.encodeOptional(appIndex, format),\n n: bytesCodec.encodeOptional(box.name, format),\n },\n })\n continue\n }\n }\n\n return accessList.length > 0 ? accessList : undefined\n }\n\n private decodeAccessReferences(_wireAccessReferences: WireAccessReference[] | undefined, format: EncodingFormat): AccessReference[] {\n if (!_wireAccessReferences || _wireAccessReferences.length === 0) return []\n\n const result: AccessReference[] = []\n\n // Process each entry in the access list\n\n const wireAccessReferences = _wireAccessReferences.map((ref) => normalizeWireObject(ref))\n for (const ref of wireAccessReferences) {\n const d = ref.d as WireString | undefined\n const s = ref.s as WireBigInt | undefined\n const p = ref.p as WireBigInt | undefined\n const _h = ref.h as WireObject | undefined\n const h = _h ? normalizeWireObject(_h) : undefined\n const _l = ref.l as WireObject | undefined\n const l = _l ? normalizeWireObject(_l) : undefined\n const _b = ref.b as WireObject | undefined\n const b = _b ? normalizeWireObject(_b) : undefined\n\n // Simple address reference\n if (d) {\n result.push({ address: addressCodec.decode(d, format) })\n continue\n }\n\n // Simple asset ID reference\n if (s !== undefined) {\n result.push({ assetId: bigIntCodec.decode(s, format) })\n continue\n }\n\n // Simple app ID reference\n if (p !== undefined) {\n result.push({ appId: bigIntCodec.decode(p, format) })\n continue\n }\n\n // Holding reference (h)\n if (h) {\n const addrIdx = (h.d ?? 0) as number\n const assetIdx = h.s as number | undefined\n\n if (assetIdx === undefined) {\n throw new Error('Access list holding reference is missing asset index')\n }\n\n const holdingAddress =\n addrIdx === 0 ? Address.zeroAddress() : addressCodec.decode(wireAccessReferences[addrIdx - 1].d! as WireString, format)\n const holdingAssetId = wireAccessReferences[assetIdx - 1].s! as WireBigInt\n\n result.push({\n holding: {\n assetId: bigIntCodec.decode(holdingAssetId, format),\n address: holdingAddress,\n },\n })\n continue\n }\n\n // Locals reference (l)\n if (l) {\n const addrIdx = (l.d ?? 0) as number\n const appIdx = (l.p ?? 0) as number\n\n const localsAddress =\n addrIdx === 0 ? Address.zeroAddress() : addressCodec.decode(wireAccessReferences[addrIdx - 1].d! as WireString, format)\n const localsAppId = appIdx === 0 ? 0n : (wireAccessReferences[appIdx - 1].p! as WireBigInt)\n\n result.push({\n locals: {\n appId: bigIntCodec.decode(localsAppId, format),\n address: localsAddress,\n },\n })\n continue\n }\n\n // Box reference (b)\n if (b) {\n const boxAppIdx = (b.i ?? 0) as number\n const name = b.n as WireString | undefined\n\n if (!name) {\n throw new Error('Access list box reference is missing name')\n }\n\n const boxAppId = boxAppIdx === 0 ? 0n : (wireAccessReferences[boxAppIdx - 1].p! as WireBigInt)\n\n result.push({\n box: {\n appId: bigIntCodec.decode(boxAppId, format),\n name: bytesCodec.decode(name, format),\n },\n })\n continue\n }\n }\n\n return result\n }\n\n private encodeBoxReferences(\n appId: bigint,\n appReferences: bigint[] | undefined,\n boxReferences: BoxReference[] | undefined,\n format: EncodingFormat,\n ): WireBoxReference[] | undefined {\n if (!boxReferences || boxReferences.length === 0) return undefined\n\n const appRefs = appReferences ?? []\n\n return boxReferences.map((box) => {\n const isCurrentApp = box.appId === 0n || box.appId === appId\n // Index 0 means current app, index > 0 references foreign apps array (1-indexed)\n const index = isCurrentApp ? 0 : appRefs.indexOf(box.appId) + 1\n\n if (index === 0 && !isCurrentApp) {\n throw new Error(`Box ref with appId ${box.appId} not in appReferences`)\n }\n\n return {\n i: numberCodec.encodeOptional(index, format), // This returns undefined when index is 0, which omits the field\n n: bytesCodec.encodeOptional(box.name, format),\n }\n })\n }\n\n private decodeBoxReferences(\n appReferences: bigint[] | undefined,\n wireBoxReferences: WireBoxReference[] | undefined,\n format: EncodingFormat,\n ): BoxReference[] {\n if (!wireBoxReferences || wireBoxReferences.length === 0) return []\n\n return wireBoxReferences.map((_box) => {\n const box = normalizeWireObject(_box)\n const boxIndex = box.i as number | undefined\n const boxName = box.n as WireString | undefined\n\n const index = boxIndex ?? 0\n\n let appId: bigint\n if (index === 0) {\n // 0 means current app\n appId = 0n\n } else {\n // 1-based index into foreignApps array\n const foreignAppId = appReferences?.[index - 1]\n if (foreignAppId === undefined) {\n throw new Error(`Failed to find the app reference at index ${index - 1}`)\n }\n appId = bigIntCodec.decode(foreignAppId, format)\n }\n\n return {\n appId,\n name: bytesCodec.decode(boxName, format),\n }\n })\n }\n\n protected toEncoded(value: AppCallTransactionFields | undefined, format: EncodingFormat): Record<string, unknown> {\n const result: Record<string, unknown> = {}\n\n if (!value) {\n throw new Error('Transaction is not an app call')\n }\n\n const encodedParams = this.appCallFieldsCodec.encodeOptional(value, format)\n if (encodedParams && Object.keys(encodedParams).length > 0) {\n Object.assign(result, encodedParams)\n }\n\n const wireBoxReferences = this.encodeBoxReferences(value.appId, value.appReferences, value.boxReferences, format)\n if (wireBoxReferences) {\n result.apbx = wireBoxReferences\n }\n\n const wireAccessReferences = this.encodeAccessReferences(value.appId, value.accessReferences, format)\n if (wireAccessReferences) {\n result.al = wireAccessReferences\n }\n\n return result\n }\n\n protected fromEncoded(value: Record<string, unknown>, format: EncodingFormat): AppCallTransactionFields | undefined {\n if (value.type === undefined) {\n throw new Error('Transaction is missing type field')\n }\n const type = normalizeWireString(value.type as WireString)\n if (type !== TransactionType.AppCall) {\n return undefined\n }\n\n const appReferences = value.apfa as WireBigInt[] | undefined\n const wireBoxReferences = value.apbx as WireBoxReference[] | undefined\n const wireAccessReferences = value.al as WireAccessReference[] | undefined\n const boxReferences = this.decodeBoxReferences(\n appReferences?.map((ar) => bigIntCodec.decode(ar, format)),\n wireBoxReferences,\n format,\n )\n const accessReferences = this.decodeAccessReferences(wireAccessReferences, format)\n\n return {\n ...this.appCallFieldsCodec.decode(value, format),\n ...(accessReferences.length > 0 && { accessReferences }),\n ...(boxReferences.length > 0 && { boxReferences }),\n } satisfies AppCallTransactionFields\n }\n\n public isDefaultValue(value: AppCallTransactionFields | undefined): boolean {\n return value === undefined\n }\n}\n\nconst PaymentTransactionFieldsMeta: ObjectModelMetadata<PaymentTransactionFields> = {\n name: 'PaymentTransactionFields',\n kind: 'object',\n fields: [\n { name: 'amount', wireKey: 'amt', optional: false, codec: bigIntCodec },\n { name: 'receiver', wireKey: 'rcv', optional: false, codec: addressCodec },\n { name: 'closeRemainderTo', wireKey: 'close', optional: true, codec: addressCodec },\n ],\n}\n\nconst AssetTransferTransactionFieldsMeta: ObjectModelMetadata<AssetTransferTransactionFields> = {\n name: 'AssetTransferTransactionFields',\n kind: 'object',\n fields: [\n { name: 'assetId', wireKey: 'xaid', optional: false, codec: bigIntCodec },\n { name: 'amount', wireKey: 'aamt', optional: false, codec: bigIntCodec },\n { name: 'receiver', wireKey: 'arcv', optional: false, codec: addressCodec },\n { name: 'assetSender', wireKey: 'asnd', optional: true, codec: addressCodec },\n { name: 'closeRemainderTo', wireKey: 'aclose', optional: true, codec: addressCodec },\n ],\n}\n\nconst AssetFreezeTransactionFieldsMeta: ObjectModelMetadata<AssetFreezeTransactionFields> = {\n name: 'AssetFreezeTransactionFields',\n kind: 'object',\n fields: [\n { name: 'assetId', wireKey: 'faid', optional: false, codec: bigIntCodec },\n { name: 'freezeTarget', wireKey: 'fadd', optional: false, codec: addressCodec },\n { name: 'frozen', wireKey: 'afrz', optional: false, codec: booleanCodec },\n ],\n}\n\nconst KeyRegistrationTransactionFieldsMeta: ObjectModelMetadata<KeyRegistrationTransactionFields> = {\n name: 'KeyRegistrationTransactionFields',\n kind: 'object',\n fields: [\n { name: 'voteKey', wireKey: 'votekey', optional: true, codec: fixedBytes32Codec },\n { name: 'selectionKey', wireKey: 'selkey', optional: true, codec: fixedBytes32Codec },\n { name: 'stateProofKey', wireKey: 'sprfkey', optional: true, codec: fixedBytes64Codec },\n { name: 'voteFirst', wireKey: 'votefst', optional: true, codec: bigIntCodec },\n { name: 'voteLast', wireKey: 'votelst', optional: true, codec: bigIntCodec },\n { name: 'voteKeyDilution', wireKey: 'votekd', optional: true, codec: bigIntCodec },\n { name: 'nonParticipation', wireKey: 'nonpart', optional: true, codec: booleanCodec },\n ],\n}\n\nconst AssetParamsMeta: ObjectModelMetadata<Omit<AssetConfigTransactionFields, 'assetId'>> = {\n name: 'AssetParams',\n kind: 'object',\n fields: [\n { name: 'total', wireKey: 't', optional: true, codec: bigIntCodec },\n { name: 'decimals', wireKey: 'dc', optional: true, codec: numberCodec },\n { name: 'defaultFrozen', wireKey: 'df', optional: true, codec: booleanCodec },\n { name: 'unitName', wireKey: 'un', optional: true, codec: stringCodec },\n { name: 'assetName', wireKey: 'an', optional: true, codec: stringCodec },\n { name: 'url', wireKey: 'au', optional: true, codec: stringCodec },\n { name: 'metadataHash', wireKey: 'am', optional: true, codec: fixedBytes32Codec },\n { name: 'manager', wireKey: 'm', optional: true, codec: addressCodec },\n { name: 'reserve', wireKey: 'r', optional: true, codec: addressCodec },\n { name: 'freeze', wireKey: 'f', optional: true, codec: addressCodec },\n { name: 'clawback', wireKey: 'c', optional: true, codec: addressCodec },\n ],\n}\n\nconst StateSchemaMeta: ObjectModelMetadata<StateSchema> = {\n name: 'StateSchema',\n kind: 'object',\n fields: [\n { name: 'numUints', wireKey: 'nui', optional: false, codec: numberCodec },\n { name: 'numByteSlices', wireKey: 'nbs', optional: false, codec: numberCodec },\n ],\n}\n\nconst AppCallTransactionFieldsMeta: ObjectModelMetadata<AppCallTransactionFields> = {\n name: 'AppCallTransactionFields',\n kind: 'object',\n fields: [\n { name: 'appId', wireKey: 'apid', optional: false, codec: bigIntCodec },\n { name: 'onComplete', wireKey: 'apan', optional: false, codec: numberCodec },\n { name: 'approvalProgram', wireKey: 'apap', optional: true, codec: bytesCodec },\n { name: 'clearStateProgram', wireKey: 'apsu', optional: true, codec: bytesCodec },\n {\n name: 'globalStateSchema',\n wireKey: 'apgs',\n optional: true,\n codec: new ObjectModelCodec(StateSchemaMeta),\n },\n {\n name: 'localStateSchema',\n wireKey: 'apls',\n optional: true,\n codec: new ObjectModelCodec(StateSchemaMeta),\n },\n { name: 'extraProgramPages', wireKey: 'apep', optional: true, codec: numberCodec },\n { name: 'args', wireKey: 'apaa', optional: true, codec: bytesArrayCodec },\n { name: 'accountReferences', wireKey: 'apat', optional: true, codec: addressArrayCodec },\n { name: 'appReferences', wireKey: 'apfa', optional: true, codec: bigIntArrayCodec },\n { name: 'assetReferences', wireKey: 'apas', optional: true, codec: bigIntArrayCodec },\n // boxReferences and accessReferences are handled by the parent codec, as they require more complex mappings\n ],\n}\n\nconst HashFactoryMeta: ObjectModelMetadata<HashFactory> = {\n name: 'HashFactory',\n kind: 'object',\n fields: [{ name: 'hashType', wireKey: 't', optional: false, codec: numberCodec }],\n}\n\nconst MerkleArrayProofMeta: ObjectModelMetadata<MerkleArrayProof> = {\n name: 'MerkleArrayProof',\n kind: 'object',\n fields: [\n { name: 'path', wireKey: 'pth', optional: false, codec: bytesArrayCodec },\n { name: 'hashFactory', wireKey: 'hsh', optional: false, codec: new ObjectModelCodec(HashFactoryMeta) },\n { name: 'treeDepth', wireKey: 'td', optional: false, codec: numberCodec },\n ],\n}\n\nconst FalconVerifierMeta: ObjectModelMetadata<FalconVerifier> = {\n name: 'FalconVerifier',\n kind: 'object',\n fields: [{ name: 'publicKey', wireKey: 'k', optional: false, codec: fixedBytes1793Codec }],\n}\n\nconst FalconSignatureStructMeta: ObjectModelMetadata<FalconSignatureStruct> = {\n name: 'FalconSignatureStruct',\n kind: 'object',\n fields: [\n { name: 'signature', wireKey: 'sig', optional: false, codec: bytesCodec },\n { name: 'vectorCommitmentIndex', wireKey: 'idx', optional: false, codec: bigIntCodec },\n { name: 'proof', wireKey: 'prf', optional: false, codec: new ObjectModelCodec(MerkleArrayProofMeta) },\n { name: 'verifyingKey', wireKey: 'vkey', optional: false, codec: new ObjectModelCodec(FalconVerifierMeta) },\n ],\n}\n\nconst SigslotCommitMeta: ObjectModelMetadata<SigslotCommit> = {\n name: 'SigslotCommit',\n kind: 'object',\n fields: [\n { name: 'sig', wireKey: 's', optional: false, codec: new ObjectModelCodec(FalconSignatureStructMeta) },\n { name: 'lowerSigWeight', wireKey: 'l', optional: false, codec: bigIntCodec },\n ],\n}\n\nconst MerkleSignatureVerifierMeta: ObjectModelMetadata<MerkleSignatureVerifier> = {\n name: 'MerkleSignatureVerifier',\n kind: 'object',\n fields: [\n { name: 'commitment', wireKey: 'cmt', optional: false, codec: fixedBytes64Codec },\n { name: 'keyLifetime', wireKey: 'lf', optional: false, codec: bigIntCodec },\n ],\n}\n\nconst ParticipantMeta: ObjectModelMetadata<Participant> = {\n name: 'Participant',\n kind: 'object',\n fields: [\n { name: 'verifier', wireKey: 'p', optional: false, codec: new ObjectModelCodec(MerkleSignatureVerifierMeta) },\n { name: 'weight', wireKey: 'w', optional: false, codec: bigIntCodec },\n ],\n}\n\nconst RevealMeta: ObjectModelMetadata<Reveal> = {\n name: 'Reveal',\n kind: 'object',\n fields: [\n { name: 'sigslot', wireKey: 's', optional: false, codec: new ObjectModelCodec(SigslotCommitMeta) },\n { name: 'participant', wireKey: 'p', optional: false, codec: new ObjectModelCodec(ParticipantMeta) },\n ],\n}\n\nconst StateProofMeta: ObjectModelMetadata<StateProof> = {\n name: 'StateProof',\n kind: 'object',\n fields: [\n { name: 'sigCommit', wireKey: 'c', optional: false, codec: bytesCodec },\n { name: 'signedWeight', wireKey: 'w', optional: false, codec: bigIntCodec },\n { name: 'sigProofs', wireKey: 'S', optional: false, codec: new ObjectModelCodec(MerkleArrayProofMeta) },\n { name: 'partProofs', wireKey: 'P', optional: false, codec: new ObjectModelCodec(MerkleArrayProofMeta) },\n { name: 'merkleSignatureSaltVersion', wireKey: 'v', optional: false, codec: numberCodec },\n {\n name: 'reveals',\n wireKey: 'r',\n optional: false,\n codec: new MapCodec(bigIntCodec, new ObjectModelCodec(RevealMeta)),\n },\n { name: 'positionsToReveal', wireKey: 'pr', optional: false, codec: bigIntArrayCodec },\n ],\n}\n\nconst StateProofMessageMeta: ObjectModelMetadata<StateProofMessage> = {\n name: 'StateProofMessage',\n kind: 'object',\n fields: [\n { name: 'blockHeadersCommitment', wireKey: 'b', optional: false, codec: bytesCodec },\n { name: 'votersCommitment', wireKey: 'v', optional: false, codec: bytesCodec },\n { name: 'lnProvenWeight', wireKey: 'P', optional: false, codec: bigIntCodec },\n { name: 'firstAttestedRound', wireKey: 'f', optional: false, codec: bigIntCodec },\n { name: 'lastAttestedRound', wireKey: 'l', optional: false, codec: bigIntCodec },\n ],\n}\n\nconst StateProofTransactionFieldsMeta: ObjectModelMetadata<StateProofTransactionFields> = {\n name: 'StateProofTransactionFields',\n kind: 'object',\n fields: [\n { name: 'stateProofType', wireKey: 'sptype', optional: false, codec: numberCodec },\n { name: 'stateProof', wireKey: 'sp', optional: true, codec: new ObjectModelCodec(StateProofMeta) },\n { name: 'message', wireKey: 'spmsg', optional: true, codec: new ObjectModelCodec(StateProofMessageMeta) },\n ],\n}\n\nconst HeartbeatProofMeta: ObjectModelMetadata<HeartbeatProof> = {\n name: 'HeartbeatProof',\n kind: 'object',\n fields: [\n { name: 'sig', wireKey: 's', optional: false, codec: fixedBytes64Codec },\n { name: 'pk', wireKey: 'p', optional: false, codec: fixedBytes32Codec },\n { name: 'pk2', wireKey: 'p2', optional: false, codec: fixedBytes32Codec },\n { name: 'pk1Sig', wireKey: 'p1s', optional: false, codec: fixedBytes64Codec },\n { name: 'pk2Sig', wireKey: 'p2s', optional: false, codec: fixedBytes64Codec },\n ],\n}\n\nconst HeartbeatTransactionFieldsMeta: ObjectModelMetadata<HeartbeatTransactionFields> = {\n name: 'HeartbeatTransactionFields',\n kind: 'object',\n fields: [\n { name: 'address', wireKey: 'a', optional: false, codec: addressCodec },\n { name: 'proof', wireKey: 'prf', optional: false, codec: new ObjectModelCodec(HeartbeatProofMeta) },\n { name: 'seed', wireKey: 'sd', optional: false, codec: bytesCodec },\n { name: 'voteId', wireKey: 'vid', optional: false, codec: fixedBytes32Codec },\n { name: 'keyDilution', wireKey: 'kd', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Metadata for TransactionParams\n */\nexport const TransactionParamsMeta: ObjectModelMetadata<TransactionParams> = {\n name: 'TransactionParams',\n kind: 'object',\n fields: [\n // Common transaction fields\n { name: 'type', wireKey: 'type', optional: false, codec: new TransactionTypeCodec() },\n { name: 'sender', wireKey: 'snd', optional: false, codec: addressCodec },\n { name: 'fee', wireKey: 'fee', optional: true, codec: bigIntCodec },\n { name: 'firstValid', wireKey: 'fv', optional: false, codec: bigIntCodec },\n { name: 'lastValid', wireKey: 'lv', optional: false, codec: bigIntCodec },\n { name: 'genesisHash', wireKey: 'gh', optional: true, codec: fixedBytes32Codec },\n { name: 'genesisId', wireKey: 'gen', optional: true, codec: stringCodec },\n { name: 'note', wireKey: 'note', optional: true, codec: bytesCodec },\n { name: 'rekeyTo', wireKey: 'rekey', optional: true, codec: addressCodec },\n { name: 'lease', wireKey: 'lx', optional: true, codec: fixedBytes32Codec },\n { name: 'group', wireKey: 'grp', optional: true, codec: fixedBytes32Codec },\n // Transaction type-specific fields (flattened)\n {\n name: 'payment',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.Payment, PaymentTransactionFieldsMeta),\n },\n {\n name: 'assetTransfer',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.AssetTransfer, AssetTransferTransactionFieldsMeta),\n },\n {\n name: 'assetFreeze',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.AssetFreeze, AssetFreezeTransactionFieldsMeta),\n },\n {\n name: 'keyRegistration',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.KeyRegistration, KeyRegistrationTransactionFieldsMeta),\n },\n {\n name: 'assetConfig',\n flattened: true,\n optional: true,\n codec: new AssetConfigDataCodec(),\n },\n {\n name: 'heartbeat',\n wireKey: 'hb',\n optional: true,\n // Heartbeat is not flattened and therefore does not need the type check for conditional decoding\n codec: new ObjectModelCodec(HeartbeatTransactionFieldsMeta),\n },\n {\n name: 'appCall',\n flattened: true,\n optional: true,\n codec: new AppCallDataCodec(),\n },\n {\n name: 'stateProof',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.StateProof, StateProofTransactionFieldsMeta),\n },\n ],\n}\n\nexport const transactionParamsCodec = new ObjectModelCodec<TransactionParams>(TransactionParamsMeta)\n"],"mappings":";;;;;;;;;;;;;;;;AAiFA,IAAM,uBAAN,cAAmCA,oBAA2C;CAC5E,AAAO,eAAgC;AAErC,SAAOC,yCAAgB;;CAGzB,AAAU,UAAU,OAAwB,SAAiC;AAC3E,UAAQ,OAAR;GACE,KAAKA,yCAAgB,QACnB,QAAO;GACT,KAAKA,yCAAgB,cACnB,QAAO;GACT,KAAKA,yCAAgB,YACnB,QAAO;GACT,KAAKA,yCAAgB,YACnB,QAAO;GACT,KAAKA,yCAAgB,gBACnB,QAAO;GACT,KAAKA,yCAAgB,QACnB,QAAO;GACT,KAAKA,yCAAgB,WACnB,QAAO;GACT,KAAKA,yCAAgB,UACnB,QAAO;GACT,QACE,QAAO;;;CAIb,AAAU,YAAY,OAAmB,SAA0C;AAIjF,UAFmBC,iCAAoB,MAAM,EAE7C;GACE,KAAK,MACH,QAAOD,yCAAgB;GACzB,KAAK,QACH,QAAOA,yCAAgB;GACzB,KAAK,OACH,QAAOA,yCAAgB;GACzB,KAAK,OACH,QAAOA,yCAAgB;GACzB,KAAK,SACH,QAAOA,yCAAgB;GACzB,KAAK,OACH,QAAOA,yCAAgB;GACzB,KAAK,OACH,QAAOA,yCAAgB;GACzB,KA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MAAa,yBAAyB,IAAIG,sCAAoC,sBAAsB"}
|
|
1
|
+
{"version":3,"file":"transaction-meta.js","names":["Codec","TransactionType","normalizeWireString","transactionType: TransactionType","ObjectModelCodec","result: Record<string, unknown>","bigIntCodec","accessList: WireResourceReference[]","addressCodec","Address","numberCodec","bytesCodec","result: ResourceReference[]","normalizeWireObject","appId: bigint","PaymentTransactionFieldsMeta: ObjectModelMetadata<PaymentTransactionFields>","AssetTransferTransactionFieldsMeta: ObjectModelMetadata<AssetTransferTransactionFields>","AssetFreezeTransactionFieldsMeta: ObjectModelMetadata<AssetFreezeTransactionFields>","booleanCodec","KeyRegistrationTransactionFieldsMeta: ObjectModelMetadata<KeyRegistrationTransactionFields>","fixedBytes32Codec","fixedBytes64Codec","AssetParamsMeta: ObjectModelMetadata<Omit<AssetConfigTransactionFields, 'assetId'>>","stringCodec","StateSchemaMeta: ObjectModelMetadata<StateSchema>","AppCallTransactionFieldsMeta: ObjectModelMetadata<AppCallTransactionFields>","bytesArrayCodec","addressArrayCodec","bigIntArrayCodec","MerkleArrayProofMeta: ObjectModelMetadata<MerkleArrayProof>","FalconVerifierMeta: ObjectModelMetadata<FalconVerifier>","fixedBytes1793Codec","SigslotCommitMeta: ObjectModelMetadata<SigslotCommit>","ParticipantMeta: ObjectModelMetadata<Participant>","RevealMeta: ObjectModelMetadata<Reveal>","StateProofMeta: ObjectModelMetadata<StateProof>","MapCodec","StateProofMessageMeta: ObjectModelMetadata<StateProofMessage>","StateProofTransactionFieldsMeta: ObjectModelMetadata<StateProofTransactionFields>","HeartbeatTransactionFieldsMeta: ObjectModelMetadata<HeartbeatTransactionFields>","TransactionParamsMeta: ObjectModelMetadata<TransactionParams>"],"sources":["../../../../../packages/transact/src/transactions/transaction-meta.ts"],"sourcesContent":["import type { EncodingFormat, ObjectModelMetadata, WireBigInt, WireObject, WireString } from '@algorandfoundation/algokit-common'\nimport {\n Address,\n Codec,\n MapCodec,\n ObjectModelCodec,\n addressArrayCodec,\n addressCodec,\n bigIntArrayCodec,\n bigIntCodec,\n booleanCodec,\n bytesArrayCodec,\n bytesCodec,\n fixedBytes1793Codec,\n fixedBytes32Codec,\n fixedBytes64Codec,\n normalizeWireObject,\n normalizeWireString,\n numberCodec,\n stringCodec,\n} from '@algorandfoundation/algokit-common'\nimport { AppCallTransactionFields, BoxReference, ResourceReference, StateSchema } from './app-call'\nimport { AssetConfigTransactionFields } from './asset-config'\nimport { AssetFreezeTransactionFields } from './asset-freeze'\nimport { AssetTransferTransactionFields } from './asset-transfer'\nimport { HeartbeatProof, HeartbeatTransactionFields } from './heartbeat'\nimport { KeyRegistrationTransactionFields } from './key-registration'\nimport { PaymentTransactionFields } from './payment'\nimport {\n FalconSignatureStruct,\n FalconVerifier,\n HashFactory,\n MerkleArrayProof,\n MerkleSignatureVerifier,\n Participant,\n Reveal,\n SigslotCommit,\n StateProof,\n StateProofMessage,\n StateProofTransactionFields,\n} from './state-proof'\nimport type { TransactionParams } from './transaction'\nimport { TransactionType } from './transaction-type'\n\ntype WireBoxReference = {\n /** App index (0 or index into access list) */\n i?: number\n /** Box name */\n n?: WireString\n}\n\ntype WireResourceReference = {\n /** Account address */\n d?: WireString\n\n /** App index */\n p?: WireBigInt\n\n /** Asset index */\n s?: WireBigInt\n\n /** Box reference */\n b?: WireBoxReference\n\n /** Holding reference (1-based indices into access list) */\n h?: {\n /** Address index */\n d?: number\n /** Asset index (1-based index into access list) */\n s?: number\n }\n\n /** Local state reference (1-based indices into access list) */\n l?: {\n /** Address index */\n d?: number\n /** App index (0 means current app, or 1-based index into access list) */\n p?: number\n }\n}\n\nclass TransactionTypeCodec extends Codec<TransactionType, string, WireString> {\n public defaultValue(): TransactionType {\n // This ensure that we never omit the transaction type, as a transaction should never be created with this value\n return TransactionType.Unknown\n }\n\n protected toEncoded(value: TransactionType, _format: EncodingFormat): string {\n switch (value) {\n case TransactionType.Payment:\n return 'pay'\n case TransactionType.AssetTransfer:\n return 'axfer'\n case TransactionType.AssetFreeze:\n return 'afrz'\n case TransactionType.AssetConfig:\n return 'acfg'\n case TransactionType.KeyRegistration:\n return 'keyreg'\n case TransactionType.AppCall:\n return 'appl'\n case TransactionType.StateProof:\n return 'stpf'\n case TransactionType.Heartbeat:\n return 'hb'\n default:\n return 'unknown'\n }\n }\n\n protected fromEncoded(value: WireString, _format: EncodingFormat): TransactionType {\n // Convert Uint8Array to string if needed (msgpack may return transaction type as bytes)\n const typeString = normalizeWireString(value)\n\n switch (typeString) {\n case 'pay':\n return TransactionType.Payment\n case 'axfer':\n return TransactionType.AssetTransfer\n case 'afrz':\n return TransactionType.AssetFreeze\n case 'acfg':\n return TransactionType.AssetConfig\n case 'keyreg':\n return TransactionType.KeyRegistration\n case 'appl':\n return TransactionType.AppCall\n case 'stpf':\n return TransactionType.StateProof\n case 'hb':\n return TransactionType.Heartbeat\n default:\n return TransactionType.Unknown\n }\n }\n}\n\nclass TransactionDataCodec<\n T extends\n | PaymentTransactionFields\n | AssetTransferTransactionFields\n | AssetFreezeTransactionFields\n | KeyRegistrationTransactionFields\n | StateProofTransactionFields,\n> extends Codec<T | undefined, Record<string, unknown>> {\n private transactionDataCodec: ObjectModelCodec<T>\n\n constructor(\n private readonly transactionType: TransactionType,\n transactionTypeDataMetadata: ObjectModelMetadata<T>,\n ) {\n super()\n this.transactionDataCodec = new ObjectModelCodec<T>(transactionTypeDataMetadata)\n }\n\n public defaultValue(): T | undefined {\n return undefined\n }\n\n protected toEncoded(value: T | undefined, format: EncodingFormat): Record<string, unknown> {\n if (!value) {\n throw new Error('Transaction data is missing')\n }\n return this.transactionDataCodec.encode(value, format)\n }\n\n protected fromEncoded(value: Record<string, unknown>, format: EncodingFormat): T | undefined {\n if (value.type === undefined) {\n throw new Error('Transaction is missing type field')\n }\n const type = normalizeWireString(value.type as WireString)\n if (type === this.transactionType.toString()) {\n return this.transactionDataCodec.decode(value, format)\n }\n\n return undefined\n }\n}\n\nclass AssetConfigDataCodec extends Codec<AssetConfigTransactionFields | undefined, Record<string, unknown>> {\n private assetParamsCodec = new ObjectModelCodec<Omit<AssetConfigTransactionFields, 'assetId'>>(AssetParamsMeta)\n\n public defaultValue(): AssetConfigTransactionFields | undefined {\n return undefined\n }\n\n protected toEncoded(value: AssetConfigTransactionFields | undefined, format: EncodingFormat): Record<string, unknown> {\n const result: Record<string, unknown> = {}\n\n if (!value) {\n throw new Error('Transaction is not an asset config')\n }\n\n const { assetId, ...assetParams } = value\n\n const encodedAssetId = bigIntCodec.encodeOptional(assetId, format)\n if (encodedAssetId !== undefined) {\n result.caid = encodedAssetId\n }\n\n const encodedParams = this.assetParamsCodec.encodeOptional(assetParams, format)\n if (encodedParams && Object.keys(encodedParams).length > 0) {\n result.apar = encodedParams\n }\n\n return result\n }\n\n protected fromEncoded(value: Record<string, unknown>, format: EncodingFormat): AssetConfigTransactionFields | undefined {\n if (value.type === undefined) {\n throw new Error('Transaction is missing type field')\n }\n const type = normalizeWireString(value.type as WireString)\n const caid = value.caid as WireBigInt | undefined\n const apar = value.apar as WireObject | undefined\n\n if (type !== TransactionType.AssetConfig || (caid === undefined && !apar)) {\n return undefined\n }\n\n return {\n assetId: bigIntCodec.decode(caid, format),\n ...this.assetParamsCodec.decode(apar, format),\n } satisfies AssetConfigTransactionFields\n }\n\n public isDefaultValue(value: AssetConfigTransactionFields | undefined): boolean {\n return value === undefined\n }\n}\n\nclass AppCallDataCodec extends Codec<AppCallTransactionFields | undefined, Record<string, unknown>> {\n private appCallFieldsCodec = new ObjectModelCodec<Omit<AppCallTransactionFields, 'accessReferences' | 'boxReferences'>>(\n AppCallTransactionFieldsMeta,\n )\n\n public defaultValue(): AppCallTransactionFields | undefined {\n return undefined\n }\n\n private encodeResourceReferences(\n appId: bigint,\n resourceReferences: ResourceReference[] | undefined,\n format: EncodingFormat,\n ): WireResourceReference[] | undefined {\n if (!resourceReferences || resourceReferences.length === 0) return undefined\n\n const accessList: WireResourceReference[] = []\n\n // Helper to find or add a simple reference and return its 1-based index\n const ensure = (target: Pick<ResourceReference, 'address' | 'assetId' | 'appId'>): number => {\n // Search for existing entry\n for (let idx = 0; idx < accessList.length; idx++) {\n const entry = accessList[idx]\n const matchesAddress =\n (!entry.d && !target.address) || (entry.d && target.address && addressCodec.decode(entry.d, format).equals(target.address))\n const matchesAssetId =\n (entry.s === undefined && target.assetId === undefined) ||\n (entry.s !== undefined && target.assetId !== undefined && bigIntCodec.decode(entry.s, format) === target.assetId)\n const matchesAppId =\n (entry.p === undefined && target.appId === undefined) ||\n (entry.p !== undefined && target.appId !== undefined && bigIntCodec.decode(entry.p, format) === target.appId)\n\n if (matchesAddress && matchesAssetId && matchesAppId) {\n return idx + 1 // Return 1-based index\n }\n }\n\n // Add new entries for each field\n if (target.address && !target.address.equals(Address.zeroAddress())) {\n accessList.push({ d: addressCodec.encodeOptional(target.address, format)! })\n }\n if (target.assetId !== undefined) {\n accessList.push({ s: bigIntCodec.encodeOptional(target.assetId, format)! })\n }\n if (target.appId !== undefined) {\n accessList.push({ p: bigIntCodec.encodeOptional(target.appId, format)! })\n }\n\n return accessList.length // Return 1-based index of last added\n }\n\n // Process each access reference\n for (const resourceRef of resourceReferences) {\n // Simple references (address, assetId, or appId)\n if (resourceRef.address || resourceRef.assetId !== undefined || resourceRef.appId !== undefined) {\n ensure(resourceRef)\n continue\n }\n\n // Holding reference\n if (resourceRef.holding) {\n const holding = resourceRef.holding\n let addressIndex = 0\n if (holding.address && !holding.address.equals(Address.zeroAddress())) {\n addressIndex = ensure({ address: holding.address })\n }\n const assetIndex = ensure({ assetId: holding.assetId })\n accessList.push({\n h: {\n d: numberCodec.encodeOptional(addressIndex, format),\n s: numberCodec.encodeOptional(assetIndex, format),\n },\n })\n continue\n }\n\n // Locals reference\n if (resourceRef.locals) {\n const locals = resourceRef.locals\n let addressIndex = 0\n if (locals.address && !locals.address.equals(Address.zeroAddress())) {\n addressIndex = ensure({ address: locals.address })\n }\n\n let appIndex = 0\n if (locals.appId && locals.appId !== appId) {\n appIndex = ensure({ appId: locals.appId })\n }\n if (addressIndex !== 0 || appIndex !== 0) {\n accessList.push({\n l: {\n d: numberCodec.encodeOptional(addressIndex, format),\n p: numberCodec.encodeOptional(appIndex, format),\n },\n })\n }\n continue\n }\n\n // Box reference\n if (resourceRef.box) {\n const box = resourceRef.box\n // Only add appId to access list if it's different from the calling app's ID\n // Use appIndex = 0 when box is for the current app\n let appIndex = 0\n if (box.appId && box.appId !== appId) {\n appIndex = ensure({ appId: box.appId })\n }\n accessList.push({\n b: {\n i: numberCodec.encodeOptional(appIndex, format),\n n: bytesCodec.encodeOptional(box.name, format),\n },\n })\n continue\n }\n }\n\n return accessList.length > 0 ? accessList : undefined\n }\n\n private decodeResourceReferences(\n _wireResourceReferences: WireResourceReference[] | undefined,\n format: EncodingFormat,\n ): ResourceReference[] {\n if (!_wireResourceReferences || _wireResourceReferences.length === 0) return []\n\n const result: ResourceReference[] = []\n\n // Process each entry in the access list\n\n const wireResourceReferences = _wireResourceReferences.map((ref) => normalizeWireObject(ref))\n for (const ref of wireResourceReferences) {\n const d = ref.d as WireString | undefined\n const s = ref.s as WireBigInt | undefined\n const p = ref.p as WireBigInt | undefined\n const _h = ref.h as WireObject | undefined\n const h = _h ? normalizeWireObject(_h) : undefined\n const _l = ref.l as WireObject | undefined\n const l = _l ? normalizeWireObject(_l) : undefined\n const _b = ref.b as WireObject | undefined\n const b = _b ? normalizeWireObject(_b) : undefined\n\n // Simple address reference\n if (d) {\n result.push({ address: addressCodec.decode(d, format) })\n continue\n }\n\n // Simple asset ID reference\n if (s !== undefined) {\n result.push({ assetId: bigIntCodec.decode(s, format) })\n continue\n }\n\n // Simple app ID reference\n if (p !== undefined) {\n result.push({ appId: bigIntCodec.decode(p, format) })\n continue\n }\n\n // Holding reference (h)\n if (h) {\n const addrIdx = (h.d ?? 0) as number\n const assetIdx = h.s as number | undefined\n\n if (assetIdx === undefined) {\n throw new Error('Access list holding reference is missing asset index')\n }\n\n const holdingAddress =\n addrIdx === 0 ? Address.zeroAddress() : addressCodec.decode(wireResourceReferences[addrIdx - 1].d! as WireString, format)\n const holdingAssetId = wireResourceReferences[assetIdx - 1].s! as WireBigInt\n\n result.push({\n holding: {\n assetId: bigIntCodec.decode(holdingAssetId, format),\n address: holdingAddress,\n },\n })\n continue\n }\n\n // Locals reference (l)\n if (l) {\n const addrIdx = (l.d ?? 0) as number\n const appIdx = (l.p ?? 0) as number\n\n const localsAddress =\n addrIdx === 0 ? Address.zeroAddress() : addressCodec.decode(wireResourceReferences[addrIdx - 1].d! as WireString, format)\n const localsAppId = appIdx === 0 ? 0n : (wireResourceReferences[appIdx - 1].p! as WireBigInt)\n\n result.push({\n locals: {\n appId: bigIntCodec.decode(localsAppId, format),\n address: localsAddress,\n },\n })\n continue\n }\n\n // Box reference (b)\n if (b) {\n const boxAppIdx = (b.i ?? 0) as number\n const name = b.n as WireString | undefined\n\n if (!name) {\n throw new Error('Access list box reference is missing name')\n }\n\n const boxAppId = boxAppIdx === 0 ? 0n : (wireResourceReferences[boxAppIdx - 1].p! as WireBigInt)\n\n result.push({\n box: {\n appId: bigIntCodec.decode(boxAppId, format),\n name: bytesCodec.decode(name, format),\n },\n })\n continue\n }\n }\n\n return result\n }\n\n private encodeBoxReferences(\n appId: bigint,\n appReferences: bigint[] | undefined,\n boxReferences: BoxReference[] | undefined,\n format: EncodingFormat,\n ): WireBoxReference[] | undefined {\n if (!boxReferences || boxReferences.length === 0) return undefined\n\n const appRefs = appReferences ?? []\n\n return boxReferences.map((box) => {\n const isCurrentApp = box.appId === 0n || box.appId === appId\n // Index 0 means current app, index > 0 references foreign apps array (1-indexed)\n const index = isCurrentApp ? 0 : appRefs.indexOf(box.appId) + 1\n\n if (index === 0 && !isCurrentApp) {\n throw new Error(`Box ref with appId ${box.appId} not in appReferences`)\n }\n\n return {\n i: numberCodec.encodeOptional(index, format), // This returns undefined when index is 0, which omits the field\n n: bytesCodec.encodeOptional(box.name, format),\n }\n })\n }\n\n private decodeBoxReferences(\n appReferences: bigint[] | undefined,\n wireBoxReferences: WireBoxReference[] | undefined,\n format: EncodingFormat,\n ): BoxReference[] {\n if (!wireBoxReferences || wireBoxReferences.length === 0) return []\n\n return wireBoxReferences.map((_box) => {\n const box = normalizeWireObject(_box)\n const boxIndex = box.i as number | undefined\n const boxName = box.n as WireString | undefined\n\n const index = boxIndex ?? 0\n\n let appId: bigint\n if (index === 0) {\n // 0 means current app\n appId = 0n\n } else {\n // 1-based index into foreignApps array\n const foreignAppId = appReferences?.[index - 1]\n if (foreignAppId === undefined) {\n throw new Error(`Failed to find the app reference at index ${index - 1}`)\n }\n appId = bigIntCodec.decode(foreignAppId, format)\n }\n\n return {\n appId,\n name: bytesCodec.decode(boxName, format),\n }\n })\n }\n\n protected toEncoded(value: AppCallTransactionFields | undefined, format: EncodingFormat): Record<string, unknown> {\n const result: Record<string, unknown> = {}\n\n if (!value) {\n throw new Error('Transaction is not an app call')\n }\n\n const encodedParams = this.appCallFieldsCodec.encodeOptional(value, format)\n if (encodedParams && Object.keys(encodedParams).length > 0) {\n Object.assign(result, encodedParams)\n }\n\n const wireBoxReferences = this.encodeBoxReferences(value.appId, value.appReferences, value.boxReferences, format)\n if (wireBoxReferences) {\n result.apbx = wireBoxReferences\n }\n\n const wireAccessReferences = this.encodeResourceReferences(value.appId, value.accessReferences, format)\n if (wireAccessReferences) {\n result.al = wireAccessReferences\n }\n\n return result\n }\n\n protected fromEncoded(value: Record<string, unknown>, format: EncodingFormat): AppCallTransactionFields | undefined {\n if (value.type === undefined) {\n throw new Error('Transaction is missing type field')\n }\n const type = normalizeWireString(value.type as WireString)\n if (type !== TransactionType.AppCall) {\n return undefined\n }\n\n const appReferences = value.apfa as WireBigInt[] | undefined\n const wireBoxReferences = value.apbx as WireBoxReference[] | undefined\n const wireAccessReferences = value.al as WireResourceReference[] | undefined\n const boxReferences = this.decodeBoxReferences(\n appReferences?.map((ar) => bigIntCodec.decode(ar, format)),\n wireBoxReferences,\n format,\n )\n const accessReferences = this.decodeResourceReferences(wireAccessReferences, format)\n\n return {\n ...this.appCallFieldsCodec.decode(value, format),\n ...(accessReferences.length > 0 && { accessReferences }),\n ...(boxReferences.length > 0 && { boxReferences }),\n } satisfies AppCallTransactionFields\n }\n\n public isDefaultValue(value: AppCallTransactionFields | undefined): boolean {\n return value === undefined\n }\n}\n\nconst PaymentTransactionFieldsMeta: ObjectModelMetadata<PaymentTransactionFields> = {\n name: 'PaymentTransactionFields',\n kind: 'object',\n fields: [\n { name: 'amount', wireKey: 'amt', optional: false, codec: bigIntCodec },\n { name: 'receiver', wireKey: 'rcv', optional: false, codec: addressCodec },\n { name: 'closeRemainderTo', wireKey: 'close', optional: true, codec: addressCodec },\n ],\n}\n\nconst AssetTransferTransactionFieldsMeta: ObjectModelMetadata<AssetTransferTransactionFields> = {\n name: 'AssetTransferTransactionFields',\n kind: 'object',\n fields: [\n { name: 'assetId', wireKey: 'xaid', optional: false, codec: bigIntCodec },\n { name: 'amount', wireKey: 'aamt', optional: false, codec: bigIntCodec },\n { name: 'receiver', wireKey: 'arcv', optional: false, codec: addressCodec },\n { name: 'assetSender', wireKey: 'asnd', optional: true, codec: addressCodec },\n { name: 'closeRemainderTo', wireKey: 'aclose', optional: true, codec: addressCodec },\n ],\n}\n\nconst AssetFreezeTransactionFieldsMeta: ObjectModelMetadata<AssetFreezeTransactionFields> = {\n name: 'AssetFreezeTransactionFields',\n kind: 'object',\n fields: [\n { name: 'assetId', wireKey: 'faid', optional: false, codec: bigIntCodec },\n { name: 'freezeTarget', wireKey: 'fadd', optional: false, codec: addressCodec },\n { name: 'frozen', wireKey: 'afrz', optional: false, codec: booleanCodec },\n ],\n}\n\nconst KeyRegistrationTransactionFieldsMeta: ObjectModelMetadata<KeyRegistrationTransactionFields> = {\n name: 'KeyRegistrationTransactionFields',\n kind: 'object',\n fields: [\n { name: 'voteKey', wireKey: 'votekey', optional: true, codec: fixedBytes32Codec },\n { name: 'selectionKey', wireKey: 'selkey', optional: true, codec: fixedBytes32Codec },\n { name: 'stateProofKey', wireKey: 'sprfkey', optional: true, codec: fixedBytes64Codec },\n { name: 'voteFirst', wireKey: 'votefst', optional: true, codec: bigIntCodec },\n { name: 'voteLast', wireKey: 'votelst', optional: true, codec: bigIntCodec },\n { name: 'voteKeyDilution', wireKey: 'votekd', optional: true, codec: bigIntCodec },\n { name: 'nonParticipation', wireKey: 'nonpart', optional: true, codec: booleanCodec },\n ],\n}\n\nconst AssetParamsMeta: ObjectModelMetadata<Omit<AssetConfigTransactionFields, 'assetId'>> = {\n name: 'AssetParams',\n kind: 'object',\n fields: [\n { name: 'total', wireKey: 't', optional: true, codec: bigIntCodec },\n { name: 'decimals', wireKey: 'dc', optional: true, codec: numberCodec },\n { name: 'defaultFrozen', wireKey: 'df', optional: true, codec: booleanCodec },\n { name: 'unitName', wireKey: 'un', optional: true, codec: stringCodec },\n { name: 'assetName', wireKey: 'an', optional: true, codec: stringCodec },\n { name: 'url', wireKey: 'au', optional: true, codec: stringCodec },\n { name: 'metadataHash', wireKey: 'am', optional: true, codec: fixedBytes32Codec },\n { name: 'manager', wireKey: 'm', optional: true, codec: addressCodec },\n { name: 'reserve', wireKey: 'r', optional: true, codec: addressCodec },\n { name: 'freeze', wireKey: 'f', optional: true, codec: addressCodec },\n { name: 'clawback', wireKey: 'c', optional: true, codec: addressCodec },\n ],\n}\n\nconst StateSchemaMeta: ObjectModelMetadata<StateSchema> = {\n name: 'StateSchema',\n kind: 'object',\n fields: [\n { name: 'numUints', wireKey: 'nui', optional: false, codec: numberCodec },\n { name: 'numByteSlices', wireKey: 'nbs', optional: false, codec: numberCodec },\n ],\n}\n\nconst AppCallTransactionFieldsMeta: ObjectModelMetadata<AppCallTransactionFields> = {\n name: 'AppCallTransactionFields',\n kind: 'object',\n fields: [\n { name: 'appId', wireKey: 'apid', optional: false, codec: bigIntCodec },\n { name: 'onComplete', wireKey: 'apan', optional: false, codec: numberCodec },\n { name: 'approvalProgram', wireKey: 'apap', optional: true, codec: bytesCodec },\n { name: 'clearStateProgram', wireKey: 'apsu', optional: true, codec: bytesCodec },\n {\n name: 'globalStateSchema',\n wireKey: 'apgs',\n optional: true,\n codec: new ObjectModelCodec(StateSchemaMeta),\n },\n {\n name: 'localStateSchema',\n wireKey: 'apls',\n optional: true,\n codec: new ObjectModelCodec(StateSchemaMeta),\n },\n { name: 'extraProgramPages', wireKey: 'apep', optional: true, codec: numberCodec },\n { name: 'args', wireKey: 'apaa', optional: true, codec: bytesArrayCodec },\n { name: 'accountReferences', wireKey: 'apat', optional: true, codec: addressArrayCodec },\n { name: 'appReferences', wireKey: 'apfa', optional: true, codec: bigIntArrayCodec },\n { name: 'assetReferences', wireKey: 'apas', optional: true, codec: bigIntArrayCodec },\n { name: 'rejectVersion', wireKey: 'aprv', optional: true, codec: numberCodec },\n // boxReferences and accessReferences are handled by the parent codec, as they require more complex mappings\n ],\n}\n\nconst HashFactoryMeta: ObjectModelMetadata<HashFactory> = {\n name: 'HashFactory',\n kind: 'object',\n fields: [{ name: 'hashType', wireKey: 't', optional: false, codec: numberCodec }],\n}\n\nconst MerkleArrayProofMeta: ObjectModelMetadata<MerkleArrayProof> = {\n name: 'MerkleArrayProof',\n kind: 'object',\n fields: [\n { name: 'path', wireKey: 'pth', optional: false, codec: bytesArrayCodec },\n { name: 'hashFactory', wireKey: 'hsh', optional: false, codec: new ObjectModelCodec(HashFactoryMeta) },\n { name: 'treeDepth', wireKey: 'td', optional: false, codec: numberCodec },\n ],\n}\n\nconst FalconVerifierMeta: ObjectModelMetadata<FalconVerifier> = {\n name: 'FalconVerifier',\n kind: 'object',\n fields: [{ name: 'publicKey', wireKey: 'k', optional: false, codec: fixedBytes1793Codec }],\n}\n\nconst FalconSignatureStructMeta: ObjectModelMetadata<FalconSignatureStruct> = {\n name: 'FalconSignatureStruct',\n kind: 'object',\n fields: [\n { name: 'signature', wireKey: 'sig', optional: false, codec: bytesCodec },\n { name: 'vectorCommitmentIndex', wireKey: 'idx', optional: false, codec: bigIntCodec },\n { name: 'proof', wireKey: 'prf', optional: false, codec: new ObjectModelCodec(MerkleArrayProofMeta) },\n { name: 'verifyingKey', wireKey: 'vkey', optional: false, codec: new ObjectModelCodec(FalconVerifierMeta) },\n ],\n}\n\nconst SigslotCommitMeta: ObjectModelMetadata<SigslotCommit> = {\n name: 'SigslotCommit',\n kind: 'object',\n fields: [\n { name: 'sig', wireKey: 's', optional: false, codec: new ObjectModelCodec(FalconSignatureStructMeta) },\n { name: 'lowerSigWeight', wireKey: 'l', optional: false, codec: bigIntCodec },\n ],\n}\n\nconst MerkleSignatureVerifierMeta: ObjectModelMetadata<MerkleSignatureVerifier> = {\n name: 'MerkleSignatureVerifier',\n kind: 'object',\n fields: [\n { name: 'commitment', wireKey: 'cmt', optional: false, codec: fixedBytes64Codec },\n { name: 'keyLifetime', wireKey: 'lf', optional: false, codec: bigIntCodec },\n ],\n}\n\nconst ParticipantMeta: ObjectModelMetadata<Participant> = {\n name: 'Participant',\n kind: 'object',\n fields: [\n { name: 'verifier', wireKey: 'p', optional: false, codec: new ObjectModelCodec(MerkleSignatureVerifierMeta) },\n { name: 'weight', wireKey: 'w', optional: false, codec: bigIntCodec },\n ],\n}\n\nconst RevealMeta: ObjectModelMetadata<Reveal> = {\n name: 'Reveal',\n kind: 'object',\n fields: [\n { name: 'sigslot', wireKey: 's', optional: false, codec: new ObjectModelCodec(SigslotCommitMeta) },\n { name: 'participant', wireKey: 'p', optional: false, codec: new ObjectModelCodec(ParticipantMeta) },\n ],\n}\n\nconst StateProofMeta: ObjectModelMetadata<StateProof> = {\n name: 'StateProof',\n kind: 'object',\n fields: [\n { name: 'sigCommit', wireKey: 'c', optional: false, codec: bytesCodec },\n { name: 'signedWeight', wireKey: 'w', optional: false, codec: bigIntCodec },\n { name: 'sigProofs', wireKey: 'S', optional: false, codec: new ObjectModelCodec(MerkleArrayProofMeta) },\n { name: 'partProofs', wireKey: 'P', optional: false, codec: new ObjectModelCodec(MerkleArrayProofMeta) },\n { name: 'merkleSignatureSaltVersion', wireKey: 'v', optional: false, codec: numberCodec },\n {\n name: 'reveals',\n wireKey: 'r',\n optional: false,\n codec: new MapCodec(bigIntCodec, new ObjectModelCodec(RevealMeta)),\n },\n { name: 'positionsToReveal', wireKey: 'pr', optional: false, codec: bigIntArrayCodec },\n ],\n}\n\nconst StateProofMessageMeta: ObjectModelMetadata<StateProofMessage> = {\n name: 'StateProofMessage',\n kind: 'object',\n fields: [\n { name: 'blockHeadersCommitment', wireKey: 'b', optional: false, codec: bytesCodec },\n { name: 'votersCommitment', wireKey: 'v', optional: false, codec: bytesCodec },\n { name: 'lnProvenWeight', wireKey: 'P', optional: false, codec: bigIntCodec },\n { name: 'firstAttestedRound', wireKey: 'f', optional: false, codec: bigIntCodec },\n { name: 'lastAttestedRound', wireKey: 'l', optional: false, codec: bigIntCodec },\n ],\n}\n\nconst StateProofTransactionFieldsMeta: ObjectModelMetadata<StateProofTransactionFields> = {\n name: 'StateProofTransactionFields',\n kind: 'object',\n fields: [\n { name: 'stateProofType', wireKey: 'sptype', optional: false, codec: numberCodec },\n { name: 'stateProof', wireKey: 'sp', optional: true, codec: new ObjectModelCodec(StateProofMeta) },\n { name: 'message', wireKey: 'spmsg', optional: true, codec: new ObjectModelCodec(StateProofMessageMeta) },\n ],\n}\n\nconst HeartbeatProofMeta: ObjectModelMetadata<HeartbeatProof> = {\n name: 'HeartbeatProof',\n kind: 'object',\n fields: [\n { name: 'sig', wireKey: 's', optional: false, codec: fixedBytes64Codec },\n { name: 'pk', wireKey: 'p', optional: false, codec: fixedBytes32Codec },\n { name: 'pk2', wireKey: 'p2', optional: false, codec: fixedBytes32Codec },\n { name: 'pk1Sig', wireKey: 'p1s', optional: false, codec: fixedBytes64Codec },\n { name: 'pk2Sig', wireKey: 'p2s', optional: false, codec: fixedBytes64Codec },\n ],\n}\n\nconst HeartbeatTransactionFieldsMeta: ObjectModelMetadata<HeartbeatTransactionFields> = {\n name: 'HeartbeatTransactionFields',\n kind: 'object',\n fields: [\n { name: 'address', wireKey: 'a', optional: false, codec: addressCodec },\n { name: 'proof', wireKey: 'prf', optional: false, codec: new ObjectModelCodec(HeartbeatProofMeta) },\n { name: 'seed', wireKey: 'sd', optional: false, codec: bytesCodec },\n { name: 'voteId', wireKey: 'vid', optional: false, codec: fixedBytes32Codec },\n { name: 'keyDilution', wireKey: 'kd', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Metadata for TransactionParams\n */\nexport const TransactionParamsMeta: ObjectModelMetadata<TransactionParams> = {\n name: 'TransactionParams',\n kind: 'object',\n fields: [\n // Common transaction fields\n { name: 'type', wireKey: 'type', optional: false, codec: new TransactionTypeCodec() },\n { name: 'sender', wireKey: 'snd', optional: false, codec: addressCodec },\n { name: 'fee', wireKey: 'fee', optional: true, codec: bigIntCodec },\n { name: 'firstValid', wireKey: 'fv', optional: false, codec: bigIntCodec },\n { name: 'lastValid', wireKey: 'lv', optional: false, codec: bigIntCodec },\n { name: 'genesisHash', wireKey: 'gh', optional: true, codec: fixedBytes32Codec },\n { name: 'genesisId', wireKey: 'gen', optional: true, codec: stringCodec },\n { name: 'note', wireKey: 'note', optional: true, codec: bytesCodec },\n { name: 'rekeyTo', wireKey: 'rekey', optional: true, codec: addressCodec },\n { name: 'lease', wireKey: 'lx', optional: true, codec: fixedBytes32Codec },\n { name: 'group', wireKey: 'grp', optional: true, codec: fixedBytes32Codec },\n // Transaction type-specific fields (flattened)\n {\n name: 'payment',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.Payment, PaymentTransactionFieldsMeta),\n },\n {\n name: 'assetTransfer',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.AssetTransfer, AssetTransferTransactionFieldsMeta),\n },\n {\n name: 'assetFreeze',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.AssetFreeze, AssetFreezeTransactionFieldsMeta),\n },\n {\n name: 'keyRegistration',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.KeyRegistration, KeyRegistrationTransactionFieldsMeta),\n },\n {\n name: 'assetConfig',\n flattened: true,\n optional: true,\n codec: new AssetConfigDataCodec(),\n },\n {\n name: 'heartbeat',\n wireKey: 'hb',\n optional: true,\n // Heartbeat is not flattened and therefore does not need the type check for conditional decoding\n codec: new ObjectModelCodec(HeartbeatTransactionFieldsMeta),\n },\n {\n name: 'appCall',\n flattened: true,\n optional: true,\n codec: new AppCallDataCodec(),\n },\n {\n name: 'stateProof',\n flattened: true,\n optional: true,\n codec: new TransactionDataCodec(TransactionType.StateProof, StateProofTransactionFieldsMeta),\n },\n ],\n}\n\nexport const transactionParamsCodec = new ObjectModelCodec<TransactionParams>(TransactionParamsMeta)\n"],"mappings":";;;;;;;;;;;;;;;;AAiFA,IAAM,uBAAN,cAAmCA,oBAA2C;CAC5E,AAAO,eAAgC;AAErC,SAAOC,yCAAgB;;CAGzB,AAAU,UAAU,OAAwB,SAAiC;AAC3E,UAAQ,OAAR;GACE,KAAKA,yCAAgB,QACnB,QAAO;GACT,KAAKA,yCAAgB,cACnB,QAAO;GACT,KAAKA,yCAAgB,YACnB,QAAO;GACT,KAAKA,yCAAgB,YACnB,QAAO;GACT,KAAKA,yCAAgB,gBACnB,QAAO;GACT,KAAKA,yCAAgB,QACnB,QAAO;GACT,KAAKA,yCAAgB,WACnB,QAAO;GACT,KAAKA,yCAAgB,UACnB,QAAO;GACT,QACE,QAAO;;;CAIb,AAAU,YAAY,OAAmB,SAA0C;AAIjF,UAFmBC,iCAAoB,MAAM,EAE7C;GACE,KAAK,MACH,QAAOD,yCAAgB;GACzB,KAAK,QACH,QAAOA,yCAAgB;GACzB,KAAK,OACH,QAAOA,yCAAgB;GACzB,KAAK,OACH,QAAOA,yCAAgB;GACzB,KAAK,SACH,QAAOA,yCAAgB;GACzB,KAAK,OACH,QAAOA,yCAAgB;GACzB,KAAK,OACH,QAAOA,yCAAgB;GACzB,KAAK,KACH,QAAOA,yCAAgB;GACzB,QACE,QAAOA,yCAAgB;;;;AAK/B,IAAM,uBAAN,cAOUD,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IAAIG,sCAAoC,sBAAsB"}
|
|
@@ -68,7 +68,7 @@ var AssetConfigDataCodec = class extends Codec {
|
|
|
68
68
|
toEncoded(value, format) {
|
|
69
69
|
const result = {};
|
|
70
70
|
if (!value) throw new Error("Transaction is not an asset config");
|
|
71
|
-
const { assetId
|
|
71
|
+
const { assetId, ...assetParams } = value;
|
|
72
72
|
const encodedAssetId = bigIntCodec.encodeOptional(assetId, format);
|
|
73
73
|
if (encodedAssetId !== void 0) result.caid = encodedAssetId;
|
|
74
74
|
const encodedParams = this.assetParamsCodec.encodeOptional(assetParams, format);
|
|
@@ -93,8 +93,8 @@ var AssetConfigDataCodec = class extends Codec {
|
|
|
93
93
|
var AppCallDataCodec = class extends Codec {
|
|
94
94
|
appCallFieldsCodec = new ObjectModelCodec(AppCallTransactionFieldsMeta);
|
|
95
95
|
defaultValue() {}
|
|
96
|
-
|
|
97
|
-
if (!
|
|
96
|
+
encodeResourceReferences(appId, resourceReferences, format) {
|
|
97
|
+
if (!resourceReferences || resourceReferences.length === 0) return void 0;
|
|
98
98
|
const accessList = [];
|
|
99
99
|
const ensure = (target) => {
|
|
100
100
|
for (let idx = 0; idx < accessList.length; idx++) {
|
|
@@ -109,13 +109,13 @@ var AppCallDataCodec = class extends Codec {
|
|
|
109
109
|
if (target.appId !== void 0) accessList.push({ p: bigIntCodec.encodeOptional(target.appId, format) });
|
|
110
110
|
return accessList.length;
|
|
111
111
|
};
|
|
112
|
-
for (const
|
|
113
|
-
if (
|
|
114
|
-
ensure(
|
|
112
|
+
for (const resourceRef of resourceReferences) {
|
|
113
|
+
if (resourceRef.address || resourceRef.assetId !== void 0 || resourceRef.appId !== void 0) {
|
|
114
|
+
ensure(resourceRef);
|
|
115
115
|
continue;
|
|
116
116
|
}
|
|
117
|
-
if (
|
|
118
|
-
const holding =
|
|
117
|
+
if (resourceRef.holding) {
|
|
118
|
+
const holding = resourceRef.holding;
|
|
119
119
|
let addressIndex = 0;
|
|
120
120
|
if (holding.address && !holding.address.equals(Address.zeroAddress())) addressIndex = ensure({ address: holding.address });
|
|
121
121
|
const assetIndex = ensure({ assetId: holding.assetId });
|
|
@@ -125,8 +125,8 @@ var AppCallDataCodec = class extends Codec {
|
|
|
125
125
|
} });
|
|
126
126
|
continue;
|
|
127
127
|
}
|
|
128
|
-
if (
|
|
129
|
-
const locals =
|
|
128
|
+
if (resourceRef.locals) {
|
|
129
|
+
const locals = resourceRef.locals;
|
|
130
130
|
let addressIndex = 0;
|
|
131
131
|
if (locals.address && !locals.address.equals(Address.zeroAddress())) addressIndex = ensure({ address: locals.address });
|
|
132
132
|
let appIndex = 0;
|
|
@@ -137,8 +137,8 @@ var AppCallDataCodec = class extends Codec {
|
|
|
137
137
|
} });
|
|
138
138
|
continue;
|
|
139
139
|
}
|
|
140
|
-
if (
|
|
141
|
-
const box =
|
|
140
|
+
if (resourceRef.box) {
|
|
141
|
+
const box = resourceRef.box;
|
|
142
142
|
let appIndex = 0;
|
|
143
143
|
if (box.appId && box.appId !== appId) appIndex = ensure({ appId: box.appId });
|
|
144
144
|
accessList.push({ b: {
|
|
@@ -150,11 +150,11 @@ var AppCallDataCodec = class extends Codec {
|
|
|
150
150
|
}
|
|
151
151
|
return accessList.length > 0 ? accessList : void 0;
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
if (!
|
|
153
|
+
decodeResourceReferences(_wireResourceReferences, format) {
|
|
154
|
+
if (!_wireResourceReferences || _wireResourceReferences.length === 0) return [];
|
|
155
155
|
const result = [];
|
|
156
|
-
const
|
|
157
|
-
for (const ref of
|
|
156
|
+
const wireResourceReferences = _wireResourceReferences.map((ref) => normalizeWireObject(ref));
|
|
157
|
+
for (const ref of wireResourceReferences) {
|
|
158
158
|
const d = ref.d;
|
|
159
159
|
const s = ref.s;
|
|
160
160
|
const p = ref.p;
|
|
@@ -180,8 +180,8 @@ var AppCallDataCodec = class extends Codec {
|
|
|
180
180
|
const addrIdx = h.d ?? 0;
|
|
181
181
|
const assetIdx = h.s;
|
|
182
182
|
if (assetIdx === void 0) throw new Error("Access list holding reference is missing asset index");
|
|
183
|
-
const holdingAddress = addrIdx === 0 ? Address.zeroAddress() : addressCodec.decode(
|
|
184
|
-
const holdingAssetId =
|
|
183
|
+
const holdingAddress = addrIdx === 0 ? Address.zeroAddress() : addressCodec.decode(wireResourceReferences[addrIdx - 1].d, format);
|
|
184
|
+
const holdingAssetId = wireResourceReferences[assetIdx - 1].s;
|
|
185
185
|
result.push({ holding: {
|
|
186
186
|
assetId: bigIntCodec.decode(holdingAssetId, format),
|
|
187
187
|
address: holdingAddress
|
|
@@ -191,8 +191,8 @@ var AppCallDataCodec = class extends Codec {
|
|
|
191
191
|
if (l) {
|
|
192
192
|
const addrIdx = l.d ?? 0;
|
|
193
193
|
const appIdx = l.p ?? 0;
|
|
194
|
-
const localsAddress = addrIdx === 0 ? Address.zeroAddress() : addressCodec.decode(
|
|
195
|
-
const localsAppId = appIdx === 0 ? 0n :
|
|
194
|
+
const localsAddress = addrIdx === 0 ? Address.zeroAddress() : addressCodec.decode(wireResourceReferences[addrIdx - 1].d, format);
|
|
195
|
+
const localsAppId = appIdx === 0 ? 0n : wireResourceReferences[appIdx - 1].p;
|
|
196
196
|
result.push({ locals: {
|
|
197
197
|
appId: bigIntCodec.decode(localsAppId, format),
|
|
198
198
|
address: localsAddress
|
|
@@ -203,7 +203,7 @@ var AppCallDataCodec = class extends Codec {
|
|
|
203
203
|
const boxAppIdx = b.i ?? 0;
|
|
204
204
|
const name = b.n;
|
|
205
205
|
if (!name) throw new Error("Access list box reference is missing name");
|
|
206
|
-
const boxAppId = boxAppIdx === 0 ? 0n :
|
|
206
|
+
const boxAppId = boxAppIdx === 0 ? 0n : wireResourceReferences[boxAppIdx - 1].p;
|
|
207
207
|
result.push({ box: {
|
|
208
208
|
appId: bigIntCodec.decode(boxAppId, format),
|
|
209
209
|
name: bytesCodec.decode(name, format)
|
|
@@ -253,7 +253,7 @@ var AppCallDataCodec = class extends Codec {
|
|
|
253
253
|
if (encodedParams && Object.keys(encodedParams).length > 0) Object.assign(result, encodedParams);
|
|
254
254
|
const wireBoxReferences = this.encodeBoxReferences(value.appId, value.appReferences, value.boxReferences, format);
|
|
255
255
|
if (wireBoxReferences) result.apbx = wireBoxReferences;
|
|
256
|
-
const wireAccessReferences = this.
|
|
256
|
+
const wireAccessReferences = this.encodeResourceReferences(value.appId, value.accessReferences, format);
|
|
257
257
|
if (wireAccessReferences) result.al = wireAccessReferences;
|
|
258
258
|
return result;
|
|
259
259
|
}
|
|
@@ -264,7 +264,7 @@ var AppCallDataCodec = class extends Codec {
|
|
|
264
264
|
const wireBoxReferences = value.apbx;
|
|
265
265
|
const wireAccessReferences = value.al;
|
|
266
266
|
const boxReferences = this.decodeBoxReferences(appReferences?.map((ar) => bigIntCodec.decode(ar, format)), wireBoxReferences, format);
|
|
267
|
-
const accessReferences = this.
|
|
267
|
+
const accessReferences = this.decodeResourceReferences(wireAccessReferences, format);
|
|
268
268
|
return {
|
|
269
269
|
...this.appCallFieldsCodec.decode(value, format),
|
|
270
270
|
...accessReferences.length > 0 && { accessReferences },
|
|
@@ -563,6 +563,12 @@ const AppCallTransactionFieldsMeta = {
|
|
|
563
563
|
wireKey: "apas",
|
|
564
564
|
optional: true,
|
|
565
565
|
codec: bigIntArrayCodec
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
name: "rejectVersion",
|
|
569
|
+
wireKey: "aprv",
|
|
570
|
+
optional: true,
|
|
571
|
+
codec: numberCodec
|
|
566
572
|
}
|
|
567
573
|
]
|
|
568
574
|
};
|