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.
@@ -3596,8 +3596,9 @@ var INDEXER_URLS_BY_NETWORK = {
3596
3596
  function getIndexerUrlForNetwork(network) {
3597
3597
  return INDEXER_URLS_BY_NETWORK[network];
3598
3598
  }
3599
- var MAINNET_RISK_API_URL = "https://range.veilixprivacy.com";
3600
- var DEVNET_RISK_API_URL = "https://risk.veilixprivacy.com";
3599
+ var RISK_API_URL = "https://api.veilixprotocol.com";
3600
+ var MAINNET_RISK_API_URL = RISK_API_URL;
3601
+ var DEVNET_RISK_API_URL = RISK_API_URL;
3601
3602
  var RISK_API_URLS_BY_NETWORK = {
3602
3603
  mainnet: MAINNET_RISK_API_URL,
3603
3604
  devnet: DEVNET_RISK_API_URL
@@ -3822,7 +3823,6 @@ async function createRuntimeConfig(options) {
3822
3823
  const program = new anchor.Program(getIdlForNetwork(network), provider);
3823
3824
  const circuitPaths = options.circuitPathsBase !== void 0 ? resolveCircuitPathsFromBase(options.circuitPathsBase) : resolveBrowserCircuitPaths() ?? void 0;
3824
3825
  return {
3825
- rangeApiKey: options.rangeApiKey,
3826
3826
  rpcEndpoint,
3827
3827
  network,
3828
3828
  programId: getProgramIdForNetwork(network),
@@ -3868,9 +3868,6 @@ function resolveAllowedTokenFromMint(mint) {
3868
3868
  `veilix-sdk: token mint ${normalized} is not supported on ${getConfig().network}`
3869
3869
  );
3870
3870
  }
3871
- function getRangeApiKey() {
3872
- return getConfig().rangeApiKey;
3873
- }
3874
3871
  function getRpcEndpoint() {
3875
3872
  return getConfig().rpcEndpoint;
3876
3873
  }
@@ -12609,11 +12606,8 @@ function getRangeRiskScoreJob(address) {
12609
12606
  tasks: [
12610
12607
  {
12611
12608
  httpTask: {
12612
- url: `https://api.range.org/v1/risk/address?address=${address}&network=solana`,
12613
- headers: [
12614
- { key: "accept", value: "application/json" },
12615
- { key: "X-API-KEY", value: "${RANGE_API_KEY}" }
12616
- ]
12609
+ url: `${RISK_API_URL}/v1/risk/address?address=${address}&network=solana`,
12610
+ headers: [{ key: "accept", value: "application/json" }]
12617
12611
  }
12618
12612
  },
12619
12613
  { jsonParseTask: { path: "$.riskScore" } },
@@ -12631,7 +12625,6 @@ function getRangeRiskScoreJob(address) {
12631
12625
  }
12632
12626
  async function getOracleQuote(payer, addressToCheck) {
12633
12627
  const rpcUrl = getRpcEndpoint();
12634
- const rangeApiKey = getRangeApiKey();
12635
12628
  const queue = await sb__namespace.getQueue({
12636
12629
  solanaRPCUrl: rpcUrl,
12637
12630
  queueAddress: getDepositQueueAddress()
@@ -12645,7 +12638,6 @@ async function getOracleQuote(payer, addressToCheck) {
12645
12638
  maxJobRangePct: 100
12646
12639
  };
12647
12640
  const sigVerifyIx = await queue.fetchQuoteIx(crossbarClient, [feed], {
12648
- variableOverrides: { RANGE_API_KEY: rangeApiKey },
12649
12641
  numSignatures: 1,
12650
12642
  instructionIdx: 0
12651
12643
  });
@@ -13917,9 +13909,6 @@ var VeilixSDK = class _VeilixSDK {
13917
13909
  getConfig() {
13918
13910
  return this.config;
13919
13911
  }
13920
- getRangeApiKey() {
13921
- return this.config.rangeApiKey;
13922
- }
13923
13912
  getRpcEndpoint() {
13924
13913
  return this.config.rpcEndpoint;
13925
13914
  }
@@ -14177,7 +14166,7 @@ var VeilixSDK = class _VeilixSDK {
14177
14166
 
14178
14167
  // src/react/useVeilixSdk.ts
14179
14168
  function useVeilixSdk(options) {
14180
- const { rangeApiKey, network, circuitPathsBase } = options;
14169
+ const { network, circuitPathsBase } = options;
14181
14170
  const { connection } = walletAdapterReact.useConnection();
14182
14171
  const wallet = walletAdapterReact.useWallet();
14183
14172
  const [sdk, setSdk] = react.useState(null);
@@ -14188,7 +14177,6 @@ function useVeilixSdk(options) {
14188
14177
  }
14189
14178
  let cancelled = false;
14190
14179
  void VeilixSDK.create({
14191
- rangeApiKey,
14192
14180
  network,
14193
14181
  connection,
14194
14182
  wallet,
@@ -14201,7 +14189,7 @@ function useVeilixSdk(options) {
14201
14189
  return () => {
14202
14190
  cancelled = true;
14203
14191
  };
14204
- }, [connection, wallet, rangeApiKey, network, circuitPathsBase]);
14192
+ }, [connection, wallet, network, circuitPathsBase]);
14205
14193
  return sdk;
14206
14194
  }
14207
14195
  /**