@chipi-stack/types 14.15.0 → 14.15.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.d.mts CHANGED
@@ -87,9 +87,15 @@ type WalletType = "CHIPI" | "READY" | "SHHH" | (string & {});
87
87
  type ShhhSignerKind = "STARK" | "ED25519" | "SECP256K1" | "EIP191_SECP256K1" | "EIP712_SECP256K1" | "P256" | "WEBAUTHN_P256" | "JWT_ES256" | "JWT_ES256_APPLE_SUB" | "BLS12_381";
88
88
  /**
89
89
  * Authentication method used for wallet encryption.
90
- * - "passkey": passkey only (no PIN backup — legacy, not recommended)
91
- * - "pin": PIN only (current default)
92
- * - "passkey+pin": passkey primary + PIN backup (recommended default)
90
+ * - "passkey": passkey only. On the web the wrap key is the WebAuthn PRF
91
+ * output, derived on the device; the passkey's platform sync (iCloud
92
+ * Keychain, Google Password Manager) is the recovery path. The recommended
93
+ * choice for self-custodial web apps. On Expo the key is a random key kept
94
+ * in this device's secure storage only, so pair it with a PIN backup there.
95
+ * - "pin": PIN only (legacy). A short PIN can be brute-forced offline against
96
+ * the stored ciphertext.
97
+ * - "passkey+pin": passkey primary + PIN backup. The backup is only as strong
98
+ * as the PIN (same offline brute-force exposure as "pin").
93
99
  */
94
100
  type AuthMethod = "passkey" | "pin" | "passkey+pin";
95
101
  interface WalletData {
@@ -114,6 +120,12 @@ interface DeploymentData {
114
120
  calldata: string[];
115
121
  }
116
122
  interface CreateWalletParams {
123
+ /**
124
+ * Key that encrypts the private key. A PIN, or a passkey-derived key.
125
+ * With `useCreateWallet` and `usePasskey: true` it is optional: omit it for a
126
+ * passkey-only wallet, or pass a PIN to keep it as a backup.
127
+ * Required on the server SDK.
128
+ */
117
129
  encryptKey?: string;
118
130
  externalUserId: string;
119
131
  userId?: string;
@@ -155,10 +167,18 @@ interface CreateWalletParams {
155
167
  * itself.
156
168
  */
157
169
  ownerPubkeyFelts?: string[];
170
+ /**
171
+ * Browser/Expo hooks only (`useCreateWallet`): create a passkey and use the
172
+ * key it yields as `encryptKey`. The server SDK does not create passkeys.
173
+ */
158
174
  usePasskey?: boolean;
159
- /** PIN for backup encryption (dual-key wrapping). Required when usePasskey: true. */
175
+ /**
176
+ * Optional PIN for a backup copy of the private key (dual-key wrapping).
177
+ * `useCreateWallet` fills it from `encryptKey` when `usePasskey: true` and a
178
+ * PIN is given; omit both for a passkey-only wallet.
179
+ */
160
180
  encryptKeyBackup?: string;
161
- /** Auth method: "passkey+pin" for dual-key, "pin" for PIN-only */
181
+ /** Auth method: "passkey" (passkey only), "passkey+pin" (dual-key) or "pin" (PIN only) */
162
182
  authMethod?: AuthMethod;
163
183
  /** WebAuthn credential ID stored in backend for recovery */
164
184
  credentialId?: string;
package/dist/index.d.ts CHANGED
@@ -87,9 +87,15 @@ type WalletType = "CHIPI" | "READY" | "SHHH" | (string & {});
87
87
  type ShhhSignerKind = "STARK" | "ED25519" | "SECP256K1" | "EIP191_SECP256K1" | "EIP712_SECP256K1" | "P256" | "WEBAUTHN_P256" | "JWT_ES256" | "JWT_ES256_APPLE_SUB" | "BLS12_381";
88
88
  /**
89
89
  * Authentication method used for wallet encryption.
90
- * - "passkey": passkey only (no PIN backup — legacy, not recommended)
91
- * - "pin": PIN only (current default)
92
- * - "passkey+pin": passkey primary + PIN backup (recommended default)
90
+ * - "passkey": passkey only. On the web the wrap key is the WebAuthn PRF
91
+ * output, derived on the device; the passkey's platform sync (iCloud
92
+ * Keychain, Google Password Manager) is the recovery path. The recommended
93
+ * choice for self-custodial web apps. On Expo the key is a random key kept
94
+ * in this device's secure storage only, so pair it with a PIN backup there.
95
+ * - "pin": PIN only (legacy). A short PIN can be brute-forced offline against
96
+ * the stored ciphertext.
97
+ * - "passkey+pin": passkey primary + PIN backup. The backup is only as strong
98
+ * as the PIN (same offline brute-force exposure as "pin").
93
99
  */
94
100
  type AuthMethod = "passkey" | "pin" | "passkey+pin";
95
101
  interface WalletData {
@@ -114,6 +120,12 @@ interface DeploymentData {
114
120
  calldata: string[];
115
121
  }
116
122
  interface CreateWalletParams {
123
+ /**
124
+ * Key that encrypts the private key. A PIN, or a passkey-derived key.
125
+ * With `useCreateWallet` and `usePasskey: true` it is optional: omit it for a
126
+ * passkey-only wallet, or pass a PIN to keep it as a backup.
127
+ * Required on the server SDK.
128
+ */
117
129
  encryptKey?: string;
118
130
  externalUserId: string;
119
131
  userId?: string;
@@ -155,10 +167,18 @@ interface CreateWalletParams {
155
167
  * itself.
156
168
  */
157
169
  ownerPubkeyFelts?: string[];
170
+ /**
171
+ * Browser/Expo hooks only (`useCreateWallet`): create a passkey and use the
172
+ * key it yields as `encryptKey`. The server SDK does not create passkeys.
173
+ */
158
174
  usePasskey?: boolean;
159
- /** PIN for backup encryption (dual-key wrapping). Required when usePasskey: true. */
175
+ /**
176
+ * Optional PIN for a backup copy of the private key (dual-key wrapping).
177
+ * `useCreateWallet` fills it from `encryptKey` when `usePasskey: true` and a
178
+ * PIN is given; omit both for a passkey-only wallet.
179
+ */
160
180
  encryptKeyBackup?: string;
161
- /** Auth method: "passkey+pin" for dual-key, "pin" for PIN-only */
181
+ /** Auth method: "passkey" (passkey only), "passkey+pin" (dual-key) or "pin" (PIN only) */
162
182
  authMethod?: AuthMethod;
163
183
  /** WebAuthn credential ID stored in backend for recovery */
164
184
  credentialId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chipi-stack/types",
3
- "version": "14.15.0",
3
+ "version": "14.15.1",
4
4
  "description": "Type definitions for Chipi SDK packages",
5
5
  "keywords": [
6
6
  "chipi",