algosdk 2.7.0 → 2.8.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/client/v2/algod/models/types.js +176 -4
- 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/esm/client/v2/algod/models/types.js +170 -2
- 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/types/client/v2/algod/models/types.d.ts +148 -2
- package/dist/types/client/v2/indexer/models/types.d.ts +189 -131
- package/dist/types/makeTxn.d.ts +1 -1
- package/package.json +2 -2
- package/src/client/v2/algod/models/types.ts +298 -0
- package/src/client/v2/indexer/models/types.ts +241 -127
- package/src/makeTxn.ts +1 -1
|
@@ -20,13 +20,14 @@ class Account extends basemodel_1.default {
|
|
|
20
20
|
/**
|
|
21
21
|
* Creates a new `Account` object.
|
|
22
22
|
* @param address - the account public key
|
|
23
|
-
* @param amount -
|
|
23
|
+
* @param amount - total number of MicroAlgos in the account
|
|
24
24
|
* @param amountWithoutPendingRewards - specifies the amount of MicroAlgos in the account, without the pending rewards.
|
|
25
|
+
* @param minBalance - MicroAlgo balance required by the account.
|
|
26
|
+
* The requirement grows based on asset and application usage.
|
|
25
27
|
* @param pendingRewards - amount of MicroAlgos of pending rewards in this account.
|
|
26
|
-
* @param rewards -
|
|
27
|
-
* rewards.
|
|
28
|
+
* @param rewards - total rewards of MicroAlgos the account has received, including pending rewards.
|
|
28
29
|
* @param round - The round for which this information is relevant.
|
|
29
|
-
* @param status -
|
|
30
|
+
* @param status - voting status of the account's MicroAlgos
|
|
30
31
|
* * Offline - indicates that the associated account is delegated.
|
|
31
32
|
* * Online - indicates that the associated account used as part of the delegation
|
|
32
33
|
* pool.
|
|
@@ -42,40 +43,44 @@ class Account extends basemodel_1.default {
|
|
|
42
43
|
* application.
|
|
43
44
|
* @param totalCreatedApps - The count of all apps (AppParams objects) created by this account.
|
|
44
45
|
* @param totalCreatedAssets - The count of all assets (AssetParams objects) created by this account.
|
|
45
|
-
* @param appsLocalState -
|
|
46
|
+
* @param appsLocalState - application local data stored in this account.
|
|
46
47
|
* Note the raw object uses `map[int] -> AppLocalState` for this type.
|
|
47
|
-
* @param appsTotalExtraPages -
|
|
48
|
-
* @param appsTotalSchema -
|
|
49
|
-
* account.
|
|
48
|
+
* @param appsTotalExtraPages - the sum of all extra application program pages for this account.
|
|
49
|
+
* @param appsTotalSchema - the sum of all of the local schemas and global schemas in this account.
|
|
50
50
|
* Note: the raw account uses `StateSchema` for this type.
|
|
51
|
-
* @param assets -
|
|
51
|
+
* @param assets - assets held by this account.
|
|
52
52
|
* Note the raw object uses `map[int] -> AssetHolding` for this type.
|
|
53
|
-
* @param authAddr -
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* @param authAddr - The address against which signing should be checked. If empty, the address of
|
|
54
|
+
* the current account is used. This field can be updated in any transaction by
|
|
55
|
+
* setting the RekeyTo field.
|
|
56
56
|
* @param closedAtRound - Round during which this account was most recently closed.
|
|
57
|
-
* @param createdApps -
|
|
58
|
-
* data.
|
|
57
|
+
* @param createdApps - parameters of applications created by this account including app global data.
|
|
59
58
|
* Note: the raw account uses `map[int] -> AppParams` for this type.
|
|
60
|
-
* @param createdAssets -
|
|
59
|
+
* @param createdAssets - parameters of assets created by this account.
|
|
61
60
|
* Note: the raw account uses `map[int] -> Asset` for this type.
|
|
62
61
|
* @param createdAtRound - Round during which this account first appeared in a transaction.
|
|
63
62
|
* @param deleted - Whether or not this account is currently closed.
|
|
63
|
+
* @param incentiveEligible - can the account receive block incentives if its balance is in range at proposal
|
|
64
|
+
* time.
|
|
65
|
+
* @param lastHeartbeat - The round in which this account last went online, or explicitly renewed their
|
|
66
|
+
* online status.
|
|
67
|
+
* @param lastProposed - The round in which this account last proposed the block.
|
|
64
68
|
* @param participation - AccountParticipation describes the parameters used by this account in consensus
|
|
65
69
|
* protocol.
|
|
66
|
-
* @param rewardBase -
|
|
67
|
-
*
|
|
68
|
-
* @param sigType -
|
|
70
|
+
* @param rewardBase - used as part of the rewards computation. Only applicable to accounts which are
|
|
71
|
+
* participating.
|
|
72
|
+
* @param sigType - the type of signature used by this account, must be one of:
|
|
69
73
|
* * sig
|
|
70
74
|
* * msig
|
|
71
75
|
* * lsig
|
|
72
76
|
* * or null if unknown
|
|
73
77
|
*/
|
|
74
|
-
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, }) {
|
|
78
|
+
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, }) {
|
|
75
79
|
super();
|
|
76
80
|
this.address = address;
|
|
77
81
|
this.amount = amount;
|
|
78
82
|
this.amountWithoutPendingRewards = amountWithoutPendingRewards;
|
|
83
|
+
this.minBalance = minBalance;
|
|
79
84
|
this.pendingRewards = pendingRewards;
|
|
80
85
|
this.rewards = rewards;
|
|
81
86
|
this.round = round;
|
|
@@ -96,6 +101,9 @@ class Account extends basemodel_1.default {
|
|
|
96
101
|
this.createdAssets = createdAssets;
|
|
97
102
|
this.createdAtRound = createdAtRound;
|
|
98
103
|
this.deleted = deleted;
|
|
104
|
+
this.incentiveEligible = incentiveEligible;
|
|
105
|
+
this.lastHeartbeat = lastHeartbeat;
|
|
106
|
+
this.lastProposed = lastProposed;
|
|
99
107
|
this.participation = participation;
|
|
100
108
|
this.rewardBase = rewardBase;
|
|
101
109
|
this.sigType = sigType;
|
|
@@ -103,6 +111,7 @@ class Account extends basemodel_1.default {
|
|
|
103
111
|
address: 'address',
|
|
104
112
|
amount: 'amount',
|
|
105
113
|
amountWithoutPendingRewards: 'amount-without-pending-rewards',
|
|
114
|
+
minBalance: 'min-balance',
|
|
106
115
|
pendingRewards: 'pending-rewards',
|
|
107
116
|
rewards: 'rewards',
|
|
108
117
|
round: 'round',
|
|
@@ -123,6 +132,9 @@ class Account extends basemodel_1.default {
|
|
|
123
132
|
createdAssets: 'created-assets',
|
|
124
133
|
createdAtRound: 'created-at-round',
|
|
125
134
|
deleted: 'deleted',
|
|
135
|
+
incentiveEligible: 'incentive-eligible',
|
|
136
|
+
lastHeartbeat: 'last-heartbeat',
|
|
137
|
+
lastProposed: 'last-proposed',
|
|
126
138
|
participation: 'participation',
|
|
127
139
|
rewardBase: 'reward-base',
|
|
128
140
|
sigType: 'sig-type',
|
|
@@ -137,6 +149,8 @@ class Account extends basemodel_1.default {
|
|
|
137
149
|
throw new Error(`Response is missing required field 'amount': ${data}`);
|
|
138
150
|
if (typeof data['amount-without-pending-rewards'] === 'undefined')
|
|
139
151
|
throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${data}`);
|
|
152
|
+
if (typeof data['min-balance'] === 'undefined')
|
|
153
|
+
throw new Error(`Response is missing required field 'min-balance': ${data}`);
|
|
140
154
|
if (typeof data['pending-rewards'] === 'undefined')
|
|
141
155
|
throw new Error(`Response is missing required field 'pending-rewards': ${data}`);
|
|
142
156
|
if (typeof data['rewards'] === 'undefined')
|
|
@@ -161,6 +175,7 @@ class Account extends basemodel_1.default {
|
|
|
161
175
|
address: data['address'],
|
|
162
176
|
amount: data['amount'],
|
|
163
177
|
amountWithoutPendingRewards: data['amount-without-pending-rewards'],
|
|
178
|
+
minBalance: data['min-balance'],
|
|
164
179
|
pendingRewards: data['pending-rewards'],
|
|
165
180
|
rewards: data['rewards'],
|
|
166
181
|
round: data['round'],
|
|
@@ -191,6 +206,9 @@ class Account extends basemodel_1.default {
|
|
|
191
206
|
: undefined,
|
|
192
207
|
createdAtRound: data['created-at-round'],
|
|
193
208
|
deleted: data['deleted'],
|
|
209
|
+
incentiveEligible: data['incentive-eligible'],
|
|
210
|
+
lastHeartbeat: data['last-heartbeat'],
|
|
211
|
+
lastProposed: data['last-proposed'],
|
|
194
212
|
participation: typeof data['participation'] !== 'undefined'
|
|
195
213
|
? AccountParticipation.from_obj_for_encoding(data['participation'])
|
|
196
214
|
: undefined,
|
|
@@ -208,13 +226,12 @@ exports.Account = Account;
|
|
|
208
226
|
class AccountParticipation extends basemodel_1.default {
|
|
209
227
|
/**
|
|
210
228
|
* Creates a new `AccountParticipation` object.
|
|
211
|
-
* @param selectionParticipationKey -
|
|
212
|
-
* @param voteFirstValid -
|
|
213
|
-
* @param voteKeyDilution -
|
|
214
|
-
* @param voteLastValid -
|
|
215
|
-
* @param voteParticipationKey -
|
|
216
|
-
*
|
|
217
|
-
* @param stateProofKey - (stprf) Root of the state proof key (if any)
|
|
229
|
+
* @param selectionParticipationKey - Selection public key (if any) currently registered for this round.
|
|
230
|
+
* @param voteFirstValid - First round for which this participation is valid.
|
|
231
|
+
* @param voteKeyDilution - Number of subkeys in each batch of participation keys.
|
|
232
|
+
* @param voteLastValid - Last round for which this participation is valid.
|
|
233
|
+
* @param voteParticipationKey - root participation public key (if any) currently registered for this round.
|
|
234
|
+
* @param stateProofKey - Root of the state proof key (if any)
|
|
218
235
|
*/
|
|
219
236
|
constructor({ selectionParticipationKey, voteFirstValid, voteKeyDilution, voteLastValid, voteParticipationKey, stateProofKey, }) {
|
|
220
237
|
super();
|
|
@@ -379,8 +396,8 @@ exports.AccountsResponse = AccountsResponse;
|
|
|
379
396
|
class Application extends basemodel_1.default {
|
|
380
397
|
/**
|
|
381
398
|
* Creates a new `Application` object.
|
|
382
|
-
* @param id -
|
|
383
|
-
* @param params -
|
|
399
|
+
* @param id - application index.
|
|
400
|
+
* @param params - application parameters.
|
|
384
401
|
* @param createdAtRound - Round when this application was created.
|
|
385
402
|
* @param deleted - Whether or not this application is currently deleted.
|
|
386
403
|
* @param deletedAtRound - Round when this application was deleted.
|
|
@@ -425,11 +442,11 @@ class ApplicationLocalState extends basemodel_1.default {
|
|
|
425
442
|
/**
|
|
426
443
|
* Creates a new `ApplicationLocalState` object.
|
|
427
444
|
* @param id - The application which this local state is for.
|
|
428
|
-
* @param schema -
|
|
445
|
+
* @param schema - schema.
|
|
429
446
|
* @param closedOutAtRound - Round when account closed out of the application.
|
|
430
447
|
* @param deleted - Whether or not the application local state is currently deleted from its
|
|
431
448
|
* account.
|
|
432
|
-
* @param keyValue -
|
|
449
|
+
* @param keyValue - storage.
|
|
433
450
|
* @param optedInAtRound - Round when the account opted into the application.
|
|
434
451
|
*/
|
|
435
452
|
constructor({ id, schema, closedOutAtRound, deleted, keyValue, optedInAtRound, }) {
|
|
@@ -514,7 +531,7 @@ exports.ApplicationLocalStatesResponse = ApplicationLocalStatesResponse;
|
|
|
514
531
|
class ApplicationLogData extends basemodel_1.default {
|
|
515
532
|
/**
|
|
516
533
|
* Creates a new `ApplicationLogData` object.
|
|
517
|
-
* @param logs -
|
|
534
|
+
* @param logs - Logs for the application being executed by the transaction.
|
|
518
535
|
* @param txid - Transaction ID
|
|
519
536
|
*/
|
|
520
537
|
constructor({ logs, txid }) {
|
|
@@ -591,14 +608,14 @@ exports.ApplicationLogsResponse = ApplicationLogsResponse;
|
|
|
591
608
|
class ApplicationParams extends basemodel_1.default {
|
|
592
609
|
/**
|
|
593
610
|
* Creates a new `ApplicationParams` object.
|
|
594
|
-
* @param approvalProgram -
|
|
595
|
-
* @param clearStateProgram -
|
|
611
|
+
* @param approvalProgram - approval program.
|
|
612
|
+
* @param clearStateProgram - clear state program.
|
|
596
613
|
* @param creator - The address that created this application. This is the address where the
|
|
597
614
|
* parameters and global state for this application can be found.
|
|
598
|
-
* @param extraProgramPages -
|
|
599
|
-
* @param globalState -
|
|
600
|
-
* @param globalStateSchema -
|
|
601
|
-
* @param localStateSchema -
|
|
615
|
+
* @param extraProgramPages - the number of extra program pages available to this app.
|
|
616
|
+
* @param globalState - global state
|
|
617
|
+
* @param globalStateSchema - global schema
|
|
618
|
+
* @param localStateSchema - local schema
|
|
602
619
|
*/
|
|
603
620
|
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }) {
|
|
604
621
|
super();
|
|
@@ -690,8 +707,8 @@ exports.ApplicationResponse = ApplicationResponse;
|
|
|
690
707
|
class ApplicationStateSchema extends basemodel_1.default {
|
|
691
708
|
/**
|
|
692
709
|
* Creates a new `ApplicationStateSchema` object.
|
|
693
|
-
* @param numByteSlice -
|
|
694
|
-
* @param numUint -
|
|
710
|
+
* @param numByteSlice - number of byte slices.
|
|
711
|
+
* @param numUint - number of uints.
|
|
695
712
|
*/
|
|
696
713
|
constructor({ numByteSlice, numUint, }) {
|
|
697
714
|
super();
|
|
@@ -849,9 +866,9 @@ exports.AssetBalancesResponse = AssetBalancesResponse;
|
|
|
849
866
|
class AssetHolding extends basemodel_1.default {
|
|
850
867
|
/**
|
|
851
868
|
* Creates a new `AssetHolding` object.
|
|
852
|
-
* @param amount -
|
|
869
|
+
* @param amount - number of units held.
|
|
853
870
|
* @param assetId - Asset ID of the holding.
|
|
854
|
-
* @param isFrozen -
|
|
871
|
+
* @param isFrozen - whether or not the holding is frozen.
|
|
855
872
|
* @param deleted - Whether or not the asset holding is currently deleted from its account.
|
|
856
873
|
* @param optedInAtRound - Round during which the account opted into this asset holding.
|
|
857
874
|
* @param optedOutAtRound - Round during which the account opted out of this asset holding.
|
|
@@ -944,28 +961,28 @@ class AssetParams extends basemodel_1.default {
|
|
|
944
961
|
* @param creator - The address that created this asset. This is the address where the parameters
|
|
945
962
|
* for this asset can be found, and also the address where unwanted asset units can
|
|
946
963
|
* be sent in the worst case.
|
|
947
|
-
* @param decimals -
|
|
948
|
-
*
|
|
949
|
-
*
|
|
950
|
-
*
|
|
951
|
-
* @param total -
|
|
952
|
-
* @param clawback -
|
|
953
|
-
* clawback is not permitted.
|
|
954
|
-
* @param defaultFrozen - (df) Whether holdings of this asset are frozen by default.
|
|
955
|
-
* @param freeze - (f) Address of account used to freeze holdings of this asset. If empty, freezing
|
|
964
|
+
* @param decimals - The number of digits to use after the decimal point when displaying this asset.
|
|
965
|
+
* If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths.
|
|
966
|
+
* If 2, the base unit of the asset is in hundredths, and so on. This value must be
|
|
967
|
+
* between 0 and 19 (inclusive).
|
|
968
|
+
* @param total - The total number of units of this asset.
|
|
969
|
+
* @param clawback - Address of account used to clawback holdings of this asset. If empty, clawback
|
|
956
970
|
* is not permitted.
|
|
957
|
-
* @param
|
|
958
|
-
* @param
|
|
959
|
-
*
|
|
960
|
-
* @param
|
|
961
|
-
* asset
|
|
971
|
+
* @param defaultFrozen - Whether holdings of this asset are frozen by default.
|
|
972
|
+
* @param freeze - Address of account used to freeze holdings of this asset. If empty, freezing is
|
|
973
|
+
* not permitted.
|
|
974
|
+
* @param manager - Address of account used to manage the keys of this asset and to destroy it.
|
|
975
|
+
* @param metadataHash - A commitment to some unspecified asset metadata. The format of this metadata is
|
|
976
|
+
* up to the application.
|
|
977
|
+
* @param name - Name of this asset, as supplied by the creator. Included only when the asset
|
|
978
|
+
* name is composed of printable utf-8 characters.
|
|
962
979
|
* @param nameB64 - Base64 encoded name of this asset, as supplied by the creator.
|
|
963
|
-
* @param reserve -
|
|
964
|
-
* @param unitName -
|
|
965
|
-
*
|
|
980
|
+
* @param reserve - Address of account holding reserve (non-minted) units of this asset.
|
|
981
|
+
* @param unitName - Name of a unit of this asset, as supplied by the creator. Included only when the
|
|
982
|
+
* name of a unit of this asset is composed of printable utf-8 characters.
|
|
966
983
|
* @param unitNameB64 - Base64 encoded name of a unit of this asset, as supplied by the creator.
|
|
967
|
-
* @param url -
|
|
968
|
-
*
|
|
984
|
+
* @param url - URL where more information about the asset can be retrieved. Included only when
|
|
985
|
+
* the URL is composed of printable utf-8 characters.
|
|
969
986
|
* @param urlB64 - Base64 encoded URL where more information about the asset can be retrieved.
|
|
970
987
|
*/
|
|
971
988
|
constructor({ creator, decimals, total, clawback, defaultFrozen, freeze, manager, metadataHash, name, nameB64, reserve, unitName, unitNameB64, url, urlB64, }) {
|
|
@@ -1140,7 +1157,11 @@ class Block extends basemodel_1.default {
|
|
|
1140
1157
|
* vector commitment instead of a merkle tree, and SHA256 hash function instead of
|
|
1141
1158
|
* the default SHA512_256. This commitment can be used on environments where only
|
|
1142
1159
|
* the SHA256 function exists.
|
|
1160
|
+
* @param bonus - the potential bonus payout for this block.
|
|
1161
|
+
* @param feesCollected - the sum of all fees paid by transactions in this block.
|
|
1143
1162
|
* @param participationUpdates - Participation account data that needs to be checked/acted on by the network.
|
|
1163
|
+
* @param proposer - the proposer of this block.
|
|
1164
|
+
* @param proposerPayout - the actual amount transferred to the proposer from the fee sink.
|
|
1144
1165
|
* @param rewards - Fields relating to rewards,
|
|
1145
1166
|
* @param stateProofTracking - Tracks the status of state proofs.
|
|
1146
1167
|
* @param transactions - (txns) list of transactions corresponding to a given round.
|
|
@@ -1152,7 +1173,7 @@ class Block extends basemodel_1.default {
|
|
|
1152
1173
|
* @param upgradeState - Fields relating to a protocol upgrade.
|
|
1153
1174
|
* @param upgradeVote - Fields relating to voting for a protocol upgrade.
|
|
1154
1175
|
*/
|
|
1155
|
-
constructor({ genesisHash, genesisId, previousBlockHash, round, seed, timestamp, transactionsRoot, transactionsRootSha256, participationUpdates, rewards, stateProofTracking, transactions, txnCounter, upgradeState, upgradeVote, }) {
|
|
1176
|
+
constructor({ genesisHash, genesisId, previousBlockHash, round, seed, timestamp, transactionsRoot, transactionsRootSha256, bonus, feesCollected, participationUpdates, proposer, proposerPayout, rewards, stateProofTracking, transactions, txnCounter, upgradeState, upgradeVote, }) {
|
|
1156
1177
|
super();
|
|
1157
1178
|
this.genesisHash =
|
|
1158
1179
|
typeof genesisHash === 'string'
|
|
@@ -1177,7 +1198,11 @@ class Block extends basemodel_1.default {
|
|
|
1177
1198
|
typeof transactionsRootSha256 === 'string'
|
|
1178
1199
|
? new Uint8Array(buffer_1.Buffer.from(transactionsRootSha256, 'base64'))
|
|
1179
1200
|
: transactionsRootSha256;
|
|
1201
|
+
this.bonus = bonus;
|
|
1202
|
+
this.feesCollected = feesCollected;
|
|
1180
1203
|
this.participationUpdates = participationUpdates;
|
|
1204
|
+
this.proposer = proposer;
|
|
1205
|
+
this.proposerPayout = proposerPayout;
|
|
1181
1206
|
this.rewards = rewards;
|
|
1182
1207
|
this.stateProofTracking = stateProofTracking;
|
|
1183
1208
|
this.transactions = transactions;
|
|
@@ -1193,7 +1218,11 @@ class Block extends basemodel_1.default {
|
|
|
1193
1218
|
timestamp: 'timestamp',
|
|
1194
1219
|
transactionsRoot: 'transactions-root',
|
|
1195
1220
|
transactionsRootSha256: 'transactions-root-sha256',
|
|
1221
|
+
bonus: 'bonus',
|
|
1222
|
+
feesCollected: 'fees-collected',
|
|
1196
1223
|
participationUpdates: 'participation-updates',
|
|
1224
|
+
proposer: 'proposer',
|
|
1225
|
+
proposerPayout: 'proposer-payout',
|
|
1197
1226
|
rewards: 'rewards',
|
|
1198
1227
|
stateProofTracking: 'state-proof-tracking',
|
|
1199
1228
|
transactions: 'transactions',
|
|
@@ -1230,9 +1259,13 @@ class Block extends basemodel_1.default {
|
|
|
1230
1259
|
timestamp: data['timestamp'],
|
|
1231
1260
|
transactionsRoot: data['transactions-root'],
|
|
1232
1261
|
transactionsRootSha256: data['transactions-root-sha256'],
|
|
1262
|
+
bonus: data['bonus'],
|
|
1263
|
+
feesCollected: data['fees-collected'],
|
|
1233
1264
|
participationUpdates: typeof data['participation-updates'] !== 'undefined'
|
|
1234
1265
|
? ParticipationUpdates.from_obj_for_encoding(data['participation-updates'])
|
|
1235
1266
|
: undefined,
|
|
1267
|
+
proposer: data['proposer'],
|
|
1268
|
+
proposerPayout: data['proposer-payout'],
|
|
1236
1269
|
rewards: typeof data['rewards'] !== 'undefined'
|
|
1237
1270
|
? BlockRewards.from_obj_for_encoding(data['rewards'])
|
|
1238
1271
|
: undefined,
|
|
@@ -1400,20 +1433,23 @@ class Box extends basemodel_1.default {
|
|
|
1400
1433
|
/**
|
|
1401
1434
|
* Creates a new `Box` object.
|
|
1402
1435
|
* @param name - (name) box name, base64 encoded
|
|
1436
|
+
* @param round - The round for which this information is relevant
|
|
1403
1437
|
* @param value - (value) box value, base64 encoded.
|
|
1404
1438
|
*/
|
|
1405
|
-
constructor({ name, value, }) {
|
|
1439
|
+
constructor({ name, round, value, }) {
|
|
1406
1440
|
super();
|
|
1407
1441
|
this.name =
|
|
1408
1442
|
typeof name === 'string'
|
|
1409
1443
|
? new Uint8Array(buffer_1.Buffer.from(name, 'base64'))
|
|
1410
1444
|
: name;
|
|
1445
|
+
this.round = round;
|
|
1411
1446
|
this.value =
|
|
1412
1447
|
typeof value === 'string'
|
|
1413
1448
|
? new Uint8Array(buffer_1.Buffer.from(value, 'base64'))
|
|
1414
1449
|
: value;
|
|
1415
1450
|
this.attribute_map = {
|
|
1416
1451
|
name: 'name',
|
|
1452
|
+
round: 'round',
|
|
1417
1453
|
value: 'value',
|
|
1418
1454
|
};
|
|
1419
1455
|
}
|
|
@@ -1422,10 +1458,13 @@ class Box extends basemodel_1.default {
|
|
|
1422
1458
|
/* eslint-disable dot-notation */
|
|
1423
1459
|
if (typeof data['name'] === 'undefined')
|
|
1424
1460
|
throw new Error(`Response is missing required field 'name': ${data}`);
|
|
1461
|
+
if (typeof data['round'] === 'undefined')
|
|
1462
|
+
throw new Error(`Response is missing required field 'round': ${data}`);
|
|
1425
1463
|
if (typeof data['value'] === 'undefined')
|
|
1426
1464
|
throw new Error(`Response is missing required field 'value': ${data}`);
|
|
1427
1465
|
return new Box({
|
|
1428
1466
|
name: data['name'],
|
|
1467
|
+
round: data['round'],
|
|
1429
1468
|
value: data['value'],
|
|
1430
1469
|
});
|
|
1431
1470
|
/* eslint-enable dot-notation */
|
|
@@ -1813,13 +1852,16 @@ exports.MiniAssetHolding = MiniAssetHolding;
|
|
|
1813
1852
|
class ParticipationUpdates extends basemodel_1.default {
|
|
1814
1853
|
/**
|
|
1815
1854
|
* Creates a new `ParticipationUpdates` object.
|
|
1855
|
+
* @param absentParticipationAccounts - (partupabs) a list of online accounts that need to be suspended.
|
|
1816
1856
|
* @param expiredParticipationAccounts - (partupdrmv) a list of online accounts that needs to be converted to offline
|
|
1817
1857
|
* since their participation key expired.
|
|
1818
1858
|
*/
|
|
1819
|
-
constructor({ expiredParticipationAccounts, }) {
|
|
1859
|
+
constructor({ absentParticipationAccounts, expiredParticipationAccounts, }) {
|
|
1820
1860
|
super();
|
|
1861
|
+
this.absentParticipationAccounts = absentParticipationAccounts;
|
|
1821
1862
|
this.expiredParticipationAccounts = expiredParticipationAccounts;
|
|
1822
1863
|
this.attribute_map = {
|
|
1864
|
+
absentParticipationAccounts: 'absent-participation-accounts',
|
|
1823
1865
|
expiredParticipationAccounts: 'expired-participation-accounts',
|
|
1824
1866
|
};
|
|
1825
1867
|
}
|
|
@@ -1827,6 +1869,7 @@ class ParticipationUpdates extends basemodel_1.default {
|
|
|
1827
1869
|
static from_obj_for_encoding(data) {
|
|
1828
1870
|
/* eslint-disable dot-notation */
|
|
1829
1871
|
return new ParticipationUpdates({
|
|
1872
|
+
absentParticipationAccounts: data['absent-participation-accounts'],
|
|
1830
1873
|
expiredParticipationAccounts: data['expired-participation-accounts'],
|
|
1831
1874
|
});
|
|
1832
1875
|
/* eslint-enable dot-notation */
|
|
@@ -2170,9 +2213,9 @@ exports.TealKeyValue = TealKeyValue;
|
|
|
2170
2213
|
class TealValue extends basemodel_1.default {
|
|
2171
2214
|
/**
|
|
2172
2215
|
* Creates a new `TealValue` object.
|
|
2173
|
-
* @param bytes -
|
|
2174
|
-
* @param type -
|
|
2175
|
-
* @param uint -
|
|
2216
|
+
* @param bytes - bytes value.
|
|
2217
|
+
* @param type - type of the value. Value `1` refers to **bytes**, value `2` refers to **uint**
|
|
2218
|
+
* @param uint - uint value.
|
|
2176
2219
|
*/
|
|
2177
2220
|
constructor({ bytes, type, uint, }) {
|
|
2178
2221
|
super();
|
|
@@ -2640,7 +2683,7 @@ class TransactionAssetTransfer extends basemodel_1.default {
|
|
|
2640
2683
|
* that asset in the account's Assets map.
|
|
2641
2684
|
* @param assetId - (xaid) ID of the asset being transferred.
|
|
2642
2685
|
* @param receiver - (arcv) Recipient address of the transfer.
|
|
2643
|
-
* @param closeAmount - Number of assets
|
|
2686
|
+
* @param closeAmount - Number of assets transferred to the close-to account as part of the transaction.
|
|
2644
2687
|
* @param closeTo - (aclose) Indicates that the asset should be removed from the account's Assets
|
|
2645
2688
|
* map, and specifies where the remaining asset holdings should be transferred.
|
|
2646
2689
|
* It's always valid to transfer remaining asset holdings to the creator account.
|