@luno-kit/react 0.0.6 → 0.0.8
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/dist/chains/index.cjs +2 -0
- package/dist/chains/index.cjs.map +1 -0
- package/dist/chains/index.d.cts +2 -0
- package/dist/chains/index.d.ts +2 -0
- package/dist/chains/index.js +2 -0
- package/dist/chains/index.js.map +1 -0
- package/dist/chunk-62JXEP3B.js +2 -0
- package/dist/chunk-62JXEP3B.js.map +1 -0
- package/dist/chunk-A6LYVRYZ.js +2 -0
- package/dist/chunk-A6LYVRYZ.js.map +1 -0
- package/dist/chunk-CMKLBFDC.cjs +2 -0
- package/dist/chunk-CMKLBFDC.cjs.map +1 -0
- package/dist/chunk-JJEEWE3N.cjs +2 -0
- package/dist/chunk-JJEEWE3N.cjs.map +1 -0
- package/dist/connectors/index.cjs +2 -0
- package/dist/connectors/index.cjs.map +1 -0
- package/dist/connectors/index.d.cts +1 -0
- package/dist/connectors/index.d.ts +1 -0
- package/dist/connectors/index.js +2 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -30
- package/dist/index.d.ts +37 -30
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +34 -0
- package/dist/types/index.d.ts +34 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/index.cjs +2 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +16 -0
- package/dist/utils/index.d.ts +16 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +27 -9
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { convertAddress, defineChain, formatAddress, formatBalance, formatBalanceWithUnit, getChainToken, getExplorerUrl, getPublicKey, isMobileDevice, isSameAddress, isValidAddress } from '@luno-kit/core/utils';
|
|
2
|
+
import { LegacyClient } from 'dedot';
|
|
3
|
+
import { Config } from '@luno-kit/core/types';
|
|
4
|
+
import { DispatchError } from 'dedot/codecs';
|
|
5
|
+
|
|
6
|
+
interface CreateApiOptions {
|
|
7
|
+
config: Config;
|
|
8
|
+
chainId: string;
|
|
9
|
+
}
|
|
10
|
+
declare const createApi: ({ config, chainId }: CreateApiOptions) => Promise<LegacyClient>;
|
|
11
|
+
|
|
12
|
+
declare function getReadableDispatchError(api: LegacyClient, dispatchError: DispatchError): string;
|
|
13
|
+
|
|
14
|
+
declare const sleep: (ms?: number) => Promise<void>;
|
|
15
|
+
|
|
16
|
+
export { createApi, getReadableDispatchError, sleep };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { convertAddress, defineChain, formatAddress, formatBalance, formatBalanceWithUnit, getChainToken, getExplorerUrl, getPublicKey, isMobileDevice, isSameAddress, isValidAddress } from '@luno-kit/core/utils';
|
|
2
|
+
import { LegacyClient } from 'dedot';
|
|
3
|
+
import { Config } from '@luno-kit/core/types';
|
|
4
|
+
import { DispatchError } from 'dedot/codecs';
|
|
5
|
+
|
|
6
|
+
interface CreateApiOptions {
|
|
7
|
+
config: Config;
|
|
8
|
+
chainId: string;
|
|
9
|
+
}
|
|
10
|
+
declare const createApi: ({ config, chainId }: CreateApiOptions) => Promise<LegacyClient>;
|
|
11
|
+
|
|
12
|
+
declare function getReadableDispatchError(api: LegacyClient, dispatchError: DispatchError): string;
|
|
13
|
+
|
|
14
|
+
declare const sleep: (ms?: number) => Promise<void>;
|
|
15
|
+
|
|
16
|
+
export { createApi, getReadableDispatchError, sleep };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{d as convertAddress,a as createApi,e as defineChain,f as formatAddress,g as formatBalance,h as formatBalanceWithUnit,i as getChainToken,j as getExplorerUrl,k as getPublicKey,b as getReadableDispatchError,l as isMobileDevice,m as isSameAddress,n as isValidAddress,c as sleep}from'../chunk-A6LYVRYZ.js';//# sourceMappingURL=index.js.map
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luno-kit/react",
|
|
3
3
|
"description": "React Hooks and Provider for Luno, enabling easy Polkadot wallet interactions in React applications.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -20,6 +20,26 @@
|
|
|
20
20
|
"types": "./dist/index.d.ts",
|
|
21
21
|
"import": "./dist/index.js",
|
|
22
22
|
"require": "./dist/index.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./chains": {
|
|
25
|
+
"types": "./dist/chains/index.d.ts",
|
|
26
|
+
"import": "./dist/chains/index.js",
|
|
27
|
+
"require": "./dist/chains/index.cjs"
|
|
28
|
+
},
|
|
29
|
+
"./connectors": {
|
|
30
|
+
"types": "./dist/connectors/index.d.ts",
|
|
31
|
+
"import": "./dist/connectors/index.js",
|
|
32
|
+
"require": "./dist/connectors/index.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./utils": {
|
|
35
|
+
"types": "./dist/utils/index.d.ts",
|
|
36
|
+
"import": "./dist/utils/index.js",
|
|
37
|
+
"require": "./dist/utils/index.cjs"
|
|
38
|
+
},
|
|
39
|
+
"./types": {
|
|
40
|
+
"types": "./dist/types/index.d.ts",
|
|
41
|
+
"import": "./dist/types/index.js",
|
|
42
|
+
"require": "./dist/types/index.cjs"
|
|
23
43
|
}
|
|
24
44
|
},
|
|
25
45
|
"files": [
|
|
@@ -28,10 +48,10 @@
|
|
|
28
48
|
"!dist/**/*.test.d.ts"
|
|
29
49
|
],
|
|
30
50
|
"dependencies": {
|
|
31
|
-
"@dedot/chaintypes": "0.
|
|
32
|
-
"dedot": "0.
|
|
51
|
+
"@dedot/chaintypes": "0.152.0",
|
|
52
|
+
"dedot": "0.16.0",
|
|
33
53
|
"zustand": "5.0.4",
|
|
34
|
-
"@luno-kit/core": "0.0.
|
|
54
|
+
"@luno-kit/core": "0.0.8"
|
|
35
55
|
},
|
|
36
56
|
"devDependencies": {
|
|
37
57
|
"@tanstack/react-query": "5.81.5",
|
|
@@ -39,11 +59,10 @@
|
|
|
39
59
|
"@testing-library/jest-dom": "^6.6.3",
|
|
40
60
|
"@testing-library/react": "^16.3.0",
|
|
41
61
|
"@testing-library/user-event": "^14.6.1",
|
|
42
|
-
"@types/node": "
|
|
62
|
+
"@types/node": "20.19.0",
|
|
43
63
|
"@types/react": "18.2.55",
|
|
44
64
|
"@types/react-dom": "18.2.19",
|
|
45
65
|
"@vitest/coverage-v8": "^3.2.4",
|
|
46
|
-
"eslint": "^8.56.0",
|
|
47
66
|
"jsdom": "^26.1.0",
|
|
48
67
|
"react": "18.2.0",
|
|
49
68
|
"react-dom": "18.2.0",
|
|
@@ -52,9 +71,9 @@
|
|
|
52
71
|
"vitest": "^3.2.4"
|
|
53
72
|
},
|
|
54
73
|
"peerDependencies": {
|
|
55
|
-
"@dedot/chaintypes": "^0.
|
|
74
|
+
"@dedot/chaintypes": "^0.152.0",
|
|
56
75
|
"@tanstack/react-query": ">=5.0.0",
|
|
57
|
-
"dedot": "^0.
|
|
76
|
+
"dedot": "^0.16.0",
|
|
58
77
|
"react": ">=18.0.0",
|
|
59
78
|
"react-dom": ">=18.0.0"
|
|
60
79
|
},
|
|
@@ -66,7 +85,6 @@
|
|
|
66
85
|
"scripts": {
|
|
67
86
|
"build": "tsup",
|
|
68
87
|
"dev": "tsup --watch",
|
|
69
|
-
"lint": "eslint src",
|
|
70
88
|
"test": "vitest",
|
|
71
89
|
"test:coverage": "vitest run --coverage",
|
|
72
90
|
"clean": "rm -rf dist"
|