@provablehq/sdk 0.10.0 → 0.10.2-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.d.ts +3 -2
- package/dist/mainnet/browser.js +911 -312
- package/dist/mainnet/browser.js.map +1 -1
- package/dist/mainnet/keys/keystore/indexeddb.d.ts +49 -0
- package/dist/mainnet/network-client.d.ts +16 -0
- package/dist/mainnet/node.js +2 -2
- package/dist/mainnet/program-manager.d.ts +82 -3
- package/dist/mainnet/wasm.d.ts +1 -1
- package/dist/testnet/browser.d.ts +3 -2
- package/dist/testnet/browser.js +911 -312
- package/dist/testnet/browser.js.map +1 -1
- package/dist/testnet/keys/keystore/indexeddb.d.ts +49 -0
- package/dist/testnet/network-client.d.ts +16 -0
- package/dist/testnet/node.js +2 -2
- package/dist/testnet/program-manager.d.ts +82 -3
- package/dist/testnet/wasm.d.ts +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FunctionKeyPair } from "../../models/keyPair.js";
|
|
2
|
+
import { KeyFingerprint } from "../verifier/interface.js";
|
|
3
|
+
import { KeyLocator, KeyStore, ProvingKeyLocator, VerifyingKeyLocator } from "./interface.js";
|
|
4
|
+
import { ProvingKey, VerifyingKey } from "../../wasm.js";
|
|
5
|
+
/**
|
|
6
|
+
* Browser-compatible {@link KeyStore} backed by IndexedDB.
|
|
7
|
+
*
|
|
8
|
+
* This is the browser counterpart to {@link LocalFileKeyStore} (which requires Node.js `fs`).
|
|
9
|
+
* It persists proving and verifying keys across page reloads and browser sessions using the
|
|
10
|
+
* IndexedDB API available in all modern browsers and Web Workers.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { IndexedDBKeyStore, ProgramManager } from "@provablehq/sdk";
|
|
15
|
+
*
|
|
16
|
+
* const keyStore = new IndexedDBKeyStore();
|
|
17
|
+
* const pm = new ProgramManager();
|
|
18
|
+
* pm.setKeyStore(keyStore);
|
|
19
|
+
* // Keys synthesized during execution are now cached in IndexedDB
|
|
20
|
+
* // and reloaded automatically on subsequent runs.
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class IndexedDBKeyStore implements KeyStore {
|
|
24
|
+
private readonly dbName;
|
|
25
|
+
private readonly storeName;
|
|
26
|
+
private readonly keyVerifier;
|
|
27
|
+
private dbPromise;
|
|
28
|
+
/**
|
|
29
|
+
* @param dbName IndexedDB database name. Defaults to `"aleo-keystore"`.
|
|
30
|
+
*/
|
|
31
|
+
constructor(dbName?: string);
|
|
32
|
+
/** Opens (or creates) the database, returning a cached promise. */
|
|
33
|
+
private openDB;
|
|
34
|
+
/** Runs a single read-write transaction and returns the request result. */
|
|
35
|
+
private tx;
|
|
36
|
+
private validateComponent;
|
|
37
|
+
private validateNonNegative;
|
|
38
|
+
private serializeLocator;
|
|
39
|
+
private checksumToFingerprint;
|
|
40
|
+
getKeyBytes(locator: KeyLocator): Promise<Uint8Array | null>;
|
|
41
|
+
getProvingKey(locator: ProvingKeyLocator): Promise<ProvingKey | null>;
|
|
42
|
+
getVerifyingKey(locator: VerifyingKeyLocator): Promise<VerifyingKey | null>;
|
|
43
|
+
setKeys(proverLocator: ProvingKeyLocator, verifierLocator: VerifyingKeyLocator, keys: FunctionKeyPair): Promise<void>;
|
|
44
|
+
setKeyBytes(keyBytes: Uint8Array, locator: KeyLocator): Promise<void>;
|
|
45
|
+
getKeyMetadata(locator: KeyLocator): Promise<KeyFingerprint | null>;
|
|
46
|
+
has(locator: KeyLocator): Promise<boolean>;
|
|
47
|
+
delete(locator: KeyLocator): Promise<void>;
|
|
48
|
+
clear(): Promise<void>;
|
|
49
|
+
}
|
|
@@ -478,6 +478,22 @@ declare class AleoNetworkClient {
|
|
|
478
478
|
* assert.equal(programVersion, 1);
|
|
479
479
|
*/
|
|
480
480
|
getLatestProgramEdition(programId: string): Promise<number>;
|
|
481
|
+
/**
|
|
482
|
+
* Returns the current edition and amendment count for a program.
|
|
483
|
+
*
|
|
484
|
+
* @param {string} programId - The program ID (e.g. "hello_hello.aleo")
|
|
485
|
+
* @returns {{ program_id: string, edition: number, amendment_count: number }}
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
|
|
489
|
+
* const info = await networkClient.getProgramAmendmentCount("hello_hello.aleo");
|
|
490
|
+
* console.log(info.edition, info.amendment_count);
|
|
491
|
+
*/
|
|
492
|
+
getProgramAmendmentCount(programId: string): Promise<{
|
|
493
|
+
program_id: string;
|
|
494
|
+
edition: number;
|
|
495
|
+
amendment_count: number;
|
|
496
|
+
}>;
|
|
481
497
|
/**
|
|
482
498
|
* Returns a program object from a program ID or program source code.
|
|
483
499
|
*
|
package/dist/mainnet/node.js
CHANGED
|
@@ -3,9 +3,9 @@ import * as fs from 'node:fs/promises';
|
|
|
3
3
|
import * as $fs from 'node:fs';
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import { MemKeyVerifier, InvalidLocatorError } from './browser.js';
|
|
6
|
-
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoNetworkClient, BlockHeightSearch, CREDITS_PROGRAM_KEYS, ChecksumMismatchError, DecryptionNotEnabledError, KEY_STORE, ChecksumMismatchError as KeyVerificationError, NetworkRecordProvider, OfflineKeyProvider, OfflineSearchParams, PRIVATE_TO_PUBLIC_TRANSFER, PRIVATE_TRANSFER, PRIVATE_TRANSFER_TYPES, PUBLIC_TO_PRIVATE_TRANSFER, PUBLIC_TRANSFER, PUBLIC_TRANSFER_AS_SIGNER, ProgramManager, RECORD_DOMAIN, RecordNotFoundError, RecordScanner, RecordScannerRequestError, SealanceMerkleTree, UUIDError, VALID_TRANSFER_TYPES, ViewKeyNotStoredError, buildExecutionRequestFromExternallySignedData, computeExternalSigningInputs, encryptAuthorization, encryptProvingRequest, encryptRegistrationRequest, encryptViewKey, initializeWasm, inputsToFields, isInputIdStrategy, isProveApiErrorBody, isProvingResponse, isRecordViewKeyStrategy, isViewKeyStrategy, logAndThrow, provingKeyLocator, sha256Hex, toAddress, toField, toGroup, toSignature, toViewKey, translationKeyLocator, verifyBatchProof, verifyProof, verifyingKeyLocator, zeroizeBytes } from './browser.js';
|
|
6
|
+
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoNetworkClient, BlockHeightSearch, CREDITS_PROGRAM_KEYS, ChecksumMismatchError, DecryptionNotEnabledError, IndexedDBKeyStore, KEY_STORE, ChecksumMismatchError as KeyVerificationError, NetworkRecordProvider, OfflineKeyProvider, OfflineSearchParams, PRIVATE_TO_PUBLIC_TRANSFER, PRIVATE_TRANSFER, PRIVATE_TRANSFER_TYPES, PUBLIC_TO_PRIVATE_TRANSFER, PUBLIC_TRANSFER, PUBLIC_TRANSFER_AS_SIGNER, ProgramManager, RECORD_DOMAIN, RecordNotFoundError, RecordScanner, RecordScannerRequestError, SealanceMerkleTree, UUIDError, VALID_TRANSFER_TYPES, ViewKeyNotStoredError, buildExecutionRequestFromExternallySignedData, computeExternalSigningInputs, encryptAuthorization, encryptProvingRequest, encryptRegistrationRequest, encryptViewKey, initializeWasm, inputsToFields, isInputIdStrategy, isProveApiErrorBody, isProvingResponse, isRecordViewKeyStrategy, isViewKeyStrategy, logAndThrow, provingKeyLocator, sha256Hex, toAddress, toField, toGroup, toSignature, toViewKey, translationKeyLocator, verifyBatchProof, verifyProof, verifyingKeyLocator, zeroizeBytes } from './browser.js';
|
|
7
7
|
import { ProvingKey, VerifyingKey } from '@provablehq/wasm/mainnet.js';
|
|
8
|
-
export { Address, Authorization, BHP1024, BHP256, BHP512, BHP768, Boolean, Ciphertext, ComputeKey, EncryptionToolkit, ExecutionRequest, ExecutionResponse, Field, Execution as FunctionExecution, GraphKey, Group, I128, I16, I32, I64, I8, OfflineQuery, Pedersen128, Pedersen64, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager as ProgramManagerBase, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, Transaction, Transition, U128, U16, U32, U64, U8, Value, VerifyingKey, ViewKey, getOrInitConsensusVersionTestHeights, initThreadPool, snarkVerify, snarkVerifyBatch, stringToField, verifyFunctionExecution } from '@provablehq/wasm/mainnet.js';
|
|
8
|
+
export { Address, Authorization, BHP1024, BHP256, BHP512, BHP768, Boolean, Ciphertext, ComputeKey, DynamicRecord, EncryptionToolkit, ExecutionRequest, ExecutionResponse, Field, Execution as FunctionExecution, GraphKey, Group, I128, I16, I32, I64, I8, OfflineQuery, Pedersen128, Pedersen64, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramImports as ProgramImportsBuilder, ProgramManager as ProgramManagerBase, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, Transaction, Transition, U128, U16, U32, U64, U8, Value, VerifyingKey, ViewKey, getOrInitConsensusVersionTestHeights, initThreadPool, snarkVerify, snarkVerifyBatch, stringToField, verifyFunctionExecution } from '@provablehq/wasm/mainnet.js';
|
|
9
9
|
import 'core-js/proposals/json-parse-with-source.js';
|
|
10
10
|
import 'node:crypto';
|
|
11
11
|
import 'mime/lite';
|
|
@@ -4,6 +4,7 @@ import { ImportedPrograms, ImportedVerifyingKeys } from "./models/imports.js";
|
|
|
4
4
|
import { RecordProvider } from "./record-provider.js";
|
|
5
5
|
import { RecordSearchParams } from "./models/record-provider/recordSearchParams.js";
|
|
6
6
|
import { FunctionKeyProvider, KeySearchParams } from "./keys/provider/interface.js";
|
|
7
|
+
import { KeyStore } from "./keys/keystore/interface.js";
|
|
7
8
|
import { FunctionKeyPair } from "./models/keyPair.js";
|
|
8
9
|
import { Authorization, ExecutionRequest, ExecutionResponse, OfflineQuery, RecordPlaintext, PrivateKey, Program, ProvingKey, ProvingRequest, VerifyingKey, Transaction } from "./wasm.js";
|
|
9
10
|
import { ExternalSigningOptions } from "./models/external-signing.js";
|
|
@@ -120,6 +121,7 @@ interface ExecuteAuthorizationOptions {
|
|
|
120
121
|
offlineQuery?: OfflineQuery;
|
|
121
122
|
program?: string | Program;
|
|
122
123
|
imports?: ProgramImports;
|
|
124
|
+
edition?: number;
|
|
123
125
|
}
|
|
124
126
|
/**
|
|
125
127
|
* Represents the options for executing a transaction in the Aleo network.
|
|
@@ -213,13 +215,14 @@ declare class ProgramManager {
|
|
|
213
215
|
networkClient: AleoNetworkClient;
|
|
214
216
|
recordProvider: RecordProvider | undefined;
|
|
215
217
|
inclusionKeysLoaded: boolean;
|
|
218
|
+
private _keyStore;
|
|
216
219
|
/** Create a new instance of the ProgramManager
|
|
217
220
|
*
|
|
218
221
|
* @param { string | undefined } host A host uri running the official Aleo API
|
|
219
222
|
* @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface
|
|
220
223
|
* @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface
|
|
221
224
|
*/
|
|
222
|
-
constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined, networkClientOptions?: AleoNetworkClientOptions | undefined);
|
|
225
|
+
constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined, networkClientOptions?: AleoNetworkClientOptions | undefined, keyStore?: KeyStore | undefined);
|
|
223
226
|
/**
|
|
224
227
|
* Check if the fee is sufficient to pay for the transaction
|
|
225
228
|
*/
|
|
@@ -248,6 +251,64 @@ declare class ProgramManager {
|
|
|
248
251
|
* @param {RecordProvider} recordProvider
|
|
249
252
|
*/
|
|
250
253
|
setRecordProvider(recordProvider: RecordProvider): void;
|
|
254
|
+
/**
|
|
255
|
+
* Set the key store for automatic key caching across executions.
|
|
256
|
+
*
|
|
257
|
+
* @param {KeyStore} keyStore
|
|
258
|
+
*/
|
|
259
|
+
setKeyStore(keyStore: KeyStore): void;
|
|
260
|
+
/**
|
|
261
|
+
* Build a ProgramImportsBuilder from a program and its imports.
|
|
262
|
+
* Fetches imports from the network if not provided, resolves transitive
|
|
263
|
+
* dependencies, and optionally pre-loads cached keys from the KeyStore.
|
|
264
|
+
*
|
|
265
|
+
* @param loadKeys When true (default), loads cached proving/verifying keys
|
|
266
|
+
* from the KeyStore into the builder. Set to false for authorization and
|
|
267
|
+
* proving request paths where keys are not synthesized.
|
|
268
|
+
*/
|
|
269
|
+
private buildProgramImports;
|
|
270
|
+
/**
|
|
271
|
+
* Extract `import program_name.aleo;` names from program source via regex.
|
|
272
|
+
* Avoids a WASM round-trip compared to Program.fromString + getImports.
|
|
273
|
+
*/
|
|
274
|
+
private static getImportNames;
|
|
275
|
+
/**
|
|
276
|
+
* Parse `call program.aleo/function` instructions from program source
|
|
277
|
+
* to determine which functions of each import are actually in the call chain.
|
|
278
|
+
* Returns a map of program name -> set of called function names.
|
|
279
|
+
*/
|
|
280
|
+
private static getCalledFunctions;
|
|
281
|
+
/**
|
|
282
|
+
* Resolve the active KeyStore, preferring the directly-set _keyStore
|
|
283
|
+
* over the KeyProvider's keyStore().
|
|
284
|
+
*/
|
|
285
|
+
private resolveKeyStore;
|
|
286
|
+
/**
|
|
287
|
+
* Resolve the edition and amendment count for a program from the network.
|
|
288
|
+
* Returns `{ edition, amendment }` or falls back to `{ edition: 1, amendment: 0 }`.
|
|
289
|
+
*/
|
|
290
|
+
private resolveEditionAndAmendment;
|
|
291
|
+
/**
|
|
292
|
+
* Load cached proving/verifying keys from the KeyStore into a ProgramImportsBuilder.
|
|
293
|
+
* Only loads keys for the specified functions — returns immediately if
|
|
294
|
+
* functionNames is empty or undefined.
|
|
295
|
+
* Resolves edition and amendment from the network for accurate key locator
|
|
296
|
+
* construction when not explicitly provided.
|
|
297
|
+
*/
|
|
298
|
+
private loadKeysFromStore;
|
|
299
|
+
/**
|
|
300
|
+
* Persist newly synthesized keys from the returned ProgramImportsBuilder
|
|
301
|
+
* into the KeyStore. Only writes keys that are not already in the store,
|
|
302
|
+
* avoiding unnecessary writes of large proving keys.
|
|
303
|
+
* Fetches each program's current edition and amendment count from the network
|
|
304
|
+
* for accurate key locator construction.
|
|
305
|
+
*/
|
|
306
|
+
private persistExtractedKeys;
|
|
307
|
+
/**
|
|
308
|
+
* Resolve top-level function keys, checking the KeyStore first and
|
|
309
|
+
* falling back to the KeyProvider.
|
|
310
|
+
*/
|
|
311
|
+
private resolveTopLevelKeys;
|
|
251
312
|
/**
|
|
252
313
|
* Set a header in the `AleoNetworkClient`s header map
|
|
253
314
|
*
|
|
@@ -674,6 +735,24 @@ declare class ProgramManager {
|
|
|
674
735
|
* }, 10000);
|
|
675
736
|
*/
|
|
676
737
|
execute(options: ExecuteOptions): Promise<string>;
|
|
738
|
+
/**
|
|
739
|
+
* Prepares user-provided inputs for a function call by auto-converting bare
|
|
740
|
+
* string identifiers to field elements where the function signature expects
|
|
741
|
+
* a `field` type. This lets callers of dynamic-dispatch programs pass
|
|
742
|
+
* human-readable strings (e.g. `"my_program"`) instead of requiring
|
|
743
|
+
* `stringToField("my_program").toString()`.
|
|
744
|
+
*
|
|
745
|
+
* Inputs that already look like a numeric field literal (matching
|
|
746
|
+
* `/^\d+field$/` after trimming whitespace) are left untouched. Non-field
|
|
747
|
+
* inputs are returned as-is. If introspection fails for any reason the
|
|
748
|
+
* original inputs are returned unchanged.
|
|
749
|
+
*
|
|
750
|
+
* @param {string | Program} programSource - The program source code or Program object
|
|
751
|
+
* @param {string} functionName - The function to inspect
|
|
752
|
+
* @param {string[]} inputs - The raw user-provided inputs
|
|
753
|
+
* @returns {string[]} The (possibly converted) inputs
|
|
754
|
+
*/
|
|
755
|
+
prepareInputs(programSource: string | Program, functionName: string, inputs: string[]): string[];
|
|
677
756
|
/**
|
|
678
757
|
* Run an Aleo program in offline mode
|
|
679
758
|
*
|
|
@@ -1396,7 +1475,7 @@ declare class ProgramManager {
|
|
|
1396
1475
|
* import { AleoKeyProvider, getOrInitConsensusVersionTestHeights, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
|
|
1397
1476
|
*
|
|
1398
1477
|
* // Initialize the development consensus heights in order to work with devnode.
|
|
1399
|
-
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12");
|
|
1478
|
+
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13");
|
|
1400
1479
|
*
|
|
1401
1480
|
* // Create a new NetworkClient and RecordProvider.
|
|
1402
1481
|
* const recordProvider = new NetworkRecordProvider(account, networkClient);
|
|
@@ -1437,7 +1516,7 @@ declare class ProgramManager {
|
|
|
1437
1516
|
* import { ProgramManager, NetworkRecordProvider, getOrInitConsensusVersionTestHeights } from "@provablehq/sdk/mainnet.js";
|
|
1438
1517
|
*
|
|
1439
1518
|
* // Initialize the development consensus heights in order to work with a local devnode.
|
|
1440
|
-
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12");
|
|
1519
|
+
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13");
|
|
1441
1520
|
*
|
|
1442
1521
|
* // Create a new NetworkClient, and RecordProvider
|
|
1443
1522
|
* const recordProvider = new NetworkRecordProvider(account, networkClient);
|
package/dist/mainnet/wasm.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, EncryptionToolkit, ExecutionRequest, Execution, ExecutionResponse, Field, GraphKey, Group, I8, I16, I32, I64, I128, OfflineQuery, Metadata, Pedersen64, Pedersen128, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar,
|
|
1
|
+
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, DynamicRecord, EncryptionToolkit, ExecutionRequest, Execution, ExecutionResponse, Field, GraphKey, Group, I8, I16, I32, I64, I128, OfflineQuery, 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";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "./polyfill/shared.js";
|
|
2
|
+
import { IndexedDBKeyStore } from "./keys/keystore/indexeddb.js";
|
|
2
3
|
import { Account } from "./account.js";
|
|
3
4
|
import { AleoNetworkClient, ProgramImports } from "./network-client.js";
|
|
4
5
|
import { BlockJSON, Header, Metadata } from "./models/blockJSON.js";
|
|
@@ -62,10 +63,10 @@ import { SealanceMerkleTree } from "./integrations/sealance/merkle-tree.js";
|
|
|
62
63
|
declare function initializeWasm(): Promise<void>;
|
|
63
64
|
export { ProgramManager, ProvingRequestOptions, ExecuteOptions, FeeAuthorizationOptions, AuthorizationOptions, VerificationOptions, BatchVerificationOptions, inputsToFields, verifyProof, verifyBatchProof } from "./program-manager.js";
|
|
64
65
|
export { logAndThrow } from "./utils.js";
|
|
65
|
-
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, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Signature, Scalar, stringToField, Transaction, Transition, U8, U16, U32, U64, U128, Value, VerifyingKey, ViewKey, initThreadPool, getOrInitConsensusVersionTestHeights, snarkVerify, snarkVerifyBatch, verifyFunctionExecution, } from "./wasm.js";
|
|
66
|
+
export { Address, Authorization, Boolean, BHP256, BHP512, BHP768, BHP1024, Ciphertext, ComputeKey, DynamicRecord, Execution as FunctionExecution, ExecutionRequest, ExecutionResponse, EncryptionToolkit, Field, GraphKey, Group, I8, I16, I32, I64, I128, OfflineQuery, Pedersen64, Pedersen128, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramImportsBuilder, ProgramManager as ProgramManagerBase, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Signature, Scalar, stringToField, Transaction, Transition, U8, U16, U32, U64, U128, Value, VerifyingKey, ViewKey, initThreadPool, getOrInitConsensusVersionTestHeights, snarkVerify, snarkVerifyBatch, verifyFunctionExecution, } from "./wasm.js";
|
|
66
67
|
export { initializeWasm };
|
|
67
68
|
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, RECORD_DOMAIN, VALID_TRANSFER_TYPES, } from "./constants.js";
|
|
68
|
-
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, AleoNetworkClient, BlockJSON, BlockHeightSearch, BroadcastResponse, BroadcastResult, CachedKeyPair, ConfirmedTransactionJSON, CryptoBoxPubKey, DecryptionNotEnabledError, DeploymentJSON, DeploymentObject, EncryptedProvingRequest, EncryptedRecord, EncryptedRegistrationRequest, EncryptedRecordsResult, EncryptedRecordsSuccess, ExecutionJSON, ExecutionObject, FeeExecutionJSON, FeeExecutionObject, FinalizeJSON, FunctionInput, FunctionObject, FunctionKeyPair, FunctionKeyProvider, Header, isProvingResponse, isProveApiErrorBody, ImportedPrograms, ImportedVerifyingKeys, InputJSON, InputObject, InvalidLocatorError, InvalidLocatorReason, BaseFunctionKeyLocator, KeyFingerprint, KeyLocator, KeyMetadata, KeySearchParams, KeyStore, KeyType, KeyVerificationError, ProvingKeyLocator, provingKeyLocator, TranslationKeyLocator, translationKeyLocator, VerifyingKeyLocator, verifyingKeyLocator, KeyVerifier, MemKeyVerifier, Metadata, NetworkRecordProvider, OfflineKeyProvider, OfflineSearchParams, OutputJSON, OutputObject, OwnedFilter, OwnedRecord, OwnedRecordsResult, OwnedRecordsResponseFilter, OwnedRecordsSuccess, OwnerJSON, PartialSolutionJSON, PlaintextArray, PlaintextLiteral, PlaintextObject, PlaintextStruct, ProgramImports, ProveApiErrorBody, ProvingFailure, ProvingRequestError, ProvingRequestJSON, ProvingResult, ProvingSuccess, ProvingResponse, RatificationJSON, RecordsFilter, RecordsResponseFilter, RecordProvider, RecordScanner, RecordScannerErrorBody, RecordScannerFailure, RecordScannerJWTData, RecordScannerOptions, RecordNotFoundError, RecordScannerRequestError, ViewKeyNotStoredError, RecordSearchParams, RegisterResult, RegisterSuccess, RegistrationRequest, RegistrationResponse, RevokeResult, RevokeSuccess, RevokeResponse, SealanceMerkleTree, SerialNumbersResult, SerialNumbersSuccess, sha256Hex, SolutionJSON, SolutionsJSON, StatusResponse, StatusResult, StatusSuccess, TagsResult, TagsSuccess, TransactionJSON, TransactionObject, TransitionJSON, TransitionObject, UUIDError, VerifyingKeys, };
|
|
69
|
+
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, AleoNetworkClient, BlockJSON, BlockHeightSearch, BroadcastResponse, BroadcastResult, CachedKeyPair, ConfirmedTransactionJSON, CryptoBoxPubKey, DecryptionNotEnabledError, DeploymentJSON, DeploymentObject, EncryptedProvingRequest, EncryptedRecord, EncryptedRegistrationRequest, EncryptedRecordsResult, EncryptedRecordsSuccess, ExecutionJSON, ExecutionObject, FeeExecutionJSON, FeeExecutionObject, FinalizeJSON, FunctionInput, FunctionObject, FunctionKeyPair, FunctionKeyProvider, Header, isProvingResponse, isProveApiErrorBody, ImportedPrograms, ImportedVerifyingKeys, IndexedDBKeyStore, InputJSON, InputObject, InvalidLocatorError, InvalidLocatorReason, BaseFunctionKeyLocator, KeyFingerprint, KeyLocator, KeyMetadata, KeySearchParams, KeyStore, KeyType, KeyVerificationError, ProvingKeyLocator, provingKeyLocator, TranslationKeyLocator, translationKeyLocator, VerifyingKeyLocator, verifyingKeyLocator, KeyVerifier, MemKeyVerifier, Metadata, NetworkRecordProvider, OfflineKeyProvider, OfflineSearchParams, OutputJSON, OutputObject, OwnedFilter, OwnedRecord, OwnedRecordsResult, OwnedRecordsResponseFilter, OwnedRecordsSuccess, OwnerJSON, PartialSolutionJSON, PlaintextArray, PlaintextLiteral, PlaintextObject, PlaintextStruct, ProgramImports, ProveApiErrorBody, ProvingFailure, ProvingRequestError, ProvingRequestJSON, ProvingResult, ProvingSuccess, ProvingResponse, RatificationJSON, RecordsFilter, RecordsResponseFilter, RecordProvider, RecordScanner, RecordScannerErrorBody, RecordScannerFailure, RecordScannerJWTData, RecordScannerOptions, RecordNotFoundError, RecordScannerRequestError, ViewKeyNotStoredError, RecordSearchParams, RegisterResult, RegisterSuccess, RegistrationRequest, RegistrationResponse, RevokeResult, RevokeSuccess, RevokeResponse, SealanceMerkleTree, SerialNumbersResult, SerialNumbersSuccess, sha256Hex, SolutionJSON, SolutionsJSON, StatusResponse, StatusResult, StatusSuccess, TagsResult, TagsSuccess, TransactionJSON, TransactionObject, TransitionJSON, TransitionObject, UUIDError, VerifyingKeys, };
|
|
69
70
|
export { KeyVerificationError as ChecksumMismatchError, KeyVerifier as FunctionKeyVerifier, } from "./keys/verifier/interface.js";
|
|
70
71
|
export { encryptAuthorization, encryptProvingRequest, encryptViewKey, encryptRegistrationRequest, zeroizeBytes } from "./security.js";
|
|
71
72
|
export { toField, toGroup, toViewKey, toSignature, toAddress, isViewKeyStrategy, isInputIdStrategy, isRecordViewKeyStrategy, buildExecutionRequestFromExternallySignedData, computeExternalSigningInputs, } from "./external-signing.js";
|