@megaeth-labs/wallet-sdk-react 0.1.14-beta.1 → 0.1.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.
Files changed (3) hide show
  1. package/dist/index.cjs +1 -223
  2. package/dist/index.js +1 -181
  3. package/package.json +72 -70
package/dist/index.cjs CHANGED
@@ -1,223 +1 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/index.tsx
31
- var index_exports = {};
32
- __export(index_exports, {
33
- MegaProvider: () => MegaProvider,
34
- mega: () => import_wallet_sdk2.mega,
35
- useAuthenticate: () => useAuthenticate,
36
- useBalances: () => useBalances,
37
- useCallContract: () => useCallContract,
38
- useConnect: () => useConnect,
39
- useDeposit: () => useDeposit,
40
- useDisconnect: () => useDisconnect,
41
- useGetFromContract: () => useGetFromContract,
42
- useGrantPermissions: () => useGrantPermissions,
43
- useManageAccount: () => useManageAccount,
44
- usePermissions: () => usePermissions,
45
- useRevokePermissions: () => useRevokePermissions,
46
- useSend: () => useSend,
47
- useSignData: () => useSignData,
48
- useSignMessage: () => useSignMessage,
49
- useStatus: () => useStatus,
50
- useSwap: () => useSwap,
51
- useTransfer: () => useTransfer
52
- });
53
- module.exports = __toCommonJS(index_exports);
54
- var import_wallet_sdk = require("@megaeth-labs/wallet-sdk");
55
- var import_react_query = require("@tanstack/react-query");
56
- var import_react = __toESM(require("react"), 1);
57
- var import_wallet_sdk2 = require("@megaeth-labs/wallet-sdk");
58
- var client = new import_react_query.QueryClient();
59
- var Context = (0, import_react.createContext)({});
60
- var startedInitialisation = false;
61
- var MegaProvider = ({ config, children }) => {
62
- const [initialised, setInitialised] = (0, import_react.useState)(false);
63
- const [status, setStatus] = (0, import_react.useState)({
64
- status: "disconnected",
65
- network: config.network
66
- });
67
- const value = (0, import_react.useMemo)(
68
- () => ({
69
- config,
70
- initialised,
71
- setInitialised,
72
- status,
73
- setStatus
74
- }),
75
- [config, initialised, status]
76
- );
77
- (0, import_react.useEffect)(() => {
78
- if (startedInitialisation) return;
79
- startedInitialisation = true;
80
- import_wallet_sdk.mega.events.onStatusChange(setStatus);
81
- (async () => {
82
- const newStatus = await import_wallet_sdk.mega.initialise(config);
83
- if (newStatus) {
84
- setStatus(newStatus);
85
- }
86
- setInitialised(true);
87
- })();
88
- }, [config]);
89
- return /* @__PURE__ */ import_react.default.createElement(Context.Provider, { value }, /* @__PURE__ */ import_react.default.createElement(import_react_query.QueryClientProvider, { client }, children));
90
- };
91
- var useStatus = () => {
92
- const { status, initialised } = (0, import_react.useContext)(Context);
93
- return {
94
- ...status,
95
- initialised
96
- };
97
- };
98
- var useConnect = (options) => {
99
- return (0, import_react_query.useMutation)({
100
- mutationFn: import_wallet_sdk.mega.connect,
101
- ...options
102
- });
103
- };
104
- var useDisconnect = (options) => {
105
- return (0, import_react_query.useMutation)({
106
- mutationFn: import_wallet_sdk.mega.disconnect,
107
- ...options
108
- });
109
- };
110
- var useGrantPermissions = (options) => {
111
- return (0, import_react_query.useMutation)({
112
- mutationFn: import_wallet_sdk.mega.grantPermissions,
113
- ...options
114
- });
115
- };
116
- var useRevokePermissions = (options) => {
117
- return (0, import_react_query.useMutation)({
118
- mutationFn: import_wallet_sdk.mega.revokePermissions,
119
- ...options
120
- });
121
- };
122
- var useSignMessage = (options) => {
123
- return (0, import_react_query.useMutation)({
124
- mutationFn: import_wallet_sdk.mega.signMessage,
125
- ...options
126
- });
127
- };
128
- var useTransfer = (options) => {
129
- return (0, import_react_query.useMutation)({
130
- mutationFn: import_wallet_sdk.mega.transfer,
131
- ...options
132
- });
133
- };
134
- var useCallContract = (options) => {
135
- return (0, import_react_query.useMutation)({
136
- mutationFn: import_wallet_sdk.mega.callContract,
137
- ...options
138
- });
139
- };
140
- var useGetFromContract = (options) => {
141
- return (0, import_react_query.useMutation)({
142
- mutationFn: import_wallet_sdk.mega.getFromContract,
143
- ...options
144
- });
145
- };
146
- var useDeposit = (options) => {
147
- return (0, import_react_query.useMutation)({
148
- mutationFn: import_wallet_sdk.mega.deposit,
149
- ...options
150
- });
151
- };
152
- var useBalances = (tokens, options) => {
153
- const { status } = (0, import_react.useContext)(Context);
154
- return (0, import_react_query.useQuery)({
155
- queryKey: ["balances"],
156
- queryFn: () => import_wallet_sdk.mega.balances({
157
- tokens
158
- }),
159
- enabled: status.status === "connected",
160
- ...options
161
- });
162
- };
163
- var usePermissions = (address, options) => {
164
- const { status } = (0, import_react.useContext)(Context);
165
- return (0, import_react_query.useQuery)({
166
- queryKey: ["permissions", address],
167
- queryFn: () => import_wallet_sdk.mega.getPermissions(address),
168
- enabled: status?.status === "connected",
169
- ...options
170
- });
171
- };
172
- var useSignData = (options) => {
173
- return (0, import_react_query.useMutation)({
174
- mutationFn: import_wallet_sdk.mega.signData,
175
- ...options
176
- });
177
- };
178
- var useAuthenticate = (options) => {
179
- return (0, import_react_query.useMutation)({
180
- mutationFn: import_wallet_sdk.mega.authenticate,
181
- ...options
182
- });
183
- };
184
- var useManageAccount = (options) => {
185
- return (0, import_react_query.useMutation)({
186
- mutationFn: import_wallet_sdk.mega.manageAccount,
187
- ...options
188
- });
189
- };
190
- var useSend = (options) => {
191
- return (0, import_react_query.useMutation)({
192
- mutationFn: import_wallet_sdk.mega.send,
193
- ...options
194
- });
195
- };
196
- var useSwap = (options) => {
197
- return (0, import_react_query.useMutation)({
198
- mutationFn: import_wallet_sdk.mega.swap,
199
- ...options
200
- });
201
- };
202
- // Annotate the CommonJS export names for ESM import in node:
203
- 0 && (module.exports = {
204
- MegaProvider,
205
- mega,
206
- useAuthenticate,
207
- useBalances,
208
- useCallContract,
209
- useConnect,
210
- useDeposit,
211
- useDisconnect,
212
- useGetFromContract,
213
- useGrantPermissions,
214
- useManageAccount,
215
- usePermissions,
216
- useRevokePermissions,
217
- useSend,
218
- useSignData,
219
- useSignMessage,
220
- useStatus,
221
- useSwap,
222
- useTransfer
223
- });
1
+ "use strict";var l=Object.create;var u=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var P=(t,n)=>{for(var a in n)u(t,a,{get:n[a],enumerable:!0})},y=(t,n,a,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of O(n))!C.call(t,s)&&s!==a&&u(t,s,{get:()=>n[s],enumerable:!(i=F(n,s))||i.enumerable});return t};var M=(t,n,a)=>(a=t!=null?l(w(t)):{},y(n||!t||!t.__esModule?u(a,"default",{value:t,enumerable:!0}):a,t)),x=t=>y(u({},"__esModule",{value:!0}),t);var z={};P(z,{MegaProvider:()=>v,mega:()=>d.mega,useAuthenticate:()=>G,useBalances:()=>I,useCallContract:()=>h,useConnect:()=>E,useDeposit:()=>b,useDisconnect:()=>T,useGetFromContract:()=>q,useGrantPermissions:()=>R,useManageAccount:()=>W,usePermissions:()=>K,useRevokePermissions:()=>S,useSend:()=>B,useSignData:()=>Q,useSignMessage:()=>k,useStatus:()=>U,useSwap:()=>j,useTransfer:()=>D});module.exports=x(z);var o=require("@megaeth-labs/wallet-sdk"),e=require("@tanstack/react-query"),r=M(require("react"),1),d=require("@megaeth-labs/wallet-sdk"),A=new e.QueryClient,m=(0,r.createContext)({}),g=!1,v=({config:t,children:n})=>{let[a,i]=(0,r.useState)(!1),[s,p]=(0,r.useState)({status:"disconnected",network:t.network}),f=(0,r.useMemo)(()=>({config:t,initialised:a,setInitialised:i,status:s,setStatus:p}),[t,a,s]);return(0,r.useEffect)(()=>{g||(g=!0,o.mega.events.onStatusChange(p),(async()=>{let c=await o.mega.initialise(t);c&&p(c),i(!0)})())},[t]),r.default.createElement(m.Provider,{value:f},r.default.createElement(e.QueryClientProvider,{client:A},n))},U=()=>{let{status:t,initialised:n}=(0,r.useContext)(m);return{...t,initialised:n}},E=t=>(0,e.useMutation)({mutationFn:o.mega.connect,...t}),T=t=>(0,e.useMutation)({mutationFn:o.mega.disconnect,...t}),R=t=>(0,e.useMutation)({mutationFn:o.mega.grantPermissions,...t}),S=t=>(0,e.useMutation)({mutationFn:o.mega.revokePermissions,...t}),k=t=>(0,e.useMutation)({mutationFn:o.mega.signMessage,...t}),D=t=>(0,e.useMutation)({mutationFn:o.mega.transfer,...t}),h=t=>(0,e.useMutation)({mutationFn:o.mega.callContract,...t}),q=t=>(0,e.useMutation)({mutationFn:o.mega.getFromContract,...t}),b=t=>(0,e.useMutation)({mutationFn:o.mega.deposit,...t}),I=(t,n)=>{let{status:a}=(0,r.useContext)(m);return(0,e.useQuery)({queryKey:["balances"],queryFn:()=>o.mega.balances({tokens:t}),enabled:a.status==="connected",...n})},K=(t,n)=>{let{status:a}=(0,r.useContext)(m);return(0,e.useQuery)({queryKey:["permissions",t],queryFn:()=>o.mega.getPermissions(t),enabled:a?.status==="connected",...n})},Q=t=>(0,e.useMutation)({mutationFn:o.mega.signData,...t}),G=t=>(0,e.useMutation)({mutationFn:o.mega.authenticate,...t}),W=t=>(0,e.useMutation)({mutationFn:o.mega.manageAccount,...t}),B=t=>(0,e.useMutation)({mutationFn:o.mega.send,...t}),j=t=>(0,e.useMutation)({mutationFn:o.mega.swap,...t});0&&(module.exports={MegaProvider,mega,useAuthenticate,useBalances,useCallContract,useConnect,useDeposit,useDisconnect,useGetFromContract,useGrantPermissions,useManageAccount,usePermissions,useRevokePermissions,useSend,useSignData,useSignMessage,useStatus,useSwap,useTransfer});
package/dist/index.js CHANGED
@@ -1,181 +1 @@
1
- // src/index.tsx
2
- import { mega } from "@megaeth-labs/wallet-sdk";
3
- import {
4
- QueryClient,
5
- QueryClientProvider,
6
- useMutation,
7
- useQuery
8
- } from "@tanstack/react-query";
9
- import React, {
10
- createContext,
11
- useContext,
12
- useEffect,
13
- useMemo,
14
- useState
15
- } from "react";
16
- import { mega as mega2 } from "@megaeth-labs/wallet-sdk";
17
- var client = new QueryClient();
18
- var Context = createContext({});
19
- var startedInitialisation = false;
20
- var MegaProvider = ({ config, children }) => {
21
- const [initialised, setInitialised] = useState(false);
22
- const [status, setStatus] = useState({
23
- status: "disconnected",
24
- network: config.network
25
- });
26
- const value = useMemo(
27
- () => ({
28
- config,
29
- initialised,
30
- setInitialised,
31
- status,
32
- setStatus
33
- }),
34
- [config, initialised, status]
35
- );
36
- useEffect(() => {
37
- if (startedInitialisation) return;
38
- startedInitialisation = true;
39
- mega.events.onStatusChange(setStatus);
40
- (async () => {
41
- const newStatus = await mega.initialise(config);
42
- if (newStatus) {
43
- setStatus(newStatus);
44
- }
45
- setInitialised(true);
46
- })();
47
- }, [config]);
48
- return /* @__PURE__ */ React.createElement(Context.Provider, { value }, /* @__PURE__ */ React.createElement(QueryClientProvider, { client }, children));
49
- };
50
- var useStatus = () => {
51
- const { status, initialised } = useContext(Context);
52
- return {
53
- ...status,
54
- initialised
55
- };
56
- };
57
- var useConnect = (options) => {
58
- return useMutation({
59
- mutationFn: mega.connect,
60
- ...options
61
- });
62
- };
63
- var useDisconnect = (options) => {
64
- return useMutation({
65
- mutationFn: mega.disconnect,
66
- ...options
67
- });
68
- };
69
- var useGrantPermissions = (options) => {
70
- return useMutation({
71
- mutationFn: mega.grantPermissions,
72
- ...options
73
- });
74
- };
75
- var useRevokePermissions = (options) => {
76
- return useMutation({
77
- mutationFn: mega.revokePermissions,
78
- ...options
79
- });
80
- };
81
- var useSignMessage = (options) => {
82
- return useMutation({
83
- mutationFn: mega.signMessage,
84
- ...options
85
- });
86
- };
87
- var useTransfer = (options) => {
88
- return useMutation({
89
- mutationFn: mega.transfer,
90
- ...options
91
- });
92
- };
93
- var useCallContract = (options) => {
94
- return useMutation({
95
- mutationFn: mega.callContract,
96
- ...options
97
- });
98
- };
99
- var useGetFromContract = (options) => {
100
- return useMutation({
101
- mutationFn: mega.getFromContract,
102
- ...options
103
- });
104
- };
105
- var useDeposit = (options) => {
106
- return useMutation({
107
- mutationFn: mega.deposit,
108
- ...options
109
- });
110
- };
111
- var useBalances = (tokens, options) => {
112
- const { status } = useContext(Context);
113
- return useQuery({
114
- queryKey: ["balances"],
115
- queryFn: () => mega.balances({
116
- tokens
117
- }),
118
- enabled: status.status === "connected",
119
- ...options
120
- });
121
- };
122
- var usePermissions = (address, options) => {
123
- const { status } = useContext(Context);
124
- return useQuery({
125
- queryKey: ["permissions", address],
126
- queryFn: () => mega.getPermissions(address),
127
- enabled: status?.status === "connected",
128
- ...options
129
- });
130
- };
131
- var useSignData = (options) => {
132
- return useMutation({
133
- mutationFn: mega.signData,
134
- ...options
135
- });
136
- };
137
- var useAuthenticate = (options) => {
138
- return useMutation({
139
- mutationFn: mega.authenticate,
140
- ...options
141
- });
142
- };
143
- var useManageAccount = (options) => {
144
- return useMutation({
145
- mutationFn: mega.manageAccount,
146
- ...options
147
- });
148
- };
149
- var useSend = (options) => {
150
- return useMutation({
151
- mutationFn: mega.send,
152
- ...options
153
- });
154
- };
155
- var useSwap = (options) => {
156
- return useMutation({
157
- mutationFn: mega.swap,
158
- ...options
159
- });
160
- };
161
- export {
162
- MegaProvider,
163
- mega2 as mega,
164
- useAuthenticate,
165
- useBalances,
166
- useCallContract,
167
- useConnect,
168
- useDeposit,
169
- useDisconnect,
170
- useGetFromContract,
171
- useGrantPermissions,
172
- useManageAccount,
173
- usePermissions,
174
- useRevokePermissions,
175
- useSend,
176
- useSignData,
177
- useSignMessage,
178
- useStatus,
179
- useSwap,
180
- useTransfer
181
- };
1
+ import{mega as e}from"@megaeth-labs/wallet-sdk";import{QueryClient as l,QueryClientProvider as F,useMutation as n,useQuery as d}from"@tanstack/react-query";import c,{createContext as O,useContext as i,useEffect as w,useMemo as C,useState as y}from"react";import{mega as J}from"@megaeth-labs/wallet-sdk";var P=new l,a=O({}),g=!1,v=({config:t,children:o})=>{let[r,u]=y(!1),[m,s]=y({status:"disconnected",network:t.network}),f=C(()=>({config:t,initialised:r,setInitialised:u,status:m,setStatus:s}),[t,r,m]);return w(()=>{g||(g=!0,e.events.onStatusChange(s),(async()=>{let p=await e.initialise(t);p&&s(p),u(!0)})())},[t]),c.createElement(a.Provider,{value:f},c.createElement(F,{client:P},o))},U=()=>{let{status:t,initialised:o}=i(a);return{...t,initialised:o}},E=t=>n({mutationFn:e.connect,...t}),T=t=>n({mutationFn:e.disconnect,...t}),R=t=>n({mutationFn:e.grantPermissions,...t}),S=t=>n({mutationFn:e.revokePermissions,...t}),k=t=>n({mutationFn:e.signMessage,...t}),D=t=>n({mutationFn:e.transfer,...t}),h=t=>n({mutationFn:e.callContract,...t}),q=t=>n({mutationFn:e.getFromContract,...t}),b=t=>n({mutationFn:e.deposit,...t}),I=(t,o)=>{let{status:r}=i(a);return d({queryKey:["balances"],queryFn:()=>e.balances({tokens:t}),enabled:r.status==="connected",...o})},K=(t,o)=>{let{status:r}=i(a);return d({queryKey:["permissions",t],queryFn:()=>e.getPermissions(t),enabled:r?.status==="connected",...o})},Q=t=>n({mutationFn:e.signData,...t}),G=t=>n({mutationFn:e.authenticate,...t}),W=t=>n({mutationFn:e.manageAccount,...t}),B=t=>n({mutationFn:e.send,...t}),j=t=>n({mutationFn:e.swap,...t});export{v as MegaProvider,J as mega,G as useAuthenticate,I as useBalances,h as useCallContract,E as useConnect,b as useDeposit,T as useDisconnect,q as useGetFromContract,R as useGrantPermissions,W as useManageAccount,K as usePermissions,S as useRevokePermissions,B as useSend,Q as useSignData,k as useSignMessage,U as useStatus,j as useSwap,D as useTransfer};
package/package.json CHANGED
@@ -1,72 +1,74 @@
1
1
  {
2
- "name": "@megaeth-labs/wallet-sdk-react",
3
- "version": "0.1.14-beta.1",
4
- "description": "MegaETH Wallet SDK React Wrapper for web applications",
5
- "type": "module",
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.cjs"
2
+ "name": "@megaeth-labs/wallet-sdk-react",
3
+ "version": "0.1.14",
4
+ "description": "MegaETH Wallet SDK React Wrapper for web applications",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsup src/index.tsx --format cjs,esm --dts --clean --minify",
21
+ "dev": "tsup src/index.tsx --format cjs,esm --dts --watch",
22
+ "dev:link": "pnpm build && pnpm link --global",
23
+ "dev:setup": "pnpm link --global @megaeth-labs/wallet-sdk",
24
+ "test": "vitest",
25
+ "test:ui": "vitest --ui",
26
+ "test:coverage": "vitest --coverage",
27
+ "lint": "biome lint ./src",
28
+ "format": "biome format --write ./src",
29
+ "check": "biome check ./src",
30
+ "typecheck": "tsc --noEmit",
31
+ "prepare": "husky"
32
+ },
33
+ "keywords": [
34
+ "megaeth",
35
+ "wallet",
36
+ "sdk",
37
+ "web3",
38
+ "react"
39
+ ],
40
+ "author": "",
41
+ "license": "MIT",
42
+ "publishConfig": {
43
+ "registry": "https://registry.npmjs.org/",
44
+ "access": "restricted"
45
+ },
46
+ "dependencies": {
47
+ "@megaeth-labs/wallet-sdk": "0.1.17"
48
+ },
49
+ "packageManager": "pnpm@10.29.2",
50
+ "peerDependencies": {
51
+ "@tanstack/react-query": "^5",
52
+ "react": "^19"
53
+ },
54
+ "devDependencies": {
55
+ "@biomejs/biome": "2.4.6",
56
+ "@tanstack/react-query": "^5",
57
+ "@types/node": "25.3.5",
58
+ "@types/react": "^19",
59
+ "@vitest/coverage-v8": "4.0.18",
60
+ "@vitest/ui": "4.0.18",
61
+ "husky": "^9.1.7",
62
+ "jsdom": "28.1.0",
63
+ "lint-staged": "16.4.0",
64
+ "react": "^19",
65
+ "tsup": "8.5.1",
66
+ "typescript": "5.9.3",
67
+ "vitest": "4.0.18"
68
+ },
69
+ "lint-staged": {
70
+ "src/**/*.{ts,tsx,js,jsx,json}": [
71
+ "pnpm format"
72
+ ]
14
73
  }
15
- },
16
- "files": [
17
- "dist"
18
- ],
19
- "keywords": [
20
- "megaeth",
21
- "wallet",
22
- "sdk",
23
- "web3",
24
- "react"
25
- ],
26
- "author": "",
27
- "license": "MIT",
28
- "publishConfig": {
29
- "registry": "https://registry.npmjs.org/",
30
- "access": "restricted"
31
- },
32
- "dependencies": {
33
- "@megaeth-labs/wallet-sdk": "0.1.16"
34
- },
35
- "peerDependencies": {
36
- "@tanstack/react-query": "^5",
37
- "react": "^19"
38
- },
39
- "devDependencies": {
40
- "@biomejs/biome": "2.4.6",
41
- "@tanstack/react-query": "^5",
42
- "@types/node": "25.3.5",
43
- "@types/react": "^19",
44
- "@vitest/coverage-v8": "4.0.18",
45
- "@vitest/ui": "4.0.18",
46
- "husky": "^9.1.7",
47
- "jsdom": "28.1.0",
48
- "lint-staged": "16.4.0",
49
- "react": "^19",
50
- "tsup": "8.5.1",
51
- "typescript": "5.9.3",
52
- "vitest": "4.0.18"
53
- },
54
- "lint-staged": {
55
- "src/**/*.{ts,tsx,js,jsx,json}": [
56
- "pnpm format"
57
- ]
58
- },
59
- "scripts": {
60
- "build": "tsup src/index.tsx --format cjs,esm --dts --clean",
61
- "dev": "tsup src/index.tsx --format cjs,esm --dts --watch",
62
- "dev:link": "pnpm build && pnpm link --global",
63
- "dev:setup": "pnpm link --global @megaeth-labs/wallet-sdk",
64
- "test": "vitest",
65
- "test:ui": "vitest --ui",
66
- "test:coverage": "vitest --coverage",
67
- "lint": "biome lint ./src",
68
- "format": "biome format --write ./src",
69
- "check": "biome check ./src",
70
- "typecheck": "tsc --noEmit"
71
- }
72
- }
74
+ }