@mysten/wallet-standard 0.5.12 → 0.5.14

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,29 @@
1
1
  # @mysten/wallet-standard
2
2
 
3
+ ## 0.5.14
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [47ea5ec7c]
8
+ - @mysten/sui.js@0.39.0
9
+
10
+ ## 0.5.13
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [ad46f9f2f]
15
+ - Updated dependencies [67e581a5a]
16
+ - Updated dependencies [34242be56]
17
+ - Updated dependencies [4e2a150a1]
18
+ - Updated dependencies [cce6ffbcc]
19
+ - Updated dependencies [0f06d593a]
20
+ - Updated dependencies [83d0fb734]
21
+ - Updated dependencies [09f4ed3fc]
22
+ - Updated dependencies [6d41059c7]
23
+ - Updated dependencies [cc6441f46]
24
+ - Updated dependencies [001148443]
25
+ - @mysten/sui.js@0.38.0
26
+
3
27
  ## 0.5.12
4
28
 
5
29
  ### Patch Changes
package/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # `@mysten/wallet-standard`
2
2
 
3
- A suite of standard utilities for implementing wallets and libraries based on the [Wallet Standard](https://github.com/wallet-standard/wallet-standard/).
3
+ A suite of standard utilities for implementing wallets and libraries based on the
4
+ [Wallet Standard](https://github.com/wallet-standard/wallet-standard/).
4
5
 
5
6
  ## Implementing the Wallet Standard in an extension wallet
6
7
 
7
8
  ### Creating a wallet interface
8
9
 
9
- You need to create a class that represents your wallet. You can use the `Wallet` interface from `@mysten/wallet-standard` to help ensure your class adheres to the standard.
10
+ You need to create a class that represents your wallet. You can use the `Wallet` interface from
11
+ `@mysten/wallet-standard` to help ensure your class adheres to the standard.
10
12
 
11
13
  ```typescript
12
14
  import { Wallet, SUI_DEVNET_CHAIN } from '@mysten/wallet-standard';
@@ -32,12 +34,17 @@ class YourWallet implements Wallet {
32
34
 
33
35
  ### Implementing features
34
36
 
35
- Features are standard methods consumers can use to interact with a wallet. To be listed in the Sui wallet adapter, you must implement the following features in your wallet:
37
+ Features are standard methods consumers can use to interact with a wallet. To be listed in the Sui
38
+ wallet adapter, you must implement the following features in your wallet:
36
39
 
37
40
  - `standard:connect` - Used to initiate a connection to the wallet.
38
- - `standard:events` - Used to listen for changes that happen within the wallet, such as accounts being added or removed.
39
- - `sui:signTransactionBlock` - Used to prompt the user to sign a transaction block, and return the serializated transaction block and signature back to the user. This method does not submit the transaction block for execution.
40
- - `sui:signAndExecuteTransactionBlock` - Used to prompt the user to sign a transaction block, then submit it for execution to the blockchain.
41
+ - `standard:events` - Used to listen for changes that happen within the wallet, such as accounts
42
+ being added or removed.
43
+ - `sui:signTransactionBlock` - Used to prompt the user to sign a transaction block, and return the
44
+ serializated transaction block and signature back to the user. This method does not submit the
45
+ transaction block for execution.
46
+ - `sui:signAndExecuteTransactionBlock` - Used to prompt the user to sign a transaction block, then
47
+ submit it for execution to the blockchain.
41
48
 
42
49
  You can implement these features in your wallet class under the `features` property:
43
50
 
@@ -102,9 +109,12 @@ class YourWallet implements Wallet {
102
109
 
103
110
  ### Exposing accounts
104
111
 
105
- The last requirement of the wallet interface is to expose an `acccounts` interface. This should expose all of the accounts that a connected dapp has access to. It can be empty prior to initiating a connection through the `standard:connect` feature.
112
+ The last requirement of the wallet interface is to expose an `acccounts` interface. This should
113
+ expose all of the accounts that a connected dapp has access to. It can be empty prior to initiating
114
+ a connection through the `standard:connect` feature.
106
115
 
107
- The accounts can use the `ReadonlyWalletAccount` class to easily construct an account matching the required interface.
116
+ The accounts can use the `ReadonlyWalletAccount` class to easily construct an account matching the
117
+ required interface.
108
118
 
109
119
  ```typescript
110
120
  import { ReadonlyWalletAccount } from '@mysten/wallet-standard';
@@ -131,7 +141,8 @@ class YourWallet implements Wallet {
131
141
 
132
142
  ### Registering in the window
133
143
 
134
- Once you have a compatible interface for your wallet, you can register it using the `registerWallet` function.
144
+ Once you have a compatible interface for your wallet, you can register it using the `registerWallet`
145
+ function.
135
146
 
136
147
  ```typescript
137
148
  import { registerWallet } from '@mysten/wallet-standard';
@@ -139,4 +150,5 @@ import { registerWallet } from '@mysten/wallet-standard';
139
150
  registerWallet(new YourWallet());
140
151
  ```
141
152
 
142
- > If you're interested in the internal implementation of the `registerWallet` method, you can [see how it works here](https://github.com/wallet-standard/wallet-standard/blob/b4794e761de688906827829d5380b24cb8ed5fd5/packages/core/wallet/src/register.ts#L9).
153
+ > If you're interested in the internal implementation of the `registerWallet` method, you can
154
+ > [see how it works here](https://github.com/wallet-standard/wallet-standard/blob/b4794e761de688906827829d5380b24cb8ed5fd5/packages/core/wallet/src/register.ts#L9).
@@ -1,4 +1,4 @@
1
- import type { ExecuteTransactionRequestType, SuiTransactionBlockResponse, SuiTransactionBlockResponseOptions } from '@mysten/sui.js';
1
+ import type { ExecuteTransactionRequestType, SuiTransactionBlockResponse, SuiTransactionBlockResponseOptions } from '@mysten/sui.js/client';
2
2
  import type { SuiSignTransactionBlockInput } from './suiSignTransactionBlock';
3
3
  /** The latest API version of the signAndExecuteTransactionBlock API. */
4
4
  export type SuiSignAndExecuteTransactionBlockVersion = '1.0.0';
@@ -1,4 +1,5 @@
1
- import type { SignedTransaction, TransactionBlock } from '@mysten/sui.js';
1
+ import type { SignedTransaction } from '@mysten/sui.js';
2
+ import { TransactionBlock } from '@mysten/sui.js/transactions';
2
3
  import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
3
4
  /** The latest API version of the signTransactionBlock API. */
4
5
  export type SuiSignTransactionBlockVersion = '1.0.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/wallet-standard",
3
- "version": "0.5.12",
3
+ "version": "0.5.14",
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,11 +22,11 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@wallet-standard/core": "1.0.3",
25
- "@mysten/sui.js": "0.37.1"
25
+ "@mysten/sui.js": "0.39.0"
26
26
  },
27
27
  "devDependencies": {
28
- "tsup": "^6.7.0",
29
- "typescript": "^5.0.4"
28
+ "tsup": "^7.1.0",
29
+ "typescript": "^5.1.6"
30
30
  },
31
31
  "scripts": {
32
32
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",
@@ -5,7 +5,7 @@ import type {
5
5
  ExecuteTransactionRequestType,
6
6
  SuiTransactionBlockResponse,
7
7
  SuiTransactionBlockResponseOptions,
8
- } from '@mysten/sui.js';
8
+ } from '@mysten/sui.js/client';
9
9
  import type { SuiSignTransactionBlockInput } from './suiSignTransactionBlock';
10
10
 
11
11
  /** The latest API version of the signAndExecuteTransactionBlock API. */
@@ -1,7 +1,8 @@
1
1
  // Copyright (c) Mysten Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import type { SignedTransaction, TransactionBlock } from '@mysten/sui.js';
4
+ import type { SignedTransaction } from '@mysten/sui.js';
5
+ import { TransactionBlock } from '@mysten/sui.js/transactions';
5
6
  import type { IdentifierString, WalletAccount } from '@wallet-standard/core';
6
7
 
7
8
  /** The latest API version of the signTransactionBlock API. */