@aptos-labs/wallet-adapter-react 0.2.2 → 0.2.4
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 +12 -0
- package/README.md +9 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -0
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
- package/src/index.tsx +1 -1
- package/src/useWallet.tsx +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @aptos-labs/wallet-adapter-react
|
|
2
2
|
|
|
3
|
+
## 0.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e03f79c: Update Blocto and Martian package version and fix a minor autoConnect bug
|
|
8
|
+
|
|
9
|
+
## 0.2.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 7498973: Support Loadable wallet for ant-design and export NetworkName
|
|
14
|
+
|
|
3
15
|
## 0.2.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ The react provider supports all [wallet standard](https://aptos.dev/guides/walle
|
|
|
10
10
|
|
|
11
11
|
##### Standard functions
|
|
12
12
|
|
|
13
|
+
```
|
|
13
14
|
connect
|
|
14
15
|
disconnect
|
|
15
16
|
connected
|
|
@@ -17,11 +18,14 @@ account
|
|
|
17
18
|
network
|
|
18
19
|
signAndSubmitTransaction
|
|
19
20
|
signMessage
|
|
21
|
+
```
|
|
20
22
|
|
|
21
23
|
##### Feature functions
|
|
22
24
|
|
|
25
|
+
```
|
|
23
26
|
signTransaction
|
|
24
27
|
signMessageAndVerify
|
|
28
|
+
```
|
|
25
29
|
|
|
26
30
|
### Usage
|
|
27
31
|
|
|
@@ -94,6 +98,11 @@ const {
|
|
|
94
98
|
} = useWallet();
|
|
95
99
|
```
|
|
96
100
|
|
|
101
|
+
### Use a UI package (recommended)
|
|
102
|
+
|
|
103
|
+
As part of the wallet adapter repo we provide a wallet connect UI package that provides a wallet connect button and a wallet select modal.
|
|
104
|
+
You can find it [here](../wallet-adapter-ant-design/) with instructions on how to use it.
|
|
105
|
+
|
|
97
106
|
#### Examples
|
|
98
107
|
|
|
99
108
|
##### connect(walletName)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccountInfo, NetworkInfo, WalletName, WalletInfo, Wallet, SignMessagePayload, SignMessageResponse } from '@aptos-labs/wallet-adapter-core';
|
|
2
|
-
export { WalletName, WalletReadyState } from '@aptos-labs/wallet-adapter-core';
|
|
2
|
+
export { NetworkName, WalletName, WalletReadyState } from '@aptos-labs/wallet-adapter-core';
|
|
3
3
|
import { Types } from 'aptos';
|
|
4
4
|
import { ReactNode, FC } from 'react';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
AptosWalletAdapterProvider: () => AptosWalletAdapterProvider,
|
|
24
|
+
NetworkName: () => import_wallet_adapter_core.NetworkName,
|
|
24
25
|
WalletReadyState: () => import_wallet_adapter_core.WalletReadyState,
|
|
25
26
|
useWallet: () => useWallet
|
|
26
27
|
});
|
|
@@ -212,6 +213,7 @@ var AptosWalletAdapterProvider = ({
|
|
|
212
213
|
// Annotate the CommonJS export names for ESM import in node:
|
|
213
214
|
0 && (module.exports = {
|
|
214
215
|
AptosWalletAdapterProvider,
|
|
216
|
+
NetworkName,
|
|
215
217
|
WalletReadyState,
|
|
216
218
|
useWallet
|
|
217
219
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// src/useWallet.tsx
|
|
2
2
|
import {
|
|
3
|
-
WalletReadyState
|
|
3
|
+
WalletReadyState,
|
|
4
|
+
NetworkName
|
|
4
5
|
} from "@aptos-labs/wallet-adapter-core";
|
|
5
6
|
import { createContext, useContext } from "react";
|
|
6
7
|
var DEFAULT_COUNTEXT = {
|
|
@@ -190,6 +191,7 @@ var AptosWalletAdapterProvider = ({
|
|
|
190
191
|
};
|
|
191
192
|
export {
|
|
192
193
|
AptosWalletAdapterProvider,
|
|
194
|
+
NetworkName,
|
|
193
195
|
WalletReadyState,
|
|
194
196
|
useWallet
|
|
195
197
|
};
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
package/src/useWallet.tsx
CHANGED
|
@@ -7,12 +7,13 @@ import {
|
|
|
7
7
|
SignMessageResponse,
|
|
8
8
|
Wallet,
|
|
9
9
|
WalletReadyState,
|
|
10
|
+
NetworkName
|
|
10
11
|
} from "@aptos-labs/wallet-adapter-core";
|
|
11
12
|
import { createContext, useContext } from "react";
|
|
12
13
|
import { Types } from "aptos";
|
|
13
14
|
|
|
14
15
|
export type { WalletName };
|
|
15
|
-
export { WalletReadyState };
|
|
16
|
+
export { WalletReadyState, NetworkName };
|
|
16
17
|
|
|
17
18
|
export interface WalletContextState {
|
|
18
19
|
connected: boolean;
|