@heliofi/common-fe 0.2.295 → 0.2.297

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +373 -1
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -11,6 +11,13 @@ declare enum BlockchainSymbol {
11
11
  DOGE = "DOGE",
12
12
  TON = "TON",
13
13
  }
14
+ declare enum DepositBlockchainSymbol {
15
+ ABSTRACT = "ABSTRACT",
16
+ HYPERLIQUID = "HYPERLIQUID",
17
+ HYPERCORE = "HYPERCORE",
18
+ PLASMA = "PLASMA",
19
+ MEGAETH = "MEGAETH",
20
+ }
14
21
  //#endregion
15
22
  //#region ../common/src/domain/model/blockchainEngine/constants/BlockchainEngineType.d.ts
16
23
  declare enum BlockchainEngineType {
@@ -85,4 +92,369 @@ declare enum ThemeMode {
85
92
  DARK = "DARK",
86
93
  }
87
94
  //#endregion
88
- export { BlockchainEngineType, BlockchainSymbol, BroadcastAck, GeneralNetwork, Platform, SignedTransactionKind, TextColor, ThemeMode, ThemeType, WithdrawalFeature, WithdrawalState };
95
+ //#region ../common/src/domain/model/entity/Entity.d.ts
96
+ declare class Entity {
97
+ static fromObject<T extends Entity>(record: T): T;
98
+ static fromObjects<T extends Entity>(records: T[]): T[];
99
+ }
100
+ //#endregion
101
+ //#region ../common/src/domain/model/blockchainEngine/entities/BlockchainEngine.entity.d.ts
102
+ declare class BlockchainEngine extends Entity {
103
+ id: string;
104
+ type: BlockchainEngineType;
105
+ addressRegex?: string;
106
+ }
107
+ //#endregion
108
+ //#region ../common/src/domain/model/blockchain/entities/BaseBlockchain.entity.d.ts
109
+ declare class BaseBlockchain extends Entity {
110
+ id: string;
111
+ name: string;
112
+ displayName: string;
113
+ symbol: BlockchainSymbol;
114
+ iconUrl?: string;
115
+ iconUrlFull?: string;
116
+ }
117
+ //#endregion
118
+ //#region ../common/src/domain/model/blockchain/entities/Blockchain.entity.d.ts
119
+ declare class Blockchain extends BaseBlockchain {
120
+ engine: BlockchainEngine;
121
+ }
122
+ //#endregion
123
+ //#region ../common/src/domain/model/currency/entities/CurrencyType.d.ts
124
+ declare enum CurrencyType {
125
+ FIAT = "FIAT",
126
+ DIGITAL = "DIGITAL",
127
+ }
128
+ //#endregion
129
+ //#region ../common/src/domain/model/currency/entities/CurrencyFeature.d.ts
130
+ declare enum CurrencyFeature {
131
+ PAYMENT_PRICING = "PAYMENT_PRICING",
132
+ PAYMENT_RECIPIENT = "PAYMENT_RECIPIENT",
133
+ SWAP = "SWAP",
134
+ DEPOSIT_MERCHANT_RECIPIENT = "DEPOSIT_MERCHANT_RECIPIENT",
135
+ DEPOSIT_CUSTOMER_CHECKOUT = "DEPOSIT_CUSTOMER_CHECKOUT",
136
+ DEPOSIT_PAYLINK_CUSTOMER_CHECKOUT = "DEPOSIT_PAYLINK_CUSTOMER_CHECKOUT",
137
+ WITHDRAWAL_SOURCE = "WITHDRAWAL_SOURCE",
138
+ WITHDRAWAL_DESTINATION = "WITHDRAWAL_DESTINATION",
139
+ USD_RATE = "USD_RATE",
140
+ STABLECOIN = "STABLECOIN",
141
+ USD_STABLE = "USD_STABLE",
142
+ NATIVE_TOKEN = "NATIVE_TOKEN",
143
+ }
144
+ //#endregion
145
+ //#region ../common/src/domain/model/currency/entities/OrderingType.d.ts
146
+ declare enum OrderingType {
147
+ ALPHABETICAL = "ALPHABETICAL",
148
+ NUMERIC = "NUMERIC",
149
+ }
150
+ //#endregion
151
+ //#region ../common/src/domain/model/currency/entities/BaseCurrency.entity.d.ts
152
+ declare class BaseCurrency extends Entity {
153
+ id: string;
154
+ symbol: string;
155
+ name: string;
156
+ mintAddress: string;
157
+ coinMarketCapId: number;
158
+ decimals: number;
159
+ minDecimals?: number;
160
+ symbolPrefix?: string;
161
+ order: number;
162
+ type?: CurrencyType;
163
+ features?: CurrencyFeature[];
164
+ iconUrl?: string;
165
+ iconUrlFull?: string;
166
+ orderingType?: OrderingType;
167
+ isNative?: boolean;
168
+ }
169
+ //#endregion
170
+ //#region ../common/src/domain/model/currency/entities/SlimCurrencyWithBlockchain.entity.d.ts
171
+ type SlimCurrencyWithBlockchain = Omit<BaseCurrency, 'order' | 'orderingType' | 'features' | 'minDecimals' | 'iconUrl'> & {
172
+ blockchain: BaseBlockchain;
173
+ };
174
+ //#endregion
175
+ //#region ../common/src/domain/model/currency/entities/SlimCurrencyWithPopulatedBlockchain.entity.d.ts
176
+ type SlimCurrencyWithPopulatedBlockchain = Omit<SlimCurrencyWithBlockchain, 'blockchain'> & {
177
+ blockchain: Blockchain;
178
+ };
179
+ //#endregion
180
+ //#region ../common/src/domain/model/wallet-balance/entities/WalletCurrencyBalance.entity.d.ts
181
+ declare class WalletCurrencyBalance {
182
+ currencyId: string;
183
+ symbol: string;
184
+ mintAddress: string;
185
+ balance: string | null;
186
+ uiBalance: string | null;
187
+ maxWithdrawableAmount: string | null;
188
+ uiMaxWithdrawableAmount: string | null;
189
+ }
190
+ //#endregion
191
+ //#region ../common/src/domain/constants/fiatCurrencies.d.ts
192
+ declare enum FIATCurrencies {
193
+ USD = "USD",
194
+ }
195
+ //#endregion
196
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalConfig.entity.d.ts
197
+ declare class WithdrawalConfigEntity extends Entity {
198
+ id: string;
199
+ name: string;
200
+ platform: Platform;
201
+ disabled: boolean;
202
+ disabledAt: string | null;
203
+ disabledBlockchainSymbols: BlockchainSymbol[];
204
+ enabledFeatures: WithdrawalFeature[];
205
+ themeId?: string;
206
+ createdAt: string;
207
+ updatedAt: string;
208
+ }
209
+ //#endregion
210
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalCurrenciesExchangeRate.entity.d.ts
211
+ declare class WithdrawalCurrenciesExchangeRate extends Entity {
212
+ minimalUnitRate: bigint;
213
+ decimalRate: string;
214
+ fromCurrencyId: string;
215
+ toCurrencyId: string;
216
+ fromCurrencySymbol: string;
217
+ fromBlockchainSymbol: BlockchainSymbol;
218
+ toCurrencySymbol: FIATCurrencies;
219
+ }
220
+ //#endregion
221
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalMinSupportedVersions.entity.d.ts
222
+ declare enum WithdrawalPackage {
223
+ HELIOFI_WITHDRAW_CORE = "@heliofi/withdraw-core",
224
+ HELIOFI_WITHDRAW_REACT = "@heliofi/withdraw-react",
225
+ }
226
+ declare class WithdrawalMinSupportedVersions extends Entity {
227
+ packages: Partial<Record<WithdrawalPackage, string>>;
228
+ }
229
+ //#endregion
230
+ //#region ../common/src/domain/model/feature-flags/entities/BetaFeature.entity.d.ts
231
+ declare enum BetaFeature {
232
+ SWAP = "SWAP",
233
+ MOONPAY_HEADLESS_FRAMES = "MOONPAY_HEADLESS_FRAMES",
234
+ GLIDE_DEPOSITS = "GLIDE_DEPOSITS",
235
+ CHECKOUT_V2 = "checkout_v2",
236
+ }
237
+ //#endregion
238
+ //#region ../common/src/domain/model/theme/entities/CustomTheme.entity.d.ts
239
+ declare class CustomTheme extends Entity {
240
+ primaryColor: string;
241
+ neutralColor: string;
242
+ textColorOnButton: TextColor;
243
+ themeMode: ThemeMode;
244
+ backgroundColor?: string;
245
+ }
246
+ //#endregion
247
+ //#region ../common/src/domain/model/theme/entities/ThemePalette.entity.d.ts
248
+ declare class ThemePalette {
249
+ primaryColor: string;
250
+ neutralColor: string;
251
+ backgroundColor: string;
252
+ successColor?: string;
253
+ dangerColor?: string;
254
+ warningColor?: string;
255
+ }
256
+ //#endregion
257
+ //#region ../common/src/domain/model/theme/entities/ThemeDesignTokens.entity.d.ts
258
+ declare class ThemeDesignTokens {
259
+ containerBorderRadius: number;
260
+ inputBorderRadius: number;
261
+ buttonBorderRadius: number;
262
+ containerBorderWidth: number;
263
+ inputBorderWidth: number;
264
+ fontFamily: string | null;
265
+ padding: number;
266
+ }
267
+ //#endregion
268
+ //#region ../common/src/domain/model/theme/entities/Theme.entity.d.ts
269
+ declare class Theme extends Entity {
270
+ id: string;
271
+ companyId?: string;
272
+ name: string;
273
+ light: ThemePalette;
274
+ dark: ThemePalette;
275
+ designTokens: ThemeDesignTokens;
276
+ type: ThemeType;
277
+ slug?: string;
278
+ isDefault?: boolean;
279
+ createdAt: string;
280
+ updatedAt: string;
281
+ }
282
+ //#endregion
283
+ //#region ../common/src/domain/model/company/entities/BaseCompany.entity.d.ts
284
+ declare class BaseCompany extends Entity {
285
+ id: string;
286
+ name?: string;
287
+ email?: string;
288
+ logoUrl?: string;
289
+ defaultCheckoutImageUrl?: string;
290
+ websiteUrl?: string;
291
+ twitterUsername?: string;
292
+ discordUsername?: string;
293
+ address?: string;
294
+ phoneNumber?: string;
295
+ twitterConfirmed?: boolean;
296
+ escrowFunds?: boolean;
297
+ tradingViewDetails?: string;
298
+ kycVerified?: boolean;
299
+ kybVerified?: boolean;
300
+ isVerificationRequired: boolean;
301
+ moonpayApiKey?: string;
302
+ moonpayIsEnabled?: boolean;
303
+ onramperIsEnabled?: boolean;
304
+ ironIsEnabled?: boolean;
305
+ onrampDirectlyToMerchant?: boolean;
306
+ showWeb3Auth?: boolean;
307
+ customTheme?: CustomTheme;
308
+ defaultThemeId?: string;
309
+ allowDeposit?: boolean;
310
+ enabledRestrictedDepositEngines?: BlockchainEngineType[];
311
+ enabledBetaFeatures: BetaFeature[];
312
+ verifiedEntity?: {
313
+ entityName?: string;
314
+ country?: string;
315
+ };
316
+ }
317
+ //#endregion
318
+ //#region ../common/src/domain/model/withdraw/entities/PublicWithdrawalConfig.entity.d.ts
319
+ declare class PublicWithdrawalConfigEntity extends WithdrawalConfigEntity {
320
+ fromCurrencies: SlimCurrencyWithPopulatedBlockchain[];
321
+ exchangeRates: WithdrawalCurrenciesExchangeRate[];
322
+ minSupportedVersions: WithdrawalMinSupportedVersions;
323
+ company: BaseCompany;
324
+ theme?: Theme | null;
325
+ }
326
+ //#endregion
327
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalCustomerSwapRoute.entity.d.ts
328
+ declare class WithdrawalCustomerSwapRoute {
329
+ id: string;
330
+ fromCurrencyId: string;
331
+ toCurrency: SlimCurrencyWithPopulatedBlockchain;
332
+ available: boolean;
333
+ minimumAmountMinimalUnit: string | null;
334
+ minimumAmountUsd: string;
335
+ }
336
+ //#endregion
337
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalCustomerSwapRoutesResponse.entity.d.ts
338
+ declare class WithdrawalCustomerSwapRoutesResponse {
339
+ fromCurrencies: SlimCurrencyWithPopulatedBlockchain[];
340
+ routes: WithdrawalCustomerSwapRoute[];
341
+ }
342
+ //#endregion
343
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalBalancesResponse.entity.d.ts
344
+ declare class WithdrawalBalancesResponse {
345
+ walletAddress: string;
346
+ balances: WalletCurrencyBalance[];
347
+ }
348
+ //#endregion
349
+ //#region ../common/src/domain/model/withdraw/entities/SubmitWithdrawal.entity.d.ts
350
+ declare class SubmitWithdrawalEntity extends Entity {
351
+ withdrawalDetailId: string;
352
+ txHash: string | null;
353
+ state: WithdrawalState;
354
+ broadcastAck: BroadcastAck | null;
355
+ }
356
+ //#endregion
357
+ //#region ../common/src/domain/model/currency/entities/Currency.entity.d.ts
358
+ declare class Currency extends BaseCurrency {
359
+ blockchain: Blockchain;
360
+ }
361
+ //#endregion
362
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalQuoteFee.entity.d.ts
363
+ declare class WithdrawalQuoteFeeEntity extends Entity {
364
+ amount: string;
365
+ currency: Currency | null;
366
+ }
367
+ //#endregion
368
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawalTypedDataDomain.dto.d.ts
369
+ declare class PreparedWithdrawalTypedDataDomainDto {
370
+ name: string;
371
+ version: string;
372
+ chainId: number;
373
+ verifyingContract: string;
374
+ }
375
+ //#endregion
376
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawalTypedDataField.dto.d.ts
377
+ declare class PreparedWithdrawalTypedDataFieldDto {
378
+ name: string;
379
+ type: string;
380
+ }
381
+ //#endregion
382
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawalTypedData.dto.d.ts
383
+ declare class PreparedWithdrawalTypedDataDto {
384
+ domain: PreparedWithdrawalTypedDataDomainDto;
385
+ types: Record<string, PreparedWithdrawalTypedDataFieldDto[]>;
386
+ primaryType: string;
387
+ message: Record<string, unknown>;
388
+ }
389
+ //#endregion
390
+ //#region ../common/src/domain/model/withdraw/dtos/preparedTransaction.dto.d.ts
391
+ type PreparedTransaction = PolymarketWalletPreparedTransaction | RawPreparedTransaction | UserOpPreparedTransaction | HypercorePreparedTransaction;
392
+ interface PolymarketWalletPreparedTransaction {
393
+ kind: SignedTransactionKind.POLYMARKET_WALLET;
394
+ typedData: PreparedWithdrawalTypedDataDto;
395
+ }
396
+ interface RawPreparedTransaction {
397
+ kind: SignedTransactionKind.RAW;
398
+ chain: BlockchainSymbol | DepositBlockchainSymbol;
399
+ unsignedTx: string;
400
+ }
401
+ interface HypercorePreparedTransaction {
402
+ kind: SignedTransactionKind.HYPERCORE;
403
+ chain: BlockchainSymbol | DepositBlockchainSymbol;
404
+ typedData: PreparedWithdrawalTypedDataDto;
405
+ }
406
+ interface UserOpPreparedTransaction {
407
+ kind: SignedTransactionKind.USER_OP;
408
+ chain: BlockchainSymbol;
409
+ userOp: Record<string, unknown>;
410
+ entryPoint: string;
411
+ authorization?: {
412
+ chainId: string;
413
+ address: string;
414
+ nonce: string;
415
+ };
416
+ }
417
+ //#endregion
418
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawalSummary.dto.d.ts
419
+ declare class PreparedWithdrawalSummaryDto {
420
+ sourceToken: string;
421
+ sourceAmount: string;
422
+ destinationToken: string;
423
+ destinationAmount: string;
424
+ destinationAmountMin: string;
425
+ destinationAmountUsd?: string;
426
+ destinationAmountMinUsd?: string;
427
+ maxSlippageBps: number;
428
+ estimatedPriceImpact?: number;
429
+ bridgeFee: WithdrawalQuoteFeeEntity;
430
+ applicationFee: WithdrawalQuoteFeeEntity;
431
+ protocolFee: WithdrawalQuoteFeeEntity;
432
+ totalFee: WithdrawalQuoteFeeEntity;
433
+ expiresAt: string;
434
+ }
435
+ //#endregion
436
+ //#region ../common/src/domain/model/withdraw/entities/PreparedWithdrawal.entity.d.ts
437
+ declare class PreparedWithdrawalEntity extends Entity {
438
+ withdrawalDetailId: string;
439
+ token: string;
440
+ prepared: PreparedTransaction;
441
+ summary: PreparedWithdrawalSummaryDto;
442
+ }
443
+ //#endregion
444
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawal.dto.d.ts
445
+ declare class PreparedWithdrawalDto {
446
+ ownerAddress: string;
447
+ recipient: string;
448
+ amount: string;
449
+ toCurrencyId: string;
450
+ sourceCurrencyId: string;
451
+ customerId?: string;
452
+ }
453
+ //#endregion
454
+ //#region ../common/src/domain/model/withdraw/dtos/submitWithdrawal.dto.d.ts
455
+ declare class SubmitWithdrawalDto {
456
+ token: string;
457
+ signedTx: string;
458
+ }
459
+ //#endregion
460
+ export { type BaseBlockchain, type Blockchain, type BlockchainEngine, BlockchainEngineType, BlockchainSymbol, BroadcastAck, GeneralNetwork, type HypercorePreparedTransaction, Platform, type PolymarketWalletPreparedTransaction, type PreparedTransaction, type PreparedWithdrawalDto, type PreparedWithdrawalEntity, type PreparedWithdrawalSummaryDto, type PreparedWithdrawalTypedDataDto, type PublicWithdrawalConfigEntity, type RawPreparedTransaction, SignedTransactionKind, type SlimCurrencyWithBlockchain, type SlimCurrencyWithPopulatedBlockchain, type SubmitWithdrawalDto, type SubmitWithdrawalEntity, TextColor, ThemeMode, ThemeType, type UserOpPreparedTransaction, type WalletCurrencyBalance, type WithdrawalBalancesResponse, type WithdrawalCurrenciesExchangeRate, type WithdrawalCustomerSwapRoute, type WithdrawalCustomerSwapRoutesResponse, WithdrawalFeature, type WithdrawalMinSupportedVersions, type WithdrawalQuoteFeeEntity, WithdrawalState };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heliofi/common-fe",
3
- "version": "0.2.295",
3
+ "version": "0.2.297",
4
4
  "private": false,
5
5
  "description": "Zero-dependency, frontend-safe shared enums (and, later, DTO type shapes) for Helio consumers. No class-validator / reflect-metadata / heavy blockchain deps.",
6
6
  "license": "ISC",
@@ -29,5 +29,5 @@
29
29
  "peerDependencies": {
30
30
  "typescript": "5.*"
31
31
  },
32
- "gitHead": "773ef14b626fded2f03b33ceb0fb6a18f20bdd1d"
32
+ "gitHead": "c6440aeb452923e2e6e57a11893383e075a2123f"
33
33
  }