algosdk 1.21.0 → 1.23.1
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/src/boxStorage.js +33 -0
- package/dist/cjs/src/boxStorage.js.map +1 -0
- package/dist/cjs/src/client/client.js +11 -9
- package/dist/cjs/src/client/client.js.map +1 -1
- package/dist/cjs/src/client/urlTokenBaseHTTPClient.js +93 -96
- package/dist/cjs/src/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/algod.js +55 -1
- package/dist/cjs/src/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/getApplicationBoxByName.js +44 -0
- package/dist/cjs/src/client/v2/algod/getApplicationBoxByName.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/getApplicationBoxes.js +60 -0
- package/dist/cjs/src/client/v2/algod/getApplicationBoxes.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/getBlockHash.js +19 -0
- package/dist/cjs/src/client/v2/algod/getBlockHash.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/models/types.js +815 -42
- package/dist/cjs/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/src/client/v2/{algod/models/base.js → basemodel.js} +1 -1
- package/dist/cjs/src/client/v2/basemodel.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/indexer.js +50 -0
- package/dist/cjs/src/client/v2/indexer/indexer.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupApplicationBoxByIDandName.js +45 -0
- package/dist/cjs/src/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupBlock.js +8 -0
- package/dist/cjs/src/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/models/types.js +3077 -0
- package/dist/cjs/src/client/v2/indexer/models/types.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/searchAccounts.js +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForApplicationBoxes.js +99 -0
- package/dist/cjs/src/client/v2/indexer/searchForApplicationBoxes.js.map +1 -0
- package/dist/cjs/src/client/v2/jsonrequest.js +11 -1
- package/dist/cjs/src/client/v2/jsonrequest.js.map +1 -1
- package/dist/cjs/src/composer.js +4 -1
- package/dist/cjs/src/composer.js.map +1 -1
- package/dist/cjs/src/main.js +3 -2
- package/dist/cjs/src/main.js.map +1 -1
- package/dist/cjs/src/makeTxn.js +29 -14
- package/dist/cjs/src/makeTxn.js.map +1 -1
- package/dist/cjs/src/multisig.js +15 -25
- package/dist/cjs/src/multisig.js.map +1 -1
- package/dist/cjs/src/transaction.js +29 -0
- package/dist/cjs/src/transaction.js.map +1 -1
- package/dist/cjs/src/types/transactions/index.js.map +1 -1
- package/dist/esm/src/boxStorage.js +29 -0
- package/dist/esm/src/boxStorage.js.map +1 -0
- package/dist/esm/src/client/client.js +11 -9
- package/dist/esm/src/client/client.js.map +1 -1
- package/dist/esm/src/client/urlTokenBaseHTTPClient.js +93 -73
- package/dist/esm/src/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/esm/src/client/v2/algod/algod.js +55 -1
- package/dist/esm/src/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/src/client/v2/algod/getApplicationBoxByName.js +38 -0
- package/dist/esm/src/client/v2/algod/getApplicationBoxByName.js.map +1 -0
- package/dist/esm/src/client/v2/algod/getApplicationBoxes.js +54 -0
- package/dist/esm/src/client/v2/algod/getApplicationBoxes.js.map +1 -0
- package/dist/esm/src/client/v2/algod/getBlockHash.js +13 -0
- package/dist/esm/src/client/v2/algod/getBlockHash.js.map +1 -0
- package/dist/esm/src/client/v2/algod/models/types.js +771 -2
- package/dist/esm/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/src/client/v2/{algod/models/base.js → basemodel.js} +1 -1
- package/dist/esm/src/client/v2/basemodel.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/indexer.js +50 -0
- package/dist/esm/src/client/v2/indexer/indexer.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupApplicationBoxByIDandName.js +39 -0
- package/dist/esm/src/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupBlock.js +8 -0
- package/dist/esm/src/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/models/types.js +3009 -0
- package/dist/esm/src/client/v2/indexer/models/types.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/searchAccounts.js +1 -1
- package/dist/esm/src/client/v2/indexer/searchForApplicationBoxes.js +93 -0
- package/dist/esm/src/client/v2/indexer/searchForApplicationBoxes.js.map +1 -0
- package/dist/esm/src/client/v2/jsonrequest.js +11 -1
- package/dist/esm/src/client/v2/jsonrequest.js.map +1 -1
- package/dist/esm/src/composer.js +4 -1
- package/dist/esm/src/composer.js.map +1 -1
- package/dist/esm/src/main.js +2 -0
- package/dist/esm/src/main.js.map +1 -1
- package/dist/esm/src/makeTxn.js +29 -14
- package/dist/esm/src/makeTxn.js.map +1 -1
- package/dist/esm/src/multisig.js +15 -25
- package/dist/esm/src/multisig.js.map +1 -1
- package/dist/esm/src/transaction.js +29 -0
- package/dist/esm/src/transaction.js.map +1 -1
- package/dist/esm/src/types/transactions/index.js +1 -1
- package/dist/esm/src/types/transactions/index.js.map +1 -1
- package/dist/types/src/boxStorage.d.ts +7 -0
- package/dist/types/src/client/client.d.ts +5 -3
- package/dist/types/src/client/urlTokenBaseHTTPClient.d.ts +8 -12
- package/dist/types/src/client/v2/algod/algod.d.ts +49 -1
- package/dist/types/src/client/v2/algod/getApplicationBoxByName.d.ts +28 -0
- package/dist/types/src/client/v2/algod/getApplicationBoxes.d.ts +43 -0
- package/dist/types/src/client/v2/algod/getBlockHash.d.ts +8 -0
- package/dist/types/src/client/v2/algod/models/types.d.ts +117 -2
- package/dist/types/src/client/v2/{algod/models/base.d.ts → basemodel.d.ts} +0 -0
- package/dist/types/src/client/v2/indexer/indexer.d.ts +46 -0
- package/dist/types/src/client/v2/indexer/lookupApplicationBoxByIDandName.d.ts +29 -0
- package/dist/types/src/client/v2/indexer/lookupBlock.d.ts +5 -0
- package/dist/types/src/client/v2/indexer/models/types.d.ts +2689 -0
- package/dist/types/src/client/v2/indexer/searchAccounts.d.ts +1 -1
- package/dist/types/src/client/v2/indexer/searchForApplicationBoxes.d.ts +80 -0
- package/dist/types/src/client/v2/jsonrequest.d.ts +8 -1
- package/dist/types/src/composer.d.ts +4 -2
- package/dist/types/src/main.d.ts +1 -0
- package/dist/types/src/makeTxn.d.ts +22 -15
- package/dist/types/src/transaction.d.ts +3 -1
- package/dist/types/src/types/transactions/application.d.ts +3 -3
- package/dist/types/src/types/transactions/base.d.ts +15 -1
- package/dist/types/src/types/transactions/encoded.d.ts +12 -1
- package/dist/types/src/types/transactions/index.d.ts +1 -1
- package/package.json +6 -7
- package/dist/cjs/src/client/v2/algod/models/base.js.map +0 -1
- package/dist/esm/src/client/v2/algod/models/base.js.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
import { BoxesResponse } from './models/types';
|
|
5
|
+
/**
|
|
6
|
+
* Given an application ID, return all the box names associated with the app.
|
|
7
|
+
*
|
|
8
|
+
* #### Example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const index = 60553466;
|
|
11
|
+
* const boxesResponse = await algodClient.getApplicationBoxes(index).max(3).do();
|
|
12
|
+
* const boxNames = boxesResponse.boxes.map(box => box.name);
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2applicationsapplication-idboxes)
|
|
16
|
+
* @param index - The application ID to look up.
|
|
17
|
+
* @category GET
|
|
18
|
+
*/
|
|
19
|
+
export default class GetApplicationBoxes extends JSONRequest<BoxesResponse, Record<string, any>> {
|
|
20
|
+
private index;
|
|
21
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, index: number);
|
|
22
|
+
/**
|
|
23
|
+
* @returns `/v2/applications/${index}/boxes`
|
|
24
|
+
*/
|
|
25
|
+
path(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Limit results for pagination.
|
|
28
|
+
*
|
|
29
|
+
* #### Example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const maxResults = 20;
|
|
32
|
+
* const boxesResult = await algodClient
|
|
33
|
+
* .GetApplicationBoxes(1234)
|
|
34
|
+
* .limit(maxResults)
|
|
35
|
+
* .do();
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @param limit - maximum number of results to return.
|
|
39
|
+
* @category query
|
|
40
|
+
*/
|
|
41
|
+
max(max: number): this;
|
|
42
|
+
prepare(body: Record<string, any>): BoxesResponse;
|
|
43
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
export default class GetBlockHash extends JSONRequest {
|
|
5
|
+
round: number;
|
|
6
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, roundNumber: number);
|
|
7
|
+
path(): string;
|
|
8
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTICE: This file was generated. Editing this file manually is not recommended.
|
|
3
3
|
*/
|
|
4
|
-
import BaseModel from '
|
|
4
|
+
import BaseModel from '../../basemodel';
|
|
5
5
|
import { EncodedSignedTransaction } from '../../../../types/transactions/encoded';
|
|
6
6
|
import BlockHeader from '../../../../types/blockHeader';
|
|
7
7
|
/**
|
|
@@ -121,6 +121,15 @@ export declare class Account extends BaseModel {
|
|
|
121
121
|
* * lsig
|
|
122
122
|
*/
|
|
123
123
|
sigType?: string;
|
|
124
|
+
/**
|
|
125
|
+
* (tbxb) The total number of bytes used by this account's app's box keys and
|
|
126
|
+
* values.
|
|
127
|
+
*/
|
|
128
|
+
totalBoxBytes?: number | bigint;
|
|
129
|
+
/**
|
|
130
|
+
* (tbx) The number of existing boxes created by this account's app.
|
|
131
|
+
*/
|
|
132
|
+
totalBoxes?: number | bigint;
|
|
124
133
|
/**
|
|
125
134
|
* Creates a new `Account` object.
|
|
126
135
|
* @param address - the account public key
|
|
@@ -168,8 +177,11 @@ export declare class Account extends BaseModel {
|
|
|
168
177
|
* * sig
|
|
169
178
|
* * msig
|
|
170
179
|
* * lsig
|
|
180
|
+
* @param totalBoxBytes - (tbxb) The total number of bytes used by this account's app's box keys and
|
|
181
|
+
* values.
|
|
182
|
+
* @param totalBoxes - (tbx) The number of existing boxes created by this account's app.
|
|
171
183
|
*/
|
|
172
|
-
constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, createdApps, createdAssets, participation, rewardBase, sigType, }: {
|
|
184
|
+
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, }: {
|
|
173
185
|
address: string;
|
|
174
186
|
amount: number | bigint;
|
|
175
187
|
amountWithoutPendingRewards: number | bigint;
|
|
@@ -192,7 +204,10 @@ export declare class Account extends BaseModel {
|
|
|
192
204
|
participation?: AccountParticipation;
|
|
193
205
|
rewardBase?: number | bigint;
|
|
194
206
|
sigType?: string;
|
|
207
|
+
totalBoxBytes?: number | bigint;
|
|
208
|
+
totalBoxes?: number | bigint;
|
|
195
209
|
});
|
|
210
|
+
static from_obj_for_encoding(data: Record<string, any>): Account;
|
|
196
211
|
}
|
|
197
212
|
/**
|
|
198
213
|
* AccountApplicationResponse describes the account's application local state and
|
|
@@ -226,6 +241,7 @@ export declare class AccountApplicationResponse extends BaseModel {
|
|
|
226
241
|
* The raw account uses `AppParams` for this type.
|
|
227
242
|
*/
|
|
228
243
|
constructor(round: number | bigint, appLocalState?: ApplicationLocalState, createdApp?: ApplicationParams);
|
|
244
|
+
static from_obj_for_encoding(data: Record<string, any>): AccountApplicationResponse;
|
|
229
245
|
}
|
|
230
246
|
/**
|
|
231
247
|
* AccountAssetResponse describes the account's asset holding and asset parameters
|
|
@@ -256,6 +272,7 @@ export declare class AccountAssetResponse extends BaseModel {
|
|
|
256
272
|
* The raw account uses `AssetParams` for this type.
|
|
257
273
|
*/
|
|
258
274
|
constructor(round: number | bigint, assetHolding?: AssetHolding, createdAsset?: AssetParams);
|
|
275
|
+
static from_obj_for_encoding(data: Record<string, any>): AccountAssetResponse;
|
|
259
276
|
}
|
|
260
277
|
/**
|
|
261
278
|
* AccountParticipation describes the parameters used by this account in consensus
|
|
@@ -305,6 +322,7 @@ export declare class AccountParticipation extends BaseModel {
|
|
|
305
322
|
voteParticipationKey: string | Uint8Array;
|
|
306
323
|
stateProofKey?: string | Uint8Array;
|
|
307
324
|
});
|
|
325
|
+
static from_obj_for_encoding(data: Record<string, any>): AccountParticipation;
|
|
308
326
|
}
|
|
309
327
|
/**
|
|
310
328
|
* Application state delta.
|
|
@@ -321,6 +339,7 @@ export declare class AccountStateDelta extends BaseModel {
|
|
|
321
339
|
* @param delta - Application state delta.
|
|
322
340
|
*/
|
|
323
341
|
constructor(address: string, delta: EvalDeltaKeyValue[]);
|
|
342
|
+
static from_obj_for_encoding(data: Record<string, any>): AccountStateDelta;
|
|
324
343
|
}
|
|
325
344
|
/**
|
|
326
345
|
* Application index and its parameters
|
|
@@ -340,6 +359,7 @@ export declare class Application extends BaseModel {
|
|
|
340
359
|
* @param params - (appparams) application parameters.
|
|
341
360
|
*/
|
|
342
361
|
constructor(id: number | bigint, params: ApplicationParams);
|
|
362
|
+
static from_obj_for_encoding(data: Record<string, any>): Application;
|
|
343
363
|
}
|
|
344
364
|
/**
|
|
345
365
|
* Stores local state associated with an application.
|
|
@@ -364,6 +384,7 @@ export declare class ApplicationLocalState extends BaseModel {
|
|
|
364
384
|
* @param keyValue - (tkv) storage.
|
|
365
385
|
*/
|
|
366
386
|
constructor(id: number | bigint, schema: ApplicationStateSchema, keyValue?: TealKeyValue[]);
|
|
387
|
+
static from_obj_for_encoding(data: Record<string, any>): ApplicationLocalState;
|
|
367
388
|
}
|
|
368
389
|
/**
|
|
369
390
|
* Stores the global information associated with an application.
|
|
@@ -418,6 +439,7 @@ export declare class ApplicationParams extends BaseModel {
|
|
|
418
439
|
globalStateSchema?: ApplicationStateSchema;
|
|
419
440
|
localStateSchema?: ApplicationStateSchema;
|
|
420
441
|
});
|
|
442
|
+
static from_obj_for_encoding(data: Record<string, any>): ApplicationParams;
|
|
421
443
|
}
|
|
422
444
|
/**
|
|
423
445
|
* Specifies maximums on the number of each type that may be stored.
|
|
@@ -437,6 +459,7 @@ export declare class ApplicationStateSchema extends BaseModel {
|
|
|
437
459
|
* @param numByteSlice - (nbs) num of byte slices.
|
|
438
460
|
*/
|
|
439
461
|
constructor(numUint: number | bigint, numByteSlice: number | bigint);
|
|
462
|
+
static from_obj_for_encoding(data: Record<string, any>): ApplicationStateSchema;
|
|
440
463
|
}
|
|
441
464
|
/**
|
|
442
465
|
* Specifies both the unique identifier and the parameters for an asset
|
|
@@ -462,6 +485,7 @@ export declare class Asset extends BaseModel {
|
|
|
462
485
|
* data/transactions/asset.go : AssetParams
|
|
463
486
|
*/
|
|
464
487
|
constructor(index: number | bigint, params: AssetParams);
|
|
488
|
+
static from_obj_for_encoding(data: Record<string, any>): Asset;
|
|
465
489
|
}
|
|
466
490
|
/**
|
|
467
491
|
* Describes an asset held by an account.
|
|
@@ -488,6 +512,7 @@ export declare class AssetHolding extends BaseModel {
|
|
|
488
512
|
* @param isFrozen - (f) whether or not the holding is frozen.
|
|
489
513
|
*/
|
|
490
514
|
constructor(amount: number | bigint, assetId: number | bigint, isFrozen: boolean);
|
|
515
|
+
static from_obj_for_encoding(data: Record<string, any>): AssetHolding;
|
|
491
516
|
}
|
|
492
517
|
/**
|
|
493
518
|
* AssetParams specifies the parameters for an asset.
|
|
@@ -613,6 +638,22 @@ export declare class AssetParams extends BaseModel {
|
|
|
613
638
|
url?: string;
|
|
614
639
|
urlB64?: string | Uint8Array;
|
|
615
640
|
});
|
|
641
|
+
static from_obj_for_encoding(data: Record<string, any>): AssetParams;
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Hash of a block header.
|
|
645
|
+
*/
|
|
646
|
+
export declare class BlockHashResponse extends BaseModel {
|
|
647
|
+
/**
|
|
648
|
+
* Block header hash.
|
|
649
|
+
*/
|
|
650
|
+
blockhash: string;
|
|
651
|
+
/**
|
|
652
|
+
* Creates a new `BlockHashResponse` object.
|
|
653
|
+
* @param blockhash - Block header hash.
|
|
654
|
+
*/
|
|
655
|
+
constructor(blockhash: string);
|
|
656
|
+
static from_obj_for_encoding(data: Record<string, any>): BlockHashResponse;
|
|
616
657
|
}
|
|
617
658
|
/**
|
|
618
659
|
* Encoded block object.
|
|
@@ -634,6 +675,54 @@ export declare class BlockResponse extends BaseModel {
|
|
|
634
675
|
* message pack.
|
|
635
676
|
*/
|
|
636
677
|
constructor(block: BlockHeader, cert?: Record<string, any>);
|
|
678
|
+
static from_obj_for_encoding(data: Record<string, any>): BlockResponse;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Box name and its content.
|
|
682
|
+
*/
|
|
683
|
+
export declare class Box extends BaseModel {
|
|
684
|
+
/**
|
|
685
|
+
* (name) box name, base64 encoded
|
|
686
|
+
*/
|
|
687
|
+
name: Uint8Array;
|
|
688
|
+
/**
|
|
689
|
+
* (value) box value, base64 encoded.
|
|
690
|
+
*/
|
|
691
|
+
value: Uint8Array;
|
|
692
|
+
/**
|
|
693
|
+
* Creates a new `Box` object.
|
|
694
|
+
* @param name - (name) box name, base64 encoded
|
|
695
|
+
* @param value - (value) box value, base64 encoded.
|
|
696
|
+
*/
|
|
697
|
+
constructor(name: string | Uint8Array, value: string | Uint8Array);
|
|
698
|
+
static from_obj_for_encoding(data: Record<string, any>): Box;
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* Box descriptor describes a Box.
|
|
702
|
+
*/
|
|
703
|
+
export declare class BoxDescriptor extends BaseModel {
|
|
704
|
+
/**
|
|
705
|
+
* Base64 encoded box name
|
|
706
|
+
*/
|
|
707
|
+
name: Uint8Array;
|
|
708
|
+
/**
|
|
709
|
+
* Creates a new `BoxDescriptor` object.
|
|
710
|
+
* @param name - Base64 encoded box name
|
|
711
|
+
*/
|
|
712
|
+
constructor(name: string | Uint8Array);
|
|
713
|
+
static from_obj_for_encoding(data: Record<string, any>): BoxDescriptor;
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Box names of an application
|
|
717
|
+
*/
|
|
718
|
+
export declare class BoxesResponse extends BaseModel {
|
|
719
|
+
boxes: BoxDescriptor[];
|
|
720
|
+
/**
|
|
721
|
+
* Creates a new `BoxesResponse` object.
|
|
722
|
+
* @param boxes -
|
|
723
|
+
*/
|
|
724
|
+
constructor(boxes: BoxDescriptor[]);
|
|
725
|
+
static from_obj_for_encoding(data: Record<string, any>): BoxesResponse;
|
|
637
726
|
}
|
|
638
727
|
export declare class BuildVersion extends BaseModel {
|
|
639
728
|
branch: string;
|
|
@@ -659,6 +748,7 @@ export declare class BuildVersion extends BaseModel {
|
|
|
659
748
|
major: number | bigint;
|
|
660
749
|
minor: number | bigint;
|
|
661
750
|
});
|
|
751
|
+
static from_obj_for_encoding(data: Record<string, any>): BuildVersion;
|
|
662
752
|
}
|
|
663
753
|
/**
|
|
664
754
|
*
|
|
@@ -673,6 +763,7 @@ export declare class CatchpointAbortResponse extends BaseModel {
|
|
|
673
763
|
* @param catchupMessage - Catchup abort response string
|
|
674
764
|
*/
|
|
675
765
|
constructor(catchupMessage: string);
|
|
766
|
+
static from_obj_for_encoding(data: Record<string, any>): CatchpointAbortResponse;
|
|
676
767
|
}
|
|
677
768
|
/**
|
|
678
769
|
*
|
|
@@ -687,6 +778,7 @@ export declare class CatchpointStartResponse extends BaseModel {
|
|
|
687
778
|
* @param catchupMessage - Catchup start response string
|
|
688
779
|
*/
|
|
689
780
|
constructor(catchupMessage: string);
|
|
781
|
+
static from_obj_for_encoding(data: Record<string, any>): CatchpointStartResponse;
|
|
690
782
|
}
|
|
691
783
|
/**
|
|
692
784
|
* Teal compile Result
|
|
@@ -711,6 +803,7 @@ export declare class CompileResponse extends BaseModel {
|
|
|
711
803
|
* @param sourcemap - JSON of the source map
|
|
712
804
|
*/
|
|
713
805
|
constructor(hash: string, result: string, sourcemap?: Record<string, any>);
|
|
806
|
+
static from_obj_for_encoding(data: Record<string, any>): CompileResponse;
|
|
714
807
|
}
|
|
715
808
|
/**
|
|
716
809
|
* Teal disassembly Result
|
|
@@ -725,6 +818,7 @@ export declare class DisassembleResponse extends BaseModel {
|
|
|
725
818
|
* @param result - disassembled Teal code
|
|
726
819
|
*/
|
|
727
820
|
constructor(result: string);
|
|
821
|
+
static from_obj_for_encoding(data: Record<string, any>): DisassembleResponse;
|
|
728
822
|
}
|
|
729
823
|
/**
|
|
730
824
|
* Request data type for dryrun endpoint. Given the Transactions and simulated
|
|
@@ -772,6 +866,7 @@ export declare class DryrunRequest extends BaseModel {
|
|
|
772
866
|
sources: DryrunSource[];
|
|
773
867
|
txns: EncodedSignedTransaction[];
|
|
774
868
|
});
|
|
869
|
+
static from_obj_for_encoding(data: Record<string, any>): DryrunRequest;
|
|
775
870
|
}
|
|
776
871
|
/**
|
|
777
872
|
* DryrunResponse contains per-txn debug information from a dryrun.
|
|
@@ -790,6 +885,7 @@ export declare class DryrunResponse extends BaseModel {
|
|
|
790
885
|
* @param txns -
|
|
791
886
|
*/
|
|
792
887
|
constructor(error: string, protocolVersion: string, txns: DryrunTxnResult[]);
|
|
888
|
+
static from_obj_for_encoding(data: Record<string, any>): DryrunResponse;
|
|
793
889
|
}
|
|
794
890
|
/**
|
|
795
891
|
* DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into
|
|
@@ -815,6 +911,7 @@ export declare class DryrunSource extends BaseModel {
|
|
|
815
911
|
* @param appIndex -
|
|
816
912
|
*/
|
|
817
913
|
constructor(fieldName: string, source: string, txnIndex: number | bigint, appIndex: number | bigint);
|
|
914
|
+
static from_obj_for_encoding(data: Record<string, any>): DryrunSource;
|
|
818
915
|
}
|
|
819
916
|
/**
|
|
820
917
|
* Stores the TEAL eval step data
|
|
@@ -849,6 +946,7 @@ export declare class DryrunState extends BaseModel {
|
|
|
849
946
|
error?: string;
|
|
850
947
|
scratch?: TealValue[];
|
|
851
948
|
});
|
|
949
|
+
static from_obj_for_encoding(data: Record<string, any>): DryrunState;
|
|
852
950
|
}
|
|
853
951
|
/**
|
|
854
952
|
* DryrunTxnResult contains any LogicSig or ApplicationCall program debug
|
|
@@ -916,6 +1014,7 @@ export declare class DryrunTxnResult extends BaseModel {
|
|
|
916
1014
|
logicSigTrace?: DryrunState[];
|
|
917
1015
|
logs?: Uint8Array[];
|
|
918
1016
|
});
|
|
1017
|
+
static from_obj_for_encoding(data: Record<string, any>): DryrunTxnResult;
|
|
919
1018
|
}
|
|
920
1019
|
/**
|
|
921
1020
|
* An error response with optional data field.
|
|
@@ -929,6 +1028,7 @@ export declare class ErrorResponse extends BaseModel {
|
|
|
929
1028
|
* @param data -
|
|
930
1029
|
*/
|
|
931
1030
|
constructor(message: string, data?: Record<string, any>);
|
|
1031
|
+
static from_obj_for_encoding(data: Record<string, any>): ErrorResponse;
|
|
932
1032
|
}
|
|
933
1033
|
/**
|
|
934
1034
|
* Represents a TEAL value delta.
|
|
@@ -953,6 +1053,7 @@ export declare class EvalDelta extends BaseModel {
|
|
|
953
1053
|
* @param uint - (ui) uint value.
|
|
954
1054
|
*/
|
|
955
1055
|
constructor(action: number | bigint, bytes?: string, uint?: number | bigint);
|
|
1056
|
+
static from_obj_for_encoding(data: Record<string, any>): EvalDelta;
|
|
956
1057
|
}
|
|
957
1058
|
/**
|
|
958
1059
|
* Key-value pairs for StateDelta.
|
|
@@ -969,6 +1070,7 @@ export declare class EvalDeltaKeyValue extends BaseModel {
|
|
|
969
1070
|
* @param value - Represents a TEAL value delta.
|
|
970
1071
|
*/
|
|
971
1072
|
constructor(key: string, value: EvalDelta);
|
|
1073
|
+
static from_obj_for_encoding(data: Record<string, any>): EvalDeltaKeyValue;
|
|
972
1074
|
}
|
|
973
1075
|
/**
|
|
974
1076
|
* Proof of membership and position of a light block header.
|
|
@@ -995,6 +1097,7 @@ export declare class LightBlockHeaderProof extends BaseModel {
|
|
|
995
1097
|
* from a leaf to the root.
|
|
996
1098
|
*/
|
|
997
1099
|
constructor(index: number | bigint, proof: string | Uint8Array, treedepth: number | bigint);
|
|
1100
|
+
static from_obj_for_encoding(data: Record<string, any>): LightBlockHeaderProof;
|
|
998
1101
|
}
|
|
999
1102
|
/**
|
|
1000
1103
|
*
|
|
@@ -1107,6 +1210,7 @@ export declare class NodeStatusResponse extends BaseModel {
|
|
|
1107
1210
|
catchpointVerifiedAccounts?: number | bigint;
|
|
1108
1211
|
lastCatchpoint?: string;
|
|
1109
1212
|
});
|
|
1213
|
+
static from_obj_for_encoding(data: Record<string, any>): NodeStatusResponse;
|
|
1110
1214
|
}
|
|
1111
1215
|
/**
|
|
1112
1216
|
* Details about a pending transaction. If the transaction was recently confirmed,
|
|
@@ -1212,6 +1316,7 @@ export declare class PendingTransactionResponse extends BaseModel {
|
|
|
1212
1316
|
receiverRewards?: number | bigint;
|
|
1213
1317
|
senderRewards?: number | bigint;
|
|
1214
1318
|
});
|
|
1319
|
+
static from_obj_for_encoding(data: Record<string, any>): PendingTransactionResponse;
|
|
1215
1320
|
}
|
|
1216
1321
|
/**
|
|
1217
1322
|
* A potentially truncated list of transactions currently in the node's transaction
|
|
@@ -1233,6 +1338,7 @@ export declare class PendingTransactionsResponse extends BaseModel {
|
|
|
1233
1338
|
* @param totalTransactions - Total number of transactions in the pool.
|
|
1234
1339
|
*/
|
|
1235
1340
|
constructor(topTransactions: EncodedSignedTransaction[], totalTransactions: number | bigint);
|
|
1341
|
+
static from_obj_for_encoding(data: Record<string, any>): PendingTransactionsResponse;
|
|
1236
1342
|
}
|
|
1237
1343
|
/**
|
|
1238
1344
|
* Transaction ID of the submission.
|
|
@@ -1247,6 +1353,7 @@ export declare class PostTransactionsResponse extends BaseModel {
|
|
|
1247
1353
|
* @param txid - encoding of the transaction hash.
|
|
1248
1354
|
*/
|
|
1249
1355
|
constructor(txid: string);
|
|
1356
|
+
static from_obj_for_encoding(data: Record<string, any>): PostTransactionsResponse;
|
|
1250
1357
|
}
|
|
1251
1358
|
/**
|
|
1252
1359
|
* Represents a state proof and its corresponding message
|
|
@@ -1266,6 +1373,7 @@ export declare class StateProof extends BaseModel {
|
|
|
1266
1373
|
* @param stateproof - The encoded StateProof for the message.
|
|
1267
1374
|
*/
|
|
1268
1375
|
constructor(message: StateProofMessage, stateproof: string | Uint8Array);
|
|
1376
|
+
static from_obj_for_encoding(data: Record<string, any>): StateProof;
|
|
1269
1377
|
}
|
|
1270
1378
|
/**
|
|
1271
1379
|
* Represents the message that the state proofs are attesting to.
|
|
@@ -1310,6 +1418,7 @@ export declare class StateProofMessage extends BaseModel {
|
|
|
1310
1418
|
lnprovenweight: number | bigint;
|
|
1311
1419
|
voterscommitment: string | Uint8Array;
|
|
1312
1420
|
});
|
|
1421
|
+
static from_obj_for_encoding(data: Record<string, any>): StateProofMessage;
|
|
1313
1422
|
}
|
|
1314
1423
|
/**
|
|
1315
1424
|
* Supply represents the current supply of MicroAlgos in the system.
|
|
@@ -1334,6 +1443,7 @@ export declare class SupplyResponse extends BaseModel {
|
|
|
1334
1443
|
* @param totalMoney - TotalMoney
|
|
1335
1444
|
*/
|
|
1336
1445
|
constructor(currentRound: number | bigint, onlineMoney: number | bigint, totalMoney: number | bigint);
|
|
1446
|
+
static from_obj_for_encoding(data: Record<string, any>): SupplyResponse;
|
|
1337
1447
|
}
|
|
1338
1448
|
/**
|
|
1339
1449
|
* Represents a key-value pair in an application store.
|
|
@@ -1350,6 +1460,7 @@ export declare class TealKeyValue extends BaseModel {
|
|
|
1350
1460
|
* @param value - Represents a TEAL value.
|
|
1351
1461
|
*/
|
|
1352
1462
|
constructor(key: string, value: TealValue);
|
|
1463
|
+
static from_obj_for_encoding(data: Record<string, any>): TealKeyValue;
|
|
1353
1464
|
}
|
|
1354
1465
|
/**
|
|
1355
1466
|
* Represents a TEAL value.
|
|
@@ -1374,6 +1485,7 @@ export declare class TealValue extends BaseModel {
|
|
|
1374
1485
|
* @param uint - (ui) uint value.
|
|
1375
1486
|
*/
|
|
1376
1487
|
constructor(type: number | bigint, bytes: string, uint: number | bigint);
|
|
1488
|
+
static from_obj_for_encoding(data: Record<string, any>): TealValue;
|
|
1377
1489
|
}
|
|
1378
1490
|
/**
|
|
1379
1491
|
* TransactionParams contains the parameters that help a client construct a new
|
|
@@ -1431,6 +1543,7 @@ export declare class TransactionParametersResponse extends BaseModel {
|
|
|
1431
1543
|
lastRound: number | bigint;
|
|
1432
1544
|
minFee: number | bigint;
|
|
1433
1545
|
});
|
|
1546
|
+
static from_obj_for_encoding(data: Record<string, any>): TransactionParametersResponse;
|
|
1434
1547
|
}
|
|
1435
1548
|
/**
|
|
1436
1549
|
* Proof of transaction in a block.
|
|
@@ -1477,6 +1590,7 @@ export declare class TransactionProofResponse extends BaseModel {
|
|
|
1477
1590
|
treedepth: number | bigint;
|
|
1478
1591
|
hashtype?: string;
|
|
1479
1592
|
});
|
|
1593
|
+
static from_obj_for_encoding(data: Record<string, any>): TransactionProofResponse;
|
|
1480
1594
|
}
|
|
1481
1595
|
/**
|
|
1482
1596
|
* algod version information.
|
|
@@ -1494,4 +1608,5 @@ export declare class Version extends BaseModel {
|
|
|
1494
1608
|
* @param versions -
|
|
1495
1609
|
*/
|
|
1496
1610
|
constructor(build: BuildVersion, genesisHashB64: string | Uint8Array, genesisId: string, versions: string[]);
|
|
1611
|
+
static from_obj_for_encoding(data: Record<string, any>): Version;
|
|
1497
1612
|
}
|
|
File without changes
|
|
@@ -13,10 +13,12 @@ import LookupAccountCreatedApplications from './lookupAccountCreatedApplications
|
|
|
13
13
|
import LookupAssetByID from './lookupAssetByID';
|
|
14
14
|
import LookupApplications from './lookupApplications';
|
|
15
15
|
import LookupApplicationLogs from './lookupApplicationLogs';
|
|
16
|
+
import LookupApplicationBoxByIDandName from './lookupApplicationBoxByIDandName';
|
|
16
17
|
import SearchAccounts from './searchAccounts';
|
|
17
18
|
import SearchForTransactions from './searchForTransactions';
|
|
18
19
|
import SearchForAssets from './searchForAssets';
|
|
19
20
|
import SearchForApplications from './searchForApplications';
|
|
21
|
+
import SearchForApplicationBoxes from './searchForApplicationBoxes';
|
|
20
22
|
import { BaseHTTPClient } from '../../baseHTTPClient';
|
|
21
23
|
import { CustomTokenHeader, IndexerTokenHeader } from '../../urlTokenBaseHTTPClient';
|
|
22
24
|
/**
|
|
@@ -299,4 +301,48 @@ export default class IndexerClient extends ServiceClient {
|
|
|
299
301
|
* @category GET
|
|
300
302
|
*/
|
|
301
303
|
searchForApplications(): SearchForApplications;
|
|
304
|
+
/**
|
|
305
|
+
* Returns information about indexed application boxes.
|
|
306
|
+
*
|
|
307
|
+
* #### Example
|
|
308
|
+
* ```typescript
|
|
309
|
+
* const maxResults = 20;
|
|
310
|
+
* const appID = 1234;
|
|
311
|
+
*
|
|
312
|
+
* const responsePage1 = await indexerClient
|
|
313
|
+
* .searchForApplicationBoxes(appID)
|
|
314
|
+
* .limit(maxResults)
|
|
315
|
+
* .do();
|
|
316
|
+
* const boxNamesPage1 = responsePage1.boxes.map(box => box.name);
|
|
317
|
+
*
|
|
318
|
+
* const responsePage2 = await indexerClient
|
|
319
|
+
* .searchForApplicationBoxes(appID)
|
|
320
|
+
* .limit(maxResults)
|
|
321
|
+
* .nextToken(responsePage1.nextToken)
|
|
322
|
+
* .do();
|
|
323
|
+
* const boxNamesPage2 = responsePage2.boxes.map(box => box.name);
|
|
324
|
+
* ```
|
|
325
|
+
*
|
|
326
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idboxes)
|
|
327
|
+
* @param appID - The ID of the application with boxes.
|
|
328
|
+
* @category GET
|
|
329
|
+
*/
|
|
330
|
+
searchForApplicationBoxes(appID: number): SearchForApplicationBoxes;
|
|
331
|
+
/**
|
|
332
|
+
* Returns information about the application box given its name.
|
|
333
|
+
*
|
|
334
|
+
* #### Example
|
|
335
|
+
* ```typescript
|
|
336
|
+
* const boxName = Buffer.from("foo");
|
|
337
|
+
* const boxResponse = await indexerClient
|
|
338
|
+
* .LookupApplicationBoxByIDandName(1234, boxName)
|
|
339
|
+
* .do();
|
|
340
|
+
* const boxValue = boxResponse.value;
|
|
341
|
+
* ```
|
|
342
|
+
*
|
|
343
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idbox)
|
|
344
|
+
* @param appID - The ID of the application with boxes.
|
|
345
|
+
* @category GET
|
|
346
|
+
*/
|
|
347
|
+
lookupApplicationBoxByIDandName(appID: number, boxName: Uint8Array): LookupApplicationBoxByIDandName;
|
|
302
348
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
import { Box } from './models/types';
|
|
5
|
+
export default class LookupApplicationBoxByIDandName extends JSONRequest<Box, Record<string, any>> {
|
|
6
|
+
private index;
|
|
7
|
+
/**
|
|
8
|
+
* Returns information about indexed application boxes.
|
|
9
|
+
*
|
|
10
|
+
* #### Example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const boxName = Buffer.from("foo");
|
|
13
|
+
* const boxResponse = await indexerClient
|
|
14
|
+
* .LookupApplicationBoxByIDandName(1234, boxName)
|
|
15
|
+
* .do();
|
|
16
|
+
* const boxValue = boxResponse.value;
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idbox)
|
|
20
|
+
* @oaram index - application index.
|
|
21
|
+
* @category GET
|
|
22
|
+
*/
|
|
23
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, index: number, boxName: Uint8Array);
|
|
24
|
+
/**
|
|
25
|
+
* @returns `/v2/applications/${index}/box`
|
|
26
|
+
*/
|
|
27
|
+
path(): string;
|
|
28
|
+
prepare(body: Record<string, any>): Box;
|
|
29
|
+
}
|
|
@@ -21,4 +21,9 @@ export default class LookupBlock extends JSONRequest {
|
|
|
21
21
|
* @returns `/v2/blocks/${round}`
|
|
22
22
|
*/
|
|
23
23
|
path(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Header only flag. When this is set to true, returned block does not contain the
|
|
26
|
+
* transactions.
|
|
27
|
+
*/
|
|
28
|
+
headerOnly(headerOnly: boolean): this;
|
|
24
29
|
}
|