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
|
@@ -992,6 +992,10 @@ class ApplicationParams {
|
|
|
992
992
|
key: 'local-state-schema',
|
|
993
993
|
valueSchema: new index_js_1.OptionalSchema(ApplicationStateSchema.encodingSchema),
|
|
994
994
|
omitEmpty: true,
|
|
995
|
+
}, {
|
|
996
|
+
key: 'version',
|
|
997
|
+
valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
|
|
998
|
+
omitEmpty: true,
|
|
995
999
|
});
|
|
996
1000
|
}
|
|
997
1001
|
return this.encodingSchemaValue;
|
|
@@ -1006,8 +1010,9 @@ class ApplicationParams {
|
|
|
1006
1010
|
* @param globalState - global state
|
|
1007
1011
|
* @param globalStateSchema - global schema
|
|
1008
1012
|
* @param localStateSchema - local schema
|
|
1013
|
+
* @param version - the number of updates to the application programs
|
|
1009
1014
|
*/
|
|
1010
|
-
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }) {
|
|
1015
|
+
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, version, }) {
|
|
1011
1016
|
this.approvalProgram =
|
|
1012
1017
|
typeof approvalProgram === 'string'
|
|
1013
1018
|
? (0, binarydata_js_1.base64ToBytes)(approvalProgram)
|
|
@@ -1025,6 +1030,8 @@ class ApplicationParams {
|
|
|
1025
1030
|
this.globalState = globalState;
|
|
1026
1031
|
this.globalStateSchema = globalStateSchema;
|
|
1027
1032
|
this.localStateSchema = localStateSchema;
|
|
1033
|
+
this.version =
|
|
1034
|
+
typeof version === 'undefined' ? undefined : (0, utils_js_1.ensureSafeInteger)(version);
|
|
1028
1035
|
}
|
|
1029
1036
|
// eslint-disable-next-line class-methods-use-this
|
|
1030
1037
|
getEncodingSchema() {
|
|
@@ -1059,6 +1066,7 @@ class ApplicationParams {
|
|
|
1059
1066
|
? this.localStateSchema.toEncodingData()
|
|
1060
1067
|
: undefined,
|
|
1061
1068
|
],
|
|
1069
|
+
['version', this.version],
|
|
1062
1070
|
]);
|
|
1063
1071
|
}
|
|
1064
1072
|
static fromEncodingData(data) {
|
|
@@ -1081,6 +1089,7 @@ class ApplicationParams {
|
|
|
1081
1089
|
localStateSchema: typeof data.get('local-state-schema') !== 'undefined'
|
|
1082
1090
|
? ApplicationStateSchema.fromEncodingData(data.get('local-state-schema'))
|
|
1083
1091
|
: undefined,
|
|
1092
|
+
version: data.get('version'),
|
|
1084
1093
|
});
|
|
1085
1094
|
}
|
|
1086
1095
|
}
|