@provablehq/sdk 0.7.2 → 0.7.3

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.
Files changed (94) hide show
  1. package/README.md +3 -3
  2. package/package.json +2 -2
  3. package/dist/mainnet/account.d.ts +0 -137
  4. package/dist/mainnet/browser.d.ts +0 -26
  5. package/dist/mainnet/browser.js +0 -934
  6. package/dist/mainnet/browser.js.map +0 -1
  7. package/dist/mainnet/constants.d.ts +0 -34
  8. package/dist/mainnet/function-key-provider.d.ts +0 -349
  9. package/dist/mainnet/managed-worker.d.ts +0 -3
  10. package/dist/mainnet/models/blockJSON.d.ts +0 -21
  11. package/dist/mainnet/models/confirmed_transaction.d.ts +0 -6
  12. package/dist/mainnet/models/deploy.d.ts +0 -5
  13. package/dist/mainnet/models/executionJSON.d.ts +0 -5
  14. package/dist/mainnet/models/functionObject.d.ts +0 -7
  15. package/dist/mainnet/models/input/inputJSON.d.ts +0 -13
  16. package/dist/mainnet/models/input/inputObject.d.ts +0 -15
  17. package/dist/mainnet/models/output/outputJSON.d.ts +0 -6
  18. package/dist/mainnet/models/output/outputObject.d.ts +0 -17
  19. package/dist/mainnet/models/plaintext/array.d.ts +0 -3
  20. package/dist/mainnet/models/plaintext/literal.d.ts +0 -1
  21. package/dist/mainnet/models/plaintext/plaintext.d.ts +0 -4
  22. package/dist/mainnet/models/plaintext/struct.d.ts +0 -5
  23. package/dist/mainnet/models/transaction/transactionJSON.d.ts +0 -6
  24. package/dist/mainnet/models/transaction/transactionSummary.d.ts +0 -11
  25. package/dist/mainnet/models/transition/transitionJSON.d.ts +0 -13
  26. package/dist/mainnet/models/transition/transitionObject.d.ts +0 -15
  27. package/dist/mainnet/network-client.d.ts +0 -359
  28. package/dist/mainnet/node-polyfill.d.ts +0 -5
  29. package/dist/mainnet/node-polyfill.js +0 -304
  30. package/dist/mainnet/node-polyfill.js.map +0 -1
  31. package/dist/mainnet/node.d.ts +0 -2
  32. package/dist/mainnet/node.js +0 -13
  33. package/dist/mainnet/node.js.map +0 -1
  34. package/dist/mainnet/offline-key-provider.d.ts +0 -348
  35. package/dist/mainnet/polyfill/crypto.d.ts +0 -1
  36. package/dist/mainnet/polyfill/fetch.d.ts +0 -1
  37. package/dist/mainnet/polyfill/shared.d.ts +0 -1
  38. package/dist/mainnet/polyfill/worker.d.ts +0 -1
  39. package/dist/mainnet/polyfill/xmlhttprequest.d.ts +0 -1
  40. package/dist/mainnet/program-manager-DAqdrsXx.js +0 -2356
  41. package/dist/mainnet/program-manager-DAqdrsXx.js.map +0 -1
  42. package/dist/mainnet/program-manager.d.ts +0 -640
  43. package/dist/mainnet/record-provider.d.ts +0 -236
  44. package/dist/mainnet/utils.d.ts +0 -4
  45. package/dist/mainnet/wasm.d.ts +0 -1
  46. package/dist/mainnet/worker.d.ts +0 -9
  47. package/dist/mainnet/worker.js +0 -78
  48. package/dist/mainnet/worker.js.map +0 -1
  49. package/dist/testnet/account.d.ts +0 -137
  50. package/dist/testnet/browser.d.ts +0 -26
  51. package/dist/testnet/browser.js +0 -934
  52. package/dist/testnet/browser.js.map +0 -1
  53. package/dist/testnet/constants.d.ts +0 -34
  54. package/dist/testnet/function-key-provider.d.ts +0 -349
  55. package/dist/testnet/managed-worker.d.ts +0 -3
  56. package/dist/testnet/models/blockJSON.d.ts +0 -21
  57. package/dist/testnet/models/confirmed_transaction.d.ts +0 -6
  58. package/dist/testnet/models/deploy.d.ts +0 -5
  59. package/dist/testnet/models/executionJSON.d.ts +0 -5
  60. package/dist/testnet/models/functionObject.d.ts +0 -7
  61. package/dist/testnet/models/input/inputJSON.d.ts +0 -13
  62. package/dist/testnet/models/input/inputObject.d.ts +0 -15
  63. package/dist/testnet/models/output/outputJSON.d.ts +0 -6
  64. package/dist/testnet/models/output/outputObject.d.ts +0 -17
  65. package/dist/testnet/models/plaintext/array.d.ts +0 -3
  66. package/dist/testnet/models/plaintext/literal.d.ts +0 -1
  67. package/dist/testnet/models/plaintext/plaintext.d.ts +0 -4
  68. package/dist/testnet/models/plaintext/struct.d.ts +0 -5
  69. package/dist/testnet/models/transaction/transactionJSON.d.ts +0 -6
  70. package/dist/testnet/models/transaction/transactionSummary.d.ts +0 -11
  71. package/dist/testnet/models/transition/transitionJSON.d.ts +0 -13
  72. package/dist/testnet/models/transition/transitionObject.d.ts +0 -15
  73. package/dist/testnet/network-client.d.ts +0 -359
  74. package/dist/testnet/node-polyfill.d.ts +0 -5
  75. package/dist/testnet/node-polyfill.js +0 -304
  76. package/dist/testnet/node-polyfill.js.map +0 -1
  77. package/dist/testnet/node.d.ts +0 -2
  78. package/dist/testnet/node.js +0 -13
  79. package/dist/testnet/node.js.map +0 -1
  80. package/dist/testnet/offline-key-provider.d.ts +0 -348
  81. package/dist/testnet/polyfill/crypto.d.ts +0 -1
  82. package/dist/testnet/polyfill/fetch.d.ts +0 -1
  83. package/dist/testnet/polyfill/shared.d.ts +0 -1
  84. package/dist/testnet/polyfill/worker.d.ts +0 -1
  85. package/dist/testnet/polyfill/xmlhttprequest.d.ts +0 -1
  86. package/dist/testnet/program-manager-DWPt87ls.js +0 -2356
  87. package/dist/testnet/program-manager-DWPt87ls.js.map +0 -1
  88. package/dist/testnet/program-manager.d.ts +0 -640
  89. package/dist/testnet/record-provider.d.ts +0 -236
  90. package/dist/testnet/utils.d.ts +0 -4
  91. package/dist/testnet/wasm.d.ts +0 -1
  92. package/dist/testnet/worker.d.ts +0 -9
  93. package/dist/testnet/worker.js +0 -78
  94. package/dist/testnet/worker.js.map +0 -1
@@ -1,17 +0,0 @@
1
- /**
2
- * Aleo function Input represented as a typed typescript object.
3
- */
4
- import { Field, Ciphertext, Plaintext } from "@provablehq/wasm";
5
- import { PlaintextObject } from "../plaintext/plaintext";
6
- /**
7
- * Object representation of an Input as raw JSON returned from a SnarkOS node.
8
- */
9
- export type OutputObject = {
10
- type: string;
11
- id: string | Field;
12
- value?: Ciphertext | Plaintext | PlaintextObject;
13
- checksum?: string | Field;
14
- programId?: string;
15
- functionName?: string;
16
- arguments?: Array<Plaintext> | Array<OutputObject>;
17
- };
@@ -1,3 +0,0 @@
1
- import { PlaintextLiteral } from "./literal";
2
- import { PlaintextStruct } from "./struct";
3
- export type PlaintextArray = PlaintextLiteral[] | PlaintextStruct[] | PlaintextArray[];
@@ -1 +0,0 @@
1
- export type PlaintextLiteral = boolean | bigint | number | string;
@@ -1,4 +0,0 @@
1
- import { PlaintextArray } from "./array";
2
- import { PlaintextLiteral } from "./literal";
3
- import { PlaintextStruct } from "./struct";
4
- export type PlaintextObject = PlaintextArray | PlaintextLiteral | PlaintextStruct;
@@ -1,5 +0,0 @@
1
- import { PlaintextArray } from "./array";
2
- import { PlaintextLiteral } from "./literal";
3
- export type PlaintextStruct = {
4
- [key: string]: PlaintextArray | PlaintextLiteral | PlaintextStruct;
5
- };
@@ -1,6 +0,0 @@
1
- import { ExecutionJSON } from "../executionJSON";
2
- export type TransactionJSON = {
3
- type: string;
4
- id: string;
5
- execution: ExecutionJSON;
6
- };
@@ -1,11 +0,0 @@
1
- import { TransitionObject } from "../transition/transitionObject";
2
- import { DeploymentMetadata } from "../deploy";
3
- export type TransactionSummary = {
4
- id: string;
5
- type: string;
6
- fee: bigint;
7
- baseFee: bigint;
8
- priorityFee: bigint;
9
- transitions: TransitionObject[];
10
- deployment?: DeploymentMetadata;
11
- };
@@ -1,13 +0,0 @@
1
- import { InputJSON } from "../input/inputJSON";
2
- import { OutputJSON } from "../output/outputJSON";
3
- export type TransitionJSON = {
4
- id: string;
5
- program: string;
6
- function: string;
7
- inputs?: (InputJSON)[];
8
- outputs?: (OutputJSON)[];
9
- proof: string;
10
- tpk: string;
11
- tcm: string;
12
- fee: bigint;
13
- };
@@ -1,15 +0,0 @@
1
- import { InputObject } from "../input/inputObject";
2
- import { OutputObject } from "../output/outputObject";
3
- import { Field, Group } from "@provablehq/wasm";
4
- export type TransitionObject = {
5
- id: string;
6
- program: string;
7
- functionName: string;
8
- inputs?: (InputObject)[];
9
- outputs?: (OutputObject)[];
10
- proof: string;
11
- tpk: string | Group;
12
- tcm: string | Field;
13
- scm: string | Field;
14
- fee: bigint;
15
- };
@@ -1,359 +0,0 @@
1
- import { Account } from "./account";
2
- import { BlockJSON } from "./models/blockJSON";
3
- import { TransactionJSON } from "./models/transaction/transactionJSON";
4
- import { Plaintext, Program, RecordPlaintext, PrivateKey, Transaction } from "./wasm";
5
- type ProgramImports = {
6
- [key: string]: string | Program;
7
- };
8
- interface AleoNetworkClientOptions {
9
- headers?: {
10
- [key: string]: string;
11
- };
12
- }
13
- /**
14
- * Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this
15
- * allow users to query public information from the Aleo blockchain and submit transactions to the network.
16
- *
17
- * @param {string} host
18
- * @example
19
- * // Connection to a local node
20
- * const localNetworkClient = new AleoNetworkClient("http://localhost:3030");
21
- *
22
- * // Connection to a public beacon node
23
- * const publicnetworkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
24
- */
25
- declare class AleoNetworkClient {
26
- host: string;
27
- headers: {
28
- [key: string]: string;
29
- };
30
- account: Account | undefined;
31
- constructor(host: string, options?: AleoNetworkClientOptions);
32
- /**
33
- * Set an account to use in networkClient calls
34
- *
35
- * @param {Account} account
36
- * @example
37
- * const account = new Account();
38
- * networkClient.setAccount(account);
39
- */
40
- setAccount(account: Account): void;
41
- /**
42
- * Return the Aleo account used in the networkClient
43
- *
44
- * @example
45
- * const account = networkClient.getAccount();
46
- */
47
- getAccount(): Account | undefined;
48
- /**
49
- * Set a new host for the networkClient
50
- *
51
- * @param {string} host The address of a node hosting the Aleo API
52
- * @param host
53
- */
54
- setHost(host: string): void;
55
- fetchData<Type>(url?: string): Promise<Type>;
56
- /**
57
- * Attempts to find unspent records in the Aleo blockchain for a specified private key.
58
- * @param {number} startHeight - The height at which to start searching for unspent records
59
- * @param {number} endHeight - The height at which to stop searching for unspent records
60
- * @param {string | PrivateKey} privateKey - The private key to use to find unspent records
61
- * @param {number[]} amounts - The amounts (in microcredits) to search for (eg. [100, 200, 3000])
62
- * @param {number} maxMicrocredits - The maximum number of microcredits to search for
63
- * @param {string[]} nonces - The nonces of already found records to exclude from the search
64
- *
65
- * @example
66
- * // Find all unspent records
67
- * const privateKey = "[PRIVATE_KEY]";
68
- * const records = networkClient.findUnspentRecords(0, undefined, privateKey);
69
- *
70
- * // Find specific amounts
71
- * const startHeight = 500000;
72
- * const amounts = [600000, 1000000];
73
- * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, amounts);
74
- *
75
- * // Find specific amounts with a maximum number of cumulative microcredits
76
- * const maxMicrocredits = 100000;
77
- * const records = networkClient.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);
78
- */
79
- findUnspentRecords(startHeight: number, endHeight: number | undefined, privateKey: string | PrivateKey | undefined, amounts: number[] | undefined, maxMicrocredits?: number | undefined, nonces?: string[] | undefined): Promise<Array<RecordPlaintext>>;
80
- /**
81
- * Returns the contents of the block at the specified block height.
82
- *
83
- * @param {number} height
84
- * @example
85
- * const block = networkClient.getBlock(1234);
86
- */
87
- getBlock(height: number): Promise<BlockJSON>;
88
- /**
89
- * Returns a range of blocks between the specified block heights.
90
- *
91
- * @param {number} start
92
- * @param {number} end
93
- * @example
94
- * const blockRange = networkClient.getBlockRange(2050, 2100);
95
- */
96
- getBlockRange(start: number, end: number): Promise<Array<BlockJSON>>;
97
- /**
98
- * Returns the deployment transaction id associated with the specified program.
99
- *
100
- * @param {Program | string} program
101
- * @returns {TransactionJSON}
102
- */
103
- getDeploymentTransactionIDForProgram(program: Program | string): Promise<string>;
104
- /**
105
- * Returns the deployment transaction associated with a specified program.
106
- *
107
- * @param {Program | string} program
108
- * @returns {TransactionJSON}
109
- */
110
- getDeploymentTransactionForProgram(program: Program | string): Promise<TransactionJSON>;
111
- /**
112
- * Returns the deployment transaction associated with a specified program as a wasm object.
113
- *
114
- * @param {Program | string} program
115
- * @returns {TransactionJSON}
116
- */
117
- getDeploymentTransactioObjectnForProgram(program: Program | string): Promise<Transaction>;
118
- /**
119
- * Returns the contents of the latest block.
120
- *
121
- * @example
122
- * const latestHeight = networkClient.getLatestBlock();
123
- */
124
- getLatestBlock(): Promise<BlockJSON>;
125
- /**
126
- * Returns the latest committee.
127
- *
128
- * @returns {Promise<object>} A javascript object containing the latest committee
129
- */
130
- getLatestCommittee(): Promise<object>;
131
- /**
132
- * Returns the latest block height.
133
- *
134
- * @example
135
- * const latestHeight = networkClient.getLatestHeight();
136
- */
137
- getLatestHeight(): Promise<number>;
138
- /**
139
- * Returns the source code of a program given a program ID.
140
- *
141
- * @param {string} programId The program ID of a program deployed to the Aleo Network
142
- * @return {Promise<string>} Source code of the program
143
- *
144
- * @example
145
- * const program = networkClient.getProgram("hello_hello.aleo");
146
- * const expectedSource = "program hello_hello.aleo;\n\nfunction hello:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n"
147
- * assert.equal(program, expectedSource);
148
- */
149
- getProgram(programId: string): Promise<string>;
150
- /**
151
- * Returns a program object from a program ID or program source code.
152
- *
153
- * @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network
154
- * @return {Promise<Program>} Source code of the program
155
- *
156
- * @example
157
- * const programID = "hello_hello.aleo";
158
- * const programSource = "program hello_hello.aleo;\n\nfunction hello:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n"
159
- *
160
- * // Get program object from program ID or program source code
161
- * const programObjectFromID = await networkClient.getProgramObject(programID);
162
- * const programObjectFromSource = await networkClient.getProgramObject(programSource);
163
- *
164
- * // Both program objects should be equal
165
- * assert.equal(programObjectFromID.to_string(), programObjectFromSource.to_string());
166
- */
167
- getProgramObject(inputProgram: string): Promise<Program>;
168
- /**
169
- * Returns an object containing the source code of a program and the source code of all programs it imports
170
- *
171
- * @param {Program | string} inputProgram The program ID or program source code of a program deployed to the Aleo Network
172
- * @returns {Promise<ProgramImports>} Object of the form { "program_id": "program_source", .. } containing program id & source code for all program imports
173
- *
174
- * @example
175
- * const double_test_source = "import multiply_test.aleo;\n\nprogram double_test.aleo;\n\nfunction double_it:\n input r0 as u32.private;\n call multiply_test.aleo/multiply 2u32 r0 into r1;\n output r1 as u32.private;\n"
176
- * const double_test = Program.fromString(double_test_source);
177
- * const expectedImports = {
178
- * "multiply_test.aleo": "program multiply_test.aleo;\n\nfunction multiply:\n input r0 as u32.public;\n input r1 as u32.private;\n mul r0 r1 into r2;\n output r2 as u32.private;\n"
179
- * }
180
- *
181
- * // Imports can be fetched using the program ID, source code, or program object
182
- * let programImports = await networkClient.getProgramImports("double_test.aleo");
183
- * assert.deepStrictEqual(programImports, expectedImports);
184
- *
185
- * // Using the program source code
186
- * programImports = await networkClient.getProgramImports(double_test_source);
187
- * assert.deepStrictEqual(programImports, expectedImports);
188
- *
189
- * // Using the program object
190
- * programImports = await networkClient.getProgramImports(double_test);
191
- * assert.deepStrictEqual(programImports, expectedImports);
192
- */
193
- getProgramImports(inputProgram: Program | string): Promise<ProgramImports>;
194
- /**
195
- * Get a list of the program names that a program imports.
196
- *
197
- * @param {Program | string} inputProgram - The program id or program source code to get the imports of
198
- * @returns {string[]} - The list of program names that the program imports
199
- *
200
- * @example
201
- * const programImportsNames = networkClient.getProgramImports("double_test.aleo");
202
- * const expectedImportsNames = ["multiply_test.aleo"];
203
- * assert.deepStrictEqual(programImportsNames, expectedImportsNames);
204
- */
205
- getProgramImportNames(inputProgram: Program | string): Promise<string[]>;
206
- /**
207
- * Returns the names of the mappings of a program.
208
- *
209
- * @param {string} programId - The program ID to get the mappings of (e.g. "credits.aleo")
210
- * @example
211
- * const mappings = networkClient.getProgramMappingNames("credits.aleo");
212
- * const expectedMappings = ["account"];
213
- * assert.deepStrictEqual(mappings, expectedMappings);
214
- */
215
- getProgramMappingNames(programId: string): Promise<Array<string>>;
216
- /**
217
- * Returns the value of a program's mapping for a specific key.
218
- *
219
- * @param {string} programId - The program ID to get the mapping value of (e.g. "credits.aleo")
220
- * @param {string} mappingName - The name of the mapping to get the value of (e.g. "account")
221
- * @param {string | Plaintext} key - The key of the mapping to get the value of (e.g. "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px")
222
- * @return {Promise<string>} String representation of the value of the mapping
223
- *
224
- * @example
225
- * // Get public balance of an account
226
- * const mappingValue = networkClient.getMappingValue("credits.aleo", "account", "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px");
227
- * const expectedValue = "0u64";
228
- * assert.equal(mappingValue, expectedValue);
229
- */
230
- getProgramMappingValue(programId: string, mappingName: string, key: string | Plaintext): Promise<string>;
231
- /**
232
- * Returns the value of a mapping as a wasm Plaintext object. Returning an
233
- * object in this format allows it to be converted to a Js type and for its
234
- * internal members to be inspected if it's a struct or array.
235
- *
236
- * @example
237
- * // Get the bond state as an account.
238
- * const unbondedState = networkClient.getMappingPlaintext("credits.aleo", "bonded", "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px");
239
- *
240
- * // Get the two members of the object individually.
241
- * const validator = unbondedState.getMember("validator");
242
- * const microcredits = unbondedState.getMember("microcredits");
243
- *
244
- * // Ensure the expected values are correct.
245
- * assert.equal(validator, "aleo1u6940v5m0fzud859xx2c9tj2gjg6m5qrd28n636e6fdd2akvfcgqs34mfd");
246
- * assert.equal(microcredits, BigInt("9007199254740991"));
247
- *
248
- * // Get a JS object representation of the unbonded state.
249
- * const unbondedStateObject = unbondedState.toObject();
250
- *
251
- * const expectedState = {
252
- * validator: "aleo1u6940v5m0fzud859xx2c9tj2gjg6m5qrd28n636e6fdd2akvfcgqs34mfd",
253
- * microcredits: BigInt("9007199254740991")
254
- * };
255
- * assert.equal(unbondedState, expectedState);
256
- *
257
- * @param {string} programId - The program ID to get the mapping value of (e.g. "credits.aleo")
258
- * @param {string} mappingName - The name of the mapping to get the value of (e.g. "account")
259
- * @param {string | Plaintext} key - The key of the mapping to get the value of (e.g. "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px")
260
- *
261
- * @return {Promise<string>} String representation of the value of the mapping
262
- */
263
- getProgramMappingPlaintext(programId: string, mappingName: string, key: string | Plaintext): Promise<Plaintext>;
264
- /**
265
- * Returns the latest state/merkle root of the Aleo blockchain.
266
- *
267
- * @example
268
- * const stateRoot = networkClient.getStateRoot();
269
- */
270
- getStateRoot(): Promise<string>;
271
- /**
272
- * Returns a transaction by its unique identifier.
273
- *
274
- * @param {string} id
275
- * @example
276
- * const transaction = networkClient.getTransaction("at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj");
277
- */
278
- getTransaction(transactionId: string): Promise<TransactionJSON>;
279
- /**
280
- * Returns a transaction as a wasm object. Getting a transaction of this type will allow the ability for the inputs,
281
- * outputs, and records to be searched for and displayed.
282
- *
283
- * @example
284
- * const transactionObject = networkClient.getTransaction("at1handz9xjrqeynjrr0xay4pcsgtnczdksz3e584vfsgaz0dh0lyxq43a4wj");
285
- * // Get the transaction inputs as a JS array.
286
- * const transactionOutputs = transactionObject.inputs(true);
287
- *
288
- * // Get the transaction outputs as a JS object.
289
- * const transactionInputs = transactionObject.outputs(true);
290
- *
291
- * // Get any records generated in transitions in the transaction as a JS object.
292
- * const records = transactionObject.records();
293
- *
294
- * // Get the transaction type.
295
- * const transactionType = transactionObject.transactionType();
296
- * assert.equal(transactionType, "Execute");
297
- *
298
- * // Get a JS representation of all inputs, outputs, and transaction metadata.
299
- * const transactionSummary = transactionObject.summary();
300
- *
301
- * @param {string} transactionId
302
- * @example
303
- */
304
- getTransactionObject(transactionId: string): Promise<Transaction>;
305
- /**
306
- * Returns the transactions present at the specified block height.
307
- *
308
- * @param {number} height
309
- * @example
310
- * const transactions = networkClient.getTransactions(654);
311
- */
312
- getTransactions(height: number): Promise<Array<TransactionJSON>>;
313
- /**
314
- * Returns an array of transactions as wasm objects present at the specified block height.
315
- *
316
- * @param {number} height
317
- * @example
318
- * const transactions = networkClient.getTransactionObjects(654);
319
- *
320
- * let transaction_summaries = transactions.map(transaction => transaction.summary());
321
- */
322
- getTransactionObjects(height: number): Promise<Array<Transaction>>;
323
- /**
324
- * Returns the transactions in the memory pool.
325
- *
326
- * @example
327
- * const transactions = networkClient.getTransactionsInMempool();
328
- */
329
- getTransactionsInMempool(): Promise<Array<TransactionJSON>>;
330
- /**
331
- * Returns the transactions in the memory pool as wasm objects.
332
- *
333
- * @example
334
- * const transactions = networkClient.getTransactionsInMempool();
335
- */
336
- getTransactionObjectsInMempool(): Promise<Array<Transaction>>;
337
- /**
338
- * Returns the transition ID of the transition corresponding to the ID of the input or output.
339
- * @param {string} inputOrOutputID - ID of the input or output.
340
- *
341
- * @example
342
- * const transitionId = networkClient.getTransitionId("2429232855236830926144356377868449890830704336664550203176918782554219952323field");
343
- */
344
- getTransitionId(inputOrOutputID: string): Promise<string>;
345
- /**
346
- * Submit an execute or deployment transaction to the Aleo network.
347
- *
348
- * @param {Transaction | string} transaction - The transaction to submit to the network
349
- * @returns {string} - The transaction id of the submitted transaction or the resulting error
350
- */
351
- submitTransaction(transaction: Transaction | string): Promise<string>;
352
- /**
353
- * Submit a solution to the Aleo network.
354
- *
355
- * @param {string} solution The string representation of the solution desired to be submitted to the network.
356
- */
357
- submitSolution(solution: string): Promise<string>;
358
- }
359
- export { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports };
@@ -1,5 +0,0 @@
1
- import "./polyfill/shared";
2
- import "./polyfill/crypto";
3
- import "./polyfill/fetch";
4
- import "./polyfill/xmlhttprequest";
5
- import "./polyfill/worker";