veilix-sdk 0.0.9 → 0.2.0
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/README.md +119 -145
- package/dist/VeilixSDK-CGbGpth9.d.cts +781 -0
- package/dist/VeilixSDK-D1hKisoi.d.ts +781 -0
- package/dist/circuits/paths.cjs +4 -4
- package/dist/circuits/paths.cjs.map +1 -1
- package/dist/circuits/paths.d.cts +2 -2
- package/dist/circuits/paths.d.ts +2 -2
- package/dist/circuits/paths.js +4 -4
- package/dist/circuits/paths.js.map +1 -1
- package/dist/circuits/withdraw.wasm +0 -0
- package/dist/circuits/withdraw.zkey +0 -0
- package/dist/{constants-sO9UKB9l.d.cts → constants-C-u6nmCv.d.cts} +2 -2
- package/dist/{constants-sO9UKB9l.d.ts → constants-C-u6nmCv.d.ts} +2 -2
- package/dist/index.cjs +3207 -2494
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -3
- package/dist/index.d.ts +17 -3
- package/dist/index.js +3197 -2506
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +3190 -2496
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +4 -2
- package/dist/react/index.d.ts +4 -2
- package/dist/react/index.js +3187 -2494
- package/dist/react/index.js.map +1 -1
- package/dist/vite/index.cjs.map +1 -1
- package/dist/vite/index.js.map +1 -1
- package/package.json +3 -1
- package/dist/VeilixSDK-BmB790UK.d.ts +0 -386
- package/dist/VeilixSDK-DgXMu4lI.d.cts +0 -386
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
export { B as BuildDepositTxParams, a as BuildRelayPayloadParams,
|
|
2
|
-
export { C as CircuitPaths, a as WITHDRAW_CIRCUIT_WASM, b as WITHDRAW_CIRCUIT_ZKEY, c as resolveCircuitPathsFromBase, d as resolveNpmCdnCircuitBase } from './constants-
|
|
1
|
+
export { B as BuildDepositTxParams, a as BuildRelayPayloadParams, b as BuildWithdrawPayloadOptions, C as CommitmentStatus, E as EncryptKeyWallet, c as ExtData, F as FetchWalletBalanceOptions, G as GenerateDepositParamsResult, d as GetQuoteParams, e as GetQuoteResponse, I as IndexedLeaf, f as IndexerAsset, N as NOTE_PREFIX, g as Network, h as NoteStatus, i as NullifierStatus, P as ParsedNote, j as PlatformFeeWallet, k as PoolTransaction, l as PreparedCircuitArtifacts, m as ProvedTransaction, Q as Quote, n as QuoteRelayer, o as QuoteTransaction, R as RelayPayload, p as Relayer, q as RelayerJob, r as ResolvedNoteAsset, S as ScanOwnedNotesOptions, s as Submission, t as SubmissionItem, T as TokenDecimalsSymbol, u as TokenSymbol, v as TransactionProof, w as TreeAccountState, x as TreeState, y as TxStatus, U as Utxo, V as VeilixKeypair, z as VeilixMerkleTree, A as VeilixSDK, D as VeilixSdkInitOptions, H as VeilixSdkRuntimeConfig, J as VeilixTransferDepositFailure, K as VeilixTransferItem, L as VeilixTransferOptions, M as VeilixTransferResult, O as VeilixTransferWithdrawFailure, W as WithdrawParams, X as WithdrawRelayBundle, Y as WithdrawResult, Z as WithdrawStatus, _ as buildMerkleTree, $ as decodeNote, a0 as decryptData, a1 as decryptNoteOutput, A as default, a2 as encodeNote, a3 as encryptData, a4 as encryptNoteOutput, a5 as extDataHash, a6 as formatNoteForDisplay, a7 as getQuote, a8 as isLegacyNote, a9 as mintToField, aa as parseSecretNote, ab as prepareCircuitArtifacts, ac as proveTransaction } from './VeilixSDK-CGbGpth9.cjs';
|
|
2
|
+
export { C as CircuitPaths, a as WITHDRAW_CIRCUIT_WASM, b as WITHDRAW_CIRCUIT_ZKEY, c as resolveCircuitPathsFromBase, d as resolveNpmCdnCircuitBase } from './constants-C-u6nmCv.cjs';
|
|
3
3
|
export { Wallet } from '@coral-xyz/anchor/dist/cjs/provider';
|
|
4
4
|
import '@solana/web3.js';
|
|
5
|
+
import 'buffer';
|
|
6
|
+
import 'fixed-merkle-tree';
|
|
5
7
|
import '@switchboard-xyz/common';
|
|
6
8
|
import '@coral-xyz/anchor';
|
|
7
9
|
|
|
8
10
|
declare const MALICIOUS_RECIPIENT_ERROR = "Recipient address flagged as malicious";
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
/** BN254 scalar field modulus. */
|
|
13
|
+
declare const FIELD_SIZE: bigint;
|
|
14
|
+
/** Merkle tree height of every on-chain asset tree (`MERKLE_TREE_HEIGHT` in the program). */
|
|
15
|
+
declare const TREE_LEVELS = 26;
|
|
16
|
+
/** Leaf value of an empty slot; must match the program's level-0 zero hash. */
|
|
17
|
+
declare const ZERO_LEAF: bigint;
|
|
18
|
+
|
|
19
|
+
/** Parse a human-readable amount (e.g. `"1.5"`) into base units without float rounding. */
|
|
20
|
+
declare function parseAmountToBaseUnits(amount: string | number, decimals: number): bigint;
|
|
21
|
+
/** Base units → human-readable decimal string (trailing zeros trimmed). */
|
|
22
|
+
declare function formatBaseUnits(value: bigint | string | number, decimals: number): string;
|
|
23
|
+
|
|
24
|
+
export { FIELD_SIZE, MALICIOUS_RECIPIENT_ERROR, TREE_LEVELS, ZERO_LEAF, formatBaseUnits, parseAmountToBaseUnits };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
export { B as BuildDepositTxParams, a as BuildRelayPayloadParams,
|
|
2
|
-
export { C as CircuitPaths, a as WITHDRAW_CIRCUIT_WASM, b as WITHDRAW_CIRCUIT_ZKEY, c as resolveCircuitPathsFromBase, d as resolveNpmCdnCircuitBase } from './constants-
|
|
1
|
+
export { B as BuildDepositTxParams, a as BuildRelayPayloadParams, b as BuildWithdrawPayloadOptions, C as CommitmentStatus, E as EncryptKeyWallet, c as ExtData, F as FetchWalletBalanceOptions, G as GenerateDepositParamsResult, d as GetQuoteParams, e as GetQuoteResponse, I as IndexedLeaf, f as IndexerAsset, N as NOTE_PREFIX, g as Network, h as NoteStatus, i as NullifierStatus, P as ParsedNote, j as PlatformFeeWallet, k as PoolTransaction, l as PreparedCircuitArtifacts, m as ProvedTransaction, Q as Quote, n as QuoteRelayer, o as QuoteTransaction, R as RelayPayload, p as Relayer, q as RelayerJob, r as ResolvedNoteAsset, S as ScanOwnedNotesOptions, s as Submission, t as SubmissionItem, T as TokenDecimalsSymbol, u as TokenSymbol, v as TransactionProof, w as TreeAccountState, x as TreeState, y as TxStatus, U as Utxo, V as VeilixKeypair, z as VeilixMerkleTree, A as VeilixSDK, D as VeilixSdkInitOptions, H as VeilixSdkRuntimeConfig, J as VeilixTransferDepositFailure, K as VeilixTransferItem, L as VeilixTransferOptions, M as VeilixTransferResult, O as VeilixTransferWithdrawFailure, W as WithdrawParams, X as WithdrawRelayBundle, Y as WithdrawResult, Z as WithdrawStatus, _ as buildMerkleTree, $ as decodeNote, a0 as decryptData, a1 as decryptNoteOutput, A as default, a2 as encodeNote, a3 as encryptData, a4 as encryptNoteOutput, a5 as extDataHash, a6 as formatNoteForDisplay, a7 as getQuote, a8 as isLegacyNote, a9 as mintToField, aa as parseSecretNote, ab as prepareCircuitArtifacts, ac as proveTransaction } from './VeilixSDK-D1hKisoi.js';
|
|
2
|
+
export { C as CircuitPaths, a as WITHDRAW_CIRCUIT_WASM, b as WITHDRAW_CIRCUIT_ZKEY, c as resolveCircuitPathsFromBase, d as resolveNpmCdnCircuitBase } from './constants-C-u6nmCv.js';
|
|
3
3
|
export { Wallet } from '@coral-xyz/anchor/dist/cjs/provider';
|
|
4
4
|
import '@solana/web3.js';
|
|
5
|
+
import 'buffer';
|
|
6
|
+
import 'fixed-merkle-tree';
|
|
5
7
|
import '@switchboard-xyz/common';
|
|
6
8
|
import '@coral-xyz/anchor';
|
|
7
9
|
|
|
8
10
|
declare const MALICIOUS_RECIPIENT_ERROR = "Recipient address flagged as malicious";
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
/** BN254 scalar field modulus. */
|
|
13
|
+
declare const FIELD_SIZE: bigint;
|
|
14
|
+
/** Merkle tree height of every on-chain asset tree (`MERKLE_TREE_HEIGHT` in the program). */
|
|
15
|
+
declare const TREE_LEVELS = 26;
|
|
16
|
+
/** Leaf value of an empty slot; must match the program's level-0 zero hash. */
|
|
17
|
+
declare const ZERO_LEAF: bigint;
|
|
18
|
+
|
|
19
|
+
/** Parse a human-readable amount (e.g. `"1.5"`) into base units without float rounding. */
|
|
20
|
+
declare function parseAmountToBaseUnits(amount: string | number, decimals: number): bigint;
|
|
21
|
+
/** Base units → human-readable decimal string (trailing zeros trimmed). */
|
|
22
|
+
declare function formatBaseUnits(value: bigint | string | number, decimals: number): string;
|
|
23
|
+
|
|
24
|
+
export { FIELD_SIZE, MALICIOUS_RECIPIENT_ERROR, TREE_LEVELS, ZERO_LEAF, formatBaseUnits, parseAmountToBaseUnits };
|