@frontiertower/frontier-sdk 0.10.0 → 0.11.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
@@ -58,6 +58,7 @@ Your app must declare required permissions in the Frontier app registry:
58
58
  - `wallet:transferNative` - Transfer native currency (ETH)
59
59
  - `wallet:transferFrontierDollar` - Transfer Frontier Dollars
60
60
  - `wallet:transferInternalFrontierDollar` - Transfer Internal Frontier Dollars
61
+ - `wallet:transferOverallFrontierDollar` - Transfer Frontier Dollars with iFTD preferred
61
62
  - `wallet:executeCall` - Execute arbitrary contract calls
62
63
  - `wallet:executeBatchCall` - Execute multiple contract calls atomically
63
64
  - `wallet:getSupportedTokens` - Get list of supported tokens for swaps
package/dist/index.d.mts CHANGED
@@ -354,6 +354,27 @@ declare class WalletAccess {
354
354
  * ```
355
355
  */
356
356
  transferInternalFrontierDollar(to: string, amount: string, overrides?: GasOverrides): Promise<UserOperationReceipt>;
357
+ /**
358
+ * Transfer Frontier Dollars with Internal Frontier Dollars (iFTD) preferred
359
+ *
360
+ * This method will use Internal Frontier Dollars first, and if insufficient,
361
+ * it will use regular Frontier Dollars to complete the transfer.
362
+ *
363
+ * @param to - Recipient address
364
+ * @param amount - Amount to send (as string, e.g., '10.5')
365
+ * @param overrides - Optional gas overrides
366
+ * @returns User operation receipt with transaction details
367
+ * @throws {Error} If insufficient total balance or transaction fails
368
+ *
369
+ * @example
370
+ * ```typescript
371
+ * const receipt = await sdk.getWallet().transferOverallFrontierDollar(
372
+ * '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
373
+ * '10.5'
374
+ * );
375
+ * ```
376
+ */
377
+ transferOverallFrontierDollar(to: string, amount: string, overrides?: GasOverrides): Promise<UserOperationReceipt>;
357
378
  /**
358
379
  * Execute multiple calls atomically with a single signature
359
380
  *
@@ -481,6 +502,32 @@ declare class StorageAccess {
481
502
  clear(): Promise<void>;
482
503
  }
483
504
 
505
+ /**
506
+ * Underlying currency type for stablecoins
507
+ */
508
+ declare enum Underlying {
509
+ USD = "USD"
510
+ }
511
+ /**
512
+ * Token information
513
+ */
514
+ interface Token {
515
+ /** Token name */
516
+ name: string;
517
+ /** Token symbol */
518
+ symbol: string;
519
+ /** Token decimals */
520
+ decimals: number;
521
+ /** Token contract address */
522
+ address: string;
523
+ }
524
+ /**
525
+ * Stablecoin information extending Token
526
+ */
527
+ interface StableCoin extends Token {
528
+ /** Underlying currency type */
529
+ underlying: Underlying;
530
+ }
484
531
  /**
485
532
  * Chain configuration information
486
533
  */
@@ -491,19 +538,25 @@ interface ChainConfig {
491
538
  name: string;
492
539
  /** Network identifier */
493
540
  network: string;
541
+ /** Bridge swap router factory address */
542
+ bridgeSwapRouterFactoryAddress: string;
543
+ /** Uniswap V3 factory address */
544
+ uniswapV3FactoryAddress: string;
494
545
  /** Native currency information */
495
546
  nativeCurrency: {
496
547
  name: string;
497
548
  symbol: string;
498
549
  decimals: number;
499
550
  };
500
- /** RPC URL */
501
- rpcUrl: string;
502
551
  /** Block explorer information */
503
552
  blockExplorer: {
504
553
  name: string;
505
554
  url: string;
506
555
  };
556
+ /** Supported stablecoins on this chain */
557
+ stableCoins: StableCoin[];
558
+ /** Supported tokens on this chain */
559
+ supportedTokens: Token[];
507
560
  /** Whether this is a testnet */
508
561
  testnet: boolean;
509
562
  }
@@ -1545,4 +1598,4 @@ interface SDKResponse {
1545
1598
  error?: string;
1546
1599
  }
1547
1600
 
1548
- export { type App, type AppPermission, type AppStatus, ChainAccess, type ChainConfig, type CreateAppRequest, type CreateSponsorPassRequest, type CreateWebhookRequest, type Developer, type ExecuteCall, FrontierSDK, type GasOverrides, type ListParams, type ListSponsorsParams, type PaginatedResponse, PartnershipsAccess, type ReferralDetails, type ReferralOverview, type RotateKeyResponse, type RotateWebhookKeyResponse, type SDKRequest, type SDKResponse, type SmartAccount, type Sponsor, type SponsorPass, StorageAccess, type SwapParams, type SwapQuote, type SwapResult, SwapResultStatus, ThirdPartyAccess, type UpdateAppRequest, type UpdateDeveloperRequest, type UpdateWebhookRequest, type User, UserAccess, type UserContact, type UserContactPayload, type UserOperationReceipt, type UserProfile, WalletAccess, type WalletBalance, type WalletBalanceFormatted, type Webhook, type WebhookConfig, type WebhookEvent, type WebhookScope, type WebhookStatus };
1601
+ export { type App, type AppPermission, type AppStatus, ChainAccess, type ChainConfig, type CreateAppRequest, type CreateSponsorPassRequest, type CreateWebhookRequest, type Developer, type ExecuteCall, FrontierSDK, type GasOverrides, type ListParams, type ListSponsorsParams, type PaginatedResponse, PartnershipsAccess, type ReferralDetails, type ReferralOverview, type RotateKeyResponse, type RotateWebhookKeyResponse, type SDKRequest, type SDKResponse, type SmartAccount, type Sponsor, type SponsorPass, type StableCoin, StorageAccess, type SwapParams, type SwapQuote, type SwapResult, SwapResultStatus, ThirdPartyAccess, type Token, Underlying, type UpdateAppRequest, type UpdateDeveloperRequest, type UpdateWebhookRequest, type User, UserAccess, type UserContact, type UserContactPayload, type UserOperationReceipt, type UserProfile, WalletAccess, type WalletBalance, type WalletBalanceFormatted, type Webhook, type WebhookConfig, type WebhookEvent, type WebhookScope, type WebhookStatus };
package/dist/index.d.ts CHANGED
@@ -354,6 +354,27 @@ declare class WalletAccess {
354
354
  * ```
355
355
  */
356
356
  transferInternalFrontierDollar(to: string, amount: string, overrides?: GasOverrides): Promise<UserOperationReceipt>;
357
+ /**
358
+ * Transfer Frontier Dollars with Internal Frontier Dollars (iFTD) preferred
359
+ *
360
+ * This method will use Internal Frontier Dollars first, and if insufficient,
361
+ * it will use regular Frontier Dollars to complete the transfer.
362
+ *
363
+ * @param to - Recipient address
364
+ * @param amount - Amount to send (as string, e.g., '10.5')
365
+ * @param overrides - Optional gas overrides
366
+ * @returns User operation receipt with transaction details
367
+ * @throws {Error} If insufficient total balance or transaction fails
368
+ *
369
+ * @example
370
+ * ```typescript
371
+ * const receipt = await sdk.getWallet().transferOverallFrontierDollar(
372
+ * '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
373
+ * '10.5'
374
+ * );
375
+ * ```
376
+ */
377
+ transferOverallFrontierDollar(to: string, amount: string, overrides?: GasOverrides): Promise<UserOperationReceipt>;
357
378
  /**
358
379
  * Execute multiple calls atomically with a single signature
359
380
  *
@@ -481,6 +502,32 @@ declare class StorageAccess {
481
502
  clear(): Promise<void>;
482
503
  }
483
504
 
505
+ /**
506
+ * Underlying currency type for stablecoins
507
+ */
508
+ declare enum Underlying {
509
+ USD = "USD"
510
+ }
511
+ /**
512
+ * Token information
513
+ */
514
+ interface Token {
515
+ /** Token name */
516
+ name: string;
517
+ /** Token symbol */
518
+ symbol: string;
519
+ /** Token decimals */
520
+ decimals: number;
521
+ /** Token contract address */
522
+ address: string;
523
+ }
524
+ /**
525
+ * Stablecoin information extending Token
526
+ */
527
+ interface StableCoin extends Token {
528
+ /** Underlying currency type */
529
+ underlying: Underlying;
530
+ }
484
531
  /**
485
532
  * Chain configuration information
486
533
  */
@@ -491,19 +538,25 @@ interface ChainConfig {
491
538
  name: string;
492
539
  /** Network identifier */
493
540
  network: string;
541
+ /** Bridge swap router factory address */
542
+ bridgeSwapRouterFactoryAddress: string;
543
+ /** Uniswap V3 factory address */
544
+ uniswapV3FactoryAddress: string;
494
545
  /** Native currency information */
495
546
  nativeCurrency: {
496
547
  name: string;
497
548
  symbol: string;
498
549
  decimals: number;
499
550
  };
500
- /** RPC URL */
501
- rpcUrl: string;
502
551
  /** Block explorer information */
503
552
  blockExplorer: {
504
553
  name: string;
505
554
  url: string;
506
555
  };
556
+ /** Supported stablecoins on this chain */
557
+ stableCoins: StableCoin[];
558
+ /** Supported tokens on this chain */
559
+ supportedTokens: Token[];
507
560
  /** Whether this is a testnet */
508
561
  testnet: boolean;
509
562
  }
@@ -1545,4 +1598,4 @@ interface SDKResponse {
1545
1598
  error?: string;
1546
1599
  }
1547
1600
 
1548
- export { type App, type AppPermission, type AppStatus, ChainAccess, type ChainConfig, type CreateAppRequest, type CreateSponsorPassRequest, type CreateWebhookRequest, type Developer, type ExecuteCall, FrontierSDK, type GasOverrides, type ListParams, type ListSponsorsParams, type PaginatedResponse, PartnershipsAccess, type ReferralDetails, type ReferralOverview, type RotateKeyResponse, type RotateWebhookKeyResponse, type SDKRequest, type SDKResponse, type SmartAccount, type Sponsor, type SponsorPass, StorageAccess, type SwapParams, type SwapQuote, type SwapResult, SwapResultStatus, ThirdPartyAccess, type UpdateAppRequest, type UpdateDeveloperRequest, type UpdateWebhookRequest, type User, UserAccess, type UserContact, type UserContactPayload, type UserOperationReceipt, type UserProfile, WalletAccess, type WalletBalance, type WalletBalanceFormatted, type Webhook, type WebhookConfig, type WebhookEvent, type WebhookScope, type WebhookStatus };
1601
+ export { type App, type AppPermission, type AppStatus, ChainAccess, type ChainConfig, type CreateAppRequest, type CreateSponsorPassRequest, type CreateWebhookRequest, type Developer, type ExecuteCall, FrontierSDK, type GasOverrides, type ListParams, type ListSponsorsParams, type PaginatedResponse, PartnershipsAccess, type ReferralDetails, type ReferralOverview, type RotateKeyResponse, type RotateWebhookKeyResponse, type SDKRequest, type SDKResponse, type SmartAccount, type Sponsor, type SponsorPass, type StableCoin, StorageAccess, type SwapParams, type SwapQuote, type SwapResult, SwapResultStatus, ThirdPartyAccess, type Token, Underlying, type UpdateAppRequest, type UpdateDeveloperRequest, type UpdateWebhookRequest, type User, UserAccess, type UserContact, type UserContactPayload, type UserOperationReceipt, type UserProfile, WalletAccess, type WalletBalance, type WalletBalanceFormatted, type Webhook, type WebhookConfig, type WebhookEvent, type WebhookScope, type WebhookStatus };
package/dist/index.js CHANGED
@@ -26,6 +26,7 @@ __export(index_exports, {
26
26
  StorageAccess: () => StorageAccess,
27
27
  SwapResultStatus: () => SwapResultStatus,
28
28
  ThirdPartyAccess: () => ThirdPartyAccess,
29
+ Underlying: () => Underlying,
29
30
  UserAccess: () => UserAccess,
30
31
  WalletAccess: () => WalletAccess,
31
32
  createStandaloneHTML: () => createStandaloneHTML,
@@ -299,6 +300,33 @@ var WalletAccess = class {
299
300
  overrides
300
301
  });
301
302
  }
303
+ /**
304
+ * Transfer Frontier Dollars with Internal Frontier Dollars (iFTD) preferred
305
+ *
306
+ * This method will use Internal Frontier Dollars first, and if insufficient,
307
+ * it will use regular Frontier Dollars to complete the transfer.
308
+ *
309
+ * @param to - Recipient address
310
+ * @param amount - Amount to send (as string, e.g., '10.5')
311
+ * @param overrides - Optional gas overrides
312
+ * @returns User operation receipt with transaction details
313
+ * @throws {Error} If insufficient total balance or transaction fails
314
+ *
315
+ * @example
316
+ * ```typescript
317
+ * const receipt = await sdk.getWallet().transferOverallFrontierDollar(
318
+ * '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
319
+ * '10.5'
320
+ * );
321
+ * ```
322
+ */
323
+ async transferOverallFrontierDollar(to, amount, overrides) {
324
+ return this.sdk.request("wallet:transferOverallFrontierDollar", {
325
+ to,
326
+ amount,
327
+ overrides
328
+ });
329
+ }
302
330
  /**
303
331
  * Execute multiple calls atomically with a single signature
304
332
  *
@@ -457,6 +485,10 @@ var StorageAccess = class {
457
485
  };
458
486
 
459
487
  // src/access/chain.ts
488
+ var Underlying = /* @__PURE__ */ ((Underlying2) => {
489
+ Underlying2["USD"] = "USD";
490
+ return Underlying2;
491
+ })(Underlying || {});
460
492
  var ChainAccess = class {
461
493
  constructor(sdk) {
462
494
  this.sdk = sdk;
@@ -1342,6 +1374,7 @@ function createStandaloneHTML(appName = "Frontier App") {
1342
1374
  StorageAccess,
1343
1375
  SwapResultStatus,
1344
1376
  ThirdPartyAccess,
1377
+ Underlying,
1345
1378
  UserAccess,
1346
1379
  WalletAccess,
1347
1380
  createStandaloneHTML,
package/dist/index.mjs CHANGED
@@ -269,6 +269,33 @@ var WalletAccess = class {
269
269
  overrides
270
270
  });
271
271
  }
272
+ /**
273
+ * Transfer Frontier Dollars with Internal Frontier Dollars (iFTD) preferred
274
+ *
275
+ * This method will use Internal Frontier Dollars first, and if insufficient,
276
+ * it will use regular Frontier Dollars to complete the transfer.
277
+ *
278
+ * @param to - Recipient address
279
+ * @param amount - Amount to send (as string, e.g., '10.5')
280
+ * @param overrides - Optional gas overrides
281
+ * @returns User operation receipt with transaction details
282
+ * @throws {Error} If insufficient total balance or transaction fails
283
+ *
284
+ * @example
285
+ * ```typescript
286
+ * const receipt = await sdk.getWallet().transferOverallFrontierDollar(
287
+ * '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
288
+ * '10.5'
289
+ * );
290
+ * ```
291
+ */
292
+ async transferOverallFrontierDollar(to, amount, overrides) {
293
+ return this.sdk.request("wallet:transferOverallFrontierDollar", {
294
+ to,
295
+ amount,
296
+ overrides
297
+ });
298
+ }
272
299
  /**
273
300
  * Execute multiple calls atomically with a single signature
274
301
  *
@@ -427,6 +454,10 @@ var StorageAccess = class {
427
454
  };
428
455
 
429
456
  // src/access/chain.ts
457
+ var Underlying = /* @__PURE__ */ ((Underlying2) => {
458
+ Underlying2["USD"] = "USD";
459
+ return Underlying2;
460
+ })(Underlying || {});
430
461
  var ChainAccess = class {
431
462
  constructor(sdk) {
432
463
  this.sdk = sdk;
@@ -1102,6 +1133,7 @@ export {
1102
1133
  StorageAccess,
1103
1134
  SwapResultStatus,
1104
1135
  ThirdPartyAccess,
1136
+ Underlying,
1105
1137
  UserAccess,
1106
1138
  WalletAccess,
1107
1139
  createStandaloneHTML,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontiertower/frontier-sdk",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "SDK for building apps on Frontier Wallet",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",