@chipi-stack/backend 14.2.1 → 14.3.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.
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -0
- package/dist/index.mjs.map +1 -1
- package/dist/skuPurchases.js +12 -0
- package/dist/skuPurchases.js.map +1 -1
- package/dist/skuPurchases.mjs +12 -0
- package/dist/skuPurchases.mjs.map +1 -1
- package/dist/transactions.d.mts +7 -1
- package/dist/transactions.d.ts +7 -1
- package/dist/transactions.js +12 -0
- package/dist/transactions.js.map +1 -1
- package/dist/transactions.mjs +12 -0
- package/dist/transactions.mjs.map +1 -1
- package/dist/wallets.d.mts +12 -0
- package/dist/wallets.d.ts +12 -0
- package/dist/wallets.js +17 -0
- package/dist/wallets.js.map +1 -1
- package/dist/wallets.mjs +17 -0
- package/dist/wallets.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -287,6 +287,7 @@ var ChipiWallets = class {
|
|
|
287
287
|
calldata: constructorCallData.map((value) => starknet.num.toHex(value))
|
|
288
288
|
};
|
|
289
289
|
const encryptedPrivateKey = encryptPrivateKey(privateKeyAX, encryptKey);
|
|
290
|
+
const encryptedPrivateKeyBackup = params.encryptKeyBackup ? encryptPrivateKey(privateKeyAX, params.encryptKeyBackup) : void 0;
|
|
290
291
|
const executeTransactionResponse = await this.client.post({
|
|
291
292
|
endpoint: `${shared.API_ENDPOINTS.CHIPI_WALLETS}`,
|
|
292
293
|
bearerToken,
|
|
@@ -303,6 +304,11 @@ var ChipiWallets = class {
|
|
|
303
304
|
},
|
|
304
305
|
typedData: typedData2,
|
|
305
306
|
encryptedPrivateKey,
|
|
307
|
+
...encryptedPrivateKeyBackup && { encryptedPrivateKeyBackup },
|
|
308
|
+
...params.authMethod && { authMethod: params.authMethod },
|
|
309
|
+
...params.credentialId && { credentialId: params.credentialId },
|
|
310
|
+
...params.prfSupported != null && { prfSupported: params.prfSupported },
|
|
311
|
+
...params.deviceType && { deviceType: params.deviceType },
|
|
306
312
|
deploymentData: {
|
|
307
313
|
...deploymentData,
|
|
308
314
|
salt: `${deploymentData.salt}`,
|
|
@@ -374,6 +380,17 @@ var ChipiWallets = class {
|
|
|
374
380
|
throw err;
|
|
375
381
|
}
|
|
376
382
|
}
|
|
383
|
+
/**
|
|
384
|
+
* Recover passkey credential metadata for a wallet.
|
|
385
|
+
* Used when localStorage is cleared — SDK recovers credentialId from backend.
|
|
386
|
+
*/
|
|
387
|
+
async getCredentialRecovery(params, bearerToken) {
|
|
388
|
+
return this.client.get({
|
|
389
|
+
endpoint: `${shared.API_ENDPOINTS.CHIPI_WALLETS}/credential-recovery`,
|
|
390
|
+
params: { externalUserId: params.externalUserId },
|
|
391
|
+
bearerToken
|
|
392
|
+
});
|
|
393
|
+
}
|
|
377
394
|
async updateWalletEncryption(params, bearerToken) {
|
|
378
395
|
const body = {
|
|
379
396
|
externalUserId: params.externalUserId,
|
|
@@ -889,6 +906,18 @@ var ChipiTransactions = class {
|
|
|
889
906
|
bearerToken
|
|
890
907
|
});
|
|
891
908
|
}
|
|
909
|
+
/**
|
|
910
|
+
* Sync on-chain transfers from Voyager into the DB (read-through cache).
|
|
911
|
+
* Discovers transactions not made through the SDK (e.g., external USDC receives).
|
|
912
|
+
* After sync, getTransactionList returns the newly discovered transactions.
|
|
913
|
+
*/
|
|
914
|
+
async syncOnChainTransfers(params, bearerToken) {
|
|
915
|
+
return this.client.post({
|
|
916
|
+
endpoint: `${shared.API_ENDPOINTS.TRANSACTIONS}/sync-on-chain`,
|
|
917
|
+
bearerToken,
|
|
918
|
+
body: params
|
|
919
|
+
});
|
|
920
|
+
}
|
|
892
921
|
};
|
|
893
922
|
var ChipiExchanges = class {
|
|
894
923
|
constructor(client) {
|