@provablehq/sdk 0.9.8 → 0.9.9
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/dist/mainnet/browser.d.ts +8 -2
- package/dist/mainnet/browser.js +74 -48
- package/dist/mainnet/browser.js.map +1 -1
- package/dist/mainnet/models/record-provider/encryptedRecord.d.ts +58 -0
- package/dist/mainnet/models/record-provider/ownedRecord.d.ts +60 -0
- package/dist/mainnet/models/record-provider/recordSearchParams.d.ts +19 -0
- package/dist/mainnet/models/record-scanner/ownedFilter.d.ts +24 -0
- package/dist/mainnet/models/record-scanner/ownedRecordsResponseFilter.d.ts +42 -0
- package/dist/mainnet/models/record-scanner/recordsFilter.d.ts +35 -0
- package/dist/mainnet/models/record-scanner/recordsResponseFilter.d.ts +38 -0
- package/dist/mainnet/models/record-scanner/registrationRequest.d.ts +13 -0
- package/dist/mainnet/models/record-scanner/registrationResponse.d.ts +15 -0
- package/dist/mainnet/program-manager.d.ts +4 -2
- package/dist/mainnet/record-provider.d.ts +106 -68
- package/dist/testnet/browser.d.ts +8 -2
- package/dist/testnet/browser.js +74 -48
- package/dist/testnet/browser.js.map +1 -1
- package/dist/testnet/models/record-provider/encryptedRecord.d.ts +58 -0
- package/dist/testnet/models/record-provider/ownedRecord.d.ts +60 -0
- package/dist/testnet/models/record-provider/recordSearchParams.d.ts +19 -0
- package/dist/testnet/models/record-scanner/ownedFilter.d.ts +24 -0
- package/dist/testnet/models/record-scanner/ownedRecordsResponseFilter.d.ts +42 -0
- package/dist/testnet/models/record-scanner/recordsFilter.d.ts +35 -0
- package/dist/testnet/models/record-scanner/recordsResponseFilter.d.ts +38 -0
- package/dist/testnet/models/record-scanner/registrationRequest.d.ts +13 -0
- package/dist/testnet/models/record-scanner/registrationResponse.d.ts +15 -0
- package/dist/testnet/program-manager.d.ts +4 -2
- package/dist/testnet/record-provider.d.ts +106 -68
- package/package.json +2 -2
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { RecordPlaintext } from "./wasm.js";
|
|
2
1
|
import { Account } from "./account.js";
|
|
3
2
|
import { AleoNetworkClient } from "./network-client.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
interface RecordSearchParams {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
3
|
+
import { EncryptedRecord } from "./models/record-provider/encryptedRecord.js";
|
|
4
|
+
import { OwnedRecord } from "./models/record-provider/ownedRecord.js";
|
|
5
|
+
import { RecordSearchParams } from "./models/record-provider/recordSearchParams.js";
|
|
6
|
+
import { RecordsResponseFilter } from "./models/record-scanner/recordsResponseFilter.js";
|
|
11
7
|
/**
|
|
12
8
|
* Interface for a record provider. A record provider is used to find records for use in deployment and execution
|
|
13
9
|
* transactions on the Aleo Network. A default implementation is provided by the NetworkRecordProvider class. However,
|
|
@@ -15,61 +11,80 @@ interface RecordSearchParams {
|
|
|
15
11
|
* implementing this interface.
|
|
16
12
|
*/
|
|
17
13
|
interface RecordProvider {
|
|
18
|
-
account: Account;
|
|
19
14
|
/**
|
|
20
|
-
*
|
|
15
|
+
* The account used to search for records.
|
|
16
|
+
*/
|
|
17
|
+
account?: Account;
|
|
18
|
+
/**
|
|
19
|
+
* Find encrypted records from the chosen provider.
|
|
20
|
+
*
|
|
21
|
+
* @param {RecordSearchParams} recordsFilter The filter used to find the records.
|
|
22
|
+
* @param {RecordsResponseFilter} responseFilter The filter used to filter the response.
|
|
23
|
+
* @returns {Promise<EncryptedRecord[]>} The encrypted records.
|
|
24
|
+
*/
|
|
25
|
+
encryptedRecords(recordsFilter: RecordSearchParams, responseFilter?: RecordsResponseFilter): Promise<EncryptedRecord[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Check if a list of serial numbers exist in the chosen provider.
|
|
21
28
|
*
|
|
22
|
-
* @param {
|
|
23
|
-
* @
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
* @param {string[]} serialNumbers The serial numbers to check.
|
|
30
|
+
* @returns {Promise<Record<string, boolean>>} Map of Aleo Record serial numbers and whether they appeared in any inputs on chain. If boolean corresponding to the Serial Number has a true value, that Record is considered spent by the Aleo Network.
|
|
31
|
+
*/
|
|
32
|
+
checkSerialNumbers(serialNumbers: string[]): Promise<Record<string, boolean>>;
|
|
33
|
+
/**
|
|
34
|
+
* Check if a list of tags exist in the chosen provider.
|
|
35
|
+
*
|
|
36
|
+
* @param {string[]} tags The tags to check.
|
|
37
|
+
* @returns {Promise<Record<string, boolean>>} Map of Aleo Record tags and whether they appeared in any inputs on chain. If boolean corresponding to the tag has a true value, that Record is considered spent by the Aleo Network.
|
|
38
|
+
*/
|
|
39
|
+
checkTags(tags: string[]): Promise<Record<string, boolean>>;
|
|
40
|
+
/**
|
|
41
|
+
* Find a credits.aleo record with a given number of microcredits from the chosen provider.
|
|
42
|
+
*
|
|
43
|
+
* @param {number} microcredits The number of microcredits to search for.
|
|
44
|
+
* @param {RecordSearchParams} searchParameters Additional parameters to search for.
|
|
45
|
+
* @returns {Promise<OwnedRecord>} The record if one is found.
|
|
27
46
|
*
|
|
28
47
|
* @example
|
|
29
48
|
* // A class implementing record provider can be used to find a record with a given number of microcredits
|
|
30
|
-
* const record = await recordProvider.findCreditsRecord(5000, true, []);
|
|
49
|
+
* const record = await recordProvider.findCreditsRecord(5000, { unspent: true, nonces: [] });
|
|
31
50
|
*
|
|
32
51
|
* // When a record is found but not yet used, its nonce should be added to the nonces array so that it is not
|
|
33
52
|
* // found again if a subsequent search is performed
|
|
34
|
-
* const record2 = await recordProvider.findCreditsRecord(5000, true, [record.nonce()]);
|
|
53
|
+
* const record2 = await recordProvider.findCreditsRecord(5000, { unspent: true, nonces: [record.nonce()] });
|
|
35
54
|
*
|
|
36
55
|
* // When the program manager is initialized with the record provider it will be used to find automatically find
|
|
37
56
|
* // fee records and amount records for value transfers so that they do not need to be specified manually
|
|
38
57
|
* const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
|
|
39
58
|
* programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);
|
|
40
59
|
*/
|
|
41
|
-
findCreditsRecord(microcredits: number,
|
|
60
|
+
findCreditsRecord(microcredits: number, searchParameters: RecordSearchParams): Promise<OwnedRecord>;
|
|
42
61
|
/**
|
|
43
62
|
* Find a list of credit.aleo records with a given number of microcredits from the chosen provider
|
|
44
63
|
*
|
|
45
|
-
* @param {number} microcreditAmounts A list of separate microcredit amounts to search for (e.g. [5000, 100000])
|
|
46
|
-
* @param {
|
|
47
|
-
* @
|
|
48
|
-
* @param {RecordSearchParams} searchParameters Additional parameters to search for
|
|
49
|
-
* @returns {Promise<RecordPlaintext[]>} A list of records with a value greater or equal to the amounts specified if such records exist, otherwise an error
|
|
64
|
+
* @param {number[]} microcreditAmounts A list of separate microcredit amounts to search for (e.g. [5000, 100000]).
|
|
65
|
+
* @param {RecordSearchParams} searchParameters Additional parameters to search for.
|
|
66
|
+
* @returns {Promise<OwnedRecord[]>} A list of records with a value greater or equal to the amounts specified if such records exist, otherwise an error.
|
|
50
67
|
*
|
|
51
68
|
* @example
|
|
52
69
|
* // A class implementing record provider can be used to find a record with a given number of microcredits
|
|
53
|
-
* const records = await recordProvider.findCreditsRecords([5000, 5000], true, []);
|
|
70
|
+
* const records = await recordProvider.findCreditsRecords([5000, 5000], { unspent: true, nonces: [] });
|
|
54
71
|
*
|
|
55
72
|
* // When a record is found but not yet used, it's nonce should be added to the nonces array so that it is not
|
|
56
73
|
* // found again if a subsequent search is performed
|
|
57
74
|
* const nonces = [];
|
|
58
75
|
* records.forEach(record => { nonces.push(record.nonce()) });
|
|
59
|
-
* const records2 = await recordProvider.findCreditsRecord(5000, true, nonces);
|
|
76
|
+
* const records2 = await recordProvider.findCreditsRecord(5000, { unspent: true, nonces });
|
|
60
77
|
*
|
|
61
78
|
* // When the program manager is initialized with the record provider it will be used to find automatically find
|
|
62
79
|
* // fee records and amount records for value transfers so that they do not need to be specified manually
|
|
63
80
|
* const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
|
|
64
81
|
* programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);
|
|
65
82
|
*/
|
|
66
|
-
findCreditsRecords(microcreditAmounts: number[],
|
|
83
|
+
findCreditsRecords(microcreditAmounts: number[], searchParameters: RecordSearchParams): Promise<OwnedRecord[]>;
|
|
67
84
|
/**
|
|
68
85
|
* Find an arbitrary record
|
|
69
|
-
* @param {
|
|
70
|
-
* @
|
|
71
|
-
* @param {RecordSearchParams} searchParameters Additional parameters to search for
|
|
72
|
-
* @returns {Promise<RecordPlaintext>} The record if found, otherwise an error
|
|
86
|
+
* @param {RecordSearchParams} searchParameters Additional parameters to search for.
|
|
87
|
+
* @returns {Promise<OwnedRecord>} The record if found, otherwise an error.
|
|
73
88
|
*
|
|
74
89
|
* @example
|
|
75
90
|
* // The RecordSearchParams interface can be used to create parameters for custom record searches which can then
|
|
@@ -82,28 +97,40 @@ interface RecordProvider {
|
|
|
82
97
|
* amount: number;
|
|
83
98
|
* program: string;
|
|
84
99
|
* recordName: string;
|
|
85
|
-
*
|
|
100
|
+
* nonces: string[];
|
|
101
|
+
* unspent: boolean;
|
|
102
|
+
* constructor(
|
|
103
|
+
* startHeight: number,
|
|
104
|
+
* endHeight: number,
|
|
105
|
+
* credits: number,
|
|
106
|
+
* maxRecords: number,
|
|
107
|
+
* programName: string,
|
|
108
|
+
* recordName: string,
|
|
109
|
+
* nonces: string[],
|
|
110
|
+
* unspent: boolean
|
|
111
|
+
* ) {
|
|
86
112
|
* this.startHeight = startHeight;
|
|
87
113
|
* this.endHeight = endHeight;
|
|
88
114
|
* this.amount = amount;
|
|
89
115
|
* this.program = programName;
|
|
90
116
|
* this.recordName = recordName;
|
|
117
|
+
* this.nonces = nonces;
|
|
118
|
+
* this.unspent = unspent;
|
|
91
119
|
* }
|
|
92
120
|
* }
|
|
93
121
|
*
|
|
94
|
-
* const params = new CustomRecordSearch(0, 100, 5000, "credits.aleo", "credits");
|
|
122
|
+
* const params = new CustomRecordSearch(0, 100, 5000, "credits.aleo", "credits", [], true);
|
|
95
123
|
*
|
|
96
|
-
* const record = await recordProvider.findRecord(
|
|
124
|
+
* const record = await recordProvider.findRecord(params);
|
|
97
125
|
*/
|
|
98
|
-
findRecord(
|
|
126
|
+
findRecord(searchParameters: RecordSearchParams): Promise<OwnedRecord>;
|
|
99
127
|
/**
|
|
100
128
|
* Find multiple records from arbitrary programs
|
|
101
129
|
*
|
|
102
|
-
* @param {
|
|
103
|
-
* @
|
|
104
|
-
* @param {RecordSearchParams} searchParameters Additional parameters to search for
|
|
105
|
-
* @returns {Promise<RecordPlaintext>} The record if found, otherwise an error
|
|
130
|
+
* @param {RecordSearchParams} searchParameters Additional parameters to search for.
|
|
131
|
+
* @returns {Promise<OwnedRecord[]>} The records if found, otherwise an error.
|
|
106
132
|
*
|
|
133
|
+
* @example
|
|
107
134
|
* // The RecordSearchParams interface can be used to create parameters for custom record searches which can then
|
|
108
135
|
* // be passed to the record provider. An example of how this would be done for the credits.aleo program is shown
|
|
109
136
|
* // below.
|
|
@@ -111,24 +138,35 @@ interface RecordProvider {
|
|
|
111
138
|
* class CustomRecordSearch implements RecordSearchParams {
|
|
112
139
|
* startHeight: number;
|
|
113
140
|
* endHeight: number;
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* programName: string;
|
|
141
|
+
* credits: number;
|
|
142
|
+
* program: string;
|
|
117
143
|
* recordName: string;
|
|
118
|
-
*
|
|
144
|
+
* nonces: string[];
|
|
145
|
+
* unspent: boolean;
|
|
146
|
+
* constructor(
|
|
147
|
+
* startHeight: number,
|
|
148
|
+
* endHeight: number,
|
|
149
|
+
* credits: number,
|
|
150
|
+
* maxRecords: number,
|
|
151
|
+
* programName: string,
|
|
152
|
+
* recordName: string,
|
|
153
|
+
* nonces: string[],
|
|
154
|
+
* unspent: boolean
|
|
155
|
+
* ) {
|
|
119
156
|
* this.startHeight = startHeight;
|
|
120
157
|
* this.endHeight = endHeight;
|
|
121
|
-
* this.
|
|
122
|
-
* this.
|
|
123
|
-
* this.programName = programName;
|
|
158
|
+
* this.credits = credits;
|
|
159
|
+
* this.program = programName;
|
|
124
160
|
* this.recordName = recordName;
|
|
161
|
+
* this.nonces = nonces;
|
|
162
|
+
* this.unspent = unspent;
|
|
125
163
|
* }
|
|
126
164
|
* }
|
|
127
165
|
*
|
|
128
166
|
* const params = new CustomRecordSearch(0, 100, 5000, 2, "credits.aleo", "credits");
|
|
129
167
|
* const records = await recordProvider.findRecord(true, [], params);
|
|
130
168
|
*/
|
|
131
|
-
findRecords(
|
|
169
|
+
findRecords(searchParameters: RecordSearchParams): Promise<OwnedRecord[]>;
|
|
132
170
|
}
|
|
133
171
|
/**
|
|
134
172
|
* A record provider implementation that uses the official Aleo API to find records for usage in program execution and
|
|
@@ -141,17 +179,15 @@ declare class NetworkRecordProvider implements RecordProvider {
|
|
|
141
179
|
/**
|
|
142
180
|
* Set the account used to search for records
|
|
143
181
|
*
|
|
144
|
-
* @param {Account} account The account to use for searching for records
|
|
182
|
+
* @param {Account} account The account used to use for searching for records.
|
|
145
183
|
*/
|
|
146
184
|
setAccount(account: Account): void;
|
|
147
185
|
/**
|
|
148
186
|
* Find a list of credit records with a given number of microcredits by via the official Aleo API
|
|
149
187
|
*
|
|
150
|
-
* @param {number[]} microcredits The number of microcredits to search for
|
|
151
|
-
* @param {
|
|
152
|
-
* @
|
|
153
|
-
* @param {RecordSearchParams} searchParameters Additional parameters to search for
|
|
154
|
-
* @returns {Promise<RecordPlaintext>} The record if found, otherwise an error
|
|
188
|
+
* @param {number[]} microcredits The number of microcredits to search for.
|
|
189
|
+
* @param {RecordSearchParams} searchParameters Additional parameters to search for.
|
|
190
|
+
* @returns {Promise<OwnedRecord[]>} The records if found, otherwise an error.
|
|
155
191
|
*
|
|
156
192
|
* @example
|
|
157
193
|
* // Create a new NetworkRecordProvider
|
|
@@ -160,11 +196,11 @@ declare class NetworkRecordProvider implements RecordProvider {
|
|
|
160
196
|
* const recordProvider = new NetworkRecordProvider(account, networkClient);
|
|
161
197
|
*
|
|
162
198
|
* // The record provider can be used to find records with a given number of microcredits
|
|
163
|
-
* const record = await recordProvider.findCreditsRecord(5000, true, []);
|
|
199
|
+
* const record = await recordProvider.findCreditsRecord(5000, { unspent: true, nonces: [] });
|
|
164
200
|
*
|
|
165
201
|
* // When a record is found but not yet used, it's nonce should be added to the nonces parameter so that it is not
|
|
166
202
|
* // found again if a subsequent search is performed
|
|
167
|
-
* const records = await recordProvider.findCreditsRecords(5000, true, [record.nonce()]);
|
|
203
|
+
* const records = await recordProvider.findCreditsRecords(5000, { unspent: true, nonces: [record.nonce()] });
|
|
168
204
|
*
|
|
169
205
|
* // When the program manager is initialized with the record provider it will be used to find automatically find
|
|
170
206
|
* // fee records and amount records for value transfers so that they do not need to be specified manually
|
|
@@ -172,15 +208,13 @@ declare class NetworkRecordProvider implements RecordProvider {
|
|
|
172
208
|
* programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);
|
|
173
209
|
*
|
|
174
210
|
* */
|
|
175
|
-
findCreditsRecords(microcredits: number[],
|
|
211
|
+
findCreditsRecords(microcredits: number[], searchParameters: RecordSearchParams): Promise<OwnedRecord[]>;
|
|
176
212
|
/**
|
|
177
213
|
* Find a credit record with a given number of microcredits by via the official Aleo API
|
|
178
214
|
*
|
|
179
|
-
* @param {number} microcredits The number of microcredits to search for
|
|
180
|
-
* @param {
|
|
181
|
-
* @
|
|
182
|
-
* @param {RecordSearchParams} searchParameters Additional parameters to search for
|
|
183
|
-
* @returns {Promise<RecordPlaintext>} The record if found, otherwise an error
|
|
215
|
+
* @param {number} microcredits The number of microcredits to search for.
|
|
216
|
+
* @param {RecordSearchParams} searchParameters Additional parameters to search for.
|
|
217
|
+
* @returns {Promise<OwnedRecord>} The record if found, otherwise an error.
|
|
184
218
|
*
|
|
185
219
|
* @example
|
|
186
220
|
* // Create a new NetworkRecordProvider
|
|
@@ -189,26 +223,29 @@ declare class NetworkRecordProvider implements RecordProvider {
|
|
|
189
223
|
* const recordProvider = new NetworkRecordProvider(account, networkClient);
|
|
190
224
|
*
|
|
191
225
|
* // The record provider can be used to find records with a given number of microcredits
|
|
192
|
-
* const record = await recordProvider.findCreditsRecord(5000, true, []);
|
|
226
|
+
* const record = await recordProvider.findCreditsRecord(5000, { unspent: true, nonces: [] });
|
|
193
227
|
*
|
|
194
228
|
* // When a record is found but not yet used, it's nonce should be added to the nonces parameter so that it is not
|
|
195
229
|
* // found again if a subsequent search is performed
|
|
196
|
-
* const records = await recordProvider.findCreditsRecords(5000, true, [record.nonce()]);
|
|
230
|
+
* const records = await recordProvider.findCreditsRecords(5000, { unspent: true, nonces: [record.nonce()] });
|
|
197
231
|
*
|
|
198
232
|
* // When the program manager is initialized with the record provider it will be used to find automatically find
|
|
199
233
|
* // fee records and amount records for value transfers so that they do not need to be specified manually
|
|
200
234
|
* const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
|
|
201
235
|
* programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);
|
|
202
236
|
*/
|
|
203
|
-
findCreditsRecord(microcredits: number,
|
|
237
|
+
findCreditsRecord(microcredits: number, searchParameters: RecordSearchParams): Promise<OwnedRecord>;
|
|
204
238
|
/**
|
|
205
239
|
* Find an arbitrary record. WARNING: This function is not implemented yet and will throw an error.
|
|
206
240
|
*/
|
|
207
|
-
findRecord(
|
|
241
|
+
findRecord(searchParameters: RecordSearchParams): Promise<OwnedRecord>;
|
|
208
242
|
/**
|
|
209
243
|
* Find multiple records from a specified program.
|
|
210
244
|
*/
|
|
211
|
-
findRecords(
|
|
245
|
+
findRecords(searchParameters: RecordSearchParams): Promise<OwnedRecord[]>;
|
|
246
|
+
encryptedRecords(recordsFilter: RecordSearchParams, responseFilter?: RecordsResponseFilter): Promise<EncryptedRecord[]>;
|
|
247
|
+
checkSerialNumbers(serialNumbers: string[]): Promise<Record<string, boolean>>;
|
|
248
|
+
checkTags(tags: string[]): Promise<Record<string, boolean>>;
|
|
212
249
|
}
|
|
213
250
|
/**
|
|
214
251
|
* BlockHeightSearch is a RecordSearchParams implementation that allows for searching for records within a given
|
|
@@ -225,12 +262,13 @@ declare class NetworkRecordProvider implements RecordProvider {
|
|
|
225
262
|
*
|
|
226
263
|
* // The record provider can be used to find records with a given number of microcredits and the block height search
|
|
227
264
|
* // can be used to find records within a given block height range
|
|
228
|
-
* const record = await recordProvider.findCreditsRecord(5000, true, [], params);
|
|
265
|
+
* const record = await recordProvider.findCreditsRecord(5000, { unspent: true, nonces: [], ...params });
|
|
229
266
|
*
|
|
230
267
|
*/
|
|
231
268
|
declare class BlockHeightSearch implements RecordSearchParams {
|
|
232
269
|
startHeight: number;
|
|
233
270
|
endHeight: number;
|
|
234
|
-
|
|
271
|
+
unspent: boolean;
|
|
272
|
+
constructor(startHeight: number, endHeight: number, unspent?: boolean);
|
|
235
273
|
}
|
|
236
|
-
export { BlockHeightSearch, NetworkRecordProvider, RecordProvider,
|
|
274
|
+
export { BlockHeightSearch, NetworkRecordProvider, RecordProvider, };
|
|
@@ -5,6 +5,7 @@ import { BlockJSON, Header, Metadata } from "./models/blockJSON.js";
|
|
|
5
5
|
import { ConfirmedTransactionJSON } from "./models/confirmed_transaction.js";
|
|
6
6
|
import { DeploymentJSON, VerifyingKeys } from "./models/deployment/deploymentJSON.js";
|
|
7
7
|
import { DeploymentObject } from "./models/deployment/deploymentObject.js";
|
|
8
|
+
import { EncryptedRecord } from "./models/record-provider/encryptedRecord.js";
|
|
8
9
|
import { ExecutionJSON, FeeExecutionJSON } from "./models/execution/executionJSON.js";
|
|
9
10
|
import { ExecutionObject, FeeExecutionObject } from "./models/execution/executionObject.js";
|
|
10
11
|
import { FinalizeJSON } from "./models/finalizeJSON.js";
|
|
@@ -14,6 +15,8 @@ import { InputJSON } from "./models/input/inputJSON.js";
|
|
|
14
15
|
import { InputObject } from "./models/input/inputObject.js";
|
|
15
16
|
import { OutputJSON } from "./models/output/outputJSON.js";
|
|
16
17
|
import { OutputObject } from "./models/output/outputObject.js";
|
|
18
|
+
import { OwnedFilter } from "./models/record-scanner/ownedFilter.js";
|
|
19
|
+
import { OwnedRecord } from "./models/record-provider/ownedRecord.js";
|
|
17
20
|
import { OwnerJSON } from "./models/owner/ownerJSON.js";
|
|
18
21
|
import { PlaintextArray } from "./models/plaintext/array.js";
|
|
19
22
|
import { PlaintextLiteral } from "./models/plaintext/literal.js";
|
|
@@ -22,6 +25,9 @@ import { PlaintextStruct } from "./models/plaintext/struct.js";
|
|
|
22
25
|
import { ProvingRequestJSON } from "./models/provingRequest.js";
|
|
23
26
|
import { ProvingResponse } from "./models/provingResponse.js";
|
|
24
27
|
import { RatificationJSON } from "./models/ratification.js";
|
|
28
|
+
import { RecordsFilter } from "./models/record-scanner/recordsFilter.js";
|
|
29
|
+
import { RecordsResponseFilter } from "./models/record-scanner/recordsResponseFilter.js";
|
|
30
|
+
import { RecordSearchParams } from "./models/record-provider/recordSearchParams.js";
|
|
25
31
|
import { SolutionsJSON, SolutionJSON, PartialSolutionJSON } from "./models/solution.js";
|
|
26
32
|
import { TransactionJSON } from "./models/transaction/transactionJSON.js";
|
|
27
33
|
import { TransactionObject } from "./models/transaction/transactionObject.js";
|
|
@@ -29,11 +35,11 @@ import { TransitionJSON } from "./models/transition/transitionJSON.js";
|
|
|
29
35
|
import { TransitionObject } from "./models/transition/transitionObject.js";
|
|
30
36
|
import { AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams } from "./function-key-provider.js";
|
|
31
37
|
import { OfflineKeyProvider, OfflineSearchParams } from "./offline-key-provider.js";
|
|
32
|
-
import { BlockHeightSearch, NetworkRecordProvider, RecordProvider
|
|
38
|
+
import { BlockHeightSearch, NetworkRecordProvider, RecordProvider } from "./record-provider.js";
|
|
33
39
|
declare function initializeWasm(): Promise<void>;
|
|
34
40
|
export { ProgramManager, ProvingRequestOptions, ExecuteOptions, FeeAuthorizationOptions, AuthorizationOptions } from "./program-manager.js";
|
|
35
41
|
export { logAndThrow } from "./utils.js";
|
|
36
42
|
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, Execution as FunctionExecution, ExecutionRequest, ExecutionResponse, EncryptionToolkit, Field, GraphKey, Group, I8, I16, I32, I64, I128, OfflineQuery, Pedersen64, Pedersen128, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager as ProgramManagerBase, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Signature, Scalar, Transaction, Transition, U8, U16, U32, U64, U128, VerifyingKey, ViewKey, initThreadPool, verifyFunctionExecution, } from "./wasm.js";
|
|
37
43
|
export { initializeWasm };
|
|
38
44
|
export { Key, CREDITS_PROGRAM_KEYS, KEY_STORE, PRIVATE_TRANSFER, PRIVATE_TO_PUBLIC_TRANSFER, PRIVATE_TRANSFER_TYPES, PUBLIC_TRANSFER, PUBLIC_TRANSFER_AS_SIGNER, PUBLIC_TO_PRIVATE_TRANSFER, VALID_TRANSFER_TYPES, } from "./constants.js";
|
|
39
|
-
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, AleoNetworkClient, BlockJSON, BlockHeightSearch, CachedKeyPair, ConfirmedTransactionJSON, DeploymentJSON, DeploymentObject, ExecutionJSON, ExecutionObject, FeeExecutionJSON, FeeExecutionObject, FinalizeJSON, FunctionObject, FunctionKeyPair, FunctionKeyProvider, Header, ImportedPrograms, ImportedVerifyingKeys, InputJSON, InputObject, KeySearchParams, Metadata, NetworkRecordProvider, OfflineKeyProvider, OfflineSearchParams, OutputJSON, OutputObject, OwnerJSON, PartialSolutionJSON, PlaintextArray, PlaintextLiteral, PlaintextObject, PlaintextStruct, ProgramImports, ProvingRequestJSON, ProvingResponse, RatificationJSON, RecordProvider, RecordSearchParams, SolutionJSON, SolutionsJSON, TransactionJSON, TransactionObject, TransitionJSON, TransitionObject, VerifyingKeys, };
|
|
45
|
+
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, AleoNetworkClient, BlockJSON, BlockHeightSearch, CachedKeyPair, ConfirmedTransactionJSON, DeploymentJSON, DeploymentObject, EncryptedRecord, ExecutionJSON, ExecutionObject, FeeExecutionJSON, FeeExecutionObject, FinalizeJSON, FunctionObject, FunctionKeyPair, FunctionKeyProvider, Header, ImportedPrograms, ImportedVerifyingKeys, InputJSON, InputObject, KeySearchParams, Metadata, NetworkRecordProvider, OfflineKeyProvider, OfflineSearchParams, OutputJSON, OutputObject, OwnedFilter, OwnedRecord, OwnerJSON, PartialSolutionJSON, PlaintextArray, PlaintextLiteral, PlaintextObject, PlaintextStruct, ProgramImports, ProvingRequestJSON, ProvingResponse, RatificationJSON, RecordsFilter, RecordsResponseFilter, RecordProvider, RecordSearchParams, SolutionJSON, SolutionsJSON, TransactionJSON, TransactionObject, TransitionJSON, TransitionObject, VerifyingKeys, };
|