algosdk 3.2.0 → 3.3.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 +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/models/types.js +139 -56
- 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/models/types.js +135 -53
- 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/models/types.d.ts +72 -34
- 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/models/types.ts +226 -80
- package/src/client/v2/indexer/models/types.ts +17 -0
- package/src/client/v2/indexer/searchAccounts.ts +20 -0
|
@@ -1659,6 +1659,11 @@ export class ApplicationParams implements Encodable {
|
|
|
1659
1659
|
ApplicationStateSchema.encodingSchema
|
|
1660
1660
|
),
|
|
1661
1661
|
omitEmpty: true,
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
key: 'version',
|
|
1665
|
+
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
1666
|
+
omitEmpty: true,
|
|
1662
1667
|
}
|
|
1663
1668
|
);
|
|
1664
1669
|
}
|
|
@@ -1701,6 +1706,11 @@ export class ApplicationParams implements Encodable {
|
|
|
1701
1706
|
*/
|
|
1702
1707
|
public localStateSchema?: ApplicationStateSchema;
|
|
1703
1708
|
|
|
1709
|
+
/**
|
|
1710
|
+
* the number of updates to the application programs
|
|
1711
|
+
*/
|
|
1712
|
+
public version?: number;
|
|
1713
|
+
|
|
1704
1714
|
/**
|
|
1705
1715
|
* Creates a new `ApplicationParams` object.
|
|
1706
1716
|
* @param approvalProgram - approval program.
|
|
@@ -1711,6 +1721,7 @@ export class ApplicationParams implements Encodable {
|
|
|
1711
1721
|
* @param globalState - global state
|
|
1712
1722
|
* @param globalStateSchema - global schema
|
|
1713
1723
|
* @param localStateSchema - local schema
|
|
1724
|
+
* @param version - the number of updates to the application programs
|
|
1714
1725
|
*/
|
|
1715
1726
|
constructor({
|
|
1716
1727
|
approvalProgram,
|
|
@@ -1720,6 +1731,7 @@ export class ApplicationParams implements Encodable {
|
|
|
1720
1731
|
globalState,
|
|
1721
1732
|
globalStateSchema,
|
|
1722
1733
|
localStateSchema,
|
|
1734
|
+
version,
|
|
1723
1735
|
}: {
|
|
1724
1736
|
approvalProgram: string | Uint8Array;
|
|
1725
1737
|
clearStateProgram: string | Uint8Array;
|
|
@@ -1728,6 +1740,7 @@ export class ApplicationParams implements Encodable {
|
|
|
1728
1740
|
globalState?: TealKeyValue[];
|
|
1729
1741
|
globalStateSchema?: ApplicationStateSchema;
|
|
1730
1742
|
localStateSchema?: ApplicationStateSchema;
|
|
1743
|
+
version?: number | bigint;
|
|
1731
1744
|
}) {
|
|
1732
1745
|
this.approvalProgram =
|
|
1733
1746
|
typeof approvalProgram === 'string'
|
|
@@ -1746,6 +1759,8 @@ export class ApplicationParams implements Encodable {
|
|
|
1746
1759
|
this.globalState = globalState;
|
|
1747
1760
|
this.globalStateSchema = globalStateSchema;
|
|
1748
1761
|
this.localStateSchema = localStateSchema;
|
|
1762
|
+
this.version =
|
|
1763
|
+
typeof version === 'undefined' ? undefined : ensureSafeInteger(version);
|
|
1749
1764
|
}
|
|
1750
1765
|
|
|
1751
1766
|
// eslint-disable-next-line class-methods-use-this
|
|
@@ -1782,6 +1797,7 @@ export class ApplicationParams implements Encodable {
|
|
|
1782
1797
|
? this.localStateSchema.toEncodingData()
|
|
1783
1798
|
: undefined,
|
|
1784
1799
|
],
|
|
1800
|
+
['version', this.version],
|
|
1785
1801
|
]);
|
|
1786
1802
|
}
|
|
1787
1803
|
|
|
@@ -1812,6 +1828,7 @@ export class ApplicationParams implements Encodable {
|
|
|
1812
1828
|
data.get('local-state-schema')
|
|
1813
1829
|
)
|
|
1814
1830
|
: undefined,
|
|
1831
|
+
version: data.get('version'),
|
|
1815
1832
|
});
|
|
1816
1833
|
}
|
|
1817
1834
|
}
|
|
@@ -271,6 +271,26 @@ export default class SearchAccounts extends JSONRequest<AccountsResponse> {
|
|
|
271
271
|
return this;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
/**
|
|
275
|
+
* If true, only online accounts will be returned in the response.
|
|
276
|
+
*
|
|
277
|
+
* #### Example
|
|
278
|
+
* ```typescript
|
|
279
|
+
* const onlineOnly = true;
|
|
280
|
+
* const accounts = await indexerClient
|
|
281
|
+
* .searchAccounts
|
|
282
|
+
* .onlineOnly(onlineOnly)
|
|
283
|
+
* .do();
|
|
284
|
+
* ```
|
|
285
|
+
*
|
|
286
|
+
* @param onlineOnly - if true, only online accounts will be returned in the response
|
|
287
|
+
* @category query
|
|
288
|
+
*/
|
|
289
|
+
onlineOnly(onlineOnly: boolean) {
|
|
290
|
+
this.query['online-only'] = onlineOnly;
|
|
291
|
+
return this;
|
|
292
|
+
}
|
|
293
|
+
|
|
274
294
|
// eslint-disable-next-line class-methods-use-this
|
|
275
295
|
prepare(response: HTTPClientResponse): AccountsResponse {
|
|
276
296
|
return decodeJSON(response.getJSONText(), AccountsResponse);
|