@solana/react-hooks 0.0.2 → 0.1.0

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 (104) hide show
  1. package/dist/index.browser.cjs +189 -0
  2. package/dist/index.browser.cjs.map +1 -1
  3. package/dist/index.browser.mjs +187 -2
  4. package/dist/index.browser.mjs.map +1 -1
  5. package/dist/index.native.mjs +187 -2
  6. package/dist/index.native.mjs.map +1 -1
  7. package/dist/index.node.cjs +189 -0
  8. package/dist/index.node.cjs.map +1 -1
  9. package/dist/index.node.mjs +187 -2
  10. package/dist/index.node.mjs.map +1 -1
  11. package/dist/types/QueryProvider.d.ts.map +1 -0
  12. package/dist/types/SolanaProvider.d.ts +35 -0
  13. package/dist/types/SolanaProvider.d.ts.map +1 -0
  14. package/dist/types/context.d.ts.map +1 -0
  15. package/dist/types/{react-hooks/src/hooks.d.ts → hooks.d.ts} +1 -1
  16. package/dist/types/hooks.d.ts.map +1 -0
  17. package/dist/types/{react-hooks/src/index.d.ts → index.d.ts} +2 -0
  18. package/dist/types/index.d.ts.map +1 -0
  19. package/dist/types/query.d.ts.map +1 -0
  20. package/dist/types/queryHooks.d.ts.map +1 -0
  21. package/dist/types/querySuspenseContext.d.ts.map +1 -0
  22. package/dist/types/ui.d.ts +52 -0
  23. package/dist/types/ui.d.ts.map +1 -0
  24. package/dist/types/useClientStore.d.ts.map +1 -0
  25. package/dist/types/walletStandardHooks.d.ts.map +1 -0
  26. package/package.json +2 -2
  27. package/dist/types/client/src/client/actions.d.ts +0 -18
  28. package/dist/types/client/src/client/actions.d.ts.map +0 -1
  29. package/dist/types/client/src/client/createClient.d.ts +0 -9
  30. package/dist/types/client/src/client/createClient.d.ts.map +0 -1
  31. package/dist/types/client/src/client/createClientHelpers.d.ts +0 -3
  32. package/dist/types/client/src/client/createClientHelpers.d.ts.map +0 -1
  33. package/dist/types/client/src/client/createClientStore.d.ts +0 -29
  34. package/dist/types/client/src/client/createClientStore.d.ts.map +0 -1
  35. package/dist/types/client/src/client/watchers.d.ts +0 -16
  36. package/dist/types/client/src/client/watchers.d.ts.map +0 -1
  37. package/dist/types/client/src/controllers/solTransferController.d.ts +0 -21
  38. package/dist/types/client/src/controllers/solTransferController.d.ts.map +0 -1
  39. package/dist/types/client/src/controllers/splTransferController.d.ts +0 -24
  40. package/dist/types/client/src/controllers/splTransferController.d.ts.map +0 -1
  41. package/dist/types/client/src/features/sol.d.ts +0 -41
  42. package/dist/types/client/src/features/sol.d.ts.map +0 -1
  43. package/dist/types/client/src/features/spl.d.ts +0 -59
  44. package/dist/types/client/src/features/spl.d.ts.map +0 -1
  45. package/dist/types/client/src/features/transactions.d.ts +0 -79
  46. package/dist/types/client/src/features/transactions.d.ts.map +0 -1
  47. package/dist/types/client/src/index.d.ts +0 -25
  48. package/dist/types/client/src/index.d.ts.map +0 -1
  49. package/dist/types/client/src/logging/logger.d.ts +0 -24
  50. package/dist/types/client/src/logging/logger.d.ts.map +0 -1
  51. package/dist/types/client/src/numeric/amounts.d.ts +0 -30
  52. package/dist/types/client/src/numeric/amounts.d.ts.map +0 -1
  53. package/dist/types/client/src/numeric/lamports.d.ts +0 -46
  54. package/dist/types/client/src/numeric/lamports.d.ts.map +0 -1
  55. package/dist/types/client/src/numeric/math.d.ts +0 -74
  56. package/dist/types/client/src/numeric/math.d.ts.map +0 -1
  57. package/dist/types/client/src/numeric/rational.d.ts +0 -27
  58. package/dist/types/client/src/numeric/rational.d.ts.map +0 -1
  59. package/dist/types/client/src/rpc/createSolanaRpcClient.d.ts +0 -42
  60. package/dist/types/client/src/rpc/createSolanaRpcClient.d.ts.map +0 -1
  61. package/dist/types/client/src/serialization/json.d.ts +0 -31
  62. package/dist/types/client/src/serialization/json.d.ts.map +0 -1
  63. package/dist/types/client/src/signatures/status.d.ts +0 -12
  64. package/dist/types/client/src/signatures/status.d.ts.map +0 -1
  65. package/dist/types/client/src/signers/walletTransactionSigner.d.ts +0 -33
  66. package/dist/types/client/src/signers/walletTransactionSigner.d.ts.map +0 -1
  67. package/dist/types/client/src/state/asyncState.d.ts +0 -12
  68. package/dist/types/client/src/state/asyncState.d.ts.map +0 -1
  69. package/dist/types/client/src/transactions/base64.d.ts +0 -12
  70. package/dist/types/client/src/transactions/base64.d.ts.map +0 -1
  71. package/dist/types/client/src/transactions/prepareTransaction.d.ts +0 -16
  72. package/dist/types/client/src/transactions/prepareTransaction.d.ts.map +0 -1
  73. package/dist/types/client/src/transactions/referenceKeys.d.ts +0 -10
  74. package/dist/types/client/src/transactions/referenceKeys.d.ts.map +0 -1
  75. package/dist/types/client/src/transactions/transactionPoolController.d.ts +0 -53
  76. package/dist/types/client/src/transactions/transactionPoolController.d.ts.map +0 -1
  77. package/dist/types/client/src/types.d.ts +0 -205
  78. package/dist/types/client/src/types.d.ts.map +0 -1
  79. package/dist/types/client/src/utils/addressLike.d.ts +0 -5
  80. package/dist/types/client/src/utils/addressLike.d.ts.map +0 -1
  81. package/dist/types/client/src/utils/stableStringify.d.ts +0 -2
  82. package/dist/types/client/src/utils/stableStringify.d.ts.map +0 -1
  83. package/dist/types/client/src/utils.d.ts +0 -21
  84. package/dist/types/client/src/utils.d.ts.map +0 -1
  85. package/dist/types/client/src/wallet/registry.d.ts +0 -9
  86. package/dist/types/client/src/wallet/registry.d.ts.map +0 -1
  87. package/dist/types/client/src/wallet/standard.d.ts +0 -36
  88. package/dist/types/client/src/wallet/standard.d.ts.map +0 -1
  89. package/dist/types/react-hooks/src/QueryProvider.d.ts.map +0 -1
  90. package/dist/types/react-hooks/src/context.d.ts.map +0 -1
  91. package/dist/types/react-hooks/src/hooks.d.ts.map +0 -1
  92. package/dist/types/react-hooks/src/index.d.ts.map +0 -1
  93. package/dist/types/react-hooks/src/query.d.ts.map +0 -1
  94. package/dist/types/react-hooks/src/queryHooks.d.ts.map +0 -1
  95. package/dist/types/react-hooks/src/querySuspenseContext.d.ts.map +0 -1
  96. package/dist/types/react-hooks/src/useClientStore.d.ts.map +0 -1
  97. package/dist/types/react-hooks/src/walletStandardHooks.d.ts.map +0 -1
  98. /package/dist/types/{react-hooks/src/QueryProvider.d.ts → QueryProvider.d.ts} +0 -0
  99. /package/dist/types/{react-hooks/src/context.d.ts → context.d.ts} +0 -0
  100. /package/dist/types/{react-hooks/src/query.d.ts → query.d.ts} +0 -0
  101. /package/dist/types/{react-hooks/src/queryHooks.d.ts → queryHooks.d.ts} +0 -0
  102. /package/dist/types/{react-hooks/src/querySuspenseContext.d.ts → querySuspenseContext.d.ts} +0 -0
  103. /package/dist/types/{react-hooks/src/useClientStore.d.ts → useClientStore.d.ts} +0 -0
  104. /package/dist/types/{react-hooks/src/walletStandardHooks.d.ts → walletStandardHooks.d.ts} +0 -0
@@ -2,6 +2,8 @@ export { SolanaClientProvider, useSolanaClient } from './context';
2
2
  export { useAccount, useBalance, useClusterState, useClusterStatus, useConnectWallet, useDisconnectWallet, useSendTransaction, useSignatureStatus, useSolTransfer, useSplToken, useTransactionPool, useWaitForSignature, useWallet, useWalletActions, useWalletSession, useWalletStandardConnectors, } from './hooks';
3
3
  export { SolanaQueryProvider } from './QueryProvider';
4
4
  export { useLatestBlockhash, useProgramAccounts, useSimulateTransaction } from './queryHooks';
5
+ export { SolanaProvider } from './SolanaProvider';
6
+ export { useWalletConnection, useWalletModalState, WalletConnectionManager } from './ui';
5
7
  export { useClientStore } from './useClientStore';
6
8
  export type { OnlySolanaChains } from './walletStandardHooks';
7
9
  export { useSignAndSendTransaction, useSignIn, useSignMessage, useSignTransaction, useWalletAccountMessageSigner, useWalletAccountTransactionSendingSigner, useWalletAccountTransactionSigner, } from './walletStandardHooks';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EACN,UAAU,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,mBA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F,QAAQ,CAAC;IACR,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAC/B,CAAC,CAAC;AAEJ,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC,uBAAuB,CAAC,GAClF,QAAQ,CAAC;IACR,QAAQ,EAAE,uBAAuB,CAAC;CAClC,CAAC,CAAC;AAEJ,wBAAgB,kBAAkB,CACjC,cAAc,CAAC,EAAE,WAAW,EAC5B,OAAO,CAAC,EAAE,yBAAyB,GACjC,0BAA0B,CA8B5B;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 @@
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,52 @@
1
+ import type { WalletConnector, WalletSession, WalletStatus } from '@solana/client';
2
+ import type { ReactNode } from 'react';
3
+ import { type WalletStandardDiscoveryOptions } from './hooks';
4
+ type WalletConnectionState = Readonly<{
5
+ connect(connectorId: string, options?: Readonly<{
6
+ autoConnect?: boolean;
7
+ }>): Promise<void>;
8
+ connected: boolean;
9
+ connecting: boolean;
10
+ connectors: readonly WalletConnector[];
11
+ connectorId?: string;
12
+ disconnect(): Promise<void>;
13
+ error: unknown;
14
+ status: WalletStatus['status'];
15
+ wallet: WalletSession | undefined;
16
+ }>;
17
+ type UseWalletConnectionOptions = Readonly<{
18
+ connectors?: readonly WalletConnector[];
19
+ discoveryOptions?: WalletStandardDiscoveryOptions;
20
+ }>;
21
+ /**
22
+ * Collects everything needed to build wallet connection UIs into a single hook.
23
+ */
24
+ export declare function useWalletConnection(options?: UseWalletConnectionOptions): WalletConnectionState;
25
+ type WalletConnectionManagerProps = Readonly<{
26
+ children: (state: WalletConnectionState) => ReactNode;
27
+ connectors?: readonly WalletConnector[];
28
+ discoveryOptions?: WalletStandardDiscoveryOptions;
29
+ }>;
30
+ /**
31
+ * Render-prop helper that lets you easily wire wallet status into custom UIs.
32
+ */
33
+ export declare function WalletConnectionManager({ children, connectors, discoveryOptions }: WalletConnectionManagerProps): import("react/jsx-runtime").JSX.Element;
34
+ type UseWalletModalStateOptions = UseWalletConnectionOptions & Readonly<{
35
+ closeOnConnect?: boolean;
36
+ initialOpen?: boolean;
37
+ }>;
38
+ export type WalletModalState = WalletConnectionState & Readonly<{
39
+ close(): void;
40
+ isOpen: boolean;
41
+ open(): void;
42
+ selectedConnector: string | null;
43
+ select(connectorId: string | null): void;
44
+ toggle(): void;
45
+ }>;
46
+ /**
47
+ * Small state machine for wallet selection modals – keeps track of modal visibility and the currently
48
+ * highlighted connector while reusing the connection state returned by {@link useWalletConnection}.
49
+ */
50
+ export declare function useWalletModalState(options?: UseWalletModalStateOptions): WalletModalState;
51
+ export {};
52
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1 @@
1
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EH;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAAE,4BAA4B,2CAG/G;AAED,KAAK,0BAA0B,GAAG,0BAA0B,GAC3D,QAAQ,CAAC;IACR,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC,CAAC;AAEJ,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GACnD,QAAQ,CAAC;IACR,KAAK,IAAI,IAAI,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,IAAI,IAAI,CAAC;IACb,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACzC,MAAM,IAAI,IAAI,CAAC;CACf,CAAC,CAAC;AAEJ;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,0BAA+B,GAAG,gBAAgB,CAgC9F"}
@@ -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 @@
1
+ {"version":3,"file":"walletStandardHooks.d.ts","sourceRoot":"","sources":["../../src/walletStandardHooks.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACX,sBAAsB,EAEtB,0BAA0B,EAC1B,wBAAwB,EACxB,MAAM,iBAAiB,CAAC;AASzB,OAAO,EAGN,KAAK,iCAAi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eAAe,EAAE,cAAc,EAC/B,KAAK,EAAE,UAAU,MAAM,EAAE,GACvB,wBAAwB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/react-hooks",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "description": "React hooks for the @solana/client Solana client",
5
5
  "exports": {
6
6
  "edge-light": {
@@ -64,7 +64,7 @@
64
64
  "@wallet-standard/errors": "^0.1.1",
65
65
  "@wallet-standard/ui": "^1.0.1",
66
66
  "@wallet-standard/ui-registry": "^1.0.1",
67
- "@solana/client": "0.0.2"
67
+ "@solana/client": "0.1.0"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@types/react": "^19",
@@ -1,18 +0,0 @@
1
- import { createLogger } from '../logging/logger';
2
- import type { ClientActions, ClientStore, SolanaClientRuntime, WalletRegistry } from '../types';
3
- type MutableRuntime = SolanaClientRuntime;
4
- type ActionDeps = Readonly<{
5
- connectors: WalletRegistry;
6
- logger?: ReturnType<typeof createLogger>;
7
- runtime: MutableRuntime;
8
- store: ClientStore;
9
- }>;
10
- /**
11
- * Creates the action set used by the Solana client POC.
12
- *
13
- * @param deps - Dependencies required to build the action set.
14
- * @returns An immutable collection implementing {@link ClientActions}.
15
- */
16
- export declare function createActions({ connectors, logger: inputLogger, runtime, store }: ActionDeps): ClientActions;
17
- export {};
18
- //# sourceMappingURL=actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../../client/src/client/actions.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,YAAY,EAAe,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAe,WAAW,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG7G,KAAK,cAAc,GAAG,mBAAmB,CAAC;AAE1C,KAAK,UAAU,GAAG,QAAQ,CAAC;IAC1B,UAAU,EAAE,cAAc,CAAC;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;IACzC,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,WAAW,CAAC;CACnB,CAAC,CAAC;AAiBH;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,UAAU,GAAG,aAAa,CA+b5G"}
@@ -1,9 +0,0 @@
1
- import type { SolanaClient, SolanaClientConfig } from '../types';
2
- /**
3
- * Creates a Solana client instance using the provided configuration.
4
- *
5
- * @param config - High-level configuration supplied by integrators.
6
- * @returns Fully initialized {@link SolanaClient} instance.
7
- */
8
- export declare function createClient(config: SolanaClientConfig): SolanaClient;
9
- //# sourceMappingURL=createClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createClient.d.ts","sourceRoot":"","sources":["../../../../../../client/src/client/createClient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,YAAY,EAAE,kBAAkB,EAAuB,MAAM,UAAU,CAAC;AAQnG;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CAyErE"}
@@ -1,3 +0,0 @@
1
- import type { ClientHelpers, ClientStore, SolanaClientRuntime } from '../types';
2
- export declare function createClientHelpers(runtime: SolanaClientRuntime, store: ClientStore): ClientHelpers;
3
- //# sourceMappingURL=createClientHelpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createClientHelpers.d.ts","sourceRoot":"","sources":["../../../../../../client/src/client/createClientHelpers.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAsEhF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,WAAW,GAAG,aAAa,CAqDnG"}
@@ -1,29 +0,0 @@
1
- import type { Commitment } from '@solana/kit';
2
- import type { ClientState, ClientStore, ClusterState } from '../types';
3
- export type ClientStoreConfig = Readonly<{
4
- commitment: Commitment;
5
- endpoint: ClusterState['endpoint'];
6
- websocketEndpoint?: ClusterState['websocketEndpoint'];
7
- }>;
8
- /**
9
- * Creates the initial {@link ClientState} using the supplied cluster configuration.
10
- *
11
- * @param config - Initial cluster configuration including endpoints and commitment.
12
- * @returns Deep-frozen client state snapshot.
13
- */
14
- export declare function createInitialClientState(config: ClientStoreConfig): ClientState;
15
- /**
16
- * Creates a Zustand store using the supplied initial state snapshot.
17
- *
18
- * @param initialState - State snapshot produced by {@link createInitialClientState}.
19
- * @returns Zustand store instance containing the provided state.
20
- */
21
- export declare function createClientStore(initialState: ClientState): ClientStore;
22
- /**
23
- * Convenience helper that creates both the initial state and the store in one step.
24
- *
25
- * @param config - Initial cluster configuration including endpoints and commitment.
26
- * @returns Zustand store instance preloaded with the initial state.
27
- */
28
- export declare function createDefaultClientStore(config: ClientStoreConfig): ClientStore;
29
- //# sourceMappingURL=createClientStore.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createClientStore.d.ts","sourceRoot":"","sources":["../../../../../../client/src/client/createClientStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAiB,MAAM,UAAU,CAAC;AAGtF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACxC,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACnC,iBAAiB,CAAC,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAC;CACtD,CAAC,CAAC;AAWH;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,iBAAiB,GAAG,WAAW,CAmB/E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,WAAW,GAAG,WAAW,CAExE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,iBAAiB,GAAG,WAAW,CAE/E"}
@@ -1,16 +0,0 @@
1
- import { createLogger } from '../logging/logger';
2
- import type { ClientStore, ClientWatchers, SolanaClientRuntime } from '../types';
3
- type WatcherDeps = Readonly<{
4
- logger?: ReturnType<typeof createLogger>;
5
- runtime: SolanaClientRuntime;
6
- store: ClientStore;
7
- }>;
8
- /**
9
- * Creates watcher helpers that wrap RPC subscriptions and keep store metadata in sync.
10
- *
11
- * @param deps - Dependencies required to construct watcher helpers.
12
- * @returns Collection of watcher functions.
13
- */
14
- export declare function createWatchers({ logger: inputLogger, runtime, store }: WatcherDeps): ClientWatchers;
15
- export {};
16
- //# sourceMappingURL=watchers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watchers.d.ts","sourceRoot":"","sources":["../../../../../../client/src/client/watchers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAe,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAIX,WAAW,EACX,cAAc,EAEd,mBAAmB,EAEnB,MAAM,UAAU,CAAC;AAKlB,KAAK,WAAW,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;IACzC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,KAAK,EAAE,WAAW,CAAC;CACnB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,WAAW,GAAG,cAAc,CAkOnG"}
@@ -1,21 +0,0 @@
1
- import type { SolTransferHelper, SolTransferPrepareConfig, SolTransferSendOptions } from '../features/sol';
2
- import { type AsyncState } from '../state/asyncState';
3
- type SolTransferSignature = Awaited<ReturnType<SolTransferHelper['sendTransfer']>>;
4
- type Listener = () => void;
5
- export type SolTransferControllerConfig = Readonly<{
6
- authorityProvider?: () => SolTransferPrepareConfig['authority'] | undefined;
7
- helper: SolTransferHelper;
8
- }>;
9
- export type SolTransferInput = Omit<SolTransferPrepareConfig, 'authority'> & {
10
- authority?: SolTransferPrepareConfig['authority'];
11
- };
12
- export type SolTransferController = Readonly<{
13
- getHelper(): SolTransferHelper;
14
- getState(): AsyncState<SolTransferSignature>;
15
- reset(): void;
16
- send(config: SolTransferInput, options?: SolTransferSendOptions): Promise<SolTransferSignature>;
17
- subscribe(listener: Listener): () => void;
18
- }>;
19
- export declare function createSolTransferController(config: SolTransferControllerConfig): SolTransferController;
20
- export {};
21
- //# sourceMappingURL=solTransferController.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solTransferController.d.ts","sourceRoot":"","sources":["../../../../../../client/src/controllers/solTransferController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC3G,OAAO,EAAE,KAAK,UAAU,EAA6C,MAAM,qBAAqB,CAAC;AAEjG,KAAK,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAEnF,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;IAClD,iBAAiB,CAAC,EAAE,MAAM,wBAAwB,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAC5E,MAAM,EAAE,iBAAiB,CAAC;CAC1B,CAAC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC,GAAG;IAC5E,SAAS,CAAC,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC5C,SAAS,IAAI,iBAAiB,CAAC;IAC/B,QAAQ,IAAI,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC7C,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAChG,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAAC;CAC1C,CAAC,CAAC;AAgBH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,2BAA2B,GAAG,qBAAqB,CAgDtG"}
@@ -1,24 +0,0 @@
1
- import type { SolTransferSendOptions } from '../features/sol';
2
- import type { SplTokenHelper, SplTransferPrepareConfig } from '../features/spl';
3
- import { type AsyncState } from '../state/asyncState';
4
- type SplTransferSignature = Awaited<ReturnType<SplTokenHelper['sendTransfer']>>;
5
- type Listener = () => void;
6
- export type SplTransferInput = Omit<SplTransferPrepareConfig, 'authority' | 'sourceOwner'> & {
7
- authority?: SplTransferPrepareConfig['authority'];
8
- sourceOwner?: SplTransferPrepareConfig['sourceOwner'];
9
- };
10
- export type SplTransferControllerConfig = Readonly<{
11
- authorityProvider?: () => SplTransferPrepareConfig['authority'] | undefined;
12
- helper: SplTokenHelper;
13
- sourceOwnerProvider?: () => SplTransferPrepareConfig['sourceOwner'] | undefined;
14
- }>;
15
- export type SplTransferController = Readonly<{
16
- getHelper(): SplTokenHelper;
17
- getState(): AsyncState<SplTransferSignature>;
18
- reset(): void;
19
- send(config: SplTransferInput, options?: SolTransferSendOptions): Promise<SplTransferSignature>;
20
- subscribe(listener: Listener): () => void;
21
- }>;
22
- export declare function createSplTransferController(config: SplTransferControllerConfig): SplTransferController;
23
- export {};
24
- //# sourceMappingURL=splTransferController.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"splTransferController.d.ts","sourceRoot":"","sources":["../../../../../../client/src/controllers/splTransferController.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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address, type Blockhash, type Commitment, type Slot, signature, signTransactionMessageWithSigners, type TransactionPlan, type TransactionSigner, type TransactionVersion } from '@solana/kit';
2
- import type { SolanaClientRuntime, WalletSession } from '../types';
3
- type BlockhashLifetime = Readonly<{
4
- blockhash: Blockhash;
5
- lastValidBlockHeight: bigint;
6
- }>;
7
- type SolTransferAmount = bigint | number | string;
8
- type SolTransferAuthority = TransactionSigner<string> | WalletSession;
9
- type SignableSolTransactionMessage = Parameters<typeof signTransactionMessageWithSigners>[0];
10
- export type SolTransferPrepareConfig = Readonly<{
11
- amount: SolTransferAmount;
12
- authority: SolTransferAuthority;
13
- commitment?: Commitment;
14
- destination: Address | string;
15
- lifetime?: BlockhashLifetime;
16
- transactionVersion?: TransactionVersion;
17
- }>;
18
- export type SolTransferSendOptions = Readonly<{
19
- abortSignal?: AbortSignal;
20
- commitment?: Commitment;
21
- maxRetries?: bigint | number;
22
- minContextSlot?: Slot;
23
- skipPreflight?: boolean;
24
- }>;
25
- type PreparedSolTransfer = Readonly<{
26
- commitment?: Commitment;
27
- lifetime: BlockhashLifetime;
28
- message: SignableSolTransactionMessage;
29
- mode: 'partial' | 'send';
30
- signer: TransactionSigner;
31
- plan?: TransactionPlan;
32
- }>;
33
- export type SolTransferHelper = Readonly<{
34
- prepareTransfer(config: SolTransferPrepareConfig): Promise<PreparedSolTransfer>;
35
- sendPreparedTransfer(prepared: PreparedSolTransfer, options?: SolTransferSendOptions): Promise<ReturnType<typeof signature>>;
36
- sendTransfer(config: SolTransferPrepareConfig, options?: SolTransferSendOptions): Promise<ReturnType<typeof signature>>;
37
- }>;
38
- /** Creates documented helpers that build and submit System Program SOL transfers. */
39
- export declare function createSolTransferHelper(runtime: SolanaClientRuntime): SolTransferHelper;
40
- export {};
41
- //# sourceMappingURL=sol.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sol.d.ts","sourceRoot":"","sources":["../../../../../../client/src/features/sol.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,O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iB,CAAC;IAC5B,OAAO,EAAE,6BAA6B,CAAC;IACvC,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IACzB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,CAAC,EAAE,eAAe,CAAC;CACvB,CAAC,CAAC;AAiCH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACxC,eAAe,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChF,oBAAoB,CACnB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,CAAC,EAAE,sBAAsB,GAC9B,OAAO,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC;IACzC,YAAY,CACX,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,sBAAsB,GAC9B,OAAO,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC;CACzC,CAAC,CAAC;AAEH,qFAAqF;AACrF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,GAAG,iBAAiB,CAyFvF"}
@@ -1,59 +0,0 @@
1
- import { type Address, type Blockhash, type Commitment, signature, signTransactionMessageWithSigners, type TransactionPlan, type TransactionSigner, type TransactionVersion } from '@solana/kit';
2
- import type { SolanaClientRuntime, WalletSession } from '../types';
3
- import type { SolTransferSendOptions } from './sol';
4
- type BlockhashLifetime = Readonly<{
5
- blockhash: Blockhash;
6
- lastValidBlockHeight: bigint;
7
- }>;
8
- type SplTokenAuthority = TransactionSigner<string> | WalletSession;
9
- type SignableSplTransactionMessage = Parameters<typeof signTransactionMessageWithSigners>[0];
10
- export type SplTokenHelperConfig = Readonly<{
11
- associatedTokenProgram?: Address | string;
12
- commitment?: Commitment;
13
- decimals?: number;
14
- mint: Address | string;
15
- tokenProgram?: Address | string;
16
- }>;
17
- export type SplTokenBalance = Readonly<{
18
- amount: bigint;
19
- ataAddress: Address;
20
- decimals: number;
21
- exists: boolean;
22
- uiAmount: string;
23
- }>;
24
- export type SplTransferPrepareConfig = Readonly<{
25
- amount: bigint | number | string;
26
- amountInBaseUnits?: boolean;
27
- authority: SplTokenAuthority;
28
- commitment?: Commitment;
29
- destinationOwner: Address | string;
30
- destinationToken?: Address | string;
31
- ensureDestinationAta?: boolean;
32
- lifetime?: BlockhashLifetime;
33
- sourceOwner?: Address | string;
34
- sourceToken?: Address | string;
35
- transactionVersion?: TransactionVersion;
36
- }>;
37
- type PreparedSplTransfer = Readonly<{
38
- amount: bigint;
39
- commitment?: Commitment;
40
- decimals: number;
41
- destinationAta: Address;
42
- lifetime: BlockhashLifetime;
43
- message: SignableSplTransactionMessage;
44
- mode: 'partial' | 'send';
45
- signer: TransactionSigner;
46
- sourceAta: Address;
47
- plan?: TransactionPlan;
48
- }>;
49
- export type SplTokenHelper = Readonly<{
50
- deriveAssociatedTokenAddress(owner: Address | string): Promise<Address>;
51
- fetchBalance(owner: Address | string, commitment?: Commitment): Promise<SplTokenBalance>;
52
- prepareTransfer(config: SplTransferPrepareConfig): Promise<PreparedSplTransfer>;
53
- sendPreparedTransfer(prepared: PreparedSplTransfer, options?: SolTransferSendOptions): Promise<ReturnType<typeof signature>>;
54
- sendTransfer(config: SplTransferPrepareConfig, options?: SolTransferSendOptions): Promise<ReturnType<typeof signature>>;
55
- }>;
56
- /** Creates helpers dedicated to SPL token account discovery, balances, and transfers. */
57
- export declare function createSplTokenHelper(runtime: SolanaClientRuntime, config: SplTokenHelperConfig): SplTokenHelper;
58
- export {};
59
- //# sourceMappingURL=spl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spl.d.ts","sourceRoot":"","sources":["../../../../../../client/src/features/spl.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,OAAO,EAGZ,KAAK,SAAS,EACd,KAAK,UAAU,EAWf,SAAS,EACT,iCAAiC,EAEjC,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,MAAM,aAAa,CAAC;AAWrB,OA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oBAAoB,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,oBAAoB,GAAG,cAAc,CA8M/G"}
@@ -1,79 +0,0 @@
1
- import type { Address, appendTransactionMessageInstruction, Blockhash, Commitment, InstructionPlan, Slot, TransactionPlan, TransactionPlannerConfig, TransactionSigner, TransactionVersion } from '@solana/kit';
2
- import { signature, signTransactionMessageWithSigners } from '@solana/kit';
3
- import { type PrepareTransactionMessage, type PrepareTransactionOptions } from '../transactions/prepareTransaction';
4
- import type { SolanaClientRuntime, WalletSession } from '../types';
5
- type BlockhashLifetime = Readonly<{
6
- blockhash: Blockhash;
7
- lastValidBlockHeight: bigint;
8
- }>;
9
- type TransactionInstruction = Parameters<typeof appendTransactionMessageInstruction>[0];
10
- export type TransactionInstructionInput = TransactionInstruction;
11
- type SignableTransactionMessage = Parameters<typeof signTransactionMessageWithSigners>[0];
12
- type TransactionAuthority = TransactionSigner | WalletSession;
13
- type PrepareTransactionOverrides = Omit<PrepareTransactionOptions<PrepareTransactionMessage>, 'transaction'>;
14
- type TransactionRecipeMetadata = Readonly<{
15
- commitment: Commitment;
16
- computeUnitLimit?: bigint;
17
- computeUnitPrice?: bigint;
18
- feePayer: Address;
19
- instructions: readonly TransactionInstruction[];
20
- lifetime: BlockhashLifetime;
21
- mode: 'partial' | 'send';
22
- version: TransactionVersion;
23
- }>;
24
- export type TransactionRecipe = TransactionRecipeMetadata & Readonly<{
25
- createTransactionMessage: TransactionPlannerConfig['createTransactionMessage'];
26
- instructionPlan: InstructionPlan;
27
- }>;
28
- export type TransactionRecipeContext = Readonly<{
29
- getFallbackCommitment(): Commitment;
30
- runtime: SolanaClientRuntime;
31
- }>;
32
- export type TransactionPrepareRequest = Readonly<{
33
- abortSignal?: AbortSignal;
34
- authority?: TransactionAuthority;
35
- commitment?: Commitment;
36
- computeUnitLimit?: bigint | number;
37
- computeUnitPrice?: bigint | number;
38
- feePayer?: Address | string | TransactionSigner;
39
- instructions: readonly TransactionInstruction[];
40
- lifetime?: BlockhashLifetime;
41
- version?: TransactionVersion | 'auto';
42
- }>;
43
- export type TransactionPrepareAndSendRequest = TransactionPrepareRequest & Readonly<{
44
- prepareTransaction?: false | PrepareTransactionOverrides;
45
- }>;
46
- export type TransactionPrepared = Readonly<{
47
- commitment: Commitment;
48
- computeUnitLimit?: bigint;
49
- computeUnitPrice?: bigint;
50
- feePayer: Address;
51
- instructions: readonly TransactionInstruction[];
52
- lifetime: BlockhashLifetime;
53
- message: SignableTransactionMessage;
54
- mode: 'partial' | 'send';
55
- plan?: TransactionPlan;
56
- version: TransactionVersion;
57
- }>;
58
- export type TransactionSignOptions = Readonly<{
59
- abortSignal?: AbortSignal;
60
- minContextSlot?: Slot;
61
- }>;
62
- export type TransactionSendOptions = Readonly<{
63
- abortSignal?: AbortSignal;
64
- commitment?: Commitment;
65
- maxRetries?: bigint | number;
66
- minContextSlot?: Slot;
67
- skipPreflight?: boolean;
68
- }>;
69
- export type TransactionHelper = Readonly<{
70
- prepare(request: TransactionPrepareRequest): Promise<TransactionPrepared>;
71
- sign(prepared: TransactionPrepared, options?: TransactionSignOptions): ReturnType<typeof signTransactionMessageWithSigners>;
72
- toWire(prepared: TransactionPrepared, options?: TransactionSignOptions): Promise<string>;
73
- send(prepared: TransactionPrepared, options?: TransactionSendOptions): Promise<ReturnType<typeof signature>>;
74
- prepareAndSend(request: TransactionPrepareAndSendRequest, options?: TransactionSendOptions): Promise<ReturnType<typeof signature>>;
75
- }>;
76
- export declare function createTransactionRecipe(request: TransactionPrepareRequest, context: TransactionRecipeContext): Promise<TransactionRecipe>;
77
- export declare function createTransactionHelper(runtime: SolanaClientRuntime, getFallbackCommitment: () => Commitment): TransactionHelper;
78
- export {};
79
- //# sourceMappingURL=transactions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../../../../client/src/features/transactions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,OAAO,EACP,mCAAmC,EACnC,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BAAmB,EAC5B,qBAAqB,EAAE,MAAM,UAAU,GACrC,iBAAiB,CAgKnB"}
@@ -1,25 +0,0 @@
1
- export { createClient } from './client/createClient';
2
- export { createClientStore, createDefaultClientStore, createInitialClientState } from './client/createClientStore';
3
- export { createSolTransferController, type SolTransferController, type SolTransferControllerConfig, type SolTransferInput, } from './controllers/solTransferController';
4
- export { createSplTransferController, type SplTransferController, type SplTransferControllerConfig, type SplTransferInput, } from './controllers/splTransferController';
5
- export { createSolTransferHelper, type SolTransferHelper, type SolTransferPrepareConfig, type SolTransferSendOptions, } from './features/sol';
6
- export { createSplTokenHelper, type SplTokenBalance, type SplTokenHelper, type SplTokenHelperConfig, type SplTransferPrepareConfig, } from './features/spl';
7
- export { createTransactionHelper, createTransactionRecipe, type TransactionHelper, type TransactionInstructionInput, type TransactionPrepareAndSendRequest, type TransactionPrepared, type TransactionPrepareRequest, type TransactionRecipe, type TransactionRecipeContext, type TransactionSendOptions, type TransactionSignOptions, } from './features/transactions';
8
- export { createTokenAmount, type FormatAmountOptions, type ParseAmountOptions, type TokenAmountMath, } from './numeric/amounts';
9
- export { LAMPORTS_PER_SOL, lamports, lamportsFromSol, lamportsMath, lamportsToSolString } from './numeric/lamports';
10
- export { assertDecimals, assertNonNegative, type BigintLike, checkedAdd, checkedDivide, checkedMultiply, checkedSubtract, pow10, toBigint, } from './numeric/math';
11
- export { type ApplyRatioOptions, applyRatio, createRatio, type Ratio, type RoundingMode } from './numeric/rational';
12
- export { type CreateSolanaRpcClientConfig, createSolanaRpcClient, type SendAndConfirmTransactionOptions, type SimulateTransactionOptions, type SolanaRpcClient, } from './rpc/createSolanaRpcClient';
13
- export { bigintFromJson, bigintToJson, lamportsFromJson, lamportsToJson } from './serialization/json';
14
- export { type ConfirmationCommitment, confirmationMeetsCommitment, deriveConfirmationStatus, normalizeSignature, SIGNATURE_STATUS_TIMEOUT_MS, type SignatureLike, type SignatureStatusLike, } from './signatures/status';
15
- export { type AsyncState, type AsyncStatus, createAsyncState, createInitialAsyncState } from './state/asyncState';
16
- export { transactionToBase64, transactionToBase64WithSigners, } from './transactions/base64';
17
- export { type PrepareTransactionConfig, type PrepareTransactionMessage, type PrepareTransactionOptions, prepareTransaction, } from './transactions/prepareTransaction';
18
- export { insertReferenceKey, insertReferenceKeys } from './transactions/referenceKeys';
19
- export { createTransactionPoolController, type LatestBlockhashCache, type TransactionInstructionList, type TransactionPoolConfig, type TransactionPoolController, type TransactionPoolPrepareAndSendOptions, type TransactionPoolPrepareOptions, type TransactionPoolSendOptions, type TransactionPoolSignOptions, } from './transactions/transactionPoolController';
20
- export type { AccountCache, AccountCacheEntry, AccountWatcherConfig, BalanceWatcherConfig, ClientActions, ClientHelpers, ClientState, ClientStore, ClientWatchers, SolanaClient, SolanaClientConfig, WalletConnector, WalletConnectorMetadata, WalletRegistry, WalletSession, WalletStatus, } from './types';
21
- export { type AddressLike, toAddress, toAddressString } from './utils/addressLike';
22
- export { stableStringify } from './utils/stableStringify';
23
- export { createWalletRegistry } from './wallet/registry';
24
- export { createWalletStandardConnector, getWalletStandardConnectors, watchWalletStandardConnectors, } from './wallet/standard';
25
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../client/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACnH,OAAO,EACN,2BAA2B,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,GACrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,2BAA2B,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,GACrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,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ls back to console logging when no custom logger is provided.
4
- *
5
- * @param logger - Optional logger implementation supplied by the integrator.
6
- * @returns A {@link ClientLogger} instance ready for dependency injection.
7
- */
8
- export declare function createLogger(logger?: ClientLogger): ClientLogger;
9
- /**
10
- * Formats an error into a structured payload for logging.
11
- *
12
- * @param error - Arbitrary error value that will be recorded.
13
- * @returns Serializable shape containing the original error and message.
14
- */
15
- export declare function formatError(error: unknown): Record<string, unknown>;
16
- /**
17
- * Returns whether the provided log level is at least as severe as the threshold.
18
- *
19
- * @param level - Log level to evaluate.
20
- * @param threshold - Minimum severity level that should pass.
21
- * @returns `true` when the level meets or exceeds the threshold.
22
- */
23
- export declare function isLevelAtLeast(level: LogLevel, threshold: LogLevel): boolean;
24
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../../client/src/logging/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAUvD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,CAoBhE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKnE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,GAAG,OAAO,CAE5E"}
@@ -1,30 +0,0 @@
1
- import { type BigintLike } from './math';
2
- import { type ApplyRatioOptions, type Ratio, type RoundingMode } from './rational';
3
- export type ParseAmountOptions = Readonly<{
4
- label?: string;
5
- rounding?: RoundingMode;
6
- }>;
7
- export type FormatAmountOptions = Readonly<{
8
- minimumFractionDigits?: number;
9
- trimTrailingZeros?: boolean;
10
- }>;
11
- export type TokenAmountMath = Readonly<{
12
- add(lhs: bigint, rhs: bigint): bigint;
13
- compare(lhs: bigint, rhs: bigint): number;
14
- decimals: number;
15
- fromBaseUnits(value: BigintLike, label?: string): bigint;
16
- fromDecimal(value: number | string, options?: ParseAmountOptions): bigint;
17
- isZero(amount: bigint): boolean;
18
- multiplyByRatio(amount: bigint, ratio: Ratio, options?: ApplyRatioOptions): bigint;
19
- scale: bigint;
20
- subtract(lhs: bigint, rhs: bigint): bigint;
21
- toDecimalString(amount: bigint, options?: FormatAmountOptions): string;
22
- }>;
23
- /**
24
- * Factory that returns integer-safe helpers for working with token amounts across arbitrary decimals.
25
- *
26
- * @param decimals - Token decimal precision (0-38) used to scale values.
27
- * @returns Helper collection for conversions and arithmetic over bigint amounts.
28
- */
29
- export declare function createTokenAmount(decimals: number): TokenAmountMath;
30
- //# sourceMappingURL=amounts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"amounts.d.ts","sourceRoot":"","sources":["../../../../../../client/src/numeric/amounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,UAAU,EAKf,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,KAAK,iBAAiB,EAAc,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/F,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IAC1C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACtC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1C,QA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