@dynamic-labs-sdk/sui 0.0.1-alpha.17

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 (31) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/README.md +35 -0
  3. package/index.cjs.d.ts +1 -0
  4. package/index.cjs.js +72 -0
  5. package/index.esm.d.ts +1 -0
  6. package/index.esm.js +63 -0
  7. package/package.json +28 -0
  8. package/src/errors/NotSuiProviderError/NotSuiProviderError.d.ts +14 -0
  9. package/src/errors/NotSuiProviderError/NotSuiProviderError.d.ts.map +1 -0
  10. package/src/errors/NotSuiProviderError/index.d.ts +2 -0
  11. package/src/errors/NotSuiProviderError/index.d.ts.map +1 -0
  12. package/src/exports/index.d.ts +9 -0
  13. package/src/exports/index.d.ts.map +1 -0
  14. package/src/getSuiClient/getSuiClient.d.ts +13 -0
  15. package/src/getSuiClient/getSuiClient.d.ts.map +1 -0
  16. package/src/getSuiClient/index.d.ts +2 -0
  17. package/src/getSuiClient/index.d.ts.map +1 -0
  18. package/src/isSuiWalletAccount/index.d.ts +2 -0
  19. package/src/isSuiWalletAccount/index.d.ts.map +1 -0
  20. package/src/isSuiWalletAccount/isSuiWalletAccount.d.ts +9 -0
  21. package/src/isSuiWalletAccount/isSuiWalletAccount.d.ts.map +1 -0
  22. package/src/isSuiWalletProvider/index.d.ts +2 -0
  23. package/src/isSuiWalletProvider/index.d.ts.map +1 -0
  24. package/src/isSuiWalletProvider/isSuiWalletProvider.d.ts +8 -0
  25. package/src/isSuiWalletProvider/isSuiWalletProvider.d.ts.map +1 -0
  26. package/src/types/SuiClient.types.d.ts +29 -0
  27. package/src/types/SuiClient.types.d.ts.map +1 -0
  28. package/src/types/SuiWalletFeatures.types.d.ts +32 -0
  29. package/src/types/SuiWalletFeatures.types.d.ts.map +1 -0
  30. package/src/types/SuiWalletProvider.types.d.ts +8 -0
  31. package/src/types/SuiWalletProvider.types.d.ts.map +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,138 @@
1
+ ## 0.0.1-alpha.20 (2025-08-06)
2
+
3
+ ### 🚀 Features
4
+
5
+ - raise an error if different dynamic packages are on different versions ([#253](https://github.com/dynamic-labs/dynamic-sdk/pull/253))
6
+
7
+ ## 0.0.1-alpha.19 (2025-07-23)
8
+
9
+ This was a version bump only, there were no code changes.
10
+
11
+ ## 0.0.1-alpha.18 (2025-07-22)
12
+
13
+ This was a version bump only, there were no code changes.
14
+
15
+ ## 0.0.1-alpha.17 (2025-07-22)
16
+
17
+ This was a version bump only, there were no code changes.
18
+
19
+ ## 0.0.1-alpha.16 (2025-07-14)
20
+
21
+ ### 🚀 Features
22
+
23
+ - add new getMultichainBalances api method ([#219](https://github.com/dynamic-labs/dynamic-sdk/pull/219))
24
+ - adds authenticated event ([#222](https://github.com/dynamic-labs/dynamic-sdk/pull/222))
25
+
26
+ ## 0.0.1-alpha.15 (2025-07-14)
27
+
28
+ ### 🚀 Features
29
+
30
+ - **SIN-7:** Add Signin with Passkey ([#201](https://github.com/dynamic-labs/dynamic-sdk/pull/201))
31
+
32
+ ## 0.0.1-alpha.14 (2025-07-11)
33
+
34
+ ### 🩹 Fixes
35
+
36
+ - import zod mini using namespace ([#214](https://github.com/dynamic-labs/dynamic-sdk/pull/214))
37
+
38
+ ## 0.0.1-alpha.13 (2025-07-09)
39
+
40
+ ### 🩹 Fixes
41
+
42
+ - convert api headers to get api headers ([#211](https://github.com/dynamic-labs/dynamic-sdk/pull/211))
43
+
44
+ ## 0.0.1-alpha.12 (2025-07-09)
45
+
46
+ ### 🩹 Fixes
47
+
48
+ - allow the api call to include cookie credentials ([#209](https://github.com/dynamic-labs/dynamic-sdk/pull/209))
49
+
50
+ ## 0.0.1-alpha.11 (2025-07-08)
51
+
52
+ This was a version bump only, there were no code changes.
53
+
54
+ ## 0.0.1-alpha.10 (2025-07-08)
55
+
56
+ This was a version bump only, there were no code changes.
57
+
58
+ ## 0.0.1-alpha.9 (2025-07-08)
59
+
60
+ ### 🩹 Fixes
61
+
62
+ - throw when attempting to set undefined prop in storage ([#200](https://github.com/dynamic-labs/dynamic-sdk/pull/200))
63
+
64
+ ## 0.0.1-alpha.8 (2025-07-03)
65
+
66
+ This was a version bump only, there were no code changes.
67
+
68
+ ## 0.0.1-alpha.7 (2025-07-02)
69
+
70
+ ### 🩹 Fixes
71
+
72
+ - **mfa:** make device id optional ([#175](https://github.com/dynamic-labs/dynamic-sdk/pull/175))
73
+ - **mfa:** allow create mfa options to authTotpMfaDevice ([#178](https://github.com/dynamic-labs/dynamic-sdk/pull/178))
74
+
75
+ ## 0.0.1-alpha.6 (2025-06-30)
76
+
77
+ ### 🚀 Features
78
+
79
+ - add support for solana wallet standard ([#133](https://github.com/dynamic-labs/dynamic-sdk/pull/133))
80
+ - add support social sign in ([#123](https://github.com/dynamic-labs/dynamic-sdk/pull/123))
81
+ - add support for TOTP MFA ([#139](https://github.com/dynamic-labs/dynamic-sdk/pull/139))([#140](https://github.com/dynamic-labs/dynamic-sdk/pull/140))([#141](https://github.com/dynamic-labs/dynamic-sdk/pull/141))([#142](https://github.com/dynamic-labs/dynamic-sdk/pull/142))([#143](https://github.com/dynamic-labs/dynamic-sdk/pull/143))([#144](https://github.com/dynamic-labs/dynamic-sdk/pull/144))([#149](https://github.com/dynamic-labs/dynamic-sdk/pull/149))([#146](https://github.com/dynamic-labs/dynamic-sdk/pull/146))([#147](https://github.com/dynamic-labs/dynamic-sdk/pull/147))
82
+ - add methods to connect and verify a wallet ([#99](https://github.com/dynamic-labs/dynamic-sdk/pull/99))
83
+ - add signMessage ([#111](https://github.com/dynamic-labs/dynamic-sdk/pull/111))
84
+ - add primary wallet account ([#128](https://github.com/dynamic-labs/dynamic-sdk/pull/128))
85
+ - cache project settings for connected users ([#148](https://github.com/dynamic-labs/dynamic-sdk/pull/148))
86
+ - add updateUser function ([#138](https://github.com/dynamic-labs/dynamic-sdk/pull/138))
87
+
88
+ ### 🩹 Fixes
89
+
90
+ - use correct import path for commonjs ([#125](https://github.com/dynamic-labs/dynamic-sdk/pull/125))
91
+ - ensure change events are fired only when state changes ([#168](https://github.com/dynamic-labs/dynamic-sdk/pull/168))
92
+
93
+ ### 🔧 Refactors
94
+
95
+ - modularize DynamicCoreState with global interface ([#93](https://github.com/dynamic-labs/dynamic-sdk/pull/93))
96
+ - add setVerifyResponse ([#106](https://github.com/dynamic-labs/dynamic-sdk/pull/106))
97
+ - rename set verify response function ([#122](https://github.com/dynamic-labs/dynamic-sdk/pull/122))
98
+
99
+ ## 0.0.1-alpha.5 (2025-06-04)
100
+
101
+ ### 🩹 Fixes
102
+
103
+ - support server side rendering ([#92](https://github.com/dynamic-labs/dynamic-sdk/pull/92))
104
+
105
+ ## 0.0.1-alpha.4 (2025-05-28)
106
+
107
+ ### 🚀 Features
108
+
109
+ - allow manual init of client ([#88](https://github.com/dynamic-labs/dynamic-sdk/pull/88))
110
+
111
+ ### 🩹 Fixes
112
+
113
+ - client core accidentally sharing state among different instances ([#89](https://github.com/dynamic-labs/dynamic-sdk/pull/89))
114
+
115
+ ## 0.0.1-alpha.3 (2025-05-27)
116
+
117
+ ### 🩹 Fixes
118
+
119
+ - properly export state changed events ([#85](https://github.com/dynamic-labs/dynamic-sdk/pull/85))
120
+
121
+ ## 0.0.1-alpha.2 (2025-05-26)
122
+
123
+ ### 🚀 Features
124
+
125
+ - logout user when session expires ([#47](https://github.com/dynamic-labs/dynamic-sdk/pull/47))
126
+ - add sms verification ([#78](https://github.com/dynamic-labs/dynamic-sdk/pull/78))
127
+ - raise changed events for state variables ([#79](https://github.com/dynamic-labs/dynamic-sdk/pull/79))
128
+ - allow extending the client ([#80](https://github.com/dynamic-labs/dynamic-sdk/pull/80))
129
+
130
+ ## 0.0.1-alpha.1 (2025-05-19)
131
+
132
+ ### 🩹 Fixes
133
+
134
+ - make the client package public ([#74](https://github.com/dynamic-labs/dynamic-sdk/pull/74))
135
+
136
+ ## 0.0.1-alpha.0 (2025-05-16)
137
+
138
+ Initial release of the Dynamic SDK.
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @dynamic-labs-sdk/sui
2
+
3
+ This package contains the SUI integration for the Dynamic SDK. It enables support for SUI external wallets using the [@mysten/wallet-standard](https://github.com/MystenLabs/wallet-standard) interface.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ pnpm add @dynamic-labs-sdk/sui
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { addSuiExtension } from '@dynamic-labs-sdk/sui';
15
+
16
+ // Assuming you have a DynamicClient instance
17
+ addSuiExtension(dynamicClient);
18
+ ```
19
+
20
+ This will register all SUI-compatible wallets that implement the wallet standard with your Dynamic client.
21
+
22
+ ## Features
23
+
24
+ - SUI wallet provider integration
25
+ - SUI wallet standard support
26
+ - Easy extension for Dynamic SDK
27
+
28
+ ## Requirements
29
+
30
+ - [@dynamic-labs-sdk/client](https://www.npmjs.com/package/@dynamic-labs-sdk/client)
31
+ - [@mysten/wallet-standard](https://www.npmjs.com/package/@mysten/wallet-standard)
32
+
33
+ ## License
34
+
35
+ MIT
package/index.cjs.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/exports/index";
package/index.cjs.js ADDED
@@ -0,0 +1,72 @@
1
+ 'use strict';
2
+
3
+ var assertPackageVersion = require('@dynamic-labs-sdk/assert-package-version');
4
+ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
5
+ var client = require('@dynamic-labs-sdk/client');
6
+ var core = require('@dynamic-labs-sdk/client/core');
7
+
8
+ var version = "0.0.1-alpha.17";
9
+
10
+ class NotSuiProviderError extends client.BaseError {
11
+ /**
12
+ * Creates a new NotSuiProviderError instance.
13
+ *
14
+ * @param params - Object containing the provider key
15
+ * @param params.providerKey - The key of the provider that is not a SUI provider
16
+ */ constructor(params){
17
+ super({
18
+ cause: null,
19
+ code: 'not_sui_provider_error',
20
+ docsUrl: null,
21
+ name: 'NotSuiProviderError',
22
+ shortMessage: 'Provider is not a SUI wallet provider'
23
+ });
24
+ this.providerKey = params.providerKey;
25
+ }
26
+ }
27
+
28
+ /**
29
+ * Type guard utility to check if a WalletProvider is a SUI wallet provider.
30
+ * Returns true if the provider's chain is 'SUI'.
31
+ */ const isSuiWalletProvider = (provider)=>{
32
+ return provider.chain === 'SUI';
33
+ };
34
+
35
+ /**
36
+ * Retrieves a SuiClient from a wallet account.
37
+ *
38
+ * @param client - The Dynamic client used in your app
39
+ * @param walletAccount - The wallet account to get the SuiClient for
40
+ * @returns Promise that resolves to a SuiClient instance
41
+ * @throws {NotSuiProviderError} If the wallet account's provider is not a SUI provider
42
+ */ const getSuiClient = async (client, { walletAccount })=>{
43
+ const provider = core.getWalletProviderFromWalletAccount(client, {
44
+ walletAccount
45
+ });
46
+ if (!isSuiWalletProvider(provider)) {
47
+ throw new NotSuiProviderError({
48
+ providerKey: provider.key
49
+ });
50
+ }
51
+ return provider.getSuiClient(walletAccount);
52
+ };
53
+
54
+ /**
55
+ * Type guard utility to check if a WalletAccount is a SUI wallet account.
56
+ *
57
+ * @param walletAccount - The wallet account to check
58
+ * @returns True if the wallet account's chain is 'SUI'
59
+ */ const isSuiWalletAccount = (walletAccount)=>{
60
+ return walletAccount.chain === 'SUI';
61
+ };
62
+
63
+ assertPackageVersion.assertPackageVersion('@dynamic-labs-sdk/sui', version);
64
+
65
+ Object.defineProperty(exports, "WalletProviderEnum", {
66
+ enumerable: true,
67
+ get: function () { return sdkApiCore.WalletProviderEnum; }
68
+ });
69
+ exports.NotSuiProviderError = NotSuiProviderError;
70
+ exports.getSuiClient = getSuiClient;
71
+ exports.isSuiWalletAccount = isSuiWalletAccount;
72
+ exports.isSuiWalletProvider = isSuiWalletProvider;
package/index.esm.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/exports/index";
package/index.esm.js ADDED
@@ -0,0 +1,63 @@
1
+ import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';
2
+ export { WalletProviderEnum } from '@dynamic-labs/sdk-api-core';
3
+ import { BaseError } from '@dynamic-labs-sdk/client';
4
+ import { getWalletProviderFromWalletAccount } from '@dynamic-labs-sdk/client/core';
5
+
6
+ var version = "0.0.1-alpha.17";
7
+
8
+ class NotSuiProviderError extends BaseError {
9
+ /**
10
+ * Creates a new NotSuiProviderError instance.
11
+ *
12
+ * @param params - Object containing the provider key
13
+ * @param params.providerKey - The key of the provider that is not a SUI provider
14
+ */ constructor(params){
15
+ super({
16
+ cause: null,
17
+ code: 'not_sui_provider_error',
18
+ docsUrl: null,
19
+ name: 'NotSuiProviderError',
20
+ shortMessage: 'Provider is not a SUI wallet provider'
21
+ });
22
+ this.providerKey = params.providerKey;
23
+ }
24
+ }
25
+
26
+ /**
27
+ * Type guard utility to check if a WalletProvider is a SUI wallet provider.
28
+ * Returns true if the provider's chain is 'SUI'.
29
+ */ const isSuiWalletProvider = (provider)=>{
30
+ return provider.chain === 'SUI';
31
+ };
32
+
33
+ /**
34
+ * Retrieves a SuiClient from a wallet account.
35
+ *
36
+ * @param client - The Dynamic client used in your app
37
+ * @param walletAccount - The wallet account to get the SuiClient for
38
+ * @returns Promise that resolves to a SuiClient instance
39
+ * @throws {NotSuiProviderError} If the wallet account's provider is not a SUI provider
40
+ */ const getSuiClient = async (client, { walletAccount })=>{
41
+ const provider = getWalletProviderFromWalletAccount(client, {
42
+ walletAccount
43
+ });
44
+ if (!isSuiWalletProvider(provider)) {
45
+ throw new NotSuiProviderError({
46
+ providerKey: provider.key
47
+ });
48
+ }
49
+ return provider.getSuiClient(walletAccount);
50
+ };
51
+
52
+ /**
53
+ * Type guard utility to check if a WalletAccount is a SUI wallet account.
54
+ *
55
+ * @param walletAccount - The wallet account to check
56
+ * @returns True if the wallet account's chain is 'SUI'
57
+ */ const isSuiWalletAccount = (walletAccount)=>{
58
+ return walletAccount.chain === 'SUI';
59
+ };
60
+
61
+ assertPackageVersion('@dynamic-labs-sdk/sui', version);
62
+
63
+ export { NotSuiProviderError, getSuiClient, isSuiWalletAccount, isSuiWalletProvider };
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@dynamic-labs-sdk/sui",
3
+ "version": "0.0.1-alpha.17",
4
+ "type": "module",
5
+ "main": "./index.cjs.js",
6
+ "module": "./index.esm.js",
7
+ "types": "./index.esm.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "types": "./index.esm.d.ts",
12
+ "import": "./index.esm.js",
13
+ "default": "./index.cjs.js"
14
+ },
15
+ "./walletStandard": {
16
+ "types": "./walletStandard.esm.d.ts",
17
+ "import": "./walletStandard.esm.js",
18
+ "default": "./walletStandard.cjs.js"
19
+ }
20
+ },
21
+ "dependencies": {
22
+ "@dynamic-labs-sdk/client": "0.0.1-alpha.17",
23
+ "@dynamic-labs-sdk/assert-package-version": "0.0.1-alpha.17",
24
+ "@dynamic-labs/sdk-api-core": "0.0.745",
25
+ "@mysten/wallet-standard": "0.16.4",
26
+ "eventemitter3": "^5.0.1"
27
+ }
28
+ }
@@ -0,0 +1,14 @@
1
+ import { BaseError } from '@dynamic-labs-sdk/client';
2
+ export declare class NotSuiProviderError extends BaseError {
3
+ readonly providerKey: string;
4
+ /**
5
+ * Creates a new NotSuiProviderError instance.
6
+ *
7
+ * @param params - Object containing the provider key
8
+ * @param params.providerKey - The key of the provider that is not a SUI provider
9
+ */
10
+ constructor(params: {
11
+ providerKey: string;
12
+ });
13
+ }
14
+ //# sourceMappingURL=NotSuiProviderError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotSuiProviderError.d.ts","sourceRoot":"","sources":["../../../../../../packages/sui/src/errors/NotSuiProviderError/NotSuiProviderError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,qBAAa,mBAAoB,SAAQ,SAAS;IAChD,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC;;;;;OAKG;gBACS,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE;CAW5C"}
@@ -0,0 +1,2 @@
1
+ export { NotSuiProviderError } from './NotSuiProviderError';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sui/src/errors/NotSuiProviderError/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { WalletProviderEnum } from '@dynamic-labs/sdk-api-core';
2
+ export { NotSuiProviderError } from '../errors/NotSuiProviderError';
3
+ export { getSuiClient } from '../getSuiClient';
4
+ export { isSuiWalletAccount } from '../isSuiWalletAccount';
5
+ export { isSuiWalletProvider } from '../isSuiWalletProvider';
6
+ export type { SignedMessage, SuiClient, SuiEvents, } from '../types/SuiClient.types';
7
+ export type { SuiWalletFeatures } from '../types/SuiWalletFeatures.types';
8
+ export type { SuiWalletProvider } from '../types/SuiWalletProvider.types';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/exports/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EACV,aAAa,EACb,SAAS,EACT,SAAS,GACV,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,YAAY,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { DynamicClient, WalletAccount } from '@dynamic-labs-sdk/client';
2
+ /**
3
+ * Retrieves a SuiClient from a wallet account.
4
+ *
5
+ * @param client - The Dynamic client used in your app
6
+ * @param walletAccount - The wallet account to get the SuiClient for
7
+ * @returns Promise that resolves to a SuiClient instance
8
+ * @throws {NotSuiProviderError} If the wallet account's provider is not a SUI provider
9
+ */
10
+ export declare const getSuiClient: (client: DynamicClient, { walletAccount }: {
11
+ walletAccount: WalletAccount;
12
+ }) => Promise<import("../exports").SuiClient>;
13
+ //# sourceMappingURL=getSuiClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSuiClient.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/getSuiClient/getSuiClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAM7E;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,WACf,aAAa,qBACF;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,4CAWpD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getSuiClient } from './getSuiClient';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/getSuiClient/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { isSuiWalletAccount } from './isSuiWalletAccount';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/isSuiWalletAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { WalletAccount } from '@dynamic-labs-sdk/client';
2
+ /**
3
+ * Type guard utility to check if a WalletAccount is a SUI wallet account.
4
+ *
5
+ * @param walletAccount - The wallet account to check
6
+ * @returns True if the wallet account's chain is 'SUI'
7
+ */
8
+ export declare const isSuiWalletAccount: (walletAccount: WalletAccount) => boolean;
9
+ //# sourceMappingURL=isSuiWalletAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isSuiWalletAccount.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/isSuiWalletAccount/isSuiWalletAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,kBAAmB,aAAa,KAAG,OAEjE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { isSuiWalletProvider } from './isSuiWalletProvider';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/isSuiWalletProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { WalletProvider } from '@dynamic-labs-sdk/client/core';
2
+ import type { SuiWalletProvider } from '../types/SuiWalletProvider.types';
3
+ /**
4
+ * Type guard utility to check if a WalletProvider is a SUI wallet provider.
5
+ * Returns true if the provider's chain is 'SUI'.
6
+ */
7
+ export declare const isSuiWalletProvider: (provider: WalletProvider) => provider is SuiWalletProvider;
8
+ //# sourceMappingURL=isSuiWalletProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isSuiWalletProvider.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/isSuiWalletProvider/isSuiWalletProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,mBAAmB,aACpB,cAAc,KACvB,QAAQ,IAAI,iBAEd,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type EventEmitter from 'eventemitter3';
2
+ export type SuiEvents = {
3
+ accountChanged(address: string): unknown;
4
+ activeWalletDidChange(address: string): unknown;
5
+ connect(...args: unknown[]): unknown;
6
+ disconnect(...args: unknown[]): unknown;
7
+ };
8
+ export type SuiClient = EventEmitter<SuiEvents> & {
9
+ address?: string;
10
+ connect: (args?: {
11
+ onlyIfTrusted: boolean;
12
+ }) => Promise<{
13
+ address: string;
14
+ }>;
15
+ disconnect(): Promise<void>;
16
+ isConnected: boolean;
17
+ signAndExecuteTransactionBlock(transactionBlock: unknown, options?: Record<string, unknown>): Promise<{
18
+ digest: string;
19
+ }>;
20
+ signMessage(message: Uint8Array): Promise<SignedMessage>;
21
+ signTransactionBlock(transactionBlock: unknown): Promise<{
22
+ signature: string;
23
+ transactionBlockBytes: string;
24
+ }>;
25
+ };
26
+ export type SignedMessage = {
27
+ signature: string;
28
+ };
29
+ //# sourceMappingURL=SuiClient.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuiClient.types.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/types/SuiClient.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG;IACtB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IACzC,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAChD,OAAO,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACrC,UAAU,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,GAAG;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE;QAAE,aAAa,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7E,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,8BAA8B,CAC5B,gBAAgB,EAAE,OAAO,EACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/B,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACzD,oBAAoB,CAClB,gBAAgB,EAAE,OAAO,GACxB,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,qBAAqB,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClE,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@mysten/wallet-standard';
2
+ export type SuiWalletFeatures = {
3
+ 'sui:signAndExecuteTransactionBlock': {
4
+ signAndExecuteTransactionBlock: (args: {
5
+ account: unknown;
6
+ chain: string;
7
+ options?: Record<string, unknown>;
8
+ transactionBlock: unknown;
9
+ }) => Promise<{
10
+ digest: string;
11
+ }>;
12
+ };
13
+ 'sui:signPersonalMessage': {
14
+ signPersonalMessage: (args: {
15
+ account: unknown;
16
+ message: Uint8Array;
17
+ }) => Promise<Array<{
18
+ signature: string;
19
+ }>>;
20
+ };
21
+ 'sui:signTransactionBlock': {
22
+ signTransactionBlock: (args: {
23
+ account: unknown;
24
+ chain: string;
25
+ transactionBlock: unknown;
26
+ }) => Promise<{
27
+ signature: string;
28
+ transactionBlockBytes: string;
29
+ }>;
30
+ };
31
+ } & StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature;
32
+ //# sourceMappingURL=SuiWalletFeatures.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuiWalletFeatures.types.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/types/SuiWalletFeatures.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,oCAAoC,EAAE;QACpC,8BAA8B,EAAE,CAAC,IAAI,EAAE;YACrC,OAAO,EAAE,OAAO,CAAC;YACjB,KAAK,EAAE,MAAM,CAAC;YACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAClC,gBAAgB,EAAE,OAAO,CAAC;SAC3B,KAAK,OAAO,CAAC;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACnC,CAAC;IACF,yBAAyB,EAAE;QACzB,mBAAmB,EAAE,CAAC,IAAI,EAAE;YAC1B,OAAO,EAAE,OAAO,CAAC;YACjB,OAAO,EAAE,UAAU,CAAC;SACrB,KAAK,OAAO,CAAC,KAAK,CAAC;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC,CAAC;KAC7C,CAAC;IACF,0BAA0B,EAAE;QAC1B,oBAAoB,EAAE,CAAC,IAAI,EAAE;YAC3B,OAAO,EAAE,OAAO,CAAC;YACjB,KAAK,EAAE,MAAM,CAAC;YACd,gBAAgB,EAAE,OAAO,CAAC;SAC3B,KAAK,OAAO,CAAC;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,qBAAqB,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACrE,CAAC;CACH,GAAG,sBAAsB,GACxB,yBAAyB,GACzB,qBAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { WalletAccount } from '@dynamic-labs-sdk/client';
2
+ import type { WalletProvider } from '@dynamic-labs-sdk/client/core';
3
+ import type { SuiClient } from './SuiClient.types';
4
+ export type SuiWalletProvider = Omit<WalletProvider, 'chain'> & {
5
+ chain: 'SUI';
6
+ getSuiClient(walletAccount?: WalletAccount): Promise<SuiClient>;
7
+ };
8
+ //# sourceMappingURL=SuiWalletProvider.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuiWalletProvider.types.d.ts","sourceRoot":"","sources":["../../../../../packages/sui/src/types/SuiWalletProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG;IAC9D,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACjE,CAAC"}