@aptos-labs/wallet-adapter-react 2.1.1 → 2.1.3
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 +14 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -8
- package/dist/index.mjs +9 -7
- package/package.json +2 -2
- package/src/index.tsx +9 -4
- package/src/useWallet.tsx +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @aptos-labs/wallet-adapter-react
|
|
2
2
|
|
|
3
|
+
## 2.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [12163ca]
|
|
8
|
+
- Updated dependencies [a6f0e46]
|
|
9
|
+
- @aptos-labs/wallet-adapter-core@3.2.0
|
|
10
|
+
|
|
11
|
+
## 2.1.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- a1c08cc: Export missing InputTransactionData type
|
|
16
|
+
|
|
3
17
|
## 2.1.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccountInfo, NetworkInfo, WalletName, WalletInfo, Wallet, InputTransactionData, AnyRawTransaction, Types, InputGenerateTransactionOptions, AccountAuthenticator, InputSubmitTransactionData, PendingTransactionResponse, SignMessagePayload, SignMessageResponse } from '@aptos-labs/wallet-adapter-core';
|
|
2
|
-
export { NetworkName, Wallet, WalletName, WalletReadyState, isInAppBrowser, isMobile, isRedirectable } from '@aptos-labs/wallet-adapter-core';
|
|
2
|
+
export { InputTransactionData, NetworkName, Wallet, WalletName, WalletReadyState, isInAppBrowser, isMobile, isRedirectable } from '@aptos-labs/wallet-adapter-core';
|
|
3
3
|
import { ReactNode, FC } from 'react';
|
|
4
4
|
|
|
5
5
|
interface WalletContextState {
|
package/dist/index.js
CHANGED
|
@@ -21,17 +21,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
AptosWalletAdapterProvider: () => AptosWalletAdapterProvider,
|
|
24
|
-
NetworkName: () =>
|
|
25
|
-
WalletReadyState: () =>
|
|
26
|
-
isInAppBrowser: () =>
|
|
27
|
-
isMobile: () =>
|
|
28
|
-
isRedirectable: () =>
|
|
24
|
+
NetworkName: () => import_wallet_adapter_core2.NetworkName,
|
|
25
|
+
WalletReadyState: () => import_wallet_adapter_core2.WalletReadyState,
|
|
26
|
+
isInAppBrowser: () => import_wallet_adapter_core2.isInAppBrowser,
|
|
27
|
+
isMobile: () => import_wallet_adapter_core2.isMobile,
|
|
28
|
+
isRedirectable: () => import_wallet_adapter_core2.isRedirectable,
|
|
29
29
|
useWallet: () => useWallet
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(src_exports);
|
|
32
32
|
|
|
33
33
|
// src/useWallet.tsx
|
|
34
|
-
var import_wallet_adapter_core = require("@aptos-labs/wallet-adapter-core");
|
|
35
34
|
var import_react = require("react");
|
|
36
35
|
var DEFAULT_CONTEXT = {
|
|
37
36
|
connected: false
|
|
@@ -49,7 +48,7 @@ function useWallet() {
|
|
|
49
48
|
|
|
50
49
|
// src/WalletProvider.tsx
|
|
51
50
|
var import_react2 = require("react");
|
|
52
|
-
var
|
|
51
|
+
var import_wallet_adapter_core = require("@aptos-labs/wallet-adapter-core");
|
|
53
52
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
54
53
|
var initialState = {
|
|
55
54
|
connected: false,
|
|
@@ -65,7 +64,7 @@ var AptosWalletAdapterProvider = ({
|
|
|
65
64
|
}) => {
|
|
66
65
|
const [{ connected, account, network, wallet }, setState] = (0, import_react2.useState)(initialState);
|
|
67
66
|
const [isLoading, setIsLoading] = (0, import_react2.useState)(true);
|
|
68
|
-
const walletCore = (0, import_react2.useMemo)(() => new
|
|
67
|
+
const walletCore = (0, import_react2.useMemo)(() => new import_wallet_adapter_core.WalletCore(plugins), []);
|
|
69
68
|
const [wallets, setWallets] = (0, import_react2.useState)(
|
|
70
69
|
walletCore.wallets
|
|
71
70
|
);
|
|
@@ -235,6 +234,9 @@ var AptosWalletAdapterProvider = ({
|
|
|
235
234
|
children
|
|
236
235
|
});
|
|
237
236
|
};
|
|
237
|
+
|
|
238
|
+
// src/index.tsx
|
|
239
|
+
var import_wallet_adapter_core2 = require("@aptos-labs/wallet-adapter-core");
|
|
238
240
|
// Annotate the CommonJS export names for ESM import in node:
|
|
239
241
|
0 && (module.exports = {
|
|
240
242
|
AptosWalletAdapterProvider,
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
// src/useWallet.tsx
|
|
2
|
-
import {
|
|
3
|
-
WalletReadyState,
|
|
4
|
-
NetworkName,
|
|
5
|
-
isInAppBrowser,
|
|
6
|
-
isRedirectable,
|
|
7
|
-
isMobile
|
|
8
|
-
} from "@aptos-labs/wallet-adapter-core";
|
|
9
2
|
import { createContext, useContext } from "react";
|
|
10
3
|
var DEFAULT_CONTEXT = {
|
|
11
4
|
connected: false
|
|
@@ -214,6 +207,15 @@ var AptosWalletAdapterProvider = ({
|
|
|
214
207
|
children
|
|
215
208
|
});
|
|
216
209
|
};
|
|
210
|
+
|
|
211
|
+
// src/index.tsx
|
|
212
|
+
import {
|
|
213
|
+
WalletReadyState,
|
|
214
|
+
NetworkName,
|
|
215
|
+
isInAppBrowser,
|
|
216
|
+
isMobile,
|
|
217
|
+
isRedirectable
|
|
218
|
+
} from "@aptos-labs/wallet-adapter-core";
|
|
217
219
|
export {
|
|
218
220
|
AptosWalletAdapterProvider,
|
|
219
221
|
NetworkName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-labs/wallet-adapter-react",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Aptos Wallet Adapter React Provider",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@aptos-labs/wallet-adapter-tsconfig": "0.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@aptos-labs/wallet-adapter-core": "3.
|
|
40
|
+
"@aptos-labs/wallet-adapter-core": "3.2.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "^18"
|
package/src/index.tsx
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
export { useWallet } from "./useWallet";
|
|
3
|
+
export * from "./WalletProvider";
|
|
4
|
+
export type {
|
|
5
|
+
Wallet,
|
|
6
|
+
WalletName,
|
|
7
|
+
InputTransactionData,
|
|
8
|
+
} from "@aptos-labs/wallet-adapter-core";
|
|
9
|
+
|
|
2
10
|
export {
|
|
3
|
-
useWallet,
|
|
4
11
|
WalletReadyState,
|
|
5
12
|
NetworkName,
|
|
6
13
|
isInAppBrowser,
|
|
7
14
|
isMobile,
|
|
8
15
|
isRedirectable,
|
|
9
|
-
} from "
|
|
10
|
-
export type { Wallet, WalletName } from "./useWallet";
|
|
11
|
-
export * from "./WalletProvider";
|
|
16
|
+
} from "@aptos-labs/wallet-adapter-core";
|
package/src/useWallet.tsx
CHANGED
|
@@ -5,11 +5,6 @@ import {
|
|
|
5
5
|
SignMessagePayload,
|
|
6
6
|
SignMessageResponse,
|
|
7
7
|
Wallet,
|
|
8
|
-
WalletReadyState,
|
|
9
|
-
NetworkName,
|
|
10
|
-
isInAppBrowser,
|
|
11
|
-
isRedirectable,
|
|
12
|
-
isMobile,
|
|
13
8
|
InputGenerateTransactionOptions,
|
|
14
9
|
AnyRawTransaction,
|
|
15
10
|
InputTransactionData,
|
|
@@ -21,15 +16,6 @@ import {
|
|
|
21
16
|
} from "@aptos-labs/wallet-adapter-core";
|
|
22
17
|
import { createContext, useContext } from "react";
|
|
23
18
|
|
|
24
|
-
export type { Wallet, WalletName };
|
|
25
|
-
export {
|
|
26
|
-
WalletReadyState,
|
|
27
|
-
isInAppBrowser,
|
|
28
|
-
isRedirectable,
|
|
29
|
-
isMobile,
|
|
30
|
-
NetworkName,
|
|
31
|
-
};
|
|
32
|
-
|
|
33
19
|
export interface WalletContextState {
|
|
34
20
|
connected: boolean;
|
|
35
21
|
isLoading: boolean;
|