@nexus-cross/crossx-sdk-core 3.0.0-beta.8 → 3.0.0-beta.9
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/adapters/confirmation/BridgeConfirmationAdapter.d.ts +2 -0
- package/dist/adapters/onewallet/OneWalletApiAdapter.d.ts +7 -0
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/i18n/types.d.ts +3 -0
- package/dist/core/ports/ConfirmationPort.d.ts +2 -0
- package/dist/core/ports/WalletProviderPort.d.ts +11 -0
- package/dist/crossx.global +6 -6
- package/dist/{factory-BB9pGBTN.js → factory-BqRrKXcb.js} +676 -560
- package/dist/factory-DTwJVS8U.cjs +9 -0
- 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/dist/sdk/CROSSxSDK.d.ts +9 -0
- package/dist/sdk/services/PinOrchestrator.d.ts +25 -1
- package/package.json +1 -1
- package/dist/factory-CrwqZ9NB.cjs +0 -9
|
@@ -54,6 +54,8 @@ export declare class BridgeConfirmationAdapter implements ConfirmationPort {
|
|
|
54
54
|
showWalletCreatedPrompt(): Promise<void>;
|
|
55
55
|
showPinSetupPrompt(options?: {
|
|
56
56
|
errorMessage?: string;
|
|
57
|
+
/** 'change' 면 안내(동의) 단계 없이 새 PIN 입력 · 확인만 — PIN 변경용 (GASPQA-6804) */
|
|
58
|
+
mode?: 'create' | 'change';
|
|
57
59
|
}): Promise<string | null>;
|
|
58
60
|
showPinInputPrompt(options?: {
|
|
59
61
|
errorMessage?: string;
|
|
@@ -40,6 +40,13 @@ export declare class OneWalletApiAdapter implements WalletProviderPort {
|
|
|
40
40
|
index: number;
|
|
41
41
|
name?: string;
|
|
42
42
|
}>>;
|
|
43
|
+
/**
|
|
44
|
+
* `POST /wallets/{지갑}/pin/verify` — verify_pin 봉투 (docs/26 §5.1, GASPQA-6804).
|
|
45
|
+
* 틀리면 서버가 200 `{valid:false, remaining_attempts}` 를 주므로 `PIN_WRONG` 으로 바꿔 던진다. 잠금은 423 `PIN_LOCKED`.
|
|
46
|
+
*/
|
|
47
|
+
checkPinForChange(pin: string): Promise<void>;
|
|
48
|
+
/** `PUT /wallets/{지갑}/pin` — change_pin 봉투, 평문 `{pin, new_pin}` → 204 (docs/26 §5.1, GASPQA-6804) */
|
|
49
|
+
changePin(oldPin: string, newPin: string): Promise<void>;
|
|
43
50
|
/** `PATCH /wallets/{addr}/addresses` — 봉투 없음, 한 번에 1~10개 (docs/26 §5.1, GASPQA-6803) */
|
|
44
51
|
setAddressNames(_userId: string, names: Array<{
|
|
45
52
|
address: string;
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare const PIN_KEY_CACHE_TTL_MS: number;
|
|
|
46
46
|
*/
|
|
47
47
|
export declare const PIN_KEY_PROBE_RETRY_MS: number;
|
|
48
48
|
/** Token History API clientVersion (registerTokenHistory 호출 시 전송) */
|
|
49
|
-
export declare const SDK_CLIENT_VERSION = "crossx-sdk-js/3.0.0-beta.
|
|
49
|
+
export declare const SDK_CLIENT_VERSION = "crossx-sdk-js/3.0.0-beta.9";
|
|
50
50
|
/**
|
|
51
51
|
* 게이트웨이 요청마다 SDK 버전을 실어 보내는 헤더. 값은 {@link SDK_CLIENT_VERSION}.
|
|
52
52
|
* 게이트웨이(walletGatewayUrl)로 가는 요청에만 붙는다 — 체인 RPC·인증 서버·CDN 은
|
|
@@ -101,6 +101,9 @@ export interface SDKMessages {
|
|
|
101
101
|
pin_setup_confirm_title: string;
|
|
102
102
|
pin_setup_confirm_subtitle: string;
|
|
103
103
|
pin_setup_mismatch_error: string;
|
|
104
|
+
pin_change_title: string;
|
|
105
|
+
pin_change_confirm_title: string;
|
|
106
|
+
pin_change_same_error: string;
|
|
104
107
|
pin_validation_too_short: string;
|
|
105
108
|
pin_validation_numbers_only: string;
|
|
106
109
|
pin_validation_repeating_digit: string;
|
|
@@ -163,6 +163,8 @@ export interface ConfirmationPort {
|
|
|
163
163
|
*/
|
|
164
164
|
showPinSetupPrompt(options?: {
|
|
165
165
|
errorMessage?: string;
|
|
166
|
+
/** 'change' 면 안내(동의) 단계 없이 새 PIN 입력 · 확인만 — PIN 변경용 (GASPQA-6804) */
|
|
167
|
+
mode?: 'create' | 'change';
|
|
166
168
|
}): Promise<string | null>;
|
|
167
169
|
/**
|
|
168
170
|
* PIN 입력 UI를 표시합니다. (Enter PIN)
|
|
@@ -83,6 +83,17 @@ export interface WalletProviderPort {
|
|
|
83
83
|
* @returns PIN이 올바르면 true, 아니면 false
|
|
84
84
|
*/
|
|
85
85
|
verifyPin?(pin: string): Promise<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* PIN 변경 전 현재 PIN 확인 (GASPQA-6804). 맞으면 끝나고, 틀리면 `PIN_WRONG`(details.remainingAttempts),
|
|
88
|
+
* 잠금이면 `PIN_LOCKED`(details.lockExpiresAt · permanent) 를 던진다. `verifyPin` 과 달리 세션 복원 흐름은 쓰지 않는다.
|
|
89
|
+
* 지원하는 지갑 서버만 둔다 (one-wallet).
|
|
90
|
+
*/
|
|
91
|
+
checkPinForChange?(pin: string): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* PIN 변경 (GASPQA-6804). 현재 PIN 이 틀리면 `PIN_WRONG`, 잠금이면 `PIN_LOCKED`.
|
|
94
|
+
* 지원하는 지갑 서버만 둔다 — 2.x 게이트웨이(`/mnemonic/change-password`) · one-wallet(`PUT …/pin`).
|
|
95
|
+
*/
|
|
96
|
+
changePin?(oldPin: string, newPin: string): Promise<void>;
|
|
86
97
|
/**
|
|
87
98
|
* Share-C 발급 — POST /mnemonic/share-c
|
|
88
99
|
* 니모닉을 재분할하여 새로운 Share-C를 반환합니다. 기존 Share-C는 무효화됩니다.
|