@cmdoss/memwal-sdk 0.6.0 → 0.6.1

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 (224) hide show
  1. package/ARCHITECTURE.md +86 -2
  2. package/BENCHMARKS.md +2 -2
  3. package/README.md +43 -4
  4. package/dist/ai-sdk/types.d.ts +2 -2
  5. package/dist/ai-sdk/types.d.ts.map +1 -1
  6. package/dist/browser.d.ts +9 -9
  7. package/dist/browser.d.ts.map +1 -1
  8. package/dist/browser.js +16 -11
  9. package/dist/browser.js.map +1 -1
  10. package/dist/client/PersonalDataWallet.d.ts.map +1 -1
  11. package/dist/client/SimplePDWClient.d.ts.map +1 -1
  12. package/dist/client/SimplePDWClient.js +4 -4
  13. package/dist/client/SimplePDWClient.js.map +1 -1
  14. package/dist/client/namespaces/BatchNamespace.js +2 -2
  15. package/dist/client/namespaces/BatchNamespace.js.map +1 -1
  16. package/dist/client/namespaces/MemoryNamespace.js +3 -3
  17. package/dist/client/namespaces/MemoryNamespace.js.map +1 -1
  18. package/dist/client/namespaces/StorageNamespace.js +4 -4
  19. package/dist/client/namespaces/StorageNamespace.js.map +1 -1
  20. package/dist/client/namespaces/consolidated/StorageNamespace.js +2 -2
  21. package/dist/client/namespaces/consolidated/StorageNamespace.js.map +1 -1
  22. package/dist/client/signers/DappKitSigner.d.ts +136 -0
  23. package/dist/client/signers/DappKitSigner.d.ts.map +1 -0
  24. package/dist/client/signers/DappKitSigner.js +128 -0
  25. package/dist/client/signers/DappKitSigner.js.map +1 -0
  26. package/dist/client/signers/KeypairSigner.d.ts +4 -0
  27. package/dist/client/signers/KeypairSigner.d.ts.map +1 -1
  28. package/dist/client/signers/KeypairSigner.js +6 -0
  29. package/dist/client/signers/KeypairSigner.js.map +1 -1
  30. package/dist/client/signers/UnifiedSigner.d.ts +10 -0
  31. package/dist/client/signers/UnifiedSigner.d.ts.map +1 -1
  32. package/dist/client/signers/WalletAdapterSigner.d.ts +7 -0
  33. package/dist/client/signers/WalletAdapterSigner.d.ts.map +1 -1
  34. package/dist/client/signers/WalletAdapterSigner.js +9 -0
  35. package/dist/client/signers/WalletAdapterSigner.js.map +1 -1
  36. package/dist/client/signers/index.d.ts +3 -0
  37. package/dist/client/signers/index.d.ts.map +1 -1
  38. package/dist/client/signers/index.js +2 -0
  39. package/dist/client/signers/index.js.map +1 -1
  40. package/dist/generated/utils/index.js +1 -1
  41. package/dist/generated/utils/index.js.map +1 -1
  42. package/dist/index.d.ts +2 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +2 -0
  45. package/dist/index.js.map +1 -1
  46. package/dist/services/CapabilityService.js +1 -1
  47. package/dist/services/CapabilityService.js.map +1 -1
  48. package/dist/services/EncryptionService.js +1 -1
  49. package/dist/services/EncryptionService.js.map +1 -1
  50. package/dist/services/StorageService.d.ts +8 -8
  51. package/dist/services/StorageService.d.ts.map +1 -1
  52. package/dist/services/StorageService.js.map +1 -1
  53. package/dist/services/VectorService.js +2 -2
  54. package/dist/services/VectorService.js.map +1 -1
  55. package/dist/services/storage/BlobAttributesManager.d.ts +4 -4
  56. package/dist/services/storage/BlobAttributesManager.d.ts.map +1 -1
  57. package/dist/services/storage/BlobAttributesManager.js +6 -15
  58. package/dist/services/storage/BlobAttributesManager.js.map +1 -1
  59. package/dist/services/storage/QuiltBatchManager.d.ts +23 -5
  60. package/dist/services/storage/QuiltBatchManager.d.ts.map +1 -1
  61. package/dist/services/storage/QuiltBatchManager.js +118 -35
  62. package/dist/services/storage/QuiltBatchManager.js.map +1 -1
  63. package/dist/services/storage/WalrusMetadataManager.d.ts +2 -2
  64. package/dist/services/storage/WalrusMetadataManager.d.ts.map +1 -1
  65. package/dist/services/storage/WalrusMetadataManager.js +2 -5
  66. package/dist/services/storage/WalrusMetadataManager.js.map +1 -1
  67. package/dist/services/storage/WalrusStorageManager.d.ts +2 -2
  68. package/dist/services/storage/WalrusStorageManager.d.ts.map +1 -1
  69. package/dist/services/storage/WalrusStorageManager.js +7 -11
  70. package/dist/services/storage/WalrusStorageManager.js.map +1 -1
  71. package/dist/wallet/MainWalletService.js +1 -1
  72. package/dist/wallet/MainWalletService.js.map +1 -1
  73. package/package.json +10 -3
  74. package/src/ai-sdk/types.ts +2 -2
  75. package/src/browser.ts +19 -20
  76. package/src/client/SimplePDWClient.ts +18 -14
  77. package/src/client/namespaces/BatchNamespace.ts +2 -2
  78. package/src/client/namespaces/MemoryNamespace.ts +3 -3
  79. package/src/client/namespaces/StorageNamespace.ts +4 -4
  80. package/src/client/namespaces/consolidated/StorageNamespace.ts +2 -2
  81. package/src/client/signers/DappKitSigner.ts +207 -0
  82. package/src/client/signers/KeypairSigner.ts +7 -0
  83. package/src/client/signers/UnifiedSigner.ts +11 -0
  84. package/src/client/signers/WalletAdapterSigner.ts +10 -0
  85. package/src/client/signers/index.ts +7 -0
  86. package/src/generated/pdw/deps/sui/object.ts +12 -12
  87. package/src/generated/pdw/deps/sui/vec_map.ts +32 -32
  88. package/src/generated/pdw/memory.ts +1087 -1087
  89. package/src/generated/pdw/wallet.ts +123 -123
  90. package/src/generated/utils/index.ts +159 -159
  91. package/src/index.ts +16 -0
  92. package/src/services/CapabilityService.ts +1 -1
  93. package/src/services/EncryptionService.ts +1 -1
  94. package/src/services/StorageService.ts +8 -8
  95. package/src/services/VectorService.ts +2 -2
  96. package/src/services/storage/BlobAttributesManager.ts +10 -19
  97. package/src/services/storage/QuiltBatchManager.ts +139 -37
  98. package/src/services/storage/WalrusMetadataManager.ts +4 -7
  99. package/src/services/storage/WalrusStorageManager.ts +10 -13
  100. package/src/wallet/MainWalletService.ts +1 -1
  101. package/dist/api/client.d.ts +0 -43
  102. package/dist/api/client.d.ts.map +0 -1
  103. package/dist/api/client.js +0 -136
  104. package/dist/api/client.js.map +0 -1
  105. package/dist/chat/index.d.ts +0 -13
  106. package/dist/chat/index.d.ts.map +0 -1
  107. package/dist/chat/index.js +0 -14
  108. package/dist/chat/index.js.map +0 -1
  109. package/dist/client/namespaces/ChatNamespace.d.ts +0 -110
  110. package/dist/client/namespaces/ChatNamespace.d.ts.map +0 -1
  111. package/dist/client/namespaces/ChatNamespace.js +0 -123
  112. package/dist/client/namespaces/ChatNamespace.js.map +0 -1
  113. package/dist/encryption/index.d.ts +0 -14
  114. package/dist/encryption/index.d.ts.map +0 -1
  115. package/dist/encryption/index.js +0 -14
  116. package/dist/encryption/index.js.map +0 -1
  117. package/dist/graph/BrowserKnowledgeGraphManager.d.ts +0 -101
  118. package/dist/graph/BrowserKnowledgeGraphManager.d.ts.map +0 -1
  119. package/dist/graph/BrowserKnowledgeGraphManager.js +0 -411
  120. package/dist/graph/BrowserKnowledgeGraphManager.js.map +0 -1
  121. package/dist/hooks.wip/index.d.ts +0 -55
  122. package/dist/hooks.wip/index.d.ts.map +0 -1
  123. package/dist/hooks.wip/index.js +0 -58
  124. package/dist/hooks.wip/index.js.map +0 -1
  125. package/dist/hooks.wip/useCreateMemory.d.ts +0 -111
  126. package/dist/hooks.wip/useCreateMemory.d.ts.map +0 -1
  127. package/dist/hooks.wip/useCreateMemory.js +0 -149
  128. package/dist/hooks.wip/useCreateMemory.js.map +0 -1
  129. package/dist/hooks.wip/useCreateMemoryBatch.d.ts +0 -122
  130. package/dist/hooks.wip/useCreateMemoryBatch.d.ts.map +0 -1
  131. package/dist/hooks.wip/useCreateMemoryBatch.js +0 -221
  132. package/dist/hooks.wip/useCreateMemoryBatch.js.map +0 -1
  133. package/dist/hooks.wip/useKnowledgeGraph.d.ts +0 -66
  134. package/dist/hooks.wip/useKnowledgeGraph.d.ts.map +0 -1
  135. package/dist/hooks.wip/useKnowledgeGraph.js +0 -229
  136. package/dist/hooks.wip/useKnowledgeGraph.js.map +0 -1
  137. package/dist/hooks.wip/useMemoryChat.d.ts +0 -106
  138. package/dist/hooks.wip/useMemoryChat.d.ts.map +0 -1
  139. package/dist/hooks.wip/useMemoryChat.js +0 -284
  140. package/dist/hooks.wip/useMemoryChat.js.map +0 -1
  141. package/dist/hooks.wip/useMemoryIndex.d.ts +0 -90
  142. package/dist/hooks.wip/useMemoryIndex.d.ts.map +0 -1
  143. package/dist/hooks.wip/useMemoryIndex.js +0 -218
  144. package/dist/hooks.wip/useMemoryIndex.js.map +0 -1
  145. package/dist/hooks.wip/useMemoryManager.d.ts +0 -35
  146. package/dist/hooks.wip/useMemoryManager.d.ts.map +0 -1
  147. package/dist/hooks.wip/useMemoryManager.js +0 -86
  148. package/dist/hooks.wip/useMemoryManager.js.map +0 -1
  149. package/dist/hooks.wip/useMemorySearch.d.ts +0 -100
  150. package/dist/hooks.wip/useMemorySearch.d.ts.map +0 -1
  151. package/dist/hooks.wip/useMemorySearch.js +0 -278
  152. package/dist/hooks.wip/useMemorySearch.js.map +0 -1
  153. package/dist/hooks.wip/useMemoryServices.d.ts +0 -80
  154. package/dist/hooks.wip/useMemoryServices.d.ts.map +0 -1
  155. package/dist/hooks.wip/useMemoryServices.js +0 -264
  156. package/dist/hooks.wip/useMemoryServices.js.map +0 -1
  157. package/dist/hooks.wip/usePDWRAG.d.ts +0 -112
  158. package/dist/hooks.wip/usePDWRAG.d.ts.map +0 -1
  159. package/dist/hooks.wip/usePDWRAG.js +0 -121
  160. package/dist/hooks.wip/usePDWRAG.js.map +0 -1
  161. package/dist/hooks.wip/usePDWVectorStore.d.ts +0 -68
  162. package/dist/hooks.wip/usePDWVectorStore.d.ts.map +0 -1
  163. package/dist/hooks.wip/usePDWVectorStore.js +0 -102
  164. package/dist/hooks.wip/usePDWVectorStore.js.map +0 -1
  165. package/dist/hooks.wip/useRetrieveEmbedding.d.ts +0 -138
  166. package/dist/hooks.wip/useRetrieveEmbedding.d.ts.map +0 -1
  167. package/dist/hooks.wip/useRetrieveEmbedding.js +0 -121
  168. package/dist/hooks.wip/useRetrieveEmbedding.js.map +0 -1
  169. package/dist/hooks.wip/useSearchMemories.d.ts +0 -103
  170. package/dist/hooks.wip/useSearchMemories.d.ts.map +0 -1
  171. package/dist/hooks.wip/useSearchMemories.js +0 -146
  172. package/dist/hooks.wip/useSearchMemories.js.map +0 -1
  173. package/dist/hooks.wip/useStoreEmbedding.d.ts +0 -174
  174. package/dist/hooks.wip/useStoreEmbedding.d.ts.map +0 -1
  175. package/dist/hooks.wip/useStoreEmbedding.js +0 -167
  176. package/dist/hooks.wip/useStoreEmbedding.js.map +0 -1
  177. package/dist/hooks.wip/useWalletMemories.d.ts +0 -119
  178. package/dist/hooks.wip/useWalletMemories.d.ts.map +0 -1
  179. package/dist/hooks.wip/useWalletMemories.js +0 -166
  180. package/dist/hooks.wip/useWalletMemories.js.map +0 -1
  181. package/dist/hooks.wip/utils/cache.d.ts +0 -25
  182. package/dist/hooks.wip/utils/cache.d.ts.map +0 -1
  183. package/dist/hooks.wip/utils/cache.js +0 -38
  184. package/dist/hooks.wip/utils/cache.js.map +0 -1
  185. package/dist/hooks.wip/utils/types.d.ts +0 -138
  186. package/dist/hooks.wip/utils/types.d.ts.map +0 -1
  187. package/dist/hooks.wip/utils/types.js +0 -5
  188. package/dist/hooks.wip/utils/types.js.map +0 -1
  189. package/dist/infrastructure/ai/EmbeddingService.d.ts +0 -101
  190. package/dist/infrastructure/ai/EmbeddingService.d.ts.map +0 -1
  191. package/dist/infrastructure/ai/EmbeddingService.js +0 -242
  192. package/dist/infrastructure/ai/EmbeddingService.js.map +0 -1
  193. package/dist/infrastructure/ai/GeminiAIService.d.ts +0 -84
  194. package/dist/infrastructure/ai/GeminiAIService.d.ts.map +0 -1
  195. package/dist/infrastructure/ai/GeminiAIService.js +0 -300
  196. package/dist/infrastructure/ai/GeminiAIService.js.map +0 -1
  197. package/dist/infrastructure/ai/index.d.ts +0 -8
  198. package/dist/infrastructure/ai/index.d.ts.map +0 -1
  199. package/dist/infrastructure/ai/index.js +0 -8
  200. package/dist/infrastructure/ai/index.js.map +0 -1
  201. package/dist/memory/index.d.ts +0 -13
  202. package/dist/memory/index.d.ts.map +0 -1
  203. package/dist/memory/index.js +0 -14
  204. package/dist/memory/index.js.map +0 -1
  205. package/dist/services/ChatService.d.ts +0 -89
  206. package/dist/services/ChatService.d.ts.map +0 -1
  207. package/dist/services/ChatService.js +0 -319
  208. package/dist/services/ChatService.js.map +0 -1
  209. package/dist/transactions/index.d.ts +0 -13
  210. package/dist/transactions/index.d.ts.map +0 -1
  211. package/dist/transactions/index.js +0 -14
  212. package/dist/transactions/index.js.map +0 -1
  213. package/dist/types/wallet.d.ts +0 -12
  214. package/dist/types/wallet.d.ts.map +0 -1
  215. package/dist/types/wallet.js +0 -13
  216. package/dist/types/wallet.js.map +0 -1
  217. package/dist/view/ViewService.d.ts +0 -136
  218. package/dist/view/ViewService.d.ts.map +0 -1
  219. package/dist/view/ViewService.js +0 -325
  220. package/dist/view/ViewService.js.map +0 -1
  221. package/dist/view/index.d.ts +0 -7
  222. package/dist/view/index.d.ts.map +0 -1
  223. package/dist/view/index.js +0 -7
  224. package/dist/view/index.js.map +0 -1
@@ -0,0 +1,207 @@
1
+ /**
2
+ * DappKit Signer Implementation
3
+ *
4
+ * Adapter for @mysten/dapp-kit hooks to work with SimplePDWClient.
5
+ * Bridges dApp-kit's hook-based API with SDK's UnifiedSigner interface.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { DappKitSigner, createSimplePDWClient } from '@cmdoss/memwal-sdk';
10
+ * import { useCurrentAccount, useSignAndExecuteTransaction, useSuiClient } from '@mysten/dapp-kit';
11
+ *
12
+ * function MyComponent() {
13
+ * const account = useCurrentAccount();
14
+ * const client = useSuiClient();
15
+ * const { mutateAsync: signAndExecute } = useSignAndExecuteTransaction();
16
+ *
17
+ * const signer = useMemo(() => {
18
+ * if (!account) return null;
19
+ * return new DappKitSigner({
20
+ * address: account.address,
21
+ * client,
22
+ * signAndExecuteTransaction: signAndExecute,
23
+ * });
24
+ * }, [account, client, signAndExecute]);
25
+ *
26
+ * // Now use signer with SDK
27
+ * const pdw = await createSimplePDWClient({ signer, network: 'testnet' });
28
+ * }
29
+ * ```
30
+ *
31
+ * @module client/signers
32
+ */
33
+
34
+ import type { Transaction } from '@mysten/sui/transactions';
35
+ import type { SuiClient } from '@mysten/sui/client';
36
+ import type { Signer } from '@mysten/sui/cryptography';
37
+ import type {
38
+ UnifiedSigner,
39
+ SignAndExecuteResult,
40
+ SignPersonalMessageResult
41
+ } from './UnifiedSigner';
42
+
43
+ /**
44
+ * Function signature for dApp-kit's signAndExecuteTransaction
45
+ * Compatible with useSignAndExecuteTransaction().mutateAsync
46
+ */
47
+ export interface DappKitSignAndExecuteFn {
48
+ (params: { transaction: Transaction }): Promise<{
49
+ digest: string;
50
+ effects?: any;
51
+ events?: any[];
52
+ objectChanges?: any[];
53
+ }>;
54
+ }
55
+
56
+ /**
57
+ * Function signature for dApp-kit's signPersonalMessage
58
+ * Compatible with useSignPersonalMessage().mutateAsync
59
+ */
60
+ export interface DappKitSignPersonalMessageFn {
61
+ (params: { message: Uint8Array }): Promise<{
62
+ signature: string;
63
+ bytes?: Uint8Array;
64
+ }>;
65
+ }
66
+
67
+ /**
68
+ * Configuration for DappKitSigner
69
+ */
70
+ export interface DappKitSignerConfig {
71
+ /**
72
+ * User's Sui address (from useCurrentAccount().address)
73
+ */
74
+ address: string;
75
+
76
+ /**
77
+ * SuiClient instance (from useSuiClient())
78
+ */
79
+ client: SuiClient;
80
+
81
+ /**
82
+ * signAndExecuteTransaction function (from useSignAndExecuteTransaction().mutateAsync)
83
+ */
84
+ signAndExecuteTransaction: DappKitSignAndExecuteFn;
85
+
86
+ /**
87
+ * signPersonalMessage function (from useSignPersonalMessage().mutateAsync)
88
+ * Optional - only required for operations that need message signing
89
+ */
90
+ signPersonalMessage?: DappKitSignPersonalMessageFn;
91
+
92
+ /**
93
+ * Public key bytes (optional, from useCurrentAccount().publicKey)
94
+ */
95
+ publicKey?: Uint8Array;
96
+ }
97
+
98
+ /**
99
+ * DappKitSigner - Adapter for @mysten/dapp-kit hooks
100
+ *
101
+ * Wraps dApp-kit's useSignAndExecuteTransaction and useSignPersonalMessage hooks
102
+ * to provide a UnifiedSigner interface compatible with SDK managers.
103
+ *
104
+ * This adapter does NOT depend on React - it accepts function references
105
+ * that can come from dApp-kit hooks or any other source with compatible signatures.
106
+ */
107
+ export class DappKitSigner implements UnifiedSigner {
108
+ private config: DappKitSignerConfig;
109
+
110
+ constructor(config: DappKitSignerConfig) {
111
+ if (!config.address) {
112
+ throw new Error('DappKitSigner requires an address');
113
+ }
114
+ if (!config.client) {
115
+ throw new Error('DappKitSigner requires a SuiClient');
116
+ }
117
+ if (!config.signAndExecuteTransaction) {
118
+ throw new Error('DappKitSigner requires signAndExecuteTransaction function');
119
+ }
120
+ this.config = config;
121
+ }
122
+
123
+ /**
124
+ * Sign and execute transaction using dApp-kit hook
125
+ *
126
+ * Wraps the dApp-kit signAndExecuteTransaction function and waits for
127
+ * transaction finalization to prevent gas coin version conflicts.
128
+ */
129
+ async signAndExecuteTransaction(transaction: Transaction): Promise<SignAndExecuteResult> {
130
+ const result = await this.config.signAndExecuteTransaction({ transaction });
131
+
132
+ // Wait for transaction to be finalized (important for gas coin versioning)
133
+ if (result.digest) {
134
+ try {
135
+ await this.config.client.waitForTransaction({ digest: result.digest });
136
+ } catch (waitError) {
137
+ console.warn('DappKitSigner: waitForTransaction failed:', waitError);
138
+ // Continue anyway - transaction was submitted
139
+ }
140
+ }
141
+
142
+ return {
143
+ digest: result.digest,
144
+ effects: result.effects,
145
+ events: result.events,
146
+ objectChanges: result.objectChanges,
147
+ };
148
+ }
149
+
150
+ /**
151
+ * Sign personal message using dApp-kit hook
152
+ *
153
+ * Required for SEAL encryption identity and other message signing operations.
154
+ */
155
+ async signPersonalMessage(message: Uint8Array): Promise<SignPersonalMessageResult> {
156
+ if (!this.config.signPersonalMessage) {
157
+ throw new Error(
158
+ 'DappKitSigner: signPersonalMessage not configured. ' +
159
+ 'Pass signPersonalMessage function from useSignPersonalMessage().mutateAsync'
160
+ );
161
+ }
162
+
163
+ const result = await this.config.signPersonalMessage({ message });
164
+
165
+ return {
166
+ signature: result.signature,
167
+ bytes: result.bytes || message,
168
+ };
169
+ }
170
+
171
+ /**
172
+ * Get Sui address
173
+ */
174
+ getAddress(): string {
175
+ return this.config.address;
176
+ }
177
+
178
+ /**
179
+ * Get public key (if available)
180
+ */
181
+ getPublicKey(): Uint8Array | null {
182
+ return this.config.publicKey || null;
183
+ }
184
+
185
+ /**
186
+ * Get underlying Signer
187
+ *
188
+ * Note: dApp-kit does not expose the underlying Signer for security reasons.
189
+ * Use KeypairSigner for backend/Node.js environments that need raw Signer access.
190
+ */
191
+ getSigner(): Signer {
192
+ throw new Error(
193
+ 'DappKitSigner does not expose underlying Signer. ' +
194
+ 'Browser wallets do not provide raw Signer access for security. ' +
195
+ 'Use KeypairSigner for backend/Node.js environments.'
196
+ );
197
+ }
198
+
199
+ /**
200
+ * Get SuiClient
201
+ *
202
+ * Returns the SuiClient instance for managers that need to build transactions.
203
+ */
204
+ getClient(): SuiClient {
205
+ return this.config.client;
206
+ }
207
+ }
@@ -98,4 +98,11 @@ export class KeypairSigner implements UnifiedSigner {
98
98
  getSigner(): Signer {
99
99
  return this.keypair;
100
100
  }
101
+
102
+ /**
103
+ * Get SuiClient instance
104
+ */
105
+ getClient(): SuiClient {
106
+ return this.client;
107
+ }
101
108
  }
@@ -12,6 +12,7 @@
12
12
 
13
13
  import type { Transaction } from '@mysten/sui/transactions';
14
14
  import type { Signer } from '@mysten/sui/cryptography';
15
+ import type { SuiClient } from '@mysten/sui/client';
15
16
 
16
17
  /**
17
18
  * Result of signing and executing a transaction
@@ -96,4 +97,14 @@ export interface UnifiedSigner {
96
97
  * @returns Signer instance or throws error if not available
97
98
  */
98
99
  getSigner(): Signer;
100
+
101
+ /**
102
+ * Get the SuiClient instance (optional)
103
+ *
104
+ * Used by managers that need to build transactions or wait for confirmations.
105
+ * Returns null if not available (e.g., WalletAdapterSigner).
106
+ *
107
+ * @returns SuiClient instance or null
108
+ */
109
+ getClient?(): SuiClient | null;
99
110
  }
@@ -146,4 +146,14 @@ export class WalletAdapterSigner implements UnifiedSigner {
146
146
  'Use KeypairSigner for backend/Node.js environments.'
147
147
  );
148
148
  }
149
+
150
+ /**
151
+ * Get SuiClient instance
152
+ *
153
+ * Note: WalletAdapter doesn't provide SuiClient.
154
+ * Use DappKitSigner if you need client access.
155
+ */
156
+ getClient(): null {
157
+ return null;
158
+ }
149
159
  }
@@ -4,6 +4,7 @@
4
4
  * Unified signer interface supporting multiple signing methods:
5
5
  * - Keypair (Node.js, backend, CLI)
6
6
  * - WalletAdapter (Browser, React dApps)
7
+ * - DappKit (Browser, @mysten/dapp-kit hooks)
7
8
  *
8
9
  * @module client/signers
9
10
  */
@@ -17,3 +18,9 @@ export type {
17
18
  export { KeypairSigner } from './KeypairSigner';
18
19
  export { WalletAdapterSigner } from './WalletAdapterSigner';
19
20
  export type { WalletAdapter } from './WalletAdapterSigner';
21
+ export { DappKitSigner } from './DappKitSigner';
22
+ export type {
23
+ DappKitSignerConfig,
24
+ DappKitSignAndExecuteFn,
25
+ DappKitSignPersonalMessageFn
26
+ } from './DappKitSigner';
@@ -1,13 +1,13 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
-
5
-
6
- /** Sui object identifiers */
7
-
8
- import { MoveStruct } from '../../../utils/index.js';
9
- import { bcs } from '@mysten/sui/bcs';
10
- const $moduleName = '0x2::object';
11
- export const UID = new MoveStruct({ name: `${$moduleName}::UID`, fields: {
12
- id: bcs.Address
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+
5
+
6
+ /** Sui object identifiers */
7
+
8
+ import { MoveStruct } from '../../../utils/index.js';
9
+ import { bcs } from '@mysten/sui/bcs';
10
+ const $moduleName = '0x2::object';
11
+ export const UID = new MoveStruct({ name: `${$moduleName}::UID`, fields: {
12
+ id: bcs.Address
13
13
  } });
@@ -1,33 +1,33 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { type BcsType, bcs } from '@mysten/sui/bcs';
5
- import { MoveStruct } from '../../../utils/index.js';
6
- const $moduleName = '0x2::vec_map';
7
- /** An entry in the map */
8
- export function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
9
- K,
10
- V
11
- ]) {
12
- return new MoveStruct({ name: `${$moduleName}::Entry<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
13
- key: typeParameters[0],
14
- value: typeParameters[1]
15
- } });
16
- }
17
- /**
18
- * A map data structure backed by a vector. The map is guaranteed not to contain
19
- * duplicate keys, but entries are _not_ sorted by key--entries are included in
20
- * insertion order. All operations are O(N) in the size of the map--the intention
21
- * of this data structure is only to provide the convenience of programming against
22
- * a map API. Large maps should use handwritten parent/child relationships instead.
23
- * Maps that need sorted iteration rather than insertion order iteration should
24
- * also be handwritten.
25
- */
26
- export function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
27
- K,
28
- V
29
- ]) {
30
- return new MoveStruct({ name: `${$moduleName}::VecMap<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
31
- contents: bcs.vector(Entry(typeParameters[0], typeParameters[1]))
32
- } });
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { type BcsType, bcs } from '@mysten/sui/bcs';
5
+ import { MoveStruct } from '../../../utils/index.js';
6
+ const $moduleName = '0x2::vec_map';
7
+ /** An entry in the map */
8
+ export function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
9
+ K,
10
+ V
11
+ ]) {
12
+ return new MoveStruct({ name: `${$moduleName}::Entry<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
13
+ key: typeParameters[0],
14
+ value: typeParameters[1]
15
+ } });
16
+ }
17
+ /**
18
+ * A map data structure backed by a vector. The map is guaranteed not to contain
19
+ * duplicate keys, but entries are _not_ sorted by key--entries are included in
20
+ * insertion order. All operations are O(N) in the size of the map--the intention
21
+ * of this data structure is only to provide the convenience of programming against
22
+ * a map API. Large maps should use handwritten parent/child relationships instead.
23
+ * Maps that need sorted iteration rather than insertion order iteration should
24
+ * also be handwritten.
25
+ */
26
+ export function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
27
+ K,
28
+ V
29
+ ]) {
30
+ return new MoveStruct({ name: `${$moduleName}::VecMap<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
31
+ contents: bcs.vector(Entry(typeParameters[0], typeParameters[1]))
32
+ } });
33
33
  }