@solana/react-hooks 0.0.0 → 0.0.2

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.
Files changed (92) hide show
  1. package/README.md +114 -25
  2. package/dist/index.browser.cjs +1144 -0
  3. package/dist/index.browser.cjs.map +1 -0
  4. package/dist/index.browser.mjs +1109 -0
  5. package/dist/index.browser.mjs.map +1 -0
  6. package/dist/index.native.mjs +1109 -0
  7. package/dist/index.native.mjs.map +1 -0
  8. package/dist/index.node.cjs +1144 -0
  9. package/dist/index.node.cjs.map +1 -0
  10. package/dist/index.node.mjs +1109 -0
  11. package/dist/index.node.mjs.map +1 -0
  12. package/dist/types/client/src/client/actions.d.ts +18 -0
  13. package/dist/types/client/src/client/actions.d.ts.map +1 -0
  14. package/dist/types/client/src/client/createClient.d.ts +9 -0
  15. package/dist/types/client/src/client/createClient.d.ts.map +1 -0
  16. package/dist/types/client/src/client/createClientHelpers.d.ts +3 -0
  17. package/dist/types/client/src/client/createClientHelpers.d.ts.map +1 -0
  18. package/dist/types/client/src/client/createClientStore.d.ts +29 -0
  19. package/dist/types/client/src/client/createClientStore.d.ts.map +1 -0
  20. package/dist/types/client/src/client/watchers.d.ts +16 -0
  21. package/dist/types/client/src/client/watchers.d.ts.map +1 -0
  22. package/dist/types/client/src/controllers/solTransferController.d.ts +21 -0
  23. package/dist/types/client/src/controllers/solTransferController.d.ts.map +1 -0
  24. package/dist/types/client/src/controllers/splTransferController.d.ts +24 -0
  25. package/dist/types/client/src/controllers/splTransferController.d.ts.map +1 -0
  26. package/dist/types/client/src/features/sol.d.ts +41 -0
  27. package/dist/types/client/src/features/sol.d.ts.map +1 -0
  28. package/dist/types/client/src/features/spl.d.ts +59 -0
  29. package/dist/types/client/src/features/spl.d.ts.map +1 -0
  30. package/dist/types/client/src/features/transactions.d.ts +79 -0
  31. package/dist/types/client/src/features/transactions.d.ts.map +1 -0
  32. package/dist/types/client/src/index.d.ts +25 -0
  33. package/dist/types/client/src/index.d.ts.map +1 -0
  34. package/dist/types/client/src/logging/logger.d.ts +24 -0
  35. package/dist/types/client/src/logging/logger.d.ts.map +1 -0
  36. package/dist/types/client/src/numeric/amounts.d.ts +30 -0
  37. package/dist/types/client/src/numeric/amounts.d.ts.map +1 -0
  38. package/dist/types/client/src/numeric/lamports.d.ts +46 -0
  39. package/dist/types/client/src/numeric/lamports.d.ts.map +1 -0
  40. package/dist/types/client/src/numeric/math.d.ts +74 -0
  41. package/dist/types/client/src/numeric/math.d.ts.map +1 -0
  42. package/dist/types/client/src/numeric/rational.d.ts +27 -0
  43. package/dist/types/client/src/numeric/rational.d.ts.map +1 -0
  44. package/dist/types/client/src/rpc/createSolanaRpcClient.d.ts +42 -0
  45. package/dist/types/client/src/rpc/createSolanaRpcClient.d.ts.map +1 -0
  46. package/dist/types/client/src/serialization/json.d.ts +31 -0
  47. package/dist/types/client/src/serialization/json.d.ts.map +1 -0
  48. package/dist/types/client/src/signatures/status.d.ts +12 -0
  49. package/dist/types/client/src/signatures/status.d.ts.map +1 -0
  50. package/dist/types/client/src/signers/walletTransactionSigner.d.ts +33 -0
  51. package/dist/types/client/src/signers/walletTransactionSigner.d.ts.map +1 -0
  52. package/dist/types/client/src/state/asyncState.d.ts +12 -0
  53. package/dist/types/client/src/state/asyncState.d.ts.map +1 -0
  54. package/dist/types/client/src/transactions/base64.d.ts +12 -0
  55. package/dist/types/client/src/transactions/base64.d.ts.map +1 -0
  56. package/dist/types/client/src/transactions/prepareTransaction.d.ts +16 -0
  57. package/dist/types/client/src/transactions/prepareTransaction.d.ts.map +1 -0
  58. package/dist/types/client/src/transactions/referenceKeys.d.ts +10 -0
  59. package/dist/types/client/src/transactions/referenceKeys.d.ts.map +1 -0
  60. package/dist/types/client/src/transactions/transactionPoolController.d.ts +53 -0
  61. package/dist/types/client/src/transactions/transactionPoolController.d.ts.map +1 -0
  62. package/dist/types/client/src/types.d.ts +205 -0
  63. package/dist/types/client/src/types.d.ts.map +1 -0
  64. package/dist/types/client/src/utils/addressLike.d.ts +5 -0
  65. package/dist/types/client/src/utils/addressLike.d.ts.map +1 -0
  66. package/dist/types/client/src/utils/stableStringify.d.ts +2 -0
  67. package/dist/types/client/src/utils/stableStringify.d.ts.map +1 -0
  68. package/dist/types/client/src/utils.d.ts +21 -0
  69. package/dist/types/client/src/utils.d.ts.map +1 -0
  70. package/dist/types/client/src/wallet/registry.d.ts +9 -0
  71. package/dist/types/client/src/wallet/registry.d.ts.map +1 -0
  72. package/dist/types/client/src/wallet/standard.d.ts +36 -0
  73. package/dist/types/client/src/wallet/standard.d.ts.map +1 -0
  74. package/dist/types/react-hooks/src/QueryProvider.d.ts +11 -0
  75. package/dist/types/react-hooks/src/QueryProvider.d.ts.map +1 -0
  76. package/dist/types/react-hooks/src/context.d.ts +22 -0
  77. package/dist/types/react-hooks/src/context.d.ts.map +1 -0
  78. package/dist/types/react-hooks/src/hooks.d.ts +208 -0
  79. package/dist/types/react-hooks/src/hooks.d.ts.map +1 -0
  80. package/dist/types/react-hooks/src/index.d.ts +8 -0
  81. package/dist/types/react-hooks/src/index.d.ts.map +1 -0
  82. package/dist/types/react-hooks/src/query.d.ts +20 -0
  83. package/dist/types/react-hooks/src/query.d.ts.map +1 -0
  84. package/dist/types/react-hooks/src/queryHooks.d.ts +43 -0
  85. package/dist/types/react-hooks/src/queryHooks.d.ts.map +1 -0
  86. package/dist/types/react-hooks/src/querySuspenseContext.d.ts +4 -0
  87. package/dist/types/react-hooks/src/querySuspenseContext.d.ts.map +1 -0
  88. package/dist/types/react-hooks/src/useClientStore.d.ts +6 -0
  89. package/dist/types/react-hooks/src/useClientStore.d.ts.map +1 -0
  90. package/dist/types/react-hooks/src/walletStandardHooks.d.ts +78 -0
  91. package/dist/types/react-hooks/src/walletStandardHooks.d.ts.map +1 -0
  92. package/package.json +88 -84
@@ -0,0 +1,43 @@
1
+ import { type AddressLike, type SolanaClient } from '@solana/client';
2
+ import { type Base64EncodedWireTransaction, type Commitment, type SendableTransaction, type Transaction } from '@solana/kit';
3
+ import type { SolanaQueryResult, UseSolanaRpcQueryOptions } from './query';
4
+ type RpcInstance = SolanaClient['runtime']['rpc'];
5
+ type LatestBlockhashPlan = ReturnType<RpcInstance['getLatestBlockhash']>;
6
+ type LatestBlockhashResponse = Awaited<ReturnType<LatestBlockhashPlan['send']>>;
7
+ type ProgramAccountsPlan = ReturnType<RpcInstance['getProgramAccounts']>;
8
+ type ProgramAccountsConfig = Parameters<RpcInstance['getProgramAccounts']>[1];
9
+ type ProgramAccountsResponse = Awaited<ReturnType<ProgramAccountsPlan['send']>>;
10
+ type SimulateTransactionPlan = ReturnType<RpcInstance['simulateTransaction']>;
11
+ type SimulateTransactionConfig = Parameters<RpcInstance['simulateTransaction']>[1];
12
+ type SimulateTransactionResponse = Awaited<ReturnType<SimulateTransactionPlan['send']>>;
13
+ export type UseLatestBlockhashOptions = Omit<UseSolanaRpcQueryOptions<LatestBlockhashResponse>, 'refreshInterval'> & Readonly<{
14
+ commitment?: Commitment;
15
+ minContextSlot?: bigint | number;
16
+ refreshInterval?: number;
17
+ }>;
18
+ export type LatestBlockhashQueryResult = SolanaQueryResult<LatestBlockhashResponse> & Readonly<{
19
+ blockhash: string | null;
20
+ contextSlot: bigint | null | undefined;
21
+ lastValidBlockHeight: bigint | null;
22
+ }>;
23
+ export declare function useLatestBlockhash(options?: UseLatestBlockhashOptions): LatestBlockhashQueryResult;
24
+ export type UseProgramAccountsOptions = UseSolanaRpcQueryOptions<ProgramAccountsResponse> & Readonly<{
25
+ commitment?: Commitment;
26
+ config?: ProgramAccountsConfig;
27
+ }>;
28
+ export type ProgramAccountsQueryResult = SolanaQueryResult<ProgramAccountsResponse> & Readonly<{
29
+ accounts: ProgramAccountsResponse;
30
+ }>;
31
+ export declare function useProgramAccounts(programAddress?: AddressLike, options?: UseProgramAccountsOptions): ProgramAccountsQueryResult;
32
+ export type UseSimulateTransactionOptions = Omit<UseSolanaRpcQueryOptions<SimulateTransactionResponse>, 'refreshInterval'> & Readonly<{
33
+ commitment?: Commitment;
34
+ config?: SimulateTransactionConfig;
35
+ refreshInterval?: number;
36
+ }>;
37
+ export type SimulateTransactionQueryResult = SolanaQueryResult<SimulateTransactionResponse> & Readonly<{
38
+ logs: readonly string[];
39
+ }>;
40
+ type SimulationInput = (SendableTransaction & Transaction) | Base64EncodedWireTransaction | string;
41
+ export declare function useSimulateTransaction(transaction?: SimulationInput | null, options?: UseSimulateTransactionOptions): SimulateTransactionQueryResult;
42
+ export {};
43
+ //# sourceMappingURL=queryHooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryHooks.d.ts","sourceRoot":"","sources":["../../../../src/queryHooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAA+C,MAAM,gBAAgB,CAAC;AAClH,OAAO,EACN,KAAK,4BAA4B,EACjC,KAAK,UAAU,EAEf,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAG3E,KAAK,WAAW,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;AAElD,KAAK,mBAAmB,GAAG,UAAU,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC;AACzE,KAAK,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAEhF,KAAK,mBAAmB,GAAG,UAAU,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC;AACzE,KAAK,qBAAqB,GAAG,UAAU,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9E,KAAK,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAEhF,KAAK,uBA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B5B;AAED,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC/C,wBAAwB,CAAC,2BAA2B,CAAC,EACrD,iBAAiB,CACjB,GACA,QAAQ,CAAC;IACR,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC,CAAC;AAEJ,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC,2BAA2B,CAAC,GAC1F,QAAQ,CAAC;IACR,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CACxB,CAAC,CAAC;AAEJ,KAAK,eAAe,GAAG,CAAC,mBAAmB,GAAG,WAAW,CAAC,GAAG,4BAA4B,GAAG,MAAM,CAAC;AAEnG,wBAAgB,sBAAsB,CACrC,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,EACpC,OAAO,CAAC,EAAE,6BAA6B,GACrC,8BAA8B,CAuChC"}
@@ -0,0 +1,4 @@
1
+ declare const QuerySuspenseContext: import("react").Context<boolean | undefined>;
2
+ export declare function useQuerySuspensePreference(): boolean | undefined;
3
+ export { QuerySuspenseContext };
4
+ //# sourceMappingURL=querySuspenseContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"querySuspenseContext.d.ts","sourceRoot":"","sources":["../../../../src/querySuspenseContext.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,oBAAoB,8CAAgD,CAAC;AAE3E,wBAAgB,0BAA0B,IAAI,OAAO,GAAG,SAAS,CAEhE;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ClientState } from '@solana/client';
2
+ type Selector<T> = (state: ClientState) => T;
3
+ export declare function useClientStore(): ClientState;
4
+ export declare function useClientStore<T>(selector: Selector<T>): T;
5
+ export {};
6
+ //# sourceMappingURL=useClientStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClientStore.d.ts","sourceRoot":"","sources":["../../../../src/useClientStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,KAAK,CAAC,CAAC;AAG7C,wBAAgB,cAAc,IAAI,WAAW,CAAC;AAC9C,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC"}
@@ -0,0 +1,78 @@
1
+ import type { MessageModifyingSigner, TransactionModifyingSigner, TransactionSendingSigner } from '@solana/signers';
2
+ import { type SolanaSignAndSendTransactionInput, type SolanaSignAndSendTransactionOutput, type SolanaSignInInput, type SolanaSignInOutput, type SolanaSignMessageInput, type SolanaSignMessageOutput, type SolanaSignTransactionInput, type SolanaSignTransactionOutput } from '@solana/wallet-standard-features';
3
+ import type { IdentifierArray } from '@wallet-standard/base';
4
+ import type { UiWallet, UiWalletAccount } from '@wallet-standard/ui';
5
+ type AssertSolanaChain<T> = T extends `solana:${string}` ? T : never;
6
+ /**
7
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
8
+ */
9
+ export type OnlySolanaChains<T extends IdentifierArray> = T extends IdentifierArray ? AssertSolanaChain<T[number]> : never;
10
+ type SignAndSendInput = Readonly<Omit<SolanaSignAndSendTransactionInput, 'account' | 'chain' | 'options'> & {
11
+ options?: Readonly<{
12
+ minContextSlot?: bigint;
13
+ }>;
14
+ }>;
15
+ type SignAndSendOutput = SolanaSignAndSendTransactionOutput;
16
+ /**
17
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
18
+ */
19
+ export declare function useSignAndSendTransaction<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount, chain: OnlySolanaChains<TWalletAccount['chains']>): (input: SignAndSendInput) => Promise<SignAndSendOutput>;
20
+ /**
21
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
22
+ */
23
+ export declare function useSignAndSendTransaction<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount, chain: `solana:${string}`): (input: SignAndSendInput) => Promise<SignAndSendOutput>;
24
+ type SignInInput = SolanaSignInInput;
25
+ type SignInOutput = Omit<SolanaSignInOutput, 'account' | 'signatureType'> & Readonly<{
26
+ account: UiWalletAccount;
27
+ }>;
28
+ /**
29
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
30
+ */
31
+ export declare function useSignIn(uiWalletAccount: UiWalletAccount): (input?: Omit<SignInInput, 'address'>) => Promise<SignInOutput>;
32
+ /**
33
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
34
+ */
35
+ export declare function useSignIn(uiWallet: UiWallet): (input?: SignInInput) => Promise<SignInOutput>;
36
+ type SignMessageInput = Omit<SolanaSignMessageInput, 'account'>;
37
+ type SignMessageOutput = Omit<SolanaSignMessageOutput, 'signatureType'>;
38
+ /**
39
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
40
+ */
41
+ export declare function useSignMessage<TWalletAccount extends UiWalletAccount>(...config: Parameters<typeof useSignMessages<TWalletAccount>>): (input: SignMessageInput) => Promise<SignMessageOutput>;
42
+ declare function useSignMessages<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount): (...inputs: readonly SignMessageInput[]) => Promise<readonly SignMessageOutput[]>;
43
+ type SignTransactionInput = Readonly<Omit<SolanaSignTransactionInput, 'account' | 'chain' | 'options'> & {
44
+ options?: Readonly<{
45
+ minContextSlot?: bigint;
46
+ }>;
47
+ }>;
48
+ type SignTransactionOutput = SolanaSignTransactionOutput;
49
+ /**
50
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
51
+ */
52
+ export declare function useSignTransaction<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount, chain: OnlySolanaChains<TWalletAccount['chains']>): (input: SignTransactionInput) => Promise<SignTransactionOutput>;
53
+ /**
54
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
55
+ */
56
+ export declare function useSignTransaction<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount, chain: `solana:${string}`): (input: SignTransactionInput) => Promise<SignTransactionOutput>;
57
+ /**
58
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
59
+ */
60
+ export declare function useWalletAccountMessageSigner<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount): MessageModifyingSigner<TWalletAccount['address']>;
61
+ /**
62
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
63
+ */
64
+ export declare function useWalletAccountTransactionSigner<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount, chain: OnlySolanaChains<TWalletAccount['chains']>): TransactionModifyingSigner<TWalletAccount['address']>;
65
+ /**
66
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
67
+ */
68
+ export declare function useWalletAccountTransactionSigner<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount, chain: `solana:${string}`): TransactionModifyingSigner<TWalletAccount['address']>;
69
+ /**
70
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
71
+ */
72
+ export declare function useWalletAccountTransactionSendingSigner<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount, chain: OnlySolanaChains<TWalletAccount['chains']>): TransactionSendingSigner<TWalletAccount['address']>;
73
+ /**
74
+ * @deprecated Use `@solana/react` for Wallet Standard hooks; this shim will be removed in a future release.
75
+ */
76
+ export declare function useWalletAccountTransactionSendingSigner<TWalletAccount extends UiWalletAccount>(uiWalletAccount: TWalletAccount, chain: `solana:${string}`): TransactionSendingSigner<TWalletAccount['address']>;
77
+ export {};
78
+ //# sourceMappingURL=walletStandardHooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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,EAC/B,KAAK,EAAE,gBAAgB,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,GAC/C,wBAAwB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;AACvD;;GAEG;AACH,wBAAgB,wCAAwC,CAAC,cAAc,SAAS,eAAe,EAC9F,eAAe,EAAE,cAAc,EAC/B,KAAK,EAAE,UAAU,MAAM,EAAE,GACvB,wBAAwB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,85 +1,89 @@
1
1
  {
2
- "name": "@solana/react-hooks",
3
- "version": "0.0.0",
4
- "description": "React hooks for the @solana/client-core Solana client",
5
- "exports": {
6
- "edge-light": {
7
- "import": "./dist/index.node.mjs",
8
- "require": "./dist/index.node.cjs"
9
- },
10
- "workerd": {
11
- "import": "./dist/index.node.mjs",
12
- "require": "./dist/index.node.cjs"
13
- },
14
- "browser": {
15
- "import": "./dist/index.browser.mjs",
16
- "require": "./dist/index.browser.cjs"
17
- },
18
- "node": {
19
- "import": "./dist/index.node.mjs",
20
- "require": "./dist/index.node.cjs"
21
- },
22
- "react-native": "./dist/index.native.mjs",
23
- "types": "./dist/types/index.d.ts"
24
- },
25
- "browser": {
26
- "./dist/index.node.cjs": "./dist/index.browser.cjs",
27
- "./dist/index.node.mjs": "./dist/index.browser.mjs"
28
- },
29
- "main": "./dist/index.node.cjs",
30
- "module": "./dist/index.node.mjs",
31
- "react-native": "./dist/index.native.mjs",
32
- "types": "./dist/types/index.d.ts",
33
- "type": "commonjs",
34
- "files": [
35
- "./dist/"
36
- ],
37
- "sideEffects": false,
38
- "keywords": [
39
- "solana",
40
- "web3",
41
- "react",
42
- "hooks"
43
- ],
44
- "scripts": {
45
- "build": "pnpm compile:js && pnpm compile:typedefs",
46
- "compile:js": "tsup --config ../build-scripts/tsup.config.package.ts",
47
- "compile:typedefs": "tsc -p ./tsconfig.declarations.json",
48
- "format": "biome check --write src",
49
- "lint": "biome check src",
50
- "test:typecheck": "tsc --noEmit",
51
- "test": "vitest run --config ../../vitest.config.ts",
52
- "typecheck": "pnpm test:typecheck"
53
- },
54
- "author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
55
- "license": "MIT",
56
- "dependencies": {
57
- "@solana/client-core": "workspace:*",
58
- "@solana/addresses": "^5.0.0",
59
- "@solana/codecs-core": "^5.0.0",
60
- "@solana/errors": "^5.0.0",
61
- "@solana/keys": "^5.0.0",
62
- "@solana/promises": "^5.0.0",
63
- "@solana/signers": "^5.0.0",
64
- "@solana/transaction-messages": "^5.0.0",
65
- "@solana/transactions": "^5.0.0",
66
- "@solana/wallet-standard-features": "^1.3.0",
67
- "@solana/kit": "^5.0.0",
68
- "swr": "^2.3.6",
69
- "zustand": "^5.0.0",
70
- "@wallet-standard/base": "^1.1.0",
71
- "@wallet-standard/errors": "^0.1.1",
72
- "@wallet-standard/ui": "^1.0.1",
73
- "@wallet-standard/ui-registry": "^1.0.1"
74
- },
75
- "devDependencies": {
76
- "@types/react": "^19",
77
- "react": "^19.0.0"
78
- },
79
- "peerDependencies": {
80
- "react": ">=18"
81
- },
82
- "engines": {
83
- "node": ">=20.18.0"
84
- }
85
- }
2
+ "name": "@solana/react-hooks",
3
+ "version": "0.0.2",
4
+ "description": "React hooks for the @solana/client Solana client",
5
+ "exports": {
6
+ "edge-light": {
7
+ "import": "./dist/index.node.mjs",
8
+ "require": "./dist/index.node.cjs"
9
+ },
10
+ "workerd": {
11
+ "import": "./dist/index.node.mjs",
12
+ "require": "./dist/index.node.cjs"
13
+ },
14
+ "browser": {
15
+ "import": "./dist/index.browser.mjs",
16
+ "require": "./dist/index.browser.cjs"
17
+ },
18
+ "node": {
19
+ "import": "./dist/index.node.mjs",
20
+ "require": "./dist/index.node.cjs"
21
+ },
22
+ "react-native": "./dist/index.native.mjs",
23
+ "types": "./dist/types/index.d.ts"
24
+ },
25
+ "browser": {
26
+ "./dist/index.node.cjs": "./dist/index.browser.cjs",
27
+ "./dist/index.node.mjs": "./dist/index.browser.mjs"
28
+ },
29
+ "main": "./dist/index.node.cjs",
30
+ "module": "./dist/index.node.mjs",
31
+ "react-native": "./dist/index.native.mjs",
32
+ "types": "./dist/types/index.d.ts",
33
+ "type": "commonjs",
34
+ "files": [
35
+ "./dist/"
36
+ ],
37
+ "sideEffects": false,
38
+ "keywords": [
39
+ "solana",
40
+ "web3",
41
+ "react",
42
+ "hooks"
43
+ ],
44
+ "author": "Solana Maintainers <maintainers@solana.foundation>",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/solana-foundation/framework-kit"
48
+ },
49
+ "license": "MIT",
50
+ "dependencies": {
51
+ "@solana/addresses": "^5.0.0",
52
+ "@solana/codecs-core": "^5.0.0",
53
+ "@solana/errors": "^5.0.0",
54
+ "@solana/keys": "^5.0.0",
55
+ "@solana/promises": "^5.0.0",
56
+ "@solana/signers": "^5.0.0",
57
+ "@solana/transaction-messages": "^5.0.0",
58
+ "@solana/transactions": "^5.0.0",
59
+ "@solana/wallet-standard-features": "^1.3.0",
60
+ "@solana/kit": "^5.0.0",
61
+ "swr": "^2.3.6",
62
+ "zustand": "^5.0.0",
63
+ "@wallet-standard/base": "^1.1.0",
64
+ "@wallet-standard/errors": "^0.1.1",
65
+ "@wallet-standard/ui": "^1.0.1",
66
+ "@wallet-standard/ui-registry": "^1.0.1",
67
+ "@solana/client": "0.0.2"
68
+ },
69
+ "devDependencies": {
70
+ "@types/react": "^19",
71
+ "react": "^19.0.0"
72
+ },
73
+ "peerDependencies": {
74
+ "react": ">=18"
75
+ },
76
+ "engines": {
77
+ "node": ">=20.18.0"
78
+ },
79
+ "scripts": {
80
+ "build": "pnpm compile:js && pnpm compile:typedefs",
81
+ "compile:js": "tsup --config ../build-scripts/tsup.config.package.ts",
82
+ "compile:typedefs": "tsc -p ./tsconfig.declarations.json",
83
+ "format": "biome check --write src",
84
+ "lint": "biome check src",
85
+ "test:typecheck": "tsc --noEmit",
86
+ "test": "vitest run --config ../../vitest.config.ts",
87
+ "typecheck": "pnpm test:typecheck"
88
+ }
89
+ }