@frontiertower/frontier-sdk 0.1.5 → 0.2.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/README.md CHANGED
@@ -49,6 +49,7 @@ Your app must declare required permissions in the Frontier app registry:
49
49
  - `wallet:transferERC20` - Transfer ERC20 tokens
50
50
  - `wallet:approveERC20` - Approve ERC20 token spending
51
51
  - `wallet:transferNative` - Transfer native currency (ETH)
52
+ - `wallet:transferFrontierDollar` - Transfer Frontier Dollars
52
53
  - `wallet:executeCall` - Execute arbitrary contract calls
53
54
 
54
55
  ### Storage Permissions
@@ -56,7 +57,6 @@ Your app must declare required permissions in the Frontier app registry:
56
57
  - `storage:set` - Write to storage
57
58
  - `storage:remove` - Remove from storage
58
59
  - `storage:clear` - Clear all storage
59
- - `storage:*` - Full storage access (wildcard for all storage methods)
60
60
 
61
61
  ### User Permissions
62
62
  - `user:getDetails` - Access current user details
package/dist/index.d.mts CHANGED
@@ -232,6 +232,28 @@ declare class WalletAccess {
232
232
  * ```
233
233
  */
234
234
  executeCall(call: ExecuteCall, overrides?: GasOverrides): Promise<UserOperationReceipt>;
235
+ /**
236
+ * Transfer Frontier Dollars to another address
237
+ *
238
+ * Sends Frontier Dollars (the native stablecoin) to a recipient address.
239
+ * Requires biometric authentication and sufficient balance.
240
+ *
241
+ * @param to - Recipient address
242
+ * @param amount - Amount to send (as string, e.g., '10.5' for 10.5 Frontier Dollars)
243
+ * @param overrides - Optional gas overrides
244
+ * @returns User operation receipt with transaction details
245
+ * @throws {Error} If insufficient balance or transaction fails
246
+ *
247
+ * @example
248
+ * ```typescript
249
+ * const receipt = await sdk.getWallet().transferFrontierDollar(
250
+ * '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
251
+ * '10.5' // 10.5 Frontier Dollars
252
+ * );
253
+ * console.log('Transaction:', receipt.transactionHash);
254
+ * ```
255
+ */
256
+ transferFrontierDollar(to: string, amount: string, overrides?: GasOverrides): Promise<UserOperationReceipt>;
235
257
  }
236
258
 
237
259
  /**
package/dist/index.d.ts CHANGED
@@ -232,6 +232,28 @@ declare class WalletAccess {
232
232
  * ```
233
233
  */
234
234
  executeCall(call: ExecuteCall, overrides?: GasOverrides): Promise<UserOperationReceipt>;
235
+ /**
236
+ * Transfer Frontier Dollars to another address
237
+ *
238
+ * Sends Frontier Dollars (the native stablecoin) to a recipient address.
239
+ * Requires biometric authentication and sufficient balance.
240
+ *
241
+ * @param to - Recipient address
242
+ * @param amount - Amount to send (as string, e.g., '10.5' for 10.5 Frontier Dollars)
243
+ * @param overrides - Optional gas overrides
244
+ * @returns User operation receipt with transaction details
245
+ * @throws {Error} If insufficient balance or transaction fails
246
+ *
247
+ * @example
248
+ * ```typescript
249
+ * const receipt = await sdk.getWallet().transferFrontierDollar(
250
+ * '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
251
+ * '10.5' // 10.5 Frontier Dollars
252
+ * );
253
+ * console.log('Transaction:', receipt.transactionHash);
254
+ * ```
255
+ */
256
+ transferFrontierDollar(to: string, amount: string, overrides?: GasOverrides): Promise<UserOperationReceipt>;
235
257
  }
236
258
 
237
259
  /**
package/dist/index.js CHANGED
@@ -231,6 +231,34 @@ var WalletAccess = class {
231
231
  overrides
232
232
  });
233
233
  }
234
+ /**
235
+ * Transfer Frontier Dollars to another address
236
+ *
237
+ * Sends Frontier Dollars (the native stablecoin) to a recipient address.
238
+ * Requires biometric authentication and sufficient balance.
239
+ *
240
+ * @param to - Recipient address
241
+ * @param amount - Amount to send (as string, e.g., '10.5' for 10.5 Frontier Dollars)
242
+ * @param overrides - Optional gas overrides
243
+ * @returns User operation receipt with transaction details
244
+ * @throws {Error} If insufficient balance or transaction fails
245
+ *
246
+ * @example
247
+ * ```typescript
248
+ * const receipt = await sdk.getWallet().transferFrontierDollar(
249
+ * '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
250
+ * '10.5' // 10.5 Frontier Dollars
251
+ * );
252
+ * console.log('Transaction:', receipt.transactionHash);
253
+ * ```
254
+ */
255
+ async transferFrontierDollar(to, amount, overrides) {
256
+ return this.sdk.request("wallet:transferFrontierDollar", {
257
+ to,
258
+ amount,
259
+ overrides
260
+ });
261
+ }
234
262
  };
235
263
 
236
264
  // src/access/storage.ts
package/dist/index.mjs CHANGED
@@ -201,6 +201,34 @@ var WalletAccess = class {
201
201
  overrides
202
202
  });
203
203
  }
204
+ /**
205
+ * Transfer Frontier Dollars to another address
206
+ *
207
+ * Sends Frontier Dollars (the native stablecoin) to a recipient address.
208
+ * Requires biometric authentication and sufficient balance.
209
+ *
210
+ * @param to - Recipient address
211
+ * @param amount - Amount to send (as string, e.g., '10.5' for 10.5 Frontier Dollars)
212
+ * @param overrides - Optional gas overrides
213
+ * @returns User operation receipt with transaction details
214
+ * @throws {Error} If insufficient balance or transaction fails
215
+ *
216
+ * @example
217
+ * ```typescript
218
+ * const receipt = await sdk.getWallet().transferFrontierDollar(
219
+ * '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
220
+ * '10.5' // 10.5 Frontier Dollars
221
+ * );
222
+ * console.log('Transaction:', receipt.transactionHash);
223
+ * ```
224
+ */
225
+ async transferFrontierDollar(to, amount, overrides) {
226
+ return this.sdk.request("wallet:transferFrontierDollar", {
227
+ to,
228
+ amount,
229
+ overrides
230
+ });
231
+ }
204
232
  };
205
233
 
206
234
  // src/access/storage.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontiertower/frontier-sdk",
3
- "version": "0.1.5",
3
+ "version": "0.2.1",
4
4
  "description": "SDK for building apps on Frontier Wallet",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",