@mysten/wallet-standard 0.8.0 → 0.8.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @mysten/wallet-standard
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [781d073d9]
|
|
8
|
+
- Updated dependencies [3764c464f]
|
|
9
|
+
- Updated dependencies [e4484852b]
|
|
10
|
+
- Updated dependencies [71e0a3197]
|
|
11
|
+
- Updated dependencies [1bc430161]
|
|
12
|
+
- @mysten/sui.js@0.43.0
|
|
13
|
+
|
|
3
14
|
## 0.8.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/dist/features/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IdentifierRecord, StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature, WalletWithFeatures } from '@wallet-standard/core';
|
|
2
|
-
import type { SuiSignTransactionBlockFeature } from './suiSignTransactionBlock';
|
|
3
2
|
import type { SuiSignAndExecuteTransactionBlockFeature } from './suiSignAndExecuteTransactionBlock';
|
|
4
3
|
import { SuiSignMessageFeature } from './suiSignMessage';
|
|
5
4
|
import { SuiSignPersonalMessageFeature } from './suiSignPersonalMessage';
|
|
5
|
+
import type { SuiSignTransactionBlockFeature } from './suiSignTransactionBlock';
|
|
6
6
|
/**
|
|
7
7
|
* Wallet Standard features that are unique to Sui, and that all Sui wallets are expected to implement.
|
|
8
8
|
*/
|
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';\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;;;
|
|
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":[]}
|
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';\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;;;
|
|
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":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mysten/wallet-standard",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
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.43.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"tsup": "^7.1.0",
|
package/src/detect.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { Wallet, WalletWithFeatures } from '@wallet-standard/core';
|
|
5
|
+
|
|
5
6
|
import { MinimallyRequiredFeatures, WalletWithSuiFeatures } from './features';
|
|
6
7
|
|
|
7
8
|
// These features are absolutely required for wallets to function in the Sui ecosystem.
|
package/src/features/index.ts
CHANGED
|
@@ -8,10 +8,11 @@ import type {
|
|
|
8
8
|
StandardEventsFeature,
|
|
9
9
|
WalletWithFeatures,
|
|
10
10
|
} from '@wallet-standard/core';
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
import type { SuiSignAndExecuteTransactionBlockFeature } from './suiSignAndExecuteTransactionBlock';
|
|
13
13
|
import { SuiSignMessageFeature } from './suiSignMessage';
|
|
14
14
|
import { SuiSignPersonalMessageFeature } from './suiSignPersonalMessage';
|
|
15
|
+
import type { SuiSignTransactionBlockFeature } from './suiSignTransactionBlock';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Wallet Standard features that are unique to Sui, and that all Sui wallets are expected to implement.
|
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
SuiTransactionBlockResponse,
|
|
7
7
|
SuiTransactionBlockResponseOptions,
|
|
8
8
|
} from '@mysten/sui.js/client';
|
|
9
|
+
|
|
9
10
|
import type { SuiSignTransactionBlockInput } from './suiSignTransactionBlock';
|
|
10
11
|
|
|
11
12
|
/** The latest API version of the signAndExecuteTransactionBlock API. */
|