@pendle/sdk-boros 1.0.9-cross-deposit-5 → 1.0.10

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.
Files changed (62) hide show
  1. package/dist/backend/secrettune/BorosCoreSDK.d.ts +6 -187
  2. package/dist/backend/secrettune/BorosCoreSDK.js +3 -75
  3. package/dist/backend/secrettune/BorosCoreSDK.js.map +1 -1
  4. package/dist/backend/secrettune/BorosSendTxsBotSDK.d.ts +10 -29
  5. package/dist/backend/secrettune/BorosSendTxsBotSDK.js +4 -4
  6. package/dist/backend/secrettune/BorosSendTxsBotSDK.js.map +1 -1
  7. package/dist/contracts/contracts.factory.d.ts +2 -4
  8. package/dist/contracts/contracts.factory.js +4 -8
  9. package/dist/contracts/contracts.factory.js.map +1 -1
  10. package/dist/entities/exchange/exchange.d.ts +0 -1611
  11. package/dist/entities/exchange/exchange.js +0 -35
  12. package/dist/entities/exchange/exchange.js.map +1 -1
  13. package/dist/entities/index.d.ts +0 -1
  14. package/dist/entities/index.js +0 -1
  15. package/dist/entities/index.js.map +1 -1
  16. package/dist/types/common.d.ts +0 -22
  17. package/dist/utils/signing/agent.d.ts +7 -0
  18. package/dist/utils/signing/agent.js +18 -0
  19. package/dist/utils/signing/agent.js.map +1 -1
  20. package/dist/utils/signing/common.d.ts +4 -0
  21. package/dist/utils/signing/common.js +2 -1
  22. package/dist/utils/signing/common.js.map +1 -1
  23. package/dist/utils/signing/index.d.ts +2 -2
  24. package/dist/utils/signing/index.js +2 -2
  25. package/dist/utils/signing/index.js.map +1 -1
  26. package/dist/utils/signing/sensitive.d.ts +1 -3
  27. package/dist/utils/signing/sensitive.js +0 -48
  28. package/dist/utils/signing/sensitive.js.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/common/chainId.d.ts +0 -12
  31. package/dist/common/chainId.js +0 -17
  32. package/dist/common/chainId.js.map +0 -1
  33. package/dist/contracts/abis/viemAbiRouter.d.ts +0 -1985
  34. package/dist/contracts/abis/viemAbiRouter.js +0 -2554
  35. package/dist/contracts/abis/viemAbiRouter.js.map +0 -1
  36. package/dist/contracts/router.d.ts +0 -1991
  37. package/dist/contracts/router.js +0 -16
  38. package/dist/contracts/router.js.map +0 -1
  39. package/dist/entities/crossChainDeposit/AggregatorHelper.d.ts +0 -86
  40. package/dist/entities/crossChainDeposit/AggregatorHelper.js +0 -16
  41. package/dist/entities/crossChainDeposit/AggregatorHelper.js.map +0 -1
  42. package/dist/entities/crossChainDeposit/AggregatorHelperErrors.d.ts +0 -58
  43. package/dist/entities/crossChainDeposit/AggregatorHelperErrors.js +0 -116
  44. package/dist/entities/crossChainDeposit/AggregatorHelperErrors.js.map +0 -1
  45. package/dist/entities/crossChainDeposit/CrossChainDeposit.d.ts +0 -20
  46. package/dist/entities/crossChainDeposit/CrossChainDeposit.js +0 -39
  47. package/dist/entities/crossChainDeposit/CrossChainDeposit.js.map +0 -1
  48. package/dist/entities/crossChainDeposit/aggregators/Lifi/index.d.ts +0 -30
  49. package/dist/entities/crossChainDeposit/aggregators/Lifi/index.js +0 -190
  50. package/dist/entities/crossChainDeposit/aggregators/Lifi/index.js.map +0 -1
  51. package/dist/entities/crossChainDeposit/aggregators/Lifi/types.d.ts +0 -186
  52. package/dist/entities/crossChainDeposit/aggregators/Lifi/types.js +0 -28
  53. package/dist/entities/crossChainDeposit/aggregators/Lifi/types.js.map +0 -1
  54. package/dist/entities/crossChainDeposit/index.d.ts +0 -2
  55. package/dist/entities/crossChainDeposit/index.js +0 -19
  56. package/dist/entities/crossChainDeposit/index.js.map +0 -1
  57. package/dist/entities/token/Token.d.ts +0 -19
  58. package/dist/entities/token/Token.js +0 -38
  59. package/dist/entities/token/Token.js.map +0 -1
  60. package/dist/errors/PendleSdkError.d.ts +0 -7
  61. package/dist/errors/PendleSdkError.js +0 -15
  62. package/dist/errors/PendleSdkError.js.map +0 -1
@@ -1,186 +0,0 @@
1
- import { Address, Hex } from 'viem';
2
- import { AggregatorRouteStatus } from '../../AggregatorHelper';
3
- export declare enum ChainType {
4
- EVM = "EVM",
5
- SVM = "SVM",
6
- UTXO = "UTXO",
7
- MVM = "MVM"
8
- }
9
- export type LifiTokenResponse = {
10
- address: Address;
11
- decimals: number;
12
- symbol: string;
13
- chainId: number;
14
- name: string;
15
- coinKey?: string;
16
- logoURI?: string;
17
- priceUSD?: string;
18
- };
19
- export type GetChainRequest = {
20
- chainTypes?: string;
21
- };
22
- export type GetChainsResponse = {
23
- chains: {
24
- key: string;
25
- name: string;
26
- coin: string;
27
- id: number;
28
- mainnet: boolean;
29
- logoURI: string;
30
- nativeToken: LifiTokenResponse;
31
- }[];
32
- };
33
- export type GetTokensRequest = {
34
- chains?: string;
35
- chainTypes?: string;
36
- minPriceUSD?: number;
37
- };
38
- export type GetTokensResponse = {
39
- tokens: Record<number, LifiTokenResponse[]>;
40
- };
41
- export declare enum GetRoutesOrder {
42
- FASTEST = "FASTEST",
43
- CHEAPEST = "CHEAPEST"
44
- }
45
- export type LifiGetChainsRequest = {
46
- chainTypes: ChainType[];
47
- };
48
- export type LifiGetRoutesRequest = {
49
- fromChainId: number;
50
- fromAmount: string;
51
- fromTokenAddress: Address;
52
- toChainId: number;
53
- toTokenAddress: Address;
54
- options?: {
55
- integrator?: string;
56
- slippage?: number;
57
- order?: GetRoutesOrder;
58
- allowSwitchChain?: boolean;
59
- allowDestinationCall?: boolean;
60
- referrer?: string;
61
- fee?: number;
62
- maxPriceImpact?: number;
63
- };
64
- fromAddress?: Address;
65
- toAddress?: Address;
66
- };
67
- export declare enum LifiGetRoutesType {
68
- SWAP = "swap",
69
- CROSS = "cross",
70
- LIFI = "lifi"
71
- }
72
- export type LifiGetRoutesFeeCost = {
73
- name: string;
74
- percentage: string;
75
- token: LifiTokenResponse;
76
- amountUSD: string;
77
- included: boolean;
78
- description?: string;
79
- amount?: string;
80
- };
81
- export declare enum LifiLifiGetRoutesGasCostType {
82
- SEND = "SEND",
83
- APPROVE = "APPROVE",
84
- SUM = "SUM"
85
- }
86
- export type LifiGetRoutesGasCost = {
87
- type: LifiLifiGetRoutesGasCostType;
88
- amount: string;
89
- token: LifiTokenResponse;
90
- price?: string;
91
- estimate?: string;
92
- limit?: string;
93
- amountUSD?: string;
94
- };
95
- export type LifiGetRoutesAction = {
96
- fromChainId: number;
97
- fromAmount: string;
98
- fromToken: LifiTokenResponse;
99
- toChainId: number;
100
- toToken: LifiTokenResponse;
101
- slippage?: number;
102
- fromAddress?: Address;
103
- toAddress?: Address;
104
- };
105
- export type LifiGetRoutesEstimate = {
106
- tool: string;
107
- fromAmount: string;
108
- toAmount: string;
109
- toAmountMin: string;
110
- approvalAddress: Address;
111
- executionDuration: number;
112
- fromAmountUSD?: string;
113
- toAmountUSD?: string;
114
- feeCosts?: LifiGetRoutesFeeCost[];
115
- gasCosts?: LifiGetRoutesGasCost[];
116
- };
117
- export type LifiGetRoutesIncludedStep = {
118
- id: string;
119
- type: LifiGetRoutesType;
120
- tool: string;
121
- toolDetails: {
122
- key?: string;
123
- name?: string;
124
- logoURI?: string;
125
- };
126
- action: LifiGetRoutesAction;
127
- estimate: LifiGetRoutesEstimate;
128
- };
129
- export type LifiGetRoutesStep = {
130
- id: string;
131
- type: LifiGetRoutesType;
132
- tool: string;
133
- action: LifiGetRoutesAction;
134
- toolDetails: {
135
- key?: string;
136
- name?: string;
137
- logoURI?: string;
138
- };
139
- estimate: LifiGetRoutesEstimate;
140
- integrator: string;
141
- includedSteps: LifiGetRoutesIncludedStep[];
142
- referrer?: string;
143
- execution?: any;
144
- transactionRequest?: any;
145
- };
146
- export type LifiGetRouteResponse = {
147
- id: string;
148
- fromChainId: number;
149
- fromAmountUSD: string;
150
- fromAmount: string;
151
- fromToken: LifiTokenResponse;
152
- toChainId: number;
153
- toAmountUSD: string;
154
- toAmount: string;
155
- toAmountMin: string;
156
- toToken: LifiTokenResponse;
157
- steps: LifiGetRoutesStep[];
158
- gasCostUSD?: string;
159
- fromAddress?: Address;
160
- toAddress?: Address;
161
- containsSwitchChain?: boolean;
162
- };
163
- export type LifiGetRoutesResponse = {
164
- routes: LifiGetRouteResponse[];
165
- };
166
- export type LifiGetRouteStatusRequest = {
167
- txHash: Hex;
168
- fromChain?: number;
169
- toChain?: number;
170
- };
171
- export type LifiGetRouteStatusResponse = {
172
- sending: {
173
- txHash: Hex;
174
- txLink: string;
175
- amount: string;
176
- chainId: number;
177
- };
178
- status: AggregatorRouteStatus;
179
- tool: string;
180
- receiving?: {
181
- txHash: Hex;
182
- txLink: string;
183
- amount: string;
184
- chainId: number;
185
- };
186
- };
@@ -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":";;;AAGA,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,2 +0,0 @@
1
- export * from './CrossChainDeposit';
2
- export * from './AggregatorHelper';
@@ -1,19 +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
- __exportStar(require("./AggregatorHelper"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/crossChainDeposit/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC"}
@@ -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,7 +0,0 @@
1
- export type PendleSdkErrorParams = {
2
- cause?: unknown;
3
- };
4
- export declare class PendleSdkError extends Error {
5
- cause?: unknown;
6
- constructor(message: string, params?: PendleSdkErrorParams);
7
- }
@@ -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"}