@lifi/types
Advanced tools
Comparing version 16.4.1-beta.0 to 16.4.1
{ | ||
"name": "@lifi/types", | ||
"description": "Types for the LI.FI stack", | ||
"version": "16.4.1-beta.0", | ||
"version": "16.4.1", | ||
"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._InsuranceState = exports.Orders = void 0; | ||
exports.IntegratorFeeType = exports.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports.isContractCallsRequestWithToAmount = exports.isContractCallsRequestWithFromAmount = exports.TokenHistoricGranularity = exports._InsuranceState = exports.Orders = void 0; | ||
exports.Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST']; | ||
@@ -10,2 +10,9 @@ 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; | ||
@@ -12,0 +19,0 @@ exports.isContractCallsRequestWithFromAmount = isContractCallsRequestWithFromAmount; |
@@ -14,2 +14,9 @@ /** | ||
]; | ||
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; | ||
@@ -16,0 +23,0 @@ export const isContractCallsRequestWithToAmount = (r) => 'toAmount' in r; |
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, Estimate, LiFiStep, StepToolDetails } from './step.js'; | ||
import type { Action, FeeCost, LiFiStep, StepToolDetails } from './step.js'; | ||
import type { Token } from './tokens/index.js'; | ||
@@ -210,2 +210,22 @@ /** | ||
} | ||
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: string; | ||
timestamp: number; | ||
granularity: TokenHistoricGranularity; | ||
} | ||
export interface ToolConfiguration { | ||
@@ -380,10 +400,7 @@ 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; | ||
@@ -390,0 +407,0 @@ fromAddress: string; |
@@ -44,3 +44,3 @@ import type { Substatus, TransactionRequest } from './api.js'; | ||
export type ExecutionStatus = 'ACTION_REQUIRED' | 'PENDING' | 'FAILED' | 'DONE'; | ||
export type ProcessStatus = 'STARTED' | 'ACTION_REQUIRED' | 'PENDING' | 'FAILED' | 'DONE' | 'CANCELLED'; | ||
export type ProcessStatus = 'STARTED' | 'ACTION_REQUIRED' | 'PERMIT_REQUIRED' | 'PENDING' | 'FAILED' | 'DONE' | 'CANCELLED'; | ||
export type ProcessType = 'TOKEN_ALLOWANCE' | 'SWITCH_CHAIN' | 'SWAP' | 'CROSS_CHAIN' | 'RECEIVING_CHAIN' | 'TRANSACTION'; | ||
@@ -47,0 +47,0 @@ export type Process = { |
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, Estimate, LiFiStep, StepToolDetails } from './step.js' | ||
import type { Action, FeeCost, LiFiStep, StepToolDetails } from './step.js' | ||
import type { Token } from './tokens/index.js' | ||
@@ -252,2 +252,25 @@ | ||
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: string | ||
timestamp: number | ||
granularity: TokenHistoricGranularity | ||
} | ||
export interface ToolConfiguration { | ||
@@ -521,11 +544,7 @@ 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 | ||
@@ -532,0 +551,0 @@ fromAddress: string |
@@ -60,2 +60,3 @@ import type { Substatus, TransactionRequest } from './api.js' | ||
| 'ACTION_REQUIRED' | ||
| 'PERMIT_REQUIRED' | ||
| 'PENDING' | ||
@@ -62,0 +63,0 @@ | 'FAILED' |
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
132898
2726
1