algosdk 3.3.1 → 3.5.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.
Files changed (64) hide show
  1. package/README.md +5 -5
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/appAccess.js +261 -0
  5. package/dist/cjs/appAccess.js.map +1 -0
  6. package/dist/cjs/client/v2/algod/getTransactionProof.js +1 -1
  7. package/dist/cjs/client/v2/algod/getTransactionProof.js.map +1 -1
  8. package/dist/cjs/client/v2/algod/models/types.js +8 -8
  9. package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
  10. package/dist/cjs/client/v2/indexer/models/types.js +338 -8
  11. package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
  12. package/dist/cjs/client/v2/indexer/searchForTransactions.js +19 -0
  13. package/dist/cjs/client/v2/indexer/searchForTransactions.js.map +1 -1
  14. package/dist/cjs/encoding/schema/bytearray.js +3 -0
  15. package/dist/cjs/encoding/schema/bytearray.js.map +1 -1
  16. package/dist/cjs/logicsig.js +54 -17
  17. package/dist/cjs/logicsig.js.map +1 -1
  18. package/dist/cjs/makeTxn.js +66 -12
  19. package/dist/cjs/makeTxn.js.map +1 -1
  20. package/dist/cjs/signing.js +4 -4
  21. package/dist/cjs/signing.js.map +1 -1
  22. package/dist/cjs/transaction.js +107 -0
  23. package/dist/cjs/transaction.js.map +1 -1
  24. package/dist/esm/appAccess.js +255 -0
  25. package/dist/esm/appAccess.js.map +1 -0
  26. package/dist/esm/client/v2/algod/getTransactionProof.js +2 -2
  27. package/dist/esm/client/v2/algod/getTransactionProof.js.map +1 -1
  28. package/dist/esm/client/v2/algod/models/types.js +6 -6
  29. package/dist/esm/client/v2/algod/models/types.js.map +1 -1
  30. package/dist/esm/client/v2/indexer/models/types.js +332 -6
  31. package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
  32. package/dist/esm/client/v2/indexer/searchForTransactions.js +19 -0
  33. package/dist/esm/client/v2/indexer/searchForTransactions.js.map +1 -1
  34. package/dist/esm/encoding/schema/bytearray.js +3 -0
  35. package/dist/esm/encoding/schema/bytearray.js.map +1 -1
  36. package/dist/esm/logicsig.js +54 -17
  37. package/dist/esm/logicsig.js.map +1 -1
  38. package/dist/esm/makeTxn.js +66 -12
  39. package/dist/esm/makeTxn.js.map +1 -1
  40. package/dist/esm/signing.js +4 -4
  41. package/dist/esm/signing.js.map +1 -1
  42. package/dist/esm/transaction.js +107 -0
  43. package/dist/esm/transaction.js.map +1 -1
  44. package/dist/types/appAccess.d.ts +28 -0
  45. package/dist/types/client/v2/algod/getTransactionProof.d.ts +3 -3
  46. package/dist/types/client/v2/algod/models/types.d.ts +4 -4
  47. package/dist/types/client/v2/indexer/models/types.d.ts +202 -8
  48. package/dist/types/client/v2/indexer/searchForTransactions.d.ts +16 -0
  49. package/dist/types/logicsig.d.ts +2 -0
  50. package/dist/types/makeTxn.d.ts +9 -9
  51. package/dist/types/transaction.d.ts +17 -0
  52. package/dist/types/types/transactions/base.d.ts +71 -0
  53. package/package.json +2 -2
  54. package/src/appAccess.ts +298 -0
  55. package/src/client/v2/algod/getTransactionProof.ts +4 -4
  56. package/src/client/v2/algod/models/types.ts +7 -7
  57. package/src/client/v2/indexer/models/types.ts +542 -5
  58. package/src/client/v2/indexer/searchForTransactions.ts +20 -0
  59. package/src/encoding/schema/bytearray.ts +3 -0
  60. package/src/logicsig.ts +68 -17
  61. package/src/makeTxn.ts +110 -12
  62. package/src/signing.ts +4 -4
  63. package/src/transaction.ts +162 -0
  64. package/src/types/transactions/base.ts +85 -0
@@ -0,0 +1,261 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.foreignArraysToResourceReferences = exports.convertIndicesToResourceReferences = exports.resourceReferencesToEncodingData = void 0;
4
+ const address_js_1 = require("./encoding/address.js");
5
+ const utils_js_1 = require("./utils/utils.js");
6
+ /**
7
+ * resourceReferencesToEncodingData translates an array of ResourceReferences into an array of encoding data
8
+ * maps.
9
+ */
10
+ function resourceReferencesToEncodingData(appIndex, references) {
11
+ const accessList = [];
12
+ function ensure(target) {
13
+ for (let idx = 0; idx < accessList.length; idx++) {
14
+ const a = accessList[idx];
15
+ if (a.get('d') === target.address &&
16
+ a.get('s') === target.assetIndex &&
17
+ a.get('p') === target.appIndex) {
18
+ return idx + 1; // 1-based index
19
+ }
20
+ }
21
+ if (target.address) {
22
+ accessList.push(new Map([['d', target.address]]));
23
+ }
24
+ if (target.assetIndex) {
25
+ accessList.push(new Map([['s', target.assetIndex]]));
26
+ }
27
+ if (target.appIndex) {
28
+ accessList.push(new Map([['p', target.appIndex]]));
29
+ }
30
+ return accessList.length; // length is 1-based position of new element
31
+ }
32
+ const zeroAddr = address_js_1.Address.zeroAddress();
33
+ for (const rr of references) {
34
+ if (rr.address || rr.assetIndex || rr.appIndex) {
35
+ ensure(rr);
36
+ continue;
37
+ }
38
+ if (rr.holding) {
39
+ const h = rr.holding;
40
+ let addrIdx = 0;
41
+ if (h.address && !h.address.equals(zeroAddr)) {
42
+ addrIdx = ensure({ address: h.address });
43
+ }
44
+ const assetIdx = ensure({ assetIndex: h.assetIndex });
45
+ accessList.push(new Map([
46
+ [
47
+ 'h',
48
+ new Map([
49
+ ['d', addrIdx],
50
+ ['s', assetIdx],
51
+ ]),
52
+ ],
53
+ ]));
54
+ continue;
55
+ }
56
+ if (rr.locals) {
57
+ const l = rr.locals;
58
+ let addrIdx = 0;
59
+ if (l.address && !l.address.equals(zeroAddr)) {
60
+ addrIdx = ensure({ address: l.address });
61
+ }
62
+ let appIdx = 0;
63
+ if (l.appIndex && BigInt(l.appIndex) !== appIndex) {
64
+ appIdx = ensure({ appIndex: l.appIndex });
65
+ }
66
+ accessList.push(new Map([
67
+ [
68
+ 'l',
69
+ new Map([
70
+ ['d', addrIdx],
71
+ ['p', appIdx],
72
+ ]),
73
+ ],
74
+ ]));
75
+ continue;
76
+ }
77
+ if (rr.box) {
78
+ const b = rr.box;
79
+ let appIdx = 0;
80
+ if (b.appIndex && BigInt(b.appIndex) !== appIndex) {
81
+ appIdx = ensure({ appIndex: b.appIndex });
82
+ }
83
+ accessList.push(new Map([
84
+ [
85
+ 'b',
86
+ new Map([
87
+ ['i', appIdx],
88
+ ['n', b.name],
89
+ ]),
90
+ ],
91
+ ]));
92
+ }
93
+ }
94
+ return accessList;
95
+ }
96
+ exports.resourceReferencesToEncodingData = resourceReferencesToEncodingData;
97
+ function convertIndicesToResourceReferences(accessList) {
98
+ const references = [];
99
+ for (const item of accessList) {
100
+ const address = item.get('d');
101
+ const assetIndex = item.get('s');
102
+ const appIndex = item.get('p');
103
+ if (address) {
104
+ references.push({ address });
105
+ continue;
106
+ }
107
+ if (assetIndex) {
108
+ references.push({ assetIndex });
109
+ continue;
110
+ }
111
+ if (appIndex) {
112
+ references.push({ appIndex });
113
+ continue;
114
+ }
115
+ const holding = item.get('h');
116
+ if (holding) {
117
+ const hAddressIndex = (0, utils_js_1.ensureSafeUnsignedInteger)(holding.get('d') ?? 0);
118
+ const hAssetIndex = (0, utils_js_1.ensureSafeUnsignedInteger)(holding.get('s'));
119
+ if (!hAssetIndex) {
120
+ throw new Error(`Holding missing asset index: ${holding}`);
121
+ }
122
+ const hAddress = hAddressIndex === 0
123
+ ? address_js_1.Address.zeroAddress()
124
+ : references[hAddressIndex - 1].address;
125
+ const asset = references[hAssetIndex - 1].assetIndex;
126
+ references.push({ holding: { address: hAddress, assetIndex: asset } });
127
+ continue;
128
+ }
129
+ const locals = item.get('l');
130
+ if (locals) {
131
+ const lAddressIndex = (0, utils_js_1.ensureSafeUnsignedInteger)(locals.get('d') ?? 0);
132
+ const lAppIndex = (0, utils_js_1.ensureSafeUnsignedInteger)(locals.get('p') ?? 0);
133
+ const lAddress = lAddressIndex === 0
134
+ ? address_js_1.Address.zeroAddress()
135
+ : references[lAddressIndex - 1].address;
136
+ const app = lAppIndex === 0
137
+ ? BigInt(0)
138
+ : references[lAppIndex - 1].appIndex;
139
+ references.push({ locals: { address: lAddress, appIndex: app } });
140
+ continue;
141
+ }
142
+ const box = item.get('b');
143
+ if (box) {
144
+ const bAppIndex = (0, utils_js_1.ensureSafeUnsignedInteger)(box.get('i') ?? 0);
145
+ const name = box.get('n');
146
+ if (!name) {
147
+ throw new Error(`Box missing name: ${box}`);
148
+ }
149
+ const app = bAppIndex === 0
150
+ ? BigInt(0)
151
+ : references[bAppIndex - 1].appIndex;
152
+ references.push({ box: { appIndex: app, name } });
153
+ }
154
+ }
155
+ return references;
156
+ }
157
+ exports.convertIndicesToResourceReferences = convertIndicesToResourceReferences;
158
+ /**
159
+ * foreignArraysToResourceReferences makes a single array of ResourceReferences from various foreign resource arrays.
160
+ * Note, runtime representation of ResourceReference uses addresses, app and asset identifiers, not indexes.
161
+ *
162
+ * @param accounts - optional array of accounts
163
+ * @param foreignAssets - optional array of foreign assets
164
+ * @param foreignApps - optional array of foreign apps
165
+ * @param holdings - optional array of holdings
166
+ * @param locals - optional array of locals
167
+ * @param boxes - optional array of boxes
168
+ */
169
+ function foreignArraysToResourceReferences({ appIndex, accounts, foreignAssets, foreignApps, holdings, locals, boxes, }) {
170
+ const accessList = [];
171
+ function ensureAddress(addr) {
172
+ let addr2;
173
+ if (typeof addr === 'string') {
174
+ if (addr === '') {
175
+ return;
176
+ }
177
+ addr2 = address_js_1.Address.fromString(addr);
178
+ }
179
+ else {
180
+ addr2 = addr;
181
+ }
182
+ if (addr2.equals(address_js_1.Address.zeroAddress())) {
183
+ return;
184
+ }
185
+ let addrFound = false;
186
+ for (const rr of accessList) {
187
+ if (!rr.address) {
188
+ continue;
189
+ }
190
+ let rrAddress = rr.address;
191
+ if (typeof rr.address === 'string') {
192
+ rrAddress = address_js_1.Address.fromString(rr.address);
193
+ }
194
+ if (rrAddress.equals(addr2)) {
195
+ addrFound = true;
196
+ break;
197
+ }
198
+ }
199
+ if (!addrFound) {
200
+ accessList.push({ address: addr });
201
+ }
202
+ }
203
+ function ensureAsset(asset) {
204
+ let assetFound = false;
205
+ for (const rr of accessList) {
206
+ if (rr.assetIndex === asset) {
207
+ assetFound = true;
208
+ break;
209
+ }
210
+ }
211
+ if (!assetFound) {
212
+ accessList.push({ assetIndex: asset });
213
+ }
214
+ }
215
+ function ensureApp(app) {
216
+ let appFound = false;
217
+ for (const rr of accessList) {
218
+ if (rr.appIndex === app) {
219
+ appFound = true;
220
+ break;
221
+ }
222
+ }
223
+ if (!appFound) {
224
+ accessList.push({ appIndex: app });
225
+ }
226
+ }
227
+ for (const acct of accounts ?? []) {
228
+ ensureAddress(acct);
229
+ }
230
+ for (const asset of foreignAssets ?? []) {
231
+ ensureAsset(asset);
232
+ }
233
+ for (const app of foreignApps ?? []) {
234
+ ensureApp(app);
235
+ }
236
+ for (const holding of holdings ?? []) {
237
+ if (holding.address) {
238
+ ensureAddress(holding.address);
239
+ }
240
+ ensureAsset(holding.assetIndex);
241
+ accessList.push({ holding });
242
+ }
243
+ for (const local of locals ?? []) {
244
+ if (local.address) {
245
+ ensureAddress(local.address);
246
+ }
247
+ if (local.appIndex && BigInt(local.appIndex) !== appIndex) {
248
+ ensureApp(local.appIndex);
249
+ }
250
+ accessList.push({ locals: local });
251
+ }
252
+ for (const box of boxes ?? []) {
253
+ if (box.appIndex && BigInt(box.appIndex) !== appIndex) {
254
+ ensureApp(box.appIndex);
255
+ }
256
+ accessList.push({ box });
257
+ }
258
+ return accessList;
259
+ }
260
+ exports.foreignArraysToResourceReferences = foreignArraysToResourceReferences;
261
+ //# sourceMappingURL=appAccess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appAccess.js","sourceRoot":"","sources":["../../src/appAccess.ts"],"names":[],"mappings":";;;AAAA,sDAAgD;AAOhD,+CAA6D;AAE7D;;;GAGG;AACH,SAAgB,gCAAgC,CAC9C,QAAgB,EAChB,UAA4C;IAE5C,MAAM,UAAU,GAAgC,EAAE,CAAC;IAEnD,SAAS,MAAM,CAAC,MAAyB;QACvC,KAAK,IA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a,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;QACD,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAChC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/B,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,IAAI,EAAE,EAAE,CAAC;QACjC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC1D,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC5B,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IACrC,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;QAC9B,IAAI,GAAG,CAAC,QAAQ,IAAI,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE,CAAC;YACtD,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1B,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAzGD,8EAyGC"}
@@ -38,7 +38,7 @@ class GetTransactionProof extends jsonrequest_js_1.default {
38
38
  }
39
39
  // eslint-disable-next-line class-methods-use-this
40
40
  prepare(response) {
41
- return (0, encoding_js_1.decodeJSON)(response.getJSONText(), types_js_1.TransactionProofResponse);
41
+ return (0, encoding_js_1.decodeJSON)(response.getJSONText(), types_js_1.TransactionProof);
42
42
  }
43
43
  }
44
44
  exports.default = GetTransactionProof;
@@ -1 +1 @@
1
- {"version":3,"file":"getTransactionProof.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/getTransactionProof.ts"],"names":[],"mappings":";;;;;AAAA,uEAA4C;AAE5C,+DAA2D;AAC3D,gDAA6D;AAE7D,MAAqB,mBAAoB,SAAQ,wBAAqC;IAGpF,YACE,CAAa,EACb,KAAsB,EACd,IAAY;QAEpB,KAAK,CAAC,CAAC,CAAC,CAAC;QAFD,SAAI,GAAJ,IAAI,CAAQ;QAGpB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,IAAI;QACF,OAAO,cAAc,IAAI,CAAC,KAAK,iBAAiB,IAAI,CAAC,IAAI,QAAQ,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,QAAgB;QACvB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kDAAkD;IAClD,OAAO,CAAC,QAA4B;QAClC,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,mCAAwB,CAAC,CAAC;IACtE,CAAC;CACF;AA1CD,sCA0CC"}
1
+ {"version":3,"file":"getTransactionProof.js","sourceRoot":"","sources":["../../../../../src/client/v2/algod/getTransactionProof.ts"],"names":[],"mappings":";;;;;AAAA,uEAA4C;AAE5C,+DAA2D;AAC3D,gDAAqD;AAErD,MAAqB,mBAAoB,SAAQ,wBAA6B;IAG5E,YACE,CAAa,EACb,KAAsB,EACd,IAAY;QAEpB,KAAK,CAAC,CAAC,CAAC,CAAC;QAFD,SAAI,GAAJ,IAAI,CAAQ;QAGpB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,IAAI;QACF,OAAO,cAAc,IAAI,CAAC,KAAK,iBAAiB,IAAI,CAAC,IAAI,QAAQ,CAAC;IACpE,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,QAAgB;QACvB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kDAAkD;IAClD,OAAO,CAAC,QAA4B;QAClC,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,2BAAgB,CAAC,CAAC;IAC9D,CAAC;CACF;AA1CD,sCA0CC"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PendingTransactionsResponse = exports.PendingTransactionResponse = exports.NodeStatusResponse = exports.LightBlockHeaderProof = exports.LedgerStateDeltaForTransactionGroup = exports.GetSyncRoundResponse = exports.GetBlockTimeStampOffsetResponse = exports.GenesisAllocation = exports.Genesis = 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;
7
- 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 = exports.PostTransactionsResponse = void 0;
7
+ exports.Version = exports.TransactionProof = 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 = exports.PostTransactionsResponse = void 0;
8
8
  /* eslint-disable no-use-before-define */
9
9
  const utils_js_1 = require("../../../../utils/utils.js");
10
10
  const index_js_1 = require("../../../../encoding/schema/index.js");
@@ -2039,7 +2039,7 @@ class BoxReference {
2039
2039
  }
2040
2040
  exports.BoxReference = BoxReference;
2041
2041
  /**
2042
- * * Box names of an application
2042
+ * Box names of an application
2043
2043
  */
2044
2044
  class BoxesResponse {
2045
2045
  static get encodingSchema() {
@@ -5221,7 +5221,7 @@ exports.TransactionParametersResponse = TransactionParametersResponse;
5221
5221
  /**
5222
5222
  * Proof of transaction in a block.
5223
5223
  */
5224
- class TransactionProofResponse {
5224
+ class TransactionProof {
5225
5225
  static get encodingSchema() {
5226
5226
  if (!this.encodingSchemaValue) {
5227
5227
  this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
@@ -5238,7 +5238,7 @@ class TransactionProofResponse {
5238
5238
  return this.encodingSchemaValue;
5239
5239
  }
5240
5240
  /**
5241
- * Creates a new `TransactionProofResponse` object.
5241
+ * Creates a new `TransactionProof` object.
5242
5242
  * @param idx - Index of the transaction in the block's payset.
5243
5243
  * @param proof - Proof of transaction membership.
5244
5244
  * @param stibhash - Hash of SignedTxnInBlock for verifying proof.
@@ -5258,7 +5258,7 @@ class TransactionProofResponse {
5258
5258
  }
5259
5259
  // eslint-disable-next-line class-methods-use-this
5260
5260
  getEncodingSchema() {
5261
- return TransactionProofResponse.encodingSchema;
5261
+ return TransactionProof.encodingSchema;
5262
5262
  }
5263
5263
  toEncodingData() {
5264
5264
  return new Map([
@@ -5271,9 +5271,9 @@ class TransactionProofResponse {
5271
5271
  }
5272
5272
  static fromEncodingData(data) {
5273
5273
  if (!(data instanceof Map)) {
5274
- throw new Error(`Invalid decoded TransactionProofResponse: ${data}`);
5274
+ throw new Error(`Invalid decoded TransactionProof: ${data}`);
5275
5275
  }
5276
- return new TransactionProofResponse({
5276
+ return new TransactionProof({
5277
5277
  idx: data.get('idx'),
5278
5278
  proof: data.get('proof'),
5279
5279
  stibhash: data.get('stibhash'),
@@ -5282,7 +5282,7 @@ class TransactionProofResponse {
5282
5282
  });
5283
5283
  }
5284
5284
  }
5285
- exports.TransactionProofResponse = TransactionProofResponse;
5285
+ exports.TransactionProof = TransactionProof;
5286
5286
  /**
5287
5287
  * algod version information.
5288
5288
  */