algosdk 2.7.0 → 2.9.0
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/README.md +4 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/abi/contract.js +2 -0
- package/dist/cjs/abi/contract.js.map +1 -1
- package/dist/cjs/abi/event.js +3 -0
- package/dist/cjs/abi/event.js.map +1 -0
- package/dist/cjs/abi/method.js +4 -0
- package/dist/cjs/abi/method.js.map +1 -1
- package/dist/cjs/client/v2/algod/models/types.js +194 -7
- package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/client/v2/indexer/models/types.js +110 -67
- package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
- package/dist/cjs/makeTxn.js +26 -0
- package/dist/cjs/makeTxn.js.map +1 -1
- package/dist/esm/abi/contract.js +2 -0
- package/dist/esm/abi/contract.js.map +1 -1
- package/dist/esm/abi/event.js +2 -0
- package/dist/esm/abi/event.js.map +1 -0
- package/dist/esm/abi/method.js +4 -0
- package/dist/esm/abi/method.js.map +1 -1
- package/dist/esm/client/v2/algod/models/types.js +188 -5
- package/dist/esm/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/client/v2/indexer/models/types.js +110 -67
- package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
- package/dist/esm/makeTxn.js +26 -0
- package/dist/esm/makeTxn.js.map +1 -1
- package/dist/types/abi/contract.d.ts +4 -0
- package/dist/types/abi/event.d.ts +16 -0
- package/dist/types/abi/method.d.ts +7 -0
- package/dist/types/client/v2/algod/models/types.d.ts +175 -5
- package/dist/types/client/v2/indexer/models/types.d.ts +189 -131
- package/dist/types/makeTxn.d.ts +29 -1
- package/package.json +2 -2
- package/src/abi/contract.ts +6 -0
- package/src/abi/event.ts +16 -0
- package/src/abi/method.ts +12 -0
- package/src/client/v2/algod/models/types.ts +337 -0
- package/src/client/v2/indexer/models/types.ts +241 -127
- package/src/makeTxn.ts +29 -1
|
@@ -13,13 +13,14 @@ export class Account extends BaseModel {
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new `Account` object.
|
|
15
15
|
* @param address - the account public key
|
|
16
|
-
* @param amount -
|
|
16
|
+
* @param amount - total number of MicroAlgos in the account
|
|
17
17
|
* @param amountWithoutPendingRewards - specifies the amount of MicroAlgos in the account, without the pending rewards.
|
|
18
|
+
* @param minBalance - MicroAlgo balance required by the account.
|
|
19
|
+
* The requirement grows based on asset and application usage.
|
|
18
20
|
* @param pendingRewards - amount of MicroAlgos of pending rewards in this account.
|
|
19
|
-
* @param rewards -
|
|
20
|
-
* rewards.
|
|
21
|
+
* @param rewards - total rewards of MicroAlgos the account has received, including pending rewards.
|
|
21
22
|
* @param round - The round for which this information is relevant.
|
|
22
|
-
* @param status -
|
|
23
|
+
* @param status - voting status of the account's MicroAlgos
|
|
23
24
|
* * Offline - indicates that the associated account is delegated.
|
|
24
25
|
* * Online - indicates that the associated account used as part of the delegation
|
|
25
26
|
* pool.
|
|
@@ -35,40 +36,44 @@ export class Account extends BaseModel {
|
|
|
35
36
|
* application.
|
|
36
37
|
* @param totalCreatedApps - The count of all apps (AppParams objects) created by this account.
|
|
37
38
|
* @param totalCreatedAssets - The count of all assets (AssetParams objects) created by this account.
|
|
38
|
-
* @param appsLocalState -
|
|
39
|
+
* @param appsLocalState - application local data stored in this account.
|
|
39
40
|
* Note the raw object uses `map[int] -> AppLocalState` for this type.
|
|
40
|
-
* @param appsTotalExtraPages -
|
|
41
|
-
* @param appsTotalSchema -
|
|
42
|
-
* account.
|
|
41
|
+
* @param appsTotalExtraPages - the sum of all extra application program pages for this account.
|
|
42
|
+
* @param appsTotalSchema - the sum of all of the local schemas and global schemas in this account.
|
|
43
43
|
* Note: the raw account uses `StateSchema` for this type.
|
|
44
|
-
* @param assets -
|
|
44
|
+
* @param assets - assets held by this account.
|
|
45
45
|
* Note the raw object uses `map[int] -> AssetHolding` for this type.
|
|
46
|
-
* @param authAddr -
|
|
47
|
-
*
|
|
48
|
-
*
|
|
46
|
+
* @param authAddr - The address against which signing should be checked. If empty, the address of
|
|
47
|
+
* the current account is used. This field can be updated in any transaction by
|
|
48
|
+
* setting the RekeyTo field.
|
|
49
49
|
* @param closedAtRound - Round during which this account was most recently closed.
|
|
50
|
-
* @param createdApps -
|
|
51
|
-
* data.
|
|
50
|
+
* @param createdApps - parameters of applications created by this account including app global data.
|
|
52
51
|
* Note: the raw account uses `map[int] -> AppParams` for this type.
|
|
53
|
-
* @param createdAssets -
|
|
52
|
+
* @param createdAssets - parameters of assets created by this account.
|
|
54
53
|
* Note: the raw account uses `map[int] -> Asset` for this type.
|
|
55
54
|
* @param createdAtRound - Round during which this account first appeared in a transaction.
|
|
56
55
|
* @param deleted - Whether or not this account is currently closed.
|
|
56
|
+
* @param incentiveEligible - can the account receive block incentives if its balance is in range at proposal
|
|
57
|
+
* time.
|
|
58
|
+
* @param lastHeartbeat - The round in which this account last went online, or explicitly renewed their
|
|
59
|
+
* online status.
|
|
60
|
+
* @param lastProposed - The round in which this account last proposed the block.
|
|
57
61
|
* @param participation - AccountParticipation describes the parameters used by this account in consensus
|
|
58
62
|
* protocol.
|
|
59
|
-
* @param rewardBase -
|
|
60
|
-
*
|
|
61
|
-
* @param sigType -
|
|
63
|
+
* @param rewardBase - used as part of the rewards computation. Only applicable to accounts which are
|
|
64
|
+
* participating.
|
|
65
|
+
* @param sigType - the type of signature used by this account, must be one of:
|
|
62
66
|
* * sig
|
|
63
67
|
* * msig
|
|
64
68
|
* * lsig
|
|
65
69
|
* * or null if unknown
|
|
66
70
|
*/
|
|
67
|
-
constructor({ address, amount, amountWithoutPendingRewards, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalBoxBytes, totalBoxes, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, closedAtRound, createdApps, createdAssets, createdAtRound, deleted, participation, rewardBase, sigType, }) {
|
|
71
|
+
constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalBoxBytes, totalBoxes, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, closedAtRound, createdApps, createdAssets, createdAtRound, deleted, incentiveEligible, lastHeartbeat, lastProposed, participation, rewardBase, sigType, }) {
|
|
68
72
|
super();
|
|
69
73
|
this.address = address;
|
|
70
74
|
this.amount = amount;
|
|
71
75
|
this.amountWithoutPendingRewards = amountWithoutPendingRewards;
|
|
76
|
+
this.minBalance = minBalance;
|
|
72
77
|
this.pendingRewards = pendingRewards;
|
|
73
78
|
this.rewards = rewards;
|
|
74
79
|
this.round = round;
|
|
@@ -89,6 +94,9 @@ export class Account extends BaseModel {
|
|
|
89
94
|
this.createdAssets = createdAssets;
|
|
90
95
|
this.createdAtRound = createdAtRound;
|
|
91
96
|
this.deleted = deleted;
|
|
97
|
+
this.incentiveEligible = incentiveEligible;
|
|
98
|
+
this.lastHeartbeat = lastHeartbeat;
|
|
99
|
+
this.lastProposed = lastProposed;
|
|
92
100
|
this.participation = participation;
|
|
93
101
|
this.rewardBase = rewardBase;
|
|
94
102
|
this.sigType = sigType;
|
|
@@ -96,6 +104,7 @@ export class Account extends BaseModel {
|
|
|
96
104
|
address: 'address',
|
|
97
105
|
amount: 'amount',
|
|
98
106
|
amountWithoutPendingRewards: 'amount-without-pending-rewards',
|
|
107
|
+
minBalance: 'min-balance',
|
|
99
108
|
pendingRewards: 'pending-rewards',
|
|
100
109
|
rewards: 'rewards',
|
|
101
110
|
round: 'round',
|
|
@@ -116,6 +125,9 @@ export class Account extends BaseModel {
|
|
|
116
125
|
createdAssets: 'created-assets',
|
|
117
126
|
createdAtRound: 'created-at-round',
|
|
118
127
|
deleted: 'deleted',
|
|
128
|
+
incentiveEligible: 'incentive-eligible',
|
|
129
|
+
lastHeartbeat: 'last-heartbeat',
|
|
130
|
+
lastProposed: 'last-proposed',
|
|
119
131
|
participation: 'participation',
|
|
120
132
|
rewardBase: 'reward-base',
|
|
121
133
|
sigType: 'sig-type',
|
|
@@ -130,6 +142,8 @@ export class Account extends BaseModel {
|
|
|
130
142
|
throw new Error(`Response is missing required field 'amount': ${data}`);
|
|
131
143
|
if (typeof data['amount-without-pending-rewards'] === 'undefined')
|
|
132
144
|
throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${data}`);
|
|
145
|
+
if (typeof data['min-balance'] === 'undefined')
|
|
146
|
+
throw new Error(`Response is missing required field 'min-balance': ${data}`);
|
|
133
147
|
if (typeof data['pending-rewards'] === 'undefined')
|
|
134
148
|
throw new Error(`Response is missing required field 'pending-rewards': ${data}`);
|
|
135
149
|
if (typeof data['rewards'] === 'undefined')
|
|
@@ -154,6 +168,7 @@ export class Account extends BaseModel {
|
|
|
154
168
|
address: data['address'],
|
|
155
169
|
amount: data['amount'],
|
|
156
170
|
amountWithoutPendingRewards: data['amount-without-pending-rewards'],
|
|
171
|
+
minBalance: data['min-balance'],
|
|
157
172
|
pendingRewards: data['pending-rewards'],
|
|
158
173
|
rewards: data['rewards'],
|
|
159
174
|
round: data['round'],
|
|
@@ -184,6 +199,9 @@ export class Account extends BaseModel {
|
|
|
184
199
|
: undefined,
|
|
185
200
|
createdAtRound: data['created-at-round'],
|
|
186
201
|
deleted: data['deleted'],
|
|
202
|
+
incentiveEligible: data['incentive-eligible'],
|
|
203
|
+
lastHeartbeat: data['last-heartbeat'],
|
|
204
|
+
lastProposed: data['last-proposed'],
|
|
187
205
|
participation: typeof data['participation'] !== 'undefined'
|
|
188
206
|
? AccountParticipation.from_obj_for_encoding(data['participation'])
|
|
189
207
|
: undefined,
|
|
@@ -200,13 +218,12 @@ export class Account extends BaseModel {
|
|
|
200
218
|
export class AccountParticipation extends BaseModel {
|
|
201
219
|
/**
|
|
202
220
|
* Creates a new `AccountParticipation` object.
|
|
203
|
-
* @param selectionParticipationKey -
|
|
204
|
-
* @param voteFirstValid -
|
|
205
|
-
* @param voteKeyDilution -
|
|
206
|
-
* @param voteLastValid -
|
|
207
|
-
* @param voteParticipationKey -
|
|
208
|
-
*
|
|
209
|
-
* @param stateProofKey - (stprf) Root of the state proof key (if any)
|
|
221
|
+
* @param selectionParticipationKey - Selection public key (if any) currently registered for this round.
|
|
222
|
+
* @param voteFirstValid - First round for which this participation is valid.
|
|
223
|
+
* @param voteKeyDilution - Number of subkeys in each batch of participation keys.
|
|
224
|
+
* @param voteLastValid - Last round for which this participation is valid.
|
|
225
|
+
* @param voteParticipationKey - root participation public key (if any) currently registered for this round.
|
|
226
|
+
* @param stateProofKey - Root of the state proof key (if any)
|
|
210
227
|
*/
|
|
211
228
|
constructor({ selectionParticipationKey, voteFirstValid, voteKeyDilution, voteLastValid, voteParticipationKey, stateProofKey, }) {
|
|
212
229
|
super();
|
|
@@ -367,8 +384,8 @@ export class AccountsResponse extends BaseModel {
|
|
|
367
384
|
export class Application extends BaseModel {
|
|
368
385
|
/**
|
|
369
386
|
* Creates a new `Application` object.
|
|
370
|
-
* @param id -
|
|
371
|
-
* @param params -
|
|
387
|
+
* @param id - application index.
|
|
388
|
+
* @param params - application parameters.
|
|
372
389
|
* @param createdAtRound - Round when this application was created.
|
|
373
390
|
* @param deleted - Whether or not this application is currently deleted.
|
|
374
391
|
* @param deletedAtRound - Round when this application was deleted.
|
|
@@ -412,11 +429,11 @@ export class ApplicationLocalState extends BaseModel {
|
|
|
412
429
|
/**
|
|
413
430
|
* Creates a new `ApplicationLocalState` object.
|
|
414
431
|
* @param id - The application which this local state is for.
|
|
415
|
-
* @param schema -
|
|
432
|
+
* @param schema - schema.
|
|
416
433
|
* @param closedOutAtRound - Round when account closed out of the application.
|
|
417
434
|
* @param deleted - Whether or not the application local state is currently deleted from its
|
|
418
435
|
* account.
|
|
419
|
-
* @param keyValue -
|
|
436
|
+
* @param keyValue - storage.
|
|
420
437
|
* @param optedInAtRound - Round when the account opted into the application.
|
|
421
438
|
*/
|
|
422
439
|
constructor({ id, schema, closedOutAtRound, deleted, keyValue, optedInAtRound, }) {
|
|
@@ -499,7 +516,7 @@ export class ApplicationLocalStatesResponse extends BaseModel {
|
|
|
499
516
|
export class ApplicationLogData extends BaseModel {
|
|
500
517
|
/**
|
|
501
518
|
* Creates a new `ApplicationLogData` object.
|
|
502
|
-
* @param logs -
|
|
519
|
+
* @param logs - Logs for the application being executed by the transaction.
|
|
503
520
|
* @param txid - Transaction ID
|
|
504
521
|
*/
|
|
505
522
|
constructor({ logs, txid }) {
|
|
@@ -574,14 +591,14 @@ export class ApplicationLogsResponse extends BaseModel {
|
|
|
574
591
|
export class ApplicationParams extends BaseModel {
|
|
575
592
|
/**
|
|
576
593
|
* Creates a new `ApplicationParams` object.
|
|
577
|
-
* @param approvalProgram -
|
|
578
|
-
* @param clearStateProgram -
|
|
594
|
+
* @param approvalProgram - approval program.
|
|
595
|
+
* @param clearStateProgram - clear state program.
|
|
579
596
|
* @param creator - The address that created this application. This is the address where the
|
|
580
597
|
* parameters and global state for this application can be found.
|
|
581
|
-
* @param extraProgramPages -
|
|
582
|
-
* @param globalState -
|
|
583
|
-
* @param globalStateSchema -
|
|
584
|
-
* @param localStateSchema -
|
|
598
|
+
* @param extraProgramPages - the number of extra program pages available to this app.
|
|
599
|
+
* @param globalState - global state
|
|
600
|
+
* @param globalStateSchema - global schema
|
|
601
|
+
* @param localStateSchema - local schema
|
|
585
602
|
*/
|
|
586
603
|
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }) {
|
|
587
604
|
super();
|
|
@@ -671,8 +688,8 @@ export class ApplicationResponse extends BaseModel {
|
|
|
671
688
|
export class ApplicationStateSchema extends BaseModel {
|
|
672
689
|
/**
|
|
673
690
|
* Creates a new `ApplicationStateSchema` object.
|
|
674
|
-
* @param numByteSlice -
|
|
675
|
-
* @param numUint -
|
|
691
|
+
* @param numByteSlice - number of byte slices.
|
|
692
|
+
* @param numUint - number of uints.
|
|
676
693
|
*/
|
|
677
694
|
constructor({ numByteSlice, numUint, }) {
|
|
678
695
|
super();
|
|
@@ -826,9 +843,9 @@ export class AssetBalancesResponse extends BaseModel {
|
|
|
826
843
|
export class AssetHolding extends BaseModel {
|
|
827
844
|
/**
|
|
828
845
|
* Creates a new `AssetHolding` object.
|
|
829
|
-
* @param amount -
|
|
846
|
+
* @param amount - number of units held.
|
|
830
847
|
* @param assetId - Asset ID of the holding.
|
|
831
|
-
* @param isFrozen -
|
|
848
|
+
* @param isFrozen - whether or not the holding is frozen.
|
|
832
849
|
* @param deleted - Whether or not the asset holding is currently deleted from its account.
|
|
833
850
|
* @param optedInAtRound - Round during which the account opted into this asset holding.
|
|
834
851
|
* @param optedOutAtRound - Round during which the account opted out of this asset holding.
|
|
@@ -919,28 +936,28 @@ export class AssetParams extends BaseModel {
|
|
|
919
936
|
* @param creator - The address that created this asset. This is the address where the parameters
|
|
920
937
|
* for this asset can be found, and also the address where unwanted asset units can
|
|
921
938
|
* be sent in the worst case.
|
|
922
|
-
* @param decimals -
|
|
923
|
-
*
|
|
924
|
-
*
|
|
925
|
-
*
|
|
926
|
-
* @param total -
|
|
927
|
-
* @param clawback -
|
|
928
|
-
* clawback is not permitted.
|
|
929
|
-
* @param defaultFrozen - (df) Whether holdings of this asset are frozen by default.
|
|
930
|
-
* @param freeze - (f) Address of account used to freeze holdings of this asset. If empty, freezing
|
|
939
|
+
* @param decimals - The number of digits to use after the decimal point when displaying this asset.
|
|
940
|
+
* If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths.
|
|
941
|
+
* If 2, the base unit of the asset is in hundredths, and so on. This value must be
|
|
942
|
+
* between 0 and 19 (inclusive).
|
|
943
|
+
* @param total - The total number of units of this asset.
|
|
944
|
+
* @param clawback - Address of account used to clawback holdings of this asset. If empty, clawback
|
|
931
945
|
* is not permitted.
|
|
932
|
-
* @param
|
|
933
|
-
* @param
|
|
934
|
-
*
|
|
935
|
-
* @param
|
|
936
|
-
* asset
|
|
946
|
+
* @param defaultFrozen - Whether holdings of this asset are frozen by default.
|
|
947
|
+
* @param freeze - Address of account used to freeze holdings of this asset. If empty, freezing is
|
|
948
|
+
* not permitted.
|
|
949
|
+
* @param manager - Address of account used to manage the keys of this asset and to destroy it.
|
|
950
|
+
* @param metadataHash - A commitment to some unspecified asset metadata. The format of this metadata is
|
|
951
|
+
* up to the application.
|
|
952
|
+
* @param name - Name of this asset, as supplied by the creator. Included only when the asset
|
|
953
|
+
* name is composed of printable utf-8 characters.
|
|
937
954
|
* @param nameB64 - Base64 encoded name of this asset, as supplied by the creator.
|
|
938
|
-
* @param reserve -
|
|
939
|
-
* @param unitName -
|
|
940
|
-
*
|
|
955
|
+
* @param reserve - Address of account holding reserve (non-minted) units of this asset.
|
|
956
|
+
* @param unitName - Name of a unit of this asset, as supplied by the creator. Included only when the
|
|
957
|
+
* name of a unit of this asset is composed of printable utf-8 characters.
|
|
941
958
|
* @param unitNameB64 - Base64 encoded name of a unit of this asset, as supplied by the creator.
|
|
942
|
-
* @param url -
|
|
943
|
-
*
|
|
959
|
+
* @param url - URL where more information about the asset can be retrieved. Included only when
|
|
960
|
+
* the URL is composed of printable utf-8 characters.
|
|
944
961
|
* @param urlB64 - Base64 encoded URL where more information about the asset can be retrieved.
|
|
945
962
|
*/
|
|
946
963
|
constructor({ creator, decimals, total, clawback, defaultFrozen, freeze, manager, metadataHash, name, nameB64, reserve, unitName, unitNameB64, url, urlB64, }) {
|
|
@@ -1112,7 +1129,11 @@ export class Block extends BaseModel {
|
|
|
1112
1129
|
* vector commitment instead of a merkle tree, and SHA256 hash function instead of
|
|
1113
1130
|
* the default SHA512_256. This commitment can be used on environments where only
|
|
1114
1131
|
* the SHA256 function exists.
|
|
1132
|
+
* @param bonus - the potential bonus payout for this block.
|
|
1133
|
+
* @param feesCollected - the sum of all fees paid by transactions in this block.
|
|
1115
1134
|
* @param participationUpdates - Participation account data that needs to be checked/acted on by the network.
|
|
1135
|
+
* @param proposer - the proposer of this block.
|
|
1136
|
+
* @param proposerPayout - the actual amount transferred to the proposer from the fee sink.
|
|
1116
1137
|
* @param rewards - Fields relating to rewards,
|
|
1117
1138
|
* @param stateProofTracking - Tracks the status of state proofs.
|
|
1118
1139
|
* @param transactions - (txns) list of transactions corresponding to a given round.
|
|
@@ -1124,7 +1145,7 @@ export class Block extends BaseModel {
|
|
|
1124
1145
|
* @param upgradeState - Fields relating to a protocol upgrade.
|
|
1125
1146
|
* @param upgradeVote - Fields relating to voting for a protocol upgrade.
|
|
1126
1147
|
*/
|
|
1127
|
-
constructor({ genesisHash, genesisId, previousBlockHash, round, seed, timestamp, transactionsRoot, transactionsRootSha256, participationUpdates, rewards, stateProofTracking, transactions, txnCounter, upgradeState, upgradeVote, }) {
|
|
1148
|
+
constructor({ genesisHash, genesisId, previousBlockHash, round, seed, timestamp, transactionsRoot, transactionsRootSha256, bonus, feesCollected, participationUpdates, proposer, proposerPayout, rewards, stateProofTracking, transactions, txnCounter, upgradeState, upgradeVote, }) {
|
|
1128
1149
|
super();
|
|
1129
1150
|
this.genesisHash =
|
|
1130
1151
|
typeof genesisHash === 'string'
|
|
@@ -1149,7 +1170,11 @@ export class Block extends BaseModel {
|
|
|
1149
1170
|
typeof transactionsRootSha256 === 'string'
|
|
1150
1171
|
? new Uint8Array(Buffer.from(transactionsRootSha256, 'base64'))
|
|
1151
1172
|
: transactionsRootSha256;
|
|
1173
|
+
this.bonus = bonus;
|
|
1174
|
+
this.feesCollected = feesCollected;
|
|
1152
1175
|
this.participationUpdates = participationUpdates;
|
|
1176
|
+
this.proposer = proposer;
|
|
1177
|
+
this.proposerPayout = proposerPayout;
|
|
1153
1178
|
this.rewards = rewards;
|
|
1154
1179
|
this.stateProofTracking = stateProofTracking;
|
|
1155
1180
|
this.transactions = transactions;
|
|
@@ -1165,7 +1190,11 @@ export class Block extends BaseModel {
|
|
|
1165
1190
|
timestamp: 'timestamp',
|
|
1166
1191
|
transactionsRoot: 'transactions-root',
|
|
1167
1192
|
transactionsRootSha256: 'transactions-root-sha256',
|
|
1193
|
+
bonus: 'bonus',
|
|
1194
|
+
feesCollected: 'fees-collected',
|
|
1168
1195
|
participationUpdates: 'participation-updates',
|
|
1196
|
+
proposer: 'proposer',
|
|
1197
|
+
proposerPayout: 'proposer-payout',
|
|
1169
1198
|
rewards: 'rewards',
|
|
1170
1199
|
stateProofTracking: 'state-proof-tracking',
|
|
1171
1200
|
transactions: 'transactions',
|
|
@@ -1202,9 +1231,13 @@ export class Block extends BaseModel {
|
|
|
1202
1231
|
timestamp: data['timestamp'],
|
|
1203
1232
|
transactionsRoot: data['transactions-root'],
|
|
1204
1233
|
transactionsRootSha256: data['transactions-root-sha256'],
|
|
1234
|
+
bonus: data['bonus'],
|
|
1235
|
+
feesCollected: data['fees-collected'],
|
|
1205
1236
|
participationUpdates: typeof data['participation-updates'] !== 'undefined'
|
|
1206
1237
|
? ParticipationUpdates.from_obj_for_encoding(data['participation-updates'])
|
|
1207
1238
|
: undefined,
|
|
1239
|
+
proposer: data['proposer'],
|
|
1240
|
+
proposerPayout: data['proposer-payout'],
|
|
1208
1241
|
rewards: typeof data['rewards'] !== 'undefined'
|
|
1209
1242
|
? BlockRewards.from_obj_for_encoding(data['rewards'])
|
|
1210
1243
|
: undefined,
|
|
@@ -1368,20 +1401,23 @@ export class Box extends BaseModel {
|
|
|
1368
1401
|
/**
|
|
1369
1402
|
* Creates a new `Box` object.
|
|
1370
1403
|
* @param name - (name) box name, base64 encoded
|
|
1404
|
+
* @param round - The round for which this information is relevant
|
|
1371
1405
|
* @param value - (value) box value, base64 encoded.
|
|
1372
1406
|
*/
|
|
1373
|
-
constructor({ name, value, }) {
|
|
1407
|
+
constructor({ name, round, value, }) {
|
|
1374
1408
|
super();
|
|
1375
1409
|
this.name =
|
|
1376
1410
|
typeof name === 'string'
|
|
1377
1411
|
? new Uint8Array(Buffer.from(name, 'base64'))
|
|
1378
1412
|
: name;
|
|
1413
|
+
this.round = round;
|
|
1379
1414
|
this.value =
|
|
1380
1415
|
typeof value === 'string'
|
|
1381
1416
|
? new Uint8Array(Buffer.from(value, 'base64'))
|
|
1382
1417
|
: value;
|
|
1383
1418
|
this.attribute_map = {
|
|
1384
1419
|
name: 'name',
|
|
1420
|
+
round: 'round',
|
|
1385
1421
|
value: 'value',
|
|
1386
1422
|
};
|
|
1387
1423
|
}
|
|
@@ -1390,10 +1426,13 @@ export class Box extends BaseModel {
|
|
|
1390
1426
|
/* eslint-disable dot-notation */
|
|
1391
1427
|
if (typeof data['name'] === 'undefined')
|
|
1392
1428
|
throw new Error(`Response is missing required field 'name': ${data}`);
|
|
1429
|
+
if (typeof data['round'] === 'undefined')
|
|
1430
|
+
throw new Error(`Response is missing required field 'round': ${data}`);
|
|
1393
1431
|
if (typeof data['value'] === 'undefined')
|
|
1394
1432
|
throw new Error(`Response is missing required field 'value': ${data}`);
|
|
1395
1433
|
return new Box({
|
|
1396
1434
|
name: data['name'],
|
|
1435
|
+
round: data['round'],
|
|
1397
1436
|
value: data['value'],
|
|
1398
1437
|
});
|
|
1399
1438
|
/* eslint-enable dot-notation */
|
|
@@ -1770,13 +1809,16 @@ export class MiniAssetHolding extends BaseModel {
|
|
|
1770
1809
|
export class ParticipationUpdates extends BaseModel {
|
|
1771
1810
|
/**
|
|
1772
1811
|
* Creates a new `ParticipationUpdates` object.
|
|
1812
|
+
* @param absentParticipationAccounts - (partupabs) a list of online accounts that need to be suspended.
|
|
1773
1813
|
* @param expiredParticipationAccounts - (partupdrmv) a list of online accounts that needs to be converted to offline
|
|
1774
1814
|
* since their participation key expired.
|
|
1775
1815
|
*/
|
|
1776
|
-
constructor({ expiredParticipationAccounts, }) {
|
|
1816
|
+
constructor({ absentParticipationAccounts, expiredParticipationAccounts, }) {
|
|
1777
1817
|
super();
|
|
1818
|
+
this.absentParticipationAccounts = absentParticipationAccounts;
|
|
1778
1819
|
this.expiredParticipationAccounts = expiredParticipationAccounts;
|
|
1779
1820
|
this.attribute_map = {
|
|
1821
|
+
absentParticipationAccounts: 'absent-participation-accounts',
|
|
1780
1822
|
expiredParticipationAccounts: 'expired-participation-accounts',
|
|
1781
1823
|
};
|
|
1782
1824
|
}
|
|
@@ -1784,6 +1826,7 @@ export class ParticipationUpdates extends BaseModel {
|
|
|
1784
1826
|
static from_obj_for_encoding(data) {
|
|
1785
1827
|
/* eslint-disable dot-notation */
|
|
1786
1828
|
return new ParticipationUpdates({
|
|
1829
|
+
absentParticipationAccounts: data['absent-participation-accounts'],
|
|
1787
1830
|
expiredParticipationAccounts: data['expired-participation-accounts'],
|
|
1788
1831
|
});
|
|
1789
1832
|
/* eslint-enable dot-notation */
|
|
@@ -2117,9 +2160,9 @@ export class TealKeyValue extends BaseModel {
|
|
|
2117
2160
|
export class TealValue extends BaseModel {
|
|
2118
2161
|
/**
|
|
2119
2162
|
* Creates a new `TealValue` object.
|
|
2120
|
-
* @param bytes -
|
|
2121
|
-
* @param type -
|
|
2122
|
-
* @param uint -
|
|
2163
|
+
* @param bytes - bytes value.
|
|
2164
|
+
* @param type - type of the value. Value `1` refers to **bytes**, value `2` refers to **uint**
|
|
2165
|
+
* @param uint - uint value.
|
|
2123
2166
|
*/
|
|
2124
2167
|
constructor({ bytes, type, uint, }) {
|
|
2125
2168
|
super();
|
|
@@ -2582,7 +2625,7 @@ export class TransactionAssetTransfer extends BaseModel {
|
|
|
2582
2625
|
* that asset in the account's Assets map.
|
|
2583
2626
|
* @param assetId - (xaid) ID of the asset being transferred.
|
|
2584
2627
|
* @param receiver - (arcv) Recipient address of the transfer.
|
|
2585
|
-
* @param closeAmount - Number of assets
|
|
2628
|
+
* @param closeAmount - Number of assets transferred to the close-to account as part of the transaction.
|
|
2586
2629
|
* @param closeTo - (aclose) Indicates that the asset should be removed from the account's Assets
|
|
2587
2630
|
* map, and specifies where the remaining asset holdings should be transferred.
|
|
2588
2631
|
* It's always valid to transfer remaining asset holdings to the creator account.
|