veilix-sdk 0.0.2 → 0.0.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/README.md +2 -5
- package/dist/{VeilixSDK-DBfh30Dv.d.ts → VeilixSDK-gVJF57i3.d.ts} +4 -8
- package/dist/{VeilixSDK-Dg8RSskQ.d.cts → VeilixSDK-zBJW48DL.d.cts} +4 -8
- package/dist/circuits/paths.cjs.map +1 -1
- package/dist/circuits/paths.js.map +1 -1
- package/dist/index.cjs +5 -16
- 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 +5 -16
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +7 -19
- 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 +7 -19
- 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, 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-zBJW48DL.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-gVJF57i3.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
|
@@ -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
|
|
@@ -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
|
}
|