arc-sdk-test 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.
@@ -0,0 +1,33 @@
1
+ import { N as Network, A as ArcaneSDK } from '../ArcaneSDK-dPZCBtDG.cjs';
2
+ import '@solana/web3.js';
3
+ import '@switchboard-xyz/common';
4
+ import '@coral-xyz/anchor';
5
+ import '@coral-xyz/anchor/dist/cjs/provider';
6
+
7
+ type UseArcaneSdkOptions = {
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
+ };
15
+ /**
16
+ * React hook that builds an {@link ArcaneSDK} from wallet-adapter context.
17
+ *
18
+ * Requires `ConnectionProvider` and `WalletProvider` ancestors.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * import { useArcaneSdk } from "arc-sdk-test/react";
23
+ *
24
+ * function MyComponent() {
25
+ * const sdk = useArcaneSdk({ rangeApiKey: import.meta.env.VITE_RANGE_API_KEY });
26
+ * if (!sdk) return null;
27
+ * // ...
28
+ * }
29
+ * ```
30
+ */
31
+ declare function useArcaneSdk(options: UseArcaneSdkOptions): ArcaneSDK | null;
32
+
33
+ export { type UseArcaneSdkOptions, useArcaneSdk };
@@ -0,0 +1,33 @@
1
+ import { N as Network, A as ArcaneSDK } from '../ArcaneSDK-dPZCBtDG.js';
2
+ import '@solana/web3.js';
3
+ import '@switchboard-xyz/common';
4
+ import '@coral-xyz/anchor';
5
+ import '@coral-xyz/anchor/dist/cjs/provider';
6
+
7
+ type UseArcaneSdkOptions = {
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
+ };
15
+ /**
16
+ * React hook that builds an {@link ArcaneSDK} from wallet-adapter context.
17
+ *
18
+ * Requires `ConnectionProvider` and `WalletProvider` ancestors.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * import { useArcaneSdk } from "arc-sdk-test/react";
23
+ *
24
+ * function MyComponent() {
25
+ * const sdk = useArcaneSdk({ rangeApiKey: import.meta.env.VITE_RANGE_API_KEY });
26
+ * if (!sdk) return null;
27
+ * // ...
28
+ * }
29
+ * ```
30
+ */
31
+ declare function useArcaneSdk(options: UseArcaneSdkOptions): ArcaneSDK | null;
32
+
33
+ export { type UseArcaneSdkOptions, useArcaneSdk };