@luxfi/bank 1.0.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/README.md +33 -0
- package/dist/index.d.ts +264 -0
- package/dist/index.js +175 -0
- package/package.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @luxfi/bank
|
|
2
|
+
|
|
3
|
+
Typed client for the Lux banking API (`/v1/bank`) — accounts, transfers,
|
|
4
|
+
payments, beneficiaries, cards, crypto, exchange, FX, and membership plans.
|
|
5
|
+
Sandbox and production serve the identical contract (LP-3040); point the
|
|
6
|
+
client at either.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { Bank } from '@luxfi/bank'
|
|
10
|
+
|
|
11
|
+
const bank = new Bank({
|
|
12
|
+
baseUrl: 'https://api.sandbox.lux.financial',
|
|
13
|
+
token: () => sessionStorage.getItem('token'),
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const plans = await bank.plans()
|
|
17
|
+
const { holdings } = await bank.wallet()
|
|
18
|
+
await bank.sendCrypto('ETH', 400_000, '0x1234…5678') // minor units, 6 dp
|
|
19
|
+
|
|
20
|
+
// Card issuance — branch only on the issuer's status/nextAction pair:
|
|
21
|
+
const { data } = await bank.cardAccount()
|
|
22
|
+
if (data.virtualAccount?.nextAction === 'complete_kyc') {
|
|
23
|
+
const { url } = await bank.cardKYCURL() // sensitive — straight to the browser
|
|
24
|
+
window.open(url)
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Amounts are integers in minor units; every balance carries `decimals`
|
|
29
|
+
(2 for most fiat, 0 for JPY, 6 for crypto). Errors throw `BankError`
|
|
30
|
+
with `status` and the parsed body.
|
|
31
|
+
|
|
32
|
+
Docs: [docs.lux.financial](https://docs.lux.financial/docs/banking) ·
|
|
33
|
+
Spec: LP-3040.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
export interface BankConfig {
|
|
2
|
+
/** API origin, e.g. "https://api.lux.financial" or "https://api.sandbox.lux.financial". */
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
/** IAM bearer token, or a getter so rotation is picked up per request. */
|
|
5
|
+
token?: string | (() => string | null | undefined);
|
|
6
|
+
fetch?: typeof fetch;
|
|
7
|
+
}
|
|
8
|
+
export declare class BankError extends Error {
|
|
9
|
+
readonly status: number;
|
|
10
|
+
readonly body: unknown;
|
|
11
|
+
constructor(message: string, status: number, body: unknown);
|
|
12
|
+
}
|
|
13
|
+
export interface Config {
|
|
14
|
+
sandbox: boolean;
|
|
15
|
+
demoLogin?: boolean;
|
|
16
|
+
demoEmail?: string;
|
|
17
|
+
fiat: string[];
|
|
18
|
+
crypto: string[];
|
|
19
|
+
network: string;
|
|
20
|
+
disclaimer: string;
|
|
21
|
+
partner?: {
|
|
22
|
+
name: string;
|
|
23
|
+
terms: string;
|
|
24
|
+
privacy: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface Plan {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
monthly: number;
|
|
31
|
+
card: 'virtual' | 'plastic' | 'metal';
|
|
32
|
+
iban: boolean;
|
|
33
|
+
freeACH: number;
|
|
34
|
+
freeWires: number;
|
|
35
|
+
achFee: number;
|
|
36
|
+
wireFee: number;
|
|
37
|
+
fxPct: number;
|
|
38
|
+
depositPct: number;
|
|
39
|
+
dailyLimit: number;
|
|
40
|
+
monthlyLimit: number;
|
|
41
|
+
holders: number;
|
|
42
|
+
invite?: boolean;
|
|
43
|
+
perks: string[];
|
|
44
|
+
}
|
|
45
|
+
export interface Balance {
|
|
46
|
+
currency: string;
|
|
47
|
+
available: number;
|
|
48
|
+
held: number;
|
|
49
|
+
decimals: number;
|
|
50
|
+
kind: 'fiat' | 'crypto';
|
|
51
|
+
valueUsd: number;
|
|
52
|
+
}
|
|
53
|
+
export interface Account {
|
|
54
|
+
id: string;
|
|
55
|
+
entityName: string;
|
|
56
|
+
entityType: 'individual' | 'business';
|
|
57
|
+
country: string;
|
|
58
|
+
currency: string;
|
|
59
|
+
status: string;
|
|
60
|
+
kycStatus: string;
|
|
61
|
+
iban: string;
|
|
62
|
+
}
|
|
63
|
+
export interface Wallet {
|
|
64
|
+
id: string;
|
|
65
|
+
currency: string;
|
|
66
|
+
address: string;
|
|
67
|
+
network: string;
|
|
68
|
+
status: string;
|
|
69
|
+
}
|
|
70
|
+
export interface Card {
|
|
71
|
+
id: string;
|
|
72
|
+
holderName: string;
|
|
73
|
+
brand: string;
|
|
74
|
+
type: string;
|
|
75
|
+
last4: string;
|
|
76
|
+
display: string;
|
|
77
|
+
expMonth: number;
|
|
78
|
+
expYear: number;
|
|
79
|
+
currency: string;
|
|
80
|
+
status: string;
|
|
81
|
+
design: string;
|
|
82
|
+
}
|
|
83
|
+
export interface Transaction {
|
|
84
|
+
id: string;
|
|
85
|
+
type: string;
|
|
86
|
+
direction: 'credit' | 'debit';
|
|
87
|
+
amount: number;
|
|
88
|
+
currency: string;
|
|
89
|
+
decimals: number;
|
|
90
|
+
status: string;
|
|
91
|
+
reference: string;
|
|
92
|
+
created: string;
|
|
93
|
+
}
|
|
94
|
+
export interface Beneficiary {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
currency: string;
|
|
98
|
+
country: string;
|
|
99
|
+
[k: string]: unknown;
|
|
100
|
+
}
|
|
101
|
+
export interface CryptoPrice {
|
|
102
|
+
asset: string;
|
|
103
|
+
usd: number;
|
|
104
|
+
decimals: number;
|
|
105
|
+
}
|
|
106
|
+
export interface CryptoMove {
|
|
107
|
+
txHash: string;
|
|
108
|
+
network: string;
|
|
109
|
+
asset: string;
|
|
110
|
+
amount: number;
|
|
111
|
+
toAddress?: string;
|
|
112
|
+
balances: Balance[];
|
|
113
|
+
}
|
|
114
|
+
export interface ExchangeQuote {
|
|
115
|
+
fromCurrency: string;
|
|
116
|
+
toCurrency: string;
|
|
117
|
+
fromAmount: number;
|
|
118
|
+
toAmount: number;
|
|
119
|
+
fromDecimals: number;
|
|
120
|
+
toDecimals: number;
|
|
121
|
+
rate: number;
|
|
122
|
+
expiresAt: string;
|
|
123
|
+
}
|
|
124
|
+
export interface ExchangeResult {
|
|
125
|
+
fromCurrency: string;
|
|
126
|
+
toCurrency: string;
|
|
127
|
+
fromAmount: number;
|
|
128
|
+
toAmount: number;
|
|
129
|
+
rate: number;
|
|
130
|
+
balances: Balance[];
|
|
131
|
+
}
|
|
132
|
+
export interface FXQuote {
|
|
133
|
+
sellCurrency: string;
|
|
134
|
+
buyCurrency: string;
|
|
135
|
+
sellAmount: number;
|
|
136
|
+
buyAmount: number;
|
|
137
|
+
rate: number;
|
|
138
|
+
quoteId: string;
|
|
139
|
+
expiresAt: string;
|
|
140
|
+
}
|
|
141
|
+
/** The issuer's normalized card-lifecycle state; branch on this pair only. */
|
|
142
|
+
export interface IssuerState {
|
|
143
|
+
status: 'not_started' | 'pending' | 'approved' | 'rejected' | 'error' | string;
|
|
144
|
+
nextAction: 'register' | 'complete_kyc' | 'accept_agreement' | 'retry_kyc' | 'order_card' | 'none' | string;
|
|
145
|
+
}
|
|
146
|
+
export interface CardholderProfile {
|
|
147
|
+
firstName: string;
|
|
148
|
+
middleName?: string;
|
|
149
|
+
lastName: string;
|
|
150
|
+
cardHolderFirstName: string;
|
|
151
|
+
cardHolderLastName: string;
|
|
152
|
+
gender: 0 | 1 | 2;
|
|
153
|
+
dateOfBirth: string;
|
|
154
|
+
placeOfBirth: string;
|
|
155
|
+
occupation: number;
|
|
156
|
+
phoneNumber: string;
|
|
157
|
+
phoneNumberCountryCode: string;
|
|
158
|
+
address: {
|
|
159
|
+
addressLine1: string;
|
|
160
|
+
addressLine2?: string;
|
|
161
|
+
subdivision: string;
|
|
162
|
+
city: string;
|
|
163
|
+
postalCode: string;
|
|
164
|
+
country: string;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
export interface Overview {
|
|
168
|
+
account: Account;
|
|
169
|
+
balances: Balance[];
|
|
170
|
+
wallet: Wallet | null;
|
|
171
|
+
cards: Card[];
|
|
172
|
+
transactions: Transaction[];
|
|
173
|
+
[k: string]: unknown;
|
|
174
|
+
}
|
|
175
|
+
export declare class Bank {
|
|
176
|
+
private baseUrl;
|
|
177
|
+
private token?;
|
|
178
|
+
private fetchFn;
|
|
179
|
+
constructor(config: BankConfig);
|
|
180
|
+
private request;
|
|
181
|
+
health(): Promise<{
|
|
182
|
+
status: string;
|
|
183
|
+
sandbox: boolean;
|
|
184
|
+
}>;
|
|
185
|
+
config(): Promise<Config>;
|
|
186
|
+
plans(): Promise<Plan[]>;
|
|
187
|
+
onboard(profile: Record<string, unknown>): Promise<{
|
|
188
|
+
account: Account;
|
|
189
|
+
}>;
|
|
190
|
+
overview(): Promise<Overview>;
|
|
191
|
+
transactions(): Promise<Transaction[]>;
|
|
192
|
+
accounts(): Promise<Account[]>;
|
|
193
|
+
transfer(fromAccountId: string, toAccountId: string, amount: number, currency: string, reference?: string): Promise<{
|
|
194
|
+
debitId: string;
|
|
195
|
+
creditId: string;
|
|
196
|
+
status: string;
|
|
197
|
+
}>;
|
|
198
|
+
pay(accountId: string, beneficiaryId: string, amount: number, currency: string, reference?: string): Promise<{
|
|
199
|
+
transactionId: string;
|
|
200
|
+
status: string;
|
|
201
|
+
}>;
|
|
202
|
+
balances(accountId: string): Promise<Balance[]>;
|
|
203
|
+
wallets(accountId: string): Promise<Wallet[]>;
|
|
204
|
+
accountTransactions(accountId: string): Promise<Transaction[]>;
|
|
205
|
+
beneficiaries(): Promise<Beneficiary[]>;
|
|
206
|
+
createBeneficiary(beneficiary: Record<string, unknown>): Promise<Beneficiary>;
|
|
207
|
+
deleteBeneficiary(id: string): Promise<void>;
|
|
208
|
+
cards(): Promise<Card[]>;
|
|
209
|
+
issueCard(card: Record<string, unknown>): Promise<Card>;
|
|
210
|
+
freezeCard(id: string): Promise<Card>;
|
|
211
|
+
unfreezeCard(id: string): Promise<Card>;
|
|
212
|
+
createCardAccount(profile: CardholderProfile): Promise<{
|
|
213
|
+
status: string;
|
|
214
|
+
message?: string;
|
|
215
|
+
}>;
|
|
216
|
+
cardAccount(): Promise<{
|
|
217
|
+
status: string;
|
|
218
|
+
data: Record<string, unknown>;
|
|
219
|
+
}>;
|
|
220
|
+
cardKYC(): Promise<{
|
|
221
|
+
status: string;
|
|
222
|
+
data: Record<string, unknown>;
|
|
223
|
+
}>;
|
|
224
|
+
createVirtualCard(): Promise<{
|
|
225
|
+
status: string;
|
|
226
|
+
data?: IssuerState;
|
|
227
|
+
}>;
|
|
228
|
+
/** Sensitive: hand the URL straight to the user's browser; never log or persist it. */
|
|
229
|
+
cardKYCURL(): Promise<{
|
|
230
|
+
url: string;
|
|
231
|
+
}>;
|
|
232
|
+
/** Sensitive: hand the URL straight to the user's browser; never log or persist it. */
|
|
233
|
+
cardConsentURL(): Promise<{
|
|
234
|
+
url: string;
|
|
235
|
+
}>;
|
|
236
|
+
orderVirtualCard(): Promise<{
|
|
237
|
+
status: string;
|
|
238
|
+
message?: string;
|
|
239
|
+
}>;
|
|
240
|
+
wallet(): Promise<{
|
|
241
|
+
wallet: Wallet;
|
|
242
|
+
holdings: Balance[];
|
|
243
|
+
network: string;
|
|
244
|
+
sandbox: boolean;
|
|
245
|
+
}>;
|
|
246
|
+
cryptoPrices(): Promise<{
|
|
247
|
+
prices: CryptoPrice[];
|
|
248
|
+
sandbox: boolean;
|
|
249
|
+
}>;
|
|
250
|
+
sendCrypto(asset: string, amount: number, toAddress: string): Promise<CryptoMove>;
|
|
251
|
+
/** Sandbox-only testnet faucet. */
|
|
252
|
+
depositCrypto(asset: string, amount: number): Promise<CryptoMove>;
|
|
253
|
+
exchangeQuote(fromCurrency: string, toCurrency: string, amount: number): Promise<ExchangeQuote>;
|
|
254
|
+
exchange(fromCurrency: string, toCurrency: string, amount: number): Promise<ExchangeResult>;
|
|
255
|
+
fxQuote(sellCurrency: string, buyCurrency: string, amount: number): Promise<FXQuote>;
|
|
256
|
+
fxExecute(accountId: string, quoteId: string): Promise<Record<string, unknown>>;
|
|
257
|
+
sandboxLogin(email: string, password: string): Promise<{
|
|
258
|
+
token: string;
|
|
259
|
+
user: {
|
|
260
|
+
id: string;
|
|
261
|
+
email: string;
|
|
262
|
+
};
|
|
263
|
+
}>;
|
|
264
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// @luxfi/bank — typed client for the Lux banking API (/v1/bank).
|
|
2
|
+
// One surface: accounts, transfers, payments, beneficiaries, cards (with the
|
|
3
|
+
// provider-neutral issuer lifecycle), crypto, exchange, FX, membership plans.
|
|
4
|
+
// Sandbox and production serve the identical contract (LP-3040).
|
|
5
|
+
export class BankError extends Error {
|
|
6
|
+
status;
|
|
7
|
+
body;
|
|
8
|
+
constructor(message, status, body) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.status = status;
|
|
11
|
+
this.body = body;
|
|
12
|
+
this.name = 'BankError';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
// -- Client --
|
|
16
|
+
export class Bank {
|
|
17
|
+
baseUrl;
|
|
18
|
+
token;
|
|
19
|
+
fetchFn;
|
|
20
|
+
constructor(config) {
|
|
21
|
+
this.baseUrl = config.baseUrl.replace(/\/+$/, '');
|
|
22
|
+
this.token = config.token;
|
|
23
|
+
this.fetchFn = config.fetch ?? fetch;
|
|
24
|
+
}
|
|
25
|
+
async request(method, path, body) {
|
|
26
|
+
const headers = { 'Content-Type': 'application/json' };
|
|
27
|
+
const token = typeof this.token === 'function' ? this.token() : this.token;
|
|
28
|
+
if (token)
|
|
29
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
30
|
+
const res = await this.fetchFn(`${this.baseUrl}${path}`, {
|
|
31
|
+
method,
|
|
32
|
+
headers,
|
|
33
|
+
body: body === undefined ? undefined : JSON.stringify(body),
|
|
34
|
+
});
|
|
35
|
+
const data = await res.json().catch(() => ({}));
|
|
36
|
+
if (!res.ok) {
|
|
37
|
+
throw new BankError(data.message || data.error || `Request failed: ${res.status}`, res.status, data);
|
|
38
|
+
}
|
|
39
|
+
return data;
|
|
40
|
+
}
|
|
41
|
+
// Public
|
|
42
|
+
health() {
|
|
43
|
+
return this.request('GET', '/v1/bank/health');
|
|
44
|
+
}
|
|
45
|
+
config() {
|
|
46
|
+
return this.request('GET', '/v1/bank/config');
|
|
47
|
+
}
|
|
48
|
+
plans() {
|
|
49
|
+
return this.request('GET', '/v1/bank/plans');
|
|
50
|
+
}
|
|
51
|
+
// Onboarding + dashboard
|
|
52
|
+
onboard(profile) {
|
|
53
|
+
return this.request('POST', '/v1/bank/onboard', profile);
|
|
54
|
+
}
|
|
55
|
+
overview() {
|
|
56
|
+
return this.request('GET', '/v1/bank/overview');
|
|
57
|
+
}
|
|
58
|
+
transactions() {
|
|
59
|
+
return this.request('GET', '/v1/bank/transactions');
|
|
60
|
+
}
|
|
61
|
+
accounts() {
|
|
62
|
+
return this.request('GET', '/v1/bank/account/summary');
|
|
63
|
+
}
|
|
64
|
+
// Money movement
|
|
65
|
+
transfer(fromAccountId, toAccountId, amount, currency, reference) {
|
|
66
|
+
return this.request('POST', '/v1/bank/transfers', {
|
|
67
|
+
fromAccountId,
|
|
68
|
+
toAccountId,
|
|
69
|
+
amount,
|
|
70
|
+
currency,
|
|
71
|
+
reference,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
pay(accountId, beneficiaryId, amount, currency, reference) {
|
|
75
|
+
return this.request('POST', '/v1/bank/payments/outbound', {
|
|
76
|
+
accountId,
|
|
77
|
+
beneficiaryId,
|
|
78
|
+
amount,
|
|
79
|
+
currency,
|
|
80
|
+
reference,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// Per-account reads
|
|
84
|
+
balances(accountId) {
|
|
85
|
+
return this.request('GET', `/v1/bank/accounts/${accountId}/balances`);
|
|
86
|
+
}
|
|
87
|
+
wallets(accountId) {
|
|
88
|
+
return this.request('GET', `/v1/bank/accounts/${accountId}/wallets`);
|
|
89
|
+
}
|
|
90
|
+
accountTransactions(accountId) {
|
|
91
|
+
return this.request('GET', `/v1/bank/accounts/${accountId}/transactions`);
|
|
92
|
+
}
|
|
93
|
+
// Beneficiaries
|
|
94
|
+
beneficiaries() {
|
|
95
|
+
return this.request('GET', '/v1/bank/beneficiaries');
|
|
96
|
+
}
|
|
97
|
+
createBeneficiary(beneficiary) {
|
|
98
|
+
return this.request('POST', '/v1/bank/beneficiaries', beneficiary);
|
|
99
|
+
}
|
|
100
|
+
deleteBeneficiary(id) {
|
|
101
|
+
return this.request('DELETE', `/v1/bank/beneficiaries/${id}`);
|
|
102
|
+
}
|
|
103
|
+
// Cards — ledger
|
|
104
|
+
cards() {
|
|
105
|
+
return this.request('GET', '/v1/bank/cards');
|
|
106
|
+
}
|
|
107
|
+
issueCard(card) {
|
|
108
|
+
return this.request('POST', '/v1/bank/cards', card);
|
|
109
|
+
}
|
|
110
|
+
freezeCard(id) {
|
|
111
|
+
return this.request('POST', `/v1/bank/cards/${id}/freeze`);
|
|
112
|
+
}
|
|
113
|
+
unfreezeCard(id) {
|
|
114
|
+
return this.request('POST', `/v1/bank/cards/${id}/unfreeze`);
|
|
115
|
+
}
|
|
116
|
+
// Cards — issuer lifecycle (provider-neutral; branch on status/nextAction)
|
|
117
|
+
createCardAccount(profile) {
|
|
118
|
+
return this.request('POST', '/v1/bank/cards/account', profile);
|
|
119
|
+
}
|
|
120
|
+
cardAccount() {
|
|
121
|
+
return this.request('GET', '/v1/bank/cards/account');
|
|
122
|
+
}
|
|
123
|
+
cardKYC() {
|
|
124
|
+
return this.request('GET', '/v1/bank/cards/kyc');
|
|
125
|
+
}
|
|
126
|
+
createVirtualCard() {
|
|
127
|
+
return this.request('POST', '/v1/bank/cards/virtual');
|
|
128
|
+
}
|
|
129
|
+
/** Sensitive: hand the URL straight to the user's browser; never log or persist it. */
|
|
130
|
+
cardKYCURL() {
|
|
131
|
+
return this.request('GET', '/v1/bank/cards/virtual/kyc-url');
|
|
132
|
+
}
|
|
133
|
+
/** Sensitive: hand the URL straight to the user's browser; never log or persist it. */
|
|
134
|
+
cardConsentURL() {
|
|
135
|
+
return this.request('GET', '/v1/bank/cards/virtual/consent-url');
|
|
136
|
+
}
|
|
137
|
+
orderVirtualCard() {
|
|
138
|
+
return this.request('POST', '/v1/bank/cards/virtual/order');
|
|
139
|
+
}
|
|
140
|
+
// Crypto
|
|
141
|
+
wallet() {
|
|
142
|
+
return this.request('GET', '/v1/bank/wallet');
|
|
143
|
+
}
|
|
144
|
+
cryptoPrices() {
|
|
145
|
+
return this.request('GET', '/v1/bank/crypto/prices');
|
|
146
|
+
}
|
|
147
|
+
sendCrypto(asset, amount, toAddress) {
|
|
148
|
+
return this.request('POST', '/v1/bank/crypto/send', { asset, amount, toAddress });
|
|
149
|
+
}
|
|
150
|
+
/** Sandbox-only testnet faucet. */
|
|
151
|
+
depositCrypto(asset, amount) {
|
|
152
|
+
return this.request('POST', '/v1/bank/crypto/deposit', { asset, amount });
|
|
153
|
+
}
|
|
154
|
+
// Exchange (fiat FX + crypto buy/sell/convert)
|
|
155
|
+
exchangeQuote(fromCurrency, toCurrency, amount) {
|
|
156
|
+
return this.request('POST', '/v1/bank/exchange/quote', { fromCurrency, toCurrency, amount });
|
|
157
|
+
}
|
|
158
|
+
exchange(fromCurrency, toCurrency, amount) {
|
|
159
|
+
return this.request('POST', '/v1/bank/exchange/execute', { fromCurrency, toCurrency, amount });
|
|
160
|
+
}
|
|
161
|
+
// Dealt FX
|
|
162
|
+
fxQuote(sellCurrency, buyCurrency, amount) {
|
|
163
|
+
return this.request('POST', '/v1/bank/fx/quote', { sellCurrency, buyCurrency, amount });
|
|
164
|
+
}
|
|
165
|
+
fxExecute(accountId, quoteId) {
|
|
166
|
+
return this.request('POST', '/v1/bank/fx/execute', { accountId, quoteId });
|
|
167
|
+
}
|
|
168
|
+
// Sandbox demo login (sandbox deployments only)
|
|
169
|
+
sandboxLogin(email, password) {
|
|
170
|
+
return this.request('POST', '/v1/bank/login', {
|
|
171
|
+
email,
|
|
172
|
+
password,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@luxfi/bank",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Typed client for the Lux banking API (/v1/bank) — accounts, payments, cards, crypto, FX, and membership plans.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/luxfi/bank.git",
|
|
9
|
+
"directory": "sdk"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "^5.9.0"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc"
|
|
29
|
+
}
|
|
30
|
+
}
|