@heliofi/common-fe 0.2.295 → 0.2.296

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 +335 -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,331 @@ 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
+ createdAt: string;
206
+ updatedAt: string;
207
+ }
208
+ //#endregion
209
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalCurrenciesExchangeRate.entity.d.ts
210
+ declare class WithdrawalCurrenciesExchangeRate extends Entity {
211
+ minimalUnitRate: bigint;
212
+ decimalRate: string;
213
+ fromCurrencyId: string;
214
+ toCurrencyId: string;
215
+ fromCurrencySymbol: string;
216
+ fromBlockchainSymbol: BlockchainSymbol;
217
+ toCurrencySymbol: FIATCurrencies;
218
+ }
219
+ //#endregion
220
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalMinSupportedVersions.entity.d.ts
221
+ declare enum WithdrawalPackage {
222
+ HELIOFI_WITHDRAW_CORE = "@heliofi/withdraw-core",
223
+ HELIOFI_WITHDRAW_REACT = "@heliofi/withdraw-react",
224
+ }
225
+ declare class WithdrawalMinSupportedVersions extends Entity {
226
+ packages: Partial<Record<WithdrawalPackage, string>>;
227
+ }
228
+ //#endregion
229
+ //#region ../common/src/domain/model/feature-flags/entities/BetaFeature.entity.d.ts
230
+ declare enum BetaFeature {
231
+ SWAP = "SWAP",
232
+ MOONPAY_HEADLESS_FRAMES = "MOONPAY_HEADLESS_FRAMES",
233
+ GLIDE_DEPOSITS = "GLIDE_DEPOSITS",
234
+ CHECKOUT_V2 = "checkout_v2",
235
+ }
236
+ //#endregion
237
+ //#region ../common/src/domain/model/theme/entities/CustomTheme.entity.d.ts
238
+ declare class CustomTheme extends Entity {
239
+ primaryColor: string;
240
+ neutralColor: string;
241
+ textColorOnButton: TextColor;
242
+ themeMode: ThemeMode;
243
+ backgroundColor?: string;
244
+ }
245
+ //#endregion
246
+ //#region ../common/src/domain/model/company/entities/BaseCompany.entity.d.ts
247
+ declare class BaseCompany extends Entity {
248
+ id: string;
249
+ name?: string;
250
+ email?: string;
251
+ logoUrl?: string;
252
+ defaultCheckoutImageUrl?: string;
253
+ websiteUrl?: string;
254
+ twitterUsername?: string;
255
+ discordUsername?: string;
256
+ address?: string;
257
+ phoneNumber?: string;
258
+ twitterConfirmed?: boolean;
259
+ escrowFunds?: boolean;
260
+ tradingViewDetails?: string;
261
+ kycVerified?: boolean;
262
+ kybVerified?: boolean;
263
+ isVerificationRequired: boolean;
264
+ moonpayApiKey?: string;
265
+ moonpayIsEnabled?: boolean;
266
+ onramperIsEnabled?: boolean;
267
+ ironIsEnabled?: boolean;
268
+ onrampDirectlyToMerchant?: boolean;
269
+ showWeb3Auth?: boolean;
270
+ customTheme?: CustomTheme;
271
+ defaultThemeId?: string;
272
+ allowDeposit?: boolean;
273
+ enabledRestrictedDepositEngines?: BlockchainEngineType[];
274
+ enabledBetaFeatures: BetaFeature[];
275
+ verifiedEntity?: {
276
+ entityName?: string;
277
+ country?: string;
278
+ };
279
+ }
280
+ //#endregion
281
+ //#region ../common/src/domain/model/withdraw/entities/PublicWithdrawalConfig.entity.d.ts
282
+ declare class PublicWithdrawalConfigEntity extends WithdrawalConfigEntity {
283
+ fromCurrencies: SlimCurrencyWithPopulatedBlockchain[];
284
+ exchangeRates: WithdrawalCurrenciesExchangeRate[];
285
+ minSupportedVersions: WithdrawalMinSupportedVersions;
286
+ company: BaseCompany;
287
+ }
288
+ //#endregion
289
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalCustomerSwapRoute.entity.d.ts
290
+ declare class WithdrawalCustomerSwapRoute {
291
+ id: string;
292
+ fromCurrencyId: string;
293
+ toCurrency: SlimCurrencyWithPopulatedBlockchain;
294
+ available: boolean;
295
+ minimumAmountMinimalUnit: string | null;
296
+ minimumAmountUsd: string;
297
+ }
298
+ //#endregion
299
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalCustomerSwapRoutesResponse.entity.d.ts
300
+ declare class WithdrawalCustomerSwapRoutesResponse {
301
+ fromCurrencies: SlimCurrencyWithPopulatedBlockchain[];
302
+ routes: WithdrawalCustomerSwapRoute[];
303
+ }
304
+ //#endregion
305
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalBalancesResponse.entity.d.ts
306
+ declare class WithdrawalBalancesResponse {
307
+ walletAddress: string;
308
+ balances: WalletCurrencyBalance[];
309
+ }
310
+ //#endregion
311
+ //#region ../common/src/domain/model/withdraw/entities/SubmitWithdrawal.entity.d.ts
312
+ declare class SubmitWithdrawalEntity extends Entity {
313
+ withdrawalDetailId: string;
314
+ txHash: string | null;
315
+ state: WithdrawalState;
316
+ broadcastAck: BroadcastAck | null;
317
+ }
318
+ //#endregion
319
+ //#region ../common/src/domain/model/currency/entities/Currency.entity.d.ts
320
+ declare class Currency extends BaseCurrency {
321
+ blockchain: Blockchain;
322
+ }
323
+ //#endregion
324
+ //#region ../common/src/domain/model/withdraw/entities/WithdrawalQuoteFee.entity.d.ts
325
+ declare class WithdrawalQuoteFeeEntity extends Entity {
326
+ amount: string;
327
+ currency: Currency | null;
328
+ }
329
+ //#endregion
330
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawalTypedDataDomain.dto.d.ts
331
+ declare class PreparedWithdrawalTypedDataDomainDto {
332
+ name: string;
333
+ version: string;
334
+ chainId: number;
335
+ verifyingContract: string;
336
+ }
337
+ //#endregion
338
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawalTypedDataField.dto.d.ts
339
+ declare class PreparedWithdrawalTypedDataFieldDto {
340
+ name: string;
341
+ type: string;
342
+ }
343
+ //#endregion
344
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawalTypedData.dto.d.ts
345
+ declare class PreparedWithdrawalTypedDataDto {
346
+ domain: PreparedWithdrawalTypedDataDomainDto;
347
+ types: Record<string, PreparedWithdrawalTypedDataFieldDto[]>;
348
+ primaryType: string;
349
+ message: Record<string, unknown>;
350
+ }
351
+ //#endregion
352
+ //#region ../common/src/domain/model/withdraw/dtos/preparedTransaction.dto.d.ts
353
+ type PreparedTransaction = PolymarketWalletPreparedTransaction | RawPreparedTransaction | UserOpPreparedTransaction | HypercorePreparedTransaction;
354
+ interface PolymarketWalletPreparedTransaction {
355
+ kind: SignedTransactionKind.POLYMARKET_WALLET;
356
+ typedData: PreparedWithdrawalTypedDataDto;
357
+ }
358
+ interface RawPreparedTransaction {
359
+ kind: SignedTransactionKind.RAW;
360
+ chain: BlockchainSymbol | DepositBlockchainSymbol;
361
+ unsignedTx: string;
362
+ }
363
+ interface HypercorePreparedTransaction {
364
+ kind: SignedTransactionKind.HYPERCORE;
365
+ chain: BlockchainSymbol | DepositBlockchainSymbol;
366
+ typedData: PreparedWithdrawalTypedDataDto;
367
+ }
368
+ interface UserOpPreparedTransaction {
369
+ kind: SignedTransactionKind.USER_OP;
370
+ chain: BlockchainSymbol;
371
+ userOp: Record<string, unknown>;
372
+ entryPoint: string;
373
+ authorization?: {
374
+ chainId: string;
375
+ address: string;
376
+ nonce: string;
377
+ };
378
+ }
379
+ //#endregion
380
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawalSummary.dto.d.ts
381
+ declare class PreparedWithdrawalSummaryDto {
382
+ sourceToken: string;
383
+ sourceAmount: string;
384
+ destinationToken: string;
385
+ destinationAmount: string;
386
+ destinationAmountMin: string;
387
+ destinationAmountUsd?: string;
388
+ destinationAmountMinUsd?: string;
389
+ maxSlippageBps: number;
390
+ estimatedPriceImpact?: number;
391
+ bridgeFee: WithdrawalQuoteFeeEntity;
392
+ applicationFee: WithdrawalQuoteFeeEntity;
393
+ protocolFee: WithdrawalQuoteFeeEntity;
394
+ totalFee: WithdrawalQuoteFeeEntity;
395
+ expiresAt: string;
396
+ }
397
+ //#endregion
398
+ //#region ../common/src/domain/model/withdraw/entities/PreparedWithdrawal.entity.d.ts
399
+ declare class PreparedWithdrawalEntity extends Entity {
400
+ withdrawalDetailId: string;
401
+ token: string;
402
+ prepared: PreparedTransaction;
403
+ summary: PreparedWithdrawalSummaryDto;
404
+ }
405
+ //#endregion
406
+ //#region ../common/src/domain/model/withdraw/dtos/preparedWithdrawal.dto.d.ts
407
+ declare class PreparedWithdrawalDto {
408
+ ownerAddress: string;
409
+ recipient: string;
410
+ amount: string;
411
+ toCurrencyId: string;
412
+ sourceCurrencyId: string;
413
+ customerId?: string;
414
+ }
415
+ //#endregion
416
+ //#region ../common/src/domain/model/withdraw/dtos/submitWithdrawal.dto.d.ts
417
+ declare class SubmitWithdrawalDto {
418
+ token: string;
419
+ signedTx: string;
420
+ }
421
+ //#endregion
422
+ 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.296",
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": "bb4e8d793bac780042bdb25a3f380635c981441c"
33
33
  }