@provablehq/sdk 0.9.13 → 0.9.15-enc
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 +15 -0
- package/dist/mainnet/browser.d.ts +5 -2
- package/dist/mainnet/browser.js +669 -160
- package/dist/mainnet/browser.js.map +1 -1
- package/dist/mainnet/constants.d.ts +1 -0
- package/dist/mainnet/integrations/sealance/merkle-tree.d.ts +63 -17
- 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/encryptedRegistrationRequest.d.ts +8 -0
- package/dist/mainnet/models/record-scanner/registrationResult.d.ts +26 -0
- package/dist/mainnet/network-client.d.ts +77 -4
- package/dist/mainnet/node-polyfill.js +2 -49
- package/dist/mainnet/node-polyfill.js.map +1 -1
- package/dist/mainnet/node.js +2 -2
- package/dist/mainnet/record-scanner.d.ts +53 -5
- package/dist/mainnet/security.d.ts +38 -0
- package/dist/testnet/account.d.ts +15 -0
- package/dist/testnet/browser.d.ts +5 -2
- package/dist/testnet/browser.js +669 -160
- package/dist/testnet/browser.js.map +1 -1
- package/dist/testnet/constants.d.ts +1 -0
- package/dist/testnet/integrations/sealance/merkle-tree.d.ts +63 -17
- 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/encryptedRegistrationRequest.d.ts +8 -0
- package/dist/testnet/models/record-scanner/registrationResult.d.ts +26 -0
- package/dist/testnet/network-client.d.ts +77 -4
- package/dist/testnet/node-polyfill.js +2 -49
- package/dist/testnet/node-polyfill.js.map +1 -1
- package/dist/testnet/node.js +2 -2
- package/dist/testnet/record-scanner.d.ts +53 -5
- package/dist/testnet/security.d.ts +38 -0
- package/package.json +4 -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
|
|
@@ -3,8 +3,10 @@ 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
5
|
import { ConfirmedTransactionJSON } from "./models/confirmed_transaction.js";
|
|
6
|
+
import { CryptoBoxPubKey } from "./models/cryptoBoxPubkey.js";
|
|
6
7
|
import { DeploymentJSON, VerifyingKeys } from "./models/deployment/deploymentJSON.js";
|
|
7
8
|
import { DeploymentObject } from "./models/deployment/deploymentObject.js";
|
|
9
|
+
import { EncryptedProvingRequest } from "./models/encryptedProvingRequest.js";
|
|
8
10
|
import { EncryptedRecord } from "./models/record-provider/encryptedRecord.js";
|
|
9
11
|
import { ExecutionJSON, FeeExecutionJSON } from "./models/execution/executionJSON.js";
|
|
10
12
|
import { ExecutionObject, FeeExecutionObject } from "./models/execution/executionObject.js";
|
|
@@ -24,7 +26,7 @@ import { PlaintextLiteral } from "./models/plaintext/literal.js";
|
|
|
24
26
|
import { PlaintextObject } from "./models/plaintext/plaintext.js";
|
|
25
27
|
import { PlaintextStruct } from "./models/plaintext/struct.js";
|
|
26
28
|
import { ProvingRequestJSON } from "./models/provingRequest.js";
|
|
27
|
-
import { ProvingResponse } from "./models/provingResponse.js";
|
|
29
|
+
import { ProvingResponse, BroadcastResponse, BroadcastResult, ProvingResult, ProvingFailure, ProvingSuccess, ProveApiErrorBody, ProvingRequestError, isProvingResponse, isProveApiErrorBody } from "./models/provingResponse.js";
|
|
28
30
|
import { RatificationJSON } from "./models/ratification.js";
|
|
29
31
|
import { RecordsFilter } from "./models/record-scanner/recordsFilter.js";
|
|
30
32
|
import { RecordsResponseFilter } from "./models/record-scanner/recordsResponseFilter.js";
|
|
@@ -45,4 +47,5 @@ export { logAndThrow } from "./utils.js";
|
|
|
45
47
|
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";
|
|
46
48
|
export { initializeWasm };
|
|
47
49
|
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";
|
|
48
|
-
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, KeySearchParams, Metadata, NetworkRecordProvider, OfflineKeyProvider, OfflineSearchParams, OutputJSON, OutputObject, OwnedFilter, OwnedRecord, OwnerJSON, PartialSolutionJSON, PlaintextArray, PlaintextLiteral, PlaintextObject, PlaintextStruct, ProgramImports, ProvingRequestJSON, ProvingResponse, RatificationJSON, RecordsFilter, RecordsResponseFilter, RecordProvider, RecordScanner, RecordSearchParams, SealanceMerkleTree, SolutionJSON, SolutionsJSON, TransactionJSON, TransactionObject, TransitionJSON, TransitionObject, VerifyingKeys, };
|
|
50
|
+
export { Account, AleoKeyProvider, AleoKeyProviderParams, AleoKeyProviderInitParams, AleoNetworkClient, BlockJSON, BlockHeightSearch, BroadcastResponse, BroadcastResult, CachedKeyPair, ConfirmedTransactionJSON, CryptoBoxPubKey, DeploymentJSON, DeploymentObject, EncryptedProvingRequest, EncryptedRecord, 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, OwnerJSON, PartialSolutionJSON, PlaintextArray, PlaintextLiteral, PlaintextObject, PlaintextStruct, ProgramImports, ProveApiErrorBody, ProvingFailure, ProvingRequestError, ProvingRequestJSON, ProvingResult, ProvingSuccess, ProvingResponse, RatificationJSON, RecordsFilter, RecordsResponseFilter, RecordProvider, RecordScanner, RecordSearchParams, SealanceMerkleTree, SolutionJSON, SolutionsJSON, TransactionJSON, TransactionObject, TransitionJSON, TransitionObject, VerifyingKeys, };
|
|
51
|
+
export { encryptAuthorization, encryptProvingRequest, encryptViewKey, encryptRegistrationRequest } from "./security.js";
|