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
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* NOTICE: This file was generated. Editing this file manually is not recommended.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
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 = void 0;
|
|
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;
|
|
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");
|
|
@@ -1120,6 +1120,10 @@ class ApplicationParams {
|
|
|
1120
1120
|
key: 'local-state-schema',
|
|
1121
1121
|
valueSchema: new index_js_1.OptionalSchema(ApplicationStateSchema.encodingSchema),
|
|
1122
1122
|
omitEmpty: true,
|
|
1123
|
+
}, {
|
|
1124
|
+
key: 'version',
|
|
1125
|
+
valueSchema: new index_js_1.OptionalSchema(new index_js_1.Uint64Schema()),
|
|
1126
|
+
omitEmpty: true,
|
|
1123
1127
|
});
|
|
1124
1128
|
}
|
|
1125
1129
|
return this.encodingSchemaValue;
|
|
@@ -1134,8 +1138,9 @@ class ApplicationParams {
|
|
|
1134
1138
|
* @param globalState - (gs) global state
|
|
1135
1139
|
* @param globalStateSchema - (gsch) global schema
|
|
1136
1140
|
* @param localStateSchema - (lsch) local schema
|
|
1141
|
+
* @param version - (v) the number of updates to the application programs
|
|
1137
1142
|
*/
|
|
1138
|
-
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }) {
|
|
1143
|
+
constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, version, }) {
|
|
1139
1144
|
this.approvalProgram =
|
|
1140
1145
|
typeof approvalProgram === 'string'
|
|
1141
1146
|
? (0, binarydata_js_1.base64ToBytes)(approvalProgram)
|
|
@@ -1153,6 +1158,8 @@ class ApplicationParams {
|
|
|
1153
1158
|
this.globalState = globalState;
|
|
1154
1159
|
this.globalStateSchema = globalStateSchema;
|
|
1155
1160
|
this.localStateSchema = localStateSchema;
|
|
1161
|
+
this.version =
|
|
1162
|
+
typeof version === 'undefined' ? undefined : (0, utils_js_1.ensureSafeInteger)(version);
|
|
1156
1163
|
}
|
|
1157
1164
|
// eslint-disable-next-line class-methods-use-this
|
|
1158
1165
|
getEncodingSchema() {
|
|
@@ -1182,6 +1189,7 @@ class ApplicationParams {
|
|
|
1182
1189
|
? this.localStateSchema.toEncodingData()
|
|
1183
1190
|
: undefined,
|
|
1184
1191
|
],
|
|
1192
|
+
['version', this.version],
|
|
1185
1193
|
]);
|
|
1186
1194
|
}
|
|
1187
1195
|
static fromEncodingData(data) {
|
|
@@ -1204,6 +1212,7 @@ class ApplicationParams {
|
|
|
1204
1212
|
localStateSchema: typeof data.get('local-state-schema') !== 'undefined'
|
|
1205
1213
|
? ApplicationStateSchema.fromEncodingData(data.get('local-state-schema'))
|
|
1206
1214
|
: undefined,
|
|
1215
|
+
version: data.get('version'),
|
|
1207
1216
|
});
|
|
1208
1217
|
}
|
|
1209
1218
|
}
|
|
@@ -1917,9 +1926,9 @@ class Box {
|
|
|
1917
1926
|
}
|
|
1918
1927
|
/**
|
|
1919
1928
|
* Creates a new `Box` object.
|
|
1920
|
-
* @param name -
|
|
1929
|
+
* @param name - The box name, base64 encoded
|
|
1921
1930
|
* @param round - The round for which this information is relevant
|
|
1922
|
-
* @param value -
|
|
1931
|
+
* @param value - The box value, base64 encoded.
|
|
1923
1932
|
*/
|
|
1924
1933
|
constructor({ name, round, value, }) {
|
|
1925
1934
|
this.name = typeof name === 'string' ? (0, binarydata_js_1.base64ToBytes)(name) : name;
|
|
@@ -2030,7 +2039,7 @@ class BoxReference {
|
|
|
2030
2039
|
}
|
|
2031
2040
|
exports.BoxReference = BoxReference;
|
|
2032
2041
|
/**
|
|
2033
|
-
* Box names of an application
|
|
2042
|
+
* * Box names of an application
|
|
2034
2043
|
*/
|
|
2035
2044
|
class BoxesResponse {
|
|
2036
2045
|
static get encodingSchema() {
|
|
@@ -2805,6 +2814,130 @@ class EvalDeltaKeyValue {
|
|
|
2805
2814
|
}
|
|
2806
2815
|
}
|
|
2807
2816
|
exports.EvalDeltaKeyValue = EvalDeltaKeyValue;
|
|
2817
|
+
class Genesis {
|
|
2818
|
+
static get encodingSchema() {
|
|
2819
|
+
if (!this.encodingSchemaValue) {
|
|
2820
|
+
this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
|
|
2821
|
+
this.encodingSchemaValue.pushEntries({
|
|
2822
|
+
key: 'alloc',
|
|
2823
|
+
valueSchema: new index_js_1.ArraySchema(GenesisAllocation.encodingSchema),
|
|
2824
|
+
omitEmpty: true,
|
|
2825
|
+
}, { key: 'fees', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, { key: 'id', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, { key: 'network', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, { key: 'proto', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, { key: 'rwd', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, { key: 'timestamp', valueSchema: new index_js_1.Uint64Schema(), omitEmpty: true }, {
|
|
2826
|
+
key: 'comment',
|
|
2827
|
+
valueSchema: new index_js_1.OptionalSchema(new index_js_1.StringSchema()),
|
|
2828
|
+
omitEmpty: true,
|
|
2829
|
+
}, {
|
|
2830
|
+
key: 'devmode',
|
|
2831
|
+
valueSchema: new index_js_1.OptionalSchema(new index_js_1.BooleanSchema()),
|
|
2832
|
+
omitEmpty: true,
|
|
2833
|
+
});
|
|
2834
|
+
}
|
|
2835
|
+
return this.encodingSchemaValue;
|
|
2836
|
+
}
|
|
2837
|
+
/**
|
|
2838
|
+
* Creates a new `Genesis` object.
|
|
2839
|
+
* @param alloc -
|
|
2840
|
+
* @param fees -
|
|
2841
|
+
* @param id -
|
|
2842
|
+
* @param network -
|
|
2843
|
+
* @param proto -
|
|
2844
|
+
* @param rwd -
|
|
2845
|
+
* @param timestamp -
|
|
2846
|
+
* @param comment -
|
|
2847
|
+
* @param devmode -
|
|
2848
|
+
*/
|
|
2849
|
+
constructor({ alloc, fees, id, network, proto, rwd, timestamp, comment, devmode, }) {
|
|
2850
|
+
this.alloc = alloc;
|
|
2851
|
+
this.fees = fees;
|
|
2852
|
+
this.id = id;
|
|
2853
|
+
this.network = network;
|
|
2854
|
+
this.proto = proto;
|
|
2855
|
+
this.rwd = rwd;
|
|
2856
|
+
this.timestamp = (0, utils_js_1.ensureSafeInteger)(timestamp);
|
|
2857
|
+
this.comment = comment;
|
|
2858
|
+
this.devmode = devmode;
|
|
2859
|
+
}
|
|
2860
|
+
// eslint-disable-next-line class-methods-use-this
|
|
2861
|
+
getEncodingSchema() {
|
|
2862
|
+
return Genesis.encodingSchema;
|
|
2863
|
+
}
|
|
2864
|
+
toEncodingData() {
|
|
2865
|
+
return new Map([
|
|
2866
|
+
['alloc', this.alloc.map((v) => v.toEncodingData())],
|
|
2867
|
+
['fees', this.fees],
|
|
2868
|
+
['id', this.id],
|
|
2869
|
+
['network', this.network],
|
|
2870
|
+
['proto', this.proto],
|
|
2871
|
+
['rwd', this.rwd],
|
|
2872
|
+
['timestamp', this.timestamp],
|
|
2873
|
+
['comment', this.comment],
|
|
2874
|
+
['devmode', this.devmode],
|
|
2875
|
+
]);
|
|
2876
|
+
}
|
|
2877
|
+
static fromEncodingData(data) {
|
|
2878
|
+
if (!(data instanceof Map)) {
|
|
2879
|
+
throw new Error(`Invalid decoded Genesis: ${data}`);
|
|
2880
|
+
}
|
|
2881
|
+
return new Genesis({
|
|
2882
|
+
alloc: (data.get('alloc') ?? []).map((v) => GenesisAllocation.fromEncodingData(v)),
|
|
2883
|
+
fees: data.get('fees'),
|
|
2884
|
+
id: data.get('id'),
|
|
2885
|
+
network: data.get('network'),
|
|
2886
|
+
proto: data.get('proto'),
|
|
2887
|
+
rwd: data.get('rwd'),
|
|
2888
|
+
timestamp: data.get('timestamp'),
|
|
2889
|
+
comment: data.get('comment'),
|
|
2890
|
+
devmode: data.get('devmode'),
|
|
2891
|
+
});
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
exports.Genesis = Genesis;
|
|
2895
|
+
class GenesisAllocation {
|
|
2896
|
+
static get encodingSchema() {
|
|
2897
|
+
if (!this.encodingSchemaValue) {
|
|
2898
|
+
this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
|
|
2899
|
+
this.encodingSchemaValue.pushEntries({ key: 'addr', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, { key: 'comment', valueSchema: new index_js_1.StringSchema(), omitEmpty: true }, {
|
|
2900
|
+
key: 'state',
|
|
2901
|
+
valueSchema: untypedmodel_js_1.UntypedValue.encodingSchema,
|
|
2902
|
+
omitEmpty: true,
|
|
2903
|
+
});
|
|
2904
|
+
}
|
|
2905
|
+
return this.encodingSchemaValue;
|
|
2906
|
+
}
|
|
2907
|
+
/**
|
|
2908
|
+
* Creates a new `GenesisAllocation` object.
|
|
2909
|
+
* @param addr -
|
|
2910
|
+
* @param comment -
|
|
2911
|
+
* @param state -
|
|
2912
|
+
*/
|
|
2913
|
+
constructor({ addr, comment, state, }) {
|
|
2914
|
+
this.addr = addr;
|
|
2915
|
+
this.comment = comment;
|
|
2916
|
+
this.state = state;
|
|
2917
|
+
}
|
|
2918
|
+
// eslint-disable-next-line class-methods-use-this
|
|
2919
|
+
getEncodingSchema() {
|
|
2920
|
+
return GenesisAllocation.encodingSchema;
|
|
2921
|
+
}
|
|
2922
|
+
toEncodingData() {
|
|
2923
|
+
return new Map([
|
|
2924
|
+
['addr', this.addr],
|
|
2925
|
+
['comment', this.comment],
|
|
2926
|
+
['state', this.state.toEncodingData()],
|
|
2927
|
+
]);
|
|
2928
|
+
}
|
|
2929
|
+
static fromEncodingData(data) {
|
|
2930
|
+
if (!(data instanceof Map)) {
|
|
2931
|
+
throw new Error(`Invalid decoded GenesisAllocation: ${data}`);
|
|
2932
|
+
}
|
|
2933
|
+
return new GenesisAllocation({
|
|
2934
|
+
addr: data.get('addr'),
|
|
2935
|
+
comment: data.get('comment'),
|
|
2936
|
+
state: untypedmodel_js_1.UntypedValue.fromEncodingData(data.get('state') ?? new Map()),
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
}
|
|
2940
|
+
exports.GenesisAllocation = GenesisAllocation;
|
|
2808
2941
|
/**
|
|
2809
2942
|
* Response containing the timestamp offset in seconds
|
|
2810
2943
|
*/
|
|
@@ -2883,56 +3016,6 @@ class GetSyncRoundResponse {
|
|
|
2883
3016
|
}
|
|
2884
3017
|
}
|
|
2885
3018
|
exports.GetSyncRoundResponse = GetSyncRoundResponse;
|
|
2886
|
-
/**
|
|
2887
|
-
* A single Delta containing the key, the previous value and the current value for
|
|
2888
|
-
* a single round.
|
|
2889
|
-
*/
|
|
2890
|
-
class KvDelta {
|
|
2891
|
-
static get encodingSchema() {
|
|
2892
|
-
if (!this.encodingSchemaValue) {
|
|
2893
|
-
this.encodingSchemaValue = new index_js_1.NamedMapSchema([]);
|
|
2894
|
-
this.encodingSchemaValue.pushEntries({
|
|
2895
|
-
key: 'key',
|
|
2896
|
-
valueSchema: new index_js_1.OptionalSchema(new index_js_1.ByteArraySchema()),
|
|
2897
|
-
omitEmpty: true,
|
|
2898
|
-
}, {
|
|
2899
|
-
key: 'value',
|
|
2900
|
-
valueSchema: new index_js_1.OptionalSchema(new index_js_1.ByteArraySchema()),
|
|
2901
|
-
omitEmpty: true,
|
|
2902
|
-
});
|
|
2903
|
-
}
|
|
2904
|
-
return this.encodingSchemaValue;
|
|
2905
|
-
}
|
|
2906
|
-
/**
|
|
2907
|
-
* Creates a new `KvDelta` object.
|
|
2908
|
-
* @param key - The key, base64 encoded.
|
|
2909
|
-
* @param value - The new value of the KV store entry, base64 encoded.
|
|
2910
|
-
*/
|
|
2911
|
-
constructor({ key, value, }) {
|
|
2912
|
-
this.key = typeof key === 'string' ? (0, binarydata_js_1.base64ToBytes)(key) : key;
|
|
2913
|
-
this.value = typeof value === 'string' ? (0, binarydata_js_1.base64ToBytes)(value) : value;
|
|
2914
|
-
}
|
|
2915
|
-
// eslint-disable-next-line class-methods-use-this
|
|
2916
|
-
getEncodingSchema() {
|
|
2917
|
-
return KvDelta.encodingSchema;
|
|
2918
|
-
}
|
|
2919
|
-
toEncodingData() {
|
|
2920
|
-
return new Map([
|
|
2921
|
-
['key', this.key],
|
|
2922
|
-
['value', this.value],
|
|
2923
|
-
]);
|
|
2924
|
-
}
|
|
2925
|
-
static fromEncodingData(data) {
|
|
2926
|
-
if (!(data instanceof Map)) {
|
|
2927
|
-
throw new Error(`Invalid decoded KvDelta: ${data}`);
|
|
2928
|
-
}
|
|
2929
|
-
return new KvDelta({
|
|
2930
|
-
key: data.get('key'),
|
|
2931
|
-
value: data.get('value'),
|
|
2932
|
-
});
|
|
2933
|
-
}
|
|
2934
|
-
}
|
|
2935
|
-
exports.KvDelta = KvDelta;
|
|
2936
3019
|
/**
|
|
2937
3020
|
* Contains a ledger delta for a single transaction group
|
|
2938
3021
|
*/
|