@nexus-cross/crossx-sdk-wagmi 1.3.0 → 1.3.1
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/index.cjs +1 -1
- package/dist/index.js +79 -73
- package/dist/provider.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("wagmi"),y=require("@nexus-cross/crossx-sdk-core");function T(i){return parseInt(i.split(":")[1]??"1",10)}function m(i){return`eip155:${i}`}function _(i){return"0x"+i.toString(16)}function O(i){const t=i.startsWith("0x")?i.slice(2):i,s=new Uint8Array(t.length/2);for(let n=0;n<s.length;n++)s[n]=parseInt(t.substring(n*2,n*2+2),16);return new TextDecoder().decode(s)}class W{constructor(t,s=y.ChainId.CROSS_MAINNET){this.sdk=t,this.listeners=new Map,this.walletIndex=0,this.currentAccounts=[],this.off=this.removeListener.bind(this),this.chainId=typeof s=="number"?s:T(s),this.sdk.on("addressChanged",({address:n,index:o})=>{this.setWalletIndex(o),this.notifyAccountsChanged([n])})}_setWalletIndexChangeCallback(t){this.walletIndexChangeCallback=t}async request({method:t,params:s}){try{return await this._handleRequest(t,s)}catch(n){throw n instanceof y.CROSSxError&&n.code===y.ErrorCode.USER_REJECTED?Object.assign(new Error("User rejected the request"),{code:4001,data:n.details}):n}}async _handleRequest(t,s){var o;const n=s??[];switch(t){case"eth_requestAccounts":case"eth_accounts":{if(this.currentAccounts.length>0)return[...this.currentAccounts];const e=await this.sdk.getAddress();return e?[e.address]:[]}case"eth_chainId":return _(this.chainId);case"net_version":return String(this.chainId);case"personal_sign":{const[e]=n,r=e.startsWith("0x")?O(e):e;return(await this.sdk.signMessage(m(this.chainId),r,{index:this.walletIndex})).signature}case"eth_sign":{const[,e]=n,r=e.startsWith("0x")?O(e):e;return(await this.sdk.signMessage(m(this.chainId),r,{index:this.walletIndex})).signature}case"eth_signTypedData":case"eth_signTypedData_v3":case"eth_signTypedData_v4":{const[,e]=n,r=typeof e=="string"?JSON.parse(e):e,h=(o=r==null?void 0:r.domain)==null?void 0:o.chainId,I=h==null||h===0,l=I?0:Number(h),d={index:this.walletIndex};return(I?await this.sdk.signTypedDataOffchain(r,d):await this.sdk.signTypedData(m(l),r,d)).signature}case"eth_sendTransaction":{const[e]=n,r=m(this.chainId);return(await this.sdk.sendTransaction(r,{from:e.from,to:e.to,value:e.value,data:e.data,gasLimit:e.gasLimit??e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce!==void 0?parseInt(String(e.nonce),16):void 0,chainId:this.chainId},{index:this.walletIndex})).txHash}case"wallet_switchEthereumChain":{const[{chainId:e}]=n,r=parseInt(e,16);return r!==this.chainId&&(this.chainId=r,this.emit("chainChanged",_(r))),null}case"wallet_addEthereumChain":return null;default:return this.sdk.walletRpc(t,n,m(this.chainId))}}on(t,s){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(s),this}removeListener(t,s){var n;return(n=this.listeners.get(t))==null||n.delete(s),this}emit(t,...s){var n;(n=this.listeners.get(t))==null||n.forEach(o=>o(...s))}notifyAccountsChanged(t){this.currentAccounts=t,this.emit("accountsChanged",t)}notifyDisconnect(t){this.currentAccounts=[],this.walletIndex=0,this.emit("disconnect",t)}getCurrentChainId(){return this.chainId}setChainId(t){t!==this.chainId&&(this.chainId=t,this.emit("chainChanged",_(t)))}setWalletIndex(t){var s;this.walletIndex=t,(s=this.walletIndexChangeCallback)==null||s.call(this,t)}getWalletIndex(){return this.walletIndex}getCurrentAccounts(){return[...this.currentAccounts]}}function D(i){return typeof i=="number"?i:parseInt(i.split(":")[1]??"1",10)}const b="crossx-wallet-index";function N(){try{const i=typeof window<"u"?localStorage.getItem(b):null;return i&&Number(i)||0}catch{return 0}}function L(i){try{typeof window<"u"&&localStorage.setItem(b,String(i))}catch{}}function q(){try{typeof window<"u"&&localStorage.removeItem(b)}catch{}}function G(i){const{defaultChainId:t,getStoredWalletIndex:s,onWalletIndexChanged:n,...o}=i,e=y.createCROSSxSDK(o);return k({sdk:e,defaultChainId:t,getStoredWalletIndex:s,onWalletIndexChanged:n})}function k(i){const{sdk:t,defaultChainId:s=y.ChainId.CROSS_MAINNET,getStoredWalletIndex:n=N,onWalletIndexChanged:o=L}=i,e=D(s);let r=null,h=!1,I=!1;function l(){return r||(r=new W(t,e),r._setWalletIndexChangeCallback(o)),r}return P.createConnector(d=>({id:"crossx",name:"CROSSx Wallet",type:"crossx",async setup(){if(!h){const g=n();await t.initialize({preferredWalletIndex:g}),h=!0,t.on("addressChanged",({address:c,index:f})=>{if(I)return;const w=l();w.setWalletIndex(f),c&&w.notifyAccountsChanged([c])})}const a=l();a.on("accountsChanged",this.onAccountsChanged.bind(this)),a.on("chainChanged",this.onChainChanged.bind(this)),a.on("disconnect",this.onDisconnect.bind(this))},async connect({chainId:a,isReconnecting:g}={}){var w;const c=l(),f=a??e;I=!0;try{if(g||t.isAuthenticated()){const u=n();if(t.isAuthenticated()){try{const S=await t.getAddresses();if(S.length>0){const A=S.find(R=>R.index===u)??S[0];return c.setWalletIndex(A.index),c.notifyAccountsChanged([A.address]),{accounts:[A.address],chainId:f}}}catch{}await t.signOut().catch(()=>{}),c.notifyDisconnect()}}let C;try{C=await t.signInWithCreate()}catch(u){throw t.isAuthenticated()||(c.notifyDisconnect(),d.emitter.emit("disconnect")),u}if(!C.success)throw new Error(C.error??"CROSSx sign-in failed");const x=C.address,E=C.addresses.map(u=>u.address).filter(u=>!x||u.toLowerCase()!==x.toLowerCase()),p=x?[x,...E]:E;if(p.length===0)throw new Error("No address found after sign-in");const v=((w=C.addresses.find(u=>x&&u.address.toLowerCase()===x.toLowerCase()))==null?void 0:w.index)??0;return c.setWalletIndex(v),c.notifyAccountsChanged(p),{accounts:p,chainId:f}}finally{I=!1}},async disconnect(){const a=l();await t.signOut(),a.notifyDisconnect(),q(),o(0),d.emitter.emit("disconnect")},async getAccounts(){const g=l().getCurrentAccounts();if(g.length>0)return g;const c=await t.getAddress();return c?[c.address]:[]},async getChainId(){return l().getCurrentChainId()},async getProvider({chainId:a}={}){return l()},async isAuthorized(){return await t.whenReady(),t.isAuthenticated()},async switchChain({chainId:a}){l().setChainId(a),d.emitter.emit("change",{chainId:a});const c=d.chains.find(f=>f.id===a);if(!c)throw new Error(`Chain ${a} is not configured`);return c},onAccountsChanged(a){a.length===0?d.emitter.emit("disconnect"):d.emitter.emit("change",{accounts:a})},onChainChanged(a){d.emitter.emit("change",{chainId:Number(a)})},onDisconnect(){d.emitter.emit("disconnect")}}))}exports.CROSSxEIP1193Provider=W;exports.createCROSSxConnector=k;exports.crossxConnector=G;
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import { createConnector as
|
|
2
|
-
import { ChainId as
|
|
3
|
-
function P(
|
|
4
|
-
return parseInt(
|
|
1
|
+
import { createConnector as v } from "wagmi";
|
|
2
|
+
import { ChainId as b, CROSSxError as D, ErrorCode as R, createCROSSxSDK as T } from "@nexus-cross/crossx-sdk-core";
|
|
3
|
+
function P(i) {
|
|
4
|
+
return parseInt(i.split(":")[1] ?? "1", 10);
|
|
5
5
|
}
|
|
6
|
-
function m(
|
|
7
|
-
return `eip155:${
|
|
6
|
+
function m(i) {
|
|
7
|
+
return `eip155:${i}`;
|
|
8
8
|
}
|
|
9
|
-
function A(
|
|
10
|
-
return "0x" +
|
|
9
|
+
function A(i) {
|
|
10
|
+
return "0x" + i.toString(16);
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
function E(i) {
|
|
13
|
+
const t = i.startsWith("0x") ? i.slice(2) : i, s = new Uint8Array(t.length / 2);
|
|
14
|
+
for (let n = 0; n < s.length; n++)
|
|
15
|
+
s[n] = parseInt(t.substring(n * 2, n * 2 + 2), 16);
|
|
16
|
+
return new TextDecoder().decode(s);
|
|
17
|
+
}
|
|
18
|
+
class N {
|
|
19
|
+
constructor(t, s = b.CROSS_MAINNET) {
|
|
14
20
|
this.sdk = t, this.listeners = /* @__PURE__ */ new Map(), this.walletIndex = 0, this.currentAccounts = [], this.off = this.removeListener.bind(this), this.chainId = typeof s == "number" ? s : P(s), this.sdk.on("addressChanged", ({ address: n, index: o }) => {
|
|
15
21
|
this.setWalletIndex(o), this.notifyAccountsChanged([n]);
|
|
16
22
|
});
|
|
@@ -24,7 +30,7 @@ class T {
|
|
|
24
30
|
try {
|
|
25
31
|
return await this._handleRequest(t, s);
|
|
26
32
|
} catch (n) {
|
|
27
|
-
throw n instanceof
|
|
33
|
+
throw n instanceof D && n.code === R.USER_REJECTED ? Object.assign(
|
|
28
34
|
new Error("User rejected the request"),
|
|
29
35
|
{ code: 4001, data: n.details }
|
|
30
36
|
) : n;
|
|
@@ -46,30 +52,30 @@ class T {
|
|
|
46
52
|
case "net_version":
|
|
47
53
|
return String(this.chainId);
|
|
48
54
|
case "personal_sign": {
|
|
49
|
-
const [e] = n;
|
|
55
|
+
const [e] = n, a = e.startsWith("0x") ? E(e) : e;
|
|
50
56
|
return (await this.sdk.signMessage(
|
|
51
57
|
m(this.chainId),
|
|
52
|
-
|
|
58
|
+
a,
|
|
53
59
|
{ index: this.walletIndex }
|
|
54
60
|
)).signature;
|
|
55
61
|
}
|
|
56
62
|
case "eth_sign": {
|
|
57
|
-
const [, e] = n;
|
|
63
|
+
const [, e] = n, a = e.startsWith("0x") ? E(e) : e;
|
|
58
64
|
return (await this.sdk.signMessage(
|
|
59
65
|
m(this.chainId),
|
|
60
|
-
|
|
66
|
+
a,
|
|
61
67
|
{ index: this.walletIndex }
|
|
62
68
|
)).signature;
|
|
63
69
|
}
|
|
64
70
|
case "eth_signTypedData":
|
|
65
71
|
case "eth_signTypedData_v3":
|
|
66
72
|
case "eth_signTypedData_v4": {
|
|
67
|
-
const [, e] = n,
|
|
68
|
-
return (f ? await this.sdk.signTypedDataOffchain(
|
|
73
|
+
const [, e] = n, a = typeof e == "string" ? JSON.parse(e) : e, h = (o = a == null ? void 0 : a.domain) == null ? void 0 : o.chainId, f = h == null || h === 0, l = f ? 0 : Number(h), d = { index: this.walletIndex };
|
|
74
|
+
return (f ? await this.sdk.signTypedDataOffchain(a, d) : await this.sdk.signTypedData(m(l), a, d)).signature;
|
|
69
75
|
}
|
|
70
76
|
case "eth_sendTransaction": {
|
|
71
|
-
const [e] = n,
|
|
72
|
-
return (await this.sdk.sendTransaction(
|
|
77
|
+
const [e] = n, a = m(this.chainId);
|
|
78
|
+
return (await this.sdk.sendTransaction(a, {
|
|
73
79
|
from: e.from,
|
|
74
80
|
to: e.to,
|
|
75
81
|
value: e.value,
|
|
@@ -83,8 +89,8 @@ class T {
|
|
|
83
89
|
}, { index: this.walletIndex })).txHash;
|
|
84
90
|
}
|
|
85
91
|
case "wallet_switchEthereumChain": {
|
|
86
|
-
const [{ chainId: e }] = n,
|
|
87
|
-
return
|
|
92
|
+
const [{ chainId: e }] = n, a = parseInt(e, 16);
|
|
93
|
+
return a !== this.chainId && (this.chainId = a, this.emit("chainChanged", A(a))), null;
|
|
88
94
|
}
|
|
89
95
|
case "wallet_addEthereumChain":
|
|
90
96
|
return null;
|
|
@@ -132,74 +138,74 @@ class T {
|
|
|
132
138
|
return [...this.currentAccounts];
|
|
133
139
|
}
|
|
134
140
|
}
|
|
135
|
-
function
|
|
136
|
-
return typeof
|
|
141
|
+
function L(i) {
|
|
142
|
+
return typeof i == "number" ? i : parseInt(i.split(":")[1] ?? "1", 10);
|
|
137
143
|
}
|
|
138
144
|
const _ = "crossx-wallet-index";
|
|
139
|
-
function
|
|
145
|
+
function G() {
|
|
140
146
|
try {
|
|
141
|
-
const
|
|
142
|
-
return
|
|
147
|
+
const i = typeof window < "u" ? localStorage.getItem(_) : null;
|
|
148
|
+
return i && Number(i) || 0;
|
|
143
149
|
} catch {
|
|
144
150
|
return 0;
|
|
145
151
|
}
|
|
146
152
|
}
|
|
147
|
-
function
|
|
153
|
+
function q(i) {
|
|
148
154
|
try {
|
|
149
|
-
typeof window < "u" && localStorage.setItem(_, String(
|
|
155
|
+
typeof window < "u" && localStorage.setItem(_, String(i));
|
|
150
156
|
} catch {
|
|
151
157
|
}
|
|
152
158
|
}
|
|
153
|
-
function
|
|
159
|
+
function M() {
|
|
154
160
|
try {
|
|
155
161
|
typeof window < "u" && localStorage.removeItem(_);
|
|
156
162
|
} catch {
|
|
157
163
|
}
|
|
158
164
|
}
|
|
159
|
-
function j(
|
|
160
|
-
const { defaultChainId: t, getStoredWalletIndex: s, onWalletIndexChanged: n, ...o } =
|
|
161
|
-
return
|
|
165
|
+
function j(i) {
|
|
166
|
+
const { defaultChainId: t, getStoredWalletIndex: s, onWalletIndexChanged: n, ...o } = i, e = T(o);
|
|
167
|
+
return F({ sdk: e, defaultChainId: t, getStoredWalletIndex: s, onWalletIndexChanged: n });
|
|
162
168
|
}
|
|
163
|
-
function
|
|
169
|
+
function F(i) {
|
|
164
170
|
const {
|
|
165
171
|
sdk: t,
|
|
166
|
-
defaultChainId: s =
|
|
167
|
-
getStoredWalletIndex: n =
|
|
168
|
-
onWalletIndexChanged: o =
|
|
169
|
-
} =
|
|
170
|
-
let
|
|
171
|
-
function
|
|
172
|
-
return
|
|
172
|
+
defaultChainId: s = b.CROSS_MAINNET,
|
|
173
|
+
getStoredWalletIndex: n = G,
|
|
174
|
+
onWalletIndexChanged: o = q
|
|
175
|
+
} = i, e = L(s);
|
|
176
|
+
let a = null, h = !1, f = !1;
|
|
177
|
+
function l() {
|
|
178
|
+
return a || (a = new N(t, e), a._setWalletIndexChangeCallback(o)), a;
|
|
173
179
|
}
|
|
174
|
-
return
|
|
180
|
+
return v((d) => ({
|
|
175
181
|
id: "crossx",
|
|
176
182
|
name: "CROSSx Wallet",
|
|
177
183
|
type: "crossx",
|
|
178
184
|
async setup() {
|
|
179
|
-
if (!
|
|
185
|
+
if (!h) {
|
|
180
186
|
const g = n();
|
|
181
|
-
await t.initialize({ preferredWalletIndex: g }),
|
|
187
|
+
await t.initialize({ preferredWalletIndex: g }), h = !0, t.on("addressChanged", ({ address: c, index: I }) => {
|
|
182
188
|
if (f) return;
|
|
183
|
-
const w =
|
|
189
|
+
const w = l();
|
|
184
190
|
w.setWalletIndex(I), c && w.notifyAccountsChanged([c]);
|
|
185
191
|
});
|
|
186
192
|
}
|
|
187
|
-
const
|
|
188
|
-
|
|
193
|
+
const r = l();
|
|
194
|
+
r.on("accountsChanged", this.onAccountsChanged.bind(this)), r.on("chainChanged", this.onChainChanged.bind(this)), r.on("disconnect", this.onDisconnect.bind(this));
|
|
189
195
|
},
|
|
190
196
|
// ── connect ─────────────────────────────────────────────────────────────
|
|
191
|
-
async connect({ chainId:
|
|
197
|
+
async connect({ chainId: r, isReconnecting: g } = {}) {
|
|
192
198
|
var w;
|
|
193
|
-
const c =
|
|
199
|
+
const c = l(), I = r ?? e;
|
|
194
200
|
f = !0;
|
|
195
201
|
try {
|
|
196
202
|
if (g || t.isAuthenticated()) {
|
|
197
|
-
const
|
|
203
|
+
const u = n();
|
|
198
204
|
if (t.isAuthenticated()) {
|
|
199
205
|
try {
|
|
200
206
|
const y = await t.getAddresses();
|
|
201
207
|
if (y.length > 0) {
|
|
202
|
-
const S = y.find((
|
|
208
|
+
const S = y.find((O) => O.index === u) ?? y[0];
|
|
203
209
|
return c.setWalletIndex(S.index), c.notifyAccountsChanged([S.address]), {
|
|
204
210
|
accounts: [S.address],
|
|
205
211
|
chainId: I
|
|
@@ -215,18 +221,18 @@ function M(a) {
|
|
|
215
221
|
let C;
|
|
216
222
|
try {
|
|
217
223
|
C = await t.signInWithCreate();
|
|
218
|
-
} catch (
|
|
219
|
-
throw t.isAuthenticated() || (c.notifyDisconnect(), d.emitter.emit("disconnect")),
|
|
224
|
+
} catch (u) {
|
|
225
|
+
throw t.isAuthenticated() || (c.notifyDisconnect(), d.emitter.emit("disconnect")), u;
|
|
220
226
|
}
|
|
221
227
|
if (!C.success)
|
|
222
228
|
throw new Error(C.error ?? "CROSSx sign-in failed");
|
|
223
|
-
const x = C.address,
|
|
229
|
+
const x = C.address, W = C.addresses.map((u) => u.address).filter((u) => !x || u.toLowerCase() !== x.toLowerCase()), p = x ? [x, ...W] : W;
|
|
224
230
|
if (p.length === 0)
|
|
225
231
|
throw new Error("No address found after sign-in");
|
|
226
|
-
const
|
|
227
|
-
(
|
|
232
|
+
const k = ((w = C.addresses.find(
|
|
233
|
+
(u) => x && u.address.toLowerCase() === x.toLowerCase()
|
|
228
234
|
)) == null ? void 0 : w.index) ?? 0;
|
|
229
|
-
return c.setWalletIndex(
|
|
235
|
+
return c.setWalletIndex(k), c.notifyAccountsChanged(p), {
|
|
230
236
|
accounts: p,
|
|
231
237
|
chainId: I
|
|
232
238
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -237,45 +243,45 @@ function M(a) {
|
|
|
237
243
|
},
|
|
238
244
|
// ── disconnect ──────────────────────────────────────────────────────────
|
|
239
245
|
async disconnect() {
|
|
240
|
-
const
|
|
241
|
-
await t.signOut(),
|
|
246
|
+
const r = l();
|
|
247
|
+
await t.signOut(), r.notifyDisconnect(), M(), o(0), d.emitter.emit("disconnect");
|
|
242
248
|
},
|
|
243
249
|
// ── getAccounts ─────────────────────────────────────────────────────────
|
|
244
250
|
async getAccounts() {
|
|
245
|
-
const g =
|
|
251
|
+
const g = l().getCurrentAccounts();
|
|
246
252
|
if (g.length > 0) return g;
|
|
247
253
|
const c = await t.getAddress();
|
|
248
254
|
return c ? [c.address] : [];
|
|
249
255
|
},
|
|
250
256
|
// ── getChainId ──────────────────────────────────────────────────────────
|
|
251
257
|
async getChainId() {
|
|
252
|
-
return
|
|
258
|
+
return l().getCurrentChainId();
|
|
253
259
|
},
|
|
254
260
|
// ── getProvider ─────────────────────────────────────────────────────────
|
|
255
|
-
async getProvider({ chainId:
|
|
256
|
-
return
|
|
261
|
+
async getProvider({ chainId: r } = {}) {
|
|
262
|
+
return l();
|
|
257
263
|
},
|
|
258
264
|
// ── isAuthorized ────────────────────────────────────────────────────────
|
|
259
265
|
async isAuthorized() {
|
|
260
266
|
return await t.whenReady(), t.isAuthenticated();
|
|
261
267
|
},
|
|
262
268
|
// ── switchChain ─────────────────────────────────────────────────────────
|
|
263
|
-
async switchChain({ chainId:
|
|
264
|
-
|
|
265
|
-
const c = d.chains.find((I) => I.id ===
|
|
269
|
+
async switchChain({ chainId: r }) {
|
|
270
|
+
l().setChainId(r), d.emitter.emit("change", { chainId: r });
|
|
271
|
+
const c = d.chains.find((I) => I.id === r);
|
|
266
272
|
if (!c)
|
|
267
|
-
throw new Error(`Chain ${
|
|
273
|
+
throw new Error(`Chain ${r} is not configured`);
|
|
268
274
|
return c;
|
|
269
275
|
},
|
|
270
276
|
// ── 이벤트 핸들러 ───────────────────────────────────────────────────────
|
|
271
|
-
onAccountsChanged(
|
|
272
|
-
|
|
273
|
-
accounts:
|
|
277
|
+
onAccountsChanged(r) {
|
|
278
|
+
r.length === 0 ? d.emitter.emit("disconnect") : d.emitter.emit("change", {
|
|
279
|
+
accounts: r
|
|
274
280
|
});
|
|
275
281
|
},
|
|
276
|
-
onChainChanged(
|
|
282
|
+
onChainChanged(r) {
|
|
277
283
|
d.emitter.emit("change", {
|
|
278
|
-
chainId: Number(
|
|
284
|
+
chainId: Number(r)
|
|
279
285
|
});
|
|
280
286
|
},
|
|
281
287
|
onDisconnect() {
|
|
@@ -284,7 +290,7 @@ function M(a) {
|
|
|
284
290
|
}));
|
|
285
291
|
}
|
|
286
292
|
export {
|
|
287
|
-
|
|
288
|
-
|
|
293
|
+
N as CROSSxEIP1193Provider,
|
|
294
|
+
F as createCROSSxConnector,
|
|
289
295
|
j as crossxConnector
|
|
290
296
|
};
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAI9D,KAAK,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAO9C,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAAC;CACtC;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAI9D,KAAK,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAO9C,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAAC;CACtC;AA2BD,qBAAa,qBAAqB;IAQ9B,QAAQ,CAAC,GAAG,EAAE,SAAS;IAPzB,OAAO,CAAC,SAAS,CAA8C;IAC/D,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,eAAe,CAAgB;IACvC,OAAO,CAAC,yBAAyB,CAAC,CAA0B;gBAGjD,GAAG,EAAE,SAAS,EACvB,cAAc,GAAE,MAAM,GAAG,MAA8B;IAazD,2CAA2C;IAC3C,6BAA6B,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAM1D,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC;YAe9D,cAAc;IAuG5B,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI;IAQhD,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI;IAK5D,GAAG,UALmB,MAAM,YAAY,aAAa,KAAG,IAAI,CAKvB;IAErC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM7C,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI;IAK/C,gBAAgB,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI;IAMrC,iBAAiB,IAAI,MAAM;IAI3B,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAO5B;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKnC,cAAc,IAAI,MAAM;IAIxB,kBAAkB,IAAI,MAAM,EAAE;CAG/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cross/crossx-sdk-wagmi",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "CROSSx SDK wagmi Connector — OAuth 임베디드 지갑을 wagmi에 통합",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@nexus-cross/crossx-sdk-core": "1.3.
|
|
20
|
+
"@nexus-cross/crossx-sdk-core": "1.3.1"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"viem": ">=2.0.0",
|