@mysten/wallet-standard 0.8.10 → 0.9.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 +19 -0
- package/README.md +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/wallet.d.ts +11 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/wallet.ts +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @mysten/wallet-standard
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 165ad6b21d: Introduce new optional `id` property, which wallets can specify as a unique identifier, separate from the wallet name.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- dd362ec1d6: Update docs url to sdk.mystenlabs.com
|
|
12
|
+
- Updated dependencies [dd362ec1d6]
|
|
13
|
+
- @mysten/sui.js@0.48.1
|
|
14
|
+
|
|
15
|
+
## 0.8.11
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [cdcfa76c43]
|
|
20
|
+
- @mysten/sui.js@0.48.0
|
|
21
|
+
|
|
3
22
|
## 0.8.10
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
A suite of standard utilities for implementing wallets and libraries based on the
|
|
4
4
|
[Wallet Standard](https://github.com/wallet-standard/wallet-standard/).
|
|
5
5
|
|
|
6
|
-
**Documentation:** https://
|
|
6
|
+
**Documentation:** https://docs.sui.io/standards/wallet-standard
|
package/dist/index.d.ts
CHANGED
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, WalletWithFeatures } from '@wallet-standard/core';\n\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;;;ACSA,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;;;AC1BO,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 type { Wallet } from './wallet';\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';\n\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;;;ACSA,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;;;AC1BO,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.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, WalletWithFeatures } from '@wallet-standard/core';\n\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;;;ACMd,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;;;AC1BO,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 type { Wallet } from './wallet';\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';\n\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;;;ACMd,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;;;AC1BO,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/wallet.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare module '@wallet-standard/core' {
|
|
2
|
+
interface Wallet {
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier of the Wallet.
|
|
5
|
+
*
|
|
6
|
+
* If not provided, the wallet name will be used as the identifier.
|
|
7
|
+
*/
|
|
8
|
+
readonly id?: string;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export type { Wallet } from '@wallet-standard/core';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mysten/wallet-standard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.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.
|
|
25
|
+
"@mysten/sui.js": "0.48.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"tsup": "^7.1.0",
|
package/src/index.ts
CHANGED
package/src/wallet.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
declare module '@wallet-standard/core' {
|
|
5
|
+
export interface Wallet {
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier of the Wallet.
|
|
8
|
+
*
|
|
9
|
+
* If not provided, the wallet name will be used as the identifier.
|
|
10
|
+
*/
|
|
11
|
+
readonly id?: string;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type { Wallet } from '@wallet-standard/core';
|