@provablehq/sdk 0.10.5 → 0.10.6-rc.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/dist/mainnet/browser.cjs +927 -357
- package/dist/mainnet/browser.cjs.map +1 -1
- package/dist/mainnet/browser.d.cts +6 -4
- package/dist/mainnet/browser.d.ts +6 -4
- package/dist/mainnet/browser.js +923 -364
- package/dist/mainnet/browser.js.map +1 -1
- package/dist/mainnet/keys/keystore/indexeddb.d.cts +49 -0
- package/dist/mainnet/keys/keystore/indexeddb.d.ts +49 -0
- package/dist/mainnet/keys/provider/memory.d.cts +1 -1
- package/dist/mainnet/keys/provider/memory.d.ts +1 -1
- package/dist/mainnet/models/record-scanner/error.d.cts +1 -1
- package/dist/mainnet/models/record-scanner/error.d.ts +1 -1
- package/dist/mainnet/models/record-scanner/registrationResult.d.cts +1 -1
- package/dist/mainnet/models/record-scanner/registrationResult.d.ts +1 -1
- package/dist/mainnet/network-client.d.cts +17 -1
- package/dist/mainnet/network-client.d.ts +17 -1
- package/dist/mainnet/node.cjs +11 -0
- package/dist/mainnet/node.cjs.map +1 -1
- package/dist/mainnet/node.js +2 -2
- package/dist/mainnet/program-manager.d.cts +61 -1
- package/dist/mainnet/program-manager.d.ts +61 -1
- package/dist/mainnet/record-scanner.d.cts +2 -10
- package/dist/mainnet/record-scanner.d.ts +2 -10
- package/dist/mainnet/utils/index.d.cts +3 -0
- package/dist/mainnet/utils/index.d.ts +3 -0
- package/dist/mainnet/utils/logger.d.cts +30 -0
- package/dist/mainnet/utils/logger.d.ts +30 -0
- package/dist/mainnet/wasm.d.cts +1 -1
- package/dist/mainnet/wasm.d.ts +1 -1
- package/dist/testnet/browser.cjs +927 -357
- package/dist/testnet/browser.cjs.map +1 -1
- package/dist/testnet/browser.d.cts +6 -4
- package/dist/testnet/browser.d.ts +6 -4
- package/dist/testnet/browser.js +923 -364
- package/dist/testnet/browser.js.map +1 -1
- package/dist/testnet/keys/keystore/indexeddb.d.cts +49 -0
- package/dist/testnet/keys/keystore/indexeddb.d.ts +49 -0
- package/dist/testnet/keys/provider/memory.d.cts +1 -1
- package/dist/testnet/keys/provider/memory.d.ts +1 -1
- package/dist/testnet/models/record-scanner/error.d.cts +1 -1
- package/dist/testnet/models/record-scanner/error.d.ts +1 -1
- package/dist/testnet/models/record-scanner/registrationResult.d.cts +1 -1
- package/dist/testnet/models/record-scanner/registrationResult.d.ts +1 -1
- package/dist/testnet/network-client.d.cts +17 -1
- package/dist/testnet/network-client.d.ts +17 -1
- package/dist/testnet/node.cjs +11 -0
- package/dist/testnet/node.cjs.map +1 -1
- package/dist/testnet/node.js +2 -2
- package/dist/testnet/program-manager.d.cts +61 -1
- package/dist/testnet/program-manager.d.ts +61 -1
- package/dist/testnet/record-scanner.d.cts +2 -10
- package/dist/testnet/record-scanner.d.ts +2 -10
- package/dist/testnet/utils/index.d.cts +3 -0
- package/dist/testnet/utils/index.d.ts +3 -0
- package/dist/testnet/utils/logger.d.cts +30 -0
- package/dist/testnet/utils/logger.d.ts +30 -0
- package/dist/testnet/wasm.d.cts +1 -1
- package/dist/testnet/wasm.d.ts +1 -1
- package/package.json +2 -2
- package/dist/mainnet/models/record-scanner/registrationRequest.d.cts +0 -13
- package/dist/mainnet/models/record-scanner/registrationRequest.d.ts +0 -13
- package/dist/testnet/models/record-scanner/registrationRequest.d.cts +0 -13
- package/dist/testnet/models/record-scanner/registrationRequest.d.ts +0 -13
- /package/dist/mainnet/{utils.d.cts → utils/utils.d.cts} +0 -0
- /package/dist/mainnet/{utils.d.ts → utils/utils.d.ts} +0 -0
- /package/dist/testnet/{utils.d.cts → utils/utils.d.cts} +0 -0
- /package/dist/testnet/{utils.d.ts → utils/utils.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransportFunction } from "./utils.js";
|
|
1
|
+
import { TransportFunction } from "./utils/utils.js";
|
|
2
2
|
import { EncryptedRecord } from "./models/record-provider/encryptedRecord.js";
|
|
3
3
|
import { CryptoBoxPubKey } from "./models/cryptoBoxPubkey.js";
|
|
4
4
|
import { OwnedFilter } from "./models/record-scanner/ownedFilter.js";
|
|
@@ -62,7 +62,7 @@ export interface RecordScannerOptions {
|
|
|
62
62
|
* const recordScanner = new RecordScanner({ url: "https://record-scanner.aleo.org" });
|
|
63
63
|
* recordScanner.setAccount(account);
|
|
64
64
|
* recordScanner.setApiKey("example-api-key");
|
|
65
|
-
* const result = await recordScanner.
|
|
65
|
+
* const result = await recordScanner.registerEncrypted(viewKey, 0);
|
|
66
66
|
* if (result.ok) { const uuid = result.data.uuid; }
|
|
67
67
|
*
|
|
68
68
|
* const filter = {
|
|
@@ -200,14 +200,6 @@ declare class RecordScanner implements RecordProvider {
|
|
|
200
200
|
* @throws Re-throws err when it is not a RecordScannerRequestError.
|
|
201
201
|
*/
|
|
202
202
|
private handleRequestError;
|
|
203
|
-
/**
|
|
204
|
-
* Register the account with the record scanning service (unencrypted POST /register). Does not throw if a valid error response from the record scanner is received; returns a result object instead.
|
|
205
|
-
*
|
|
206
|
-
* @param {ViewKey} viewKey The view key to register.
|
|
207
|
-
* @param {number} startBlock The block height to start scanning from.
|
|
208
|
-
* @returns {Promise<RegisterResult>} `{ ok: true, data }` on success, or `{ ok: false, status, error }` on failure.
|
|
209
|
-
*/
|
|
210
|
-
register(viewKey: ViewKey, startBlock: number): Promise<RegisterResult>;
|
|
211
203
|
/**
|
|
212
204
|
* Fetches an ephemeral public key from the record scanning service for use with registerEncrypted.
|
|
213
205
|
* Follows the same pattern as the delegated proving service /pubkey endpoint.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Log levels in ascending severity. Each level includes all levels above it.
|
|
3
|
+
* "silent" suppresses all output. "debug" enables everything.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { setLogLevel } from "@provablehq/sdk";
|
|
7
|
+
* setLogLevel("silent"); // suppress all SDK logging
|
|
8
|
+
*/
|
|
9
|
+
export type LogLevel = "silent" | "error" | "warn" | "info" | "debug";
|
|
10
|
+
/**
|
|
11
|
+
* Set the SDK log level. Levels are hierarchical:
|
|
12
|
+
* - "silent" — suppress all SDK logging
|
|
13
|
+
* - "error" — only errors
|
|
14
|
+
* - "warn" — errors + warnings
|
|
15
|
+
* - "info" — errors + warnings + info (default)
|
|
16
|
+
* - "debug" — everything including debug traces
|
|
17
|
+
*/
|
|
18
|
+
export declare function setLogLevel(level: LogLevel): void;
|
|
19
|
+
/** Returns the current SDK log level. */
|
|
20
|
+
export declare function getLogLevel(): LogLevel;
|
|
21
|
+
/**
|
|
22
|
+
* SDK logger object following console.log/warn/error/debug syntax.
|
|
23
|
+
* Respects the current log level set via setLogLevel().
|
|
24
|
+
*/
|
|
25
|
+
export declare const logger: {
|
|
26
|
+
log(...args: unknown[]): void;
|
|
27
|
+
warn(...args: unknown[]): void;
|
|
28
|
+
error(...args: unknown[]): void;
|
|
29
|
+
debug(...args: unknown[]): void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Log levels in ascending severity. Each level includes all levels above it.
|
|
3
|
+
* "silent" suppresses all output. "debug" enables everything.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { setLogLevel } from "@provablehq/sdk";
|
|
7
|
+
* setLogLevel("silent"); // suppress all SDK logging
|
|
8
|
+
*/
|
|
9
|
+
export type LogLevel = "silent" | "error" | "warn" | "info" | "debug";
|
|
10
|
+
/**
|
|
11
|
+
* Set the SDK log level. Levels are hierarchical:
|
|
12
|
+
* - "silent" — suppress all SDK logging
|
|
13
|
+
* - "error" — only errors
|
|
14
|
+
* - "warn" — errors + warnings
|
|
15
|
+
* - "info" — errors + warnings + info (default)
|
|
16
|
+
* - "debug" — everything including debug traces
|
|
17
|
+
*/
|
|
18
|
+
export declare function setLogLevel(level: LogLevel): void;
|
|
19
|
+
/** Returns the current SDK log level. */
|
|
20
|
+
export declare function getLogLevel(): LogLevel;
|
|
21
|
+
/**
|
|
22
|
+
* SDK logger object following console.log/warn/error/debug syntax.
|
|
23
|
+
* Respects the current log level set via setLogLevel().
|
|
24
|
+
*/
|
|
25
|
+
export declare const logger: {
|
|
26
|
+
log(...args: unknown[]): void;
|
|
27
|
+
warn(...args: unknown[]): void;
|
|
28
|
+
error(...args: unknown[]): void;
|
|
29
|
+
debug(...args: unknown[]): void;
|
|
30
|
+
};
|
package/dist/mainnet/wasm.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, DynamicRecord, EncryptionToolkit, ExecutionRequest, Execution, ExecutionResponse, Field, GraphKey, Group, I8, I16, I32, I64, I128, CallbackQuery, OfflineQuery, QueryOption, Metadata, Pedersen64, Pedersen128, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, stringToField, Transaction, Transition, U8, U16, U32, U64, U128, Value, VerifyingKey, ViewKey, initThreadPool, getOrInitConsensusVersionTestHeights, snarkVerify, snarkVerifyBatch, verifyFunctionExecution, } from "@provablehq/wasm/mainnet.js";
|
|
1
|
+
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, DynamicRecord, EncryptionToolkit, ExecutionRequest, Execution, ExecutionResponse, Field, GraphKey, Group, I8, I16, I32, I64, I128, CallbackQuery, OfflineQuery, QueryOption, Metadata, Pedersen64, Pedersen128, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramImports as ProgramImportsBuilder, ProgramManager, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, stringToField, Transaction, Transition, U8, U16, U32, U64, U128, Value, VerifyingKey, ViewKey, initThreadPool, getOrInitConsensusVersionTestHeights, snarkVerify, snarkVerifyBatch, verifyFunctionExecution, } from "@provablehq/wasm/mainnet.js";
|
package/dist/mainnet/wasm.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, DynamicRecord, EncryptionToolkit, ExecutionRequest, Execution, ExecutionResponse, Field, GraphKey, Group, I8, I16, I32, I64, I128, CallbackQuery, OfflineQuery, QueryOption, Metadata, Pedersen64, Pedersen128, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, stringToField, Transaction, Transition, U8, U16, U32, U64, U128, Value, VerifyingKey, ViewKey, initThreadPool, getOrInitConsensusVersionTestHeights, snarkVerify, snarkVerifyBatch, verifyFunctionExecution, } from "@provablehq/wasm/mainnet.js";
|
|
1
|
+
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, DynamicRecord, EncryptionToolkit, ExecutionRequest, Execution, ExecutionResponse, Field, GraphKey, Group, I8, I16, I32, I64, I128, CallbackQuery, OfflineQuery, QueryOption, Metadata, Pedersen64, Pedersen128, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramImports as ProgramImportsBuilder, ProgramManager, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, stringToField, Transaction, Transition, U8, U16, U32, U64, U128, Value, VerifyingKey, ViewKey, initThreadPool, getOrInitConsensusVersionTestHeights, snarkVerify, snarkVerifyBatch, verifyFunctionExecution, } from "@provablehq/wasm/mainnet.js";
|