New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lifi/types

Package Overview
Dependencies
Maintainers
1
Versions
265
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lifi/types - npm Package Compare versions

Comparing version 15.15.0 to 15.16.0-alpha.0

2

package.json
{
"name": "@lifi/types",
"description": "Types for the LI.FI stack",
"version": "15.15.0",
"version": "15.16.0-alpha.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._InsuranceState = exports.Orders = void 0;
exports.IntegratorFeeType = exports.isSubstatusFailed = exports.isSubstatusDone = exports.isSubstatusPending = exports.isContractCallsRequestWithToAmount = exports.isContractCallsRequestWithFromAmount = exports.isQuoteRequestWithToAmount = exports.isQuoteRequestWithFromAmount = exports._InsuranceState = exports.Orders = void 0;
exports.Orders = ['RECOMMENDED', 'FASTEST', 'CHEAPEST', 'SAFEST'];

@@ -10,2 +10,6 @@ exports._InsuranceState = [

];
const isQuoteRequestWithFromAmount = (r) => 'fromAmount' in r;
exports.isQuoteRequestWithFromAmount = isQuoteRequestWithFromAmount;
const isQuoteRequestWithToAmount = (r) => 'toAmount' in r;
exports.isQuoteRequestWithToAmount = isQuoteRequestWithToAmount;
const isContractCallsRequestWithFromAmount = (r) => 'fromAmount' in r;

@@ -12,0 +16,0 @@ exports.isContractCallsRequestWithFromAmount = isContractCallsRequestWithFromAmount;

@@ -14,2 +14,4 @@ /**

];
export const isQuoteRequestWithFromAmount = (r) => 'fromAmount' in r;
export const isQuoteRequestWithToAmount = (r) => 'toAmount' in r;
export const isContractCallsRequestWithFromAmount = (r) => 'fromAmount' in r;

@@ -16,0 +18,0 @@ export const isContractCallsRequestWithToAmount = (r) => 'toAmount' in r;

@@ -218,7 +218,6 @@ import type { BridgeDefinition } from './bridges.js';

}
export interface QuoteRequest extends ToolConfiguration, TimingStrings {
export interface PartialQuoteRequest extends ToolConfiguration, TimingStrings {
fromChain: number | string;
fromToken: string;
fromAddress: string;
fromAmount: string;
toChain: number | string;

@@ -233,3 +232,2 @@ toToken: string;

allowDestinationCall?: boolean;
fromAmountForGas?: string;
maxPriceImpact?: number;

@@ -242,5 +240,12 @@ skipSimulation?: boolean;

}
export interface QuoteToAmountRequest extends Omit<QuoteRequest, 'fromAmount' | 'fromAmountForGas' | 'insurance'> {
export interface QuoteFromAmountRequest extends PartialQuoteRequest {
fromAmountForGas?: string;
fromAmount: string;
}
export interface QuoteToAmountRequest extends PartialQuoteRequest {
toAmount: string;
}
export type QuoteRequest = QuoteFromAmountRequest | QuoteToAmountRequest;
export declare const isQuoteRequestWithFromAmount: (r: QuoteRequest) => r is QuoteFromAmountRequest;
export declare const isQuoteRequestWithToAmount: (r: QuoteRequest) => r is QuoteToAmountRequest;
export interface ContractCall {

@@ -277,4 +282,4 @@ fromAmount: string;

export type ContractCallsQuoteRequest = ContractCallsQuoteRequestFromAmount | ContractCallsQuoteRequestToAmount;
export declare const isContractCallsRequestWithFromAmount: (r: ContractCallsQuoteRequestFromAmount | ContractCallsQuoteRequestToAmount) => r is ContractCallsQuoteRequestFromAmount;
export declare const isContractCallsRequestWithToAmount: (r: ContractCallsQuoteRequestFromAmount | ContractCallsQuoteRequestToAmount) => r is ContractCallsQuoteRequestToAmount;
export declare const isContractCallsRequestWithFromAmount: (r: ContractCallsQuoteRequest) => r is ContractCallsQuoteRequestFromAmount;
export declare const isContractCallsRequestWithToAmount: (r: ContractCallsQuoteRequest) => r is ContractCallsQuoteRequestToAmount;
export interface ContractCallQuoteRequest extends ToolConfiguration {

@@ -281,0 +286,0 @@ fromChain: number | string;

@@ -261,7 +261,6 @@ import type { BridgeDefinition } from './bridges.js'

export interface QuoteRequest extends ToolConfiguration, TimingStrings {
export interface PartialQuoteRequest extends ToolConfiguration, TimingStrings {
fromChain: number | string
fromToken: string
fromAddress: string
fromAmount: string

@@ -278,3 +277,3 @@ toChain: number | string

allowDestinationCall?: boolean // (default : true) // destination calls are enabled by default
fromAmountForGas?: string // the amount of token to convert to gas
maxPriceImpact?: number // hide routes with price impact greater than or equal to this value

@@ -289,7 +288,21 @@ skipSimulation?: boolean

export interface QuoteToAmountRequest
extends Omit<QuoteRequest, 'fromAmount' | 'fromAmountForGas' | 'insurance'> {
export interface QuoteFromAmountRequest extends PartialQuoteRequest {
fromAmountForGas?: string // the amount of token to convert to gas
fromAmount: string
}
export interface QuoteToAmountRequest extends PartialQuoteRequest {
toAmount: string
}
export type QuoteRequest = QuoteFromAmountRequest | QuoteToAmountRequest
export const isQuoteRequestWithFromAmount = (
r: QuoteRequest
): r is QuoteFromAmountRequest => 'fromAmount' in r
export const isQuoteRequestWithToAmount = (
r: QuoteRequest
): r is QuoteToAmountRequest => 'toAmount' in r
export interface ContractCall {

@@ -337,8 +350,9 @@ fromAmount: string

| ContractCallsQuoteRequestToAmount
export const isContractCallsRequestWithFromAmount = (
r: ContractCallsQuoteRequestFromAmount | ContractCallsQuoteRequestToAmount
r: ContractCallsQuoteRequest
): r is ContractCallsQuoteRequestFromAmount => 'fromAmount' in r
export const isContractCallsRequestWithToAmount = (
r: ContractCallsQuoteRequestFromAmount | ContractCallsQuoteRequestToAmount
r: ContractCallsQuoteRequest
): r is ContractCallsQuoteRequestToAmount => 'toAmount' in r

@@ -345,0 +359,0 @@

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc