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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/_virtual/rolldown_runtime.js +20 -11
  2. package/_virtual/rolldown_runtime.mjs +10 -5
  3. package/algod-client/index.d.ts +2 -2
  4. package/package.json +1 -1
  5. package/packages/abi/src/abi-type.d.ts +1 -1
  6. package/packages/abi/src/abi-type.js +2 -1
  7. package/packages/abi/src/abi-type.js.map +1 -1
  8. package/packages/abi/src/abi-type.mjs +2 -1
  9. package/packages/abi/src/abi-type.mjs.map +1 -1
  10. package/packages/abi/src/arc56-contract.js +1 -0
  11. package/packages/abi/src/arc56-contract.js.map +1 -1
  12. package/packages/abi/src/arc56-contract.mjs +1 -0
  13. package/packages/abi/src/arc56-contract.mjs.map +1 -1
  14. package/packages/algod_client/src/apis/api-service.d.ts +44 -44
  15. package/packages/algod_client/src/apis/api-service.js +153 -153
  16. package/packages/algod_client/src/apis/api-service.js.map +1 -1
  17. package/packages/algod_client/src/apis/api-service.mjs +153 -153
  18. package/packages/algod_client/src/apis/api-service.mjs.map +1 -1
  19. package/packages/algod_client/src/core/api-error.js +3 -1
  20. package/packages/algod_client/src/core/api-error.js.map +1 -1
  21. package/packages/algod_client/src/core/api-error.mjs +3 -1
  22. package/packages/algod_client/src/core/api-error.mjs.map +1 -1
  23. package/packages/algod_client/src/core/model-runtime.js +4 -4
  24. package/packages/algod_client/src/core/model-runtime.js.map +1 -1
  25. package/packages/algod_client/src/core/model-runtime.mjs +6 -6
  26. package/packages/algod_client/src/core/model-runtime.mjs.map +1 -1
  27. package/packages/algod_client/src/models/account-participation.js +4 -4
  28. package/packages/algod_client/src/models/account-participation.js.map +1 -1
  29. package/packages/algod_client/src/models/account-participation.mjs +4 -4
  30. package/packages/algod_client/src/models/account-participation.mjs.map +1 -1
  31. package/packages/algod_client/src/models/asset-params.js +2 -1
  32. package/packages/algod_client/src/models/asset-params.js.map +1 -1
  33. package/packages/algod_client/src/models/asset-params.mjs +2 -1
  34. package/packages/algod_client/src/models/asset-params.mjs.map +1 -1
  35. package/packages/algod_client/src/models/block-response.js +1 -2
  36. package/packages/algod_client/src/models/block-response.js.map +1 -1
  37. package/packages/algod_client/src/models/block-response.mjs +2 -3
  38. package/packages/algod_client/src/models/block-response.mjs.map +1 -1
  39. package/packages/algod_client/src/models/block.d.ts +47 -27
  40. package/packages/algod_client/src/models/block.js +173 -97
  41. package/packages/algod_client/src/models/block.js.map +1 -1
  42. package/packages/algod_client/src/models/block.mjs +173 -97
  43. package/packages/algod_client/src/models/block.mjs.map +1 -1
  44. package/packages/algod_client/src/models/ledger-state-delta.js +1 -1
  45. package/packages/algod_client/src/models/ledger-state-delta.js.map +1 -1
  46. package/packages/algod_client/src/models/ledger-state-delta.mjs +2 -2
  47. package/packages/algod_client/src/models/ledger-state-delta.mjs.map +1 -1
  48. package/packages/algod_client/src/models/transaction-parameters-response.js +2 -2
  49. package/packages/algod_client/src/models/transaction-parameters-response.js.map +1 -1
  50. package/packages/algod_client/src/models/transaction-parameters-response.mjs +2 -2
  51. package/packages/algod_client/src/models/transaction-parameters-response.mjs.map +1 -1
  52. package/packages/common/src/codecs/composite/map.js +7 -4
  53. package/packages/common/src/codecs/composite/map.js.map +1 -1
  54. package/packages/common/src/codecs/composite/map.mjs +7 -4
  55. package/packages/common/src/codecs/composite/map.mjs.map +1 -1
  56. package/packages/common/src/codecs/composite/record.js +0 -1
  57. package/packages/common/src/codecs/composite/record.js.map +1 -1
  58. package/packages/common/src/codecs/primitives/address.js +0 -1
  59. package/packages/common/src/codecs/primitives/address.js.map +1 -1
  60. package/packages/common/src/codecs/primitives/bytes.js +0 -1
  61. package/packages/common/src/codecs/primitives/bytes.js.map +1 -1
  62. package/packages/common/src/codecs/primitives/fixed-bytes.js +0 -1
  63. package/packages/common/src/codecs/primitives/fixed-bytes.js.map +1 -1
  64. package/packages/common/src/codecs/wire.js +0 -1
  65. package/packages/common/src/codecs/wire.js.map +1 -1
  66. package/packages/common/src/msgpack.js +0 -1
  67. package/packages/common/src/msgpack.js.map +1 -1
  68. package/packages/indexer_client/src/apis/api-service.d.ts +1 -1
  69. package/packages/indexer_client/src/apis/api-service.js +12 -12
  70. package/packages/indexer_client/src/apis/api-service.js.map +1 -1
  71. package/packages/indexer_client/src/apis/api-service.mjs +12 -12
  72. package/packages/indexer_client/src/apis/api-service.mjs.map +1 -1
  73. package/packages/indexer_client/src/core/api-error.js +3 -1
  74. package/packages/indexer_client/src/core/api-error.js.map +1 -1
  75. package/packages/indexer_client/src/core/api-error.mjs +3 -1
  76. package/packages/indexer_client/src/core/api-error.mjs.map +1 -1
  77. package/packages/indexer_client/src/core/model-runtime.js +4 -4
  78. package/packages/indexer_client/src/core/model-runtime.js.map +1 -1
  79. package/packages/indexer_client/src/core/model-runtime.mjs +6 -6
  80. package/packages/indexer_client/src/core/model-runtime.mjs.map +1 -1
  81. package/packages/indexer_client/src/models/account-participation.js +4 -4
  82. package/packages/indexer_client/src/models/account-participation.js.map +1 -1
  83. package/packages/indexer_client/src/models/account-participation.mjs +4 -4
  84. package/packages/indexer_client/src/models/account-participation.mjs.map +1 -1
  85. package/packages/indexer_client/src/models/asset-params.js +2 -1
  86. package/packages/indexer_client/src/models/asset-params.js.map +1 -1
  87. package/packages/indexer_client/src/models/asset-params.mjs +2 -1
  88. package/packages/indexer_client/src/models/asset-params.mjs.map +1 -1
  89. package/packages/indexer_client/src/models/block.js +8 -8
  90. package/packages/indexer_client/src/models/block.js.map +1 -1
  91. package/packages/indexer_client/src/models/block.mjs +8 -8
  92. package/packages/indexer_client/src/models/block.mjs.map +1 -1
  93. package/packages/indexer_client/src/models/eval-delta-key-value.d.ts +1 -1
  94. package/packages/indexer_client/src/models/eval-delta-key-value.js +2 -2
  95. package/packages/indexer_client/src/models/eval-delta-key-value.js.map +1 -1
  96. package/packages/indexer_client/src/models/eval-delta-key-value.mjs +2 -2
  97. package/packages/indexer_client/src/models/eval-delta-key-value.mjs.map +1 -1
  98. package/packages/indexer_client/src/models/eval-delta.d.ts +1 -1
  99. package/packages/indexer_client/src/models/eval-delta.js +2 -2
  100. package/packages/indexer_client/src/models/eval-delta.js.map +1 -1
  101. package/packages/indexer_client/src/models/eval-delta.mjs +2 -2
  102. package/packages/indexer_client/src/models/eval-delta.mjs.map +1 -1
  103. package/packages/indexer_client/src/models/hb-proof-fields.js +6 -6
  104. package/packages/indexer_client/src/models/hb-proof-fields.js.map +1 -1
  105. package/packages/indexer_client/src/models/hb-proof-fields.mjs +6 -6
  106. package/packages/indexer_client/src/models/hb-proof-fields.mjs.map +1 -1
  107. package/packages/indexer_client/src/models/state-proof-verifier.js +2 -2
  108. package/packages/indexer_client/src/models/state-proof-verifier.js.map +1 -1
  109. package/packages/indexer_client/src/models/state-proof-verifier.mjs +2 -2
  110. package/packages/indexer_client/src/models/state-proof-verifier.mjs.map +1 -1
  111. package/packages/indexer_client/src/models/teal-key-value.d.ts +1 -1
  112. package/packages/indexer_client/src/models/teal-key-value.js +2 -2
  113. package/packages/indexer_client/src/models/teal-key-value.js.map +1 -1
  114. package/packages/indexer_client/src/models/teal-key-value.mjs +2 -2
  115. package/packages/indexer_client/src/models/teal-key-value.mjs.map +1 -1
  116. package/packages/indexer_client/src/models/transaction-heartbeat.js +2 -1
  117. package/packages/indexer_client/src/models/transaction-heartbeat.js.map +1 -1
  118. package/packages/indexer_client/src/models/transaction-heartbeat.mjs +2 -1
  119. package/packages/indexer_client/src/models/transaction-heartbeat.mjs.map +1 -1
  120. package/packages/indexer_client/src/models/transaction-keyreg.js +4 -4
  121. package/packages/indexer_client/src/models/transaction-keyreg.js.map +1 -1
  122. package/packages/indexer_client/src/models/transaction-keyreg.mjs +4 -4
  123. package/packages/indexer_client/src/models/transaction-keyreg.mjs.map +1 -1
  124. package/packages/indexer_client/src/models/transaction-signature-logicsig.js +2 -1
  125. package/packages/indexer_client/src/models/transaction-signature-logicsig.js.map +1 -1
  126. package/packages/indexer_client/src/models/transaction-signature-logicsig.mjs +2 -1
  127. package/packages/indexer_client/src/models/transaction-signature-logicsig.mjs.map +1 -1
  128. package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.js +3 -3
  129. package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.js.map +1 -1
  130. package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.mjs +3 -3
  131. package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.mjs.map +1 -1
  132. package/packages/indexer_client/src/models/transaction.js +4 -3
  133. package/packages/indexer_client/src/models/transaction.js.map +1 -1
  134. package/packages/indexer_client/src/models/transaction.mjs +4 -3
  135. package/packages/indexer_client/src/models/transaction.mjs.map +1 -1
  136. package/packages/kmd_client/src/apis/api-service.d.ts +5 -5
  137. package/packages/kmd_client/src/apis/api-service.js +32 -32
  138. package/packages/kmd_client/src/apis/api-service.js.map +1 -1
  139. package/packages/kmd_client/src/apis/api-service.mjs +32 -32
  140. package/packages/kmd_client/src/apis/api-service.mjs.map +1 -1
  141. package/packages/kmd_client/src/core/api-error.js +3 -1
  142. package/packages/kmd_client/src/core/api-error.js.map +1 -1
  143. package/packages/kmd_client/src/core/api-error.mjs +3 -1
  144. package/packages/kmd_client/src/core/api-error.mjs.map +1 -1
  145. package/packages/kmd_client/src/core/model-runtime.js +4 -4
  146. package/packages/kmd_client/src/core/model-runtime.js.map +1 -1
  147. package/packages/kmd_client/src/core/model-runtime.mjs +6 -6
  148. package/packages/kmd_client/src/core/model-runtime.mjs.map +1 -1
  149. package/packages/sdk/src/encoding/encoding.js +12 -2
  150. package/packages/sdk/src/encoding/encoding.js.map +1 -1
  151. package/packages/sdk/src/encoding/encoding.mjs +12 -1
  152. package/packages/sdk/src/encoding/encoding.mjs.map +1 -1
  153. package/packages/sdk/src/encoding/schema/map.js +0 -2
  154. package/packages/sdk/src/encoding/schema/map.js.map +1 -1
  155. package/packages/transact/src/logicsig.js +3 -3
  156. package/packages/transact/src/logicsig.js.map +1 -1
  157. package/packages/transact/src/logicsig.mjs +3 -3
  158. package/packages/transact/src/logicsig.mjs.map +1 -1
  159. package/packages/transact/src/multisig.js +24 -24
  160. package/packages/transact/src/multisig.js.map +1 -1
  161. package/packages/transact/src/multisig.mjs +24 -24
  162. package/packages/transact/src/multisig.mjs.map +1 -1
  163. package/packages/transact/src/transactions/app-call.d.ts +2 -2
  164. package/packages/transact/src/transactions/app-call.js.map +1 -1
  165. package/packages/transact/src/transactions/app-call.mjs.map +1 -1
  166. package/packages/transact/src/transactions/signed-transaction-meta.js +2 -2
  167. package/packages/transact/src/transactions/signed-transaction-meta.js.map +1 -1
  168. package/packages/transact/src/transactions/signed-transaction-meta.mjs +2 -2
  169. package/packages/transact/src/transactions/signed-transaction-meta.mjs.map +1 -1
  170. package/packages/transact/src/transactions/signed-transaction.d.ts +2 -2
  171. package/packages/transact/src/transactions/signed-transaction.js.map +1 -1
  172. package/packages/transact/src/transactions/signed-transaction.mjs.map +1 -1
  173. package/packages/transact/src/transactions/transaction-meta.js +7 -1
  174. package/packages/transact/src/transactions/transaction-meta.js.map +1 -1
  175. package/packages/transact/src/transactions/transaction-meta.mjs +7 -1
  176. package/packages/transact/src/transactions/transaction-meta.mjs.map +1 -1
  177. package/packages/transact/src/transactions/transaction.js +1 -0
  178. package/packages/transact/src/transactions/transaction.js.map +1 -1
  179. package/packages/transact/src/transactions/transaction.mjs +1 -0
  180. package/packages/transact/src/transactions/transaction.mjs.map +1 -1
  181. package/sdk/index.js +1 -1
  182. package/testing/fixtures/algorand-fixture.d.ts +3 -3
  183. package/testing/fixtures/algorand-fixture.js.map +1 -1
  184. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  185. package/transaction/transaction.js +2 -2
  186. package/transaction/transaction.js.map +1 -1
  187. package/transaction/transaction.mjs +2 -2
  188. package/transaction/transaction.mjs.map +1 -1
  189. package/transactions/app-call.d.ts +2 -1
  190. package/transactions/app-call.js.map +1 -1
  191. package/transactions/app-call.mjs.map +1 -1
  192. package/types/account-manager.js +1 -1
  193. package/types/account-manager.js.map +1 -1
  194. package/types/account-manager.mjs +1 -1
  195. package/types/account-manager.mjs.map +1 -1
  196. package/types/algorand-client-transaction-creator.d.ts +80 -66
  197. package/types/algorand-client-transaction-creator.js +8 -0
  198. package/types/algorand-client-transaction-creator.js.map +1 -1
  199. package/types/algorand-client-transaction-creator.mjs +8 -0
  200. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  201. package/types/algorand-client-transaction-sender.d.ts +80 -66
  202. package/types/algorand-client-transaction-sender.js +8 -1
  203. package/types/algorand-client-transaction-sender.js.map +1 -1
  204. package/types/algorand-client-transaction-sender.mjs +8 -0
  205. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  206. package/types/app-client.d.ts +83 -78
  207. package/types/app-client.js +0 -1
  208. package/types/app-client.js.map +1 -1
  209. package/types/app-deployer.js +1 -1
  210. package/types/app-deployer.js.map +1 -1
  211. package/types/app-deployer.mjs +1 -1
  212. package/types/app-deployer.mjs.map +1 -1
  213. package/types/app-factory.d.ts +42 -39
  214. package/types/app-manager.d.ts +2 -0
  215. package/types/app-manager.js +5 -4
  216. package/types/app-manager.js.map +1 -1
  217. package/types/app-manager.mjs +5 -4
  218. package/types/app-manager.mjs.map +1 -1
  219. package/types/asset-manager.js +1 -1
  220. package/types/asset-manager.js.map +1 -1
  221. package/types/asset-manager.mjs +1 -1
  222. package/types/asset-manager.mjs.map +1 -1
  223. package/types/composer.d.ts +8 -0
  224. package/types/composer.js +11 -4
  225. package/types/composer.js.map +1 -1
  226. package/types/composer.mjs +11 -3
  227. package/types/composer.mjs.map +1 -1
  228. package/types/kmd-account-manager.d.ts +1 -0
  229. package/types/kmd-account-manager.js +21 -10
  230. package/types/kmd-account-manager.js.map +1 -1
  231. package/types/kmd-account-manager.mjs +22 -11
  232. package/types/kmd-account-manager.mjs.map +1 -1
  233. package/types/testing.d.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ledger-state-delta.mjs","names":["LedgerTealValueMeta: ObjectModelMetadata<LedgerTealValue>","LedgerStateSchemaMeta: ObjectModelMetadata<LedgerStateSchema>","LedgerAppParamsMeta: ObjectModelMetadata<LedgerAppParams>","LedgerAppLocalStateMeta: ObjectModelMetadata<LedgerAppLocalState>","LedgerAppLocalStateDeltaMeta: ObjectModelMetadata<LedgerAppLocalStateDelta>","LedgerAppParamsDeltaMeta: ObjectModelMetadata<LedgerAppParamsDelta>","LedgerAppResourceRecordMeta: ObjectModelMetadata<LedgerAppResourceRecord>","LedgerAssetHoldingMeta: ObjectModelMetadata<LedgerAssetHolding>","LedgerAssetHoldingDeltaMeta: ObjectModelMetadata<LedgerAssetHoldingDelta>","LedgerAssetParamsMeta: ObjectModelMetadata<LedgerAssetParams>","LedgerAssetParamsDeltaMeta: ObjectModelMetadata<LedgerAssetParamsDelta>","LedgerAssetResourceRecordMeta: ObjectModelMetadata<LedgerAssetResourceRecord>","LedgerVotingDataMeta: ObjectModelMetadata<LedgerVotingData>","LedgerAccountBaseDataMeta: ObjectModelMetadata<LedgerAccountBaseData>","LedgerAccountDataMeta: ObjectModelMetadata<LedgerAccountData>","LedgerBalanceRecordMeta: ObjectModelMetadata<LedgerBalanceRecord>","LedgerAccountDeltasMeta: ObjectModelMetadata<LedgerAccountDeltas>","LedgerKvValueDeltaMeta: ObjectModelMetadata<LedgerKvValueDelta>","LedgerIncludedTransactionsMeta: ObjectModelMetadata<LedgerIncludedTransactions>","LedgerModifiedCreatableMeta: ObjectModelMetadata<LedgerModifiedCreatable>","LedgerAlgoCountMeta: ObjectModelMetadata<LedgerAlgoCount>","LedgerAccountTotalsMeta: ObjectModelMetadata<LedgerAccountTotals>","LedgerStateDeltaMeta: ObjectModelMetadata<LedgerStateDelta>"],"sources":["../../../../../packages/algod_client/src/models/ledger-state-delta.ts"],"sourcesContent":["import type { Block } from './block'\nimport { BlockMeta } from './block'\nimport {\n numberCodec,\n bigIntCodec,\n booleanCodec,\n stringCodec,\n bytesCodec,\n addressCodec,\n Address,\n ArrayCodec,\n MapCodec,\n ObjectModelCodec,\n type ObjectModelMetadata,\n} from '@algorandfoundation/algokit-common'\n\n/**\n * Contains type information and a value, representing a value in a TEAL program.\n */\nexport type LedgerTealValue = {\n /**\n * Type determines the type of the value.\n * * 1 represents the type of a byte slice in a TEAL program\n * * 2 represents the type of an unsigned integer in a TEAL program\n */\n type: number\n /** bytes value. */\n bytes?: Uint8Array\n /** uint value. */\n uint?: bigint\n}\n\nexport const LedgerTealValueMeta: ObjectModelMetadata<LedgerTealValue> = {\n name: 'LedgerTealValue',\n kind: 'object',\n fields: [\n { name: 'type', wireKey: 'tt', optional: false, codec: numberCodec },\n { name: 'bytes', wireKey: 'tb', optional: true, codec: bytesCodec },\n { name: 'uint', wireKey: 'ui', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * Sets maximums on the number of each type that may be stored.\n */\nexport type LedgerStateSchema = {\n /** Number of uints in state. */\n numUints?: bigint\n /** Number of byte slices in state. */\n numByteSlices?: bigint\n}\n\nexport const LedgerStateSchemaMeta: ObjectModelMetadata<LedgerStateSchema> = {\n name: 'LedgerStateSchema',\n kind: 'object',\n fields: [\n { name: 'numUints', wireKey: 'nui', optional: true, codec: bigIntCodec },\n { name: 'numByteSlices', wireKey: 'nbs', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * Stores the global information associated with an application.\n */\nexport type LedgerAppParams = {\n approvalProgram: Uint8Array\n clearStateProgram: Uint8Array\n localStateSchema: LedgerStateSchema\n globalStateSchema: LedgerStateSchema\n extraProgramPages: number\n version?: number\n sizeSponsor?: Address\n globalState?: Map<Uint8Array, LedgerTealValue>\n}\n\nexport const LedgerAppParamsMeta: ObjectModelMetadata<LedgerAppParams> = {\n name: 'LedgerAppParams',\n kind: 'object',\n fields: [\n { name: 'approvalProgram', wireKey: 'approv', optional: false, codec: bytesCodec },\n { name: 'clearStateProgram', wireKey: 'clearp', optional: false, codec: bytesCodec },\n { name: 'localStateSchema', wireKey: 'lsch', optional: false, codec: new ObjectModelCodec(LedgerStateSchemaMeta) },\n { name: 'globalStateSchema', wireKey: 'gsch', optional: false, codec: new ObjectModelCodec(LedgerStateSchemaMeta) },\n { name: 'extraProgramPages', wireKey: 'epp', optional: false, codec: numberCodec },\n { name: 'version', wireKey: 'v', optional: true, codec: numberCodec },\n { name: 'sizeSponsor', wireKey: 'ss', optional: true, codec: addressCodec },\n {\n name: 'globalState',\n wireKey: 'gs',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(LedgerTealValueMeta)),\n },\n ],\n}\n\n/**\n * Stores the LocalState associated with an application.\n */\nexport type LedgerAppLocalState = {\n schema: LedgerStateSchema\n keyValue?: Map<Uint8Array, LedgerTealValue>\n}\n\nexport const LedgerAppLocalStateMeta: ObjectModelMetadata<LedgerAppLocalState> = {\n name: 'LedgerAppLocalState',\n kind: 'object',\n fields: [\n { name: 'schema', wireKey: 'hsch', optional: false, codec: new ObjectModelCodec(LedgerStateSchemaMeta) },\n {\n name: 'keyValue',\n wireKey: 'tkv',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(LedgerTealValueMeta)),\n },\n ],\n}\n\n/**\n * Tracks a changed AppLocalState, and whether it was deleted.\n */\nexport type LedgerAppLocalStateDelta = {\n deleted: boolean\n localState?: LedgerAppLocalState\n}\n\nexport const LedgerAppLocalStateDeltaMeta: ObjectModelMetadata<LedgerAppLocalStateDelta> = {\n name: 'LedgerAppLocalStateDelta',\n kind: 'object',\n fields: [\n { name: 'deleted', wireKey: 'Deleted', optional: false, codec: booleanCodec },\n { name: 'localState', wireKey: 'LocalState', optional: true, codec: new ObjectModelCodec(LedgerAppLocalStateMeta) },\n ],\n}\n\n/**\n * Tracks a changed AppParams, and whether it was deleted.\n */\nexport type LedgerAppParamsDelta = {\n deleted: boolean\n params?: LedgerAppParams\n}\n\nexport const LedgerAppParamsDeltaMeta: ObjectModelMetadata<LedgerAppParamsDelta> = {\n name: 'LedgerAppParamsDelta',\n kind: 'object',\n fields: [\n { name: 'deleted', wireKey: 'Deleted', optional: false, codec: booleanCodec },\n { name: 'params', wireKey: 'Params', optional: true, codec: new ObjectModelCodec(LedgerAppParamsMeta) },\n ],\n}\n\n/**\n * Represents AppParams and AppLocalState in deltas.\n */\nexport type LedgerAppResourceRecord = {\n appId: bigint\n address: Address\n params: LedgerAppParamsDelta\n state: LedgerAppLocalStateDelta\n}\n\nexport const LedgerAppResourceRecordMeta: ObjectModelMetadata<LedgerAppResourceRecord> = {\n name: 'LedgerAppResourceRecord',\n kind: 'object',\n fields: [\n { name: 'appId', wireKey: 'Aidx', optional: false, codec: bigIntCodec },\n { name: 'address', wireKey: 'Addr', optional: false, codec: addressCodec },\n { name: 'params', wireKey: 'Params', optional: false, codec: new ObjectModelCodec(LedgerAppParamsDeltaMeta) },\n { name: 'state', wireKey: 'State', optional: false, codec: new ObjectModelCodec(LedgerAppLocalStateDeltaMeta) },\n ],\n}\n\n/**\n * Describes an asset held by an account.\n */\nexport type LedgerAssetHolding = {\n amount: bigint\n frozen: boolean\n}\n\nexport const LedgerAssetHoldingMeta: ObjectModelMetadata<LedgerAssetHolding> = {\n name: 'LedgerAssetHolding',\n kind: 'object',\n fields: [\n { name: 'amount', wireKey: 'a', optional: false, codec: bigIntCodec },\n { name: 'frozen', wireKey: 'f', optional: false, codec: booleanCodec },\n ],\n}\n\n/**\n * Records a changed AssetHolding, and whether it was deleted.\n */\nexport type LedgerAssetHoldingDelta = {\n deleted: boolean\n holding?: LedgerAssetHolding\n}\n\nexport const LedgerAssetHoldingDeltaMeta: ObjectModelMetadata<LedgerAssetHoldingDelta> = {\n name: 'LedgerAssetHoldingDelta',\n kind: 'object',\n fields: [\n { name: 'deleted', wireKey: 'Deleted', optional: false, codec: booleanCodec },\n { name: 'holding', wireKey: 'Holding', optional: true, codec: new ObjectModelCodec(LedgerAssetHoldingMeta) },\n ],\n}\n\n/**\n * Describes the parameters of an asset.\n */\nexport type LedgerAssetParams = {\n /**\n * Specifies the total number of units of this asset created.\n */\n total: bigint\n /**\n * Specifies the number of digits to display after the decimal place when displaying this asset.\n * A value of 0 represents an asset that is not divisible, a value of 1 represents an asset divisible into tenths, and so on.\n * This value must be between 0 and 19 (inclusive).\n */\n decimals: number\n /**\n * Specifies whether slots for this asset in user accounts are frozen by default or not.\n */\n defaultFrozen: boolean\n /**\n * Specifies a hint for the name of a unit of this asset.\n */\n unitName?: string\n /**\n * Specifies a hint for the name of the asset.\n */\n assetName?: string\n /**\n * Specifies a URL where more information about the asset can be retrieved.\n */\n url?: string\n /**\n * Specifies a commitment to some unspecified asset metadata. The format of this\n * metadata is up to the application.\n */\n metadataHash?: Uint8Array\n /**\n * Manager specifies an account that is allowed to change the non-zero addresses in this AssetParams.\n */\n manager?: Address\n /**\n * Specifies an account whose holdings of this asset should be reported as \"not minted\".\n */\n reserve?: Address\n /**\n * Specifies an account that is allowed to change the frozen state of holdings of this asset.\n */\n freeze?: Address\n /**\n * Specifies an account that is allowed to take units of this asset from any account.\n */\n clawback?: Address\n}\n\nexport const LedgerAssetParamsMeta: ObjectModelMetadata<LedgerAssetParams> = {\n name: 'LedgerAssetParams',\n kind: 'object',\n fields: [\n { name: 'total', wireKey: 't', optional: false, codec: bigIntCodec },\n { name: 'decimals', wireKey: 'dc', optional: false, codec: numberCodec },\n { name: 'defaultFrozen', wireKey: 'df', optional: false, 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: bytesCodec },\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\n/**\n * Tracks a changed asset params, and whether it was deleted.\n */\nexport type LedgerAssetParamsDelta = {\n deleted: boolean\n params?: LedgerAssetParams\n}\n\nexport const LedgerAssetParamsDeltaMeta: ObjectModelMetadata<LedgerAssetParamsDelta> = {\n name: 'LedgerAssetParamsDelta',\n kind: 'object',\n fields: [\n { name: 'deleted', wireKey: 'Deleted', optional: false, codec: booleanCodec },\n { name: 'params', wireKey: 'Params', optional: true, codec: new ObjectModelCodec(LedgerAssetParamsMeta) },\n ],\n}\n\n/**\n * Represents asset params and asset holding in deltas.\n */\nexport type LedgerAssetResourceRecord = {\n assetId: bigint\n address: Address\n params: LedgerAssetParamsDelta\n holding: LedgerAssetHoldingDelta\n}\n\nexport const LedgerAssetResourceRecordMeta: ObjectModelMetadata<LedgerAssetResourceRecord> = {\n name: 'LedgerAssetResourceRecord',\n kind: 'object',\n fields: [\n { name: 'assetId', wireKey: 'Aidx', optional: false, codec: bigIntCodec },\n { name: 'address', wireKey: 'Addr', optional: false, codec: addressCodec },\n { name: 'params', wireKey: 'Params', optional: false, codec: new ObjectModelCodec(LedgerAssetParamsDeltaMeta) },\n { name: 'holding', wireKey: 'Holding', optional: false, codec: new ObjectModelCodec(LedgerAssetHoldingDeltaMeta) },\n ],\n}\n\n/**\n * Holds participation information.\n */\nexport type LedgerVotingData = {\n voteId: Uint8Array\n selectionId: Uint8Array\n stateProofId: Uint8Array\n voteFirstValid: bigint\n voteLastValid: bigint\n voteKeyDilution: bigint\n}\n\nexport const LedgerVotingDataMeta: ObjectModelMetadata<LedgerVotingData> = {\n name: 'LedgerVotingData',\n kind: 'object',\n fields: [\n { name: 'voteId', wireKey: 'VoteID', optional: false, codec: bytesCodec },\n { name: 'selectionId', wireKey: 'SelectionID', optional: false, codec: bytesCodec },\n { name: 'stateProofId', wireKey: 'StateProofID', optional: false, codec: bytesCodec },\n { name: 'voteFirstValid', wireKey: 'VoteFirstValid', optional: false, codec: bigIntCodec },\n { name: 'voteLastValid', wireKey: 'VoteLastValid', optional: false, codec: bigIntCodec },\n { name: 'voteKeyDilution', wireKey: 'VoteKeyDilution', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Contains base account info like balance, status and total number of resources.\n */\nexport type LedgerAccountBaseData = {\n /**\n * Account status. Values are:\n * * 0: Offline\n * * 1: Online\n * * 2: NotParticipating\n */\n status: number\n microAlgos: bigint\n rewardsBase: bigint\n rewardedMicroAlgos: bigint\n authAddress: Address\n incentiveEligible: boolean\n /**\n * Totals across created globals, and opted in locals.\n */\n totalAppSchema: LedgerStateSchema\n /**\n * Total number of extra pages across all created apps.\n */\n totalExtraAppPages: number\n /**\n * Total number of apps this account has created.\n */\n totalAppParams: number\n /**\n * Total number of apps this account is opted into.\n */\n totalAppLocalStates: number\n /**\n * Total number of assets created by this account.\n */\n totalAssetParams: number\n /**\n * Total of asset creations and optins (i.e. number of holdings).\n */\n totalAssets: number\n /**\n * Total number of boxes associated to this account.\n */\n totalBoxes: bigint\n /**\n * Total bytes for this account's boxes. keys and values count.\n */\n totalBoxBytes: bigint\n /**\n * The last round that this account proposed the winning block.\n */\n lastProposed: bigint\n /**\n * The last round that this account sent a heartbeat to show it was online.\n */\n lastHeartbeat: bigint\n}\n\nexport const LedgerAccountBaseDataMeta: ObjectModelMetadata<LedgerAccountBaseData> = {\n name: 'LedgerAccountBaseData',\n kind: 'object',\n fields: [\n { name: 'status', wireKey: 'Status', optional: false, codec: numberCodec },\n { name: 'microAlgos', wireKey: 'MicroAlgos', optional: false, codec: bigIntCodec },\n { name: 'rewardsBase', wireKey: 'RewardsBase', optional: false, codec: bigIntCodec },\n {\n name: 'rewardedMicroAlgos',\n wireKey: 'RewardedMicroAlgos',\n optional: false,\n codec: bigIntCodec,\n },\n { name: 'authAddress', wireKey: 'AuthAddr', optional: false, codec: addressCodec },\n { name: 'incentiveEligible', wireKey: 'IncentiveEligible', optional: false, codec: booleanCodec },\n {\n name: 'totalAppSchema',\n wireKey: 'TotalAppSchema',\n optional: false,\n codec: new ObjectModelCodec(LedgerStateSchemaMeta),\n },\n { name: 'totalExtraAppPages', wireKey: 'TotalExtraAppPages', optional: false, codec: numberCodec },\n { name: 'totalAppParams', wireKey: 'TotalAppParams', optional: false, codec: numberCodec },\n { name: 'totalAppLocalStates', wireKey: 'TotalAppLocalStates', optional: false, codec: numberCodec },\n { name: 'totalAssetParams', wireKey: 'TotalAssetParams', optional: false, codec: numberCodec },\n { name: 'totalAssets', wireKey: 'TotalAssets', optional: false, codec: numberCodec },\n { name: 'totalBoxes', wireKey: 'TotalBoxes', optional: false, codec: bigIntCodec },\n { name: 'totalBoxBytes', wireKey: 'TotalBoxBytes', optional: false, codec: bigIntCodec },\n { name: 'lastProposed', wireKey: 'LastProposed', optional: false, codec: bigIntCodec },\n { name: 'lastHeartbeat', wireKey: 'LastHeartbeat', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Provides per-account data.\n */\nexport type LedgerAccountData = {\n accountBaseData: LedgerAccountBaseData\n votingData: LedgerVotingData\n}\n\nexport const LedgerAccountDataMeta: ObjectModelMetadata<LedgerAccountData> = {\n name: 'LedgerAccountData',\n kind: 'object',\n fields: [\n {\n name: 'accountBaseData',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(LedgerAccountBaseDataMeta),\n },\n { name: 'votingData', flattened: true, optional: false, codec: new ObjectModelCodec(LedgerVotingDataMeta) },\n ],\n}\n\nexport type LedgerBalanceRecord = {\n address: Address\n accountData: LedgerAccountData\n}\n\nexport const LedgerBalanceRecordMeta: ObjectModelMetadata<LedgerBalanceRecord> = {\n name: 'LedgerBalanceRecord',\n kind: 'object',\n fields: [\n { name: 'address', wireKey: 'Addr', optional: false, codec: addressCodec },\n { name: 'accountData', flattened: true, optional: false, codec: new ObjectModelCodec(LedgerAccountDataMeta) },\n ],\n}\n\nexport type LedgerAccountDeltas = {\n accounts?: LedgerBalanceRecord[]\n appResources?: LedgerAppResourceRecord[]\n assetResources?: LedgerAssetResourceRecord[]\n}\n\nexport const LedgerAccountDeltasMeta: ObjectModelMetadata<LedgerAccountDeltas> = {\n name: 'LedgerAccountDeltas',\n kind: 'object',\n fields: [\n {\n name: 'accounts',\n wireKey: 'Accts',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(LedgerBalanceRecordMeta)),\n },\n {\n name: 'appResources',\n wireKey: 'AppResources',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(LedgerAppResourceRecordMeta)),\n },\n {\n name: 'assetResources',\n wireKey: 'AssetResources',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(LedgerAssetResourceRecordMeta)),\n },\n ],\n}\n\n/**\n * Shows how the data associated with a key in the kvstore has changed.\n */\nexport type LedgerKvValueDelta = {\n /**\n * Stores the most recent value (undefined means deleted).\n */\n data?: Uint8Array\n /**\n * Stores the previous value (undefined means didn't exist).\n */\n oldData?: Uint8Array\n}\n\nexport const LedgerKvValueDeltaMeta: ObjectModelMetadata<LedgerKvValueDelta> = {\n name: 'LedgerKvValueDelta',\n kind: 'object',\n fields: [\n { name: 'data', wireKey: 'Data', optional: true, codec: bytesCodec },\n { name: 'oldData', wireKey: 'OldData', optional: true, codec: bytesCodec },\n ],\n}\n\n/**\n * Defines the transactions included in a block, their index and last valid round.\n */\nexport type LedgerIncludedTransactions = {\n lastValid: bigint\n /**\n * The index of the transaction in the block.\n */\n intra: number\n}\n\nexport const LedgerIncludedTransactionsMeta: ObjectModelMetadata<LedgerIncludedTransactions> = {\n name: 'LedgerIncludedTransactions',\n kind: 'object',\n fields: [\n { name: 'lastValid', wireKey: 'LastValid', optional: false, codec: bigIntCodec },\n { name: 'intra', wireKey: 'Intra', optional: false, codec: numberCodec },\n ],\n}\n\n/**\n * Represents a change to a single creatable state.\n */\nexport type LedgerModifiedCreatable = {\n /**\n * Type of the creatable. The values are:\n * * 0: Asset\n * * 1: Application\n */\n creatableType: number\n /**\n * Created if true, deleted if false.\n */\n created: boolean\n /**\n * Creator of the app/asset.\n */\n creator: Address\n /**\n * Keeps track of how many times this app/asset appears in accountUpdates.creatableDeltas.\n */\n nDeltas: number\n}\n\nexport const LedgerModifiedCreatableMeta: ObjectModelMetadata<LedgerModifiedCreatable> = {\n name: 'LedgerModifiedCreatable',\n kind: 'object',\n fields: [\n { name: 'creatableType', wireKey: 'Ctype', optional: false, codec: numberCodec },\n { name: 'created', wireKey: 'Created', optional: false, codec: booleanCodec },\n { name: 'creator', wireKey: 'Creator', optional: false, codec: addressCodec },\n { name: 'ndeltas', wireKey: 'Ndeltas', optional: false, codec: numberCodec },\n ],\n}\n\n/**\n * Represents a total of algos of a certain class of accounts (split up by their Status value).\n */\nexport type LedgerAlgoCount = {\n /**\n * Sum of algos of all accounts in this scope.\n */\n money: bigint\n /**\n * Total number of whole reward units in accounts.\n */\n rewardUnits: bigint\n}\n\nexport const LedgerAlgoCountMeta: ObjectModelMetadata<LedgerAlgoCount> = {\n name: 'LedgerAlgoCount',\n kind: 'object',\n fields: [\n { name: 'money', wireKey: 'mon', optional: false, codec: bigIntCodec },\n { name: 'rewardUnits', wireKey: 'rwd', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Represents the totals of algos in the system grouped by different account status values.\n */\nexport type LedgerAccountTotals = {\n online: LedgerAlgoCount\n offline: LedgerAlgoCount\n notParticipating: LedgerAlgoCount\n /**\n * Total number of algos received per reward unit since genesis.\n */\n rewardsLevel: bigint\n}\n\nexport const LedgerAccountTotalsMeta: ObjectModelMetadata<LedgerAccountTotals> = {\n name: 'LedgerAccountTotals',\n kind: 'object',\n fields: [\n { name: 'online', wireKey: 'online', optional: false, codec: new ObjectModelCodec(LedgerAlgoCountMeta) },\n { name: 'offline', wireKey: 'offline', optional: false, codec: new ObjectModelCodec(LedgerAlgoCountMeta) },\n { name: 'notParticipating', wireKey: 'notpart', optional: false, codec: new ObjectModelCodec(LedgerAlgoCountMeta) },\n { name: 'rewardsLevel', wireKey: 'rwdlvl', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Describes the delta between a given round to the previous round.\n */\nexport type LedgerStateDelta = {\n /**\n * Modified new accounts.\n */\n accounts: LedgerAccountDeltas\n /**\n * Block header.\n */\n block: Block\n /**\n * Represents modification on StateProofNextRound field in the block header. If the block contains\n * a valid state proof transaction, this field will contain the next round for state proof.\n * otherwise it will be set to 0.\n */\n stateProofNext: bigint\n /**\n * Previous block timestamp\n */\n prevTimestamp: bigint\n /**\n * The account totals reflecting the changes in this StateDelta object.\n */\n totals: LedgerAccountTotals\n /**\n * Modified kv pairs.\n */\n kvMods?: Map<Uint8Array, LedgerKvValueDelta>\n /**\n * New Txids for the txtail and TxnCounter, mapped to txn.LastValid.\n */\n txIds?: Map<Uint8Array, LedgerIncludedTransactions>\n /**\n * New creatables creator lookup table.\n */\n creatables?: Map<number, LedgerModifiedCreatable>\n}\n\nexport const LedgerStateDeltaMeta: ObjectModelMetadata<LedgerStateDelta> = {\n name: 'LedgerStateDelta',\n kind: 'object',\n fields: [\n { name: 'accounts', wireKey: 'Accts', optional: false, codec: new ObjectModelCodec(LedgerAccountDeltasMeta) },\n { name: 'block', wireKey: 'Hdr', optional: false, codec: new ObjectModelCodec(BlockMeta) },\n { name: 'stateProofNext', wireKey: 'StateProofNext', optional: false, codec: bigIntCodec },\n { name: 'prevTimestamp', wireKey: 'PrevTimestamp', optional: false, codec: bigIntCodec },\n { name: 'totals', wireKey: 'Totals', optional: false, codec: new ObjectModelCodec(LedgerAccountTotalsMeta) },\n {\n name: 'kvMods',\n wireKey: 'KvMods',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(LedgerKvValueDeltaMeta)),\n },\n {\n name: 'txIds',\n wireKey: 'Txids',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(LedgerIncludedTransactionsMeta)),\n },\n {\n name: 'creatables',\n wireKey: 'Creatables',\n optional: true,\n codec: new MapCodec(numberCodec, new ObjectModelCodec(LedgerModifiedCreatableMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,MAAaA,sBAA4D;CACvE,MAAM;CACN,MAAM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AQ;EACN;GAAE,MAAM;GAAY,SAAS;GAAS,UAAU;GAAO,OAAO,IAAI,iBAAiB,wBAAwB;GAAE;EAC7G;GAAE,MAAM;GAAS,SAAS;GAAO,UAAU;GAAO,OAAO,IAAI,iBAAiB,UAAU;GAAE;EAC1F;GAAE,MAAM;GAAkB,SAAS;GAAkB,UAAU;GAAO,OAAO;GAAa;EAC1F;GAAE,MAAM;GAAiB,SAAS;GAAiB,UAAU;GAAO,OAAO;GAAa;EACxF;GAAE,MAAM;GAAU,SAAS;GAAU,UAAU;GAAO,OAAO,IAAI,iBAAiB,wBAAwB;GAAE;EAC5G;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,YAAY,IAAI,iBAAiB,uBAAuB,CAAC;GAC9E;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,YAAY,IAAI,iBAAiB,+BAA+B,CAAC;GACtF;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,aAAa,IAAI,iBAAiB,4BAA4B,CAAC;GACpF;EACF;CACF"}
1
+ {"version":3,"file":"ledger-state-delta.mjs","names":["LedgerTealValueMeta: ObjectModelMetadata<LedgerTealValue>","LedgerStateSchemaMeta: ObjectModelMetadata<LedgerStateSchema>","LedgerAppParamsMeta: ObjectModelMetadata<LedgerAppParams>","LedgerAppLocalStateMeta: ObjectModelMetadata<LedgerAppLocalState>","LedgerAppLocalStateDeltaMeta: ObjectModelMetadata<LedgerAppLocalStateDelta>","LedgerAppParamsDeltaMeta: ObjectModelMetadata<LedgerAppParamsDelta>","LedgerAppResourceRecordMeta: ObjectModelMetadata<LedgerAppResourceRecord>","LedgerAssetHoldingMeta: ObjectModelMetadata<LedgerAssetHolding>","LedgerAssetHoldingDeltaMeta: ObjectModelMetadata<LedgerAssetHoldingDelta>","LedgerAssetParamsMeta: ObjectModelMetadata<LedgerAssetParams>","LedgerAssetParamsDeltaMeta: ObjectModelMetadata<LedgerAssetParamsDelta>","LedgerAssetResourceRecordMeta: ObjectModelMetadata<LedgerAssetResourceRecord>","LedgerVotingDataMeta: ObjectModelMetadata<LedgerVotingData>","LedgerAccountBaseDataMeta: ObjectModelMetadata<LedgerAccountBaseData>","LedgerAccountDataMeta: ObjectModelMetadata<LedgerAccountData>","LedgerBalanceRecordMeta: ObjectModelMetadata<LedgerBalanceRecord>","LedgerAccountDeltasMeta: ObjectModelMetadata<LedgerAccountDeltas>","LedgerKvValueDeltaMeta: ObjectModelMetadata<LedgerKvValueDelta>","LedgerIncludedTransactionsMeta: ObjectModelMetadata<LedgerIncludedTransactions>","LedgerModifiedCreatableMeta: ObjectModelMetadata<LedgerModifiedCreatable>","LedgerAlgoCountMeta: ObjectModelMetadata<LedgerAlgoCount>","LedgerAccountTotalsMeta: ObjectModelMetadata<LedgerAccountTotals>","LedgerStateDeltaMeta: ObjectModelMetadata<LedgerStateDelta>"],"sources":["../../../../../packages/algod_client/src/models/ledger-state-delta.ts"],"sourcesContent":["import type { Block } from './block'\nimport { blockCodec } from './block'\nimport {\n numberCodec,\n bigIntCodec,\n booleanCodec,\n stringCodec,\n bytesCodec,\n addressCodec,\n Address,\n ArrayCodec,\n MapCodec,\n ObjectModelCodec,\n type ObjectModelMetadata,\n} from '@algorandfoundation/algokit-common'\n\n/**\n * Contains type information and a value, representing a value in a TEAL program.\n */\nexport type LedgerTealValue = {\n /**\n * Type determines the type of the value.\n * * 1 represents the type of a byte slice in a TEAL program\n * * 2 represents the type of an unsigned integer in a TEAL program\n */\n type: number\n /** bytes value. */\n bytes?: Uint8Array\n /** uint value. */\n uint?: bigint\n}\n\nexport const LedgerTealValueMeta: ObjectModelMetadata<LedgerTealValue> = {\n name: 'LedgerTealValue',\n kind: 'object',\n fields: [\n { name: 'type', wireKey: 'tt', optional: false, codec: numberCodec },\n { name: 'bytes', wireKey: 'tb', optional: true, codec: bytesCodec },\n { name: 'uint', wireKey: 'ui', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * Sets maximums on the number of each type that may be stored.\n */\nexport type LedgerStateSchema = {\n /** Number of uints in state. */\n numUints?: bigint\n /** Number of byte slices in state. */\n numByteSlices?: bigint\n}\n\nexport const LedgerStateSchemaMeta: ObjectModelMetadata<LedgerStateSchema> = {\n name: 'LedgerStateSchema',\n kind: 'object',\n fields: [\n { name: 'numUints', wireKey: 'nui', optional: true, codec: bigIntCodec },\n { name: 'numByteSlices', wireKey: 'nbs', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * Stores the global information associated with an application.\n */\nexport type LedgerAppParams = {\n approvalProgram: Uint8Array\n clearStateProgram: Uint8Array\n localStateSchema: LedgerStateSchema\n globalStateSchema: LedgerStateSchema\n extraProgramPages: number\n version?: number\n sizeSponsor?: Address\n globalState?: Map<Uint8Array, LedgerTealValue>\n}\n\nexport const LedgerAppParamsMeta: ObjectModelMetadata<LedgerAppParams> = {\n name: 'LedgerAppParams',\n kind: 'object',\n fields: [\n { name: 'approvalProgram', wireKey: 'approv', optional: false, codec: bytesCodec },\n { name: 'clearStateProgram', wireKey: 'clearp', optional: false, codec: bytesCodec },\n { name: 'localStateSchema', wireKey: 'lsch', optional: false, codec: new ObjectModelCodec(LedgerStateSchemaMeta) },\n { name: 'globalStateSchema', wireKey: 'gsch', optional: false, codec: new ObjectModelCodec(LedgerStateSchemaMeta) },\n { name: 'extraProgramPages', wireKey: 'epp', optional: false, codec: numberCodec },\n { name: 'version', wireKey: 'v', optional: true, codec: numberCodec },\n { name: 'sizeSponsor', wireKey: 'ss', optional: true, codec: addressCodec },\n {\n name: 'globalState',\n wireKey: 'gs',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(LedgerTealValueMeta)),\n },\n ],\n}\n\n/**\n * Stores the LocalState associated with an application.\n */\nexport type LedgerAppLocalState = {\n schema: LedgerStateSchema\n keyValue?: Map<Uint8Array, LedgerTealValue>\n}\n\nexport const LedgerAppLocalStateMeta: ObjectModelMetadata<LedgerAppLocalState> = {\n name: 'LedgerAppLocalState',\n kind: 'object',\n fields: [\n { name: 'schema', wireKey: 'hsch', optional: false, codec: new ObjectModelCodec(LedgerStateSchemaMeta) },\n {\n name: 'keyValue',\n wireKey: 'tkv',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(LedgerTealValueMeta)),\n },\n ],\n}\n\n/**\n * Tracks a changed AppLocalState, and whether it was deleted.\n */\nexport type LedgerAppLocalStateDelta = {\n deleted: boolean\n localState?: LedgerAppLocalState\n}\n\nexport const LedgerAppLocalStateDeltaMeta: ObjectModelMetadata<LedgerAppLocalStateDelta> = {\n name: 'LedgerAppLocalStateDelta',\n kind: 'object',\n fields: [\n { name: 'deleted', wireKey: 'Deleted', optional: false, codec: booleanCodec },\n { name: 'localState', wireKey: 'LocalState', optional: true, codec: new ObjectModelCodec(LedgerAppLocalStateMeta) },\n ],\n}\n\n/**\n * Tracks a changed AppParams, and whether it was deleted.\n */\nexport type LedgerAppParamsDelta = {\n deleted: boolean\n params?: LedgerAppParams\n}\n\nexport const LedgerAppParamsDeltaMeta: ObjectModelMetadata<LedgerAppParamsDelta> = {\n name: 'LedgerAppParamsDelta',\n kind: 'object',\n fields: [\n { name: 'deleted', wireKey: 'Deleted', optional: false, codec: booleanCodec },\n { name: 'params', wireKey: 'Params', optional: true, codec: new ObjectModelCodec(LedgerAppParamsMeta) },\n ],\n}\n\n/**\n * Represents AppParams and AppLocalState in deltas.\n */\nexport type LedgerAppResourceRecord = {\n appId: bigint\n address: Address\n params: LedgerAppParamsDelta\n state: LedgerAppLocalStateDelta\n}\n\nexport const LedgerAppResourceRecordMeta: ObjectModelMetadata<LedgerAppResourceRecord> = {\n name: 'LedgerAppResourceRecord',\n kind: 'object',\n fields: [\n { name: 'appId', wireKey: 'Aidx', optional: false, codec: bigIntCodec },\n { name: 'address', wireKey: 'Addr', optional: false, codec: addressCodec },\n { name: 'params', wireKey: 'Params', optional: false, codec: new ObjectModelCodec(LedgerAppParamsDeltaMeta) },\n { name: 'state', wireKey: 'State', optional: false, codec: new ObjectModelCodec(LedgerAppLocalStateDeltaMeta) },\n ],\n}\n\n/**\n * Describes an asset held by an account.\n */\nexport type LedgerAssetHolding = {\n amount: bigint\n frozen: boolean\n}\n\nexport const LedgerAssetHoldingMeta: ObjectModelMetadata<LedgerAssetHolding> = {\n name: 'LedgerAssetHolding',\n kind: 'object',\n fields: [\n { name: 'amount', wireKey: 'a', optional: false, codec: bigIntCodec },\n { name: 'frozen', wireKey: 'f', optional: false, codec: booleanCodec },\n ],\n}\n\n/**\n * Records a changed AssetHolding, and whether it was deleted.\n */\nexport type LedgerAssetHoldingDelta = {\n deleted: boolean\n holding?: LedgerAssetHolding\n}\n\nexport const LedgerAssetHoldingDeltaMeta: ObjectModelMetadata<LedgerAssetHoldingDelta> = {\n name: 'LedgerAssetHoldingDelta',\n kind: 'object',\n fields: [\n { name: 'deleted', wireKey: 'Deleted', optional: false, codec: booleanCodec },\n { name: 'holding', wireKey: 'Holding', optional: true, codec: new ObjectModelCodec(LedgerAssetHoldingMeta) },\n ],\n}\n\n/**\n * Describes the parameters of an asset.\n */\nexport type LedgerAssetParams = {\n /**\n * Specifies the total number of units of this asset created.\n */\n total: bigint\n /**\n * Specifies the number of digits to display after the decimal place when displaying this asset.\n * A value of 0 represents an asset that is not divisible, a value of 1 represents an asset divisible into tenths, and so on.\n * This value must be between 0 and 19 (inclusive).\n */\n decimals: number\n /**\n * Specifies whether slots for this asset in user accounts are frozen by default or not.\n */\n defaultFrozen: boolean\n /**\n * Specifies a hint for the name of a unit of this asset.\n */\n unitName?: string\n /**\n * Specifies a hint for the name of the asset.\n */\n assetName?: string\n /**\n * Specifies a URL where more information about the asset can be retrieved.\n */\n url?: string\n /**\n * Specifies a commitment to some unspecified asset metadata. The format of this\n * metadata is up to the application.\n */\n metadataHash?: Uint8Array\n /**\n * Manager specifies an account that is allowed to change the non-zero addresses in this AssetParams.\n */\n manager?: Address\n /**\n * Specifies an account whose holdings of this asset should be reported as \"not minted\".\n */\n reserve?: Address\n /**\n * Specifies an account that is allowed to change the frozen state of holdings of this asset.\n */\n freeze?: Address\n /**\n * Specifies an account that is allowed to take units of this asset from any account.\n */\n clawback?: Address\n}\n\nexport const LedgerAssetParamsMeta: ObjectModelMetadata<LedgerAssetParams> = {\n name: 'LedgerAssetParams',\n kind: 'object',\n fields: [\n { name: 'total', wireKey: 't', optional: false, codec: bigIntCodec },\n { name: 'decimals', wireKey: 'dc', optional: false, codec: numberCodec },\n { name: 'defaultFrozen', wireKey: 'df', optional: false, 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: bytesCodec },\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\n/**\n * Tracks a changed asset params, and whether it was deleted.\n */\nexport type LedgerAssetParamsDelta = {\n deleted: boolean\n params?: LedgerAssetParams\n}\n\nexport const LedgerAssetParamsDeltaMeta: ObjectModelMetadata<LedgerAssetParamsDelta> = {\n name: 'LedgerAssetParamsDelta',\n kind: 'object',\n fields: [\n { name: 'deleted', wireKey: 'Deleted', optional: false, codec: booleanCodec },\n { name: 'params', wireKey: 'Params', optional: true, codec: new ObjectModelCodec(LedgerAssetParamsMeta) },\n ],\n}\n\n/**\n * Represents asset params and asset holding in deltas.\n */\nexport type LedgerAssetResourceRecord = {\n assetId: bigint\n address: Address\n params: LedgerAssetParamsDelta\n holding: LedgerAssetHoldingDelta\n}\n\nexport const LedgerAssetResourceRecordMeta: ObjectModelMetadata<LedgerAssetResourceRecord> = {\n name: 'LedgerAssetResourceRecord',\n kind: 'object',\n fields: [\n { name: 'assetId', wireKey: 'Aidx', optional: false, codec: bigIntCodec },\n { name: 'address', wireKey: 'Addr', optional: false, codec: addressCodec },\n { name: 'params', wireKey: 'Params', optional: false, codec: new ObjectModelCodec(LedgerAssetParamsDeltaMeta) },\n { name: 'holding', wireKey: 'Holding', optional: false, codec: new ObjectModelCodec(LedgerAssetHoldingDeltaMeta) },\n ],\n}\n\n/**\n * Holds participation information.\n */\nexport type LedgerVotingData = {\n voteId: Uint8Array\n selectionId: Uint8Array\n stateProofId: Uint8Array\n voteFirstValid: bigint\n voteLastValid: bigint\n voteKeyDilution: bigint\n}\n\nexport const LedgerVotingDataMeta: ObjectModelMetadata<LedgerVotingData> = {\n name: 'LedgerVotingData',\n kind: 'object',\n fields: [\n { name: 'voteId', wireKey: 'VoteID', optional: false, codec: bytesCodec },\n { name: 'selectionId', wireKey: 'SelectionID', optional: false, codec: bytesCodec },\n { name: 'stateProofId', wireKey: 'StateProofID', optional: false, codec: bytesCodec },\n { name: 'voteFirstValid', wireKey: 'VoteFirstValid', optional: false, codec: bigIntCodec },\n { name: 'voteLastValid', wireKey: 'VoteLastValid', optional: false, codec: bigIntCodec },\n { name: 'voteKeyDilution', wireKey: 'VoteKeyDilution', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Contains base account info like balance, status and total number of resources.\n */\nexport type LedgerAccountBaseData = {\n /**\n * Account status. Values are:\n * * 0: Offline\n * * 1: Online\n * * 2: NotParticipating\n */\n status: number\n microAlgos: bigint\n rewardsBase: bigint\n rewardedMicroAlgos: bigint\n authAddress: Address\n incentiveEligible: boolean\n /**\n * Totals across created globals, and opted in locals.\n */\n totalAppSchema: LedgerStateSchema\n /**\n * Total number of extra pages across all created apps.\n */\n totalExtraAppPages: number\n /**\n * Total number of apps this account has created.\n */\n totalAppParams: number\n /**\n * Total number of apps this account is opted into.\n */\n totalAppLocalStates: number\n /**\n * Total number of assets created by this account.\n */\n totalAssetParams: number\n /**\n * Total of asset creations and optins (i.e. number of holdings).\n */\n totalAssets: number\n /**\n * Total number of boxes associated to this account.\n */\n totalBoxes: bigint\n /**\n * Total bytes for this account's boxes. keys and values count.\n */\n totalBoxBytes: bigint\n /**\n * The last round that this account proposed the winning block.\n */\n lastProposed: bigint\n /**\n * The last round that this account sent a heartbeat to show it was online.\n */\n lastHeartbeat: bigint\n}\n\nexport const LedgerAccountBaseDataMeta: ObjectModelMetadata<LedgerAccountBaseData> = {\n name: 'LedgerAccountBaseData',\n kind: 'object',\n fields: [\n { name: 'status', wireKey: 'Status', optional: false, codec: numberCodec },\n { name: 'microAlgos', wireKey: 'MicroAlgos', optional: false, codec: bigIntCodec },\n { name: 'rewardsBase', wireKey: 'RewardsBase', optional: false, codec: bigIntCodec },\n {\n name: 'rewardedMicroAlgos',\n wireKey: 'RewardedMicroAlgos',\n optional: false,\n codec: bigIntCodec,\n },\n { name: 'authAddress', wireKey: 'AuthAddr', optional: false, codec: addressCodec },\n { name: 'incentiveEligible', wireKey: 'IncentiveEligible', optional: false, codec: booleanCodec },\n {\n name: 'totalAppSchema',\n wireKey: 'TotalAppSchema',\n optional: false,\n codec: new ObjectModelCodec(LedgerStateSchemaMeta),\n },\n { name: 'totalExtraAppPages', wireKey: 'TotalExtraAppPages', optional: false, codec: numberCodec },\n { name: 'totalAppParams', wireKey: 'TotalAppParams', optional: false, codec: numberCodec },\n { name: 'totalAppLocalStates', wireKey: 'TotalAppLocalStates', optional: false, codec: numberCodec },\n { name: 'totalAssetParams', wireKey: 'TotalAssetParams', optional: false, codec: numberCodec },\n { name: 'totalAssets', wireKey: 'TotalAssets', optional: false, codec: numberCodec },\n { name: 'totalBoxes', wireKey: 'TotalBoxes', optional: false, codec: bigIntCodec },\n { name: 'totalBoxBytes', wireKey: 'TotalBoxBytes', optional: false, codec: bigIntCodec },\n { name: 'lastProposed', wireKey: 'LastProposed', optional: false, codec: bigIntCodec },\n { name: 'lastHeartbeat', wireKey: 'LastHeartbeat', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Provides per-account data.\n */\nexport type LedgerAccountData = {\n accountBaseData: LedgerAccountBaseData\n votingData: LedgerVotingData\n}\n\nexport const LedgerAccountDataMeta: ObjectModelMetadata<LedgerAccountData> = {\n name: 'LedgerAccountData',\n kind: 'object',\n fields: [\n {\n name: 'accountBaseData',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(LedgerAccountBaseDataMeta),\n },\n { name: 'votingData', flattened: true, optional: false, codec: new ObjectModelCodec(LedgerVotingDataMeta) },\n ],\n}\n\nexport type LedgerBalanceRecord = {\n address: Address\n accountData: LedgerAccountData\n}\n\nexport const LedgerBalanceRecordMeta: ObjectModelMetadata<LedgerBalanceRecord> = {\n name: 'LedgerBalanceRecord',\n kind: 'object',\n fields: [\n { name: 'address', wireKey: 'Addr', optional: false, codec: addressCodec },\n { name: 'accountData', flattened: true, optional: false, codec: new ObjectModelCodec(LedgerAccountDataMeta) },\n ],\n}\n\nexport type LedgerAccountDeltas = {\n accounts?: LedgerBalanceRecord[]\n appResources?: LedgerAppResourceRecord[]\n assetResources?: LedgerAssetResourceRecord[]\n}\n\nexport const LedgerAccountDeltasMeta: ObjectModelMetadata<LedgerAccountDeltas> = {\n name: 'LedgerAccountDeltas',\n kind: 'object',\n fields: [\n {\n name: 'accounts',\n wireKey: 'Accts',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(LedgerBalanceRecordMeta)),\n },\n {\n name: 'appResources',\n wireKey: 'AppResources',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(LedgerAppResourceRecordMeta)),\n },\n {\n name: 'assetResources',\n wireKey: 'AssetResources',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(LedgerAssetResourceRecordMeta)),\n },\n ],\n}\n\n/**\n * Shows how the data associated with a key in the kvstore has changed.\n */\nexport type LedgerKvValueDelta = {\n /**\n * Stores the most recent value (undefined means deleted).\n */\n data?: Uint8Array\n /**\n * Stores the previous value (undefined means didn't exist).\n */\n oldData?: Uint8Array\n}\n\nexport const LedgerKvValueDeltaMeta: ObjectModelMetadata<LedgerKvValueDelta> = {\n name: 'LedgerKvValueDelta',\n kind: 'object',\n fields: [\n { name: 'data', wireKey: 'Data', optional: true, codec: bytesCodec },\n { name: 'oldData', wireKey: 'OldData', optional: true, codec: bytesCodec },\n ],\n}\n\n/**\n * Defines the transactions included in a block, their index and last valid round.\n */\nexport type LedgerIncludedTransactions = {\n lastValid: bigint\n /**\n * The index of the transaction in the block.\n */\n intra: number\n}\n\nexport const LedgerIncludedTransactionsMeta: ObjectModelMetadata<LedgerIncludedTransactions> = {\n name: 'LedgerIncludedTransactions',\n kind: 'object',\n fields: [\n { name: 'lastValid', wireKey: 'LastValid', optional: false, codec: bigIntCodec },\n { name: 'intra', wireKey: 'Intra', optional: false, codec: numberCodec },\n ],\n}\n\n/**\n * Represents a change to a single creatable state.\n */\nexport type LedgerModifiedCreatable = {\n /**\n * Type of the creatable. The values are:\n * * 0: Asset\n * * 1: Application\n */\n creatableType: number\n /**\n * Created if true, deleted if false.\n */\n created: boolean\n /**\n * Creator of the app/asset.\n */\n creator: Address\n /**\n * Keeps track of how many times this app/asset appears in accountUpdates.creatableDeltas.\n */\n nDeltas: number\n}\n\nexport const LedgerModifiedCreatableMeta: ObjectModelMetadata<LedgerModifiedCreatable> = {\n name: 'LedgerModifiedCreatable',\n kind: 'object',\n fields: [\n { name: 'creatableType', wireKey: 'Ctype', optional: false, codec: numberCodec },\n { name: 'created', wireKey: 'Created', optional: false, codec: booleanCodec },\n { name: 'creator', wireKey: 'Creator', optional: false, codec: addressCodec },\n { name: 'ndeltas', wireKey: 'Ndeltas', optional: false, codec: numberCodec },\n ],\n}\n\n/**\n * Represents a total of algos of a certain class of accounts (split up by their Status value).\n */\nexport type LedgerAlgoCount = {\n /**\n * Sum of algos of all accounts in this scope.\n */\n money: bigint\n /**\n * Total number of whole reward units in accounts.\n */\n rewardUnits: bigint\n}\n\nexport const LedgerAlgoCountMeta: ObjectModelMetadata<LedgerAlgoCount> = {\n name: 'LedgerAlgoCount',\n kind: 'object',\n fields: [\n { name: 'money', wireKey: 'mon', optional: false, codec: bigIntCodec },\n { name: 'rewardUnits', wireKey: 'rwd', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Represents the totals of algos in the system grouped by different account status values.\n */\nexport type LedgerAccountTotals = {\n online: LedgerAlgoCount\n offline: LedgerAlgoCount\n notParticipating: LedgerAlgoCount\n /**\n * Total number of algos received per reward unit since genesis.\n */\n rewardsLevel: bigint\n}\n\nexport const LedgerAccountTotalsMeta: ObjectModelMetadata<LedgerAccountTotals> = {\n name: 'LedgerAccountTotals',\n kind: 'object',\n fields: [\n { name: 'online', wireKey: 'online', optional: false, codec: new ObjectModelCodec(LedgerAlgoCountMeta) },\n { name: 'offline', wireKey: 'offline', optional: false, codec: new ObjectModelCodec(LedgerAlgoCountMeta) },\n { name: 'notParticipating', wireKey: 'notpart', optional: false, codec: new ObjectModelCodec(LedgerAlgoCountMeta) },\n { name: 'rewardsLevel', wireKey: 'rwdlvl', optional: false, codec: bigIntCodec },\n ],\n}\n\n/**\n * Describes the delta between a given round to the previous round.\n */\nexport type LedgerStateDelta = {\n /**\n * Modified new accounts.\n */\n accounts: LedgerAccountDeltas\n /**\n * Block header.\n */\n block: Block\n /**\n * Represents modification on StateProofNextRound field in the block header. If the block contains\n * a valid state proof transaction, this field will contain the next round for state proof.\n * otherwise it will be set to 0.\n */\n stateProofNext: bigint\n /**\n * Previous block timestamp\n */\n prevTimestamp: bigint\n /**\n * The account totals reflecting the changes in this StateDelta object.\n */\n totals: LedgerAccountTotals\n /**\n * Modified kv pairs.\n */\n kvMods?: Map<Uint8Array, LedgerKvValueDelta>\n /**\n * New Txids for the txtail and TxnCounter, mapped to txn.LastValid.\n */\n txIds?: Map<Uint8Array, LedgerIncludedTransactions>\n /**\n * New creatables creator lookup table.\n */\n creatables?: Map<number, LedgerModifiedCreatable>\n}\n\nexport const LedgerStateDeltaMeta: ObjectModelMetadata<LedgerStateDelta> = {\n name: 'LedgerStateDelta',\n kind: 'object',\n fields: [\n { name: 'accounts', wireKey: 'Accts', optional: false, codec: new ObjectModelCodec(LedgerAccountDeltasMeta) },\n { name: 'block', wireKey: 'Hdr', optional: false, codec: blockCodec },\n { name: 'stateProofNext', wireKey: 'StateProofNext', optional: false, codec: bigIntCodec },\n { name: 'prevTimestamp', wireKey: 'PrevTimestamp', optional: false, codec: bigIntCodec },\n { name: 'totals', wireKey: 'Totals', optional: false, codec: new ObjectModelCodec(LedgerAccountTotalsMeta) },\n {\n name: 'kvMods',\n wireKey: 'KvMods',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(LedgerKvValueDeltaMeta)),\n },\n {\n name: 'txIds',\n wireKey: 'Txids',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(LedgerIncludedTransactionsMeta)),\n },\n {\n name: 'creatables',\n wireKey: 'Creatables',\n optional: true,\n codec: new MapCodec(numberCodec, new ObjectModelCodec(LedgerModifiedCreatableMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,MAAaA,sBAA4D;CACvE,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAO,OAAO;GAAa;EACpE;GAAE,MAAM;GAAS,SAAS;GAAM,UAAU;GAAM,OAAO;GAAY;EACnE;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAO;GAAa;EACpE;CACF;AAYD,MAAaC,wBAAgE;CAC3E,MAAM;CACN,MAAM;CACN,QAAQ,CACN;EAAE,MAAM;EAAY,SAAS;EAAO,UAAU;EAAM,OAAO;EAAa,EACxE;EAAE,MAAM;EAAiB,SAAS;EAAO,UAAU;EAAM,OAAO;EAAa,CAC9E;CACF;AAgBD,MAAaC,sBAA4D;CACvE,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAmB,SAAS;GAAU,UAAU;GAAO,OAAO;GAAY;EAClF;GAAE,MA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IAAI,iBAAiB,+BAA+B,CAAC;GACtF;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,aAAa,IAAI,iBAAiB,4BAA4B,CAAC;GACpF;EACF;CACF"}
@@ -1,5 +1,5 @@
1
1
  const require_bigint = require('../../../common/src/codecs/primitives/bigint.js');
2
- const require_bytes = require('../../../common/src/codecs/primitives/bytes.js');
2
+ const require_fixed_bytes = require('../../../common/src/codecs/primitives/fixed-bytes.js');
3
3
  const require_string = require('../../../common/src/codecs/primitives/string.js');
4
4
 
5
5
  //#region packages/algod_client/src/models/transaction-parameters-response.ts
@@ -23,7 +23,7 @@ const TransactionParametersResponseMeta = {
23
23
  name: "genesisHash",
24
24
  wireKey: "genesis-hash",
25
25
  optional: false,
26
- codec: require_bytes.bytesCodec
26
+ codec: require_fixed_bytes.fixedBytes32Codec
27
27
  },
28
28
  {
29
29
  name: "genesisId",
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-parameters-response.js","names":["TransactionParametersResponseMeta: ObjectModelMetadata<TransactionParametersResponse>","stringCodec","bigIntCodec","bytesCodec"],"sources":["../../../../../packages/algod_client/src/models/transaction-parameters-response.ts"],"sourcesContent":["import type { ObjectModelMetadata } from '@algorandfoundation/algokit-common'\nimport { stringCodec, bigIntCodec, bytesCodec } from '@algorandfoundation/algokit-common'\n\n/**\n * TransactionParams contains the parameters that help a client construct\n * a new transaction.\n */\nexport type TransactionParametersResponse = {\n /**\n * ConsensusVersion indicates the consensus protocol version\n * as of LastRound.\n */\n consensusVersion: string\n\n /**\n * Fee is the suggested transaction fee\n * Fee is in units of micro-Algos per byte.\n * Fee may fall to zero but transactions must still have a fee of\n * at least MinTxnFee for the current network protocol.\n */\n fee: bigint\n\n /**\n * GenesisHash is the hash of the genesis block.\n */\n genesisHash: Uint8Array\n\n /**\n * GenesisID is an ID listed in the genesis block.\n */\n genesisId: string\n\n /**\n * LastRound indicates the last round seen\n */\n lastRound: bigint\n\n /**\n * The minimum transaction fee (not per byte) required for the\n * txn to validate for the current network protocol.\n */\n minFee: bigint\n}\n\nexport const TransactionParametersResponseMeta: ObjectModelMetadata<TransactionParametersResponse> = {\n name: 'TransactionParametersResponse',\n kind: 'object',\n fields: [\n {\n name: 'consensusVersion',\n wireKey: 'consensus-version',\n optional: false,\n codec: stringCodec,\n },\n {\n name: 'fee',\n wireKey: 'fee',\n optional: false,\n codec: bigIntCodec,\n },\n {\n name: 'genesisHash',\n wireKey: 'genesis-hash',\n optional: false,\n codec: bytesCodec,\n },\n {\n name: 'genesisId',\n wireKey: 'genesis-id',\n optional: false,\n codec: stringCodec,\n },\n {\n name: 'lastRound',\n wireKey: 'last-round',\n optional: false,\n codec: bigIntCodec,\n },\n {\n name: 'minFee',\n wireKey: 'min-fee',\n optional: false,\n codec: bigIntCodec,\n },\n ],\n}\n"],"mappings":";;;;;AA4CA,MAAaA,oCAAwF;CACnG,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOF;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOA;GACR;EACF;CACF"}
1
+ {"version":3,"file":"transaction-parameters-response.js","names":["TransactionParametersResponseMeta: ObjectModelMetadata<TransactionParametersResponse>","stringCodec","bigIntCodec","fixedBytes32Codec"],"sources":["../../../../../packages/algod_client/src/models/transaction-parameters-response.ts"],"sourcesContent":["import type { ObjectModelMetadata } from '@algorandfoundation/algokit-common'\nimport { stringCodec, bigIntCodec, fixedBytes32Codec } from '@algorandfoundation/algokit-common'\n\n/**\n * TransactionParams contains the parameters that help a client construct\n * a new transaction.\n */\nexport type TransactionParametersResponse = {\n /**\n * ConsensusVersion indicates the consensus protocol version\n * as of LastRound.\n */\n consensusVersion: string\n\n /**\n * Fee is the suggested transaction fee\n * Fee is in units of micro-Algos per byte.\n * Fee may fall to zero but transactions must still have a fee of\n * at least MinTxnFee for the current network protocol.\n */\n fee: bigint\n\n /**\n * GenesisHash is the hash of the genesis block.\n */\n genesisHash: Uint8Array\n\n /**\n * GenesisID is an ID listed in the genesis block.\n */\n genesisId: string\n\n /**\n * LastRound indicates the last round seen\n */\n lastRound: bigint\n\n /**\n * The minimum transaction fee (not per byte) required for the\n * txn to validate for the current network protocol.\n */\n minFee: bigint\n}\n\nexport const TransactionParametersResponseMeta: ObjectModelMetadata<TransactionParametersResponse> = {\n name: 'TransactionParametersResponse',\n kind: 'object',\n fields: [\n {\n name: 'consensusVersion',\n wireKey: 'consensus-version',\n optional: false,\n codec: stringCodec,\n },\n {\n name: 'fee',\n wireKey: 'fee',\n optional: false,\n codec: bigIntCodec,\n },\n {\n name: 'genesisHash',\n wireKey: 'genesis-hash',\n optional: false,\n codec: fixedBytes32Codec,\n },\n {\n name: 'genesisId',\n wireKey: 'genesis-id',\n optional: false,\n codec: stringCodec,\n },\n {\n name: 'lastRound',\n wireKey: 'last-round',\n optional: false,\n codec: bigIntCodec,\n },\n {\n name: 'minFee',\n wireKey: 'min-fee',\n optional: false,\n codec: bigIntCodec,\n },\n ],\n}\n"],"mappings":";;;;;AA4CA,MAAaA,oCAAwF;CACnG,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOF;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOC;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAOA;GACR;EACF;CACF"}
@@ -1,5 +1,5 @@
1
1
  import { bigIntCodec } from "../../../common/src/codecs/primitives/bigint.mjs";
2
- import { bytesCodec } from "../../../common/src/codecs/primitives/bytes.mjs";
2
+ import { fixedBytes32Codec } from "../../../common/src/codecs/primitives/fixed-bytes.mjs";
3
3
  import { stringCodec } from "../../../common/src/codecs/primitives/string.mjs";
4
4
 
5
5
  //#region packages/algod_client/src/models/transaction-parameters-response.ts
@@ -23,7 +23,7 @@ const TransactionParametersResponseMeta = {
23
23
  name: "genesisHash",
24
24
  wireKey: "genesis-hash",
25
25
  optional: false,
26
- codec: bytesCodec
26
+ codec: fixedBytes32Codec
27
27
  },
28
28
  {
29
29
  name: "genesisId",
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-parameters-response.mjs","names":["TransactionParametersResponseMeta: ObjectModelMetadata<TransactionParametersResponse>"],"sources":["../../../../../packages/algod_client/src/models/transaction-parameters-response.ts"],"sourcesContent":["import type { ObjectModelMetadata } from '@algorandfoundation/algokit-common'\nimport { stringCodec, bigIntCodec, bytesCodec } from '@algorandfoundation/algokit-common'\n\n/**\n * TransactionParams contains the parameters that help a client construct\n * a new transaction.\n */\nexport type TransactionParametersResponse = {\n /**\n * ConsensusVersion indicates the consensus protocol version\n * as of LastRound.\n */\n consensusVersion: string\n\n /**\n * Fee is the suggested transaction fee\n * Fee is in units of micro-Algos per byte.\n * Fee may fall to zero but transactions must still have a fee of\n * at least MinTxnFee for the current network protocol.\n */\n fee: bigint\n\n /**\n * GenesisHash is the hash of the genesis block.\n */\n genesisHash: Uint8Array\n\n /**\n * GenesisID is an ID listed in the genesis block.\n */\n genesisId: string\n\n /**\n * LastRound indicates the last round seen\n */\n lastRound: bigint\n\n /**\n * The minimum transaction fee (not per byte) required for the\n * txn to validate for the current network protocol.\n */\n minFee: bigint\n}\n\nexport const TransactionParametersResponseMeta: ObjectModelMetadata<TransactionParametersResponse> = {\n name: 'TransactionParametersResponse',\n kind: 'object',\n fields: [\n {\n name: 'consensusVersion',\n wireKey: 'consensus-version',\n optional: false,\n codec: stringCodec,\n },\n {\n name: 'fee',\n wireKey: 'fee',\n optional: false,\n codec: bigIntCodec,\n },\n {\n name: 'genesisHash',\n wireKey: 'genesis-hash',\n optional: false,\n codec: bytesCodec,\n },\n {\n name: 'genesisId',\n wireKey: 'genesis-id',\n optional: false,\n codec: stringCodec,\n },\n {\n name: 'lastRound',\n wireKey: 'last-round',\n optional: false,\n codec: bigIntCodec,\n },\n {\n name: 'minFee',\n wireKey: 'min-fee',\n optional: false,\n codec: bigIntCodec,\n },\n ],\n}\n"],"mappings":";;;;;AA4CA,MAAaA,oCAAwF;CACnG,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACF;CACF"}
1
+ {"version":3,"file":"transaction-parameters-response.mjs","names":["TransactionParametersResponseMeta: ObjectModelMetadata<TransactionParametersResponse>"],"sources":["../../../../../packages/algod_client/src/models/transaction-parameters-response.ts"],"sourcesContent":["import type { ObjectModelMetadata } from '@algorandfoundation/algokit-common'\nimport { stringCodec, bigIntCodec, fixedBytes32Codec } from '@algorandfoundation/algokit-common'\n\n/**\n * TransactionParams contains the parameters that help a client construct\n * a new transaction.\n */\nexport type TransactionParametersResponse = {\n /**\n * ConsensusVersion indicates the consensus protocol version\n * as of LastRound.\n */\n consensusVersion: string\n\n /**\n * Fee is the suggested transaction fee\n * Fee is in units of micro-Algos per byte.\n * Fee may fall to zero but transactions must still have a fee of\n * at least MinTxnFee for the current network protocol.\n */\n fee: bigint\n\n /**\n * GenesisHash is the hash of the genesis block.\n */\n genesisHash: Uint8Array\n\n /**\n * GenesisID is an ID listed in the genesis block.\n */\n genesisId: string\n\n /**\n * LastRound indicates the last round seen\n */\n lastRound: bigint\n\n /**\n * The minimum transaction fee (not per byte) required for the\n * txn to validate for the current network protocol.\n */\n minFee: bigint\n}\n\nexport const TransactionParametersResponseMeta: ObjectModelMetadata<TransactionParametersResponse> = {\n name: 'TransactionParametersResponse',\n kind: 'object',\n fields: [\n {\n name: 'consensusVersion',\n wireKey: 'consensus-version',\n optional: false,\n codec: stringCodec,\n },\n {\n name: 'fee',\n wireKey: 'fee',\n optional: false,\n codec: bigIntCodec,\n },\n {\n name: 'genesisHash',\n wireKey: 'genesis-hash',\n optional: false,\n codec: fixedBytes32Codec,\n },\n {\n name: 'genesisId',\n wireKey: 'genesis-id',\n optional: false,\n codec: stringCodec,\n },\n {\n name: 'lastRound',\n wireKey: 'last-round',\n optional: false,\n codec: bigIntCodec,\n },\n {\n name: 'minFee',\n wireKey: 'min-fee',\n optional: false,\n codec: bigIntCodec,\n },\n ],\n}\n"],"mappings":";;;;;AA4CA,MAAaA,oCAAwF;CACnG,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACF;CACF"}
@@ -4,8 +4,9 @@ const require_codec = require('../codec.js');
4
4
  /**
5
5
  * Map codec - handles Maps with any key type (including Uint8Array, bigint, number)
6
6
  * Depending on the encoding format, the map is encoded differently:
7
- * - json: Only supports string keys and is represented as an object when encoding.
8
- * An exception is thrown upon encountering a non-string key.
7
+ * - json: Supports string and bigint keys. The map is represented as an object when encoding.
8
+ * Bigint keys are converted to/from strings (e.g., 1n becomes "1").
9
+ * An exception is thrown upon encountering an unsupported key type.
9
10
  * - msgpack: Preserves key types and is represented as a Map when encoding.
10
11
  */
11
12
  var MapCodec = class extends require_codec.Codec {
@@ -22,7 +23,7 @@ var MapCodec = class extends require_codec.Codec {
22
23
  }
23
24
  ensureKeyIsSupported(format) {
24
25
  if (format === "msgpack") return true;
25
- if (this.keyType !== "string") throw new Error(`Map key of type '${this.keyType}' is not supported in ${format} format`);
26
+ if (this.keyType !== "string" && this.keyType !== "bigint") throw new Error(`Map key of type '${this.keyType}' is not supported in ${format} format`);
26
27
  }
27
28
  toEncoded(value, format) {
28
29
  this.ensureKeyIsSupported(format);
@@ -49,7 +50,9 @@ var MapCodec = class extends require_codec.Codec {
49
50
  if (value instanceof Map) entries = Array.from(value.entries());
50
51
  else entries = Object.entries(value);
51
52
  for (const [encodedKey, encodedValue] of entries) {
52
- const key = this.keyCodec.decode(encodedKey, format);
53
+ let keyToDecode = encodedKey;
54
+ if (format === "json" && this.keyType === "bigint" && typeof encodedKey === "string") keyToDecode = BigInt(encodedKey);
55
+ const key = this.keyCodec.decode(keyToDecode, format);
53
56
  const val = this.valueCodec.decode(encodedValue, format);
54
57
  result.set(key, val);
55
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"map.js","names":["Codec","keyCodec: Codec<K, KEncoded>","valueCodec: Codec<V, VEncoded>","entries: Array<[KEncoded, VEncoded]>","obj: Record<string, VEncoded>"],"sources":["../../../../../../packages/common/src/codecs/composite/map.ts"],"sourcesContent":["import { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\n\n/**\n * Map codec - handles Maps with any key type (including Uint8Array, bigint, number)\n * Depending on the encoding format, the map is encoded differently:\n * - json: Only supports string keys and is represented as an object when encoding.\n * An exception is thrown upon encountering a non-string key.\n * - msgpack: Preserves key types and is represented as a Map when encoding.\n */\nexport class MapCodec<K, V, KEncoded = K, VEncoded = V> extends Codec<Map<K, V>, Map<KEncoded, VEncoded> | Record<string, VEncoded>> {\n private keyType: string\n\n constructor(\n private readonly keyCodec: Codec<K, KEncoded>,\n private readonly valueCodec: Codec<V, VEncoded>,\n ) {\n super()\n const defaultKeyValue = this.keyCodec.defaultValue()\n this.keyType = defaultKeyValue instanceof Uint8Array ? 'Uint8Array' : typeof defaultKeyValue\n }\n\n public defaultValue(): Map<K, V> {\n return new Map()\n }\n\n private ensureKeyIsSupported(format: EncodingFormat) {\n if (format === 'msgpack') {\n return true\n }\n if (this.keyType !== 'string') {\n throw new Error(`Map key of type '${this.keyType}' is not supported in ${format} format`)\n }\n }\n\n protected toEncoded(value: Map<K, V>, format: EncodingFormat): Map<KEncoded, VEncoded> | Record<string, VEncoded> {\n this.ensureKeyIsSupported(format)\n\n const entries: Array<[KEncoded, VEncoded]> = []\n\n for (const [k, v] of value.entries()) {\n const encodedKey = this.keyCodec.encode(k, format)\n const encodedValue = this.valueCodec.encode(v, format)\n entries.push([encodedKey, encodedValue])\n }\n if (format === 'json') {\n const obj: Record<string, VEncoded> = {}\n for (const [k, v] of entries) {\n const keyStr = typeof k === 'string' ? k : String(k)\n obj[keyStr] = v\n }\n return obj\n }\n\n return new Map(entries)\n }\n\n protected fromEncoded(value: Map<KEncoded, VEncoded> | Record<string, VEncoded>, format: EncodingFormat): Map<K, V> {\n this.ensureKeyIsSupported(format)\n\n const result = new Map<K, V>()\n\n let entries: Array<[KEncoded, VEncoded]>\n if (value instanceof Map) {\n entries = Array.from(value.entries())\n } else {\n entries = Object.entries(value) as Array<[KEncoded, VEncoded]>\n }\n\n for (const [encodedKey, encodedValue] of entries) {\n const key = this.keyCodec.decode(encodedKey as KEncoded, format)\n const val = this.valueCodec.decode(encodedValue, format)\n result.set(key, val)\n }\n\n return result\n }\n\n public isDefaultValue(value: Map<K, V>):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GAChE,MAAM,MAAM,KAAK,WAAW,OAAO,cAAc,OAAO;AACxD,UAAO,IAAI,KAAK,IAAI;;AAGtB,SAAO;;CAGT,AAAO,eAAe,OAA2B;AAC/C,SAAO,MAAM,SAAS"}
1
+ {"version":3,"file":"map.js","names":["Codec","keyCodec: Codec<K, KEncoded>","valueCodec: Codec<V, VEncoded>","entries: Array<[KEncoded, VEncoded]>","obj: Record<string, VEncoded>"],"sources":["../../../../../../packages/common/src/codecs/composite/map.ts"],"sourcesContent":["import { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\n\n/**\n * Map codec - handles Maps with any key type (including Uint8Array, bigint, number)\n * Depending on the encoding format, the map is encoded differently:\n * - json: Supports string and bigint keys. The map is represented as an object when encoding.\n * Bigint keys are converted to/from strings (e.g., 1n becomes \"1\").\n * An exception is thrown upon encountering an unsupported key type.\n * - msgpack: Preserves key types and is represented as a Map when encoding.\n */\nexport class MapCodec<K, V, KEncoded = K, VEncoded = V> extends Codec<Map<K, V>, Map<KEncoded, VEncoded> | Record<string, VEncoded>> {\n private keyType: string\n\n constructor(\n private readonly keyCodec: Codec<K, KEncoded>,\n private readonly valueCodec: Codec<V, VEncoded>,\n ) {\n super()\n const defaultKeyValue = this.keyCodec.defaultValue()\n this.keyType = defaultKeyValue instanceof Uint8Array ? 'Uint8Array' : typeof defaultKeyValue\n }\n\n public defaultValue(): Map<K, V> {\n return new Map()\n }\n\n private ensureKeyIsSupported(format: EncodingFormat) {\n if (format === 'msgpack') {\n return true\n }\n if (this.keyType !== 'string' && this.keyType !== 'bigint') {\n throw new Error(`Map key of type '${this.keyType}' is not supported in ${format} format`)\n }\n }\n\n protected toEncoded(value: Map<K, V>, format: EncodingFormat): Map<KEncoded, VEncoded> | Record<string, VEncoded> {\n this.ensureKeyIsSupported(format)\n\n const entries: Array<[KEncoded, VEncoded]> = []\n\n for (const [k, v] of value.entries()) {\n const encodedKey = this.keyCodec.encode(k, format)\n const encodedValue = this.valueCodec.encode(v, format)\n entries.push([encodedKey, encodedValue])\n }\n if (format === 'json') {\n const obj: Record<string, VEncoded> = {}\n for (const [k, v] of entries) {\n const keyStr = typeof k === 'string' ? k : String(k)\n obj[keyStr] = v\n }\n return obj\n }\n\n return new Map(entries)\n }\n\n protected fromEncoded(value: Map<KEncoded, VEncoded> | Record<string, VEncoded>, format: EncodingFormat): Map<K, V> {\n this.ensureKeyIsSupported(format)\n\n const result = new Map<K, V>()\n\n let entries: Array<[KEncoded, VEncoded]>\n if (value instanceof Map) {\n entries = Array.from(value.entries())\n } else {\n entries = Object.entries(value) as Array<[KEncoded, VEncoded]>\n }\n\n for (const [encodedKey, encodedValue] of entries) {\n let keyToDecode = encodedKey as KEncoded\n if (format === 'json' && this.keyType === 'bigint' && typeof encodedKey === 'string') {\n keyToDecode = BigInt(encodedKey) as KEncoded\n }\n const key = this.keyCodec.decode(keyToDecode, format)\n const val = this.valueCodec.decode(encodedValue, format)\n result.set(key, val)\n }\n\n return result\n }\n\n public isDefaultValue(value: Map<K, V>): boolean {\n return value.size === 0\n }\n}\n"],"mappings":";;;;;;;;;;;AAWA,IAAa,WAAb,cAAgEA,oBAAqE;CACnI,AAAQ;CAER,YACE,AAAiBC,UACjB,AAAiBC,YACjB;AACA,SAAO;EAHU;EACA;EAGjB,MAAM,kBAAkB,KAAK,SAAS,cAAc;AACpD,OAAK,UAAU,2BAA2B,aAAa,eAAe,OAAO;;CAG/E,AAAO,eAA0B;AAC/B,yBAAO,IAAI,KAAK;;CAGlB,AAAQ,qBAAqB,QAAwB;AACnD,MAAI,WAAW,UACb,QAAO;AAET,MAAI,KAAK,YAAY,YAAY,KAAK,YAAY,SAChD,OAAM,IAAI,MAAM,oBAAoB,KAAK,QAAQ,wBAAwB,OAAO,SAAS;;CAI7F,AAAU,UAAU,OAAkB,QAA4E;AAChH,OAAK,qBAAqB,OAAO;EAEjC,MAAMC,UAAuC,EAAE;AAE/C,OAAK,MAAM,CAAC,GAAG,MAAM,MAAM,SAAS,EAAE;GACpC,MAAM,aAAa,KAAK,SAAS,OAAO,GAAG,OAAO;GAClD,MAAM,eAAe,KAAK,WAAW,OAAO,GAAG,OAAO;AACtD,WAAQ,KAAK,CAAC,YAAY,aAAa,CAAC;;AAE1C,MAAI,WAAW,QAAQ;GACrB,MAAMC,MAAgC,EAAE;AACxC,QAAK,MAAM,CAAC,GAAG,MAAM,SAAS;IAC5B,MAAM,SAAS,OAAO,MAAM,WAAW,IAAI,OAAO,EAAE;AACpD,QAAI,UAAU;;AAEhB,UAAO;;AAGT,SAAO,IAAI,IAAI,QAAQ;;CAGzB,AAAU,YAAY,OAA2D,QAAmC;AAClH,OAAK,qBAAqB,OAAO;EAEjC,MAAM,yBAAS,IAAI,KAAW;EAE9B,IAAID;AACJ,MAAI,iBAAiB,IACnB,WAAU,MAAM,KAAK,MAAM,SAAS,CAAC;MAErC,WAAU,OAAO,QAAQ,MAAM;AAGjC,OAAK,MAAM,CAAC,YAAY,iBAAiB,SAAS;GAChD,IAAI,cAAc;AAClB,OAAI,WAAW,UAAU,KAAK,YAAY,YAAY,OAAO,eAAe,SAC1E,eAAc,OAAO,WAAW;GAElC,MAAM,MAAM,KAAK,SAAS,OAAO,aAAa,OAAO;GACrD,MAAM,MAAM,KAAK,WAAW,OAAO,cAAc,OAAO;AACxD,UAAO,IAAI,KAAK,IAAI;;AAGtB,SAAO;;CAGT,AAAO,eAAe,OAA2B;AAC/C,SAAO,MAAM,SAAS"}
@@ -4,8 +4,9 @@ import { Codec } from "../codec.mjs";
4
4
  /**
5
5
  * Map codec - handles Maps with any key type (including Uint8Array, bigint, number)
6
6
  * Depending on the encoding format, the map is encoded differently:
7
- * - json: Only supports string keys and is represented as an object when encoding.
8
- * An exception is thrown upon encountering a non-string key.
7
+ * - json: Supports string and bigint keys. The map is represented as an object when encoding.
8
+ * Bigint keys are converted to/from strings (e.g., 1n becomes "1").
9
+ * An exception is thrown upon encountering an unsupported key type.
9
10
  * - msgpack: Preserves key types and is represented as a Map when encoding.
10
11
  */
11
12
  var MapCodec = class extends Codec {
@@ -22,7 +23,7 @@ var MapCodec = class extends Codec {
22
23
  }
23
24
  ensureKeyIsSupported(format) {
24
25
  if (format === "msgpack") return true;
25
- if (this.keyType !== "string") throw new Error(`Map key of type '${this.keyType}' is not supported in ${format} format`);
26
+ if (this.keyType !== "string" && this.keyType !== "bigint") throw new Error(`Map key of type '${this.keyType}' is not supported in ${format} format`);
26
27
  }
27
28
  toEncoded(value, format) {
28
29
  this.ensureKeyIsSupported(format);
@@ -49,7 +50,9 @@ var MapCodec = class extends Codec {
49
50
  if (value instanceof Map) entries = Array.from(value.entries());
50
51
  else entries = Object.entries(value);
51
52
  for (const [encodedKey, encodedValue] of entries) {
52
- const key = this.keyCodec.decode(encodedKey, format);
53
+ let keyToDecode = encodedKey;
54
+ if (format === "json" && this.keyType === "bigint" && typeof encodedKey === "string") keyToDecode = BigInt(encodedKey);
55
+ const key = this.keyCodec.decode(keyToDecode, format);
53
56
  const val = this.valueCodec.decode(encodedValue, format);
54
57
  result.set(key, val);
55
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"map.mjs","names":["keyCodec: Codec<K, KEncoded>","valueCodec: Codec<V, VEncoded>","entries: Array<[KEncoded, VEncoded]>","obj: Record<string, VEncoded>"],"sources":["../../../../../../packages/common/src/codecs/composite/map.ts"],"sourcesContent":["import { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\n\n/**\n * Map codec - handles Maps with any key type (including Uint8Array, bigint, number)\n * Depending on the encoding format, the map is encoded differently:\n * - json: Only supports string keys and is represented as an object when encoding.\n * An exception is thrown upon encountering a non-string key.\n * - msgpack: Preserves key types and is represented as a Map when encoding.\n */\nexport class MapCodec<K, V, KEncoded = K, VEncoded = V> extends Codec<Map<K, V>, Map<KEncoded, VEncoded> | Record<string, VEncoded>> {\n private keyType: string\n\n constructor(\n private readonly keyCodec: Codec<K, KEncoded>,\n private readonly valueCodec: Codec<V, VEncoded>,\n ) {\n super()\n const defaultKeyValue = this.keyCodec.defaultValue()\n this.keyType = defaultKeyValue instanceof Uint8Array ? 'Uint8Array' : typeof defaultKeyValue\n }\n\n public defaultValue(): Map<K, V> {\n return new Map()\n }\n\n private ensureKeyIsSupported(format: EncodingFormat) {\n if (format === 'msgpack') {\n return true\n }\n if (this.keyType !== 'string') {\n throw new Error(`Map key of type '${this.keyType}' is not supported in ${format} format`)\n }\n }\n\n protected toEncoded(value: Map<K, V>, format: EncodingFormat): Map<KEncoded, VEncoded> | Record<string, VEncoded> {\n this.ensureKeyIsSupported(format)\n\n const entries: Array<[KEncoded, VEncoded]> = []\n\n for (const [k, v] of value.entries()) {\n const encodedKey = this.keyCodec.encode(k, format)\n const encodedValue = this.valueCodec.encode(v, format)\n entries.push([encodedKey, encodedValue])\n }\n if (format === 'json') {\n const obj: Record<string, VEncoded> = {}\n for (const [k, v] of entries) {\n const keyStr = typeof k === 'string' ? k : String(k)\n obj[keyStr] = v\n }\n return obj\n }\n\n return new Map(entries)\n }\n\n protected fromEncoded(value: Map<KEncoded, VEncoded> | Record<string, VEncoded>, format: EncodingFormat): Map<K, V> {\n this.ensureKeyIsSupported(format)\n\n const result = new Map<K, V>()\n\n let entries: Array<[KEncoded, VEncoded]>\n if (value instanceof Map) {\n entries = Array.from(value.entries())\n } else {\n entries = Object.entries(value) as Array<[KEncoded, VEncoded]>\n }\n\n for (const [encodedKey, encodedValue] of entries) {\n const key = this.keyCodec.decode(encodedKey as KEncoded, format)\n const val = this.valueCodec.decode(encodedValue, format)\n result.set(key, val)\n }\n\n return result\n }\n\n public isDefaultValue(value: Map<K, V>): boolean {\n return value.size === 0\n }\n}\n"],"mappings":";;;;;;;;;;AAUA,IAAa,WAAb,cAAgE,MAAqE;CACnI,AAAQ;CAER,YACE,AAAiBA,UACjB,AAAiBC,YACjB;AACA,SAAO;EAHU;EACA;EAGjB,MAAM,kBAAkB,KAAK,SAAS,cAAc;AACpD,OAAK,UAAU,2BAA2B,aAAa,eAAe,OAAO;;CAG/E,AAAO,eAA0B;A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>"],"sources":["../../../../../../packages/common/src/codecs/composite/map.ts"],"sourcesContent":["import { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\n\n/**\n * Map codec - handles Maps with any key type (including Uint8Array, bigint, number)\n * Depending on the encoding format, the map is encoded differently:\n * - json: Supports string and bigint keys. The map is represented as an object when encoding.\n * Bigint keys are converted to/from strings (e.g., 1n becomes \"1\").\n * An exception is thrown upon encountering an unsupported key type.\n * - msgpack: Preserves key types and is represented as a Map when encoding.\n */\nexport class MapCodec<K, V, KEncoded = K, VEncoded = V> extends Codec<Map<K, V>, Map<KEncoded, VEncoded> | Record<string, VEncoded>> {\n private keyType: string\n\n constructor(\n private readonly keyCodec: Codec<K, KEncoded>,\n private readonly valueCodec: Codec<V, VEncoded>,\n ) {\n super()\n const defaultKeyValue = this.keyCodec.defaultValue()\n this.keyType = defaultKeyValue instanceof Uint8Array ? 'Uint8Array' : typeof defaultKeyValue\n }\n\n public defaultValue(): Map<K, V> {\n return new Map()\n }\n\n private ensureKeyIsSupported(format: EncodingFormat) {\n if (format === 'msgpack') {\n return true\n }\n if (this.keyType !== 'string' && this.keyType !== 'bigint') {\n throw new Error(`Map key of type '${this.keyType}' is not supported in ${format} format`)\n }\n }\n\n protected toEncoded(value: Map<K, V>, format: EncodingFormat): Map<KEncoded, VEncoded> | Record<string, VEncoded> {\n this.ensureKeyIsSupported(format)\n\n const entries: Array<[KEncoded, VEncoded]> = []\n\n for (const [k, v] of value.entries()) {\n const encodedKey = this.keyCodec.encode(k, format)\n const encodedValue = this.valueCodec.encode(v, format)\n entries.push([encodedKey, encodedValue])\n }\n if (format === 'json') {\n const obj: Record<string, VEncoded> = {}\n for (const [k, v] of entries) {\n const keyStr = typeof k === 'string' ? k : String(k)\n obj[keyStr] = v\n }\n return obj\n }\n\n return new Map(entries)\n }\n\n protected fromEncoded(value: Map<KEncoded, VEncoded> | Record<string, VEncoded>, format: EncodingFormat): Map<K, V> {\n this.ensureKeyIsSupported(format)\n\n const result = new Map<K, V>()\n\n let entries: Array<[KEncoded, VEncoded]>\n if (value instanceof Map) {\n entries = Array.from(value.entries())\n } else {\n entries = Object.entries(value) as Array<[KEncoded, VEncoded]>\n }\n\n for (const [encodedKey, encodedValue] of entries) {\n let keyToDecode = encodedKey as KEncoded\n if (format === 'json' && this.keyType === 'bigint' && typeof encodedKey === 'string') {\n keyToDecode = BigInt(encodedKey) as KEncoded\n }\n const key = this.keyCodec.decode(keyToDecode, format)\n const val = this.valueCodec.decode(encodedValue, format)\n result.set(key, val)\n }\n\n return result\n }\n\n public isDefaultValue(value: Map<K, V>): boolean {\n return value.size === 0\n }\n}\n"],"mappings":";;;;;;;;;;;AAWA,IAAa,WAAb,cAAgE,MAAqE;CACnI,AAAQ;CAER,YACE,AAAiBA,UACjB,AAAiBC,YACjB;AACA,SAAO;EAHU;EACA;EAGjB,MAAM,kBAAkB,KAAK,SAAS,cAAc;AACpD,OAAK,UAAU,2BAA2B,aAAa,eAAe,OAAO;;CAG/E,AAAO,eAA0B;AAC/B,yBAAO,IAAI,KAAK;;CAGlB,AAAQ,qBAAqB,QAAwB;AACnD,MAAI,WAAW,UACb,QAAO;AAET,MAAI,KAAK,YAAY,YAAY,KAAK,YAAY,SAChD,OAAM,IAAI,MAAM,oBAAoB,KAAK,QAAQ,wBAAwB,OAAO,SAAS;;CAI7F,AAAU,UAAU,OAAkB,QAA4E;AAChH,OAAK,qBAAqB,OAAO;EAEjC,MAAMC,UAAuC,EAAE;AAE/C,OAAK,MAAM,CAAC,GAAG,MAAM,MAAM,SAAS,EAAE;GACpC,MAAM,aAAa,KAAK,SAAS,OAAO,GAAG,OAAO;GAClD,MAAM,eAAe,KAAK,WAAW,OAAO,GAAG,OAAO;AACtD,WAAQ,KAAK,CAAC,YAAY,aAAa,CAAC;;AAE1C,MAAI,WAAW,QAAQ;GACrB,MAAMC,MAAgC,EAAE;AACxC,QAAK,MAAM,CAAC,GAAG,MAAM,SAAS;IAC5B,MAAM,SAAS,OAAO,MAAM,WAAW,IAAI,OAAO,EAAE;AACpD,QAAI,UAAU;;AAEhB,UAAO;;AAGT,SAAO,IAAI,IAAI,QAAQ;;CAGzB,AAAU,YAAY,OAA2D,QAAmC;AAClH,OAAK,qBAAqB,OAAO;EAEjC,MAAM,yBAAS,IAAI,KAAW;EAE9B,IAAID;AACJ,MAAI,iBAAiB,IACnB,WAAU,MAAM,KAAK,MAAM,SAAS,CAAC;MAErC,WAAU,OAAO,QAAQ,MAAM;AAGjC,OAAK,MAAM,CAAC,YAAY,iBAAiB,SAAS;GAChD,IAAI,cAAc;AAClB,OAAI,WAAW,UAAU,KAAK,YAAY,YAAY,OAAO,eAAe,SAC1E,eAAc,OAAO,WAAW;GAElC,MAAM,MAAM,KAAK,SAAS,OAAO,aAAa,OAAO;GACrD,MAAM,MAAM,KAAK,WAAW,OAAO,cAAc,OAAO;AACxD,UAAO,IAAI,KAAK,IAAI;;AAGtB,SAAO;;CAGT,AAAO,eAAe,OAA2B;AAC/C,SAAO,MAAM,SAAS"}
@@ -1,7 +1,6 @@
1
1
  const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.js');
2
2
  const require_codec = require('../codec.js');
3
3
  let buffer = require("buffer");
4
- buffer = require_rolldown_runtime.__toESM(buffer);
5
4
 
6
5
  //#region packages/common/src/codecs/composite/record.ts
7
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"record.js","names":["Codec","valueCodec: Codec<V, VEncoded>","result: Record<string, VEncoded>","result: Record<string, V>","Buffer"],"sources":["../../../../../../packages/common/src/codecs/composite/record.ts"],"sourcesContent":["import { Buffer } from 'buffer'\nimport { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\nimport { WireObject } from '../wire'\n\n/**\n * Record codec - for string-keyed objects with homogeneous values\n */\nexport class RecordCodec<V, VEncoded = V> extends Codec<Record<string, V>, Record<string, VEncoded>, WireObject<VEncoded>> {\n constructor(private readonly valueCodec: Codec<V, VEncoded>) {\n super()\n }\n\n public defaultValue(): Record<string, V> {\n return {}\n }\n\n protected toEncoded(value: Record<string, V>, format: EncodingFormat): Record<string, VEncoded> {\n const result: Record<string, VEncoded> = {}\n\n for (const [key, val] of Object.entries(value)) {\n const encoded = this.valueCodec.encode(val, format)\n result[key] = encoded\n }\n\n return result\n }\n\n protected fromEncoded(value: WireObject<VEncoded>, format: EncodingFormat): Record<string, V> {\n const result: Record<string, V> = {}\n if (value instanceof Map) {\n for (const [_key, val] of value.entries()) {\n const keyType = typeof _key\n if (keyType === 'number' || keyType === 'bigint') {\n throw new Error(`RecordCodec received a non-string key of type ${keyType}`)\n }\n const key = _key instanceof Uint8Array ? Buffer.from(_key).toString('utf-8') : String(_key)\n result[key] = this.valueCodec.decode(val, format)\n }\n } else {\n for (const [key, val] of Object.entries(value)) {\n result[key] = this.valueCodec.decode(val, format)\n }\n }\n\n return result\n }\n\n public isDefaultValue(value: Record<string, V>): boolean {\n return Object.keys(value).length === 0\n }\n}\n"],"mappings":";;;;;;;;;AAQA,IAAa,cAAb,cAAkDA,oBAAyE;CACzH,YAAY,AAAiBC,YAAgC;AAC3D,SAAO;EADoB;;CAI7B,AAAO,eAAkC;AACvC,SAAO,EAAE;;CAGX,AAAU,UAAU,OAA0B,QAAkD;EAC9F,MAAMC,SAAmC,EAAE;AAE3C,OAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,QAAQ,MAAM,CAE5C,QAAO,OADS,KAAK,WAAW,OAAO,KAAK,OAAO;AAIrD,SAAO;;CAGT,AAAU,YAAY,OAA6B,QAA2C;EAC5F,MAAMC,SAA4B,EAAE;AACpC,MAAI,iBAAiB,IACnB,MAAK,MAAM,CAAC,MAAM,QAAQ,MAAM,SAAS,EAAE;GACzC,MAAM,UAAU,OAAO;AACvB,OAAI,YAAY,YAAY,YAAY,SACtC,OAAM,IAAI,MAAM,iDAAiD,UAAU;GAE7E,MAAM,MAAM,gBAAgB,aAAaC,cAAO,KAAK,KAAK,CAAC,SAAS,QAAQ,GAAG,OAAO,KAAK;AAC3F,UAAO,OAAO,KAAK,WAAW,OAAO,KAAK,OAAO;;MAGnD,MAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,QAAQ,MAAM,CAC5C,QAAO,OAAO,KAAK,WAAW,OAAO,KAAK,OAAO;AAIrD,SAAO;;CAGT,AAAO,eAAe,OAAmC;AACvD,SAAO,OAAO,KAAK,MAAM,CAAC,WAAW"}
1
+ {"version":3,"file":"record.js","names":["Codec","valueCodec: Codec<V, VEncoded>","result: Record<string, VEncoded>","result: Record<string, V>","Buffer"],"sources":["../../../../../../packages/common/src/codecs/composite/record.ts"],"sourcesContent":["import { Buffer } from 'buffer'\nimport { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\nimport { WireObject } from '../wire'\n\n/**\n * Record codec - for string-keyed objects with homogeneous values\n */\nexport class RecordCodec<V, VEncoded = V> extends Codec<Record<string, V>, Record<string, VEncoded>, WireObject<VEncoded>> {\n constructor(private readonly valueCodec: Codec<V, VEncoded>) {\n super()\n }\n\n public defaultValue(): Record<string, V> {\n return {}\n }\n\n protected toEncoded(value: Record<string, V>, format: EncodingFormat): Record<string, VEncoded> {\n const result: Record<string, VEncoded> = {}\n\n for (const [key, val] of Object.entries(value)) {\n const encoded = this.valueCodec.encode(val, format)\n result[key] = encoded\n }\n\n return result\n }\n\n protected fromEncoded(value: WireObject<VEncoded>, format: EncodingFormat): Record<string, V> {\n const result: Record<string, V> = {}\n if (value instanceof Map) {\n for (const [_key, val] of value.entries()) {\n const keyType = typeof _key\n if (keyType === 'number' || keyType === 'bigint') {\n throw new Error(`RecordCodec received a non-string key of type ${keyType}`)\n }\n const key = _key instanceof Uint8Array ? Buffer.from(_key).toString('utf-8') : String(_key)\n result[key] = this.valueCodec.decode(val, format)\n }\n } else {\n for (const [key, val] of Object.entries(value)) {\n result[key] = this.valueCodec.decode(val, format)\n }\n }\n\n return result\n }\n\n public isDefaultValue(value: Record<string, V>): boolean {\n return Object.keys(value).length === 0\n }\n}\n"],"mappings":";;;;;;;;AAQA,IAAa,cAAb,cAAkDA,oBAAyE;CACzH,YAAY,AAAiBC,YAAgC;AAC3D,SAAO;EADoB;;CAI7B,AAAO,eAAkC;AACvC,SAAO,EAAE;;CAGX,AAAU,UAAU,OAA0B,QAAkD;EAC9F,MAAMC,SAAmC,EAAE;AAE3C,OAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,QAAQ,MAAM,CAE5C,QAAO,OADS,KAAK,WAAW,OAAO,KAAK,OAAO;AAIrD,SAAO;;CAGT,AAAU,YAAY,OAA6B,QAA2C;EAC5F,MAAMC,SAA4B,EAAE;AACpC,MAAI,iBAAiB,IACnB,MAAK,MAAM,CAAC,MAAM,QAAQ,MAAM,SAAS,EAAE;GACzC,MAAM,UAAU,OAAO;AACvB,OAAI,YAAY,YAAY,YAAY,SACtC,OAAM,IAAI,MAAM,iDAAiD,UAAU;GAE7E,MAAM,MAAM,gBAAgB,aAAaC,cAAO,KAAK,KAAK,CAAC,SAAS,QAAQ,GAAG,OAAO,KAAK;AAC3F,UAAO,OAAO,KAAK,WAAW,OAAO,KAAK,OAAO;;MAGnD,MAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,QAAQ,MAAM,CAC5C,QAAO,OAAO,KAAK,WAAW,OAAO,KAAK,OAAO;AAIrD,SAAO;;CAGT,AAAO,eAAe,OAAmC;AACvD,SAAO,OAAO,KAAK,MAAM,CAAC,WAAW"}
@@ -3,7 +3,6 @@ const require_constants = require('../../constants.js');
3
3
  const require_address = require('../../address.js');
4
4
  const require_codec = require('../codec.js');
5
5
  let buffer = require("buffer");
6
- buffer = require_rolldown_runtime.__toESM(buffer);
7
6
 
8
7
  //#region packages/common/src/codecs/primitives/address.ts
9
8
  var AddressCodec = class extends require_codec.Codec {
@@ -1 +1 @@
1
- {"version":3,"file":"address.js","names":["Codec","Address","PUBLIC_KEY_BYTE_LENGTH","ADDRESS_LENGTH","Buffer"],"sources":["../../../../../../packages/common/src/codecs/primitives/address.ts"],"sourcesContent":["import { Buffer } from 'buffer'\nimport { Address } from '../../address'\nimport { ADDRESS_LENGTH, PUBLIC_KEY_BYTE_LENGTH } from '../../constants'\nimport { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\nimport { WireString } from '../wire'\n\nclass AddressCodec extends Codec<Address, WireString> {\n public defaultValue(): Address {\n return Address.zeroAddress()\n }\n\n protected toEncoded(value: Address, format: EncodingFormat): WireString {\n if (format === 'json') {\n return value.toString()\n }\n return value.publicKey\n }\n\n protected fromEncoded(value: WireString, _format: EncodingFormat): Address {\n if (typeof value === 'string') return Address.fromString(value)\n if (value instanceof Uint8Array) {\n if (value.length === PUBLIC_KEY_BYTE_LENGTH) {\n return new Address(value)\n } else if (value.length === ADDRESS_LENGTH) {\n return Address.fromString(Buffer.from(value).toString('utf-8'))\n }\n }\n throw new Error(`AddressCodec cannot decode address from ${typeof value}`)\n }\n\n public isDefaultValue(value: Address): boolean {\n return value.equals(this.defaultValue())\n }\n}\n\nexport const addressCodec = new AddressCodec()\n"],"mappings":";;;;;;;;AAOA,IAAM,eAAN,cAA2BA,oBAA2B;CACpD,AAAO,eAAwB;AAC7B,SAAOC,wBAAQ,aAAa;;CAG9B,AAAU,UAAU,OAAgB,QAAoC;AACtE,MAAI,WAAW,OACb,QAAO,MAAM,UAAU;AAEzB,SAAO,MAAM;;CAGf,AAAU,YAAY,OAAmB,SAAkC;AACzE,MAAI,OAAO,UAAU,SAAU,QAAOA,wBAAQ,WAAW,MAAM;AAC/D,MAAI,iBAAiB,YACnB;OAAI,MAAM,WAAWC,yCACnB,QAAO,IAAID,wBAAQ,MAAM;YAChB,MAAM,WAAWE,iCAC1B,QAAOF,wBAAQ,WAAWG,cAAO,KAAK,MAAM,CAAC,SAAS,QAAQ,CAAC;;AAGnE,QAAM,IAAI,MAAM,2CAA2C,OAAO,QAAQ;;CAG5E,AAAO,eAAe,OAAyB;AAC7C,SAAO,MAAM,OAAO,KAAK,cAAc,CAAC;;;AAI5C,MAAa,eAAe,IAAI,cAAc"}
1
+ {"version":3,"file":"address.js","names":["Codec","Address","PUBLIC_KEY_BYTE_LENGTH","ADDRESS_LENGTH","Buffer"],"sources":["../../../../../../packages/common/src/codecs/primitives/address.ts"],"sourcesContent":["import { Buffer } from 'buffer'\nimport { Address } from '../../address'\nimport { ADDRESS_LENGTH, PUBLIC_KEY_BYTE_LENGTH } from '../../constants'\nimport { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\nimport { WireString } from '../wire'\n\nclass AddressCodec extends Codec<Address, WireString> {\n public defaultValue(): Address {\n return Address.zeroAddress()\n }\n\n protected toEncoded(value: Address, format: EncodingFormat): WireString {\n if (format === 'json') {\n return value.toString()\n }\n return value.publicKey\n }\n\n protected fromEncoded(value: WireString, _format: EncodingFormat): Address {\n if (typeof value === 'string') return Address.fromString(value)\n if (value instanceof Uint8Array) {\n if (value.length === PUBLIC_KEY_BYTE_LENGTH) {\n return new Address(value)\n } else if (value.length === ADDRESS_LENGTH) {\n return Address.fromString(Buffer.from(value).toString('utf-8'))\n }\n }\n throw new Error(`AddressCodec cannot decode address from ${typeof value}`)\n }\n\n public isDefaultValue(value: Address): boolean {\n return value.equals(this.defaultValue())\n }\n}\n\nexport const addressCodec = new AddressCodec()\n"],"mappings":";;;;;;;AAOA,IAAM,eAAN,cAA2BA,oBAA2B;CACpD,AAAO,eAAwB;AAC7B,SAAOC,wBAAQ,aAAa;;CAG9B,AAAU,UAAU,OAAgB,QAAoC;AACtE,MAAI,WAAW,OACb,QAAO,MAAM,UAAU;AAEzB,SAAO,MAAM;;CAGf,AAAU,YAAY,OAAmB,SAAkC;AACzE,MAAI,OAAO,UAAU,SAAU,QAAOA,wBAAQ,WAAW,MAAM;AAC/D,MAAI,iBAAiB,YACnB;OAAI,MAAM,WAAWC,yCACnB,QAAO,IAAID,wBAAQ,MAAM;YAChB,MAAM,WAAWE,iCAC1B,QAAOF,wBAAQ,WAAWG,cAAO,KAAK,MAAM,CAAC,SAAS,QAAQ,CAAC;;AAGnE,QAAM,IAAI,MAAM,2CAA2C,OAAO,QAAQ;;CAG5E,AAAO,eAAe,OAAyB;AAC7C,SAAO,MAAM,OAAO,KAAK,cAAc,CAAC;;;AAI5C,MAAa,eAAe,IAAI,cAAc"}
@@ -1,7 +1,6 @@
1
1
  const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.js');
2
2
  const require_codec = require('../codec.js');
3
3
  let buffer = require("buffer");
4
- buffer = require_rolldown_runtime.__toESM(buffer);
5
4
 
6
5
  //#region packages/common/src/codecs/primitives/bytes.ts
7
6
  var BytesCodec = class extends require_codec.Codec {
@@ -1 +1 @@
1
- {"version":3,"file":"bytes.js","names":["Codec","Buffer"],"sources":["../../../../../../packages/common/src/codecs/primitives/bytes.ts"],"sourcesContent":["import { Buffer } from 'buffer'\nimport { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\nimport { WireString } from '../wire'\n\nclass BytesCodec extends Codec<Uint8Array, WireString> {\n public defaultValue(): Uint8Array {\n return new Uint8Array()\n }\n\n protected toEncoded(value: Uint8Array, format: EncodingFormat): WireString {\n if (format === 'json') {\n return Buffer.from(value).toString('base64')\n }\n return value\n }\n\n protected fromEncoded(value: WireString, _format: EncodingFormat): Uint8Array {\n if (value instanceof Uint8Array) return value\n if (typeof value === 'string') {\n return new Uint8Array(Buffer.from(value, 'base64'))\n }\n throw new Error(`Cannot decode bytes from ${typeof value}`)\n }\n\n public isDefaultValue(value: Uint8Array): boolean {\n return value.byteLength === 0\n }\n}\n\nexport const bytesCodec = new BytesCodec()\n"],"mappings":";;;;;;AAKA,IAAM,aAAN,cAAyBA,oBAA8B;CACrD,AAAO,eAA2B;AAChC,SAAO,IAAI,YAAY;;CAGzB,AAAU,UAAU,OAAmB,QAAoC;AACzE,MAAI,WAAW,OACb,QAAOC,cAAO,KAAK,MAAM,CAAC,SAAS,SAAS;AAE9C,SAAO;;CAGT,AAAU,YAAY,OAAmB,SAAqC;AAC5E,MAAI,iBAAiB,WAAY,QAAO;AACxC,MAAI,OAAO,UAAU,SACnB,QAAO,IAAI,WAAWA,cAAO,KAAK,OAAO,SAAS,CAAC;AAErD,QAAM,IAAI,MAAM,4BAA4B,OAAO,QAAQ;;CAG7D,AAAO,eAAe,OAA4B;AAChD,SAAO,MAAM,eAAe;;;AAIhC,MAAa,aAAa,IAAI,YAAY"}
1
+ {"version":3,"file":"bytes.js","names":["Codec","Buffer"],"sources":["../../../../../../packages/common/src/codecs/primitives/bytes.ts"],"sourcesContent":["import { Buffer } from 'buffer'\nimport { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\nimport { WireString } from '../wire'\n\nclass BytesCodec extends Codec<Uint8Array, WireString> {\n public defaultValue(): Uint8Array {\n return new Uint8Array()\n }\n\n protected toEncoded(value: Uint8Array, format: EncodingFormat): WireString {\n if (format === 'json') {\n return Buffer.from(value).toString('base64')\n }\n return value\n }\n\n protected fromEncoded(value: WireString, _format: EncodingFormat): Uint8Array {\n if (value instanceof Uint8Array) return value\n if (typeof value === 'string') {\n return new Uint8Array(Buffer.from(value, 'base64'))\n }\n throw new Error(`Cannot decode bytes from ${typeof value}`)\n }\n\n public isDefaultValue(value: Uint8Array): boolean {\n return value.byteLength === 0\n }\n}\n\nexport const bytesCodec = new BytesCodec()\n"],"mappings":";;;;;AAKA,IAAM,aAAN,cAAyBA,oBAA8B;CACrD,AAAO,eAA2B;AAChC,SAAO,IAAI,YAAY;;CAGzB,AAAU,UAAU,OAAmB,QAAoC;AACzE,MAAI,WAAW,OACb,QAAOC,cAAO,KAAK,MAAM,CAAC,SAAS,SAAS;AAE9C,SAAO;;CAGT,AAAU,YAAY,OAAmB,SAAqC;AAC5E,MAAI,iBAAiB,WAAY,QAAO;AACxC,MAAI,OAAO,UAAU,SACnB,QAAO,IAAI,WAAWA,cAAO,KAAK,OAAO,SAAS,CAAC;AAErD,QAAM,IAAI,MAAM,4BAA4B,OAAO,QAAQ;;CAG7D,AAAO,eAAe,OAA4B;AAChD,SAAO,MAAM,eAAe;;;AAIhC,MAAa,aAAa,IAAI,YAAY"}
@@ -1,7 +1,6 @@
1
1
  const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.js');
2
2
  const require_codec = require('../codec.js');
3
3
  let buffer = require("buffer");
4
- buffer = require_rolldown_runtime.__toESM(buffer);
5
4
 
6
5
  //#region packages/common/src/codecs/primitives/fixed-bytes.ts
7
6
  var FixedBytesCodec = class extends require_codec.Codec {
@@ -1 +1 @@
1
- {"version":3,"file":"fixed-bytes.js","names":["Codec","length: number","Buffer"],"sources":["../../../../../../packages/common/src/codecs/primitives/fixed-bytes.ts"],"sourcesContent":["import { Buffer } from 'buffer'\nimport { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\nimport { WireString } from '../wire'\n\nexport class FixedBytesCodec extends Codec<Uint8Array, WireString> {\n constructor(private readonly length: number) {\n super()\n }\n\n public defaultValue(): Uint8Array {\n return new Uint8Array(this.length)\n }\n\n protected toEncoded(value: Uint8Array, format: EncodingFormat): WireString {\n if (format === 'json') {\n return Buffer.from(value).toString('base64')\n }\n return value\n }\n\n protected fromEncoded(value: WireString, _format: EncodingFormat): Uint8Array {\n if (value instanceof Uint8Array) return value\n if (typeof value === 'string') {\n return new Uint8Array(Buffer.from(value, 'base64'))\n }\n throw new Error(`Cannot decode fixed ${this.length} bytes from ${typeof value}`)\n }\n\n public isDefaultValue(value: Uint8Array): boolean {\n if (value.byteLength !== this.length) return false\n return value.every((byte) => byte === 0)\n }\n}\n\nexport const fixedBytes32Codec = new FixedBytesCodec(32)\nexport const fixedBytes64Codec = new FixedBytesCodec(64)\nexport const fixedBytes1793Codec = new FixedBytesCodec(1793) // For Falcon signatures (0x701)\n"],"mappings":";;;;;;AAKA,IAAa,kBAAb,cAAqCA,oBAA8B;CACjE,YAAY,AAAiBC,QAAgB;AAC3C,SAAO;EADoB;;CAI7B,AAAO,eAA2B;AAChC,SAAO,IAAI,WAAW,KAAK,OAAO;;CAGpC,AAAU,UAAU,OAAmB,QAAoC;AACzE,MAAI,WAAW,OACb,QAAOC,cAAO,KAAK,MAAM,CAAC,SAAS,SAAS;AAE9C,SAAO;;CAGT,AAAU,YAAY,OAAmB,SAAqC;AAC5E,MAAI,iBAAiB,WAAY,QAAO;AACxC,MAAI,OAAO,UAAU,SACnB,QAAO,IAAI,WAAWA,cAAO,KAAK,OAAO,SAAS,CAAC;AAErD,QAAM,IAAI,MAAM,uBAAuB,KAAK,OAAO,cAAc,OAAO,QAAQ;;CAGlF,AAAO,eAAe,OAA4B;AAChD,MAAI,MAAM,eAAe,KAAK,OAAQ,QAAO;AAC7C,SAAO,MAAM,OAAO,SAAS,SAAS,EAAE;;;AAI5C,MAAa,oBAAoB,IAAI,gBAAgB,GAAG;AACxD,MAAa,oBAAoB,IAAI,gBAAgB,GAAG;AACxD,MAAa,sBAAsB,IAAI,gBAAgB,KAAK"}
1
+ {"version":3,"file":"fixed-bytes.js","names":["Codec","length: number","Buffer"],"sources":["../../../../../../packages/common/src/codecs/primitives/fixed-bytes.ts"],"sourcesContent":["import { Buffer } from 'buffer'\nimport { Codec } from '../codec'\nimport type { EncodingFormat } from '../types'\nimport { WireString } from '../wire'\n\nexport class FixedBytesCodec extends Codec<Uint8Array, WireString> {\n constructor(private readonly length: number) {\n super()\n }\n\n public defaultValue(): Uint8Array {\n return new Uint8Array(this.length)\n }\n\n protected toEncoded(value: Uint8Array, format: EncodingFormat): WireString {\n if (format === 'json') {\n return Buffer.from(value).toString('base64')\n }\n return value\n }\n\n protected fromEncoded(value: WireString, _format: EncodingFormat): Uint8Array {\n if (value instanceof Uint8Array) return value\n if (typeof value === 'string') {\n return new Uint8Array(Buffer.from(value, 'base64'))\n }\n throw new Error(`Cannot decode fixed ${this.length} bytes from ${typeof value}`)\n }\n\n public isDefaultValue(value: Uint8Array): boolean {\n if (value.byteLength !== this.length) return false\n return value.every((byte) => byte === 0)\n }\n}\n\nexport const fixedBytes32Codec = new FixedBytesCodec(32)\nexport const fixedBytes64Codec = new FixedBytesCodec(64)\nexport const fixedBytes1793Codec = new FixedBytesCodec(1793) // For Falcon signatures (0x701)\n"],"mappings":";;;;;AAKA,IAAa,kBAAb,cAAqCA,oBAA8B;CACjE,YAAY,AAAiBC,QAAgB;AAC3C,SAAO;EADoB;;CAI7B,AAAO,eAA2B;AAChC,SAAO,IAAI,WAAW,KAAK,OAAO;;CAGpC,AAAU,UAAU,OAAmB,QAAoC;AACzE,MAAI,WAAW,OACb,QAAOC,cAAO,KAAK,MAAM,CAAC,SAAS,SAAS;AAE9C,SAAO;;CAGT,AAAU,YAAY,OAAmB,SAAqC;AAC5E,MAAI,iBAAiB,WAAY,QAAO;AACxC,MAAI,OAAO,UAAU,SACnB,QAAO,IAAI,WAAWA,cAAO,KAAK,OAAO,SAAS,CAAC;AAErD,QAAM,IAAI,MAAM,uBAAuB,KAAK,OAAO,cAAc,OAAO,QAAQ;;CAGlF,AAAO,eAAe,OAA4B;AAChD,MAAI,MAAM,eAAe,KAAK,OAAQ,QAAO;AAC7C,SAAO,MAAM,OAAO,SAAS,SAAS,EAAE;;;AAI5C,MAAa,oBAAoB,IAAI,gBAAgB,GAAG;AACxD,MAAa,oBAAoB,IAAI,gBAAgB,GAAG;AACxD,MAAa,sBAAsB,IAAI,gBAAgB,KAAK"}
@@ -1,6 +1,5 @@
1
1
  const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
2
  let buffer = require("buffer");
3
- buffer = require_rolldown_runtime.__toESM(buffer);
4
3
 
5
4
  //#region packages/common/src/codecs/wire.ts
6
5
  function normalizeWireKey(key) {
@@ -1 +1 @@
1
- {"version":3,"file":"wire.js","names":["Buffer","normalized: Record<string, unknown>"],"sources":["../../../../../packages/common/src/codecs/wire.ts"],"sourcesContent":["import { Buffer } from 'buffer'\n/**\n * Represents a map key coming off the wire.\n */\nexport type WireMapKey = Uint8Array | number | bigint\n\n/**\n * Represents object data coming off the wire.\n *\n * When from msgpack it's a Map. Both bytes and string keys are represented as Uint8Array.\n * When from JSON it's a plain object with string keys.\n */\nexport type WireObject<TValue = unknown> = Record<string, TValue> | Map<WireMapKey, TValue>\n\n/**\n * Represents a bigint value coming off the wire.\n *\n * When from msgpack it could be a number or bigint, depending on size.\n * When from JSON it could be a number or bigint (because of how we configure JSONbig), depending on size.\n */\nexport type WireBigInt = number | bigint\n\n/**\n * Represents either a bytes or string value coming off the wire.\n *\n * When from msgpack it's a Uint8Array for both bytes or string values.\n * When from JSON it's a base64-encoded bytes string or regular string.\n */\nexport type WireString = Uint8Array | string\n\nfunction normalizeWireKey(key: string | WireMapKey): string {\n return key instanceof Uint8Array ? normalizeWireString(key) : key.toString()\n}\n\nexport function normalizeWireString(value: WireString): string {\n return value instanceof Uint8Array ? Buffer.from(value).toString('utf-8') : value\n}\n\nexport function normalizeWireObject(wireObject: WireObject): Record<string, unknown> {\n if (wireObject instanceof Map) {\n const normalized: Record<string, unknown> = {}\n for (const [key, value] of wireObject.entries()) {\n normalized[normalizeWireKey(key)] = value\n }\n return normalized\n }\n\n return wireObject\n}\n"],"mappings":";;;;;AA8BA,SAAS,iBAAiB,KAAkC;AAC1D,QAAO,eAAe,aAAa,oBAAoB,IAAI,GAAG,IAAI,UAAU;;AAG9E,SAAgB,oBAAoB,OAA2B;AAC7D,QAAO,iBAAiB,aAAaA,cAAO,KAAK,MAAM,CAAC,SAAS,QAAQ,GAAG;;AAG9E,SAAgB,oBAAoB,YAAiD;AACnF,KAAI,sBAAsB,KAAK;EAC7B,MAAMC,aAAsC,EAAE;AAC9C,OAAK,MAAM,CAAC,KAAK,UAAU,WAAW,SAAS,CAC7C,YAAW,iBAAiB,IAAI,IAAI;AAEtC,SAAO;;AAGT,QAAO"}
1
+ {"version":3,"file":"wire.js","names":["Buffer","normalized: Record<string, unknown>"],"sources":["../../../../../packages/common/src/codecs/wire.ts"],"sourcesContent":["import { Buffer } from 'buffer'\n/**\n * Represents a map key coming off the wire.\n */\nexport type WireMapKey = Uint8Array | number | bigint\n\n/**\n * Represents object data coming off the wire.\n *\n * When from msgpack it's a Map. Both bytes and string keys are represented as Uint8Array.\n * When from JSON it's a plain object with string keys.\n */\nexport type WireObject<TValue = unknown> = Record<string, TValue> | Map<WireMapKey, TValue>\n\n/**\n * Represents a bigint value coming off the wire.\n *\n * When from msgpack it could be a number or bigint, depending on size.\n * When from JSON it could be a number or bigint (because of how we configure JSONbig), depending on size.\n */\nexport type WireBigInt = number | bigint\n\n/**\n * Represents either a bytes or string value coming off the wire.\n *\n * When from msgpack it's a Uint8Array for both bytes or string values.\n * When from JSON it's a base64-encoded bytes string or regular string.\n */\nexport type WireString = Uint8Array | string\n\nfunction normalizeWireKey(key: string | WireMapKey): string {\n return key instanceof Uint8Array ? normalizeWireString(key) : key.toString()\n}\n\nexport function normalizeWireString(value: WireString): string {\n return value instanceof Uint8Array ? Buffer.from(value).toString('utf-8') : value\n}\n\nexport function normalizeWireObject(wireObject: WireObject): Record<string, unknown> {\n if (wireObject instanceof Map) {\n const normalized: Record<string, unknown> = {}\n for (const [key, value] of wireObject.entries()) {\n normalized[normalizeWireKey(key)] = value\n }\n return normalized\n }\n\n return wireObject\n}\n"],"mappings":";;;;AA8BA,SAAS,iBAAiB,KAAkC;AAC1D,QAAO,eAAe,aAAa,oBAAoB,IAAI,GAAG,IAAI,UAAU;;AAG9E,SAAgB,oBAAoB,OAA2B;AAC7D,QAAO,iBAAiB,aAAaA,cAAO,KAAK,MAAM,CAAC,SAAS,QAAQ,GAAG;;AAG9E,SAAgB,oBAAoB,YAAiD;AACnF,KAAI,sBAAsB,KAAK;EAC7B,MAAMC,aAAsC,EAAE;AAC9C,OAAK,MAAM,CAAC,KAAK,UAAU,WAAW,SAAS,CAC7C,YAAW,iBAAiB,IAAI,IAAI;AAEtC,SAAO;;AAGT,QAAO"}
@@ -1,6 +1,5 @@
1
1
  const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.js');
2
2
  let algorand_msgpack = require("algorand-msgpack");
3
- algorand_msgpack = require_rolldown_runtime.__toESM(algorand_msgpack);
4
3
 
5
4
  //#region packages/common/src/msgpack.ts
6
5
  function decodeMsgpack(buffer, options = {
@@ -1 +1 @@
1
- {"version":3,"file":"msgpack.js","names":["IntMode"],"sources":["../../../../packages/common/src/msgpack.ts"],"sourcesContent":["import { IntMode, decode as msgpackDecode, encode as msgpackEncode } from 'algorand-msgpack'\n\ntype MsgPackDecodeOptions = {\n useMap: boolean\n rawBinaryStringKeys: boolean\n rawBinaryStringValues: boolean\n}\n\nexport function decodeMsgpack(\n buffer: Uint8Array,\n // These default options ensure that we can correctly decode all Algorand specific msgpack data structures.\n // Some of these structures have bytes or bigint keys and bytes values that can be incorrectly decoded as utf8 strings by the msgpack library.\n options: MsgPackDecodeOptions = { useMap: true, rawBinaryStringKeys: true, rawBinaryStringValues: true },\n): Map<number | bigint | Uint8Array, unknown> {\n return msgpackDecode(buffer, { intMode: IntMode.AS_ENCODED, ...options }) as Map<number | bigint | Uint8Array, unknown>\n}\n\nexport function encodeMsgpack(data: unknown): Uint8Array {\n return new Uint8Array(msgpackEncode(data, { sortKeys: true, ignoreUndefined: true }))\n}\n"],"mappings":";;;;;AAQA,SAAgB,cACd,QAGA,UAAgC;CAAE,QAAQ;CAAM,qBAAqB;CAAM,uBAAuB;CAAM,EAC5D;AAC5C,qCAAqB,QAAQ;EAAE,SAASA,yBAAQ;EAAY,GAAG;EAAS,CAAC;;AAG3E,SAAgB,cAAc,MAA2B;AACvD,QAAO,IAAI,wCAAyB,MAAM;EAAE,UAAU;EAAM,iBAAiB;EAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"msgpack.js","names":["IntMode"],"sources":["../../../../packages/common/src/msgpack.ts"],"sourcesContent":["import { IntMode, decode as msgpackDecode, encode as msgpackEncode } from 'algorand-msgpack'\n\ntype MsgPackDecodeOptions = {\n useMap: boolean\n rawBinaryStringKeys: boolean\n rawBinaryStringValues: boolean\n}\n\nexport function decodeMsgpack(\n buffer: Uint8Array,\n // These default options ensure that we can correctly decode all Algorand specific msgpack data structures.\n // Some of these structures have bytes or bigint keys and bytes values that can be incorrectly decoded as utf8 strings by the msgpack library.\n options: MsgPackDecodeOptions = { useMap: true, rawBinaryStringKeys: true, rawBinaryStringValues: true },\n): Map<number | bigint | Uint8Array, unknown> {\n return msgpackDecode(buffer, { intMode: IntMode.AS_ENCODED, ...options }) as Map<number | bigint | Uint8Array, unknown>\n}\n\nexport function encodeMsgpack(data: unknown): Uint8Array {\n return new Uint8Array(msgpackEncode(data, { sortKeys: true, ignoreUndefined: true }))\n}\n"],"mappings":";;;;AAQA,SAAgB,cACd,QAGA,UAAgC;CAAE,QAAQ;CAAM,qBAAqB;CAAM,uBAAuB;CAAM,EAC5D;AAC5C,qCAAqB,QAAQ;EAAE,SAASA,yBAAQ;EAAY,GAAG;EAAS,CAAC;;AAG3E,SAAgB,cAAc,MAA2B;AACvD,QAAO,IAAI,wCAAyB,MAAM;EAAE,UAAU;EAAM,iBAAiB;EAAM,CAAC,CAAC"}
@@ -23,6 +23,7 @@ declare class IndexerApi {
23
23
  readonly httpRequest: BaseHttpRequest;
24
24
  constructor(httpRequest: BaseHttpRequest);
25
25
  private mimeTypeFor;
26
+ healthCheck(): Promise<HealthCheck>;
26
27
  /**
27
28
  * Lookup an account's asset holdings, optionally for a specific ID.
28
29
  */
@@ -156,7 +157,6 @@ declare class IndexerApi {
156
157
  * Lookup a single transaction.
157
158
  */
158
159
  lookupTransactionById(txId: string): Promise<TransactionResponse>;
159
- makeHealthCheck(): Promise<HealthCheck>;
160
160
  /**
161
161
  * Search for accounts.
162
162
  */
@@ -25,6 +25,18 @@ var IndexerApi = class {
25
25
  mimeTypeFor(format) {
26
26
  return format === "json" ? "application/json" : format === "msgpack" ? "application/msgpack" : "text/plain";
27
27
  }
28
+ async healthCheck() {
29
+ const headers = {};
30
+ headers["Accept"] = this.mimeTypeFor("json");
31
+ return require_model_runtime.decodeJson(await this.httpRequest.request({
32
+ method: "GET",
33
+ url: "/health",
34
+ path: {},
35
+ query: {},
36
+ headers,
37
+ body: void 0
38
+ }), require_health_check.HealthCheckMeta);
39
+ }
28
40
  /**
29
41
  * Lookup an account's asset holdings, optionally for a specific ID.
30
42
  */
@@ -306,18 +318,6 @@ var IndexerApi = class {
306
318
  body: void 0
307
319
  }), require_transaction_response.TransactionResponseMeta);
308
320
  }
309
- async makeHealthCheck() {
310
- const headers = {};
311
- headers["Accept"] = this.mimeTypeFor("json");
312
- return require_model_runtime.decodeJson(await this.httpRequest.request({
313
- method: "GET",
314
- url: "/health",
315
- path: {},
316
- query: {},
317
- headers,
318
- body: void 0
319
- }), require_health_check.HealthCheckMeta);
320
- }
321
321
  /**
322
322
  * Search for accounts.
323
323
  */