@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.mjs
CHANGED
|
@@ -282,6 +282,7 @@ var ChipiWallets = class {
|
|
|
282
282
|
calldata: constructorCallData.map((value) => num.toHex(value))
|
|
283
283
|
};
|
|
284
284
|
const encryptedPrivateKey = encryptPrivateKey(privateKeyAX, encryptKey);
|
|
285
|
+
const encryptedPrivateKeyBackup = params.encryptKeyBackup ? encryptPrivateKey(privateKeyAX, params.encryptKeyBackup) : void 0;
|
|
285
286
|
const executeTransactionResponse = await this.client.post({
|
|
286
287
|
endpoint: `${API_ENDPOINTS.CHIPI_WALLETS}`,
|
|
287
288
|
bearerToken,
|
|
@@ -298,6 +299,11 @@ var ChipiWallets = class {
|
|
|
298
299
|
},
|
|
299
300
|
typedData: typedData2,
|
|
300
301
|
encryptedPrivateKey,
|
|
302
|
+
...encryptedPrivateKeyBackup && { encryptedPrivateKeyBackup },
|
|
303
|
+
...params.authMethod && { authMethod: params.authMethod },
|
|
304
|
+
...params.credentialId && { credentialId: params.credentialId },
|
|
305
|
+
...params.prfSupported != null && { prfSupported: params.prfSupported },
|
|
306
|
+
...params.deviceType && { deviceType: params.deviceType },
|
|
301
307
|
deploymentData: {
|
|
302
308
|
...deploymentData,
|
|
303
309
|
salt: `${deploymentData.salt}`,
|
|
@@ -369,6 +375,17 @@ var ChipiWallets = class {
|
|
|
369
375
|
throw err;
|
|
370
376
|
}
|
|
371
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* Recover passkey credential metadata for a wallet.
|
|
380
|
+
* Used when localStorage is cleared — SDK recovers credentialId from backend.
|
|
381
|
+
*/
|
|
382
|
+
async getCredentialRecovery(params, bearerToken) {
|
|
383
|
+
return this.client.get({
|
|
384
|
+
endpoint: `${API_ENDPOINTS.CHIPI_WALLETS}/credential-recovery`,
|
|
385
|
+
params: { externalUserId: params.externalUserId },
|
|
386
|
+
bearerToken
|
|
387
|
+
});
|
|
388
|
+
}
|
|
372
389
|
async updateWalletEncryption(params, bearerToken) {
|
|
373
390
|
const body = {
|
|
374
391
|
externalUserId: params.externalUserId,
|
|
@@ -884,6 +901,18 @@ var ChipiTransactions = class {
|
|
|
884
901
|
bearerToken
|
|
885
902
|
});
|
|
886
903
|
}
|
|
904
|
+
/**
|
|
905
|
+
* Sync on-chain transfers from Voyager into the DB (read-through cache).
|
|
906
|
+
* Discovers transactions not made through the SDK (e.g., external USDC receives).
|
|
907
|
+
* After sync, getTransactionList returns the newly discovered transactions.
|
|
908
|
+
*/
|
|
909
|
+
async syncOnChainTransfers(params, bearerToken) {
|
|
910
|
+
return this.client.post({
|
|
911
|
+
endpoint: `${API_ENDPOINTS.TRANSACTIONS}/sync-on-chain`,
|
|
912
|
+
bearerToken,
|
|
913
|
+
body: params
|
|
914
|
+
});
|
|
915
|
+
}
|
|
887
916
|
};
|
|
888
917
|
var ChipiExchanges = class {
|
|
889
918
|
constructor(client) {
|