@provablehq/sdk 0.9.4 → 0.9.5
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 +1 -1
- package/dist/mainnet/browser.js +77 -25
- package/dist/mainnet/browser.js.map +1 -1
- package/dist/mainnet/network-client.d.ts +32 -5
- package/dist/mainnet/node.js +1 -1
- package/dist/mainnet/wasm.d.ts +1 -1
- package/dist/testnet/browser.d.ts +1 -1
- package/dist/testnet/browser.js +77 -25
- package/dist/testnet/browser.js.map +1 -1
- package/dist/testnet/network-client.d.ts +32 -5
- package/dist/testnet/node.js +1 -1
- package/dist/testnet/wasm.d.ts +1 -1
- package/package.json +2 -2
|
@@ -356,7 +356,17 @@ declare class AleoNetworkClient {
|
|
|
356
356
|
/**
|
|
357
357
|
* Returns the source code of a program given a program ID.
|
|
358
358
|
*
|
|
359
|
-
* @param {string} programId The program ID of a program deployed to the Aleo Network
|
|
359
|
+
* @param {string} programId The program ID of a program deployed to the Aleo Network.
|
|
360
|
+
* @param {number | undefined} edition The edition of the program to fetch. When this is undefined it will fetch the latest version.
|
|
361
|
+
* @returns {Promise<string>} The source code of the program.
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* import { AleoNetworkClient } from "@provablehq/sdk/mainnet.js";
|
|
365
|
+
*
|
|
366
|
+
* // Create a network client.
|
|
367
|
+
* const networkClient = new AleoNetworkClient("http://api.explorer.provable.com/v1", undefined);
|
|
368
|
+
*
|
|
369
|
+
* // Get the source code of a program.)
|
|
360
370
|
* @returns {Promise<string>} Source code of the program
|
|
361
371
|
*
|
|
362
372
|
* @example
|
|
@@ -369,12 +379,29 @@ declare class AleoNetworkClient {
|
|
|
369
379
|
* 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"
|
|
370
380
|
* assert.equal(program, expectedSource);
|
|
371
381
|
*/
|
|
372
|
-
getProgram(programId: string): Promise<string>;
|
|
382
|
+
getProgram(programId: string, edition?: number): Promise<string>;
|
|
383
|
+
/**
|
|
384
|
+
* Returns the current program edition deployed on the Aleo network.
|
|
385
|
+
*
|
|
386
|
+
* @param {string} programId The program ID of a program deployed to the Aleo Network.
|
|
387
|
+
* @returns {Promise<number>} The edition of the program.
|
|
388
|
+
*
|
|
389
|
+
* @example
|
|
390
|
+
* import { AleoNetworkClient } from "@provablehq/sdk/mainnet.js";
|
|
391
|
+
*
|
|
392
|
+
* // Create a network client.
|
|
393
|
+
* const networkClient = new AleoNetworkClient("http://api.explorer.provable.com/v1", undefined);
|
|
394
|
+
*
|
|
395
|
+
* const programVersion = networkClient.getLatestProgramEdition("hello_hello.aleo");
|
|
396
|
+
* assert.equal(programVersion, 1);
|
|
397
|
+
*/
|
|
398
|
+
getLatestProgramEdition(programId: string): Promise<number>;
|
|
373
399
|
/**
|
|
374
400
|
* Returns a program object from a program ID or program source code.
|
|
375
401
|
*
|
|
376
|
-
* @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network
|
|
377
|
-
* @
|
|
402
|
+
* @param {string} inputProgram The program ID or program source code of a program deployed to the Aleo Network.
|
|
403
|
+
* @param {number | undefined} edition The edition of the program to fetch. When this is undefined it will fetch the latest version.
|
|
404
|
+
* @returns {Promise<Program>} Source code of the program.
|
|
378
405
|
*
|
|
379
406
|
* @example
|
|
380
407
|
* import { AleoNetworkClient } from "@provablehq/sdk/mainnet.js";
|
|
@@ -392,7 +419,7 @@ declare class AleoNetworkClient {
|
|
|
392
419
|
* // Both program objects should be equal
|
|
393
420
|
* assert(programObjectFromID.to_string() === programObjectFromSource.to_string());
|
|
394
421
|
*/
|
|
395
|
-
getProgramObject(inputProgram: string): Promise<Program>;
|
|
422
|
+
getProgramObject(inputProgram: string, edition?: number): Promise<Program>;
|
|
396
423
|
/**
|
|
397
424
|
* Returns an object containing the source code of a program and the source code of all programs it imports
|
|
398
425
|
*
|
package/dist/testnet/node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './node-polyfill.js';
|
|
2
2
|
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoNetworkClient, BlockHeightSearch, CREDITS_PROGRAM_KEYS, KEY_STORE, NetworkRecordProvider, OfflineKeyProvider, OfflineSearchParams, PRIVATE_TO_PUBLIC_TRANSFER, PRIVATE_TRANSFER, PRIVATE_TRANSFER_TYPES, PUBLIC_TO_PRIVATE_TRANSFER, PUBLIC_TRANSFER, PUBLIC_TRANSFER_AS_SIGNER, ProgramManager, VALID_TRANSFER_TYPES, initializeWasm, logAndThrow } from './browser.js';
|
|
3
|
-
export { Address, Authorization, BHP1024, BHP256, BHP512, BHP768, Boolean, Ciphertext, ComputeKey, EncryptionToolkit, ExecutionRequest, ExecutionResponse, Field, Execution as FunctionExecution, Group, OfflineQuery, Pedersen128, Pedersen64, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager as ProgramManagerBase, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, Transaction, Transition, VerifyingKey, ViewKey, initThreadPool, verifyFunctionExecution } from '@provablehq/wasm/testnet.js';
|
|
3
|
+
export { Address, Authorization, BHP1024, BHP256, BHP512, BHP768, Boolean, Ciphertext, ComputeKey, EncryptionToolkit, ExecutionRequest, ExecutionResponse, Field, Execution as FunctionExecution, Group, I128, I16, I32, I64, I8, OfflineQuery, Pedersen128, Pedersen64, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager as ProgramManagerBase, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, Transaction, Transition, U128, U16, U32, U64, U8, VerifyingKey, ViewKey, initThreadPool, verifyFunctionExecution } from '@provablehq/wasm/testnet.js';
|
|
4
4
|
import 'core-js/proposals/json-parse-with-source.js';
|
|
5
5
|
import 'node:crypto';
|
|
6
6
|
import 'node:fs';
|
package/dist/testnet/wasm.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, EncryptionToolkit, ExecutionRequest, Execution, ExecutionResponse, Field, Group, OfflineQuery, Metadata, Pedersen64, Pedersen128, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, Transaction, Transition, VerifyingKey, ViewKey, initThreadPool, verifyFunctionExecution, } from "@provablehq/wasm/testnet.js";
|
|
1
|
+
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, EncryptionToolkit, ExecutionRequest, Execution, ExecutionResponse, Field, Group, I8, I16, I32, I64, I128, OfflineQuery, Metadata, Pedersen64, Pedersen128, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, Transaction, Transition, U8, U16, U32, U64, U128, VerifyingKey, ViewKey, initThreadPool, verifyFunctionExecution, } from "@provablehq/wasm/testnet.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@provablehq/sdk",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "A Software Development Kit (SDK) for Zero-Knowledge Transactions",
|
|
5
5
|
"collaborators": [
|
|
6
6
|
"The Provable Team"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://github.com/ProvableHQ/sdk#readme",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@provablehq/wasm": "^0.9.
|
|
50
|
+
"@provablehq/wasm": "^0.9.5",
|
|
51
51
|
"comlink": "^4.4.2",
|
|
52
52
|
"core-js": "^3.40.0",
|
|
53
53
|
"mime": "^4.0.6",
|