veilix-sdk 0.0.2 → 0.0.4
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 +2 -5
- package/dist/{VeilixSDK-Dg8RSskQ.d.cts → VeilixSDK-CAMQrwDf.d.cts} +6 -10
- package/dist/{VeilixSDK-DBfh30Dv.d.ts → VeilixSDK-CCru3r_B.d.ts} +6 -10
- package/dist/circuits/paths.cjs +1 -1
- package/dist/circuits/paths.cjs.map +1 -1
- package/dist/circuits/paths.js +1 -1
- package/dist/circuits/paths.js.map +1 -1
- package/dist/circuits/withdraw.wasm +0 -0
- package/dist/circuits/withdraw.zkey +0 -0
- package/dist/index.cjs +9 -20
- 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 +9 -20
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +11 -23
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +2 -3
- package/dist/react/index.d.ts +2 -3
- package/dist/react/index.js +11 -23
- 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 +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BuildDepositTxParams, a as BuildRelayPayloadParams, D as DepositTokenSymbol, E as EncryptKeyWallet, F as FetchWalletBalanceOptions, G as GenerateDepositParamsResult, b as GenerateWithdrawProofOptions, c as GetQuoteParams, d as GetQuoteResponse, I as IndexerAsset, N as Network, P as PreparedCircuitArtifacts, Q as Quote, e as QuoteRelayer, f as QuoteSplit, g as QuoteTransaction, R as RelayPayload, h as Relayer, i as ResolvedNoteAsset, T as TokenDecimalsSymbol, j as TokenSymbol, V as VeilixSDK, k as VeilixSdkInitOptions, l as VeilixSdkRuntimeConfig, m as VeilixTransferDepositFailure, n as VeilixTransferItem, o as VeilixTransferOptions, p as VeilixTransferResult, q as VeilixTransferWithdrawFailure, W as WithdrawParams, r as WithdrawResult, s as WithdrawStatus, V as default, t as getQuote, u as prepareCircuitArtifacts } from './VeilixSDK-
|
|
1
|
+
export { B as BuildDepositTxParams, a as BuildRelayPayloadParams, D as DepositTokenSymbol, E as EncryptKeyWallet, F as FetchWalletBalanceOptions, G as GenerateDepositParamsResult, b as GenerateWithdrawProofOptions, c as GetQuoteParams, d as GetQuoteResponse, I as IndexerAsset, N as Network, P as PreparedCircuitArtifacts, Q as Quote, e as QuoteRelayer, f as QuoteSplit, g as QuoteTransaction, R as RelayPayload, h as Relayer, i as ResolvedNoteAsset, T as TokenDecimalsSymbol, j as TokenSymbol, V as VeilixSDK, k as VeilixSdkInitOptions, l as VeilixSdkRuntimeConfig, m as VeilixTransferDepositFailure, n as VeilixTransferItem, o as VeilixTransferOptions, p as VeilixTransferResult, q as VeilixTransferWithdrawFailure, W as WithdrawParams, r as WithdrawResult, s as WithdrawStatus, V as default, t as getQuote, u as prepareCircuitArtifacts } from './VeilixSDK-CAMQrwDf.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-9OPXLj27.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, D as DepositTokenSymbol, E as EncryptKeyWallet, F as FetchWalletBalanceOptions, G as GenerateDepositParamsResult, b as GenerateWithdrawProofOptions, c as GetQuoteParams, d as GetQuoteResponse, I as IndexerAsset, N as Network, P as PreparedCircuitArtifacts, Q as Quote, e as QuoteRelayer, f as QuoteSplit, g as QuoteTransaction, R as RelayPayload, h as Relayer, i as ResolvedNoteAsset, T as TokenDecimalsSymbol, j as TokenSymbol, V as VeilixSDK, k as VeilixSdkInitOptions, l as VeilixSdkRuntimeConfig, m as VeilixTransferDepositFailure, n as VeilixTransferItem, o as VeilixTransferOptions, p as VeilixTransferResult, q as VeilixTransferWithdrawFailure, W as WithdrawParams, r as WithdrawResult, s as WithdrawStatus, V as default, t as getQuote, u as prepareCircuitArtifacts } from './VeilixSDK-
|
|
1
|
+
export { B as BuildDepositTxParams, a as BuildRelayPayloadParams, D as DepositTokenSymbol, E as EncryptKeyWallet, F as FetchWalletBalanceOptions, G as GenerateDepositParamsResult, b as GenerateWithdrawProofOptions, c as GetQuoteParams, d as GetQuoteResponse, I as IndexerAsset, N as Network, P as PreparedCircuitArtifacts, Q as Quote, e as QuoteRelayer, f as QuoteSplit, g as QuoteTransaction, R as RelayPayload, h as Relayer, i as ResolvedNoteAsset, T as TokenDecimalsSymbol, j as TokenSymbol, V as VeilixSDK, k as VeilixSdkInitOptions, l as VeilixSdkRuntimeConfig, m as VeilixTransferDepositFailure, n as VeilixTransferItem, o as VeilixTransferOptions, p as VeilixTransferResult, q as VeilixTransferWithdrawFailure, W as WithdrawParams, r as WithdrawResult, s as WithdrawStatus, V as default, t as getQuote, u as prepareCircuitArtifacts } from './VeilixSDK-CCru3r_B.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-9OPXLj27.js';
|
|
3
3
|
export { Wallet } from '@coral-xyz/anchor/dist/cjs/provider';
|
|
4
4
|
import '@solana/web3.js';
|
package/dist/index.js
CHANGED
|
@@ -3559,8 +3559,8 @@ function getProgramIdForNetwork(network) {
|
|
|
3559
3559
|
function getIdlForNetwork(network) {
|
|
3560
3560
|
return network === "devnet" ? veilix_devnet_default : veilix_default;
|
|
3561
3561
|
}
|
|
3562
|
-
var MAINNET_INDEXER_URL = "https://idx.
|
|
3563
|
-
var DEVNET_INDEXER_URL = "https://
|
|
3562
|
+
var MAINNET_INDEXER_URL = "https://idx.veilixprotocol.com";
|
|
3563
|
+
var DEVNET_INDEXER_URL = "https://api.veilixprotocol.com";
|
|
3564
3564
|
var INDEXER_URLS_BY_NETWORK = {
|
|
3565
3565
|
mainnet: MAINNET_INDEXER_URL,
|
|
3566
3566
|
devnet: DEVNET_INDEXER_URL
|
|
@@ -3568,8 +3568,9 @@ var INDEXER_URLS_BY_NETWORK = {
|
|
|
3568
3568
|
function getIndexerUrlForNetwork(network) {
|
|
3569
3569
|
return INDEXER_URLS_BY_NETWORK[network];
|
|
3570
3570
|
}
|
|
3571
|
-
var
|
|
3572
|
-
var
|
|
3571
|
+
var RISK_API_URL = "https://api.veilixprotocol.com";
|
|
3572
|
+
var MAINNET_RISK_API_URL = RISK_API_URL;
|
|
3573
|
+
var DEVNET_RISK_API_URL = RISK_API_URL;
|
|
3573
3574
|
var RISK_API_URLS_BY_NETWORK = {
|
|
3574
3575
|
mainnet: MAINNET_RISK_API_URL,
|
|
3575
3576
|
devnet: DEVNET_RISK_API_URL
|
|
@@ -3578,7 +3579,7 @@ function getRiskApiUrlForNetwork(network) {
|
|
|
3578
3579
|
return RISK_API_URLS_BY_NETWORK[network];
|
|
3579
3580
|
}
|
|
3580
3581
|
var MAINNET_TOKEN_MINTS = {
|
|
3581
|
-
Veilix: "
|
|
3582
|
+
Veilix: "GAFN64LvtCBoc5BHncVn3JEJGpq42rUzQjPmvMK2UhZH",
|
|
3582
3583
|
Bitcoin: "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh",
|
|
3583
3584
|
Ethereum: "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs",
|
|
3584
3585
|
USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
|
|
@@ -3657,7 +3658,7 @@ var WITHDRAW_CIRCUIT_SHA256 = {
|
|
|
3657
3658
|
zkey: "64a4d915099f6fe6bfa06e151c254843be8773c7991c742260019dc5184e5d82"
|
|
3658
3659
|
};
|
|
3659
3660
|
var CIRCUIT_CDN_PACKAGE = "veilix-sdk";
|
|
3660
|
-
var CIRCUIT_CDN_VERSION = "0.0.
|
|
3661
|
+
var CIRCUIT_CDN_VERSION = "0.0.3";
|
|
3661
3662
|
function resolveCircuitPathsFromBase(base) {
|
|
3662
3663
|
const root = base.endsWith("/") ? base : `${base}/`;
|
|
3663
3664
|
return {
|
|
@@ -3794,7 +3795,6 @@ async function createRuntimeConfig(options) {
|
|
|
3794
3795
|
const program = new Program(getIdlForNetwork(network), provider);
|
|
3795
3796
|
const circuitPaths = options.circuitPathsBase !== void 0 ? resolveCircuitPathsFromBase(options.circuitPathsBase) : resolveBrowserCircuitPaths() ?? void 0;
|
|
3796
3797
|
return {
|
|
3797
|
-
rangeApiKey: options.rangeApiKey,
|
|
3798
3798
|
rpcEndpoint,
|
|
3799
3799
|
network,
|
|
3800
3800
|
programId: getProgramIdForNetwork(network),
|
|
@@ -3840,9 +3840,6 @@ function resolveAllowedTokenFromMint(mint) {
|
|
|
3840
3840
|
`veilix-sdk: token mint ${normalized} is not supported on ${getConfig().network}`
|
|
3841
3841
|
);
|
|
3842
3842
|
}
|
|
3843
|
-
function getRangeApiKey() {
|
|
3844
|
-
return getConfig().rangeApiKey;
|
|
3845
|
-
}
|
|
3846
3843
|
function getRpcEndpoint() {
|
|
3847
3844
|
return getConfig().rpcEndpoint;
|
|
3848
3845
|
}
|
|
@@ -12581,11 +12578,8 @@ function getRangeRiskScoreJob(address) {
|
|
|
12581
12578
|
tasks: [
|
|
12582
12579
|
{
|
|
12583
12580
|
httpTask: {
|
|
12584
|
-
url:
|
|
12585
|
-
headers: [
|
|
12586
|
-
{ key: "accept", value: "application/json" },
|
|
12587
|
-
{ key: "X-API-KEY", value: "${RANGE_API_KEY}" }
|
|
12588
|
-
]
|
|
12581
|
+
url: `${RISK_API_URL}/v1/risk/address?address=${address}&network=solana`,
|
|
12582
|
+
headers: [{ key: "accept", value: "application/json" }]
|
|
12589
12583
|
}
|
|
12590
12584
|
},
|
|
12591
12585
|
{ jsonParseTask: { path: "$.riskScore" } },
|
|
@@ -12603,7 +12597,6 @@ function getRangeRiskScoreJob(address) {
|
|
|
12603
12597
|
}
|
|
12604
12598
|
async function getOracleQuote(payer, addressToCheck) {
|
|
12605
12599
|
const rpcUrl = getRpcEndpoint();
|
|
12606
|
-
const rangeApiKey = getRangeApiKey();
|
|
12607
12600
|
const queue = await sb.getQueue({
|
|
12608
12601
|
solanaRPCUrl: rpcUrl,
|
|
12609
12602
|
queueAddress: getDepositQueueAddress()
|
|
@@ -12617,7 +12610,6 @@ async function getOracleQuote(payer, addressToCheck) {
|
|
|
12617
12610
|
maxJobRangePct: 100
|
|
12618
12611
|
};
|
|
12619
12612
|
const sigVerifyIx = await queue.fetchQuoteIx(crossbarClient, [feed], {
|
|
12620
|
-
variableOverrides: { RANGE_API_KEY: rangeApiKey },
|
|
12621
12613
|
numSignatures: 1,
|
|
12622
12614
|
instructionIdx: 0
|
|
12623
12615
|
});
|
|
@@ -13889,9 +13881,6 @@ var VeilixSDK = class _VeilixSDK {
|
|
|
13889
13881
|
getConfig() {
|
|
13890
13882
|
return this.config;
|
|
13891
13883
|
}
|
|
13892
|
-
getRangeApiKey() {
|
|
13893
|
-
return this.config.rangeApiKey;
|
|
13894
|
-
}
|
|
13895
13884
|
getRpcEndpoint() {
|
|
13896
13885
|
return this.config.rpcEndpoint;
|
|
13897
13886
|
}
|