@gluwa/connect-kit 0.2.0-next.3 → 0.2.0-next.5
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/dist/index.d.ts +1 -0
- package/dist/index.js +8 -1
- package/dist/package.json +1 -1
- package/package.json +3 -3
- package/src/api/asset.ts +10 -0
- package/src/index.ts +2 -0
- package/tsconfig.json +5 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -100,6 +100,7 @@ declare const connectKit: {
|
|
|
100
100
|
readonly getAccount: () => _wagmi_core.GetAccountReturnType;
|
|
101
101
|
readonly signMessage: (params: _wagmi_core.SignMessageParameters) => Promise<`0x${string}`>;
|
|
102
102
|
readonly signTypedData: (params: _wagmi_core.SignTypedDataParameters) => Promise<`0x${string}`>;
|
|
103
|
+
readonly watchAsset: (params: _wagmi_core.WatchAssetParameters) => Promise<_wagmi_core.WatchAssetReturnType>;
|
|
103
104
|
};
|
|
104
105
|
readonly events: {
|
|
105
106
|
readonly watchAccount: (params: _wagmi_core.WatchAccountParameters) => (() => void);
|
package/dist/index.js
CHANGED
|
@@ -131,6 +131,12 @@ var signTypedData = /* @__PURE__ */ __name((params) => {
|
|
|
131
131
|
return wagmiSignTypedData(getConfig(), params);
|
|
132
132
|
}, "signTypedData");
|
|
133
133
|
|
|
134
|
+
// src/api/asset.ts
|
|
135
|
+
import { watchAsset as wagmiWatchAsset } from "@wagmi/core";
|
|
136
|
+
var watchAsset = /* @__PURE__ */ __name((params) => {
|
|
137
|
+
return wagmiWatchAsset(getConfig(), params);
|
|
138
|
+
}, "watchAsset");
|
|
139
|
+
|
|
134
140
|
// src/events/account.ts
|
|
135
141
|
import { watchAccount as wagmiWatchAccount, watchConnections as wagmiWatchConnections, reconnect as wagmiReconnect, disconnect as wagmiDisconnect } from "@wagmi/core";
|
|
136
142
|
var watchAccount = /* @__PURE__ */ __name((params) => {
|
|
@@ -1654,7 +1660,8 @@ var connectKit = {
|
|
|
1654
1660
|
waitForTransactionReceipt,
|
|
1655
1661
|
getAccount,
|
|
1656
1662
|
signMessage,
|
|
1657
|
-
signTypedData
|
|
1663
|
+
signTypedData,
|
|
1664
|
+
watchAsset
|
|
1658
1665
|
},
|
|
1659
1666
|
events: {
|
|
1660
1667
|
watchAccount,
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gluwa/connect-kit",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"wagmi": "^2.15.6",
|
|
28
28
|
"@wagmi/core": "^2.16.7",
|
|
29
29
|
"@gluwa/credit-connect-sdk": "0.2.0-next.3",
|
|
30
|
-
"@gluwa/credit-connect-storage-local": "0.2.0-next.3",
|
|
31
30
|
"@gluwa/credit-connect-e2ee-tweetnacl": "0.2.0-next.3",
|
|
32
|
-
"@gluwa/credit-connect-hub-node-ws": "0.1.0-next.3"
|
|
31
|
+
"@gluwa/credit-connect-hub-node-ws": "0.1.0-next.3",
|
|
32
|
+
"@gluwa/credit-connect-storage-local": "0.2.0-next.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@tanstack/react-query": "^5.62.0",
|
package/src/api/asset.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
watchAsset as wagmiWatchAsset,
|
|
3
|
+
type WatchAssetParameters,
|
|
4
|
+
type WatchAssetReturnType,
|
|
5
|
+
} from '@wagmi/core';
|
|
6
|
+
import { getConfig } from '../core/config';
|
|
7
|
+
|
|
8
|
+
export const watchAsset = (params: WatchAssetParameters): Promise<WatchAssetReturnType> => {
|
|
9
|
+
return wagmiWatchAsset(getConfig(), params);
|
|
10
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { getBalance } from './api/balance';
|
|
|
3
3
|
import { switchChain, getPublicClient } from './api/chain';
|
|
4
4
|
import { waitForTransactionReceipt } from './api/transaction';
|
|
5
5
|
import { getAccount, signMessage, signTypedData } from './api/account';
|
|
6
|
+
import { watchAsset } from './api/asset';
|
|
6
7
|
import { watchAccount, watchConnections, reconnect, disconnectAll } from './events/account';
|
|
7
8
|
|
|
8
9
|
export { ConnectKitProvider, useConnectKit } from './ConnectKitProvider';
|
|
@@ -35,6 +36,7 @@ export const connectKit = {
|
|
|
35
36
|
getAccount,
|
|
36
37
|
signMessage,
|
|
37
38
|
signTypedData,
|
|
39
|
+
watchAsset,
|
|
38
40
|
},
|
|
39
41
|
events: {
|
|
40
42
|
watchAccount,
|
package/tsconfig.json
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
"extends": "../../tsconfig.base.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"noEmit": true,
|
|
5
|
-
"baseUrl": "./"
|
|
5
|
+
"baseUrl": "./",
|
|
6
|
+
"paths": {
|
|
7
|
+
"react": ["./node_modules/@types/react"],
|
|
8
|
+
"react/*": ["./node_modules/@types/react/*"]
|
|
9
|
+
}
|
|
6
10
|
},
|
|
7
11
|
"include": ["src/**/*"]
|
|
8
12
|
}
|