@nexus-cross/crossx-sdk-core 2.4.0 → 2.5.0-beta.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.
@@ -18,6 +18,8 @@ export declare class CROSSxSDK extends TypedEventEmitter<SDKEventMap> {
18
18
  private tokenStore;
19
19
  private pinEncryptor?;
20
20
  private _config;
21
+ /** native 통화 정보를 못 찾아 경고를 이미 낸 CAIP-2 체인 ID (체인당 1회) */
22
+ private readonly _warnedUnknownNativeCurrency;
21
23
  private initialized;
22
24
  /** initialize() 진행 중 Promise — 동시 호출 시 중복 실행 방지 */
23
25
  private _initPromise;
@@ -428,6 +430,17 @@ export declare class CROSSxSDK extends TypedEventEmitter<SDKEventMap> {
428
430
  * sdk.setPinKeyboard(() => window.innerWidth < 768 ? 'native' : 'virtual');
429
431
  */
430
432
  setPinKeyboard(mode: 'virtual' | 'native' | (() => 'virtual' | 'native')): void;
433
+ /**
434
+ * 컨펌 모달에 표시할 native 통화 정보를 해결한다.
435
+ *
436
+ * 우선순위: `SDKConfig.nativeCurrencies` → 내장 `CHAIN_REGISTRY` → 폴백.
437
+ *
438
+ * 폴백(`{ symbol: '', decimals: 18 }`)은 **추측**이다. 심볼이 비면 사용자는
439
+ * 서명 화면에서 단위 없는 금액을 보고, decimals 가 18 이 아닌 체인이면 금액
440
+ * 자체가 틀린다. 백엔드 체인 목록은 SDK 릴리즈보다 먼저 늘어날 수 있어 이
441
+ * 상황은 정상적으로 발생하므로, 조용히 넘어가지 않고 체인당 한 번 경고한다.
442
+ */
443
+ private resolveNativeCurrency;
431
444
  /**
432
445
  * 지갑 생성/로드 (로그인 후 address가 없는 경우)
433
446
  * - exists: Enter Password → POST /mnemonic/addresses
@@ -12,6 +12,13 @@ interface FactoryOverrides {
12
12
  }
13
13
  /**
14
14
  * 브라우저 환경용 SDK 생성
15
+ *
16
+ * @deprecated ONEpocket 리브랜드 — {@link createONEpocketSDK}를 사용하세요. 동작은 동일하며,
17
+ * 이 이름은 향후 major 버전에서 제거될 예정입니다.
15
18
  */
16
19
  export declare function createCROSSxSDK(config: SDKConfig, _overrides?: FactoryOverrides): CROSSxSDK;
20
+ /**
21
+ * 브라우저 환경용 SDK 생성 (ONEpocket 리브랜드 이름 — createCROSSxSDK와 동일)
22
+ */
23
+ export declare const createONEpocketSDK: typeof createCROSSxSDK;
17
24
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cross/crossx-sdk-core",
3
- "version": "2.4.0",
3
+ "version": "2.5.0-beta.1",
4
4
  "description": "CROSSx Core SDK - Vanilla JavaScript Embedded Wallet SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -41,7 +41,7 @@
41
41
  "fake-indexeddb": "^6.2.5",
42
42
  "jsdom": "^29.0.1",
43
43
  "typescript": "^5.3.3",
44
- "vite": "^5.0.11",
44
+ "vite": "^6.4.3",
45
45
  "vite-plugin-dts": "^3.7.1",
46
46
  "vitest": "^3.2.0"
47
47
  },