@pendle/sdk-boros 1.0.9-cross-deposit-2 → 1.0.9
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/contracts/contracts.factory.d.ts +2 -4
- package/dist/contracts/contracts.factory.js +4 -8
- package/dist/contracts/contracts.factory.js.map +1 -1
- package/dist/entities/exchange/exchange.d.ts +0 -1611
- package/dist/entities/exchange/exchange.js +0 -35
- package/dist/entities/exchange/exchange.js.map +1 -1
- package/dist/entities/index.d.ts +0 -1
- package/dist/entities/index.js +0 -1
- package/dist/entities/index.js.map +1 -1
- package/dist/types/common.d.ts +0 -10
- package/dist/utils/signing/sensitive.d.ts +1 -2
- package/dist/utils/signing/sensitive.js +0 -23
- package/dist/utils/signing/sensitive.js.map +1 -1
- package/package.json +1 -1
- package/dist/common/chainId.d.ts +0 -12
- package/dist/common/chainId.js +0 -17
- package/dist/common/chainId.js.map +0 -1
- package/dist/contracts/abis/viemAbiRouter.d.ts +0 -1985
- package/dist/contracts/abis/viemAbiRouter.js +0 -2554
- package/dist/contracts/abis/viemAbiRouter.js.map +0 -1
- package/dist/contracts/router.d.ts +0 -1991
- package/dist/contracts/router.js +0 -16
- package/dist/contracts/router.js.map +0 -1
- package/dist/entities/crossChainDeposit/AggregatorHelper.d.ts +0 -76
- package/dist/entities/crossChainDeposit/AggregatorHelper.js +0 -8
- package/dist/entities/crossChainDeposit/AggregatorHelper.js.map +0 -1
- package/dist/entities/crossChainDeposit/AggregatorHelperErrors.d.ts +0 -57
- package/dist/entities/crossChainDeposit/AggregatorHelperErrors.js +0 -116
- package/dist/entities/crossChainDeposit/AggregatorHelperErrors.js.map +0 -1
- package/dist/entities/crossChainDeposit/CrossChainDeposit.d.ts +0 -17
- package/dist/entities/crossChainDeposit/CrossChainDeposit.js +0 -36
- package/dist/entities/crossChainDeposit/CrossChainDeposit.js.map +0 -1
- package/dist/entities/crossChainDeposit/aggregators/Lifi/index.d.ts +0 -26
- package/dist/entities/crossChainDeposit/aggregators/Lifi/index.js +0 -178
- package/dist/entities/crossChainDeposit/aggregators/Lifi/index.js.map +0 -1
- package/dist/entities/crossChainDeposit/aggregators/Lifi/types.d.ts +0 -164
- package/dist/entities/crossChainDeposit/aggregators/Lifi/types.js +0 -28
- package/dist/entities/crossChainDeposit/aggregators/Lifi/types.js.map +0 -1
- package/dist/entities/crossChainDeposit/index.d.ts +0 -1
- package/dist/entities/crossChainDeposit/index.js +0 -18
- package/dist/entities/crossChainDeposit/index.js.map +0 -1
- package/dist/entities/token/Token.d.ts +0 -19
- package/dist/entities/token/Token.js +0 -38
- package/dist/entities/token/Token.js.map +0 -1
- package/dist/errors/PendleSdkError.d.ts +0 -7
- package/dist/errors/PendleSdkError.js +0 -15
- package/dist/errors/PendleSdkError.js.map +0 -1
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
export declare enum ChainType {
|
|
3
|
-
EVM = "EVM",
|
|
4
|
-
SVM = "SVM",
|
|
5
|
-
UTXO = "UTXO",
|
|
6
|
-
MVM = "MVM"
|
|
7
|
-
}
|
|
8
|
-
export type LifiTokenResponse = {
|
|
9
|
-
address: Address;
|
|
10
|
-
decimals: number;
|
|
11
|
-
symbol: string;
|
|
12
|
-
chainId: number;
|
|
13
|
-
name: string;
|
|
14
|
-
coinKey?: string;
|
|
15
|
-
logoURI?: string;
|
|
16
|
-
priceUSD?: string;
|
|
17
|
-
};
|
|
18
|
-
export type GetChainRequest = {
|
|
19
|
-
chainTypes?: string;
|
|
20
|
-
};
|
|
21
|
-
export type GetChainsResponse = {
|
|
22
|
-
chains: {
|
|
23
|
-
key: string;
|
|
24
|
-
name: string;
|
|
25
|
-
coin: string;
|
|
26
|
-
id: number;
|
|
27
|
-
mainnet: boolean;
|
|
28
|
-
logoURI: string;
|
|
29
|
-
nativeToken: LifiTokenResponse;
|
|
30
|
-
}[];
|
|
31
|
-
};
|
|
32
|
-
export type GetTokensRequest = {
|
|
33
|
-
chains?: string;
|
|
34
|
-
chainTypes?: string;
|
|
35
|
-
minPriceUSD?: number;
|
|
36
|
-
};
|
|
37
|
-
export type GetTokensResponse = {
|
|
38
|
-
tokens: Record<number, LifiTokenResponse[]>;
|
|
39
|
-
};
|
|
40
|
-
export declare enum GetRoutesOrder {
|
|
41
|
-
FASTEST = "FASTEST",
|
|
42
|
-
CHEAPEST = "CHEAPEST"
|
|
43
|
-
}
|
|
44
|
-
export type LifiGetChainsRequest = {
|
|
45
|
-
chainTypes: ChainType[];
|
|
46
|
-
};
|
|
47
|
-
export type LifiGetRoutesRequest = {
|
|
48
|
-
fromChainId: number;
|
|
49
|
-
fromAmount: string;
|
|
50
|
-
fromTokenAddress: Address;
|
|
51
|
-
toChainId: number;
|
|
52
|
-
toTokenAddress: Address;
|
|
53
|
-
options?: {
|
|
54
|
-
integrator?: string;
|
|
55
|
-
slippage?: number;
|
|
56
|
-
order?: GetRoutesOrder;
|
|
57
|
-
allowSwitchChain?: boolean;
|
|
58
|
-
allowDestinationCall?: boolean;
|
|
59
|
-
referrer?: string;
|
|
60
|
-
fee?: number;
|
|
61
|
-
maxPriceImpact?: number;
|
|
62
|
-
};
|
|
63
|
-
fromAddress?: Address;
|
|
64
|
-
toAddress?: Address;
|
|
65
|
-
};
|
|
66
|
-
export declare enum LifiGetRoutesType {
|
|
67
|
-
SWAP = "swap",
|
|
68
|
-
CROSS = "cross",
|
|
69
|
-
LIFI = "lifi"
|
|
70
|
-
}
|
|
71
|
-
export type LifiGetRoutesFeeCost = {
|
|
72
|
-
name: string;
|
|
73
|
-
percentage: string;
|
|
74
|
-
token: LifiTokenResponse;
|
|
75
|
-
amountUSD: string;
|
|
76
|
-
included: boolean;
|
|
77
|
-
description?: string;
|
|
78
|
-
amount?: string;
|
|
79
|
-
};
|
|
80
|
-
export declare enum LifiLifiGetRoutesGasCostType {
|
|
81
|
-
SEND = "SEND",
|
|
82
|
-
APPROVE = "APPROVE",
|
|
83
|
-
SUM = "SUM"
|
|
84
|
-
}
|
|
85
|
-
export type LifiGetRoutesGasCost = {
|
|
86
|
-
type: LifiLifiGetRoutesGasCostType;
|
|
87
|
-
amount: string;
|
|
88
|
-
token: LifiTokenResponse;
|
|
89
|
-
price?: string;
|
|
90
|
-
estimate?: string;
|
|
91
|
-
limit?: string;
|
|
92
|
-
amountUSD?: string;
|
|
93
|
-
};
|
|
94
|
-
export type LifiGetRoutesAction = {
|
|
95
|
-
fromChainId: number;
|
|
96
|
-
fromAmount: string;
|
|
97
|
-
fromToken: LifiTokenResponse;
|
|
98
|
-
toChainId: number;
|
|
99
|
-
toToken: LifiTokenResponse;
|
|
100
|
-
slippage?: number;
|
|
101
|
-
fromAddress?: Address;
|
|
102
|
-
toAddress?: Address;
|
|
103
|
-
};
|
|
104
|
-
export type LifiGetRoutesEstimate = {
|
|
105
|
-
tool: string;
|
|
106
|
-
fromAmount: string;
|
|
107
|
-
toAmount: string;
|
|
108
|
-
toAmountMin: string;
|
|
109
|
-
approvalAddress: Address;
|
|
110
|
-
executionDuration: number;
|
|
111
|
-
fromAmountUSD?: string;
|
|
112
|
-
toAmountUSD?: string;
|
|
113
|
-
feeCosts?: LifiGetRoutesFeeCost[];
|
|
114
|
-
gasCosts?: LifiGetRoutesGasCost[];
|
|
115
|
-
};
|
|
116
|
-
export type LifiGetRoutesIncludedStep = {
|
|
117
|
-
id: string;
|
|
118
|
-
type: LifiGetRoutesType;
|
|
119
|
-
tool: string;
|
|
120
|
-
toolDetails: {
|
|
121
|
-
key?: string;
|
|
122
|
-
name?: string;
|
|
123
|
-
logoURI?: string;
|
|
124
|
-
};
|
|
125
|
-
action: LifiGetRoutesAction;
|
|
126
|
-
estimate: LifiGetRoutesEstimate;
|
|
127
|
-
};
|
|
128
|
-
export type LifiGetRoutesStep = {
|
|
129
|
-
id: string;
|
|
130
|
-
type: LifiGetRoutesType;
|
|
131
|
-
tool: string;
|
|
132
|
-
action: LifiGetRoutesAction;
|
|
133
|
-
toolDetails: {
|
|
134
|
-
key?: string;
|
|
135
|
-
name?: string;
|
|
136
|
-
logoURI?: string;
|
|
137
|
-
};
|
|
138
|
-
estimate: LifiGetRoutesEstimate;
|
|
139
|
-
integrator: string;
|
|
140
|
-
includedSteps: LifiGetRoutesIncludedStep[];
|
|
141
|
-
referrer?: string;
|
|
142
|
-
execution?: any;
|
|
143
|
-
transactionRequest?: any;
|
|
144
|
-
};
|
|
145
|
-
export type LifiGetRouteResponse = {
|
|
146
|
-
id: string;
|
|
147
|
-
fromChainId: number;
|
|
148
|
-
fromAmountUSD: string;
|
|
149
|
-
fromAmount: string;
|
|
150
|
-
fromToken: LifiTokenResponse;
|
|
151
|
-
toChainId: number;
|
|
152
|
-
toAmountUSD: string;
|
|
153
|
-
toAmount: string;
|
|
154
|
-
toAmountMin: string;
|
|
155
|
-
toToken: LifiTokenResponse;
|
|
156
|
-
steps: LifiGetRoutesStep[];
|
|
157
|
-
gasCostUSD?: string;
|
|
158
|
-
fromAddress?: Address;
|
|
159
|
-
toAddress?: Address;
|
|
160
|
-
containsSwitchChain?: boolean;
|
|
161
|
-
};
|
|
162
|
-
export type LifiGetRoutesResponse = {
|
|
163
|
-
routes: LifiGetRouteResponse[];
|
|
164
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LifiLifiGetRoutesGasCostType = exports.LifiGetRoutesType = exports.GetRoutesOrder = exports.ChainType = void 0;
|
|
4
|
-
var ChainType;
|
|
5
|
-
(function (ChainType) {
|
|
6
|
-
ChainType["EVM"] = "EVM";
|
|
7
|
-
ChainType["SVM"] = "SVM";
|
|
8
|
-
ChainType["UTXO"] = "UTXO";
|
|
9
|
-
ChainType["MVM"] = "MVM";
|
|
10
|
-
})(ChainType || (exports.ChainType = ChainType = {}));
|
|
11
|
-
var GetRoutesOrder;
|
|
12
|
-
(function (GetRoutesOrder) {
|
|
13
|
-
GetRoutesOrder["FASTEST"] = "FASTEST";
|
|
14
|
-
GetRoutesOrder["CHEAPEST"] = "CHEAPEST";
|
|
15
|
-
})(GetRoutesOrder || (exports.GetRoutesOrder = GetRoutesOrder = {}));
|
|
16
|
-
var LifiGetRoutesType;
|
|
17
|
-
(function (LifiGetRoutesType) {
|
|
18
|
-
LifiGetRoutesType["SWAP"] = "swap";
|
|
19
|
-
LifiGetRoutesType["CROSS"] = "cross";
|
|
20
|
-
LifiGetRoutesType["LIFI"] = "lifi";
|
|
21
|
-
})(LifiGetRoutesType || (exports.LifiGetRoutesType = LifiGetRoutesType = {}));
|
|
22
|
-
var LifiLifiGetRoutesGasCostType;
|
|
23
|
-
(function (LifiLifiGetRoutesGasCostType) {
|
|
24
|
-
LifiLifiGetRoutesGasCostType["SEND"] = "SEND";
|
|
25
|
-
LifiLifiGetRoutesGasCostType["APPROVE"] = "APPROVE";
|
|
26
|
-
LifiLifiGetRoutesGasCostType["SUM"] = "SUM";
|
|
27
|
-
})(LifiLifiGetRoutesGasCostType || (exports.LifiLifiGetRoutesGasCostType = LifiLifiGetRoutesGasCostType = {}));
|
|
28
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/entities/crossChainDeposit/aggregators/Lifi/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,wBAAW,CAAA;AACb,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAuCD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;AACvB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AA0BD,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,oCAAe,CAAA;IACf,kCAAa,CAAA;AACf,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAYD,IAAY,4BAIX;AAJD,WAAY,4BAA4B;IACtC,6CAAa,CAAA;IACb,mDAAmB,CAAA;IACnB,2CAAW,CAAA;AACb,CAAC,EAJW,4BAA4B,4CAA5B,4BAA4B,QAIvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './CrossChainDeposit';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./CrossChainDeposit"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/crossChainDeposit/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
import { LifiTokenResponse } from '../crossChainDeposit/aggregators/Lifi/types';
|
|
3
|
-
export declare class Token {
|
|
4
|
-
readonly chainId: number;
|
|
5
|
-
readonly address: Address;
|
|
6
|
-
readonly decimals: number;
|
|
7
|
-
readonly symbol: string;
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly logoURI?: string | undefined;
|
|
10
|
-
readonly priceUSD?: number | undefined;
|
|
11
|
-
constructor(chainId: number, address: Address, decimals: number, symbol: string, name: string, logoURI?: string | undefined, priceUSD?: number | undefined);
|
|
12
|
-
static createFromLifi(token: LifiTokenResponse): Token;
|
|
13
|
-
}
|
|
14
|
-
export declare class TokenAmount {
|
|
15
|
-
readonly token: Token;
|
|
16
|
-
readonly amount: bigint;
|
|
17
|
-
constructor(token: Token, amount: bigint);
|
|
18
|
-
static createFromLifi(token: LifiTokenResponse, amount: string): TokenAmount;
|
|
19
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TokenAmount = exports.Token = void 0;
|
|
4
|
-
class Token {
|
|
5
|
-
chainId;
|
|
6
|
-
address;
|
|
7
|
-
decimals;
|
|
8
|
-
symbol;
|
|
9
|
-
name;
|
|
10
|
-
logoURI;
|
|
11
|
-
priceUSD;
|
|
12
|
-
constructor(chainId, address, decimals, symbol, name, logoURI, priceUSD) {
|
|
13
|
-
this.chainId = chainId;
|
|
14
|
-
this.address = address;
|
|
15
|
-
this.decimals = decimals;
|
|
16
|
-
this.symbol = symbol;
|
|
17
|
-
this.name = name;
|
|
18
|
-
this.logoURI = logoURI;
|
|
19
|
-
this.priceUSD = priceUSD;
|
|
20
|
-
}
|
|
21
|
-
static createFromLifi(token) {
|
|
22
|
-
return new Token(token.chainId, token.address, token.decimals, token.symbol, token.name, token.logoURI, token.priceUSD != null ? Number(token.priceUSD) : undefined);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.Token = Token;
|
|
26
|
-
class TokenAmount {
|
|
27
|
-
token;
|
|
28
|
-
amount;
|
|
29
|
-
constructor(token, amount) {
|
|
30
|
-
this.token = token;
|
|
31
|
-
this.amount = amount;
|
|
32
|
-
}
|
|
33
|
-
static createFromLifi(token, amount) {
|
|
34
|
-
return new TokenAmount(Token.createFromLifi(token), BigInt(amount));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.TokenAmount = TokenAmount;
|
|
38
|
-
//# sourceMappingURL=Token.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Token.js","sourceRoot":"","sources":["../../../src/entities/token/Token.ts"],"names":[],"mappings":";;;AAGA,MAAa,KAAK;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IAPlB,YACkB,OAAe,EACf,OAAgB,EAChB,QAAgB,EAChB,MAAc,EACd,IAAY,EACZ,OAAgB,EAChB,QAAiB;QANjB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAS;QAChB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAS;QAChB,aAAQ,GAAR,QAAQ,CAAS;IAChC,CAAC;IAEJ,MAAM,CAAC,cAAc,CAAC,KAAwB;QAC5C,OAAO,IAAI,KAAK,CACd,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,QAAQ,EACd,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAC5D,CAAC;IACJ,CAAC;CACF;AAtBD,sBAsBC;AACD,MAAa,WAAW;IAEJ;IACA;IAFlB,YACkB,KAAY,EACZ,MAAc;QADd,UAAK,GAAL,KAAK,CAAO;QACZ,WAAM,GAAN,MAAM,CAAQ;IAC7B,CAAC;IAEJ,MAAM,CAAC,cAAc,CAAC,KAAwB,EAAE,MAAc;QAC5D,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE,CAAC;CACF;AATD,kCASC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PendleSdkError = void 0;
|
|
4
|
-
class PendleSdkError extends Error {
|
|
5
|
-
cause;
|
|
6
|
-
constructor(message, params) {
|
|
7
|
-
super(message, params);
|
|
8
|
-
const cause = params?.cause;
|
|
9
|
-
if (!this.cause && cause)
|
|
10
|
-
this.cause = cause;
|
|
11
|
-
Object.setPrototypeOf(this, this.constructor.prototype);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.PendleSdkError = PendleSdkError;
|
|
15
|
-
//# sourceMappingURL=PendleSdkError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PendleSdkError.js","sourceRoot":"","sources":["../../src/errors/PendleSdkError.ts"],"names":[],"mappings":";;;AAaA,MAAa,cAAe,SAAQ,KAAK;IAM9B,KAAK,CAAW;IAEzB,YAAY,OAAe,EAAE,MAA6B;QACxD,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAEvB,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAI7C,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC;CACF;AAlBD,wCAkBC"}
|