@nexus-cross/crossx-sdk-core 3.0.0-beta.3 → 3.0.0-beta.4
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/core/constants.d.ts +1 -1
- package/dist/crossx.global +2 -2
- package/dist/{factory-D3fGiPFz.cjs → factory-CN3vWWe6.cjs} +2 -2
- package/dist/{factory-DT5DsVMr.js → factory-ZntNsUG6.js} +6 -6
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ class h extends Error {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
const Ft = 2e3, Fe = 6e4, Bt = 1e3, Gt = 1e4, Kt = "0x77359400", Be = "0x3B9ACA00", Ge = 130, ut = 6, Ke = 18, He = 3e4, Ht = 300 * 1e3, Vt = 30 * 1e3, Ve = 100, $t = 300 * 1e3, $e = 60 * 1e3, le = "crossx-sdk-js/3.0.0-beta.
|
|
19
|
+
const Ft = 2e3, Fe = 6e4, Bt = 1e3, Gt = 1e4, Kt = "0x77359400", Be = "0x3B9ACA00", Ge = 130, ut = 6, Ke = 18, He = 3e4, Ht = 300 * 1e3, Vt = 30 * 1e3, Ve = 100, $t = 300 * 1e3, $e = 60 * 1e3, le = "crossx-sdk-js/3.0.0-beta.4", Yt = "X-SDK-Version", qt = !1, jt = "x-sdk-deprecation", de = -10050, gt = "ONEpocket";
|
|
20
20
|
var Xt = /* @__PURE__ */ ((i) => (i.MetaMask = "io.metamask", i.Binance = "com.binance.wallet", i.CROSSx = "crossx", i))(Xt || {});
|
|
21
21
|
const zt = {
|
|
22
22
|
"io.metamask": "MetaMask",
|
|
@@ -3854,12 +3854,12 @@ const W = class W extends or {
|
|
|
3854
3854
|
}
|
|
3855
3855
|
async _doInitialize(e) {
|
|
3856
3856
|
var t, s;
|
|
3857
|
-
c.log("[CROSSx SDK] v3.0.0-beta.
|
|
3857
|
+
c.log("[CROSSx SDK] v3.0.0-beta.4 초기화 중..."), this.confirmation.setMessages(M(this._config.locale));
|
|
3858
3858
|
try {
|
|
3859
3859
|
const r = ue();
|
|
3860
3860
|
if (this.internalConfig.oauthServiceUrl = r.oauthServiceUrl, this.internalConfig.legacyOauthServiceUrl = r.legacyOauthServiceUrl, this.internalConfig.authApiUrl = r.authApiUrl, this.internalConfig.walletGatewayUrl = r.walletGatewayUrl, this.adapterConfig.gatewayUrl = r.walletGatewayUrl, (s = (t = this.crypto).setJWKSEndpoint) == null || s.call(t, `${r.authApiUrl}/.well-known/jwks.json`), this.usesOneWallet) {
|
|
3861
3861
|
const g = await this.restoreOneWalletSession();
|
|
3862
|
-
return this.initialized = !0, c.info("[CROSSx SDK] v3.0.0-beta.
|
|
3862
|
+
return this.initialized = !0, c.info("[CROSSx SDK] v3.0.0-beta.4 초기화 완료 (one-wallet)"), this.emit("initialized", { restored: !!(g != null && g.success) }), g;
|
|
3863
3863
|
}
|
|
3864
3864
|
const n = this._config.persistWalletPreference !== !1 ? await this.storage.get(
|
|
3865
3865
|
W.WALLET_PREF_KEY
|
|
@@ -3893,7 +3893,7 @@ const W = class W extends or {
|
|
|
3893
3893
|
throw _;
|
|
3894
3894
|
}
|
|
3895
3895
|
}
|
|
3896
|
-
return this.initialized = !0, c.info("[CROSSx SDK] v3.0.0-beta.
|
|
3896
|
+
return this.initialized = !0, c.info("[CROSSx SDK] v3.0.0-beta.4 초기화 완료"), this.emit("initialized", { restored: !!(d != null && d.success) }), d ?? null;
|
|
3897
3897
|
} catch (r) {
|
|
3898
3898
|
throw new h(o.AUTH_NOT_INITIALIZED, "SDK 초기화에 실패했습니다", r);
|
|
3899
3899
|
}
|
|
@@ -3913,7 +3913,7 @@ const W = class W extends or {
|
|
|
3913
3913
|
c.log("[CROSSx] RN Bridge 감지 — Handshake 시도"), c.info("[CROSSx][RNBridge trace] Bootstrap config", {
|
|
3914
3914
|
appId: this._config.projectId,
|
|
3915
3915
|
appVersion: "1.0.0",
|
|
3916
|
-
sdkVersion: "3.0.0-beta.
|
|
3916
|
+
sdkVersion: "3.0.0-beta.4",
|
|
3917
3917
|
keyId: "key-id-1",
|
|
3918
3918
|
userIdHash: "user-hash-placeholder",
|
|
3919
3919
|
projectId: this._config.projectId
|
|
@@ -3921,7 +3921,7 @@ const W = class W extends or {
|
|
|
3921
3921
|
const e = new b({
|
|
3922
3922
|
appId: this._config.projectId,
|
|
3923
3923
|
appVersion: "1.0.0",
|
|
3924
|
-
sdkVersion: "3.0.0-beta.
|
|
3924
|
+
sdkVersion: "3.0.0-beta.4",
|
|
3925
3925
|
keyId: "key-id-1",
|
|
3926
3926
|
userIdHash: "user-hash-placeholder",
|
|
3927
3927
|
projectId: this._config.projectId
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./factory-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./factory-CN3vWWe6.cjs");function s(r){const t=i(r),a=S(t),o=JSON.parse(a);l(o);const{data:n}=o;return{status:o.status,state:o.state,firebaseToken:n.accessToken,provider:n.provider,email:n.email,providerSub:n.sub,tokenType:n.tokenType,expiresIn:n.expiresIn,raw:o}}function i(r){if(r.includes("://")&&r.includes("?")){const t=new URL(r),a=t.searchParams.get("crossx_oauth_result");if(a)return a;const o=t.searchParams.get("data");if(o)return o;throw new Error("Deeplink URL에 crossx_oauth_result 또는 data 파라미터가 없습니다")}return r}function S(r){if(r.startsWith("{"))return r;if(r.startsWith("%7B")||r.startsWith("%7b"))return decodeURIComponent(r);const t=E(r);return decodeURIComponent(t)}function E(r){if(typeof atob=="function")return atob(r);if(typeof Buffer<"u")return Buffer.from(r,"base64").toString("utf-8");throw new Error("Base64 디코딩을 지원하는 환경이 아닙니다")}function l(r){if(typeof r!="object"||r===null)throw new Error("Deeplink payload가 유효한 객체가 아닙니다");const t=r;if(typeof t.status!="string")throw new Error("Deeplink payload에 status 필드가 없습니다");if(typeof t.state!="string")throw new Error("Deeplink payload에 state 필드가 없습니다");if(typeof t.data!="object"||t.data===null)throw new Error("Deeplink payload에 data 필드가 없습니다");const a=t.data;if(typeof a.provider!="string")throw new Error("Deeplink data에 provider 필드가 없습니다");if(typeof a.accessToken!="string")throw new Error("Deeplink data에 accessToken 필드가 없습니다")}exports.CONNECT_OTHER_WALLET_DISPLAY_ORDER=e.CONNECT_OTHER_WALLET_DISPLAY_ORDER;exports.CROSSxError=e.CROSSxError;exports.CROSSxEthereumProvider=e.CROSSxEthereumProvider;exports.CROSSxSDK=e.CROSSxSDK;exports.ChainId=e.ChainId;exports.ConnectOtherWalletItem=e.ConnectOtherWalletItem;exports.ErrorCode=e.ErrorCode;exports.MESSAGES_EN=e.MESSAGES_EN;exports.MESSAGES_KO=e.MESSAGES_KO;exports.MNEMONIC_ADDRESS_LIMIT=e.MNEMONIC_ADDRESS_LIMIT;exports.ONEpocketError=e.CROSSxError;exports.ONEpocketEthereumProvider=e.CROSSxEthereumProvider;exports.ONEpocketSDK=e.CROSSxSDK;exports.PinMemoryStore=e.PinMemoryStore;exports.TokenMemoryStore=e.TokenMemoryStore;exports.WALLET_BRAND_NAME=e.WALLET_BRAND_NAME;exports.WEI_DISPLAY_DECIMALS=e.WEI_DISPLAY_DECIMALS;exports.createCROSSxSDK=e.createCROSSxSDK;exports.createONEpocketSDK=e.createONEpocketSDK;exports.getConnectOtherWalletLabel=e.getConnectOtherWalletLabel;exports.getWalletBrowserInfo=e.getWalletBrowserInfo;exports.isWalletInAppBrowser=e.isWalletInAppBrowser;exports.waitForWalletBrowser=e.waitForWalletBrowser;exports.parseOAuthDeeplink=s;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as u, a as d, b as E, d as S, e as h, f as w, E as D, M as k, h as O, i as m, a as y, b as _, d as C, P as I, T as b, W as R, j as T, k as x, l as A, m as N, n as W, o as L, w as P } from "./factory-
|
|
1
|
+
import { C as u, a as d, b as E, d as S, e as h, f as w, E as D, M as k, h as O, i as m, a as y, b as _, d as C, P as I, T as b, W as R, j as T, k as x, l as A, m as N, n as W, o as L, w as P } from "./factory-ZntNsUG6.js";
|
|
2
2
|
function f(e) {
|
|
3
3
|
const t = s(e), a = n(t), r = JSON.parse(a);
|
|
4
4
|
c(r);
|
package/dist/internal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./factory-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./factory-CN3vWWe6.cjs");exports.DEFAULT_PIN_REUSE_TTL_MS=e.DEFAULT_PIN_REUSE_TTL_MS;exports.createCROSSxSDKWithOverrides=e.createCROSSxSDKWithOverrides;exports.getInternalContext=e.getInternalContext;
|
package/dist/internal.js
CHANGED