@lifi/types
Advanced tools
Comparing version 16.3.0 to 16.4.1-beta.0
{ | ||
"name": "@lifi/types", | ||
"description": "Types for the LI.FI stack", | ||
"version": "16.3.0", | ||
"version": "16.4.1-beta.0", | ||
"files": [ | ||
@@ -6,0 +6,0 @@ "src", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.IntegratorFeeType = exports.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports.isContractCallsRequestWithToAmount = exports.isContractCallsRequestWithFromAmount = exports.TokenHistoricGranularity = exports._InsuranceState = exports.Orders = void 0; | ||
exports.IntegratorFeeType = exports.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports.isContractCallsRequestWithToAmount = exports.isContractCallsRequestWithFromAmount = exports._InsuranceState = exports.Orders = void 0; | ||
exports.Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST']; | ||
@@ -10,9 +10,2 @@ exports._InsuranceState = [ | ||
]; | ||
var TokenHistoricGranularity; | ||
(function (TokenHistoricGranularity) { | ||
TokenHistoricGranularity["THIRTY_MIN"] = "30min"; | ||
TokenHistoricGranularity["HOUR"] = "hour"; | ||
TokenHistoricGranularity["DAY"] = "day"; | ||
TokenHistoricGranularity["OVER_DAY"] = ">day"; | ||
})(TokenHistoricGranularity || (exports.TokenHistoricGranularity = TokenHistoricGranularity = {})); | ||
const isContractCallsRequestWithFromAmount = (r) => 'fromAmount' in r; | ||
@@ -19,0 +12,0 @@ exports.isContractCallsRequestWithFromAmount = isContractCallsRequestWithFromAmount; |
@@ -45,2 +45,3 @@ "use strict"; | ||
ChainKey["OPB"] = "opb"; | ||
ChainKey["WCC"] = "wcc"; | ||
ChainKey["SOL"] = "sol"; | ||
@@ -95,2 +96,3 @@ ChainKey["TER"] = "ter"; | ||
ChainId[ChainId["OPB"] = 204] = "OPB"; | ||
ChainId[ChainId["WCC"] = 480] = "WCC"; | ||
ChainId[ChainId["SOL"] = 1151111081099710] = "SOL"; | ||
@@ -97,0 +99,0 @@ ChainId[ChainId["TER"] = 1161011141099710] = "TER"; |
@@ -31,2 +31,3 @@ "use strict"; | ||
CoinKey["OKB"] = "OKB"; | ||
CoinKey["WLD"] = "WLD"; | ||
CoinKey["SOL"] = "SOL"; | ||
@@ -33,0 +34,0 @@ CoinKey["WSOL"] = "wSOL"; |
@@ -14,9 +14,2 @@ /** | ||
]; | ||
export var TokenHistoricGranularity; | ||
(function (TokenHistoricGranularity) { | ||
TokenHistoricGranularity["THIRTY_MIN"] = "30min"; | ||
TokenHistoricGranularity["HOUR"] = "hour"; | ||
TokenHistoricGranularity["DAY"] = "day"; | ||
TokenHistoricGranularity["OVER_DAY"] = ">day"; | ||
})(TokenHistoricGranularity || (TokenHistoricGranularity = {})); | ||
export const isContractCallsRequestWithFromAmount = (r) => 'fromAmount' in r; | ||
@@ -23,0 +16,0 @@ export const isContractCallsRequestWithToAmount = (r) => 'toAmount' in r; |
@@ -43,2 +43,3 @@ export var ChainKey; | ||
ChainKey["OPB"] = "opb"; | ||
ChainKey["WCC"] = "wcc"; | ||
// None-EVM | ||
@@ -95,2 +96,3 @@ ChainKey["SOL"] = "sol"; | ||
ChainId[ChainId["OPB"] = 204] = "OPB"; | ||
ChainId[ChainId["WCC"] = 480] = "WCC"; | ||
// None-EVM (IDs are made up by the LI.FI team) | ||
@@ -97,0 +99,0 @@ ChainId[ChainId["SOL"] = 1151111081099710] = "SOL"; |
@@ -28,2 +28,3 @@ export var CoinKey; | ||
CoinKey["OKB"] = "OKB"; | ||
CoinKey["WLD"] = "WLD"; | ||
// Solana | ||
@@ -30,0 +31,0 @@ CoinKey["SOL"] = "SOL"; |
import type { BridgeDefinition } from './bridges.js'; | ||
import type { Chain, ChainId, ChainKey, ChainType } from './chains/index.js'; | ||
import type { ExchangeDefinition } from './exchanges.js'; | ||
import type { Action, FeeCost, LiFiStep, StepToolDetails } from './step.js'; | ||
import type { Action, Estimate, LiFiStep, StepToolDetails } from './step.js'; | ||
import type { Token } from './tokens/index.js'; | ||
@@ -210,22 +210,2 @@ /** | ||
} | ||
export declare enum TokenHistoricGranularity { | ||
THIRTY_MIN = "30min", | ||
HOUR = "hour", | ||
DAY = "day", | ||
OVER_DAY = ">day" | ||
} | ||
export interface GetTokenHistoricRequest { | ||
chain: number | string; | ||
token: string; | ||
timestamp: number; | ||
granularity?: TokenHistoricGranularity; | ||
} | ||
export interface TokenPriceHistoricResponse { | ||
chainId: number; | ||
tokenAddress: string; | ||
isNativeToken: boolean; | ||
priceUSD: number; | ||
timestamp: number; | ||
granularity: TokenHistoricGranularity; | ||
} | ||
export interface ToolConfiguration { | ||
@@ -400,7 +380,10 @@ allowBridges?: string[]; | ||
}; | ||
export type StatusStepTransaction = { | ||
estimate: Estimate; | ||
}; | ||
export interface FullStatusData extends StatusData { | ||
transactionId: string; | ||
stepTransaction?: StatusStepTransaction; | ||
sending: ExtendedTransactionInfo; | ||
receiving: PendingReceivingInfo | ExtendedTransactionInfo; | ||
feeCosts: FeeCost[]; | ||
lifiExplorerLink: string; | ||
@@ -407,0 +390,0 @@ fromAddress: string; |
@@ -41,2 +41,3 @@ export declare enum ChainKey { | ||
OPB = "opb", | ||
WCC = "wcc", | ||
SOL = "sol", | ||
@@ -90,2 +91,3 @@ TER = "ter", | ||
OPB = 204, | ||
WCC = 480, | ||
SOL = 1151111081099710, | ||
@@ -92,0 +94,0 @@ TER = 1161011141099710, |
@@ -27,2 +27,3 @@ export declare enum CoinKey { | ||
OKB = "OKB", | ||
WLD = "WLD",// World Coin Token | ||
SOL = "SOL", | ||
@@ -29,0 +30,0 @@ WSOL = "wSOL", |
import type { BridgeDefinition } from './bridges.js' | ||
import type { Chain, ChainId, ChainKey, ChainType } from './chains/index.js' | ||
import type { ExchangeDefinition } from './exchanges.js' | ||
import type { Action, FeeCost, LiFiStep, StepToolDetails } from './step.js' | ||
import type { Action, Estimate, LiFiStep, StepToolDetails } from './step.js' | ||
import type { Token } from './tokens/index.js' | ||
@@ -252,25 +252,2 @@ | ||
export enum TokenHistoricGranularity { | ||
THIRTY_MIN = '30min', | ||
HOUR = 'hour', | ||
DAY = 'day', | ||
OVER_DAY = '>day', | ||
} | ||
export interface GetTokenHistoricRequest { | ||
chain: number | string | ||
token: string | ||
timestamp: number | ||
granularity?: TokenHistoricGranularity | ||
} | ||
export interface TokenPriceHistoricResponse { | ||
chainId: number | ||
tokenAddress: string | ||
isNativeToken: boolean | ||
priceUSD: number | ||
timestamp: number | ||
granularity: TokenHistoricGranularity | ||
} | ||
export interface ToolConfiguration { | ||
@@ -544,7 +521,11 @@ allowBridges?: string[] | ||
export type StatusStepTransaction = { | ||
estimate: Estimate | ||
} | ||
export interface FullStatusData extends StatusData { | ||
transactionId: string | ||
stepTransaction?: StatusStepTransaction | ||
sending: ExtendedTransactionInfo | ||
receiving: PendingReceivingInfo | ExtendedTransactionInfo | ||
feeCosts: FeeCost[] | ||
lifiExplorerLink: string | ||
@@ -551,0 +532,0 @@ fromAddress: string |
@@ -42,2 +42,3 @@ export enum ChainKey { | ||
OPB = 'opb', | ||
WCC = 'wcc', | ||
@@ -96,2 +97,3 @@ // None-EVM | ||
OPB = 204, | ||
WCC = 480, | ||
@@ -98,0 +100,0 @@ // None-EVM (IDs are made up by the LI.FI team) |
@@ -27,2 +27,3 @@ export enum CoinKey { | ||
OKB = 'OKB', | ||
WLD = 'WLD', // World Coin Token | ||
@@ -29,0 +30,0 @@ // Solana |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
130664
2676
2