algosdk 2.6.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.
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.URLTokenBaseHTTPClient = void 0;
4
4
  const buffer_1 = require("buffer");
5
- const cross_fetch_1 = require("cross-fetch");
6
5
  class URLTokenBaseHTTPError extends Error {
7
6
  constructor(message, response) {
8
7
  super(message);
@@ -110,7 +109,7 @@ class URLTokenBaseHTTPClient {
110
109
  ...this.defaultHeaders,
111
110
  ...requestHeaders,
112
111
  };
113
- const res = await (0, cross_fetch_1.fetch)(this.getURL(relativePath, query), {
112
+ const res = await fetch(this.getURL(relativePath, query), {
114
113
  headers,
115
114
  });
116
115
  return URLTokenBaseHTTPClient.formatFetchResponse(res);
@@ -122,7 +121,7 @@ class URLTokenBaseHTTPClient {
122
121
  ...this.defaultHeaders,
123
122
  ...requestHeaders,
124
123
  };
125
- const res = await (0, cross_fetch_1.fetch)(this.getURL(relativePath, query), {
124
+ const res = await fetch(this.getURL(relativePath, query), {
126
125
  method: 'POST',
127
126
  body: data,
128
127
  headers,
@@ -136,7 +135,7 @@ class URLTokenBaseHTTPClient {
136
135
  ...this.defaultHeaders,
137
136
  ...requestHeaders,
138
137
  };
139
- const res = await (0, cross_fetch_1.fetch)(this.getURL(relativePath, query), {
138
+ const res = await fetch(this.getURL(relativePath, query), {
140
139
  method: 'DELETE',
141
140
  body: data,
142
141
  headers,
@@ -1 +1 @@
1
- {"version":3,"file":"urlTokenBaseHTTPClient.js","sourceRoot":"","sources":["../../../src/client/urlTokenBaseHTTPClient.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6CAAuD;AAwBvD,MAAM,qBAAsB,SAAQ,KAAK;IACvC,YAAY,OAAe,EAAS,QAAgC;QAClE,KAAK,CAAC,OAAO,CAAC,CAAC;QADmB,aAAQ,GAAR,QAAQ,CAAwB;QAElE,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M,EAAE,QAAQ;YAChB,IAAI,EAAE,IAAI;YACV,OAAO;SACR,CAAC,CAAC;QAEH,OAAO,sBAAsB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC;CACF;AA1KD,wDA0KC"}
@@ -6,8 +6,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  return (mod && mod.__esModule) ? mod : { "default": mod };
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.SimulateRequestTransactionGroup = exports.SimulateRequest = exports.SimulateInitialStates = exports.ScratchChange = exports.PostTransactionsResponse = exports.PendingTransactionsResponse = exports.PendingTransactionResponse = exports.NodeStatusResponse = exports.LightBlockHeaderProof = exports.LedgerStateDeltaForTransactionGroup = exports.KvDelta = exports.GetSyncRoundResponse = exports.GetBlockTimeStampOffsetResponse = exports.EvalDeltaKeyValue = exports.EvalDelta = exports.ErrorResponse = exports.DryrunTxnResult = exports.DryrunState = exports.DryrunSource = exports.DryrunResponse = exports.DryrunRequest = exports.DisassembleResponse = exports.CompileResponse = exports.BuildVersion = exports.BoxesResponse = exports.BoxReference = exports.BoxDescriptor = exports.Box = exports.BlockTxidsResponse = exports.BlockResponse = exports.BlockHashResponse = exports.AvmValue = exports.AvmKeyValue = exports.AssetParams = exports.AssetHoldingReference = exports.AssetHolding = exports.Asset = exports.ApplicationStateSchema = exports.ApplicationStateOperation = exports.ApplicationParams = exports.ApplicationLocalState = exports.ApplicationLocalReference = exports.ApplicationKVStorage = exports.ApplicationInitialStates = exports.Application = exports.AccountStateDelta = exports.AccountParticipation = exports.AccountAssetResponse = exports.AccountApplicationResponse = exports.Account = void 0;
10
- exports.Version = exports.TransactionProofResponse = exports.TransactionParametersResponse = exports.TransactionGroupLedgerStateDeltasForRoundResponse = exports.TealValue = exports.TealKeyValue = exports.SupplyResponse = exports.StateProofMessage = exports.StateProof = exports.SimulationTransactionExecTrace = exports.SimulationOpcodeTraceUnit = exports.SimulationEvalOverrides = exports.SimulateUnnamedResourcesAccessed = exports.SimulateTransactionResult = exports.SimulateTransactionGroupResult = exports.SimulateTraceConfig = exports.SimulateResponse = void 0;
9
+ exports.PostTransactionsResponse = exports.PendingTransactionsResponse = exports.PendingTransactionResponse = exports.NodeStatusResponse = exports.LightBlockHeaderProof = exports.LedgerStateDeltaForTransactionGroup = exports.KvDelta = exports.GetSyncRoundResponse = exports.GetBlockTimeStampOffsetResponse = exports.EvalDeltaKeyValue = exports.EvalDelta = exports.ErrorResponse = exports.DryrunTxnResult = exports.DryrunState = exports.DryrunSource = exports.DryrunResponse = exports.DryrunRequest = exports.DisassembleResponse = exports.CompileResponse = exports.BuildVersion = exports.BoxesResponse = exports.BoxReference = exports.BoxDescriptor = exports.Box = exports.BlockTxidsResponse = exports.BlockResponse = exports.BlockLogsResponse = exports.BlockHashResponse = exports.AvmValue = exports.AvmKeyValue = exports.AssetParams = exports.AssetHoldingReference = exports.AssetHolding = exports.Asset = exports.ApplicationStateSchema = exports.ApplicationStateOperation = exports.ApplicationParams = exports.ApplicationLocalState = exports.ApplicationLocalReference = exports.ApplicationKVStorage = exports.ApplicationInitialStates = exports.Application = exports.AppCallLogs = exports.AccountStateDelta = exports.AccountParticipation = exports.AccountAssetsInformationResponse = exports.AccountAssetResponse = exports.AccountAssetHolding = exports.AccountApplicationResponse = exports.Account = void 0;
10
+ exports.Version = exports.TransactionProofResponse = exports.TransactionParametersResponse = exports.TransactionGroupLedgerStateDeltasForRoundResponse = exports.TealValue = exports.TealKeyValue = exports.SupplyResponse = exports.StateProofMessage = exports.StateProof = exports.SimulationTransactionExecTrace = exports.SimulationOpcodeTraceUnit = exports.SimulationEvalOverrides = exports.SimulateUnnamedResourcesAccessed = exports.SimulateTransactionResult = exports.SimulateTransactionGroupResult = exports.SimulateTraceConfig = exports.SimulateResponse = exports.SimulateRequestTransactionGroup = exports.SimulateRequest = exports.SimulateInitialStates = exports.ScratchChange = void 0;
11
11
  /* eslint-disable no-use-before-define */
12
12
  const buffer_1 = require("buffer");
13
13
  const basemodel_1 = __importDefault(require("../../basemodel"));
@@ -56,6 +56,11 @@ class Account extends basemodel_1.default {
56
56
  * Note: the raw account uses `map[int] -> AppParams` for this type.
57
57
  * @param createdAssets - (apar) parameters of assets created by this account.
58
58
  * Note: the raw account uses `map[int] -> Asset` for this type.
59
+ * @param incentiveEligible - Whether or not the account can receive block incentives if its balance is in
60
+ * range at proposal time.
61
+ * @param lastHeartbeat - The round in which this account last went online, or explicitly renewed their
62
+ * online status.
63
+ * @param lastProposed - The round in which this account last proposed the block.
59
64
  * @param participation - AccountParticipation describes the parameters used by this account in consensus
60
65
  * protocol.
61
66
  * @param rewardBase - (ebase) used as part of the rewards computation. Only applicable to accounts
@@ -68,7 +73,7 @@ class Account extends basemodel_1.default {
68
73
  * values.
69
74
  * @param totalBoxes - (tbx) The number of existing boxes created by this account's app.
70
75
  */
71
- constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, createdApps, createdAssets, participation, rewardBase, sigType, totalBoxBytes, totalBoxes, }) {
76
+ constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, createdApps, createdAssets, incentiveEligible, lastHeartbeat, lastProposed, participation, rewardBase, sigType, totalBoxBytes, totalBoxes, }) {
72
77
  super();
73
78
  this.address = address;
74
79
  this.amount = amount;
@@ -89,6 +94,9 @@ class Account extends basemodel_1.default {
89
94
  this.authAddr = authAddr;
90
95
  this.createdApps = createdApps;
91
96
  this.createdAssets = createdAssets;
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;
@@ -114,6 +122,9 @@ class Account extends basemodel_1.default {
114
122
  authAddr: 'auth-addr',
115
123
  createdApps: 'created-apps',
116
124
  createdAssets: 'created-assets',
125
+ incentiveEligible: 'incentive-eligible',
126
+ lastHeartbeat: 'last-heartbeat',
127
+ lastProposed: 'last-proposed',
117
128
  participation: 'participation',
118
129
  rewardBase: 'reward-base',
119
130
  sigType: 'sig-type',
@@ -178,6 +189,9 @@ class Account extends basemodel_1.default {
178
189
  createdAssets: typeof data['created-assets'] !== 'undefined'
179
190
  ? data['created-assets'].map(Asset.from_obj_for_encoding)
180
191
  : undefined,
192
+ incentiveEligible: data['incentive-eligible'],
193
+ lastHeartbeat: data['last-heartbeat'],
194
+ lastProposed: data['last-proposed'],
181
195
  participation: typeof data['participation'] !== 'undefined'
182
196
  ? AccountParticipation.from_obj_for_encoding(data['participation'])
183
197
  : undefined,
@@ -235,6 +249,42 @@ class AccountApplicationResponse extends basemodel_1.default {
235
249
  }
236
250
  }
237
251
  exports.AccountApplicationResponse = AccountApplicationResponse;
252
+ /**
253
+ * AccountAssetHolding describes the account's asset holding and asset parameters
254
+ * (if either exist) for a specific asset ID.
255
+ */
256
+ class AccountAssetHolding extends basemodel_1.default {
257
+ /**
258
+ * Creates a new `AccountAssetHolding` object.
259
+ * @param assetHolding - (asset) Details about the asset held by this account.
260
+ * The raw account uses `AssetHolding` for this type.
261
+ * @param assetParams - (apar) parameters of the asset held by this account.
262
+ * The raw account uses `AssetParams` for this type.
263
+ */
264
+ constructor({ assetHolding, assetParams, }) {
265
+ super();
266
+ this.assetHolding = assetHolding;
267
+ this.assetParams = assetParams;
268
+ this.attribute_map = {
269
+ assetHolding: 'asset-holding',
270
+ assetParams: 'asset-params',
271
+ };
272
+ }
273
+ // eslint-disable-next-line camelcase
274
+ static from_obj_for_encoding(data) {
275
+ /* eslint-disable dot-notation */
276
+ if (typeof data['asset-holding'] === 'undefined')
277
+ throw new Error(`Response is missing required field 'asset-holding': ${data}`);
278
+ return new AccountAssetHolding({
279
+ assetHolding: AssetHolding.from_obj_for_encoding(data['asset-holding']),
280
+ assetParams: typeof data['asset-params'] !== 'undefined'
281
+ ? AssetParams.from_obj_for_encoding(data['asset-params'])
282
+ : undefined,
283
+ });
284
+ /* eslint-enable dot-notation */
285
+ }
286
+ }
287
+ exports.AccountAssetHolding = AccountAssetHolding;
238
288
  /**
239
289
  * AccountAssetResponse describes the account's asset holding and asset parameters
240
290
  * (if either exist) for a specific asset ID. Asset parameters will only be
@@ -278,6 +328,44 @@ class AccountAssetResponse extends basemodel_1.default {
278
328
  }
279
329
  }
280
330
  exports.AccountAssetResponse = AccountAssetResponse;
331
+ /**
332
+ * AccountAssetsInformationResponse contains a list of assets held by an account.
333
+ */
334
+ class AccountAssetsInformationResponse extends basemodel_1.default {
335
+ /**
336
+ * Creates a new `AccountAssetsInformationResponse` object.
337
+ * @param round - The round for which this information is relevant.
338
+ * @param assetHoldings -
339
+ * @param nextToken - Used for pagination, when making another request provide this token with the
340
+ * next parameter.
341
+ */
342
+ constructor({ round, assetHoldings, nextToken, }) {
343
+ super();
344
+ this.round = round;
345
+ this.assetHoldings = assetHoldings;
346
+ this.nextToken = nextToken;
347
+ this.attribute_map = {
348
+ round: 'round',
349
+ assetHoldings: 'asset-holdings',
350
+ nextToken: 'next-token',
351
+ };
352
+ }
353
+ // eslint-disable-next-line camelcase
354
+ static from_obj_for_encoding(data) {
355
+ /* eslint-disable dot-notation */
356
+ if (typeof data['round'] === 'undefined')
357
+ throw new Error(`Response is missing required field 'round': ${data}`);
358
+ return new AccountAssetsInformationResponse({
359
+ round: data['round'],
360
+ assetHoldings: typeof data['asset-holdings'] !== 'undefined'
361
+ ? data['asset-holdings'].map(AccountAssetHolding.from_obj_for_encoding)
362
+ : undefined,
363
+ nextToken: data['next-token'],
364
+ });
365
+ /* eslint-enable dot-notation */
366
+ }
367
+ }
368
+ exports.AccountAssetsInformationResponse = AccountAssetsInformationResponse;
281
369
  /**
282
370
  * AccountParticipation describes the parameters used by this account in consensus
283
371
  * protocol.
@@ -377,6 +465,46 @@ class AccountStateDelta extends basemodel_1.default {
377
465
  }
378
466
  }
379
467
  exports.AccountStateDelta = AccountStateDelta;
468
+ /**
469
+ * The logged messages from an app call along with the app ID and outer transaction
470
+ * ID. Logs appear in the same order that they were emitted.
471
+ */
472
+ class AppCallLogs extends basemodel_1.default {
473
+ /**
474
+ * Creates a new `AppCallLogs` object.
475
+ * @param applicationIndex - The application from which the logs were generated
476
+ * @param logs - An array of logs
477
+ * @param txid - The transaction ID of the outer app call that lead to these logs
478
+ */
479
+ constructor({ applicationIndex, logs, txid, }) {
480
+ super();
481
+ this.applicationIndex = applicationIndex;
482
+ this.logs = logs;
483
+ this.txid = txid;
484
+ this.attribute_map = {
485
+ applicationIndex: 'application-index',
486
+ logs: 'logs',
487
+ txid: 'txId',
488
+ };
489
+ }
490
+ // eslint-disable-next-line camelcase
491
+ static from_obj_for_encoding(data) {
492
+ /* eslint-disable dot-notation */
493
+ if (typeof data['application-index'] === 'undefined')
494
+ throw new Error(`Response is missing required field 'application-index': ${data}`);
495
+ if (!Array.isArray(data['logs']))
496
+ throw new Error(`Response is missing required array field 'logs': ${data}`);
497
+ if (typeof data['txId'] === 'undefined')
498
+ throw new Error(`Response is missing required field 'txId': ${data}`);
499
+ return new AppCallLogs({
500
+ applicationIndex: data['application-index'],
501
+ logs: data['logs'],
502
+ txid: data['txId'],
503
+ });
504
+ /* eslint-enable dot-notation */
505
+ }
506
+ }
507
+ exports.AppCallLogs = AppCallLogs;
380
508
  /**
381
509
  * Application index and its parameters
382
510
  */
@@ -1038,6 +1166,39 @@ class BlockHashResponse extends basemodel_1.default {
1038
1166
  }
1039
1167
  }
1040
1168
  exports.BlockHashResponse = BlockHashResponse;
1169
+ /**
1170
+ * All logs emitted in the given round. Each app call, whether top-level or inner,
1171
+ * that contains logs results in a separate AppCallLogs object. Therefore there may
1172
+ * be multiple AppCallLogs with the same application ID and outer transaction ID in
1173
+ * the event of multiple inner app calls to the same app. App calls with no logs
1174
+ * are not included in the response. AppCallLogs are returned in the same order
1175
+ * that their corresponding app call appeared in the block (pre-order traversal of
1176
+ * inner app calls)
1177
+ */
1178
+ class BlockLogsResponse extends basemodel_1.default {
1179
+ /**
1180
+ * Creates a new `BlockLogsResponse` object.
1181
+ * @param logs -
1182
+ */
1183
+ constructor({ logs }) {
1184
+ super();
1185
+ this.logs = logs;
1186
+ this.attribute_map = {
1187
+ logs: 'logs',
1188
+ };
1189
+ }
1190
+ // eslint-disable-next-line camelcase
1191
+ static from_obj_for_encoding(data) {
1192
+ /* eslint-disable dot-notation */
1193
+ if (!Array.isArray(data['logs']))
1194
+ throw new Error(`Response is missing required array field 'logs': ${data}`);
1195
+ return new BlockLogsResponse({
1196
+ logs: data['logs'].map(AppCallLogs.from_obj_for_encoding),
1197
+ });
1198
+ /* eslint-enable dot-notation */
1199
+ }
1200
+ }
1201
+ exports.BlockLogsResponse = BlockLogsResponse;
1041
1202
  /**
1042
1203
  * Encoded block object.
1043
1204
  */
@@ -2741,12 +2902,17 @@ class SimulationTransactionExecTrace extends basemodel_1.default {
2741
2902
  * @param approvalProgramTrace - Program trace that contains a trace of opcode effects in an approval program.
2742
2903
  * @param clearStateProgramHash - SHA512_256 hash digest of the clear state program executed in transaction.
2743
2904
  * @param clearStateProgramTrace - Program trace that contains a trace of opcode effects in a clear state program.
2905
+ * @param clearStateRollback - If true, indicates that the clear state program failed and any persistent state
2906
+ * changes it produced should be reverted once the program exits.
2907
+ * @param clearStateRollbackError - The error message explaining why the clear state program failed. This field will
2908
+ * only be populated if clear-state-rollback is true and the failure was due to an
2909
+ * execution error.
2744
2910
  * @param innerTrace - An array of SimulationTransactionExecTrace representing the execution trace of
2745
2911
  * any inner transactions executed.
2746
2912
  * @param logicSigHash - SHA512_256 hash digest of the logic sig executed in transaction.
2747
2913
  * @param logicSigTrace - Program trace that contains a trace of opcode effects in a logic sig.
2748
2914
  */
2749
- constructor({ approvalProgramHash, approvalProgramTrace, clearStateProgramHash, clearStateProgramTrace, innerTrace, logicSigHash, logicSigTrace, }) {
2915
+ constructor({ approvalProgramHash, approvalProgramTrace, clearStateProgramHash, clearStateProgramTrace, clearStateRollback, clearStateRollbackError, innerTrace, logicSigHash, logicSigTrace, }) {
2750
2916
  super();
2751
2917
  this.approvalProgramHash =
2752
2918
  typeof approvalProgramHash === 'string'
@@ -2758,6 +2924,8 @@ class SimulationTransactionExecTrace extends basemodel_1.default {
2758
2924
  ? new Uint8Array(buffer_1.Buffer.from(clearStateProgramHash, 'base64'))
2759
2925
  : clearStateProgramHash;
2760
2926
  this.clearStateProgramTrace = clearStateProgramTrace;
2927
+ this.clearStateRollback = clearStateRollback;
2928
+ this.clearStateRollbackError = clearStateRollbackError;
2761
2929
  this.innerTrace = innerTrace;
2762
2930
  this.logicSigHash =
2763
2931
  typeof logicSigHash === 'string'
@@ -2769,6 +2937,8 @@ class SimulationTransactionExecTrace extends basemodel_1.default {
2769
2937
  approvalProgramTrace: 'approval-program-trace',
2770
2938
  clearStateProgramHash: 'clear-state-program-hash',
2771
2939
  clearStateProgramTrace: 'clear-state-program-trace',
2940
+ clearStateRollback: 'clear-state-rollback',
2941
+ clearStateRollbackError: 'clear-state-rollback-error',
2772
2942
  innerTrace: 'inner-trace',
2773
2943
  logicSigHash: 'logic-sig-hash',
2774
2944
  logicSigTrace: 'logic-sig-trace',
@@ -2786,6 +2956,8 @@ class SimulationTransactionExecTrace extends basemodel_1.default {
2786
2956
  clearStateProgramTrace: typeof data['clear-state-program-trace'] !== 'undefined'
2787
2957
  ? data['clear-state-program-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)
2788
2958
  : undefined,
2959
+ clearStateRollback: data['clear-state-rollback'],
2960
+ clearStateRollbackError: data['clear-state-rollback-error'],
2789
2961
  innerTrace: typeof data['inner-trace'] !== 'undefined'
2790
2962
  ? data['inner-trace'].map(SimulationTransactionExecTrace.from_obj_for_encoding)
2791
2963
  : undefined,