@atxp/base 0.10.4 → 0.10.5

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.ts CHANGED
@@ -127,6 +127,11 @@ declare class BaseAppAccount implements Account$1 {
127
127
  * Throws error if used in server-side environment.
128
128
  */
129
129
  static clearAllCachedData(userWalletAddress: string, cache?: ICache<string>): void;
130
+ /**
131
+ * Create a spend permission for the given resource URL.
132
+ * BaseAppAccount doesn't support spend permissions, so this returns null.
133
+ */
134
+ createSpendPermission(_resourceUrl: string): Promise<string | null>;
130
135
  }
131
136
 
132
137
  declare class BaseAppPaymentMaker implements PaymentMaker {
@@ -169,6 +174,11 @@ declare class BaseAccount implements Account$2 {
169
174
  * Get sources for this account
170
175
  */
171
176
  getSources(): Promise<Source[]>;
177
+ /**
178
+ * Create a spend permission for the given resource URL.
179
+ * Base accounts don't support spend permissions, so this returns null.
180
+ */
181
+ createSpendPermission(_resourceUrl: string): Promise<string | null>;
172
182
  }
173
183
 
174
184
  type ExtendedWalletClient = WalletClient & PublicActions;
package/dist/index.js CHANGED
@@ -5496,6 +5496,13 @@ class BaseAppAccount {
5496
5496
  }
5497
5497
  cache.delete(this.toCacheKey(userWalletAddress));
5498
5498
  }
5499
+ /**
5500
+ * Create a spend permission for the given resource URL.
5501
+ * BaseAppAccount doesn't support spend permissions, so this returns null.
5502
+ */
5503
+ async createSpendPermission(_resourceUrl) {
5504
+ return null;
5505
+ }
5499
5506
  }
5500
5507
 
5501
5508
  // Helper function to convert to base64url that works in both Node.js and browsers
@@ -5728,6 +5735,13 @@ class BaseAccount {
5728
5735
  walletType: 'eoa'
5729
5736
  }];
5730
5737
  }
5738
+ /**
5739
+ * Create a spend permission for the given resource URL.
5740
+ * Base accounts don't support spend permissions, so this returns null.
5741
+ */
5742
+ async createSpendPermission(_resourceUrl) {
5743
+ return null;
5744
+ }
5731
5745
  }
5732
5746
 
5733
5747
  export { BaseAccount, BaseAppAccount, BaseAppPaymentMaker, BasePaymentMaker, MainWalletPaymentMaker, IntermediaryCache as PermissionCache, USDC_CONTRACT_ADDRESS_BASE, USDC_CONTRACT_ADDRESS_BASE_SEPOLIA, getBaseUSDCAddress };