@frontiertower/frontier-sdk 0.11.2 → 0.13.0

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
@@ -23,12 +23,12 @@ interface SmartAccount {
23
23
  * Wallet balance breakdown
24
24
  */
25
25
  interface WalletBalance {
26
- /** Total balance including both native and internal FTD */
26
+ /** Total balance including both native and internal FND */
27
27
  total: bigint;
28
- /** Native Frontier Dollar balance */
29
- ftd: bigint;
30
- /** Internal Frontier Dollar balance (for Network Society) */
31
- internalFtd: bigint;
28
+ /** Native Frontier Network Dollar balance */
29
+ fnd: bigint;
30
+ /** Internal Frontier Network Dollar balance (for Network Society) */
31
+ internalFnd: bigint;
32
32
  }
33
33
  /**
34
34
  * Formatted wallet balance breakdown
@@ -36,10 +36,10 @@ interface WalletBalance {
36
36
  interface WalletBalanceFormatted {
37
37
  /** Total balance formatted with currency symbol */
38
38
  total: string;
39
- /** Native Frontier Dollar balance formatted with currency symbol */
40
- ftd: string;
41
- /** Internal Frontier Dollar balance formatted with currency symbol */
42
- internalFtd: string;
39
+ /** Native Frontier Network Dollar balance formatted with currency symbol */
40
+ fnd: string;
41
+ /** Internal Frontier Network Dollar balance formatted with currency symbol */
42
+ internalFnd: string;
43
43
  }
44
44
  /**
45
45
  * Transaction receipt from a user operation
@@ -130,6 +130,109 @@ interface SwapQuote {
130
130
  /** Minimum output amount in human-readable format */
131
131
  minAmountOut: string;
132
132
  }
133
+ /**
134
+ * USD deposit instructions for fiat on-ramp
135
+ */
136
+ interface UsdDepositInstructions {
137
+ /** Currency type */
138
+ currency: 'usd';
139
+ /** Bank name */
140
+ bankName: string;
141
+ /** Bank address */
142
+ bankAddress: string;
143
+ /** Bank routing number (ABA) */
144
+ bankRoutingNumber: string;
145
+ /** Bank account number */
146
+ bankAccountNumber: string;
147
+ /** Beneficiary name for the transfer */
148
+ bankBeneficiaryName: string;
149
+ /** Payment rail (e.g., 'ach', 'wire') */
150
+ paymentRail: string;
151
+ }
152
+ /**
153
+ * EUR deposit instructions for fiat on-ramp (SEPA)
154
+ */
155
+ interface EurDepositInstructions {
156
+ /** Currency type */
157
+ currency: 'eur';
158
+ /** IBAN for SEPA transfer */
159
+ iban: string;
160
+ /** BIC/SWIFT code */
161
+ bic: string;
162
+ /** Bank name */
163
+ bankName: string;
164
+ /** Beneficiary name for the transfer */
165
+ beneficiaryName: string;
166
+ }
167
+ /**
168
+ * Response containing deposit instructions for fiat on-ramp
169
+ */
170
+ interface OnRampResponse<T = UsdDepositInstructions | EurDepositInstructions> {
171
+ /** Currency type ('usd' or 'eur') */
172
+ currency: 'usd' | 'eur';
173
+ /** Deposit instructions specific to the currency */
174
+ depositInstructions: T;
175
+ /** Destination address where stablecoins will be sent */
176
+ destinationAddress: string;
177
+ /** Destination network */
178
+ destinationNetwork: string;
179
+ }
180
+ /**
181
+ * Linked bank account for withdrawals (off-ramp)
182
+ */
183
+ interface LinkedBank {
184
+ /** External account ID */
185
+ id: string;
186
+ /** Bank name */
187
+ bankName: string;
188
+ /** Last 4 digits of account number */
189
+ last4: string;
190
+ /** Withdrawal address for this bank */
191
+ withdrawalAddress: string;
192
+ /** Network for withdrawals */
193
+ network: string;
194
+ }
195
+ /**
196
+ * Response containing linked bank accounts
197
+ */
198
+ interface LinkedBanksResponse {
199
+ /** List of linked bank accounts */
200
+ banks: LinkedBank[];
201
+ }
202
+ /**
203
+ * Response from linking a bank account
204
+ */
205
+ interface LinkBankResponse {
206
+ /** External account ID */
207
+ externalAccountId: string;
208
+ /** Bank name */
209
+ bankName: string;
210
+ /** Withdrawal address for this bank */
211
+ withdrawalAddress: string;
212
+ /** Network for withdrawals */
213
+ network: string;
214
+ }
215
+ /**
216
+ * Billing address for bank account linking
217
+ */
218
+ interface BillingAddress {
219
+ /** Street address line 1 */
220
+ streetLine1: string;
221
+ /** Street address line 2 (optional) */
222
+ streetLine2?: string;
223
+ /** City */
224
+ city: string;
225
+ /** State/Province */
226
+ state: string;
227
+ /** Postal/ZIP code */
228
+ postalCode: string;
229
+ /** Country code (e.g., 'USA') */
230
+ country: string;
231
+ }
232
+ /**
233
+ * Account owner type for IBAN accounts
234
+ */
235
+ type AccountOwnerType = 'individual' | 'business';
133
236
  /**
134
237
  * Wallet access class for interacting with the user's wallet
135
238
  *
@@ -148,8 +251,8 @@ declare class WalletAccess {
148
251
  /**
149
252
  * Get the current wallet balance breakdown
150
253
  *
151
- * Returns the balance breakdown including total, native FTD,
152
- * and internal FTD amounts.
254
+ * Returns the balance breakdown including total, native FND,
255
+ * and internal FND amounts.
153
256
  *
154
257
  * @returns Balance breakdown object
155
258
  * @throws {Error} If no wallet exists
@@ -158,7 +261,7 @@ declare class WalletAccess {
158
261
  * ```typescript
159
262
  * const balance = await sdk.getWallet().getBalance();
160
263
  * console.log('Total Balance:', balance.total.toString());
161
- * console.log('FTD Balance:', balance.ftd.toString());
264
+ * console.log('FND Balance:', balance.fnd.toString());
162
265
  * ```
163
266
  */
164
267
  getBalance(): Promise<WalletBalance>;
@@ -355,7 +458,7 @@ declare class WalletAccess {
355
458
  */
356
459
  transferInternalFrontierDollar(to: string, amount: string, overrides?: GasOverrides): Promise<UserOperationReceipt>;
357
460
  /**
358
- * Transfer Frontier Dollars with Internal Frontier Dollars (iFTD) preferred
461
+ * Transfer Frontier Dollars with Internal Frontier Network Dollars (iFND) preferred
359
462
  *
360
463
  * This method will use Internal Frontier Dollars first, and if insufficient,
361
464
  * it will use regular Frontier Dollars to complete the transfer.
@@ -411,12 +514,12 @@ declare class WalletAccess {
411
514
  * Returns an array of token symbols that are supported for swaps
412
515
  * and other operations on the current network.
413
516
  *
414
- * @returns Array of token symbols (e.g., ['FTD', 'USDC', 'WETH'])
517
+ * @returns Array of token symbols (e.g., ['FND', 'USDC', 'WETH'])
415
518
  *
416
519
  * @example
417
520
  * ```typescript
418
521
  * const tokens = await sdk.getWallet().getSupportedTokens();
419
- * console.log('Supported tokens:', tokens); // ['FTD', 'USDC', 'WETH']
522
+ * console.log('Supported tokens:', tokens); // ['FND', 'USDC', 'WETH']
420
523
  * ```
421
524
  */
422
525
  getSupportedTokens(): Promise<string[]>;
@@ -472,6 +575,153 @@ declare class WalletAccess {
472
575
  * ```
473
576
  */
474
577
  quoteSwap(sourceToken: string, targetToken: string, sourceNetwork: string, targetNetwork: string, amount: string): Promise<SwapQuote>;
578
+ /**
579
+ * Get USD deposit instructions for fiat on-ramp
580
+ *
581
+ * Returns US bank details where user should send their USD deposit.
582
+ * The deposited fiat will be converted to stablecoins and sent to
583
+ * the user's wallet address.
584
+ *
585
+ * Requires approved KYC verification.
586
+ *
587
+ * @returns Bank details including routing number, account number, and beneficiary info
588
+ * @throws {Error} If KYC is not approved
589
+ *
590
+ * @example
591
+ * ```typescript
592
+ * const instructions = await sdk.getWallet().getUsdDepositInstructions();
593
+ * console.log('Bank:', instructions.depositInstructions.bankName);
594
+ * console.log('Routing:', instructions.depositInstructions.bankRoutingNumber);
595
+ * console.log('Account:', instructions.depositInstructions.bankAccountNumber);
596
+ * console.log('Beneficiary:', instructions.depositInstructions.bankBeneficiaryName);
597
+ * ```
598
+ */
599
+ getUsdDepositInstructions(): Promise<OnRampResponse<UsdDepositInstructions>>;
600
+ /**
601
+ * Get EUR deposit instructions for fiat on-ramp (SEPA)
602
+ *
603
+ * Returns SEPA bank details where user should send their EUR deposit.
604
+ * The deposited fiat will be converted to stablecoins and sent to
605
+ * the user's wallet address.
606
+ *
607
+ * Requires approved KYC verification.
608
+ *
609
+ * @returns SEPA bank details including IBAN, BIC, and beneficiary info
610
+ * @throws {Error} If KYC is not approved
611
+ *
612
+ * @example
613
+ * ```typescript
614
+ * const instructions = await sdk.getWallet().getEurDepositInstructions();
615
+ * console.log('IBAN:', instructions.depositInstructions.iban);
616
+ * console.log('BIC:', instructions.depositInstructions.bic);
617
+ * console.log('Bank:', instructions.depositInstructions.bankName);
618
+ * console.log('Beneficiary:', instructions.depositInstructions.beneficiaryName);
619
+ * ```
620
+ */
621
+ getEurDepositInstructions(): Promise<OnRampResponse<EurDepositInstructions>>;
622
+ /**
623
+ * Get all linked bank accounts for withdrawals (off-ramp)
624
+ *
625
+ * Returns a list of bank accounts that have been linked for
626
+ * withdrawing stablecoins to fiat.
627
+ *
628
+ * Requires approved KYC verification.
629
+ *
630
+ * @returns List of linked bank accounts with withdrawal addresses
631
+ * @throws {Error} If KYC is not approved
632
+ *
633
+ * @example
634
+ * ```typescript
635
+ * const { banks } = await sdk.getWallet().getLinkedBanks();
636
+ * banks.forEach(bank => {
637
+ * console.log(`${bank.bankName} (****${bank.last4})`);
638
+ * });
639
+ * ```
640
+ */
641
+ getLinkedBanks(): Promise<LinkedBanksResponse>;
642
+ /**
643
+ * Link a US bank account for withdrawals (off-ramp)
644
+ *
645
+ * Links a US bank account (checking or savings) for withdrawing
646
+ * stablecoins to USD via ACH transfer.
647
+ *
648
+ * Requires approved KYC verification.
649
+ *
650
+ * @param accountOwnerName - Full name of the account owner
651
+ * @param bankName - Name of the bank (e.g., 'Chase', 'Bank of America')
652
+ * @param routingNumber - Bank routing number (9 digits)
653
+ * @param accountNumber - Bank account number
654
+ * @param checkingOrSavings - Account type: 'checking' or 'savings'
655
+ * @param address - Billing address for the account
656
+ * @returns Linked bank details with withdrawal address
657
+ * @throws {Error} If KYC is not approved or bank details are invalid
658
+ *
659
+ * @example
660
+ * ```typescript
661
+ * const result = await sdk.getWallet().linkUsBankAccount(
662
+ * 'John Doe',
663
+ * 'Chase',
664
+ * '121000248',
665
+ * '1234567890',
666
+ * 'checking',
667
+ * {
668
+ * streetLine1: '123 Main St',
669
+ * city: 'San Francisco',
670
+ * state: 'CA',
671
+ * postalCode: '94102',
672
+ * country: 'USA'
673
+ * }
674
+ * );
675
+ * console.log('Linked bank:', result.bankName);
676
+ * ```
677
+ */
678
+ linkUsBankAccount(accountOwnerName: string, bankName: string, routingNumber: string, accountNumber: string, checkingOrSavings: 'checking' | 'savings', address: BillingAddress): Promise<LinkBankResponse>;
679
+ /**
680
+ * Link a EUR/IBAN bank account for withdrawals (off-ramp)
681
+ *
682
+ * Links a European bank account via IBAN for withdrawing
683
+ * stablecoins to EUR via SEPA transfer.
684
+ *
685
+ * Requires approved KYC verification.
686
+ *
687
+ * @param accountOwnerName - Full name of the account owner
688
+ * @param accountOwnerType - Type of account owner: 'individual' or 'business'
689
+ * @param firstName - First name of the account owner
690
+ * @param lastName - Last name of the account owner
691
+ * @param ibanAccountNumber - IBAN account number
692
+ * @param bic - Optional BIC/SWIFT code
693
+ * @returns Linked bank details with withdrawal address
694
+ * @throws {Error} If KYC is not approved or bank details are invalid
695
+ *
696
+ * @example
697
+ * ```typescript
698
+ * const result = await sdk.getWallet().linkEuroAccount(
699
+ * 'Hans Mueller',
700
+ * 'individual',
701
+ * 'Hans',
702
+ * 'Mueller',
703
+ * 'DE89370400440532013000',
704
+ * 'COBADEFFXXX' // optional BIC
705
+ * );
706
+ * console.log('Linked bank:', result.bankName);
707
+ * ```
708
+ */
709
+ linkEuroAccount(accountOwnerName: string, accountOwnerType: AccountOwnerType, firstName: string, lastName: string, ibanAccountNumber: string, bic?: string): Promise<LinkBankResponse>;
710
+ /**
711
+ * Delete a linked bank account
712
+ *
713
+ * Removes a previously linked bank account from the user's off-ramp options.
714
+ *
715
+ * @param bankId - The ID of the linked bank account to delete
716
+ * @throws {Error} If the bank account doesn't exist or deletion fails
717
+ *
718
+ * @example
719
+ * ```typescript
720
+ * await sdk.getWallet().deleteLinkedBank('bank_abc123');
721
+ * console.log('Bank account deleted');
722
+ * ```
723
+ */
724
+ deleteLinkedBank(bankId: string): Promise<void>;
475
725
  }
476
726
 
477
727
  /**
@@ -767,6 +1017,33 @@ interface UserContact {
767
1017
  /** Contact name */
768
1018
  name: string;
769
1019
  }
1020
+ /**
1021
+ * KYC verification status
1022
+ */
1023
+ type KycStatus = 'not_started' | 'pending' | 'in_review' | 'approved' | 'rejected';
1024
+ /**
1025
+ * Terms of Service acceptance status
1026
+ */
1027
+ type TosStatus = 'pending' | 'approved';
1028
+ /**
1029
+ * KYC status response
1030
+ */
1031
+ interface KycStatusResponse {
1032
+ /** Current KYC status */
1033
+ status: KycStatus;
1034
+ /** Whether KYC is approved */
1035
+ isApproved: boolean;
1036
+ /** Reason for rejection (if rejected) */
1037
+ rejectionReason: string | null;
1038
+ /** KYC link ID (if KYC has been started) */
1039
+ kycLinkId: string | null;
1040
+ /** URL to complete KYC verification (if KYC has been started) */
1041
+ kycLinkUrl: string | null;
1042
+ /** Terms of Service acceptance status */
1043
+ tosStatus: TosStatus | null;
1044
+ /** URL to accept Terms of Service */
1045
+ tosLink: string | null;
1046
+ }
770
1047
  /**
771
1048
  * User contact information payload
772
1049
  */
@@ -882,6 +1159,31 @@ declare class UserAccess {
882
1159
  * ```
883
1160
  */
884
1161
  addUserContact(data: UserContactPayload): Promise<void>;
1162
+ /**
1163
+ * Get or create KYC status
1164
+ *
1165
+ * Returns the current KYC verification status. If KYC has not been started,
1166
+ * it will be initiated and the response will include a URL to complete verification.
1167
+ *
1168
+ * @param redirectUri - Optional URL to redirect user after KYC completion
1169
+ * @returns KycStatusResponse with status and verification link if applicable
1170
+ * @throws {Error} If user is not authenticated
1171
+ *
1172
+ * @example
1173
+ * ```typescript
1174
+ * const kyc = await sdk.getUser().getOrCreateKyc();
1175
+ * if (kyc.status === 'not_started' && kyc.kycLinkUrl) {
1176
+ * // Redirect user to complete KYC
1177
+ * window.open(kyc.kycLinkUrl, '_blank');
1178
+ * } else if (kyc.isApproved) {
1179
+ * console.log('KYC approved!');
1180
+ * }
1181
+ *
1182
+ * // With redirect URI
1183
+ * const kycWithRedirect = await sdk.getUser().getOrCreateKyc('https://myapp.com/callback');
1184
+ * ```
1185
+ */
1186
+ getOrCreateKyc(redirectUri?: string): Promise<KycStatusResponse>;
885
1187
  }
886
1188
 
887
1189
  /**
@@ -1598,4 +1900,4 @@ interface SDKResponse {
1598
1900
  error?: string;
1599
1901
  }
1600
1902
 
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 };
1903
+ export { type AccountOwnerType, type App, type AppPermission, type AppStatus, type BillingAddress, ChainAccess, type ChainConfig, type CreateAppRequest, type CreateSponsorPassRequest, type CreateWebhookRequest, type Developer, type EurDepositInstructions, type ExecuteCall, FrontierSDK, type GasOverrides, type LinkBankResponse, type LinkedBank, type LinkedBanksResponse, type ListParams, type ListSponsorsParams, type OnRampResponse, 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 UsdDepositInstructions, 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
@@ -49,8 +49,8 @@ var WalletAccess = class {
49
49
  /**
50
50
  * Get the current wallet balance breakdown
51
51
  *
52
- * Returns the balance breakdown including total, native FTD,
53
- * and internal FTD amounts.
52
+ * Returns the balance breakdown including total, native FND,
53
+ * and internal FND amounts.
54
54
  *
55
55
  * @returns Balance breakdown object
56
56
  * @throws {Error} If no wallet exists
@@ -59,7 +59,7 @@ var WalletAccess = class {
59
59
  * ```typescript
60
60
  * const balance = await sdk.getWallet().getBalance();
61
61
  * console.log('Total Balance:', balance.total.toString());
62
- * console.log('FTD Balance:', balance.ftd.toString());
62
+ * console.log('FND Balance:', balance.fnd.toString());
63
63
  * ```
64
64
  */
65
65
  async getBalance() {
@@ -301,7 +301,7 @@ var WalletAccess = class {
301
301
  });
302
302
  }
303
303
  /**
304
- * Transfer Frontier Dollars with Internal Frontier Dollars (iFTD) preferred
304
+ * Transfer Frontier Dollars with Internal Frontier Network Dollars (iFND) preferred
305
305
  *
306
306
  * This method will use Internal Frontier Dollars first, and if insufficient,
307
307
  * it will use regular Frontier Dollars to complete the transfer.
@@ -368,12 +368,12 @@ var WalletAccess = class {
368
368
  * Returns an array of token symbols that are supported for swaps
369
369
  * and other operations on the current network.
370
370
  *
371
- * @returns Array of token symbols (e.g., ['FTD', 'USDC', 'WETH'])
371
+ * @returns Array of token symbols (e.g., ['FND', 'USDC', 'WETH'])
372
372
  *
373
373
  * @example
374
374
  * ```typescript
375
375
  * const tokens = await sdk.getWallet().getSupportedTokens();
376
- * console.log('Supported tokens:', tokens); // ['FTD', 'USDC', 'WETH']
376
+ * console.log('Supported tokens:', tokens); // ['FND', 'USDC', 'WETH']
377
377
  * ```
378
378
  */
379
379
  async getSupportedTokens() {
@@ -447,6 +447,179 @@ var WalletAccess = class {
447
447
  amount
448
448
  });
449
449
  }
450
+ /**
451
+ * Get USD deposit instructions for fiat on-ramp
452
+ *
453
+ * Returns US bank details where user should send their USD deposit.
454
+ * The deposited fiat will be converted to stablecoins and sent to
455
+ * the user's wallet address.
456
+ *
457
+ * Requires approved KYC verification.
458
+ *
459
+ * @returns Bank details including routing number, account number, and beneficiary info
460
+ * @throws {Error} If KYC is not approved
461
+ *
462
+ * @example
463
+ * ```typescript
464
+ * const instructions = await sdk.getWallet().getUsdDepositInstructions();
465
+ * console.log('Bank:', instructions.depositInstructions.bankName);
466
+ * console.log('Routing:', instructions.depositInstructions.bankRoutingNumber);
467
+ * console.log('Account:', instructions.depositInstructions.bankAccountNumber);
468
+ * console.log('Beneficiary:', instructions.depositInstructions.bankBeneficiaryName);
469
+ * ```
470
+ */
471
+ async getUsdDepositInstructions() {
472
+ return this.sdk.request("wallet:getUsdDepositInstructions");
473
+ }
474
+ /**
475
+ * Get EUR deposit instructions for fiat on-ramp (SEPA)
476
+ *
477
+ * Returns SEPA bank details where user should send their EUR deposit.
478
+ * The deposited fiat will be converted to stablecoins and sent to
479
+ * the user's wallet address.
480
+ *
481
+ * Requires approved KYC verification.
482
+ *
483
+ * @returns SEPA bank details including IBAN, BIC, and beneficiary info
484
+ * @throws {Error} If KYC is not approved
485
+ *
486
+ * @example
487
+ * ```typescript
488
+ * const instructions = await sdk.getWallet().getEurDepositInstructions();
489
+ * console.log('IBAN:', instructions.depositInstructions.iban);
490
+ * console.log('BIC:', instructions.depositInstructions.bic);
491
+ * console.log('Bank:', instructions.depositInstructions.bankName);
492
+ * console.log('Beneficiary:', instructions.depositInstructions.beneficiaryName);
493
+ * ```
494
+ */
495
+ async getEurDepositInstructions() {
496
+ return this.sdk.request("wallet:getEurDepositInstructions");
497
+ }
498
+ /**
499
+ * Get all linked bank accounts for withdrawals (off-ramp)
500
+ *
501
+ * Returns a list of bank accounts that have been linked for
502
+ * withdrawing stablecoins to fiat.
503
+ *
504
+ * Requires approved KYC verification.
505
+ *
506
+ * @returns List of linked bank accounts with withdrawal addresses
507
+ * @throws {Error} If KYC is not approved
508
+ *
509
+ * @example
510
+ * ```typescript
511
+ * const { banks } = await sdk.getWallet().getLinkedBanks();
512
+ * banks.forEach(bank => {
513
+ * console.log(`${bank.bankName} (****${bank.last4})`);
514
+ * });
515
+ * ```
516
+ */
517
+ async getLinkedBanks() {
518
+ return this.sdk.request("wallet:getLinkedBanks");
519
+ }
520
+ /**
521
+ * Link a US bank account for withdrawals (off-ramp)
522
+ *
523
+ * Links a US bank account (checking or savings) for withdrawing
524
+ * stablecoins to USD via ACH transfer.
525
+ *
526
+ * Requires approved KYC verification.
527
+ *
528
+ * @param accountOwnerName - Full name of the account owner
529
+ * @param bankName - Name of the bank (e.g., 'Chase', 'Bank of America')
530
+ * @param routingNumber - Bank routing number (9 digits)
531
+ * @param accountNumber - Bank account number
532
+ * @param checkingOrSavings - Account type: 'checking' or 'savings'
533
+ * @param address - Billing address for the account
534
+ * @returns Linked bank details with withdrawal address
535
+ * @throws {Error} If KYC is not approved or bank details are invalid
536
+ *
537
+ * @example
538
+ * ```typescript
539
+ * const result = await sdk.getWallet().linkUsBankAccount(
540
+ * 'John Doe',
541
+ * 'Chase',
542
+ * '121000248',
543
+ * '1234567890',
544
+ * 'checking',
545
+ * {
546
+ * streetLine1: '123 Main St',
547
+ * city: 'San Francisco',
548
+ * state: 'CA',
549
+ * postalCode: '94102',
550
+ * country: 'USA'
551
+ * }
552
+ * );
553
+ * console.log('Linked bank:', result.bankName);
554
+ * ```
555
+ */
556
+ async linkUsBankAccount(accountOwnerName, bankName, routingNumber, accountNumber, checkingOrSavings, address) {
557
+ return this.sdk.request("wallet:linkUsBankAccount", {
558
+ accountOwnerName,
559
+ bankName,
560
+ routingNumber,
561
+ accountNumber,
562
+ checkingOrSavings,
563
+ address
564
+ });
565
+ }
566
+ /**
567
+ * Link a EUR/IBAN bank account for withdrawals (off-ramp)
568
+ *
569
+ * Links a European bank account via IBAN for withdrawing
570
+ * stablecoins to EUR via SEPA transfer.
571
+ *
572
+ * Requires approved KYC verification.
573
+ *
574
+ * @param accountOwnerName - Full name of the account owner
575
+ * @param accountOwnerType - Type of account owner: 'individual' or 'business'
576
+ * @param firstName - First name of the account owner
577
+ * @param lastName - Last name of the account owner
578
+ * @param ibanAccountNumber - IBAN account number
579
+ * @param bic - Optional BIC/SWIFT code
580
+ * @returns Linked bank details with withdrawal address
581
+ * @throws {Error} If KYC is not approved or bank details are invalid
582
+ *
583
+ * @example
584
+ * ```typescript
585
+ * const result = await sdk.getWallet().linkEuroAccount(
586
+ * 'Hans Mueller',
587
+ * 'individual',
588
+ * 'Hans',
589
+ * 'Mueller',
590
+ * 'DE89370400440532013000',
591
+ * 'COBADEFFXXX' // optional BIC
592
+ * );
593
+ * console.log('Linked bank:', result.bankName);
594
+ * ```
595
+ */
596
+ async linkEuroAccount(accountOwnerName, accountOwnerType, firstName, lastName, ibanAccountNumber, bic) {
597
+ return this.sdk.request("wallet:linkEuroAccount", {
598
+ accountOwnerName,
599
+ accountOwnerType,
600
+ firstName,
601
+ lastName,
602
+ ibanAccountNumber,
603
+ bic
604
+ });
605
+ }
606
+ /**
607
+ * Delete a linked bank account
608
+ *
609
+ * Removes a previously linked bank account from the user's off-ramp options.
610
+ *
611
+ * @param bankId - The ID of the linked bank account to delete
612
+ * @throws {Error} If the bank account doesn't exist or deletion fails
613
+ *
614
+ * @example
615
+ * ```typescript
616
+ * await sdk.getWallet().deleteLinkedBank('bank_abc123');
617
+ * console.log('Bank account deleted');
618
+ * ```
619
+ */
620
+ async deleteLinkedBank(bankId) {
621
+ return this.sdk.request("wallet:deleteLinkedBank", { bankId });
622
+ }
450
623
  };
451
624
 
452
625
  // src/access/storage.ts
@@ -673,6 +846,33 @@ var UserAccess = class {
673
846
  async addUserContact(data) {
674
847
  return this.sdk.request("user:addUserContact", data);
675
848
  }
849
+ /**
850
+ * Get or create KYC status
851
+ *
852
+ * Returns the current KYC verification status. If KYC has not been started,
853
+ * it will be initiated and the response will include a URL to complete verification.
854
+ *
855
+ * @param redirectUri - Optional URL to redirect user after KYC completion
856
+ * @returns KycStatusResponse with status and verification link if applicable
857
+ * @throws {Error} If user is not authenticated
858
+ *
859
+ * @example
860
+ * ```typescript
861
+ * const kyc = await sdk.getUser().getOrCreateKyc();
862
+ * if (kyc.status === 'not_started' && kyc.kycLinkUrl) {
863
+ * // Redirect user to complete KYC
864
+ * window.open(kyc.kycLinkUrl, '_blank');
865
+ * } else if (kyc.isApproved) {
866
+ * console.log('KYC approved!');
867
+ * }
868
+ *
869
+ * // With redirect URI
870
+ * const kycWithRedirect = await sdk.getUser().getOrCreateKyc('https://myapp.com/callback');
871
+ * ```
872
+ */
873
+ async getOrCreateKyc(redirectUri) {
874
+ return this.sdk.request("user:getOrCreateKyc", redirectUri);
875
+ }
676
876
  };
677
877
 
678
878
  // src/access/partnerships.ts