@chipi-stack/backend 14.9.0 → 14.10.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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -202,7 +202,7 @@ declare class ChipiSessions {
|
|
|
202
202
|
* Set a spending policy for a session key + token pair.
|
|
203
203
|
*
|
|
204
204
|
* This executes a sponsored transaction (using owner signature) to call
|
|
205
|
-
* `set_spending_policy` on the CHIPI
|
|
205
|
+
* `set_spending_policy` on the wallet contract (CHIPI v29 or SHHH V8.4).
|
|
206
206
|
*
|
|
207
207
|
* The contract enforces these limits automatically during `__execute__()` on
|
|
208
208
|
* ERC-20 operations (transfer, approve, increase_allowance) made by the session.
|
|
@@ -254,7 +254,7 @@ declare class ChipiSessions {
|
|
|
254
254
|
* Remove a spending policy for a session key + token pair.
|
|
255
255
|
*
|
|
256
256
|
* This executes a sponsored transaction (using owner signature) to call
|
|
257
|
-
* `remove_spending_policy` on the CHIPI
|
|
257
|
+
* `remove_spending_policy` on the wallet contract (CHIPI v29 or SHHH V8.4).
|
|
258
258
|
*
|
|
259
259
|
* After removal, the session key has no spending limits for this token.
|
|
260
260
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ declare class ChipiSessions {
|
|
|
202
202
|
* Set a spending policy for a session key + token pair.
|
|
203
203
|
*
|
|
204
204
|
* This executes a sponsored transaction (using owner signature) to call
|
|
205
|
-
* `set_spending_policy` on the CHIPI
|
|
205
|
+
* `set_spending_policy` on the wallet contract (CHIPI v29 or SHHH V8.4).
|
|
206
206
|
*
|
|
207
207
|
* The contract enforces these limits automatically during `__execute__()` on
|
|
208
208
|
* ERC-20 operations (transfer, approve, increase_allowance) made by the session.
|
|
@@ -254,7 +254,7 @@ declare class ChipiSessions {
|
|
|
254
254
|
* Remove a spending policy for a session key + token pair.
|
|
255
255
|
*
|
|
256
256
|
* This executes a sponsored transaction (using owner signature) to call
|
|
257
|
-
* `remove_spending_policy` on the CHIPI
|
|
257
|
+
* `remove_spending_policy` on the wallet contract (CHIPI v29 or SHHH V8.4).
|
|
258
258
|
*
|
|
259
259
|
* After removal, the session key has no spending limits for this token.
|
|
260
260
|
*
|
package/dist/index.js
CHANGED
|
@@ -2547,7 +2547,7 @@ var ChipiSessions = class {
|
|
|
2547
2547
|
* Set a spending policy for a session key + token pair.
|
|
2548
2548
|
*
|
|
2549
2549
|
* This executes a sponsored transaction (using owner signature) to call
|
|
2550
|
-
* `set_spending_policy` on the CHIPI
|
|
2550
|
+
* `set_spending_policy` on the wallet contract (CHIPI v29 or SHHH V8.4).
|
|
2551
2551
|
*
|
|
2552
2552
|
* The contract enforces these limits automatically during `__execute__()` on
|
|
2553
2553
|
* ERC-20 operations (transfer, approve, increase_allowance) made by the session.
|
|
@@ -2575,9 +2575,9 @@ var ChipiSessions = class {
|
|
|
2575
2575
|
async setSpendingPolicy(params, bearerToken) {
|
|
2576
2576
|
const { encryptKey, wallet, spendingPolicyConfig } = params;
|
|
2577
2577
|
const { sessionPublicKey, token, maxPerCall, maxPerWindow, windowSeconds } = spendingPolicyConfig;
|
|
2578
|
-
if (wallet.walletType && wallet.walletType !== "CHIPI") {
|
|
2578
|
+
if (wallet.walletType && wallet.walletType !== "CHIPI" && wallet.walletType !== "SHHH") {
|
|
2579
2579
|
throw new shared.ChipiSessionError(
|
|
2580
|
-
`Spending policies
|
|
2580
|
+
`Spending policies require CHIPI or SHHH wallet type. Got: ${wallet.walletType}`,
|
|
2581
2581
|
shared.SESSION_ERRORS.INVALID_WALLET_TYPE_FOR_SESSION
|
|
2582
2582
|
);
|
|
2583
2583
|
}
|
|
@@ -2636,7 +2636,7 @@ var ChipiSessions = class {
|
|
|
2636
2636
|
const txHash = await executePaymasterTransaction({
|
|
2637
2637
|
params: {
|
|
2638
2638
|
encryptKey,
|
|
2639
|
-
wallet
|
|
2639
|
+
wallet,
|
|
2640
2640
|
calls: [
|
|
2641
2641
|
{
|
|
2642
2642
|
contractAddress: wallet.publicKey,
|
|
@@ -2772,7 +2772,7 @@ var ChipiSessions = class {
|
|
|
2772
2772
|
* Remove a spending policy for a session key + token pair.
|
|
2773
2773
|
*
|
|
2774
2774
|
* This executes a sponsored transaction (using owner signature) to call
|
|
2775
|
-
* `remove_spending_policy` on the CHIPI
|
|
2775
|
+
* `remove_spending_policy` on the wallet contract (CHIPI v29 or SHHH V8.4).
|
|
2776
2776
|
*
|
|
2777
2777
|
* After removal, the session key has no spending limits for this token.
|
|
2778
2778
|
*
|
|
@@ -2792,9 +2792,9 @@ var ChipiSessions = class {
|
|
|
2792
2792
|
*/
|
|
2793
2793
|
async removeSpendingPolicy(params, bearerToken) {
|
|
2794
2794
|
const { encryptKey, wallet, sessionPublicKey, token } = params;
|
|
2795
|
-
if (wallet.walletType && wallet.walletType !== "CHIPI") {
|
|
2795
|
+
if (wallet.walletType && wallet.walletType !== "CHIPI" && wallet.walletType !== "SHHH") {
|
|
2796
2796
|
throw new shared.ChipiSessionError(
|
|
2797
|
-
`Spending policies
|
|
2797
|
+
`Spending policies require CHIPI or SHHH wallet type. Got: ${wallet.walletType}`,
|
|
2798
2798
|
shared.SESSION_ERRORS.INVALID_WALLET_TYPE_FOR_SESSION
|
|
2799
2799
|
);
|
|
2800
2800
|
}
|
|
@@ -2814,7 +2814,7 @@ var ChipiSessions = class {
|
|
|
2814
2814
|
const txHash = await executePaymasterTransaction({
|
|
2815
2815
|
params: {
|
|
2816
2816
|
encryptKey,
|
|
2817
|
-
wallet
|
|
2817
|
+
wallet,
|
|
2818
2818
|
calls: [
|
|
2819
2819
|
{
|
|
2820
2820
|
contractAddress: wallet.publicKey,
|