@coin-voyage/shared 2.4.4-beta.0 → 2.4.4-beta.1
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.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CurrencyBase } from "../types";
|
|
2
1
|
export declare const FIAT_CURRENCIES: readonly ["USD", "EUR"];
|
|
3
2
|
export type FiatCurrency = (typeof FIAT_CURRENCIES)[number];
|
|
4
3
|
export interface CurrencyExchangeRate {
|
|
@@ -15,4 +14,3 @@ export declare const nonUsdCurrencies: {
|
|
|
15
14
|
currency: string;
|
|
16
15
|
decimals: number;
|
|
17
16
|
}[];
|
|
18
|
-
export declare function currencyID(currency: CurrencyBase): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { currencyID } from "
|
|
1
|
+
import { currencyID } from "../types/model";
|
|
2
2
|
const TOKEN_LIST_URL = "https://raw.githubusercontent.com/coin-voyage/token-list/main/tokenlist.json";
|
|
3
3
|
const normalizeAddress = (address) => address?.toLowerCase() ?? null;
|
|
4
4
|
export function tokenToCurrency(token) {
|
package/dist/types/model.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { FiatCurrency } from "../currency/currencies";
|
|
3
|
-
import { zPayOrderMetadata, zPayOrderSettings } from "../schemas/pay-order";
|
|
2
|
+
import type { FiatCurrency } from "../currency/currencies";
|
|
3
|
+
import type { zPayOrderMetadata, zPayOrderSettings } from "../schemas/pay-order";
|
|
4
4
|
import { ChainId, PaymentRail, PayOrderMode, PayOrderStatus, StepKind } from "./enums";
|
|
5
5
|
export type PayOrder = {
|
|
6
6
|
id: string;
|
|
@@ -34,6 +34,7 @@ export interface CurrencyBase {
|
|
|
34
34
|
chain_id: ChainId;
|
|
35
35
|
address?: string;
|
|
36
36
|
}
|
|
37
|
+
export declare function currencyID(currency: CurrencyBase): string;
|
|
37
38
|
export interface CurrencyWithAmount extends Currency {
|
|
38
39
|
currency_amount: CurrencyAmount;
|
|
39
40
|
}
|
package/dist/types/model.js
CHANGED