@algorandfoundation/algokit-utils 10.0.0-alpha.8 → 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.
- package/_virtual/rolldown_runtime.js +20 -11
- package/_virtual/rolldown_runtime.mjs +10 -5
- package/algod-client/index.d.ts +2 -2
- package/package.json +1 -1
- package/packages/abi/src/abi-type.d.ts +1 -1
- package/packages/abi/src/abi-type.js +2 -1
- package/packages/abi/src/abi-type.js.map +1 -1
- package/packages/abi/src/abi-type.mjs +2 -1
- package/packages/abi/src/abi-type.mjs.map +1 -1
- package/packages/abi/src/arc56-contract.js +1 -0
- package/packages/abi/src/arc56-contract.js.map +1 -1
- package/packages/abi/src/arc56-contract.mjs +1 -0
- package/packages/abi/src/arc56-contract.mjs.map +1 -1
- package/packages/algod_client/src/apis/api-service.d.ts +44 -44
- package/packages/algod_client/src/apis/api-service.js +153 -153
- package/packages/algod_client/src/apis/api-service.js.map +1 -1
- package/packages/algod_client/src/apis/api-service.mjs +153 -153
- package/packages/algod_client/src/apis/api-service.mjs.map +1 -1
- package/packages/algod_client/src/core/api-error.js +3 -1
- package/packages/algod_client/src/core/api-error.js.map +1 -1
- package/packages/algod_client/src/core/api-error.mjs +3 -1
- package/packages/algod_client/src/core/api-error.mjs.map +1 -1
- package/packages/algod_client/src/core/model-runtime.js +4 -4
- package/packages/algod_client/src/core/model-runtime.js.map +1 -1
- package/packages/algod_client/src/core/model-runtime.mjs +6 -6
- package/packages/algod_client/src/core/model-runtime.mjs.map +1 -1
- package/packages/algod_client/src/models/account-participation.js +4 -4
- package/packages/algod_client/src/models/account-participation.js.map +1 -1
- package/packages/algod_client/src/models/account-participation.mjs +4 -4
- package/packages/algod_client/src/models/account-participation.mjs.map +1 -1
- package/packages/algod_client/src/models/asset-params.js +2 -1
- package/packages/algod_client/src/models/asset-params.js.map +1 -1
- package/packages/algod_client/src/models/asset-params.mjs +2 -1
- package/packages/algod_client/src/models/asset-params.mjs.map +1 -1
- package/packages/algod_client/src/models/block-response.js +1 -2
- package/packages/algod_client/src/models/block-response.js.map +1 -1
- package/packages/algod_client/src/models/block-response.mjs +2 -3
- package/packages/algod_client/src/models/block-response.mjs.map +1 -1
- package/packages/algod_client/src/models/block.d.ts +47 -27
- package/packages/algod_client/src/models/block.js +173 -97
- package/packages/algod_client/src/models/block.js.map +1 -1
- package/packages/algod_client/src/models/block.mjs +173 -97
- package/packages/algod_client/src/models/block.mjs.map +1 -1
- package/packages/algod_client/src/models/ledger-state-delta.js +1 -1
- package/packages/algod_client/src/models/ledger-state-delta.js.map +1 -1
- package/packages/algod_client/src/models/ledger-state-delta.mjs +2 -2
- package/packages/algod_client/src/models/ledger-state-delta.mjs.map +1 -1
- package/packages/algod_client/src/models/transaction-parameters-response.js +2 -2
- package/packages/algod_client/src/models/transaction-parameters-response.js.map +1 -1
- package/packages/algod_client/src/models/transaction-parameters-response.mjs +2 -2
- package/packages/algod_client/src/models/transaction-parameters-response.mjs.map +1 -1
- package/packages/common/src/codecs/composite/map.js +7 -4
- package/packages/common/src/codecs/composite/map.js.map +1 -1
- package/packages/common/src/codecs/composite/map.mjs +7 -4
- package/packages/common/src/codecs/composite/map.mjs.map +1 -1
- package/packages/common/src/codecs/composite/record.js +0 -1
- package/packages/common/src/codecs/composite/record.js.map +1 -1
- package/packages/common/src/codecs/primitives/address.js +0 -1
- package/packages/common/src/codecs/primitives/address.js.map +1 -1
- package/packages/common/src/codecs/primitives/bytes.js +0 -1
- package/packages/common/src/codecs/primitives/bytes.js.map +1 -1
- package/packages/common/src/codecs/primitives/fixed-bytes.js +0 -1
- package/packages/common/src/codecs/primitives/fixed-bytes.js.map +1 -1
- package/packages/common/src/codecs/wire.js +0 -1
- package/packages/common/src/codecs/wire.js.map +1 -1
- package/packages/common/src/msgpack.js +0 -1
- package/packages/common/src/msgpack.js.map +1 -1
- package/packages/indexer_client/src/apis/api-service.d.ts +1 -1
- package/packages/indexer_client/src/apis/api-service.js +12 -12
- package/packages/indexer_client/src/apis/api-service.js.map +1 -1
- package/packages/indexer_client/src/apis/api-service.mjs +12 -12
- package/packages/indexer_client/src/apis/api-service.mjs.map +1 -1
- package/packages/indexer_client/src/core/api-error.js +3 -1
- package/packages/indexer_client/src/core/api-error.js.map +1 -1
- package/packages/indexer_client/src/core/api-error.mjs +3 -1
- package/packages/indexer_client/src/core/api-error.mjs.map +1 -1
- package/packages/indexer_client/src/core/model-runtime.js +4 -4
- package/packages/indexer_client/src/core/model-runtime.js.map +1 -1
- package/packages/indexer_client/src/core/model-runtime.mjs +6 -6
- package/packages/indexer_client/src/core/model-runtime.mjs.map +1 -1
- package/packages/indexer_client/src/models/account-participation.js +4 -4
- package/packages/indexer_client/src/models/account-participation.js.map +1 -1
- package/packages/indexer_client/src/models/account-participation.mjs +4 -4
- package/packages/indexer_client/src/models/account-participation.mjs.map +1 -1
- package/packages/indexer_client/src/models/asset-params.js +2 -1
- package/packages/indexer_client/src/models/asset-params.js.map +1 -1
- package/packages/indexer_client/src/models/asset-params.mjs +2 -1
- package/packages/indexer_client/src/models/asset-params.mjs.map +1 -1
- package/packages/indexer_client/src/models/block.js +8 -8
- package/packages/indexer_client/src/models/block.js.map +1 -1
- package/packages/indexer_client/src/models/block.mjs +8 -8
- package/packages/indexer_client/src/models/block.mjs.map +1 -1
- package/packages/indexer_client/src/models/eval-delta-key-value.d.ts +1 -1
- package/packages/indexer_client/src/models/eval-delta-key-value.js +2 -2
- package/packages/indexer_client/src/models/eval-delta-key-value.js.map +1 -1
- package/packages/indexer_client/src/models/eval-delta-key-value.mjs +2 -2
- package/packages/indexer_client/src/models/eval-delta-key-value.mjs.map +1 -1
- package/packages/indexer_client/src/models/eval-delta.d.ts +1 -1
- package/packages/indexer_client/src/models/eval-delta.js +2 -2
- package/packages/indexer_client/src/models/eval-delta.js.map +1 -1
- package/packages/indexer_client/src/models/eval-delta.mjs +2 -2
- package/packages/indexer_client/src/models/eval-delta.mjs.map +1 -1
- package/packages/indexer_client/src/models/hb-proof-fields.js +6 -6
- package/packages/indexer_client/src/models/hb-proof-fields.js.map +1 -1
- package/packages/indexer_client/src/models/hb-proof-fields.mjs +6 -6
- package/packages/indexer_client/src/models/hb-proof-fields.mjs.map +1 -1
- package/packages/indexer_client/src/models/state-proof-verifier.js +2 -2
- package/packages/indexer_client/src/models/state-proof-verifier.js.map +1 -1
- package/packages/indexer_client/src/models/state-proof-verifier.mjs +2 -2
- package/packages/indexer_client/src/models/state-proof-verifier.mjs.map +1 -1
- package/packages/indexer_client/src/models/teal-key-value.d.ts +1 -1
- package/packages/indexer_client/src/models/teal-key-value.js +2 -2
- package/packages/indexer_client/src/models/teal-key-value.js.map +1 -1
- package/packages/indexer_client/src/models/teal-key-value.mjs +2 -2
- package/packages/indexer_client/src/models/teal-key-value.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.js +2 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.mjs +2 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-keyreg.js +4 -4
- package/packages/indexer_client/src/models/transaction-keyreg.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-keyreg.mjs +4 -4
- package/packages/indexer_client/src/models/transaction-keyreg.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.js +2 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.mjs +2 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.js +3 -3
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.mjs +3 -3
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction.js +4 -3
- package/packages/indexer_client/src/models/transaction.js.map +1 -1
- package/packages/indexer_client/src/models/transaction.mjs +4 -3
- package/packages/indexer_client/src/models/transaction.mjs.map +1 -1
- package/packages/kmd_client/src/apis/api-service.d.ts +5 -5
- package/packages/kmd_client/src/apis/api-service.js +32 -32
- package/packages/kmd_client/src/apis/api-service.js.map +1 -1
- package/packages/kmd_client/src/apis/api-service.mjs +32 -32
- package/packages/kmd_client/src/apis/api-service.mjs.map +1 -1
- package/packages/kmd_client/src/core/api-error.js +3 -1
- package/packages/kmd_client/src/core/api-error.js.map +1 -1
- package/packages/kmd_client/src/core/api-error.mjs +3 -1
- package/packages/kmd_client/src/core/api-error.mjs.map +1 -1
- package/packages/kmd_client/src/core/model-runtime.js +4 -4
- package/packages/kmd_client/src/core/model-runtime.js.map +1 -1
- package/packages/kmd_client/src/core/model-runtime.mjs +6 -6
- package/packages/kmd_client/src/core/model-runtime.mjs.map +1 -1
- package/packages/sdk/src/encoding/encoding.js +12 -2
- package/packages/sdk/src/encoding/encoding.js.map +1 -1
- package/packages/sdk/src/encoding/encoding.mjs +12 -1
- package/packages/sdk/src/encoding/encoding.mjs.map +1 -1
- package/packages/sdk/src/encoding/schema/map.js +0 -2
- package/packages/sdk/src/encoding/schema/map.js.map +1 -1
- package/packages/transact/src/logicsig.js +3 -3
- package/packages/transact/src/logicsig.js.map +1 -1
- package/packages/transact/src/logicsig.mjs +3 -3
- package/packages/transact/src/logicsig.mjs.map +1 -1
- package/packages/transact/src/multisig.js +24 -24
- package/packages/transact/src/multisig.js.map +1 -1
- package/packages/transact/src/multisig.mjs +24 -24
- package/packages/transact/src/multisig.mjs.map +1 -1
- package/packages/transact/src/transactions/app-call.d.ts +2 -2
- package/packages/transact/src/transactions/app-call.js.map +1 -1
- package/packages/transact/src/transactions/app-call.mjs.map +1 -1
- package/packages/transact/src/transactions/signed-transaction-meta.js +2 -2
- package/packages/transact/src/transactions/signed-transaction-meta.js.map +1 -1
- package/packages/transact/src/transactions/signed-transaction-meta.mjs +2 -2
- package/packages/transact/src/transactions/signed-transaction-meta.mjs.map +1 -1
- package/packages/transact/src/transactions/signed-transaction.d.ts +2 -2
- package/packages/transact/src/transactions/signed-transaction.js.map +1 -1
- package/packages/transact/src/transactions/signed-transaction.mjs.map +1 -1
- package/packages/transact/src/transactions/transaction-meta.js +7 -1
- package/packages/transact/src/transactions/transaction-meta.js.map +1 -1
- package/packages/transact/src/transactions/transaction-meta.mjs +7 -1
- package/packages/transact/src/transactions/transaction-meta.mjs.map +1 -1
- package/packages/transact/src/transactions/transaction.js +1 -0
- package/packages/transact/src/transactions/transaction.js.map +1 -1
- package/packages/transact/src/transactions/transaction.mjs +1 -0
- package/packages/transact/src/transactions/transaction.mjs.map +1 -1
- package/sdk/index.js +1 -1
- package/testing/fixtures/algorand-fixture.d.ts +3 -3
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/transaction/transaction.js +2 -2
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +2 -2
- package/transaction/transaction.mjs.map +1 -1
- package/transactions/app-call.d.ts +2 -1
- package/transactions/app-call.js.map +1 -1
- package/transactions/app-call.mjs.map +1 -1
- package/types/account-manager.js +1 -1
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +1 -1
- package/types/account-manager.mjs.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +36 -22
- package/types/algorand-client-transaction-creator.js +8 -0
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +8 -0
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +36 -22
- package/types/algorand-client-transaction-sender.js +8 -1
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +8 -0
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/app-client.d.ts +33 -28
- package/types/app-client.js +0 -1
- package/types/app-client.js.map +1 -1
- package/types/app-deployer.js +1 -1
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +1 -1
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +16 -13
- package/types/app-manager.d.ts +2 -0
- package/types/app-manager.js +5 -4
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +5 -4
- package/types/app-manager.mjs.map +1 -1
- package/types/asset-manager.js +1 -1
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +1 -1
- package/types/asset-manager.mjs.map +1 -1
- package/types/composer.d.ts +8 -0
- package/types/composer.js +11 -4
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +11 -3
- package/types/composer.mjs.map +1 -1
- package/types/kmd-account-manager.d.ts +1 -0
- package/types/kmd-account-manager.js +21 -10
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +22 -11
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/testing.d.ts +2 -2
|
@@ -2,6 +2,7 @@ import { addressCodec } from "../../../common/src/codecs/primitives/address.mjs"
|
|
|
2
2
|
import { bigIntCodec } from "../../../common/src/codecs/primitives/bigint.mjs";
|
|
3
3
|
import { booleanCodec } from "../../../common/src/codecs/primitives/boolean.mjs";
|
|
4
4
|
import { bytesCodec } from "../../../common/src/codecs/primitives/bytes.mjs";
|
|
5
|
+
import { fixedBytes32Codec, fixedBytes64Codec } from "../../../common/src/codecs/primitives/fixed-bytes.mjs";
|
|
5
6
|
import { numberCodec } from "../../../common/src/codecs/primitives/number.mjs";
|
|
6
7
|
import { stringCodec } from "../../../common/src/codecs/primitives/string.mjs";
|
|
7
8
|
import { ArrayCodec, addressArrayCodec, bytesArrayCodec } from "../../../common/src/codecs/composite/array.mjs";
|
|
@@ -202,94 +203,34 @@ const ParticipationUpdatesMeta = {
|
|
|
202
203
|
codec: addressArrayCodec
|
|
203
204
|
}]
|
|
204
205
|
};
|
|
205
|
-
const
|
|
206
|
-
name: "
|
|
206
|
+
const TxnCommitmentsMeta = {
|
|
207
|
+
name: "TxnCommitments",
|
|
207
208
|
kind: "object",
|
|
208
209
|
fields: [
|
|
209
210
|
{
|
|
210
|
-
name: "
|
|
211
|
-
wireKey: "rnd",
|
|
212
|
-
optional: true,
|
|
213
|
-
codec: bigIntCodec
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
name: "previousBlockHash",
|
|
217
|
-
wireKey: "prev",
|
|
218
|
-
optional: true,
|
|
219
|
-
codec: bytesCodec
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
name: "previousBlockHash512",
|
|
223
|
-
wireKey: "prev512",
|
|
224
|
-
optional: true,
|
|
225
|
-
codec: bytesCodec
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
name: "seed",
|
|
229
|
-
wireKey: "seed",
|
|
230
|
-
optional: true,
|
|
231
|
-
codec: bytesCodec
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
name: "transactionsRoot",
|
|
211
|
+
name: "nativeSha512_256Commitment",
|
|
235
212
|
wireKey: "txn",
|
|
236
213
|
optional: false,
|
|
237
|
-
codec:
|
|
214
|
+
codec: fixedBytes32Codec
|
|
238
215
|
},
|
|
239
216
|
{
|
|
240
|
-
name: "
|
|
217
|
+
name: "sha256Commitment",
|
|
241
218
|
wireKey: "txn256",
|
|
242
219
|
optional: true,
|
|
243
|
-
codec:
|
|
220
|
+
codec: fixedBytes32Codec
|
|
244
221
|
},
|
|
245
222
|
{
|
|
246
|
-
name: "
|
|
223
|
+
name: "sha512Commitment",
|
|
247
224
|
wireKey: "txn512",
|
|
248
225
|
optional: true,
|
|
249
|
-
codec:
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
{
|
|
258
|
-
name: "genesisId",
|
|
259
|
-
wireKey: "gen",
|
|
260
|
-
optional: true,
|
|
261
|
-
codec: stringCodec
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
name: "genesisHash",
|
|
265
|
-
wireKey: "gh",
|
|
266
|
-
optional: true,
|
|
267
|
-
codec: bytesCodec
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
name: "proposer",
|
|
271
|
-
wireKey: "prp",
|
|
272
|
-
optional: true,
|
|
273
|
-
codec: addressCodec
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
name: "feesCollected",
|
|
277
|
-
wireKey: "fc",
|
|
278
|
-
optional: true,
|
|
279
|
-
codec: bigIntCodec
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
name: "bonus",
|
|
283
|
-
wireKey: "bi",
|
|
284
|
-
optional: true,
|
|
285
|
-
codec: bigIntCodec
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
name: "proposerPayout",
|
|
289
|
-
wireKey: "pp",
|
|
290
|
-
optional: true,
|
|
291
|
-
codec: bigIntCodec
|
|
292
|
-
},
|
|
226
|
+
codec: fixedBytes64Codec
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
};
|
|
230
|
+
const RewardStateMeta = {
|
|
231
|
+
name: "RewardState",
|
|
232
|
+
kind: "object",
|
|
233
|
+
fields: [
|
|
293
234
|
{
|
|
294
235
|
name: "feeSink",
|
|
295
236
|
wireKey: "fees",
|
|
@@ -325,7 +266,13 @@ const BlockHeaderMeta = {
|
|
|
325
266
|
wireKey: "rwcalr",
|
|
326
267
|
optional: true,
|
|
327
268
|
codec: bigIntCodec
|
|
328
|
-
}
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
};
|
|
272
|
+
const UpgradeStateMeta = {
|
|
273
|
+
name: "UpgradeState",
|
|
274
|
+
kind: "object",
|
|
275
|
+
fields: [
|
|
329
276
|
{
|
|
330
277
|
name: "currentProtocol",
|
|
331
278
|
wireKey: "proto",
|
|
@@ -355,7 +302,13 @@ const BlockHeaderMeta = {
|
|
|
355
302
|
wireKey: "nextswitch",
|
|
356
303
|
optional: true,
|
|
357
304
|
codec: bigIntCodec
|
|
358
|
-
}
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
};
|
|
308
|
+
const UpgradeVoteMeta = {
|
|
309
|
+
name: "UpgradeVote",
|
|
310
|
+
kind: "object",
|
|
311
|
+
fields: [
|
|
359
312
|
{
|
|
360
313
|
name: "upgradePropose",
|
|
361
314
|
wireKey: "upgradeprop",
|
|
@@ -373,24 +326,6 @@ const BlockHeaderMeta = {
|
|
|
373
326
|
wireKey: "upgradeyes",
|
|
374
327
|
optional: true,
|
|
375
328
|
codec: booleanCodec
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
name: "txnCounter",
|
|
379
|
-
wireKey: "tc",
|
|
380
|
-
optional: true,
|
|
381
|
-
codec: bigIntCodec
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
name: "stateProofTracking",
|
|
385
|
-
wireKey: "spt",
|
|
386
|
-
optional: true,
|
|
387
|
-
codec: new MapCodec(numberCodec, new ObjectModelCodec(BlockStateProofTrackingDataMeta))
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
name: "participationUpdates",
|
|
391
|
-
flattened: true,
|
|
392
|
-
optional: true,
|
|
393
|
-
codec: new ObjectModelCodec(ParticipationUpdatesMeta)
|
|
394
329
|
}
|
|
395
330
|
]
|
|
396
331
|
};
|
|
@@ -401,7 +336,120 @@ const BlockMeta = {
|
|
|
401
336
|
name: "header",
|
|
402
337
|
flattened: true,
|
|
403
338
|
optional: false,
|
|
404
|
-
codec: new ObjectModelCodec(
|
|
339
|
+
codec: new ObjectModelCodec({
|
|
340
|
+
name: "BlockHeader",
|
|
341
|
+
kind: "object",
|
|
342
|
+
fields: [
|
|
343
|
+
{
|
|
344
|
+
name: "round",
|
|
345
|
+
wireKey: "rnd",
|
|
346
|
+
optional: true,
|
|
347
|
+
codec: bigIntCodec
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: "previousBlockHash",
|
|
351
|
+
wireKey: "prev",
|
|
352
|
+
optional: true,
|
|
353
|
+
codec: fixedBytes32Codec
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: "previousBlockHash512",
|
|
357
|
+
wireKey: "prev512",
|
|
358
|
+
optional: true,
|
|
359
|
+
codec: fixedBytes64Codec
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: "seed",
|
|
363
|
+
wireKey: "seed",
|
|
364
|
+
optional: true,
|
|
365
|
+
codec: bytesCodec
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
name: "txnCommitments",
|
|
369
|
+
flattened: true,
|
|
370
|
+
optional: false,
|
|
371
|
+
codec: new ObjectModelCodec(TxnCommitmentsMeta)
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
name: "timestamp",
|
|
375
|
+
wireKey: "ts",
|
|
376
|
+
optional: true,
|
|
377
|
+
codec: bigIntCodec
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: "genesisId",
|
|
381
|
+
wireKey: "gen",
|
|
382
|
+
optional: true,
|
|
383
|
+
codec: stringCodec
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: "genesisHash",
|
|
387
|
+
wireKey: "gh",
|
|
388
|
+
optional: true,
|
|
389
|
+
codec: fixedBytes32Codec
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
name: "proposer",
|
|
393
|
+
wireKey: "prp",
|
|
394
|
+
optional: true,
|
|
395
|
+
codec: addressCodec
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: "feesCollected",
|
|
399
|
+
wireKey: "fc",
|
|
400
|
+
optional: true,
|
|
401
|
+
codec: bigIntCodec
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: "bonus",
|
|
405
|
+
wireKey: "bi",
|
|
406
|
+
optional: true,
|
|
407
|
+
codec: bigIntCodec
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: "proposerPayout",
|
|
411
|
+
wireKey: "pp",
|
|
412
|
+
optional: true,
|
|
413
|
+
codec: bigIntCodec
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
name: "rewardState",
|
|
417
|
+
flattened: true,
|
|
418
|
+
optional: false,
|
|
419
|
+
codec: new ObjectModelCodec(RewardStateMeta)
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
name: "upgradeState",
|
|
423
|
+
flattened: true,
|
|
424
|
+
optional: false,
|
|
425
|
+
codec: new ObjectModelCodec(UpgradeStateMeta)
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
name: "upgradeVote",
|
|
429
|
+
flattened: true,
|
|
430
|
+
optional: false,
|
|
431
|
+
codec: new ObjectModelCodec(UpgradeVoteMeta)
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
name: "txnCounter",
|
|
435
|
+
wireKey: "tc",
|
|
436
|
+
optional: true,
|
|
437
|
+
codec: bigIntCodec
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: "stateProofTracking",
|
|
441
|
+
wireKey: "spt",
|
|
442
|
+
optional: true,
|
|
443
|
+
codec: new MapCodec(numberCodec, new ObjectModelCodec(BlockStateProofTrackingDataMeta))
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
name: "participationUpdates",
|
|
447
|
+
flattened: true,
|
|
448
|
+
optional: true,
|
|
449
|
+
codec: new ObjectModelCodec(ParticipationUpdatesMeta)
|
|
450
|
+
}
|
|
451
|
+
]
|
|
452
|
+
})
|
|
405
453
|
}, {
|
|
406
454
|
name: "payset",
|
|
407
455
|
wireKey: "txns",
|
|
@@ -409,7 +457,35 @@ const BlockMeta = {
|
|
|
409
457
|
codec: new ArrayCodec(new ObjectModelCodec(SignedTxnInBlockMeta))
|
|
410
458
|
}]
|
|
411
459
|
};
|
|
460
|
+
/**
|
|
461
|
+
* Custom codec for Block that populates genesis information on transactions after decoding.
|
|
462
|
+
*
|
|
463
|
+
* When blocks are returned from algod, transactions may not include the genesisId
|
|
464
|
+
* and genesisHash fields even though they are required for correct transaction ID calculation.
|
|
465
|
+
* The block contains `hasGenesisId` and `hasGenesisHash` flags that indicate whether these
|
|
466
|
+
* fields should be populated from the block header.
|
|
467
|
+
*
|
|
468
|
+
* This codec automatically populates these fields after decoding to ensure transaction IDs
|
|
469
|
+
* can be calculated correctly.
|
|
470
|
+
*/
|
|
471
|
+
var BlockCodec = class extends ObjectModelCodec {
|
|
472
|
+
constructor() {
|
|
473
|
+
super(BlockMeta);
|
|
474
|
+
}
|
|
475
|
+
fromEncoded(value, format) {
|
|
476
|
+
const block = super.fromEncoded(value, format);
|
|
477
|
+
const genesisId = block.header.genesisId;
|
|
478
|
+
const genesisHash = block.header.genesisHash;
|
|
479
|
+
for (const txnInBlock of block.payset ?? []) {
|
|
480
|
+
const txn = txnInBlock.signedTxn.signedTxn.txn;
|
|
481
|
+
if (txnInBlock.hasGenesisId && txn.genesisId === void 0) txn.genesisId = genesisId;
|
|
482
|
+
if (txnInBlock.hasGenesisHash !== false && txn.genesisHash === void 0) txn.genesisHash = genesisHash;
|
|
483
|
+
}
|
|
484
|
+
return block;
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
const blockCodec = new BlockCodec();
|
|
412
488
|
|
|
413
489
|
//#endregion
|
|
414
|
-
export {
|
|
490
|
+
export { blockCodec };
|
|
415
491
|
//# sourceMappingURL=block.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.mjs","names":["BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta>","BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta>","BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData>","ApplyDataMeta: ObjectModelMetadata<ApplyData>","SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD>","SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock>","ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates>","BlockHeaderMeta: ObjectModelMetadata<BlockHeader>","BlockMeta: ObjectModelMetadata<Block>"],"sources":["../../../../../packages/algod_client/src/models/block.ts"],"sourcesContent":["import {\n Address,\n ArrayCodec,\n MapCodec,\n ObjectModelCodec,\n addressArrayCodec,\n addressCodec,\n bigIntCodec,\n booleanCodec,\n bytesArrayCodec,\n bytesCodec,\n numberCodec,\n stringCodec,\n type ObjectModelMetadata,\n} from '@algorandfoundation/algokit-common'\nimport { SignedTransactionMeta, type SignedTransaction } from '@algorandfoundation/algokit-transact'\n\n/** BlockEvalDelta represents a TEAL value delta (block/msgpack wire keys). */\nexport type BlockEvalDelta = {\n /** [at] delta action. */\n action: number\n /** [bs] bytes value. */\n bytes?: Uint8Array\n /** [ui] uint value. */\n uint?: bigint\n}\n\nexport const BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta> = {\n name: 'BlockEvalDelta',\n kind: 'object',\n fields: [\n { name: 'action', wireKey: 'at', optional: false, codec: numberCodec },\n { name: 'bytes', wireKey: 'bs', optional: true, codec: bytesCodec },\n { name: 'uint', wireKey: 'ui', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * State changes from application execution, including inner transactions and logs.\n */\nexport type BlockAppEvalDelta = {\n /** [gd] Global state delta for the application. */\n globalDelta?: Map<Uint8Array, BlockEvalDelta>\n /** [ld] Local state deltas keyed by address index. */\n localDeltas?: Map<number, Map<Uint8Array, BlockEvalDelta>>\n /** [itx] Inner transactions produced by this application execution. */\n innerTxns?: SignedTxnWithAD[]\n /** [sa] Shared accounts referenced by local deltas. */\n sharedAccounts?: Address[]\n /** [lg] Application log outputs. */\n logs?: Uint8Array[]\n}\n\nexport const BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta> = {\n name: 'BlockAppEvalDelta',\n kind: 'object',\n fields: [\n {\n name: 'globalDelta',\n wireKey: 'gd',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta)),\n },\n {\n name: 'localDeltas',\n wireKey: 'ld',\n optional: true,\n codec: new MapCodec(numberCodec, new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta))),\n },\n {\n name: 'innerTxns',\n wireKey: 'itx',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(() => SignedTxnWithADMeta)),\n },\n {\n name: 'sharedAccounts',\n wireKey: 'sa',\n optional: true,\n codec: addressArrayCodec,\n },\n { name: 'logs', wireKey: 'lg', optional: true, codec: bytesArrayCodec },\n ],\n}\n\n/** Tracking metadata for a specific StateProofType. */\nexport type BlockStateProofTrackingData = {\n /** [v] Vector commitment root of state proof voters. */\n stateProofVotersCommitment?: Uint8Array\n /** [t] Online total weight during state proof round. */\n stateProofOnlineTotalWeight?: bigint\n /** [n] Next round for which state proofs are accepted. */\n stateProofNextRound?: bigint\n}\n\nexport const BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData> = {\n name: 'BlockStateProofTrackingData',\n kind: 'object',\n fields: [\n { name: 'stateProofVotersCommitment', wireKey: 'v', optional: true, codec: bytesCodec },\n { name: 'stateProofOnlineTotalWeight', wireKey: 't', optional: true, codec: bigIntCodec },\n { name: 'stateProofNextRound', wireKey: 'n', optional: true, codec: bigIntCodec },\n ],\n}\n\nexport type ApplyData = {\n closingAmount?: bigint\n assetClosingAmount?: bigint\n senderRewards?: bigint\n receiverRewards?: bigint\n closeRewards?: bigint\n evalDelta?: BlockAppEvalDelta\n configAsset?: bigint\n applicationId?: bigint\n}\n\nexport const ApplyDataMeta: ObjectModelMetadata<ApplyData> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n { name: 'closingAmount', wireKey: 'ca', optional: true, codec: bigIntCodec },\n { name: 'assetClosingAmount', wireKey: 'aca', optional: true, codec: bigIntCodec },\n { name: 'senderRewards', wireKey: 'rs', optional: true, codec: bigIntCodec },\n { name: 'receiverRewards', wireKey: 'rr', optional: true, codec: bigIntCodec },\n { name: 'closeRewards', wireKey: 'rc', optional: true, codec: bigIntCodec },\n { name: 'evalDelta', wireKey: 'dt', optional: true, codec: new ObjectModelCodec(BlockAppEvalDeltaMeta) },\n { name: 'configAsset', wireKey: 'caid', optional: true, codec: bigIntCodec },\n { name: 'applicationId', wireKey: 'apid', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * SignedTxnWithAD is a SignedTransaction with additional ApplyData.\n */\nexport type SignedTxnWithAD = {\n /** The signed transaction. */\n signedTxn: SignedTransaction\n /** Apply data containing transaction execution information. */\n applyData?: ApplyData\n}\n\nexport const SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD> = {\n name: 'SignedTxnWithAD',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTransactionMeta),\n },\n {\n name: 'applyData',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ApplyDataMeta),\n },\n ],\n}\n\n/**\n * SignedTxnInBlock is a SignedTransaction with additional ApplyData and block-specific metadata.\n */\nexport type SignedTxnInBlock = {\n signedTxn: SignedTxnWithAD\n hasGenesisId?: boolean\n hasGenesisHash?: boolean\n}\n\nexport const SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTxnWithADMeta),\n },\n { name: 'hasGenesisId', wireKey: 'hgi', optional: true, codec: booleanCodec },\n { name: 'hasGenesisHash', wireKey: 'hgh', optional: true, codec: booleanCodec },\n ],\n}\n\nexport type ParticipationUpdates = {\n /** [partupdrmv] Expired participation accounts. */\n expiredParticipationAccounts?: string[]\n /** [partupdabs] Absent participation accounts. */\n absentParticipationAccounts?: string[]\n}\n\nexport const ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates> = {\n name: 'ParticipationUpdates',\n kind: 'object',\n fields: [\n {\n name: 'expiredParticipationAccounts',\n wireKey: 'partupdrmv',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'absentParticipationAccounts',\n wireKey: 'partupdabs',\n optional: true,\n codec: addressArrayCodec,\n },\n ],\n}\n\nexport type BlockHeader = {\n /** [rnd] Round number. */\n round?: bigint\n /** [prev] Previous block hash. */\n previousBlockHash?: Uint8Array\n /** [prev512] Previous block hash using SHA-512. */\n previousBlockHash512?: Uint8Array\n /** [seed] Sortition seed. */\n seed?: Uint8Array\n /** [txn] Root of transaction merkle tree using SHA512_256. */\n transactionsRoot?: Uint8Array\n /** [txn256] Root of transaction vector commitment using SHA256. */\n transactionsRootSha256?: Uint8Array\n /** [txn512] Root of transaction vector commitment using SHA512. */\n transactionsRootSha512?: Uint8Array\n /** [ts] Block timestamp in seconds since epoch. */\n timestamp?: bigint\n /** [gen] Genesis ID. */\n genesisId?: string\n /** [gh] Genesis hash. */\n genesisHash?: Uint8Array\n /** [prp] Proposer address. */\n proposer?: Address\n /** [fc] Fees collected in this block. */\n feesCollected?: bigint\n /** [bi] Bonus incentive for block proposal. */\n bonus?: bigint\n /** [pp] Proposer payout. */\n proposerPayout?: bigint\n /** [fees] FeeSink address. */\n feeSink?: Address\n /** [rwd] RewardsPool address. */\n rewardsPool?: Address\n /** [earn] Rewards level. */\n rewardsLevel?: bigint\n /** [rate] Rewards rate. */\n rewardsRate?: bigint\n /** [frac] Rewards residue. */\n rewardsResidue?: bigint\n /** [rwcalr] Rewards recalculation round. */\n rewardsRecalculationRound?: bigint\n /** [proto] Current consensus protocol. */\n currentProtocol?: string\n /** [nextproto] Next proposed protocol. */\n nextProtocol?: string\n /** [nextyes] Next protocol approvals. */\n nextProtocolApprovals?: bigint\n /** [nextbefore] Next protocol vote deadline. */\n nextProtocolVoteBefore?: bigint\n /** [nextswitch] Next protocol switch round. */\n nextProtocolSwitchOn?: bigint\n /** [upgradeprop] Upgrade proposal. */\n upgradePropose?: string\n /** [upgradedelay] Upgrade delay in rounds. */\n upgradeDelay?: bigint\n /** [upgradeyes] Upgrade approval flag. */\n upgradeApprove?: boolean\n /** [tc] Transaction counter. */\n txnCounter?: bigint\n /** [spt] State proof tracking data keyed by state proof type. */\n stateProofTracking?: Map<number, BlockStateProofTrackingData>\n /** Represents participation account data that needs to be checked/acted on by the network */\n participationUpdates?: ParticipationUpdates\n}\n\nexport const BlockHeaderMeta: ObjectModelMetadata<BlockHeader> = {\n name: 'BlockHeader',\n kind: 'object',\n fields: [\n { name: 'round', wireKey: 'rnd', optional: true, codec: bigIntCodec },\n { name: 'previousBlockHash', wireKey: 'prev', optional: true, codec: bytesCodec },\n { name: 'previousBlockHash512', wireKey: 'prev512', optional: true, codec: bytesCodec },\n { name: 'seed', wireKey: 'seed', optional: true, codec: bytesCodec },\n { name: 'transactionsRoot', wireKey: 'txn', optional: false, codec: bytesCodec },\n { name: 'transactionsRootSha256', wireKey: 'txn256', optional: true, codec: bytesCodec },\n { name: 'transactionsRootSha512', wireKey: 'txn512', optional: true, codec: bytesCodec },\n { name: 'timestamp', wireKey: 'ts', optional: true, codec: bigIntCodec },\n { name: 'genesisId', wireKey: 'gen', optional: true, codec: stringCodec },\n { name: 'genesisHash', wireKey: 'gh', optional: true, codec: bytesCodec },\n { name: 'proposer', wireKey: 'prp', optional: true, codec: addressCodec },\n { name: 'feesCollected', wireKey: 'fc', optional: true, codec: bigIntCodec },\n { name: 'bonus', wireKey: 'bi', optional: true, codec: bigIntCodec },\n { name: 'proposerPayout', wireKey: 'pp', optional: true, codec: bigIntCodec },\n { name: 'feeSink', wireKey: 'fees', optional: true, codec: addressCodec },\n { name: 'rewardsPool', wireKey: 'rwd', optional: true, codec: addressCodec },\n { name: 'rewardsLevel', wireKey: 'earn', optional: true, codec: bigIntCodec },\n { name: 'rewardsRate', wireKey: 'rate', optional: true, codec: bigIntCodec },\n { name: 'rewardsResidue', wireKey: 'frac', optional: true, codec: bigIntCodec },\n { name: 'rewardsRecalculationRound', wireKey: 'rwcalr', optional: true, codec: bigIntCodec },\n { name: 'currentProtocol', wireKey: 'proto', optional: true, codec: stringCodec },\n { name: 'nextProtocol', wireKey: 'nextproto', optional: true, codec: stringCodec },\n { name: 'nextProtocolApprovals', wireKey: 'nextyes', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolVoteBefore', wireKey: 'nextbefore', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolSwitchOn', wireKey: 'nextswitch', optional: true, codec: bigIntCodec },\n { name: 'upgradePropose', wireKey: 'upgradeprop', optional: true, codec: stringCodec },\n { name: 'upgradeDelay', wireKey: 'upgradedelay', optional: true, codec: bigIntCodec },\n { name: 'upgradeApprove', wireKey: 'upgradeyes', optional: true, codec: booleanCodec },\n { name: 'txnCounter', wireKey: 'tc', optional: true, codec: bigIntCodec },\n {\n name: 'stateProofTracking',\n wireKey: 'spt',\n optional: true,\n codec: new MapCodec(numberCodec, new ObjectModelCodec(BlockStateProofTrackingDataMeta)),\n },\n {\n name: 'participationUpdates',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ParticipationUpdatesMeta),\n },\n ],\n}\n\n/**\n * Block contains the BlockHeader and the list of transactions (Payset).\n */\nexport type Block = {\n /** The block information (Header) */\n header: BlockHeader\n\n /** [txns] Block transactions (Payset). */\n payset?: SignedTxnInBlock[]\n}\n\nexport const BlockMeta: ObjectModelMetadata<Block> = {\n name: 'Block',\n kind: 'object',\n fields: [\n { name: 'header', flattened: true, optional: false, codec: new ObjectModelCodec(BlockHeaderMeta) },\n {\n name: 'payset',\n wireKey: 'txns',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(SignedTxnInBlockMeta)),\n },\n ],\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,MAAaA,qBAA0D;CACrE,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAU,SAAS;GAAM,UAAU;GAAO,OAAO;GAAa;EACtE;GAAE,MAAM;GAAS,SAAS;GAAM,UAAU;GAAM,OAAO;GAAY;EACnE;GAAE,MAAM;GAAQ,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,OAAO;GAAa;EACtF;GAAE,MAAM;GAAgB,SAAS;GAAgB,UAAU;GAAM,OAAO;GAAa;EACrF;GAAE,MAAM;GAAkB,SAAS;GAAc,UAAU;GAAM,OAAO;GAAc;EACtF;GAAE,MAAM;GAAc,SAAS;GAAM,UAAU;GAAM,OAAO;GAAa;EACzE;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,aAAa,IAAI,iBAAiB,gCAAgC,CAAC;GACxF;EACD;GACE,MAAM;GACN,WAAW;GACX,UAAU;GACV,OAAO,IAAI,iBAAiB,yBAAyB;GACtD;EACF;CACF;AAaD,MAAaC,YAAwC;CACnD,MAAM;CACN,MAAM;CACN,QAAQ,CACN;EAAE,MAAM;EAAU,WAAW;EAAM,UAAU;EAAO,OAAO,IAAI,iBAAiB,gBAAgB;EAAE,EAClG;EACE,MAAM;EACN,SAAS;EACT,UAAU;EACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,qBAAqB,CAAC;EAClE,CACF;CACF"}
|
|
1
|
+
{"version":3,"file":"block.mjs","names":["BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta>","BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta>","BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData>","ApplyDataMeta: ObjectModelMetadata<ApplyData>","SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD>","SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock>","ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates>","TxnCommitmentsMeta: ObjectModelMetadata<TxnCommitments>","RewardStateMeta: ObjectModelMetadata<RewardState>","UpgradeStateMeta: ObjectModelMetadata<UpgradeState>","UpgradeVoteMeta: ObjectModelMetadata<UpgradeVote>","BlockMeta: ObjectModelMetadata<Block>"],"sources":["../../../../../packages/algod_client/src/models/block.ts"],"sourcesContent":["import {\n Address,\n ArrayCodec,\n MapCodec,\n ObjectModelCodec,\n type EncodingFormat,\n type ObjectModelMetadata,\n type WireObject,\n addressArrayCodec,\n addressCodec,\n bigIntCodec,\n booleanCodec,\n bytesArrayCodec,\n bytesCodec,\n fixedBytes32Codec,\n fixedBytes64Codec,\n numberCodec,\n stringCodec,\n} from '@algorandfoundation/algokit-common'\nimport { type SignedTransaction, SignedTransactionMeta } from '@algorandfoundation/algokit-transact'\n\n/** BlockEvalDelta represents a TEAL value delta (block/msgpack wire keys). */\nexport type BlockEvalDelta = {\n /** [at] delta action. */\n action: number\n /** [bs] bytes value. */\n bytes?: Uint8Array\n /** [ui] uint value. */\n uint?: bigint\n}\n\nconst BlockEvalDeltaMeta: ObjectModelMetadata<BlockEvalDelta> = {\n name: 'BlockEvalDelta',\n kind: 'object',\n fields: [\n { name: 'action', wireKey: 'at', optional: false, codec: numberCodec },\n { name: 'bytes', wireKey: 'bs', optional: true, codec: bytesCodec },\n { name: 'uint', wireKey: 'ui', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * State changes from application execution, including inner transactions and logs.\n */\nexport type BlockAppEvalDelta = {\n /** [gd] Global state delta for the application. */\n globalDelta?: Map<Uint8Array, BlockEvalDelta>\n /** [ld] Local state deltas keyed by address index. */\n localDeltas?: Map<number, Map<Uint8Array, BlockEvalDelta>>\n /** [itx] Inner transactions produced by this application execution. */\n innerTxns?: SignedTxnWithAD[]\n /** [sa] Shared accounts referenced by local deltas. */\n sharedAccounts?: Address[]\n /** [lg] Application log outputs. */\n logs?: Uint8Array[]\n}\n\nconst BlockAppEvalDeltaMeta: ObjectModelMetadata<BlockAppEvalDelta> = {\n name: 'BlockAppEvalDelta',\n kind: 'object',\n fields: [\n {\n name: 'globalDelta',\n wireKey: 'gd',\n optional: true,\n codec: new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta)),\n },\n {\n name: 'localDeltas',\n wireKey: 'ld',\n optional: true,\n codec: new MapCodec(numberCodec, new MapCodec(bytesCodec, new ObjectModelCodec(BlockEvalDeltaMeta))),\n },\n {\n name: 'innerTxns',\n wireKey: 'itx',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(() => SignedTxnWithADMeta)),\n },\n {\n name: 'sharedAccounts',\n wireKey: 'sa',\n optional: true,\n codec: addressArrayCodec,\n },\n { name: 'logs', wireKey: 'lg', optional: true, codec: bytesArrayCodec },\n ],\n}\n\n/** Tracking metadata for a specific StateProofType. */\nexport type BlockStateProofTrackingData = {\n /** [v] Vector commitment root of state proof voters. */\n stateProofVotersCommitment?: Uint8Array\n /** [t] Online total weight during state proof round. */\n stateProofOnlineTotalWeight?: bigint\n /** [n] Next round for which state proofs are accepted. */\n stateProofNextRound?: bigint\n}\n\nconst BlockStateProofTrackingDataMeta: ObjectModelMetadata<BlockStateProofTrackingData> = {\n name: 'BlockStateProofTrackingData',\n kind: 'object',\n fields: [\n { name: 'stateProofVotersCommitment', wireKey: 'v', optional: true, codec: bytesCodec },\n { name: 'stateProofOnlineTotalWeight', wireKey: 't', optional: true, codec: bigIntCodec },\n { name: 'stateProofNextRound', wireKey: 'n', optional: true, codec: bigIntCodec },\n ],\n}\n\nexport type ApplyData = {\n closingAmount?: bigint\n assetClosingAmount?: bigint\n senderRewards?: bigint\n receiverRewards?: bigint\n closeRewards?: bigint\n evalDelta?: BlockAppEvalDelta\n configAsset?: bigint\n applicationId?: bigint\n}\n\nconst ApplyDataMeta: ObjectModelMetadata<ApplyData> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n { name: 'closingAmount', wireKey: 'ca', optional: true, codec: bigIntCodec },\n { name: 'assetClosingAmount', wireKey: 'aca', optional: true, codec: bigIntCodec },\n { name: 'senderRewards', wireKey: 'rs', optional: true, codec: bigIntCodec },\n { name: 'receiverRewards', wireKey: 'rr', optional: true, codec: bigIntCodec },\n { name: 'closeRewards', wireKey: 'rc', optional: true, codec: bigIntCodec },\n { name: 'evalDelta', wireKey: 'dt', optional: true, codec: new ObjectModelCodec(BlockAppEvalDeltaMeta) },\n { name: 'configAsset', wireKey: 'caid', optional: true, codec: bigIntCodec },\n { name: 'applicationId', wireKey: 'apid', optional: true, codec: bigIntCodec },\n ],\n}\n\n/**\n * SignedTxnWithAD is a SignedTransaction with additional ApplyData.\n */\nexport type SignedTxnWithAD = {\n /** The signed transaction. */\n signedTxn: SignedTransaction\n /** Apply data containing transaction execution information. */\n applyData?: ApplyData\n}\n\nconst SignedTxnWithADMeta: ObjectModelMetadata<SignedTxnWithAD> = {\n name: 'SignedTxnWithAD',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTransactionMeta),\n },\n {\n name: 'applyData',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ApplyDataMeta),\n },\n ],\n}\n\n/**\n * SignedTxnInBlock is a SignedTransaction with additional ApplyData and block-specific metadata.\n */\nexport type SignedTxnInBlock = {\n signedTxn: SignedTxnWithAD\n hasGenesisId?: boolean\n hasGenesisHash?: boolean\n}\n\nconst SignedTxnInBlockMeta: ObjectModelMetadata<SignedTxnInBlock> = {\n name: 'SignedTxnInBlock',\n kind: 'object',\n fields: [\n {\n name: 'signedTxn',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(SignedTxnWithADMeta),\n },\n { name: 'hasGenesisId', wireKey: 'hgi', optional: true, codec: booleanCodec },\n { name: 'hasGenesisHash', wireKey: 'hgh', optional: true, codec: booleanCodec },\n ],\n}\n\nexport type ParticipationUpdates = {\n /** [partupdrmv] Expired participation accounts. */\n expiredParticipationAccounts?: string[]\n /** [partupdabs] Absent participation accounts. */\n absentParticipationAccounts?: string[]\n}\n\nconst ParticipationUpdatesMeta: ObjectModelMetadata<ParticipationUpdates> = {\n name: 'ParticipationUpdates',\n kind: 'object',\n fields: [\n {\n name: 'expiredParticipationAccounts',\n wireKey: 'partupdrmv',\n optional: true,\n codec: addressArrayCodec,\n },\n {\n name: 'absentParticipationAccounts',\n wireKey: 'partupdabs',\n optional: true,\n codec: addressArrayCodec,\n },\n ],\n}\n\n/** Transaction commitment hashes for the block. */\nexport type TxnCommitments = {\n /** [txn] Root of transaction merkle tree using SHA512_256. */\n nativeSha512_256Commitment: Uint8Array\n /** [txn256] Root of transaction vector commitment using SHA256. */\n sha256Commitment?: Uint8Array\n /** [txn512] Root of transaction vector commitment using SHA512. */\n sha512Commitment?: Uint8Array\n}\n\nconst TxnCommitmentsMeta: ObjectModelMetadata<TxnCommitments> = {\n name: 'TxnCommitments',\n kind: 'object',\n fields: [\n { name: 'nativeSha512_256Commitment', wireKey: 'txn', optional: false, codec: fixedBytes32Codec },\n { name: 'sha256Commitment', wireKey: 'txn256', optional: true, codec: fixedBytes32Codec },\n { name: 'sha512Commitment', wireKey: 'txn512', optional: true, codec: fixedBytes64Codec },\n ],\n}\n\n/** Reward distribution state for the block. */\nexport type RewardState = {\n /** [fees] FeeSink address. */\n feeSink?: Address\n /** [rwd] RewardsPool address. */\n rewardsPool?: Address\n /** [earn] Rewards level. */\n rewardsLevel?: bigint\n /** [rate] Rewards rate. */\n rewardsRate?: bigint\n /** [frac] Rewards residue. */\n rewardsResidue?: bigint\n /** [rwcalr] Rewards recalculation round. */\n rewardsRecalculationRound?: bigint\n}\n\nconst RewardStateMeta: ObjectModelMetadata<RewardState> = {\n name: 'RewardState',\n kind: 'object',\n fields: [\n { name: 'feeSink', wireKey: 'fees', optional: true, codec: addressCodec },\n { name: 'rewardsPool', wireKey: 'rwd', optional: true, codec: addressCodec },\n { name: 'rewardsLevel', wireKey: 'earn', optional: true, codec: bigIntCodec },\n { name: 'rewardsRate', wireKey: 'rate', optional: true, codec: bigIntCodec },\n { name: 'rewardsResidue', wireKey: 'frac', optional: true, codec: bigIntCodec },\n { name: 'rewardsRecalculationRound', wireKey: 'rwcalr', optional: true, codec: bigIntCodec },\n ],\n}\n\n/** Protocol upgrade state for the block. */\nexport type UpgradeState = {\n /** [proto] Current consensus protocol. */\n currentProtocol?: string\n /** [nextproto] Next proposed protocol. */\n nextProtocol?: string\n /** [nextyes] Next protocol approvals. */\n nextProtocolApprovals?: bigint\n /** [nextbefore] Next protocol vote deadline. */\n nextProtocolVoteBefore?: bigint\n /** [nextswitch] Next protocol switch round. */\n nextProtocolSwitchOn?: bigint\n}\n\nconst UpgradeStateMeta: ObjectModelMetadata<UpgradeState> = {\n name: 'UpgradeState',\n kind: 'object',\n fields: [\n { name: 'currentProtocol', wireKey: 'proto', optional: true, codec: stringCodec },\n { name: 'nextProtocol', wireKey: 'nextproto', optional: true, codec: stringCodec },\n { name: 'nextProtocolApprovals', wireKey: 'nextyes', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolVoteBefore', wireKey: 'nextbefore', optional: true, codec: bigIntCodec },\n { name: 'nextProtocolSwitchOn', wireKey: 'nextswitch', optional: true, codec: bigIntCodec },\n ],\n}\n\n/** Protocol upgrade vote parameters for the block. */\nexport type UpgradeVote = {\n /** [upgradeprop] Upgrade proposal. */\n upgradePropose?: string\n /** [upgradedelay] Upgrade delay in rounds. */\n upgradeDelay?: bigint\n /** [upgradeyes] Upgrade approval flag. */\n upgradeApprove?: boolean\n}\n\nconst UpgradeVoteMeta: ObjectModelMetadata<UpgradeVote> = {\n name: 'UpgradeVote',\n kind: 'object',\n fields: [\n { name: 'upgradePropose', wireKey: 'upgradeprop', optional: true, codec: stringCodec },\n { name: 'upgradeDelay', wireKey: 'upgradedelay', optional: true, codec: bigIntCodec },\n { name: 'upgradeApprove', wireKey: 'upgradeyes', optional: true, codec: booleanCodec },\n ],\n}\n\nexport type BlockHeader = {\n /** [rnd] Round number. */\n round?: bigint\n /** [prev] Previous block hash. */\n previousBlockHash?: Uint8Array\n /** [prev512] Previous block hash using SHA-512. */\n previousBlockHash512?: Uint8Array\n /** [seed] Sortition seed. */\n seed?: Uint8Array\n /** Authenticates the set of transactions appearing in the block. */\n txnCommitments: TxnCommitments\n /** [ts] Block timestamp in seconds since epoch. */\n timestamp?: bigint\n /** [gen] Genesis ID. */\n genesisId?: string\n /** [gh] Genesis hash. */\n genesisHash?: Uint8Array\n /** [prp] Proposer address. */\n proposer?: Address\n /** [fc] Fees collected in this block. */\n feesCollected?: bigint\n /** [bi] Bonus incentive for block proposal. */\n bonus?: bigint\n /** [pp] Proposer payout. */\n proposerPayout?: bigint\n /** Reward distribution state. */\n rewardState: RewardState\n /** Protocol upgrade state. */\n upgradeState: UpgradeState\n /** Protocol upgrade vote parameters. */\n upgradeVote: UpgradeVote\n /** [tc] Transaction counter. */\n txnCounter?: bigint\n /** [spt] State proof tracking data keyed by state proof type. */\n stateProofTracking?: Map<number, BlockStateProofTrackingData>\n /** Represents participation account data that needs to be checked/acted on by the network */\n participationUpdates?: ParticipationUpdates\n}\n\nconst BlockHeaderMeta: ObjectModelMetadata<BlockHeader> = {\n name: 'BlockHeader',\n kind: 'object',\n fields: [\n { name: 'round', wireKey: 'rnd', optional: true, codec: bigIntCodec },\n { name: 'previousBlockHash', wireKey: 'prev', optional: true, codec: fixedBytes32Codec },\n { name: 'previousBlockHash512', wireKey: 'prev512', optional: true, codec: fixedBytes64Codec },\n { name: 'seed', wireKey: 'seed', optional: true, codec: bytesCodec },\n {\n name: 'txnCommitments',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(TxnCommitmentsMeta),\n },\n { name: 'timestamp', wireKey: 'ts', optional: true, codec: bigIntCodec },\n { name: 'genesisId', wireKey: 'gen', optional: true, codec: stringCodec },\n { name: 'genesisHash', wireKey: 'gh', optional: true, codec: fixedBytes32Codec },\n { name: 'proposer', wireKey: 'prp', optional: true, codec: addressCodec },\n { name: 'feesCollected', wireKey: 'fc', optional: true, codec: bigIntCodec },\n { name: 'bonus', wireKey: 'bi', optional: true, codec: bigIntCodec },\n { name: 'proposerPayout', wireKey: 'pp', optional: true, codec: bigIntCodec },\n {\n name: 'rewardState',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(RewardStateMeta),\n },\n {\n name: 'upgradeState',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(UpgradeStateMeta),\n },\n {\n name: 'upgradeVote',\n flattened: true,\n optional: false,\n codec: new ObjectModelCodec(UpgradeVoteMeta),\n },\n { name: 'txnCounter', wireKey: 'tc', optional: true, codec: bigIntCodec },\n {\n name: 'stateProofTracking',\n wireKey: 'spt',\n optional: true,\n codec: new MapCodec(numberCodec, new ObjectModelCodec(BlockStateProofTrackingDataMeta)),\n },\n {\n name: 'participationUpdates',\n flattened: true,\n optional: true,\n codec: new ObjectModelCodec(ParticipationUpdatesMeta),\n },\n ],\n}\n\n/**\n * Block contains the BlockHeader and the list of transactions (Payset).\n */\nexport type Block = {\n /** The block information (Header) */\n header: BlockHeader\n\n /** [txns] Block transactions (Payset). */\n payset?: SignedTxnInBlock[]\n}\n\nconst BlockMeta: ObjectModelMetadata<Block> = {\n name: 'Block',\n kind: 'object',\n fields: [\n { name: 'header', flattened: true, optional: false, codec: new ObjectModelCodec(BlockHeaderMeta) },\n {\n name: 'payset',\n wireKey: 'txns',\n optional: true,\n codec: new ArrayCodec(new ObjectModelCodec(SignedTxnInBlockMeta)),\n },\n ],\n}\n\n/**\n * Custom codec for Block that populates genesis information on transactions after decoding.\n *\n * When blocks are returned from algod, transactions may not include the genesisId\n * and genesisHash fields even though they are required for correct transaction ID calculation.\n * The block contains `hasGenesisId` and `hasGenesisHash` flags that indicate whether these\n * fields should be populated from the block header.\n *\n * This codec automatically populates these fields after decoding to ensure transaction IDs\n * can be calculated correctly.\n */\nclass BlockCodec extends ObjectModelCodec<Block> {\n constructor() {\n super(BlockMeta)\n }\n\n protected fromEncoded(value: WireObject, format: EncodingFormat): Block {\n const block = super.fromEncoded(value, format)\n\n // Populate genesis id and hash on transactions if required to ensure tx id's are correct\n const genesisId = block.header.genesisId\n const genesisHash = block.header.genesisHash\n\n for (const txnInBlock of block.payset ?? []) {\n const txn = txnInBlock.signedTxn.signedTxn.txn\n\n if (txnInBlock.hasGenesisId && txn.genesisId === undefined) {\n txn.genesisId = genesisId\n }\n\n // The following assumes that Consensus.RequireGenesisHash is true\n // so assigns genesis hash unless explicitly set to false\n if (txnInBlock.hasGenesisHash !== false && txn.genesisHash === undefined) {\n txn.genesisHash = genesisHash\n }\n }\n\n return block\n }\n}\n\nexport const blockCodec = new BlockCodec()\n"],"mappings":";;;;;;;;;;;;;AA+BA,MAAMA,qBAA0D;CAC9D,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAU,SAAS;GAAM,UAAU;GAAO,OAAO;GAAa;EACtE;GAAE,MAAM;GAAS,SAAS;GAAM,UAAU;GAAM,OAAO;GAAY;EACnE;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAO;GAAa;EACpE;CACF;AAkBD,MAAMC,wBAAgE;CACpE,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,YAAY,IAAI,iBAAiB,mBAAmB,CAAC;GAC1E;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,SAAS,aAAa,IAAI,SAAS,YAAY,IAAI,iBAAiB,mBAAmB,CAAC,CAAC;GACrG;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAI,WAAW,IAAI,uBAAuB,oBAAoB,CAAC;GACvE;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO;GACR;EACD;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAO;GAAiB;EACxE;CACF;AAYD,MAAMC,kCAAoF;CACxF,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAA8B,SAAS;GAAK,UAAU;GAAM,OAAO;GAAY;EACvF;GAAE,MAAM;GAA+B,SAAS;GAAK,UAAU;GAAM,OAAO;GAAa;EACzF;GAAE,MAAM;GAAuB,SAAS;GAAK,UAAU;GAAM,OAAO;GAAa;EAClF;CACF;AAaD,MAAMC,gBAAgD;CACpD,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE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KAAM,OAAO;KAAa;IACzE;KACE,MAAM;KACN,SAAS;KACT,UAAU;KACV,OAAO,IAAI,SAAS,aAAa,IAAI,iBAAiB,gCAAgC,CAAC;KACxF;IACD;KACE,MAAM;KACN,WAAW;KACX,UAAU;KACV,OAAO,IAAI,iBAAiB,yBAAyB;KACtD;IACF;GACF,CAiBmG;EAAE,EAClG;EACE,MAAM;EACN,SAAS;EACT,UAAU;EACV,OAAO,IAAI,WAAW,IAAI,iBAAiB,qBAAqB,CAAC;EAClE,CACF;CACF;;;;;;;;;;;;AAaD,IAAM,aAAN,cAAyB,iBAAwB;CAC/C,cAAc;AACZ,QAAM,UAAU;;CAGlB,AAAU,YAAY,OAAmB,QAA+B;EACtE,MAAM,QAAQ,MAAM,YAAY,OAAO,OAAO;EAG9C,MAAM,YAAY,MAAM,OAAO;EAC/B,MAAM,cAAc,MAAM,OAAO;AAEjC,OAAK,MAAM,cAAc,MAAM,UAAU,EAAE,EAAE;GAC3C,MAAM,MAAM,WAAW,UAAU,UAAU;AAE3C,OAAI,WAAW,gBAAgB,IAAI,cAAc,OAC/C,KAAI,YAAY;AAKlB,OAAI,WAAW,mBAAmB,SAAS,IAAI,gBAAgB,OAC7D,KAAI,cAAc;;AAItB,SAAO;;;AAIX,MAAa,aAAa,IAAI,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-state-delta.js","names":["LedgerTealValueMeta: ObjectModelMetadata<LedgerTealValue>","numberCodec","bytesCodec","bigIntCodec","LedgerStateSchemaMeta: ObjectModelMetadata<LedgerStateSchema>","LedgerAppParamsMeta: ObjectModelMetadata<LedgerAppParams>","ObjectModelCodec","addressCodec","MapCodec","LedgerAppLocalStateMeta: ObjectModelMetadata<LedgerAppLocalState>","LedgerAppLocalStateDeltaMeta: ObjectModelMetadata<LedgerAppLocalStateDelta>","booleanCodec","LedgerAppParamsDeltaMeta: ObjectModelMetadata<LedgerAppParamsDelta>","LedgerAppResourceRecordMeta: ObjectModelMetadata<LedgerAppResourceRecord>","LedgerAssetHoldingMeta: ObjectModelMetadata<LedgerAssetHolding>","LedgerAssetHoldingDeltaMeta: ObjectModelMetadata<LedgerAssetHoldingDelta>","LedgerAssetParamsMeta: ObjectModelMetadata<LedgerAssetParams>","stringCodec","LedgerAssetParamsDeltaMeta: ObjectModelMetadata<LedgerAssetParamsDelta>","LedgerAssetResourceRecordMeta: ObjectModelMetadata<LedgerAssetResourceRecord>","LedgerVotingDataMeta: ObjectModelMetadata<LedgerVotingData>","LedgerAccountBaseDataMeta: ObjectModelMetadata<LedgerAccountBaseData>","LedgerAccountDataMeta: ObjectModelMetadata<LedgerAccountData>","LedgerBalanceRecordMeta: ObjectModelMetadata<LedgerBalanceRecord>","LedgerAccountDeltasMeta: ObjectModelMetadata<LedgerAccountDeltas>","ArrayCodec","LedgerKvValueDeltaMeta: ObjectModelMetadata<LedgerKvValueDelta>","LedgerIncludedTransactionsMeta: ObjectModelMetadata<LedgerIncludedTransactions>","LedgerModifiedCreatableMeta: ObjectModelMetadata<LedgerModifiedCreatable>","LedgerAlgoCountMeta: ObjectModelMetadata<LedgerAlgoCount>","LedgerAccountTotalsMeta: ObjectModelMetadata<LedgerAccountTotals>","LedgerStateDeltaMeta: ObjectModelMetadata<LedgerStateDelta>","BlockMeta"],"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;CACN,QAAQ;EACN;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAO,OAAOC;GAAa;EACpE;GAAE,MAAM;GAAS,SAAS;GAAM,UAAU;GAAM,OAAOC;GAAY;EACnE;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAOC;GAAa;EACpE;CACF;AAYD,MAAaC,wBAAgE;CAC3E,MAAM;CACN,MAAM;CACN,QAAQ,CACN;EAAE,MAAM;EAAY,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iB0B,wBAAU;GAAE;EAC1F;GAAE,MAAM;GAAkB,SAAS;GAAkB,UAAU;GAAO,OAAO7B;GAAa;EAC1F;GAAE,MAAM;GAAiB,SAAS;GAAiB,UAAU;GAAO,OAAOA;GAAa;EACxF;GAAE,MAAM;GAAU,SAAS;GAAU,UAAU;GAAO,OAAO,IAAIG,sCAAiB,wBAAwB;GAAE;EAC5G;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIE,qBAASN,0BAAY,IAAII,sCAAiB,uBAAuB,CAAC;GAC9E;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIE,qBAASN,0BAAY,IAAII,sCAAiB,+BAA+B,CAAC;GACtF;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIE,qBAASP,4BAAa,IAAIK,sCAAiB,4BAA4B,CAAC;GACpF;EACF;CACF"}
|
|
1
|
+
{"version":3,"file":"ledger-state-delta.js","names":["LedgerTealValueMeta: ObjectModelMetadata<LedgerTealValue>","numberCodec","bytesCodec","bigIntCodec","LedgerStateSchemaMeta: ObjectModelMetadata<LedgerStateSchema>","LedgerAppParamsMeta: ObjectModelMetadata<LedgerAppParams>","ObjectModelCodec","addressCodec","MapCodec","LedgerAppLocalStateMeta: ObjectModelMetadata<LedgerAppLocalState>","LedgerAppLocalStateDeltaMeta: ObjectModelMetadata<LedgerAppLocalStateDelta>","booleanCodec","LedgerAppParamsDeltaMeta: ObjectModelMetadata<LedgerAppParamsDelta>","LedgerAppResourceRecordMeta: ObjectModelMetadata<LedgerAppResourceRecord>","LedgerAssetHoldingMeta: ObjectModelMetadata<LedgerAssetHolding>","LedgerAssetHoldingDeltaMeta: ObjectModelMetadata<LedgerAssetHoldingDelta>","LedgerAssetParamsMeta: ObjectModelMetadata<LedgerAssetParams>","stringCodec","LedgerAssetParamsDeltaMeta: ObjectModelMetadata<LedgerAssetParamsDelta>","LedgerAssetResourceRecordMeta: ObjectModelMetadata<LedgerAssetResourceRecord>","LedgerVotingDataMeta: ObjectModelMetadata<LedgerVotingData>","LedgerAccountBaseDataMeta: ObjectModelMetadata<LedgerAccountBaseData>","LedgerAccountDataMeta: ObjectModelMetadata<LedgerAccountData>","LedgerBalanceRecordMeta: ObjectModelMetadata<LedgerBalanceRecord>","LedgerAccountDeltasMeta: ObjectModelMetadata<LedgerAccountDeltas>","ArrayCodec","LedgerKvValueDeltaMeta: ObjectModelMetadata<LedgerKvValueDelta>","LedgerIncludedTransactionsMeta: ObjectModelMetadata<LedgerIncludedTransactions>","LedgerModifiedCreatableMeta: ObjectModelMetadata<LedgerModifiedCreatable>","LedgerAlgoCountMeta: ObjectModelMetadata<LedgerAlgoCount>","LedgerAccountTotalsMeta: ObjectModelMetadata<LedgerAccountTotals>","LedgerStateDeltaMeta: ObjectModelMetadata<LedgerStateDelta>","blockCodec"],"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,OAAOC;GAAa;EACpE;GAAE,MAAM;GAAS,SAAS;GAAM,UAAU;GAAM,OAAOC;GAAY;EACnE;GAAE,MAAM;GAAQ,SAAS;GAAM,UAAU;GAAM,OAAOC;GAAa;EACpE;CACF;AAYD,MAAaC,wBAAgE;CAC3E,MAAM;CACN,MAAM;CACN,QAAQ,CACN;EAAE,MAAM;EAAY,SAAS;EAAO,UAAU;EAAM,OAAOD;EAAa,EACxE;EAAE,MAAM;EAAiB,SAAS;EAAO,UAAU;EAAM,OAAOA;EAAa,CAC9E;CACF;AAgBD,MAAaE,sBAA4D;CACvE,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAmB,SAAS;GAAU,UAAU;GAAO,OAAOH;GAAY;EAClF;GAAE,MAAM;GAAqB,SAAS;GAAU,UAAU;GAAO,O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,IAAII,sCAAiB,uBAAuB,CAAC;GAC9E;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIE,qBAASN,0BAAY,IAAII,sCAAiB,+BAA+B,CAAC;GACtF;EACD;GACE,MAAM;GACN,SAAS;GACT,UAAU;GACV,OAAO,IAAIE,qBAASP,4BAAa,IAAIK,sCAAiB,4BAA4B,CAAC;GACpF;EACF;CACF"}
|
|
@@ -7,7 +7,7 @@ import { stringCodec } from "../../../common/src/codecs/primitives/string.mjs";
|
|
|
7
7
|
import { ArrayCodec } from "../../../common/src/codecs/composite/array.mjs";
|
|
8
8
|
import { MapCodec } from "../../../common/src/codecs/composite/map.mjs";
|
|
9
9
|
import { ObjectModelCodec } from "../../../common/src/codecs/models/object-model.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { blockCodec } from "./block.mjs";
|
|
11
11
|
|
|
12
12
|
//#region packages/algod_client/src/models/ledger-state-delta.ts
|
|
13
13
|
const LedgerTealValueMeta = {
|
|
@@ -642,7 +642,7 @@ const LedgerStateDeltaMeta = {
|
|
|
642
642
|
name: "block",
|
|
643
643
|
wireKey: "Hdr",
|
|
644
644
|
optional: false,
|
|
645
|
-
codec:
|
|
645
|
+
codec: blockCodec
|
|
646
646
|
},
|
|
647
647
|
{
|
|
648
648
|
name: "stateProofNext",
|