@getpara/shared 1.26.0 → 1.28.0
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.
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* This is the canonical auth contract — new SDKs consume it directly instead of
|
|
9
9
|
* a parallel client mirror. (ENG-6910)
|
|
10
10
|
*/
|
|
11
|
-
import type { MfaChallenge, TOAuthMethod } from './auth.js';
|
|
11
|
+
import type { MfaChallenge, TAuthMethod, TOAuthMethod } from './auth.js';
|
|
12
12
|
import type { DeliveryChannel } from './otp.js';
|
|
13
13
|
import type { TWalletType } from './wallet.js';
|
|
14
14
|
/**
|
|
@@ -56,11 +56,25 @@ export type AuthState = {
|
|
|
56
56
|
/** Whether this auth created the account (signup) vs logged into an existing one. Present on `authenticated`. */
|
|
57
57
|
isNewUser?: boolean;
|
|
58
58
|
/**
|
|
59
|
-
* Present on `authenticated`: whether the account's MPC user-share is enclave-custodied (basic-login
|
|
60
|
-
*
|
|
61
|
-
*
|
|
59
|
+
* Present on `authenticated`: whether the account's MPC user-share is enclave-custodied (basic-login)
|
|
60
|
+
* vs credential-protected. The authoritative key-share-path signal — the backend asserts it so the SDK
|
|
61
|
+
* doesn't have to re-encode the "`BASIC_LOGIN` ⇒ enclave" rule. (ENG-7075)
|
|
62
62
|
*/
|
|
63
63
|
isEnclaveUser?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Present on `authenticated`: the account's enrolled auth methods. The SDK reads this for the
|
|
66
|
+
* credential-unlock UI (`PASSKEY`/`PASSWORD`/`PIN`); the enclave decision itself comes from
|
|
67
|
+
* `isEnclaveUser` above. Mirrors the legacy `done` stage's `authMethods`. Safe to expose here
|
|
68
|
+
* (post-auth): the user has proven ownership, so revealing their own methods isn't an enumeration
|
|
69
|
+
* leak — unlike the legacy pre-auth `login` stage. (ENG-7075)
|
|
70
|
+
*/
|
|
71
|
+
authMethods?: TAuthMethod[];
|
|
72
|
+
/**
|
|
73
|
+
* Present on `authenticated`: whether the account has a real (non-PIN) password. `authMethods` reports
|
|
74
|
+
* `PASSWORD` even for a PIN-only account (legacy-SDK compat), so the SDK needs this to tell a password
|
|
75
|
+
* from a PIN — mirrors the legacy `login` stage's `hasPasswordWithoutPIN`. (ENG-7075)
|
|
76
|
+
*/
|
|
77
|
+
hasPasswordWithoutPIN?: boolean;
|
|
64
78
|
verification?: AuthVerification;
|
|
65
79
|
/** The login-time MFA challenge in flight (present while `needs_second_factor`). (ENG-6906) */
|
|
66
80
|
secondFactor?: MfaChallenge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authState.d.ts","sourceRoot":"","sources":["../../../src/types/authState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"authState.d.ts","sourceRoot":"","sources":["../../../src/types/authState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,aAAa,2GAMhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,oEAAqE,CAAC;AAEpG,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,iFAAiF;AACjF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,eAAe,CAAC;IACxB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F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@@ export type CanonicalTransactionContext = {
|
|
|
23
23
|
signMode: 'DIRECT' | 'AMINO';
|
|
24
24
|
/** The JSON signing document encoded as base64 bytes. */
|
|
25
25
|
signDocBase64: string;
|
|
26
|
+
} | {
|
|
27
|
+
/** The wallet family that owns the transaction. */
|
|
28
|
+
walletType: 'SUI';
|
|
29
|
+
/** The complete Sui BCS TransactionData encoded as base64 bytes. */
|
|
30
|
+
transactionBase64: string;
|
|
26
31
|
};
|
|
27
32
|
//# sourceMappingURL=signing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signing.d.ts","sourceRoot":"","sources":["../../../src/types/signing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GACnC;IACE,mDAAmD;IACnD,UAAU,EAAE,QAAQ,CAAC;IACrB,oEAAoE;IACpE,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GACD;IACE,mDAAmD;IACnD,UAAU,EAAE,SAAS,CAAC;IACtB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GACD;IACE,mDAAmD;IACnD,UAAU,EAAE,QAAQ,CAAC;IACrB,mEAAmE;IACnE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B,yDAAyD;IACzD,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"signing.d.ts","sourceRoot":"","sources":["../../../src/types/signing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GACnC;IACE,mDAAmD;IACnD,UAAU,EAAE,QAAQ,CAAC;IACrB,oEAAoE;IACpE,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GACD;IACE,mDAAmD;IACnD,UAAU,EAAE,SAAS,CAAC;IACtB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GACD;IACE,mDAAmD;IACnD,UAAU,EAAE,QAAQ,CAAC;IACrB,mEAAmE;IACnE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B,yDAAyD;IACzD,aAAa,EAAE,MAAM,CAAC;CACvB,GACD;IACE,mDAAmD;IACnD,UAAU,EAAE,KAAK,CAAC;IAClB,oEAAoE;IACpE,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC"}
|