arc-sdk-test 0.0.3 → 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.
@@ -1,4 +1,4 @@
1
- import { N as Network, A as ArcaneSDK } from '../ArcaneSDK-dPZCBtDG.cjs';
1
+ import { A as ArcaneSDK } from '../ArcaneSDK-dPZCBtDG.cjs';
2
2
  import '@solana/web3.js';
3
3
  import '@switchboard-xyz/common';
4
4
  import '@coral-xyz/anchor';
@@ -6,11 +6,6 @@ import '@coral-xyz/anchor/dist/cjs/provider';
6
6
 
7
7
  type UseArcaneSdkOptions = {
8
8
  rangeApiKey: string;
9
- /**
10
- * Cluster override when the RPC URL does not contain `devnet` / `mainnet` hints
11
- * (common with private RPC providers).
12
- */
13
- network?: Network;
14
9
  };
15
10
  /**
16
11
  * React hook that builds an {@link ArcaneSDK} from wallet-adapter context.
@@ -1,4 +1,4 @@
1
- import { N as Network, A as ArcaneSDK } from '../ArcaneSDK-dPZCBtDG.js';
1
+ import { A as ArcaneSDK } from '../ArcaneSDK-dPZCBtDG.js';
2
2
  import '@solana/web3.js';
3
3
  import '@switchboard-xyz/common';
4
4
  import '@coral-xyz/anchor';
@@ -6,11 +6,6 @@ import '@coral-xyz/anchor/dist/cjs/provider';
6
6
 
7
7
  type UseArcaneSdkOptions = {
8
8
  rangeApiKey: string;
9
- /**
10
- * Cluster override when the RPC URL does not contain `devnet` / `mainnet` hints
11
- * (common with private RPC providers).
12
- */
13
- network?: Network;
14
9
  };
15
10
  /**
16
11
  * React hook that builds an {@link ArcaneSDK} from wallet-adapter context.
@@ -1,4 +1,4 @@
1
- import { useConnection, useAnchorWallet } from '@solana/wallet-adapter-react';
1
+ import { useConnection, useWallet } from '@solana/wallet-adapter-react';
2
2
  import { useState, useEffect } from 'react';
3
3
  import { PublicKey, Connection, Transaction, ComputeBudgetProgram, Keypair } from '@solana/web3.js';
4
4
  import { Buffer } from 'buffer';
@@ -12803,9 +12803,9 @@ var ArcaneSDK = class _ArcaneSDK {
12803
12803
 
12804
12804
  // src/react/useArcaneSdk.ts
12805
12805
  function useArcaneSdk(options) {
12806
- const { rangeApiKey, network } = options;
12806
+ const { rangeApiKey } = options;
12807
12807
  const { connection } = useConnection();
12808
- const wallet = useAnchorWallet();
12808
+ const wallet = useWallet();
12809
12809
  const [sdk, setSdk] = useState(null);
12810
12810
  useEffect(() => {
12811
12811
  if (!wallet) {
@@ -12816,8 +12816,7 @@ function useArcaneSdk(options) {
12816
12816
  void ArcaneSDK.create({
12817
12817
  rangeApiKey,
12818
12818
  connection,
12819
- wallet,
12820
- network
12819
+ wallet
12821
12820
  }).then((instance) => {
12822
12821
  if (!cancelled) {
12823
12822
  setSdk(instance);
@@ -12826,7 +12825,7 @@ function useArcaneSdk(options) {
12826
12825
  return () => {
12827
12826
  cancelled = true;
12828
12827
  };
12829
- }, [connection, wallet, rangeApiKey, network]);
12828
+ }, [connection, wallet, rangeApiKey]);
12830
12829
  return sdk;
12831
12830
  }
12832
12831
  /**