@provablehq/sdk 0.9.7 → 0.9.8
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.
|
@@ -12,6 +12,18 @@ interface AleoNetworkClientOptions {
|
|
|
12
12
|
[key: string]: string;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Options for submitting a proving request.
|
|
17
|
+
*
|
|
18
|
+
* @property provingRequest {ProvingRequest | string} The proving request being submitted to the network.
|
|
19
|
+
* @property url {string} The URL of the delegated proving service.
|
|
20
|
+
* @property apiKey {string} The API key to use for authentication.
|
|
21
|
+
*/
|
|
22
|
+
interface DelegatedProvingParams {
|
|
23
|
+
provingRequest: ProvingRequest | string;
|
|
24
|
+
url?: string;
|
|
25
|
+
apiKey?: string;
|
|
26
|
+
}
|
|
15
27
|
/**
|
|
16
28
|
* Client library that encapsulates REST calls to publicly exposed endpoints of Aleo nodes. The methods provided in this
|
|
17
29
|
* allow users to query public information from the Aleo blockchain and submit transactions to the network.
|
|
@@ -34,6 +46,7 @@ declare class AleoNetworkClient {
|
|
|
34
46
|
ctx: {
|
|
35
47
|
[key: string]: string;
|
|
36
48
|
};
|
|
49
|
+
verboseErrors: boolean;
|
|
37
50
|
readonly network: string;
|
|
38
51
|
constructor(host: string, options?: AleoNetworkClientOptions);
|
|
39
52
|
/**
|
|
@@ -59,7 +72,6 @@ declare class AleoNetworkClient {
|
|
|
59
72
|
* Set a new host for the networkClient
|
|
60
73
|
*
|
|
61
74
|
* @param {string} host The address of a node hosting the Aleo API
|
|
62
|
-
* @param host
|
|
63
75
|
*
|
|
64
76
|
* @example
|
|
65
77
|
* import { AleoNetworkClient } from "@provablehq/sdk/mainnet.js";
|
|
@@ -71,6 +83,20 @@ declare class AleoNetworkClient {
|
|
|
71
83
|
* networkClient.setHost("http://api.explorer.provable.com/v1");
|
|
72
84
|
*/
|
|
73
85
|
setHost(host: string): void;
|
|
86
|
+
/**
|
|
87
|
+
* Set verbose errors to true or false for the `AleoNetworkClient`. When set to true, if `submitTransaction` fails, the failure responses will report descriptive information as to why the transaction failed.
|
|
88
|
+
*
|
|
89
|
+
* @param {boolean} verboseErrors Set verbose error mode to true or false for the AleoNetworkClient.
|
|
90
|
+
* @example
|
|
91
|
+
* import { AleoNetworkClient } from "@provablehq/sdk/mainnet.js";
|
|
92
|
+
*
|
|
93
|
+
* // Create a networkClient
|
|
94
|
+
* const networkClient = new AleoNetworkClient();
|
|
95
|
+
*
|
|
96
|
+
* // Set debug mode to true
|
|
97
|
+
* networkClient.setVerboseTransactionErrors(true);
|
|
98
|
+
**/
|
|
99
|
+
setVerboseErrors(verboseErrors: boolean): void;
|
|
74
100
|
/**
|
|
75
101
|
* Set a header in the `AleoNetworkClient`s header map
|
|
76
102
|
*
|
|
@@ -711,11 +737,10 @@ declare class AleoNetworkClient {
|
|
|
711
737
|
/**
|
|
712
738
|
* Submit a `ProvingRequest` to a remote proving service for delegated proving. If the broadcast flag of the `ProvingRequest` is set to `true` the remote service will attempt to broadcast the result `Transaction` on behalf of the requestor.
|
|
713
739
|
*
|
|
714
|
-
* @param {
|
|
715
|
-
* @param {string} url - (Optional) The url of the proving service.
|
|
740
|
+
* @param {DelegatedProvingParams} options - The optional parameters required to submit a proving request.
|
|
716
741
|
* @returns {Promise<ProvingResponse>} The ProvingResponse containing the transaction result and the result of the broadcast if the `broadcast` flag was set to `true`.
|
|
717
742
|
*/
|
|
718
|
-
submitProvingRequest(
|
|
743
|
+
submitProvingRequest(options: DelegatedProvingParams): Promise<ProvingResponse>;
|
|
719
744
|
/**
|
|
720
745
|
* Await a submitted transaction to be confirmed or rejected on the Aleo network.
|
|
721
746
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@provablehq/sdk",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
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.8",
|
|
51
51
|
"comlink": "^4.4.2",
|
|
52
52
|
"core-js": "^3.40.0",
|
|
53
53
|
"mime": "^4.0.6",
|