@frontiertower/frontier-sdk 0.11.0 → 0.11.2
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 +39 -7
- package/dist/index.d.ts +39 -7
- package/dist/index.js +9 -3
- package/dist/index.mjs +8 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -70,7 +70,7 @@ interface GasOverrides {
|
|
|
70
70
|
*/
|
|
71
71
|
interface ExecuteCall {
|
|
72
72
|
/** Target contract address */
|
|
73
|
-
|
|
73
|
+
target: string;
|
|
74
74
|
/** Value to send (in wei) */
|
|
75
75
|
value?: bigint;
|
|
76
76
|
/** Calldata */
|
|
@@ -300,7 +300,7 @@ declare class WalletAccess {
|
|
|
300
300
|
* import { encodeFunctionData } from 'viem';
|
|
301
301
|
*
|
|
302
302
|
* const receipt = await sdk.getWallet().executeCall({
|
|
303
|
-
*
|
|
303
|
+
* target: '0xContractAddress',
|
|
304
304
|
* value: 0n,
|
|
305
305
|
* data: encodeFunctionData({
|
|
306
306
|
* abi: contractABI,
|
|
@@ -392,12 +392,12 @@ declare class WalletAccess {
|
|
|
392
392
|
*
|
|
393
393
|
* const receipt = await sdk.getWallet().executeBatchCall([
|
|
394
394
|
* {
|
|
395
|
-
*
|
|
395
|
+
* target: '0xToken1',
|
|
396
396
|
* value: 0n,
|
|
397
397
|
* data: encodeFunctionData({ abi: erc20Abi, functionName: 'approve', args: [...] })
|
|
398
398
|
* },
|
|
399
399
|
* {
|
|
400
|
-
*
|
|
400
|
+
* target: '0xProtocol',
|
|
401
401
|
* value: 0n,
|
|
402
402
|
* data: encodeFunctionData({ abi: protocolAbi, functionName: 'deposit', args: [...] })
|
|
403
403
|
* }
|
|
@@ -502,6 +502,32 @@ declare class StorageAccess {
|
|
|
502
502
|
clear(): Promise<void>;
|
|
503
503
|
}
|
|
504
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
|
+
}
|
|
505
531
|
/**
|
|
506
532
|
* Chain configuration information
|
|
507
533
|
*/
|
|
@@ -512,19 +538,25 @@ interface ChainConfig {
|
|
|
512
538
|
name: string;
|
|
513
539
|
/** Network identifier */
|
|
514
540
|
network: string;
|
|
541
|
+
/** Bridge swap router factory address */
|
|
542
|
+
bridgeSwapRouterFactoryAddress: string;
|
|
543
|
+
/** Uniswap V3 factory address */
|
|
544
|
+
uniswapV3FactoryAddress: string;
|
|
515
545
|
/** Native currency information */
|
|
516
546
|
nativeCurrency: {
|
|
517
547
|
name: string;
|
|
518
548
|
symbol: string;
|
|
519
549
|
decimals: number;
|
|
520
550
|
};
|
|
521
|
-
/** RPC URL */
|
|
522
|
-
rpcUrl: string;
|
|
523
551
|
/** Block explorer information */
|
|
524
552
|
blockExplorer: {
|
|
525
553
|
name: string;
|
|
526
554
|
url: string;
|
|
527
555
|
};
|
|
556
|
+
/** Supported stablecoins on this chain */
|
|
557
|
+
stableCoins: StableCoin[];
|
|
558
|
+
/** Supported tokens on this chain */
|
|
559
|
+
supportedTokens: Token[];
|
|
528
560
|
/** Whether this is a testnet */
|
|
529
561
|
testnet: boolean;
|
|
530
562
|
}
|
|
@@ -1566,4 +1598,4 @@ interface SDKResponse {
|
|
|
1566
1598
|
error?: string;
|
|
1567
1599
|
}
|
|
1568
1600
|
|
|
1569
|
-
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
|
@@ -70,7 +70,7 @@ interface GasOverrides {
|
|
|
70
70
|
*/
|
|
71
71
|
interface ExecuteCall {
|
|
72
72
|
/** Target contract address */
|
|
73
|
-
|
|
73
|
+
target: string;
|
|
74
74
|
/** Value to send (in wei) */
|
|
75
75
|
value?: bigint;
|
|
76
76
|
/** Calldata */
|
|
@@ -300,7 +300,7 @@ declare class WalletAccess {
|
|
|
300
300
|
* import { encodeFunctionData } from 'viem';
|
|
301
301
|
*
|
|
302
302
|
* const receipt = await sdk.getWallet().executeCall({
|
|
303
|
-
*
|
|
303
|
+
* target: '0xContractAddress',
|
|
304
304
|
* value: 0n,
|
|
305
305
|
* data: encodeFunctionData({
|
|
306
306
|
* abi: contractABI,
|
|
@@ -392,12 +392,12 @@ declare class WalletAccess {
|
|
|
392
392
|
*
|
|
393
393
|
* const receipt = await sdk.getWallet().executeBatchCall([
|
|
394
394
|
* {
|
|
395
|
-
*
|
|
395
|
+
* target: '0xToken1',
|
|
396
396
|
* value: 0n,
|
|
397
397
|
* data: encodeFunctionData({ abi: erc20Abi, functionName: 'approve', args: [...] })
|
|
398
398
|
* },
|
|
399
399
|
* {
|
|
400
|
-
*
|
|
400
|
+
* target: '0xProtocol',
|
|
401
401
|
* value: 0n,
|
|
402
402
|
* data: encodeFunctionData({ abi: protocolAbi, functionName: 'deposit', args: [...] })
|
|
403
403
|
* }
|
|
@@ -502,6 +502,32 @@ declare class StorageAccess {
|
|
|
502
502
|
clear(): Promise<void>;
|
|
503
503
|
}
|
|
504
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
|
+
}
|
|
505
531
|
/**
|
|
506
532
|
* Chain configuration information
|
|
507
533
|
*/
|
|
@@ -512,19 +538,25 @@ interface ChainConfig {
|
|
|
512
538
|
name: string;
|
|
513
539
|
/** Network identifier */
|
|
514
540
|
network: string;
|
|
541
|
+
/** Bridge swap router factory address */
|
|
542
|
+
bridgeSwapRouterFactoryAddress: string;
|
|
543
|
+
/** Uniswap V3 factory address */
|
|
544
|
+
uniswapV3FactoryAddress: string;
|
|
515
545
|
/** Native currency information */
|
|
516
546
|
nativeCurrency: {
|
|
517
547
|
name: string;
|
|
518
548
|
symbol: string;
|
|
519
549
|
decimals: number;
|
|
520
550
|
};
|
|
521
|
-
/** RPC URL */
|
|
522
|
-
rpcUrl: string;
|
|
523
551
|
/** Block explorer information */
|
|
524
552
|
blockExplorer: {
|
|
525
553
|
name: string;
|
|
526
554
|
url: string;
|
|
527
555
|
};
|
|
556
|
+
/** Supported stablecoins on this chain */
|
|
557
|
+
stableCoins: StableCoin[];
|
|
558
|
+
/** Supported tokens on this chain */
|
|
559
|
+
supportedTokens: Token[];
|
|
528
560
|
/** Whether this is a testnet */
|
|
529
561
|
testnet: boolean;
|
|
530
562
|
}
|
|
@@ -1566,4 +1598,4 @@ interface SDKResponse {
|
|
|
1566
1598
|
error?: string;
|
|
1567
1599
|
}
|
|
1568
1600
|
|
|
1569
|
-
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,
|
|
@@ -228,7 +229,7 @@ var WalletAccess = class {
|
|
|
228
229
|
* import { encodeFunctionData } from 'viem';
|
|
229
230
|
*
|
|
230
231
|
* const receipt = await sdk.getWallet().executeCall({
|
|
231
|
-
*
|
|
232
|
+
* target: '0xContractAddress',
|
|
232
233
|
* value: 0n,
|
|
233
234
|
* data: encodeFunctionData({
|
|
234
235
|
* abi: contractABI,
|
|
@@ -343,12 +344,12 @@ var WalletAccess = class {
|
|
|
343
344
|
*
|
|
344
345
|
* const receipt = await sdk.getWallet().executeBatchCall([
|
|
345
346
|
* {
|
|
346
|
-
*
|
|
347
|
+
* target: '0xToken1',
|
|
347
348
|
* value: 0n,
|
|
348
349
|
* data: encodeFunctionData({ abi: erc20Abi, functionName: 'approve', args: [...] })
|
|
349
350
|
* },
|
|
350
351
|
* {
|
|
351
|
-
*
|
|
352
|
+
* target: '0xProtocol',
|
|
352
353
|
* value: 0n,
|
|
353
354
|
* data: encodeFunctionData({ abi: protocolAbi, functionName: 'deposit', args: [...] })
|
|
354
355
|
* }
|
|
@@ -484,6 +485,10 @@ var StorageAccess = class {
|
|
|
484
485
|
};
|
|
485
486
|
|
|
486
487
|
// src/access/chain.ts
|
|
488
|
+
var Underlying = /* @__PURE__ */ ((Underlying2) => {
|
|
489
|
+
Underlying2["USD"] = "USD";
|
|
490
|
+
return Underlying2;
|
|
491
|
+
})(Underlying || {});
|
|
487
492
|
var ChainAccess = class {
|
|
488
493
|
constructor(sdk) {
|
|
489
494
|
this.sdk = sdk;
|
|
@@ -1369,6 +1374,7 @@ function createStandaloneHTML(appName = "Frontier App") {
|
|
|
1369
1374
|
StorageAccess,
|
|
1370
1375
|
SwapResultStatus,
|
|
1371
1376
|
ThirdPartyAccess,
|
|
1377
|
+
Underlying,
|
|
1372
1378
|
UserAccess,
|
|
1373
1379
|
WalletAccess,
|
|
1374
1380
|
createStandaloneHTML,
|
package/dist/index.mjs
CHANGED
|
@@ -198,7 +198,7 @@ var WalletAccess = class {
|
|
|
198
198
|
* import { encodeFunctionData } from 'viem';
|
|
199
199
|
*
|
|
200
200
|
* const receipt = await sdk.getWallet().executeCall({
|
|
201
|
-
*
|
|
201
|
+
* target: '0xContractAddress',
|
|
202
202
|
* value: 0n,
|
|
203
203
|
* data: encodeFunctionData({
|
|
204
204
|
* abi: contractABI,
|
|
@@ -313,12 +313,12 @@ var WalletAccess = class {
|
|
|
313
313
|
*
|
|
314
314
|
* const receipt = await sdk.getWallet().executeBatchCall([
|
|
315
315
|
* {
|
|
316
|
-
*
|
|
316
|
+
* target: '0xToken1',
|
|
317
317
|
* value: 0n,
|
|
318
318
|
* data: encodeFunctionData({ abi: erc20Abi, functionName: 'approve', args: [...] })
|
|
319
319
|
* },
|
|
320
320
|
* {
|
|
321
|
-
*
|
|
321
|
+
* target: '0xProtocol',
|
|
322
322
|
* value: 0n,
|
|
323
323
|
* data: encodeFunctionData({ abi: protocolAbi, functionName: 'deposit', args: [...] })
|
|
324
324
|
* }
|
|
@@ -454,6 +454,10 @@ var StorageAccess = class {
|
|
|
454
454
|
};
|
|
455
455
|
|
|
456
456
|
// src/access/chain.ts
|
|
457
|
+
var Underlying = /* @__PURE__ */ ((Underlying2) => {
|
|
458
|
+
Underlying2["USD"] = "USD";
|
|
459
|
+
return Underlying2;
|
|
460
|
+
})(Underlying || {});
|
|
457
461
|
var ChainAccess = class {
|
|
458
462
|
constructor(sdk) {
|
|
459
463
|
this.sdk = sdk;
|
|
@@ -1129,6 +1133,7 @@ export {
|
|
|
1129
1133
|
StorageAccess,
|
|
1130
1134
|
SwapResultStatus,
|
|
1131
1135
|
ThirdPartyAccess,
|
|
1136
|
+
Underlying,
|
|
1132
1137
|
UserAccess,
|
|
1133
1138
|
WalletAccess,
|
|
1134
1139
|
createStandaloneHTML,
|