@mysten/wallet-standard 0.7.1 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @mysten/wallet-standard
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fd8589806: Remove uses of deprecated imports from @mysten/sui.js
8
+ - 8b9e5f737: Added new isWalletWithRequiredFeatureSet utility and accompanying type
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies [fd8589806]
13
+ - @mysten/sui.js@0.42.0
14
+
15
+ ## 0.7.2
16
+
17
+ ### Patch Changes
18
+
19
+ - @mysten/sui.js@0.41.2
20
+
3
21
  ## 0.7.1
4
22
 
5
23
  ### Patch Changes
package/dist/detect.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- import { Wallet } from '@wallet-standard/core';
2
- import { WalletWithSuiFeatures } from './features';
1
+ import { Wallet, WalletWithFeatures } from '@wallet-standard/core';
2
+ import { MinimallyRequiredFeatures, WalletWithSuiFeatures } from './features';
3
+ /** @deprecated Use isWalletWithRequiredFeatureSet instead since it provides more accurate typing! */
3
4
  export declare function isWalletWithSuiFeatures(wallet: Wallet,
4
5
  /** Extra features that are required to be present, in addition to the expected feature set. */
5
6
  features?: string[]): wallet is WalletWithSuiFeatures;
7
+ export declare function isWalletWithRequiredFeatureSet<AdditionalFeatures extends Wallet['features']>(wallet: Wallet, additionalFeatures?: (keyof AdditionalFeatures)[]): wallet is WalletWithFeatures<MinimallyRequiredFeatures & AdditionalFeatures>;
@@ -1,4 +1,4 @@
1
- import type { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature, WalletWithFeatures } from '@wallet-standard/core';
1
+ import type { IdentifierRecord, StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature, WalletWithFeatures } from '@wallet-standard/core';
2
2
  import type { SuiSignTransactionBlockFeature } from './suiSignTransactionBlock';
3
3
  import type { SuiSignAndExecuteTransactionBlockFeature } from './suiSignAndExecuteTransactionBlock';
4
4
  import { SuiSignMessageFeature } from './suiSignMessage';
@@ -8,6 +8,11 @@ import { SuiSignPersonalMessageFeature } from './suiSignPersonalMessage';
8
8
  */
9
9
  export type SuiFeatures = SuiSignTransactionBlockFeature & SuiSignAndExecuteTransactionBlockFeature & SuiSignPersonalMessageFeature & Partial<SuiSignMessageFeature>;
10
10
  export type WalletWithSuiFeatures = WalletWithFeatures<StandardConnectFeature & StandardEventsFeature & SuiFeatures & Partial<StandardDisconnectFeature>>;
11
+ /**
12
+ * Represents a wallet with the absolute minimum feature set required to function in the Sui ecosystem.
13
+ */
14
+ export type WalletWithRequiredFeatures = WalletWithFeatures<MinimallyRequiredFeatures & Partial<SuiFeatures> & Partial<StandardDisconnectFeature> & IdentifierRecord<unknown>>;
15
+ export type MinimallyRequiredFeatures = StandardConnectFeature & StandardEventsFeature;
11
16
  export * from './suiSignMessage';
12
17
  export * from './suiSignTransactionBlock';
13
18
  export * from './suiSignAndExecuteTransactionBlock';
@@ -20,7 +20,9 @@ export interface SuiSignPersonalMessageInput {
20
20
  account: WalletAccount;
21
21
  }
22
22
  /** Output of signing personal messages. */
23
- export interface SuiSignPersonalMessageOutput {
23
+ export interface SuiSignPersonalMessageOutput extends SignedPersonalMessage {
24
+ }
25
+ export interface SignedPersonalMessage {
24
26
  bytes: string;
25
27
  signature: string;
26
28
  }
@@ -1,4 +1,3 @@
1
- import type { SignedTransaction } from '@mysten/sui.js';
2
1
  import { TransactionBlock } from '@mysten/sui.js/transactions';
3
2
  import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
4
3
  /** The latest API version of the signTransactionBlock API. */
@@ -23,5 +22,9 @@ export interface SuiSignTransactionBlockInput {
23
22
  chain: IdentifierString;
24
23
  }
25
24
  /** Output of signing transactions. */
26
- export interface SuiSignTransactionBlockOutput extends SignedTransaction {
25
+ export interface SuiSignTransactionBlockOutput extends SignedTransactionBlock {
26
+ }
27
+ export interface SignedTransactionBlock {
28
+ transactionBlockBytes: string;
29
+ signature: string;
27
30
  }
package/dist/index.js CHANGED
@@ -26,6 +26,7 @@ __export(src_exports, {
26
26
  SUI_LOCALNET_CHAIN: () => SUI_LOCALNET_CHAIN,
27
27
  SUI_MAINNET_CHAIN: () => SUI_MAINNET_CHAIN,
28
28
  SUI_TESTNET_CHAIN: () => SUI_TESTNET_CHAIN,
29
+ isWalletWithRequiredFeatureSet: () => isWalletWithRequiredFeatureSet,
29
30
  isWalletWithSuiFeatures: () => isWalletWithSuiFeatures
30
31
  });
31
32
  module.exports = __toCommonJS(src_exports);
@@ -39,6 +40,11 @@ var REQUIRED_FEATURES = [
39
40
  function isWalletWithSuiFeatures(wallet, features = []) {
40
41
  return [...REQUIRED_FEATURES, ...features].every((feature) => feature in wallet.features);
41
42
  }
43
+ function isWalletWithRequiredFeatureSet(wallet, additionalFeatures = []) {
44
+ return [...REQUIRED_FEATURES, ...additionalFeatures].every(
45
+ (feature) => feature in wallet.features
46
+ );
47
+ }
42
48
 
43
49
  // src/chains.ts
44
50
  var SUI_DEVNET_CHAIN = "sui:devnet";
@@ -58,6 +64,7 @@ var SUI_CHAINS = [
58
64
  SUI_LOCALNET_CHAIN,
59
65
  SUI_MAINNET_CHAIN,
60
66
  SUI_TESTNET_CHAIN,
67
+ isWalletWithRequiredFeatureSet,
61
68
  isWalletWithSuiFeatures,
62
69
  ...require("@wallet-standard/core")
63
70
  });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/detect.ts","../src/chains.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from '@wallet-standard/core';\n\nexport * from './features';\nexport * from './detect';\nexport * from './chains';\n","// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Wallet } from '@wallet-standard/core';\nimport { WalletWithSuiFeatures } from './features';\n\n// These features are absolutely required for wallets to function in the Sui ecosystem.\n// Eventually, as wallets have more consistent support of features, we may want to extend this list.\nconst REQUIRED_FEATURES: (keyof WalletWithSuiFeatures['features'])[] = [\n\t'standard:connect',\n\t'standard:events',\n];\n\nexport function isWalletWithSuiFeatures(\n\twallet: Wallet,\n\t/** Extra features that are required to be present, in addition to the expected feature set. */\n\tfeatures: string[] = [],\n): wallet is WalletWithSuiFeatures {\n\treturn [...REQUIRED_FEATURES, ...features].every((feature) => feature in wallet.features);\n}\n","// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n/** Sui Devnet */\nexport const SUI_DEVNET_CHAIN = 'sui:devnet';\n\n/** Sui Testnet */\nexport const SUI_TESTNET_CHAIN = 'sui:testnet';\n\n/** Sui Localnet */\nexport const SUI_LOCALNET_CHAIN = 'sui:localnet';\n\n/** Sui Mainnet */\nexport const SUI_MAINNET_CHAIN = 'sui:mainnet';\n\nexport const SUI_CHAINS = [\n\tSUI_DEVNET_CHAIN,\n\tSUI_TESTNET_CHAIN,\n\tSUI_LOCALNET_CHAIN,\n\tSUI_MAINNET_CHAIN,\n] as const;\n\nexport type SuiChain =\n\t| typeof SUI_DEVNET_CHAIN\n\t| typeof SUI_TESTNET_CHAIN\n\t| typeof SUI_LOCALNET_CHAIN\n\t| typeof SUI_MAINNET_CHAIN;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAc,kCAHd;;;ACQA,IAAM,oBAAiE;AAAA,EACtE;AAAA,EACA;AACD;AAEO,SAAS,wBACf,QAEA,WAAqB,CAAC,GACY;AAClC,SAAO,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE,MAAM,CAAC,YAAY,WAAW,OAAO,QAAQ;AACzF;;;ACfO,IAAM,mBAAmB;AAGzB,IAAM,oBAAoB;AAG1B,IAAM,qBAAqB;AAG3B,IAAM,oBAAoB;AAE1B,IAAM,aAAa;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/detect.ts","../src/chains.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from '@wallet-standard/core';\n\nexport * from './features';\nexport * from './detect';\nexport * from './chains';\n","// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Wallet, WalletWithFeatures } from '@wallet-standard/core';\nimport { MinimallyRequiredFeatures, WalletWithSuiFeatures } from './features';\n\n// These features are absolutely required for wallets to function in the Sui ecosystem.\n// Eventually, as wallets have more consistent support of features, we may want to extend this list.\nconst REQUIRED_FEATURES: (keyof MinimallyRequiredFeatures)[] = [\n\t'standard:connect',\n\t'standard:events',\n];\n\n/** @deprecated Use isWalletWithRequiredFeatureSet instead since it provides more accurate typing! */\nexport function isWalletWithSuiFeatures(\n\twallet: Wallet,\n\t/** Extra features that are required to be present, in addition to the expected feature set. */\n\tfeatures: string[] = [],\n): wallet is WalletWithSuiFeatures {\n\treturn [...REQUIRED_FEATURES, ...features].every((feature) => feature in wallet.features);\n}\n\nexport function isWalletWithRequiredFeatureSet<AdditionalFeatures extends Wallet['features']>(\n\twallet: Wallet,\n\tadditionalFeatures: (keyof AdditionalFeatures)[] = [],\n): wallet is WalletWithFeatures<MinimallyRequiredFeatures & AdditionalFeatures> {\n\treturn [...REQUIRED_FEATURES, ...additionalFeatures].every(\n\t\t(feature) => feature in wallet.features,\n\t);\n}\n","// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n/** Sui Devnet */\nexport const SUI_DEVNET_CHAIN = 'sui:devnet';\n\n/** Sui Testnet */\nexport const SUI_TESTNET_CHAIN = 'sui:testnet';\n\n/** Sui Localnet */\nexport const SUI_LOCALNET_CHAIN = 'sui:localnet';\n\n/** Sui Mainnet */\nexport const SUI_MAINNET_CHAIN = 'sui:mainnet';\n\nexport const SUI_CHAINS = [\n\tSUI_DEVNET_CHAIN,\n\tSUI_TESTNET_CHAIN,\n\tSUI_LOCALNET_CHAIN,\n\tSUI_MAINNET_CHAIN,\n] as const;\n\nexport type SuiChain =\n\t| typeof SUI_DEVNET_CHAIN\n\t| typeof SUI_TESTNET_CHAIN\n\t| typeof SUI_LOCALNET_CHAIN\n\t| typeof SUI_MAINNET_CHAIN;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAc,kCAHd;;;ACQA,IAAM,oBAAyD;AAAA,EAC9D;AAAA,EACA;AACD;AAGO,SAAS,wBACf,QAEA,WAAqB,CAAC,GACY;AAClC,SAAO,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE,MAAM,CAAC,YAAY,WAAW,OAAO,QAAQ;AACzF;AAEO,SAAS,+BACf,QACA,qBAAmD,CAAC,GAC2B;AAC/E,SAAO,CAAC,GAAG,mBAAmB,GAAG,kBAAkB,EAAE;AAAA,IACpD,CAAC,YAAY,WAAW,OAAO;AAAA,EAChC;AACD;;;ACzBO,IAAM,mBAAmB;AAGzB,IAAM,oBAAoB;AAG1B,IAAM,qBAAqB;AAG3B,IAAM,oBAAoB;AAE1B,IAAM,aAAa;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":[]}
package/dist/index.mjs CHANGED
@@ -9,6 +9,11 @@ var REQUIRED_FEATURES = [
9
9
  function isWalletWithSuiFeatures(wallet, features = []) {
10
10
  return [...REQUIRED_FEATURES, ...features].every((feature) => feature in wallet.features);
11
11
  }
12
+ function isWalletWithRequiredFeatureSet(wallet, additionalFeatures = []) {
13
+ return [...REQUIRED_FEATURES, ...additionalFeatures].every(
14
+ (feature) => feature in wallet.features
15
+ );
16
+ }
12
17
 
13
18
  // src/chains.ts
14
19
  var SUI_DEVNET_CHAIN = "sui:devnet";
@@ -27,6 +32,7 @@ export {
27
32
  SUI_LOCALNET_CHAIN,
28
33
  SUI_MAINNET_CHAIN,
29
34
  SUI_TESTNET_CHAIN,
35
+ isWalletWithRequiredFeatureSet,
30
36
  isWalletWithSuiFeatures
31
37
  };
32
38
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/detect.ts","../src/chains.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from '@wallet-standard/core';\n\nexport * from './features';\nexport * from './detect';\nexport * from './chains';\n","// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Wallet } from '@wallet-standard/core';\nimport { WalletWithSuiFeatures } from './features';\n\n// These features are absolutely required for wallets to function in the Sui ecosystem.\n// Eventually, as wallets have more consistent support of features, we may want to extend this list.\nconst REQUIRED_FEATURES: (keyof WalletWithSuiFeatures['features'])[] = [\n\t'standard:connect',\n\t'standard:events',\n];\n\nexport function isWalletWithSuiFeatures(\n\twallet: Wallet,\n\t/** Extra features that are required to be present, in addition to the expected feature set. */\n\tfeatures: string[] = [],\n): wallet is WalletWithSuiFeatures {\n\treturn [...REQUIRED_FEATURES, ...features].every((feature) => feature in wallet.features);\n}\n","// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n/** Sui Devnet */\nexport const SUI_DEVNET_CHAIN = 'sui:devnet';\n\n/** Sui Testnet */\nexport const SUI_TESTNET_CHAIN = 'sui:testnet';\n\n/** Sui Localnet */\nexport const SUI_LOCALNET_CHAIN = 'sui:localnet';\n\n/** Sui Mainnet */\nexport const SUI_MAINNET_CHAIN = 'sui:mainnet';\n\nexport const SUI_CHAINS = [\n\tSUI_DEVNET_CHAIN,\n\tSUI_TESTNET_CHAIN,\n\tSUI_LOCALNET_CHAIN,\n\tSUI_MAINNET_CHAIN,\n] as const;\n\nexport type SuiChain =\n\t| typeof SUI_DEVNET_CHAIN\n\t| typeof SUI_TESTNET_CHAIN\n\t| typeof SUI_LOCALNET_CHAIN\n\t| typeof SUI_MAINNET_CHAIN;\n"],"mappings":";AAGA,cAAc;;;ACKd,IAAM,oBAAiE;AAAA,EACtE;AAAA,EACA;AACD;AAEO,SAAS,wBACf,QAEA,WAAqB,CAAC,GACY;AAClC,SAAO,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE,MAAM,CAAC,YAAY,WAAW,OAAO,QAAQ;AACzF;;;ACfO,IAAM,mBAAmB;AAGzB,IAAM,oBAAoB;AAG1B,IAAM,qBAAqB;AAG3B,IAAM,oBAAoB;AAE1B,IAAM,aAAa;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/detect.ts","../src/chains.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport * from '@wallet-standard/core';\n\nexport * from './features';\nexport * from './detect';\nexport * from './chains';\n","// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Wallet, WalletWithFeatures } from '@wallet-standard/core';\nimport { MinimallyRequiredFeatures, WalletWithSuiFeatures } from './features';\n\n// These features are absolutely required for wallets to function in the Sui ecosystem.\n// Eventually, as wallets have more consistent support of features, we may want to extend this list.\nconst REQUIRED_FEATURES: (keyof MinimallyRequiredFeatures)[] = [\n\t'standard:connect',\n\t'standard:events',\n];\n\n/** @deprecated Use isWalletWithRequiredFeatureSet instead since it provides more accurate typing! */\nexport function isWalletWithSuiFeatures(\n\twallet: Wallet,\n\t/** Extra features that are required to be present, in addition to the expected feature set. */\n\tfeatures: string[] = [],\n): wallet is WalletWithSuiFeatures {\n\treturn [...REQUIRED_FEATURES, ...features].every((feature) => feature in wallet.features);\n}\n\nexport function isWalletWithRequiredFeatureSet<AdditionalFeatures extends Wallet['features']>(\n\twallet: Wallet,\n\tadditionalFeatures: (keyof AdditionalFeatures)[] = [],\n): wallet is WalletWithFeatures<MinimallyRequiredFeatures & AdditionalFeatures> {\n\treturn [...REQUIRED_FEATURES, ...additionalFeatures].every(\n\t\t(feature) => feature in wallet.features,\n\t);\n}\n","// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n/** Sui Devnet */\nexport const SUI_DEVNET_CHAIN = 'sui:devnet';\n\n/** Sui Testnet */\nexport const SUI_TESTNET_CHAIN = 'sui:testnet';\n\n/** Sui Localnet */\nexport const SUI_LOCALNET_CHAIN = 'sui:localnet';\n\n/** Sui Mainnet */\nexport const SUI_MAINNET_CHAIN = 'sui:mainnet';\n\nexport const SUI_CHAINS = [\n\tSUI_DEVNET_CHAIN,\n\tSUI_TESTNET_CHAIN,\n\tSUI_LOCALNET_CHAIN,\n\tSUI_MAINNET_CHAIN,\n] as const;\n\nexport type SuiChain =\n\t| typeof SUI_DEVNET_CHAIN\n\t| typeof SUI_TESTNET_CHAIN\n\t| typeof SUI_LOCALNET_CHAIN\n\t| typeof SUI_MAINNET_CHAIN;\n"],"mappings":";AAGA,cAAc;;;ACKd,IAAM,oBAAyD;AAAA,EAC9D;AAAA,EACA;AACD;AAGO,SAAS,wBACf,QAEA,WAAqB,CAAC,GACY;AAClC,SAAO,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE,MAAM,CAAC,YAAY,WAAW,OAAO,QAAQ;AACzF;AAEO,SAAS,+BACf,QACA,qBAAmD,CAAC,GAC2B;AAC/E,SAAO,CAAC,GAAG,mBAAmB,GAAG,kBAAkB,EAAE;AAAA,IACpD,CAAC,YAAY,WAAW,OAAO;AAAA,EAChC;AACD;;;ACzBO,IAAM,mBAAmB;AAGzB,IAAM,oBAAoB;AAG1B,IAAM,qBAAqB;AAG3B,IAAM,oBAAoB;AAE1B,IAAM,aAAa;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/wallet-standard",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "A suite of standard utilities for implementing wallets based on the Wallet Standard.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Mysten Labs <build@mystenlabs.com>",
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@wallet-standard/core": "1.0.3",
25
- "@mysten/sui.js": "0.41.1"
25
+ "@mysten/sui.js": "0.42.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "tsup": "^7.1.0",
package/src/detect.ts CHANGED
@@ -1,16 +1,17 @@
1
1
  // Copyright (c) Mysten Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { Wallet } from '@wallet-standard/core';
5
- import { WalletWithSuiFeatures } from './features';
4
+ import { Wallet, WalletWithFeatures } from '@wallet-standard/core';
5
+ import { MinimallyRequiredFeatures, WalletWithSuiFeatures } from './features';
6
6
 
7
7
  // These features are absolutely required for wallets to function in the Sui ecosystem.
8
8
  // Eventually, as wallets have more consistent support of features, we may want to extend this list.
9
- const REQUIRED_FEATURES: (keyof WalletWithSuiFeatures['features'])[] = [
9
+ const REQUIRED_FEATURES: (keyof MinimallyRequiredFeatures)[] = [
10
10
  'standard:connect',
11
11
  'standard:events',
12
12
  ];
13
13
 
14
+ /** @deprecated Use isWalletWithRequiredFeatureSet instead since it provides more accurate typing! */
14
15
  export function isWalletWithSuiFeatures(
15
16
  wallet: Wallet,
16
17
  /** Extra features that are required to be present, in addition to the expected feature set. */
@@ -18,3 +19,12 @@ export function isWalletWithSuiFeatures(
18
19
  ): wallet is WalletWithSuiFeatures {
19
20
  return [...REQUIRED_FEATURES, ...features].every((feature) => feature in wallet.features);
20
21
  }
22
+
23
+ export function isWalletWithRequiredFeatureSet<AdditionalFeatures extends Wallet['features']>(
24
+ wallet: Wallet,
25
+ additionalFeatures: (keyof AdditionalFeatures)[] = [],
26
+ ): wallet is WalletWithFeatures<MinimallyRequiredFeatures & AdditionalFeatures> {
27
+ return [...REQUIRED_FEATURES, ...additionalFeatures].every(
28
+ (feature) => feature in wallet.features,
29
+ );
30
+ }
@@ -2,6 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import type {
5
+ IdentifierRecord,
5
6
  StandardConnectFeature,
6
7
  StandardDisconnectFeature,
7
8
  StandardEventsFeature,
@@ -29,6 +30,18 @@ export type WalletWithSuiFeatures = WalletWithFeatures<
29
30
  Partial<StandardDisconnectFeature>
30
31
  >;
31
32
 
33
+ /**
34
+ * Represents a wallet with the absolute minimum feature set required to function in the Sui ecosystem.
35
+ */
36
+ export type WalletWithRequiredFeatures = WalletWithFeatures<
37
+ MinimallyRequiredFeatures &
38
+ Partial<SuiFeatures> &
39
+ Partial<StandardDisconnectFeature> &
40
+ IdentifierRecord<unknown>
41
+ >;
42
+
43
+ export type MinimallyRequiredFeatures = StandardConnectFeature & StandardEventsFeature;
44
+
32
45
  export * from './suiSignMessage';
33
46
  export * from './suiSignTransactionBlock';
34
47
  export * from './suiSignAndExecuteTransactionBlock';
@@ -30,7 +30,9 @@ export interface SuiSignPersonalMessageInput {
30
30
  }
31
31
 
32
32
  /** Output of signing personal messages. */
33
- export interface SuiSignPersonalMessageOutput {
33
+ export interface SuiSignPersonalMessageOutput extends SignedPersonalMessage {}
34
+
35
+ export interface SignedPersonalMessage {
34
36
  bytes: string;
35
37
  signature: string;
36
38
  }
@@ -1,7 +1,6 @@
1
1
  // Copyright (c) Mysten Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import type { SignedTransaction } from '@mysten/sui.js';
5
4
  import { TransactionBlock } from '@mysten/sui.js/transactions';
6
5
  import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
7
6
 
@@ -33,4 +32,9 @@ export interface SuiSignTransactionBlockInput {
33
32
  }
34
33
 
35
34
  /** Output of signing transactions. */
36
- export interface SuiSignTransactionBlockOutput extends SignedTransaction {}
35
+ export interface SuiSignTransactionBlockOutput extends SignedTransactionBlock {}
36
+
37
+ export interface SignedTransactionBlock {
38
+ transactionBlockBytes: string;
39
+ signature: string;
40
+ }