algosdk 3.2.0 → 3.3.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 +5 -5
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/client/v2/algod/getApplicationBoxes.js +58 -1
- package/dist/cjs/client/v2/algod/getApplicationBoxes.js.map +1 -1
- package/dist/cjs/client/v2/algod/models/types.js +164 -99
- package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/client/v2/indexer/models/types.js +10 -1
- package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
- package/dist/cjs/client/v2/indexer/searchAccounts.js +19 -0
- package/dist/cjs/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/esm/client/v2/algod/getApplicationBoxes.js +58 -1
- package/dist/esm/client/v2/algod/getApplicationBoxes.js.map +1 -1
- package/dist/esm/client/v2/algod/models/types.js +161 -96
- package/dist/esm/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/client/v2/indexer/models/types.js +10 -1
- package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
- package/dist/esm/client/v2/indexer/searchAccounts.js +19 -0
- package/dist/esm/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/types/client/v2/algod/getApplicationBoxes.d.ts +49 -1
- package/dist/types/client/v2/algod/models/types.d.ts +93 -62
- package/dist/types/client/v2/indexer/models/types.d.ts +7 -1
- package/dist/types/client/v2/indexer/searchAccounts.d.ts +16 -0
- package/package.json +1 -1
- package/src/client/v2/algod/getApplicationBoxes.ts +61 -1
- package/src/client/v2/algod/models/types.ts +285 -145
- package/src/client/v2/indexer/models/types.ts +17 -0
- package/src/client/v2/indexer/searchAccounts.ts +20 -0
|
@@ -257,6 +257,25 @@ export default class SearchAccounts extends JSONRequest {
|
|
|
257
257
|
this.query.exclude = exclude;
|
|
258
258
|
return this;
|
|
259
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* If true, only online accounts will be returned in the response.
|
|
262
|
+
*
|
|
263
|
+
* #### Example
|
|
264
|
+
* ```typescript
|
|
265
|
+
* const onlineOnly = true;
|
|
266
|
+
* const accounts = await indexerClient
|
|
267
|
+
* .searchAccounts
|
|
268
|
+
* .onlineOnly(onlineOnly)
|
|
269
|
+
* .do();
|
|
270
|
+
* ```
|
|
271
|
+
*
|
|
272
|
+
* @param onlineOnly - if true, only online accounts will be returned in the response
|
|
273
|
+
* @category query
|
|
274
|
+
*/
|
|
275
|
+
onlineOnly(onlineOnly) {
|
|
276
|
+
this.query['online-only'] = onlineOnly;
|
|
277
|
+
return this;
|
|
278
|
+
}
|
|
260
279
|
// eslint-disable-next-line class-methods-use-this
|
|
261
280
|
prepare(response) {
|
|
262
281
|
return decodeJSON(response.getJSONText(), AccountsResponse);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchAccounts.js","sourceRoot":"","sources":["../../../../../src/client/v2/indexer/searchAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAA6B;IACvE;;OAEG;IACH,kDAAkD;IAClD,IAAI;QACF,OAAO,cAAc,CAAC;IACxB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,mBAAmB,CAAC,OAAwB;QAC1C,uGAAuG;QACvG,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,gBAAgB,CAAC,MAAuB;QACtC,IAAI,CAAC,KAAK,CAAC,oBAAoB,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AC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kDAAkD;IAClD,OAAO,CAAC,QAA4B;QAClC,OAAO,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,gBAAgB,CAAC,CAAC;IAC9D,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"searchAccounts.js","sourceRoot":"","sources":["../../../../../src/client/v2/indexer/searchAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAA6B;IACvE;;OAEG;IACH,kDAAkD;IAClD,IAAI;QACF,OAAO,cAAc,CAAC;IACxB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,mBAAmB,CAAC,OAAwB;QAC1C,uGAAuG;QACvG,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,gBAAgB,CAAC,MAAuB;QACtC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,KAAa;QACjB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAmB;QACzB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;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.js';
|
|
|
7
7
|
* #### Example
|
|
8
8
|
* ```typescript
|
|
9
9
|
* const index = 60553466;
|
|
10
|
-
* const boxesResponse = await algodClient.getApplicationBoxes(index).
|
|
10
|
+
* const boxesResponse = await algodClient.getApplicationBoxes(index).prefix('int:1234').next('b64:A==').values(true).do();
|
|
11
11
|
* const boxNames = boxesResponse.boxes.map(box => box.name);
|
|
12
12
|
* ```
|
|
13
13
|
*
|
|
@@ -38,5 +38,53 @@ export default class GetApplicationBoxes extends JSONRequest<BoxesResponse> {
|
|
|
38
38
|
* @category query
|
|
39
39
|
*/
|
|
40
40
|
max(max: number): this;
|
|
41
|
+
/**
|
|
42
|
+
* A box name prefix, in the goal app call arg form 'encoding:value'. For ints, use the form 'int:1234'. For raw bytes, use the form 'b64:A=='. For printable strings, use the form 'str:hello'. For addresses, use the form 'addr:XYZ...'.
|
|
43
|
+
*
|
|
44
|
+
* #### Example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const prefix = 'int:1234';
|
|
47
|
+
* const boxesResult = await algodClient
|
|
48
|
+
* .GetApplicationBoxes(1234)
|
|
49
|
+
* .prefix(prefix)
|
|
50
|
+
* .do();
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @param prefix - the box name prefix in the form 'encoding:value'
|
|
54
|
+
* @category query
|
|
55
|
+
*/
|
|
56
|
+
prefix(prefix: string): this;
|
|
57
|
+
/**
|
|
58
|
+
* A box name, in the goal app call arg form 'encoding:value'. When provided, the returned boxes begin (lexographically) with the supplied name. Callers may implement pagination by reinvoking the endpoint with the token from a previous call's next-token.
|
|
59
|
+
*
|
|
60
|
+
* #### Example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const next = 'int:1234';
|
|
63
|
+
* const boxesResult = await algodClient
|
|
64
|
+
* .GetApplicationBoxes(1234)
|
|
65
|
+
* .next(next)
|
|
66
|
+
* .do();
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @param next - the next box name for pagination, in the goal app call arg form 'encoding:value'
|
|
70
|
+
* @category query
|
|
71
|
+
*/
|
|
72
|
+
next(next: string): this;
|
|
73
|
+
/**
|
|
74
|
+
* If true, box values will be returned.
|
|
75
|
+
*
|
|
76
|
+
* #### Example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* const values = true;
|
|
79
|
+
* const boxesResult = await algodClient
|
|
80
|
+
* .GetApplicationBoxes(1234)
|
|
81
|
+
* .values(values)
|
|
82
|
+
* .do();
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* @param values - if true, box values will be returned
|
|
86
|
+
* @category query
|
|
87
|
+
*/
|
|
88
|
+
values(values: boolean): this;
|
|
41
89
|
prepare(response: HTTPClientResponse): BoxesResponse;
|
|
42
90
|
}
|
|
@@ -684,6 +684,10 @@ export declare class ApplicationParams implements Encodable {
|
|
|
684
684
|
* (lsch) local schema
|
|
685
685
|
*/
|
|
686
686
|
localStateSchema?: ApplicationStateSchema;
|
|
687
|
+
/**
|
|
688
|
+
* (v) the number of updates to the application programs
|
|
689
|
+
*/
|
|
690
|
+
version?: number;
|
|
687
691
|
/**
|
|
688
692
|
* Creates a new `ApplicationParams` object.
|
|
689
693
|
* @param approvalProgram - (approv) approval program.
|
|
@@ -694,8 +698,9 @@ export declare class ApplicationParams implements Encodable {
|
|
|
694
698
|
* @param globalState - (gs) global state
|
|
695
699
|
* @param globalStateSchema - (gsch) global schema
|
|
696
700
|
* @param localStateSchema - (lsch) local schema
|
|
701
|
+
* @param version - (v) the number of updates to the application programs
|
|
697
702
|
*/
|
|
698
|
-
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }: {
|
|
703
|
+
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, version, }: {
|
|
699
704
|
approvalProgram: string | Uint8Array;
|
|
700
705
|
clearStateProgram: string | Uint8Array;
|
|
701
706
|
creator: Address | string;
|
|
@@ -703,6 +708,7 @@ export declare class ApplicationParams implements Encodable {
|
|
|
703
708
|
globalState?: TealKeyValue[];
|
|
704
709
|
globalStateSchema?: ApplicationStateSchema;
|
|
705
710
|
localStateSchema?: ApplicationStateSchema;
|
|
711
|
+
version?: number | bigint;
|
|
706
712
|
});
|
|
707
713
|
getEncodingSchema(): Schema;
|
|
708
714
|
toEncodingData(): Map<string, unknown>;
|
|
@@ -1168,53 +1174,32 @@ export declare class Box implements Encodable {
|
|
|
1168
1174
|
private static encodingSchemaValue;
|
|
1169
1175
|
static get encodingSchema(): Schema;
|
|
1170
1176
|
/**
|
|
1171
|
-
*
|
|
1177
|
+
* The box name, base64 encoded
|
|
1172
1178
|
*/
|
|
1173
1179
|
name: Uint8Array;
|
|
1174
1180
|
/**
|
|
1175
1181
|
* The round for which this information is relevant
|
|
1176
1182
|
*/
|
|
1177
|
-
round
|
|
1183
|
+
round?: bigint;
|
|
1178
1184
|
/**
|
|
1179
|
-
*
|
|
1185
|
+
* The box value, base64 encoded.
|
|
1180
1186
|
*/
|
|
1181
|
-
value
|
|
1187
|
+
value?: Uint8Array;
|
|
1182
1188
|
/**
|
|
1183
1189
|
* Creates a new `Box` object.
|
|
1184
|
-
* @param name -
|
|
1190
|
+
* @param name - The box name, base64 encoded
|
|
1185
1191
|
* @param round - The round for which this information is relevant
|
|
1186
|
-
* @param value -
|
|
1192
|
+
* @param value - The box value, base64 encoded.
|
|
1187
1193
|
*/
|
|
1188
1194
|
constructor({ name, round, value, }: {
|
|
1189
1195
|
name: string | Uint8Array;
|
|
1190
|
-
round
|
|
1191
|
-
value
|
|
1196
|
+
round?: number | bigint;
|
|
1197
|
+
value?: string | Uint8Array;
|
|
1192
1198
|
});
|
|
1193
1199
|
getEncodingSchema(): Schema;
|
|
1194
1200
|
toEncodingData(): Map<string, unknown>;
|
|
1195
1201
|
static fromEncodingData(data: unknown): Box;
|
|
1196
1202
|
}
|
|
1197
|
-
/**
|
|
1198
|
-
* Box descriptor describes a Box.
|
|
1199
|
-
*/
|
|
1200
|
-
export declare class BoxDescriptor implements Encodable {
|
|
1201
|
-
private static encodingSchemaValue;
|
|
1202
|
-
static get encodingSchema(): Schema;
|
|
1203
|
-
/**
|
|
1204
|
-
* Base64 encoded box name
|
|
1205
|
-
*/
|
|
1206
|
-
name: Uint8Array;
|
|
1207
|
-
/**
|
|
1208
|
-
* Creates a new `BoxDescriptor` object.
|
|
1209
|
-
* @param name - Base64 encoded box name
|
|
1210
|
-
*/
|
|
1211
|
-
constructor({ name }: {
|
|
1212
|
-
name: string | Uint8Array;
|
|
1213
|
-
});
|
|
1214
|
-
getEncodingSchema(): Schema;
|
|
1215
|
-
toEncodingData(): Map<string, unknown>;
|
|
1216
|
-
static fromEncodingData(data: unknown): BoxDescriptor;
|
|
1217
|
-
}
|
|
1218
1203
|
/**
|
|
1219
1204
|
* References a box of an application.
|
|
1220
1205
|
*/
|
|
@@ -1243,18 +1228,32 @@ export declare class BoxReference implements Encodable {
|
|
|
1243
1228
|
static fromEncodingData(data: unknown): BoxReference;
|
|
1244
1229
|
}
|
|
1245
1230
|
/**
|
|
1246
|
-
*
|
|
1231
|
+
* Boxes of an application
|
|
1247
1232
|
*/
|
|
1248
1233
|
export declare class BoxesResponse implements Encodable {
|
|
1249
1234
|
private static encodingSchemaValue;
|
|
1250
1235
|
static get encodingSchema(): Schema;
|
|
1251
|
-
boxes:
|
|
1236
|
+
boxes: Box[];
|
|
1237
|
+
/**
|
|
1238
|
+
* The round for which this information is relevant.
|
|
1239
|
+
*/
|
|
1240
|
+
round: number;
|
|
1241
|
+
/**
|
|
1242
|
+
* Used for pagination, when making another request provide this token with the
|
|
1243
|
+
* next parameter.
|
|
1244
|
+
*/
|
|
1245
|
+
nextToken?: string;
|
|
1252
1246
|
/**
|
|
1253
1247
|
* Creates a new `BoxesResponse` object.
|
|
1254
1248
|
* @param boxes -
|
|
1249
|
+
* @param round - The round for which this information is relevant.
|
|
1250
|
+
* @param nextToken - Used for pagination, when making another request provide this token with the
|
|
1251
|
+
* next parameter.
|
|
1255
1252
|
*/
|
|
1256
|
-
constructor({ boxes }: {
|
|
1257
|
-
boxes:
|
|
1253
|
+
constructor({ boxes, round, nextToken, }: {
|
|
1254
|
+
boxes: Box[];
|
|
1255
|
+
round: number | bigint;
|
|
1256
|
+
nextToken?: string;
|
|
1258
1257
|
});
|
|
1259
1258
|
getEncodingSchema(): Schema;
|
|
1260
1259
|
toEncodingData(): Map<string, unknown>;
|
|
@@ -1639,6 +1638,66 @@ export declare class EvalDeltaKeyValue implements Encodable {
|
|
|
1639
1638
|
toEncodingData(): Map<string, unknown>;
|
|
1640
1639
|
static fromEncodingData(data: unknown): EvalDeltaKeyValue;
|
|
1641
1640
|
}
|
|
1641
|
+
export declare class Genesis implements Encodable {
|
|
1642
|
+
private static encodingSchemaValue;
|
|
1643
|
+
static get encodingSchema(): Schema;
|
|
1644
|
+
alloc: GenesisAllocation[];
|
|
1645
|
+
fees: string;
|
|
1646
|
+
id: string;
|
|
1647
|
+
network: string;
|
|
1648
|
+
proto: string;
|
|
1649
|
+
rwd: string;
|
|
1650
|
+
timestamp: number;
|
|
1651
|
+
comment?: string;
|
|
1652
|
+
devmode?: boolean;
|
|
1653
|
+
/**
|
|
1654
|
+
* Creates a new `Genesis` object.
|
|
1655
|
+
* @param alloc -
|
|
1656
|
+
* @param fees -
|
|
1657
|
+
* @param id -
|
|
1658
|
+
* @param network -
|
|
1659
|
+
* @param proto -
|
|
1660
|
+
* @param rwd -
|
|
1661
|
+
* @param timestamp -
|
|
1662
|
+
* @param comment -
|
|
1663
|
+
* @param devmode -
|
|
1664
|
+
*/
|
|
1665
|
+
constructor({ alloc, fees, id, network, proto, rwd, timestamp, comment, devmode, }: {
|
|
1666
|
+
alloc: GenesisAllocation[];
|
|
1667
|
+
fees: string;
|
|
1668
|
+
id: string;
|
|
1669
|
+
network: string;
|
|
1670
|
+
proto: string;
|
|
1671
|
+
rwd: string;
|
|
1672
|
+
timestamp: number | bigint;
|
|
1673
|
+
comment?: string;
|
|
1674
|
+
devmode?: boolean;
|
|
1675
|
+
});
|
|
1676
|
+
getEncodingSchema(): Schema;
|
|
1677
|
+
toEncodingData(): Map<string, unknown>;
|
|
1678
|
+
static fromEncodingData(data: unknown): Genesis;
|
|
1679
|
+
}
|
|
1680
|
+
export declare class GenesisAllocation implements Encodable {
|
|
1681
|
+
private static encodingSchemaValue;
|
|
1682
|
+
static get encodingSchema(): Schema;
|
|
1683
|
+
addr: string;
|
|
1684
|
+
comment: string;
|
|
1685
|
+
state: UntypedValue;
|
|
1686
|
+
/**
|
|
1687
|
+
* Creates a new `GenesisAllocation` object.
|
|
1688
|
+
* @param addr -
|
|
1689
|
+
* @param comment -
|
|
1690
|
+
* @param state -
|
|
1691
|
+
*/
|
|
1692
|
+
constructor({ addr, comment, state, }: {
|
|
1693
|
+
addr: string;
|
|
1694
|
+
comment: string;
|
|
1695
|
+
state: UntypedValue;
|
|
1696
|
+
});
|
|
1697
|
+
getEncodingSchema(): Schema;
|
|
1698
|
+
toEncodingData(): Map<string, unknown>;
|
|
1699
|
+
static fromEncodingData(data: unknown): GenesisAllocation;
|
|
1700
|
+
}
|
|
1642
1701
|
/**
|
|
1643
1702
|
* Response containing the timestamp offset in seconds
|
|
1644
1703
|
*/
|
|
@@ -1681,34 +1740,6 @@ export declare class GetSyncRoundResponse implements Encodable {
|
|
|
1681
1740
|
toEncodingData(): Map<string, unknown>;
|
|
1682
1741
|
static fromEncodingData(data: unknown): GetSyncRoundResponse;
|
|
1683
1742
|
}
|
|
1684
|
-
/**
|
|
1685
|
-
* A single Delta containing the key, the previous value and the current value for
|
|
1686
|
-
* a single round.
|
|
1687
|
-
*/
|
|
1688
|
-
export declare class KvDelta implements Encodable {
|
|
1689
|
-
private static encodingSchemaValue;
|
|
1690
|
-
static get encodingSchema(): Schema;
|
|
1691
|
-
/**
|
|
1692
|
-
* The key, base64 encoded.
|
|
1693
|
-
*/
|
|
1694
|
-
key?: Uint8Array;
|
|
1695
|
-
/**
|
|
1696
|
-
* The new value of the KV store entry, base64 encoded.
|
|
1697
|
-
*/
|
|
1698
|
-
value?: Uint8Array;
|
|
1699
|
-
/**
|
|
1700
|
-
* Creates a new `KvDelta` object.
|
|
1701
|
-
* @param key - The key, base64 encoded.
|
|
1702
|
-
* @param value - The new value of the KV store entry, base64 encoded.
|
|
1703
|
-
*/
|
|
1704
|
-
constructor({ key, value, }: {
|
|
1705
|
-
key?: string | Uint8Array;
|
|
1706
|
-
value?: string | Uint8Array;
|
|
1707
|
-
});
|
|
1708
|
-
getEncodingSchema(): Schema;
|
|
1709
|
-
toEncodingData(): Map<string, unknown>;
|
|
1710
|
-
static fromEncodingData(data: unknown): KvDelta;
|
|
1711
|
-
}
|
|
1712
1743
|
/**
|
|
1713
1744
|
* Contains a ledger delta for a single transaction group
|
|
1714
1745
|
*/
|
|
@@ -620,6 +620,10 @@ export declare class ApplicationParams implements Encodable {
|
|
|
620
620
|
* local schema
|
|
621
621
|
*/
|
|
622
622
|
localStateSchema?: ApplicationStateSchema;
|
|
623
|
+
/**
|
|
624
|
+
* the number of updates to the application programs
|
|
625
|
+
*/
|
|
626
|
+
version?: number;
|
|
623
627
|
/**
|
|
624
628
|
* Creates a new `ApplicationParams` object.
|
|
625
629
|
* @param approvalProgram - approval program.
|
|
@@ -630,8 +634,9 @@ export declare class ApplicationParams implements Encodable {
|
|
|
630
634
|
* @param globalState - global state
|
|
631
635
|
* @param globalStateSchema - global schema
|
|
632
636
|
* @param localStateSchema - local schema
|
|
637
|
+
* @param version - the number of updates to the application programs
|
|
633
638
|
*/
|
|
634
|
-
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }: {
|
|
639
|
+
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, version, }: {
|
|
635
640
|
approvalProgram: string | Uint8Array;
|
|
636
641
|
clearStateProgram: string | Uint8Array;
|
|
637
642
|
creator?: Address | string;
|
|
@@ -639,6 +644,7 @@ export declare class ApplicationParams implements Encodable {
|
|
|
639
644
|
globalState?: TealKeyValue[];
|
|
640
645
|
globalStateSchema?: ApplicationStateSchema;
|
|
641
646
|
localStateSchema?: ApplicationStateSchema;
|
|
647
|
+
version?: number | bigint;
|
|
642
648
|
});
|
|
643
649
|
getEncodingSchema(): Schema;
|
|
644
650
|
toEncodingData(): Map<string, unknown>;
|
|
@@ -224,5 +224,21 @@ export default class SearchAccounts extends JSONRequest<AccountsResponse> {
|
|
|
224
224
|
* @category query
|
|
225
225
|
*/
|
|
226
226
|
exclude(exclude: string): this;
|
|
227
|
+
/**
|
|
228
|
+
* If true, only online accounts will be returned in the response.
|
|
229
|
+
*
|
|
230
|
+
* #### Example
|
|
231
|
+
* ```typescript
|
|
232
|
+
* const onlineOnly = true;
|
|
233
|
+
* const accounts = await indexerClient
|
|
234
|
+
* .searchAccounts
|
|
235
|
+
* .onlineOnly(onlineOnly)
|
|
236
|
+
* .do();
|
|
237
|
+
* ```
|
|
238
|
+
*
|
|
239
|
+
* @param onlineOnly - if true, only online accounts will be returned in the response
|
|
240
|
+
* @category query
|
|
241
|
+
*/
|
|
242
|
+
onlineOnly(onlineOnly: boolean): this;
|
|
227
243
|
prepare(response: HTTPClientResponse): AccountsResponse;
|
|
228
244
|
}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ import { BoxesResponse } from './models/types.js';
|
|
|
9
9
|
* #### Example
|
|
10
10
|
* ```typescript
|
|
11
11
|
* const index = 60553466;
|
|
12
|
-
* const boxesResponse = await algodClient.getApplicationBoxes(index).
|
|
12
|
+
* const boxesResponse = await algodClient.getApplicationBoxes(index).prefix('int:1234').next('b64:A==').values(true).do();
|
|
13
13
|
* const boxNames = boxesResponse.boxes.map(box => box.name);
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
@@ -53,6 +53,66 @@ export default class GetApplicationBoxes extends JSONRequest<BoxesResponse> {
|
|
|
53
53
|
return this;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* A box name prefix, in the goal app call arg form 'encoding:value'. For ints, use the form 'int:1234'. For raw bytes, use the form 'b64:A=='. For printable strings, use the form 'str:hello'. For addresses, use the form 'addr:XYZ...'.
|
|
58
|
+
*
|
|
59
|
+
* #### Example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* const prefix = 'int:1234';
|
|
62
|
+
* const boxesResult = await algodClient
|
|
63
|
+
* .GetApplicationBoxes(1234)
|
|
64
|
+
* .prefix(prefix)
|
|
65
|
+
* .do();
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param prefix - the box name prefix in the form 'encoding:value'
|
|
69
|
+
* @category query
|
|
70
|
+
*/
|
|
71
|
+
prefix(prefix: string) {
|
|
72
|
+
this.query.prefix = prefix;
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A box name, in the goal app call arg form 'encoding:value'. When provided, the returned boxes begin (lexographically) with the supplied name. Callers may implement pagination by reinvoking the endpoint with the token from a previous call's next-token.
|
|
78
|
+
*
|
|
79
|
+
* #### Example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const next = 'int:1234';
|
|
82
|
+
* const boxesResult = await algodClient
|
|
83
|
+
* .GetApplicationBoxes(1234)
|
|
84
|
+
* .next(next)
|
|
85
|
+
* .do();
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @param next - the next box name for pagination, in the goal app call arg form 'encoding:value'
|
|
89
|
+
* @category query
|
|
90
|
+
*/
|
|
91
|
+
next(next: string) {
|
|
92
|
+
this.query.next = next;
|
|
93
|
+
return this;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* If true, box values will be returned.
|
|
98
|
+
*
|
|
99
|
+
* #### Example
|
|
100
|
+
* ```typescript
|
|
101
|
+
* const values = true;
|
|
102
|
+
* const boxesResult = await algodClient
|
|
103
|
+
* .GetApplicationBoxes(1234)
|
|
104
|
+
* .values(values)
|
|
105
|
+
* .do();
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @param values - if true, box values will be returned
|
|
109
|
+
* @category query
|
|
110
|
+
*/
|
|
111
|
+
values(values: boolean) {
|
|
112
|
+
this.query.values = values;
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
|
|
56
116
|
// eslint-disable-next-line class-methods-use-this
|
|
57
117
|
prepare(response: HTTPClientResponse): BoxesResponse {
|
|
58
118
|
return decodeJSON(response.getJSONText(), BoxesResponse);
|