@provablehq/sdk 0.9.16-rc → 0.9.16
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/account.d.ts +18 -3
- package/dist/mainnet/browser.d.ts +20 -8
- package/dist/mainnet/browser.js +997 -266
- package/dist/mainnet/browser.js.map +1 -1
- package/dist/{testnet/keys/provider → mainnet}/function-key-provider.d.ts +15 -23
- package/dist/mainnet/models/cryptoBoxPubkey.d.ts +4 -0
- package/dist/mainnet/models/encryptedProvingRequest.d.ts +4 -0
- package/dist/mainnet/models/provingResponse.d.ts +48 -2
- package/dist/mainnet/models/record-scanner/encryptedRecordsResult.d.ts +7 -0
- package/dist/mainnet/models/record-scanner/encryptedRegistrationRequest.d.ts +8 -0
- package/dist/mainnet/models/record-scanner/error.d.ts +47 -0
- package/dist/mainnet/models/record-scanner/ownedFilter.d.ts +0 -2
- package/dist/mainnet/models/record-scanner/ownedRecordsResult.d.ts +13 -0
- package/dist/mainnet/models/record-scanner/registrationResponse.d.ts +0 -2
- package/dist/mainnet/models/record-scanner/registrationResult.d.ts +9 -0
- package/dist/mainnet/models/record-scanner/serialNumbersResult.d.ts +15 -0
- package/dist/mainnet/models/record-scanner/statusResult.d.ts +13 -0
- package/dist/mainnet/models/record-scanner/tagsResult.d.ts +12 -0
- package/dist/mainnet/network-client.d.ts +81 -35
- package/dist/mainnet/node.d.ts +0 -1
- package/dist/mainnet/node.js +2 -129
- package/dist/mainnet/node.js.map +1 -1
- package/dist/mainnet/{keys/provider/offline-key-provider.d.ts → offline-key-provider.d.ts} +3 -6
- package/dist/mainnet/program-manager.d.ts +53 -48
- package/dist/mainnet/record-provider.d.ts +7 -7
- package/dist/mainnet/record-scanner.d.ts +231 -31
- package/dist/mainnet/security.d.ts +38 -0
- package/dist/mainnet/utils.d.ts +1 -0
- package/dist/testnet/account.d.ts +18 -3
- package/dist/testnet/browser.d.ts +20 -8
- package/dist/testnet/browser.js +997 -266
- package/dist/testnet/browser.js.map +1 -1
- package/dist/{mainnet/keys/provider → testnet}/function-key-provider.d.ts +15 -23
- package/dist/testnet/models/cryptoBoxPubkey.d.ts +4 -0
- package/dist/testnet/models/encryptedProvingRequest.d.ts +4 -0
- package/dist/testnet/models/provingResponse.d.ts +48 -2
- package/dist/testnet/models/record-scanner/encryptedRecordsResult.d.ts +7 -0
- package/dist/testnet/models/record-scanner/encryptedRegistrationRequest.d.ts +8 -0
- package/dist/testnet/models/record-scanner/error.d.ts +47 -0
- package/dist/testnet/models/record-scanner/ownedFilter.d.ts +0 -2
- package/dist/testnet/models/record-scanner/ownedRecordsResult.d.ts +13 -0
- package/dist/testnet/models/record-scanner/registrationResponse.d.ts +0 -2
- package/dist/testnet/models/record-scanner/registrationResult.d.ts +9 -0
- package/dist/testnet/models/record-scanner/serialNumbersResult.d.ts +15 -0
- package/dist/testnet/models/record-scanner/statusResult.d.ts +13 -0
- package/dist/testnet/models/record-scanner/tagsResult.d.ts +12 -0
- package/dist/testnet/network-client.d.ts +81 -35
- package/dist/testnet/node.d.ts +0 -1
- package/dist/testnet/node.js +2 -129
- package/dist/testnet/node.js.map +1 -1
- package/dist/testnet/{keys/provider/offline-key-provider.d.ts → offline-key-provider.d.ts} +3 -6
- package/dist/testnet/program-manager.d.ts +53 -48
- package/dist/testnet/record-provider.d.ts +7 -7
- package/dist/testnet/record-scanner.d.ts +231 -31
- package/dist/testnet/security.d.ts +38 -0
- package/dist/testnet/utils.d.ts +1 -0
- package/package.json +3 -2
- package/dist/mainnet/keys/keystore/file.d.ts +0 -23
- package/dist/mainnet/keys/keystore/keystore.d.ts +0 -81
- package/dist/mainnet/keys/keystore/memory.d.ts +0 -8
- package/dist/mainnet/models/keyPair.d.ts +0 -4
- package/dist/testnet/keys/keystore/file.d.ts +0 -23
- package/dist/testnet/keys/keystore/keystore.d.ts +0 -81
- package/dist/testnet/keys/keystore/memory.d.ts +0 -8
- package/dist/testnet/models/keyPair.d.ts +0 -4
|
@@ -52,6 +52,21 @@ export declare class Account {
|
|
|
52
52
|
* const account = Account.fromCiphertext(process.env.ciphertext, process.env.password);
|
|
53
53
|
*/
|
|
54
54
|
static fromCiphertext(ciphertext: PrivateKeyCiphertext | string, password: string): Account;
|
|
55
|
+
/**
|
|
56
|
+
* Validates whether the given input is a valid Aleo address.
|
|
57
|
+
* @param {string | Uint8Array} address The address to validate, either as a string or bytes
|
|
58
|
+
* @returns {boolean} True if the address is valid, false otherwise
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* import { Account } from "@provablehq/sdk/testnet.js";
|
|
62
|
+
*
|
|
63
|
+
* const isValid = Account.isValidAddress("aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px");
|
|
64
|
+
* console.log(isValid); // true
|
|
65
|
+
*
|
|
66
|
+
* const isInvalid = Account.isValidAddress("invalid_address");
|
|
67
|
+
* console.log(isInvalid); // false
|
|
68
|
+
*/
|
|
69
|
+
static isValidAddress(address: string | Uint8Array): boolean;
|
|
55
70
|
/**
|
|
56
71
|
* Creates a PrivateKey from the provided parameters.
|
|
57
72
|
* @param {AccountParam} params The parameters containing either a private key string or a seed
|
|
@@ -144,7 +159,7 @@ export declare class Account {
|
|
|
144
159
|
* import { AleoNetworkClient, Account } from "@provablehq/sdk/testnet.js";
|
|
145
160
|
*
|
|
146
161
|
* // Create a connection to the Aleo network and an account
|
|
147
|
-
* const networkClient = new AleoNetworkClient("https://api.
|
|
162
|
+
* const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
|
|
148
163
|
* const account = Account.fromCiphertext(process.env.ciphertext!, process.env.password!);
|
|
149
164
|
*
|
|
150
165
|
* // Get the record ciphertexts from a transaction.
|
|
@@ -171,7 +186,7 @@ export declare class Account {
|
|
|
171
186
|
* import { AleoNetworkClient, Account } from "@provablehq/sdk/testnet.js";
|
|
172
187
|
*
|
|
173
188
|
* // Create a connection to the Aleo network and an account
|
|
174
|
-
* const networkClient = new AleoNetworkClient("https://api.
|
|
189
|
+
* const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
|
|
175
190
|
* const account = Account.fromCiphertext(process.env.ciphertext!, process.env.password!);
|
|
176
191
|
*
|
|
177
192
|
* // Get the record ciphertexts from a transaction.
|
|
@@ -227,7 +242,7 @@ export declare class Account {
|
|
|
227
242
|
* import { AleoNetworkClient, Account } from "@provablehq/sdk/testnet.js";
|
|
228
243
|
*
|
|
229
244
|
* // Create a connection to the Aleo network and an account
|
|
230
|
-
* const networkClient = new AleoNetworkClient("https://api.
|
|
245
|
+
* const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
|
|
231
246
|
* const account = Account.fromCiphertext(process.env.ciphertext!, process.env.password!);
|
|
232
247
|
*
|
|
233
248
|
* // Get the record ciphertexts from a transaction and check ownership of them.
|
|
@@ -2,10 +2,11 @@ import "./polyfill/shared.js";
|
|
|
2
2
|
import { Account } from "./account.js";
|
|
3
3
|
import { AleoNetworkClient, ProgramImports } from "./network-client.js";
|
|
4
4
|
import { BlockJSON, Header, Metadata } from "./models/blockJSON.js";
|
|
5
|
-
import { CachedKeyPair, FunctionKeyPair } from "./models/keyPair.js";
|
|
6
5
|
import { ConfirmedTransactionJSON } from "./models/confirmed_transaction.js";
|
|
6
|
+
import { CryptoBoxPubKey } from "./models/cryptoBoxPubkey.js";
|
|
7
7
|
import { DeploymentJSON, VerifyingKeys } from "./models/deployment/deploymentJSON.js";
|
|
8
8
|
import { DeploymentObject } from "./models/deployment/deploymentObject.js";
|
|
9
|
+
import { EncryptedProvingRequest } from "./models/encryptedProvingRequest.js";
|
|
9
10
|
import { EncryptedRecord } from "./models/record-provider/encryptedRecord.js";
|
|
10
11
|
import { ExecutionJSON, FeeExecutionJSON } from "./models/execution/executionJSON.js";
|
|
11
12
|
import { ExecutionObject, FeeExecutionObject } from "./models/execution/executionObject.js";
|
|
@@ -25,22 +26,32 @@ import { PlaintextLiteral } from "./models/plaintext/literal.js";
|
|
|
25
26
|
import { PlaintextObject } from "./models/plaintext/plaintext.js";
|
|
26
27
|
import { PlaintextStruct } from "./models/plaintext/struct.js";
|
|
27
28
|
import { ProvingRequestJSON } from "./models/provingRequest.js";
|
|
28
|
-
import { ProvingResponse } from "./models/provingResponse.js";
|
|
29
|
+
import { ProvingResponse, BroadcastResponse, BroadcastResult, ProvingResult, ProvingFailure, ProvingSuccess, ProveApiErrorBody, ProvingRequestError, isProvingResponse, isProveApiErrorBody } from "./models/provingResponse.js";
|
|
29
30
|
import { RatificationJSON } from "./models/ratification.js";
|
|
31
|
+
import { EncryptedRegistrationRequest } from "./models/record-scanner/encryptedRegistrationRequest.js";
|
|
32
|
+
import { EncryptedRecordsResult, EncryptedRecordsSuccess } from "./models/record-scanner/encryptedRecordsResult.js";
|
|
33
|
+
import { DecryptionNotEnabledError, RecordNotFoundError, RecordScannerErrorBody, RecordScannerFailure, RecordScannerRequestError, UUIDError, ViewKeyNotStoredError } from "./models/record-scanner/error.js";
|
|
34
|
+
import { OwnedRecordsResult, OwnedRecordsSuccess } from "./models/record-scanner/ownedRecordsResult.js";
|
|
35
|
+
import { OwnedRecordsResponseFilter } from "./models/record-scanner/ownedRecordsResponseFilter.js";
|
|
36
|
+
import { RegisterResult, RegisterSuccess } from "./models/record-scanner/registrationResult.js";
|
|
37
|
+
import { RegistrationRequest } from "./models/record-scanner/registrationRequest.js";
|
|
38
|
+
import { RegistrationResponse } from "./models/record-scanner/registrationResponse.js";
|
|
30
39
|
import { RecordsFilter } from "./models/record-scanner/recordsFilter.js";
|
|
31
40
|
import { RecordsResponseFilter } from "./models/record-scanner/recordsResponseFilter.js";
|
|
41
|
+
import { SerialNumbersResult, SerialNumbersSuccess } from "./models/record-scanner/serialNumbersResult.js";
|
|
42
|
+
import { StatusResponse } from "./models/record-scanner/statusResponse.js";
|
|
43
|
+
import { StatusResult, StatusSuccess } from "./models/record-scanner/statusResult.js";
|
|
44
|
+
import { TagsResult, TagsSuccess } from "./models/record-scanner/tagsResult.js";
|
|
32
45
|
import { RecordSearchParams } from "./models/record-provider/recordSearchParams.js";
|
|
33
46
|
import { SolutionsJSON, SolutionJSON, PartialSolutionJSON } from "./models/solution.js";
|
|
34
47
|
import { TransactionJSON } from "./models/transaction/transactionJSON.js";
|
|
35
48
|
import { TransactionObject } from "./models/transaction/transactionObject.js";
|
|
36
49
|
import { TransitionJSON } from "./models/transition/transitionJSON.js";
|
|
37
50
|
import { TransitionObject } from "./models/transition/transitionObject.js";
|
|
38
|
-
import { AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, FunctionKeyProvider, KeySearchParams } from "./
|
|
39
|
-
import {
|
|
40
|
-
import { promoteMapToKeyStore } from "./keys/keystore/memory";
|
|
41
|
-
import { OfflineKeyProvider, OfflineSearchParams } from "./keys/provider/offline-key-provider";
|
|
51
|
+
import { AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, CachedKeyPair, FunctionKeyPair, FunctionKeyProvider, KeySearchParams } from "./function-key-provider.js";
|
|
52
|
+
import { OfflineKeyProvider, OfflineSearchParams } from "./offline-key-provider.js";
|
|
42
53
|
import { BlockHeightSearch, NetworkRecordProvider, RecordProvider } from "./record-provider.js";
|
|
43
|
-
import { RecordScanner } from "./record-scanner.js";
|
|
54
|
+
import { RecordScanner, RecordScannerJWTData, RecordScannerOptions } from "./record-scanner.js";
|
|
44
55
|
import { SealanceMerkleTree } from "./integrations/sealance/merkle-tree.js";
|
|
45
56
|
declare function initializeWasm(): Promise<void>;
|
|
46
57
|
export { ProgramManager, ProvingRequestOptions, ExecuteOptions, FeeAuthorizationOptions, AuthorizationOptions } from "./program-manager.js";
|
|
@@ -48,4 +59,5 @@ export { logAndThrow } from "./utils.js";
|
|
|
48
59
|
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, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Signature, Scalar, Transaction, Transition, U8, U16, U32, U64, U128, VerifyingKey, ViewKey, initThreadPool, getOrInitConsensusVersionTestHeights, verifyFunctionExecution, } from "./wasm.js";
|
|
49
60
|
export { initializeWasm };
|
|
50
61
|
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";
|
|
51
|
-
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, AleoNetworkClient, BlockJSON, BlockHeightSearch, CachedKeyPair, ConfirmedTransactionJSON, DeploymentJSON, DeploymentObject, EncryptedRecord, ExecutionJSON, ExecutionObject, FeeExecutionJSON, FeeExecutionObject, FinalizeJSON, FunctionInput, FunctionObject, FunctionKeyPair, FunctionKeyProvider, Header, ImportedPrograms, ImportedVerifyingKeys, InputJSON, InputObject,
|
|
62
|
+
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, AleoNetworkClient, BlockJSON, BlockHeightSearch, BroadcastResponse, BroadcastResult, CachedKeyPair, ConfirmedTransactionJSON, CryptoBoxPubKey, DeploymentJSON, DeploymentObject, EncryptedProvingRequest, EncryptedRecord, EncryptedRegistrationRequest, EncryptedRecordsResult, EncryptedRecordsSuccess, ExecutionJSON, ExecutionObject, FeeExecutionJSON, FeeExecutionObject, FinalizeJSON, FunctionInput, FunctionObject, FunctionKeyPair, FunctionKeyProvider, Header, isProvingResponse, isProveApiErrorBody, ImportedPrograms, ImportedVerifyingKeys, InputJSON, InputObject, KeySearchParams, 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, DecryptionNotEnabledError, RecordNotFoundError, RecordScannerRequestError, ViewKeyNotStoredError, RecordSearchParams, RegisterResult, RegisterSuccess, RegistrationRequest, RegistrationResponse, SealanceMerkleTree, SerialNumbersResult, SerialNumbersSuccess, SolutionJSON, SolutionsJSON, StatusResponse, StatusResult, StatusSuccess, TagsResult, TagsSuccess, TransactionJSON, TransactionObject, TransitionJSON, TransitionObject, UUIDError, VerifyingKeys, };
|
|
63
|
+
export { encryptAuthorization, encryptProvingRequest, encryptViewKey, encryptRegistrationRequest } from "./security.js";
|