@coin-voyage/shared 2.4.4-beta.0 → 2.4.4
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/currency/currencies.d.ts +0 -2
- package/dist/currency/currencies.js +0 -3
- package/dist/currency/token-list.d.ts +1 -1
- package/dist/currency/token-list.js +1 -1
- package/dist/types/api.d.ts +4 -2
- package/dist/types/model.d.ts +3 -2
- package/dist/types/model.js +3 -1
- package/package.json +1 -1
|
@@ -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/api.d.ts
CHANGED
|
@@ -163,15 +163,17 @@ export type SwapQuoteResponse = {
|
|
|
163
163
|
input: QuoteWithBalance;
|
|
164
164
|
output: CurrencyWithAmount;
|
|
165
165
|
price_impact: number;
|
|
166
|
+
providers?: string[];
|
|
166
167
|
slippage_bps?: number;
|
|
167
168
|
swap_mode: SwapMode;
|
|
168
169
|
};
|
|
169
170
|
export type RouteQuote = QuoteWithBalance & {
|
|
170
171
|
quote_id: string;
|
|
171
172
|
output: CurrencyWithAmount;
|
|
172
|
-
swap_mode: SwapMode;
|
|
173
|
-
slippage_bps?: number;
|
|
174
173
|
price_impact: number;
|
|
174
|
+
providers?: string[];
|
|
175
|
+
slippage_bps?: number;
|
|
176
|
+
swap_mode: SwapMode;
|
|
175
177
|
};
|
|
176
178
|
export type QuoteWithBalance = QuoteWithCurrency & {
|
|
177
179
|
balance?: CurrencyAmount;
|
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