@luxfi/bank 1.0.1 → 1.2.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
@@ -89,14 +89,24 @@ export interface Transaction {
89
89
  decimals: number;
90
90
  status: string;
91
91
  reference: string;
92
+ txHash?: string;
93
+ network?: string;
92
94
  created: string;
93
95
  }
94
96
  export interface Beneficiary {
95
97
  id: string;
96
98
  name: string;
99
+ bankAccountHolder: string;
97
100
  currency: string;
98
101
  country: string;
99
- [k: string]: unknown;
102
+ paymentType: string;
103
+ bankDetails: {
104
+ iban?: string;
105
+ bic?: string;
106
+ accountNumber?: string;
107
+ sortCode?: string;
108
+ };
109
+ verified: boolean;
100
110
  }
101
111
  export interface CryptoPrice {
102
112
  asset: string;
@@ -156,12 +166,13 @@ export interface CardholderProfile {
156
166
  };
157
167
  }
158
168
  export interface Overview {
159
- account: Account;
160
- balances: Balance[];
161
- wallet: Wallet | null;
162
- cards: Card[];
163
- transactions: Transaction[];
164
- [k: string]: unknown;
169
+ sandbox: boolean;
170
+ onboarded: boolean;
171
+ account?: Account;
172
+ balances?: Balance[];
173
+ wallet?: Wallet | null;
174
+ cards?: Card[];
175
+ recentTransactions?: Transaction[];
165
176
  }
166
177
  export declare class Bank {
167
178
  private baseUrl;
@@ -197,7 +208,10 @@ export declare class Bank {
197
208
  createBeneficiary(beneficiary: Record<string, unknown>): Promise<Beneficiary>;
198
209
  deleteBeneficiary(id: string): Promise<void>;
199
210
  cards(): Promise<Card[]>;
200
- issueCard(card: Record<string, unknown>): Promise<Card>;
211
+ issueCard(currency?: string): Promise<{
212
+ card: Card;
213
+ cvv: string;
214
+ }>;
201
215
  freezeCard(id: string): Promise<Card>;
202
216
  unfreezeCard(id: string): Promise<Card>;
203
217
  createCardAccount(profile: CardholderProfile): Promise<{
package/dist/index.js CHANGED
@@ -106,8 +106,9 @@ export class Bank {
106
106
  cards() {
107
107
  return this.request('GET', '/v1/bank/cards');
108
108
  }
109
- issueCard(card) {
110
- return this.request('POST', '/v1/bank/cards', card);
109
+ // Returns the new card plus its CVV, shown once and never stored server-side.
110
+ issueCard(currency) {
111
+ return this.request('POST', '/v1/bank/cards', { currency });
111
112
  }
112
113
  freezeCard(id) {
113
114
  return this.request('POST', `/v1/bank/cards/${enc(id)}/freeze`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luxfi/bank",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "Typed client for the Lux banking API (/v1/bank) — accounts, payments, cards, crypto, FX, and membership plans.",
5
5
  "license": "MIT",
6
6
  "repository": {