@mysten/wallet-standard 0.5.3 → 0.5.5

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,34 @@
1
1
  # @mysten/wallet-standard
2
2
 
3
+ ## 0.5.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 44e76bbd2: Expose mainnet chain.
8
+ - Updated dependencies [7915de531]
9
+ - Updated dependencies [6f9fc94ca]
10
+ - Updated dependencies [605eac8c6]
11
+ - Updated dependencies [262e3dfdd]
12
+ - Updated dependencies [91c63e4f8]
13
+ - Updated dependencies [e61ed2bac]
14
+ - Updated dependencies [5053a8dc8]
15
+ - @mysten/sui.js@0.33.0
16
+
17
+ ## 0.5.4
18
+
19
+ ### Patch Changes
20
+
21
+ - b4f0bfc76: Fix type definitions for package exports.
22
+ - Updated dependencies [4ae3cbea3]
23
+ - Updated dependencies [d2755a496]
24
+ - Updated dependencies [f612dac98]
25
+ - Updated dependencies [c219e7470]
26
+ - Updated dependencies [59ae0e7d6]
27
+ - Updated dependencies [c219e7470]
28
+ - Updated dependencies [4e463c691]
29
+ - Updated dependencies [b4f0bfc76]
30
+ - @mysten/sui.js@0.32.2
31
+
3
32
  ## 0.5.3
4
33
 
5
34
  ### Patch Changes
package/README.md CHANGED
@@ -69,7 +69,11 @@ class YourWallet implements Wallet {
69
69
  },
70
70
  "sui:signAndExecuteTransactionBlock": {
71
71
  version: "1.1.0",
72
- signAndExecuteTransactionBlock: this.#signAndExecuteTransaction,
72
+ signAndExecuteTransactionBlock: this.#signAndExecuteTransactionBlock,
73
+ },
74
+ 'sui:signMessage': {
75
+ version: '1.0.0',
76
+ signMessage: this.#signMessage,
73
77
  },
74
78
  };
75
79
  },
@@ -89,6 +93,10 @@ class YourWallet implements Wallet {
89
93
  #signAndExecuteTransactionBlock: SuiSignAndExecuteTransactionBlockMethod = () => {
90
94
  // Your wallet's implementation
91
95
  };
96
+
97
+ #signMessage: SuiSignMessageMethod = () => {
98
+ // Your wallet's implementation
99
+ };
92
100
  }
93
101
  ```
94
102
 
package/dist/chains.d.ts CHANGED
@@ -4,5 +4,7 @@ export declare const SUI_DEVNET_CHAIN = "sui:devnet";
4
4
  export declare const SUI_TESTNET_CHAIN = "sui:testnet";
5
5
  /** Sui Localnet */
6
6
  export declare const SUI_LOCALNET_CHAIN = "sui:localnet";
7
- export declare const SUI_CHAINS: readonly ["sui:devnet", "sui:testnet", "sui:localnet"];
8
- export type SuiChain = typeof SUI_DEVNET_CHAIN | typeof SUI_TESTNET_CHAIN | typeof SUI_LOCALNET_CHAIN;
7
+ /** Sui Mainnet */
8
+ export declare const SUI_MAINNET_CHAIN = "sui:mainnet";
9
+ export declare const SUI_CHAINS: readonly ["sui:devnet", "sui:testnet", "sui:localnet", "sui:mainnet"];
10
+ export type SuiChain = typeof SUI_DEVNET_CHAIN | typeof SUI_TESTNET_CHAIN | typeof SUI_LOCALNET_CHAIN | typeof SUI_MAINNET_CHAIN;
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ __export(src_exports, {
24
24
  SUI_CHAINS: () => SUI_CHAINS,
25
25
  SUI_DEVNET_CHAIN: () => SUI_DEVNET_CHAIN,
26
26
  SUI_LOCALNET_CHAIN: () => SUI_LOCALNET_CHAIN,
27
+ SUI_MAINNET_CHAIN: () => SUI_MAINNET_CHAIN,
27
28
  SUI_TESTNET_CHAIN: () => SUI_TESTNET_CHAIN,
28
29
  isStandardWalletAdapterCompatibleWallet: () => isStandardWalletAdapterCompatibleWallet
29
30
  });
@@ -45,17 +46,21 @@ function isStandardWalletAdapterCompatibleWallet(wallet, features = []) {
45
46
  var SUI_DEVNET_CHAIN = "sui:devnet";
46
47
  var SUI_TESTNET_CHAIN = "sui:testnet";
47
48
  var SUI_LOCALNET_CHAIN = "sui:localnet";
49
+ var SUI_MAINNET_CHAIN = "sui:mainnet";
48
50
  var SUI_CHAINS = [
49
51
  SUI_DEVNET_CHAIN,
50
52
  SUI_TESTNET_CHAIN,
51
- SUI_LOCALNET_CHAIN
53
+ SUI_LOCALNET_CHAIN,
54
+ SUI_MAINNET_CHAIN
52
55
  ];
53
56
  // Annotate the CommonJS export names for ESM import in node:
54
57
  0 && (module.exports = {
55
58
  SUI_CHAINS,
56
59
  SUI_DEVNET_CHAIN,
57
60
  SUI_LOCALNET_CHAIN,
61
+ SUI_MAINNET_CHAIN,
58
62
  SUI_TESTNET_CHAIN,
59
- isStandardWalletAdapterCompatibleWallet
63
+ isStandardWalletAdapterCompatibleWallet,
64
+ ...require("@wallet-standard/core")
60
65
  });
61
66
  //# sourceMappingURL=index.js.map
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 {\n StandardConnectFeature,\n StandardDisconnectFeature,\n StandardEventsFeature,\n Wallet,\n WalletWithFeatures,\n} from \"@wallet-standard/core\";\nimport { SuiFeatures } from \"./features\";\n\nexport type StandardWalletAdapterWallet = WalletWithFeatures<\n StandardConnectFeature &\n StandardEventsFeature &\n SuiFeatures &\n // Disconnect is an optional feature:\n Partial<StandardDisconnectFeature>\n>;\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 StandardWalletAdapterWallet[\"features\"])[] = [\n \"standard:connect\",\n \"standard:events\",\n];\n\nexport function isStandardWalletAdapterCompatibleWallet(\n wallet: Wallet,\n features: string[] = []\n): wallet is StandardWalletAdapterWallet {\n return [...REQUIRED_FEATURES, ...features].every(\n (feature) => feature in wallet.features\n );\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\nexport const SUI_CHAINS = [\n SUI_DEVNET_CHAIN,\n SUI_TESTNET_CHAIN,\n SUI_LOCALNET_CHAIN,\n] as const;\n\nexport type SuiChain =\n | typeof SUI_DEVNET_CHAIN\n | typeof SUI_TESTNET_CHAIN\n | typeof SUI_LOCALNET_CHAIN;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAc,kCAHd;;;ACsBA,IAAM,oBAAuE;AAAA,EAC3E;AAAA,EACA;AACF;AAEO,SAAS,wCACd,QACA,WAAqB,CAAC,GACiB;AACvC,SAAO,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE;AAAA,IACzC,CAAC,YAAY,WAAW,OAAO;AAAA,EACjC;AACF;;;AC9BO,IAAM,mBAAmB;AAGzB,IAAM,oBAAoB;AAG1B,IAAM,qBAAqB;AAE3B,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACF;","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 {\n StandardConnectFeature,\n StandardDisconnectFeature,\n StandardEventsFeature,\n Wallet,\n WalletWithFeatures,\n} from \"@wallet-standard/core\";\nimport { SuiFeatures } from \"./features\";\n\nexport type StandardWalletAdapterWallet = WalletWithFeatures<\n StandardConnectFeature &\n StandardEventsFeature &\n SuiFeatures &\n // Disconnect is an optional feature:\n Partial<StandardDisconnectFeature>\n>;\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 StandardWalletAdapterWallet[\"features\"])[] = [\n \"standard:connect\",\n \"standard:events\",\n];\n\nexport function isStandardWalletAdapterCompatibleWallet(\n wallet: Wallet,\n features: string[] = []\n): wallet is StandardWalletAdapterWallet {\n return [...REQUIRED_FEATURES, ...features].every(\n (feature) => feature in wallet.features\n );\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 SUI_DEVNET_CHAIN,\n SUI_TESTNET_CHAIN,\n SUI_LOCALNET_CHAIN,\n SUI_MAINNET_CHAIN,\n] as const;\n\nexport type SuiChain =\n | typeof SUI_DEVNET_CHAIN\n | typeof SUI_TESTNET_CHAIN\n | typeof SUI_LOCALNET_CHAIN\n | typeof SUI_MAINNET_CHAIN;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAc,kCAHd;;;ACsBA,IAAM,oBAAuE;AAAA,EAC3E;AAAA,EACA;AACF;AAEO,SAAS,wCACd,QACA,WAAqB,CAAC,GACiB;AACvC,SAAO,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE;AAAA,IACzC,CAAC,YAAY,WAAW,OAAO;AAAA,EACjC;AACF;;;AC9BO,IAAM,mBAAmB;AAGzB,IAAM,oBAAoB;AAG1B,IAAM,qBAAqB;AAG3B,IAAM,oBAAoB;AAE1B,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
package/dist/index.mjs CHANGED
@@ -16,15 +16,18 @@ function isStandardWalletAdapterCompatibleWallet(wallet, features = []) {
16
16
  var SUI_DEVNET_CHAIN = "sui:devnet";
17
17
  var SUI_TESTNET_CHAIN = "sui:testnet";
18
18
  var SUI_LOCALNET_CHAIN = "sui:localnet";
19
+ var SUI_MAINNET_CHAIN = "sui:mainnet";
19
20
  var SUI_CHAINS = [
20
21
  SUI_DEVNET_CHAIN,
21
22
  SUI_TESTNET_CHAIN,
22
- SUI_LOCALNET_CHAIN
23
+ SUI_LOCALNET_CHAIN,
24
+ SUI_MAINNET_CHAIN
23
25
  ];
24
26
  export {
25
27
  SUI_CHAINS,
26
28
  SUI_DEVNET_CHAIN,
27
29
  SUI_LOCALNET_CHAIN,
30
+ SUI_MAINNET_CHAIN,
28
31
  SUI_TESTNET_CHAIN,
29
32
  isStandardWalletAdapterCompatibleWallet
30
33
  };
@@ -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 {\n StandardConnectFeature,\n StandardDisconnectFeature,\n StandardEventsFeature,\n Wallet,\n WalletWithFeatures,\n} from \"@wallet-standard/core\";\nimport { SuiFeatures } from \"./features\";\n\nexport type StandardWalletAdapterWallet = WalletWithFeatures<\n StandardConnectFeature &\n StandardEventsFeature &\n SuiFeatures &\n // Disconnect is an optional feature:\n Partial<StandardDisconnectFeature>\n>;\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 StandardWalletAdapterWallet[\"features\"])[] = [\n \"standard:connect\",\n \"standard:events\",\n];\n\nexport function isStandardWalletAdapterCompatibleWallet(\n wallet: Wallet,\n features: string[] = []\n): wallet is StandardWalletAdapterWallet {\n return [...REQUIRED_FEATURES, ...features].every(\n (feature) => feature in wallet.features\n );\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\nexport const SUI_CHAINS = [\n SUI_DEVNET_CHAIN,\n SUI_TESTNET_CHAIN,\n SUI_LOCALNET_CHAIN,\n] as const;\n\nexport type SuiChain =\n | typeof SUI_DEVNET_CHAIN\n | typeof SUI_TESTNET_CHAIN\n | typeof SUI_LOCALNET_CHAIN;\n"],"mappings":";AAGA,cAAc;;;ACmBd,IAAM,oBAAuE;AAAA,EAC3E;AAAA,EACA;AACF;AAEO,SAAS,wCACd,QACA,WAAqB,CAAC,GACiB;AACvC,SAAO,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE;AAAA,IACzC,CAAC,YAAY,WAAW,OAAO;AAAA,EACjC;AACF;;;AC9BO,IAAM,mBAAmB;AAGzB,IAAM,oBAAoB;AAG1B,IAAM,qBAAqB;AAE3B,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACF;","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 {\n StandardConnectFeature,\n StandardDisconnectFeature,\n StandardEventsFeature,\n Wallet,\n WalletWithFeatures,\n} from \"@wallet-standard/core\";\nimport { SuiFeatures } from \"./features\";\n\nexport type StandardWalletAdapterWallet = WalletWithFeatures<\n StandardConnectFeature &\n StandardEventsFeature &\n SuiFeatures &\n // Disconnect is an optional feature:\n Partial<StandardDisconnectFeature>\n>;\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 StandardWalletAdapterWallet[\"features\"])[] = [\n \"standard:connect\",\n \"standard:events\",\n];\n\nexport function isStandardWalletAdapterCompatibleWallet(\n wallet: Wallet,\n features: string[] = []\n): wallet is StandardWalletAdapterWallet {\n return [...REQUIRED_FEATURES, ...features].every(\n (feature) => feature in wallet.features\n );\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 SUI_DEVNET_CHAIN,\n SUI_TESTNET_CHAIN,\n SUI_LOCALNET_CHAIN,\n SUI_MAINNET_CHAIN,\n] as const;\n\nexport type SuiChain =\n | typeof SUI_DEVNET_CHAIN\n | typeof SUI_TESTNET_CHAIN\n | typeof SUI_LOCALNET_CHAIN\n | typeof SUI_MAINNET_CHAIN;\n"],"mappings":";AAGA,cAAc;;;ACmBd,IAAM,oBAAuE;AAAA,EAC3E;AAAA,EACA;AACF;AAEO,SAAS,wCACd,QACA,WAAqB,CAAC,GACiB;AACvC,SAAO,CAAC,GAAG,mBAAmB,GAAG,QAAQ,EAAE;AAAA,IACzC,CAAC,YAAY,WAAW,OAAO;AAAA,EACjC;AACF;;;AC9BO,IAAM,mBAAmB;AAGzB,IAAM,oBAAoB;AAG1B,IAAM,qBAAqB;AAG3B,IAAM,oBAAoB;AAE1B,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/wallet-standard",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
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>",
@@ -9,6 +9,7 @@
9
9
  "types": "./dist/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
+ "types": "./dist/index.d.ts",
12
13
  "source": "./src/index.ts",
13
14
  "import": "./dist/index.mjs",
14
15
  "require": "./dist/index.js"
@@ -21,11 +22,11 @@
21
22
  ],
22
23
  "dependencies": {
23
24
  "@wallet-standard/core": "1.0.3",
24
- "@mysten/sui.js": "0.32.1"
25
+ "@mysten/sui.js": "0.33.0"
25
26
  },
26
27
  "devDependencies": {
27
28
  "tsup": "^6.7.0",
28
- "typescript": "^4.9.4"
29
+ "typescript": "^5.0.4"
29
30
  },
30
31
  "scripts": {
31
32
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",
package/src/chains.ts CHANGED
@@ -10,13 +10,18 @@ export const SUI_TESTNET_CHAIN = "sui:testnet";
10
10
  /** Sui Localnet */
11
11
  export const SUI_LOCALNET_CHAIN = "sui:localnet";
12
12
 
13
+ /** Sui Mainnet */
14
+ export const SUI_MAINNET_CHAIN = "sui:mainnet";
15
+
13
16
  export const SUI_CHAINS = [
14
17
  SUI_DEVNET_CHAIN,
15
18
  SUI_TESTNET_CHAIN,
16
19
  SUI_LOCALNET_CHAIN,
20
+ SUI_MAINNET_CHAIN,
17
21
  ] as const;
18
22
 
19
23
  export type SuiChain =
20
24
  | typeof SUI_DEVNET_CHAIN
21
25
  | typeof SUI_TESTNET_CHAIN
22
- | typeof SUI_LOCALNET_CHAIN;
26
+ | typeof SUI_LOCALNET_CHAIN
27
+ | typeof SUI_MAINNET_CHAIN;