veilix-sdk 0.2.2 → 0.2.3
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/{VeilixSDK-CGbGpth9.d.cts → VeilixSDK-CousE3xD.d.cts} +1 -1
- package/dist/{VeilixSDK-D1hKisoi.d.ts → VeilixSDK-DL7hvWhB.d.ts} +1 -1
- package/dist/circuits/paths.cjs.map +1 -1
- package/dist/circuits/paths.js.map +1 -1
- package/dist/index.cjs +23 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +23 -6
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +23 -6
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +23 -6
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-CousE3xD.cjs';
|
|
2
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-DL7hvWhB.js';
|
|
2
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';
|
package/dist/index.js
CHANGED
|
@@ -7376,6 +7376,13 @@ var TOKEN_DECIMALS = {
|
|
|
7376
7376
|
Bitcoin: 8,
|
|
7377
7377
|
USDC: 6
|
|
7378
7378
|
};
|
|
7379
|
+
var INDEXER_ASSET_LABELS = {
|
|
7380
|
+
Solana: "SOL",
|
|
7381
|
+
Veilix: "VEILIX",
|
|
7382
|
+
Bitcoin: "WBTC",
|
|
7383
|
+
Ethereum: "WETH",
|
|
7384
|
+
USDC: "USDC"
|
|
7385
|
+
};
|
|
7379
7386
|
function getTokenDecimals(symbol) {
|
|
7380
7387
|
return TOKEN_DECIMALS[symbol];
|
|
7381
7388
|
}
|
|
@@ -7390,7 +7397,7 @@ function getDepositQueueForNetwork(network) {
|
|
|
7390
7397
|
// package.json
|
|
7391
7398
|
var package_default = {
|
|
7392
7399
|
name: "veilix-sdk",
|
|
7393
|
-
version: "0.2.
|
|
7400
|
+
version: "0.2.3"};
|
|
7394
7401
|
|
|
7395
7402
|
// src/circuits/constants.ts
|
|
7396
7403
|
var PACKAGE_NAME = package_default.name;
|
|
@@ -16941,14 +16948,24 @@ function decryptData(key, combined) {
|
|
|
16941
16948
|
|
|
16942
16949
|
// src/tokenAssets.ts
|
|
16943
16950
|
var WRAPPED_SOL_MINT2 = "So11111111111111111111111111111111111111112";
|
|
16951
|
+
var TOKEN_MINT_TABLES = [MAINNET_TOKEN_MINTS, DEVNET_TOKEN_MINTS];
|
|
16952
|
+
function indexerLabelForMint(mint) {
|
|
16953
|
+
if (mint === WRAPPED_SOL_MINT2) return INDEXER_ASSET_LABELS.Solana;
|
|
16954
|
+
for (const table of TOKEN_MINT_TABLES) {
|
|
16955
|
+
for (const symbol of Object.keys(table)) {
|
|
16956
|
+
if (table[symbol] && table[symbol] === mint) return INDEXER_ASSET_LABELS[symbol];
|
|
16957
|
+
}
|
|
16958
|
+
}
|
|
16959
|
+
return void 0;
|
|
16960
|
+
}
|
|
16944
16961
|
function resolveIndexerAsset(indexerAsset) {
|
|
16945
|
-
if (!indexerAsset) return
|
|
16962
|
+
if (!indexerAsset) return INDEXER_ASSET_LABELS.Solana;
|
|
16946
16963
|
if (typeof indexerAsset === "string") {
|
|
16947
|
-
return indexerAsset
|
|
16964
|
+
return indexerLabelForMint(indexerAsset) ?? indexerAsset;
|
|
16948
16965
|
}
|
|
16949
|
-
if (indexerAsset.asset) return indexerAsset.asset;
|
|
16950
|
-
if (indexerAsset.mint
|
|
16951
|
-
return
|
|
16966
|
+
if (indexerAsset.asset) return indexerLabelForMint(indexerAsset.asset) ?? indexerAsset.asset;
|
|
16967
|
+
if (indexerAsset.mint) return indexerLabelForMint(indexerAsset.mint) ?? indexerAsset.mint;
|
|
16968
|
+
return INDEXER_ASSET_LABELS.Solana;
|
|
16952
16969
|
}
|
|
16953
16970
|
function indexerAssetForMint(mint) {
|
|
16954
16971
|
return resolveIndexerAsset(mint ?? null);
|