@pendle/sdk-boros 1.0.2 → 1.0.4
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/abis/viemAbis.d.ts +393 -14
- package/dist/contracts/abis/viemAbis.js +257 -10
- package/dist/contracts/abis/viemAbis.js.map +1 -1
- package/dist/entities/exchange/exchange.d.ts +143 -0
- package/dist/entities/exchange/utils.d.ts +22 -0
- package/dist/errors/PendleContractError/type.d.ts +7 -6
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/signing/agent.d.ts +1 -2
- package/dist/utils/signing/agent.js +21 -15
- package/dist/utils/signing/agent.js.map +1 -1
- package/dist/utils/signing/common.d.ts +4 -9
- package/dist/utils/signing/common.js +5 -8
- package/dist/utils/signing/common.js.map +1 -1
- package/dist/utils/signing/index.d.ts +1 -0
- package/dist/utils/signing/index.js +3 -1
- package/dist/utils/signing/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.iPVeTokenAbi = exports.iMultiTokenMerkleDistributorAbi = exports.iBotMiscFacetAbi = exports.iZoneResponderAbi = exports.iMarkRatePusherAbi = exports.iWithdrawalPoliceFacetAbi = exports.iPauserFacetAbi = exports.iOrderCancellerFacetAbi = exports.iLiquidationExecutorFacetAbi = exports.iDeleveragerFacetAbi = exports.iCLOSetterFacetAbi = exports.iBOROS20Abi = exports.iAMMAbi = exports.iFIndexOracleAbi = exports.iAuthModuleAbi = exports.iTradeModuleAbi = exports.iMarkRateOracleAbi = exports.iExplorerAbi = exports.iMulticall3Abi = exports.iMarketOffViewOnlyAbi = exports.iMarketEntryAbi = exports.iMarketRiskManagementAbi = exports.iMarketSettingAbi = exports.iMarketAllTypesAbi = exports.iMarketOrderAndOtcAbi = exports.iMarketOffAbi = exports.iMarketAbi = exports.iMarketAllEventsAndTypesAbi = exports.iRouterAbi = exports.iMarketFactoryAbi = exports.iMarketHubStorageOnlyAbi = exports.iMarketHubSetAndViewAbi = exports.iMarketHubAllEventsAndTypesAbi = exports.iMarketHubAbi = exports.iMarketHubRiskManagementAbi = exports.iMarketHubEntryOnlyAbi = exports.iAMMFactoryAbi = exports.iArbitrageExecutorFacetAbi = void 0;
|
|
3
|
+
exports.iPVeTokenAbi = exports.iMultiTokenMerkleDistributorAbi = exports.iBotMiscFacetAbi = exports.iZoneResponderAbi = exports.iMarkRatePusherAbi = exports.iWithdrawalPoliceFacetAbi = exports.iPauserFacetAbi = exports.iOrderCancellerFacetAbi = exports.iLiquidationExecutorFacetAbi = exports.iDeleveragerFacetAbi = exports.iCLOSetterFacetAbi = exports.iBOROS20Abi = exports.iAMMAbi = exports.iFundingRateOracleAbi = exports.iFundingRateVerifierAbi = exports.iFIndexOracleAbi = exports.iAuthModuleAbi = exports.iTradeModuleAbi = exports.iMarkRateOracleAbi = exports.iExplorerAbi = exports.iMulticall3Abi = exports.iMarketOffViewOnlyAbi = exports.iMarketEntryAbi = exports.iMarketRiskManagementAbi = exports.iMarketSettingAbi = exports.iMarketAllTypesAbi = exports.iMarketOrderAndOtcAbi = exports.iMarketOffAbi = exports.iMarketAbi = exports.iMarketAllEventsAndTypesAbi = exports.iRouterAbi = exports.iMarketFactoryAbi = exports.iMarketHubStorageOnlyAbi = exports.iMarketHubSetAndViewAbi = exports.iMarketHubAllEventsAndTypesAbi = exports.iMarketHubAbi = exports.iMarketHubRiskManagementAbi = exports.iMarketHubEntryOnlyAbi = exports.iAMMFactoryAbi = exports.iArbitrageExecutorFacetAbi = void 0;
|
|
4
4
|
exports.iArbitrageExecutorFacetAbi = [
|
|
5
5
|
{
|
|
6
6
|
anonymous: false,
|
|
@@ -8076,6 +8076,190 @@ exports.iFIndexOracleAbi = [
|
|
|
8076
8076
|
type: 'function',
|
|
8077
8077
|
},
|
|
8078
8078
|
];
|
|
8079
|
+
exports.iFundingRateVerifierAbi = [
|
|
8080
|
+
{
|
|
8081
|
+
anonymous: false,
|
|
8082
|
+
inputs: [
|
|
8083
|
+
{ indexed: false, internalType: 'uint256', name: 'maxVerificationFee', type: 'uint256' },
|
|
8084
|
+
{ indexed: false, internalType: 'uint32', name: 'period', type: 'uint32' },
|
|
8085
|
+
],
|
|
8086
|
+
name: 'ConfigUpdated',
|
|
8087
|
+
type: 'event',
|
|
8088
|
+
},
|
|
8089
|
+
{
|
|
8090
|
+
inputs: [],
|
|
8091
|
+
name: 'CHAIN_LINK_FEED_ID',
|
|
8092
|
+
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
|
8093
|
+
stateMutability: 'view',
|
|
8094
|
+
type: 'function',
|
|
8095
|
+
},
|
|
8096
|
+
{
|
|
8097
|
+
inputs: [],
|
|
8098
|
+
name: 'CHAIN_LINK_ORACLE',
|
|
8099
|
+
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
8100
|
+
stateMutability: 'view',
|
|
8101
|
+
type: 'function',
|
|
8102
|
+
},
|
|
8103
|
+
{
|
|
8104
|
+
inputs: [],
|
|
8105
|
+
name: 'CHAOS_LABS_MARKET',
|
|
8106
|
+
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
8107
|
+
stateMutability: 'view',
|
|
8108
|
+
type: 'function',
|
|
8109
|
+
},
|
|
8110
|
+
{
|
|
8111
|
+
inputs: [],
|
|
8112
|
+
name: 'CHAOS_LABS_ORACLE',
|
|
8113
|
+
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
8114
|
+
stateMutability: 'view',
|
|
8115
|
+
type: 'function',
|
|
8116
|
+
},
|
|
8117
|
+
{
|
|
8118
|
+
inputs: [],
|
|
8119
|
+
name: 'CHAOS_LABS_UPDATE_TYPE_HASH',
|
|
8120
|
+
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
|
8121
|
+
stateMutability: 'view',
|
|
8122
|
+
type: 'function',
|
|
8123
|
+
},
|
|
8124
|
+
{
|
|
8125
|
+
inputs: [],
|
|
8126
|
+
name: 'FINDEX_ORACLE',
|
|
8127
|
+
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
8128
|
+
stateMutability: 'view',
|
|
8129
|
+
type: 'function',
|
|
8130
|
+
},
|
|
8131
|
+
{
|
|
8132
|
+
inputs: [],
|
|
8133
|
+
name: 'PENDLE_ORACLE',
|
|
8134
|
+
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
8135
|
+
stateMutability: 'view',
|
|
8136
|
+
type: 'function',
|
|
8137
|
+
},
|
|
8138
|
+
{
|
|
8139
|
+
inputs: [
|
|
8140
|
+
{ internalType: 'int112', name: 'fundingRate', type: 'int112' },
|
|
8141
|
+
{ internalType: 'uint32', name: 'fundingTimestamp', type: 'uint32' },
|
|
8142
|
+
],
|
|
8143
|
+
name: 'manualUpdate',
|
|
8144
|
+
outputs: [],
|
|
8145
|
+
stateMutability: 'nonpayable',
|
|
8146
|
+
type: 'function',
|
|
8147
|
+
},
|
|
8148
|
+
{
|
|
8149
|
+
inputs: [],
|
|
8150
|
+
name: 'maxVerificationFee',
|
|
8151
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
8152
|
+
stateMutability: 'view',
|
|
8153
|
+
type: 'function',
|
|
8154
|
+
},
|
|
8155
|
+
{
|
|
8156
|
+
inputs: [],
|
|
8157
|
+
name: 'period',
|
|
8158
|
+
outputs: [{ internalType: 'uint32', name: '', type: 'uint32' }],
|
|
8159
|
+
stateMutability: 'view',
|
|
8160
|
+
type: 'function',
|
|
8161
|
+
},
|
|
8162
|
+
{
|
|
8163
|
+
inputs: [
|
|
8164
|
+
{ internalType: 'uint256', name: 'newMaxVerificationFee', type: 'uint256' },
|
|
8165
|
+
{ internalType: 'uint32', name: 'newPeriod', type: 'uint32' },
|
|
8166
|
+
],
|
|
8167
|
+
name: 'setConfig',
|
|
8168
|
+
outputs: [],
|
|
8169
|
+
stateMutability: 'nonpayable',
|
|
8170
|
+
type: 'function',
|
|
8171
|
+
},
|
|
8172
|
+
{
|
|
8173
|
+
inputs: [{ internalType: 'bytes', name: 'report', type: 'bytes' }],
|
|
8174
|
+
name: 'updateWithChainlink',
|
|
8175
|
+
outputs: [],
|
|
8176
|
+
stateMutability: 'nonpayable',
|
|
8177
|
+
type: 'function',
|
|
8178
|
+
},
|
|
8179
|
+
{
|
|
8180
|
+
inputs: [{ internalType: 'uint256', name: 'updateId', type: 'uint256' }],
|
|
8181
|
+
name: 'updateWithChaosLabs',
|
|
8182
|
+
outputs: [],
|
|
8183
|
+
stateMutability: 'nonpayable',
|
|
8184
|
+
type: 'function',
|
|
8185
|
+
},
|
|
8186
|
+
{ inputs: [], name: 'updateWithPendle', outputs: [], stateMutability: 'nonpayable', type: 'function' },
|
|
8187
|
+
{
|
|
8188
|
+
inputs: [
|
|
8189
|
+
{ internalType: 'address', name: 'receiver', type: 'address' },
|
|
8190
|
+
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
|
8191
|
+
],
|
|
8192
|
+
name: 'withdraw',
|
|
8193
|
+
outputs: [],
|
|
8194
|
+
stateMutability: 'nonpayable',
|
|
8195
|
+
type: 'function',
|
|
8196
|
+
},
|
|
8197
|
+
];
|
|
8198
|
+
exports.iFundingRateOracleAbi = [
|
|
8199
|
+
{
|
|
8200
|
+
anonymous: false,
|
|
8201
|
+
inputs: [
|
|
8202
|
+
{
|
|
8203
|
+
components: [
|
|
8204
|
+
{ internalType: 'int112', name: 'fundingRate', type: 'int112' },
|
|
8205
|
+
{ internalType: 'uint32', name: 'fundingTimestamp', type: 'uint32' },
|
|
8206
|
+
{ internalType: 'uint32', name: 'epochDuration', type: 'uint32' },
|
|
8207
|
+
{ internalType: 'uint256', name: 'updatedAt', type: 'uint256' },
|
|
8208
|
+
],
|
|
8209
|
+
indexed: false,
|
|
8210
|
+
internalType: 'struct IFundingRateOracle.FundingRateUpdate',
|
|
8211
|
+
name: '',
|
|
8212
|
+
type: 'tuple',
|
|
8213
|
+
},
|
|
8214
|
+
],
|
|
8215
|
+
name: 'FundingRateUpdated',
|
|
8216
|
+
type: 'event',
|
|
8217
|
+
},
|
|
8218
|
+
{
|
|
8219
|
+
inputs: [],
|
|
8220
|
+
name: 'latestUpdate',
|
|
8221
|
+
outputs: [
|
|
8222
|
+
{ internalType: 'int112', name: 'fundingRate', type: 'int112' },
|
|
8223
|
+
{ internalType: 'uint32', name: 'fundingTimestamp', type: 'uint32' },
|
|
8224
|
+
{ internalType: 'uint32', name: 'epochDuration', type: 'uint32' },
|
|
8225
|
+
{ internalType: 'uint256', name: 'updatedAt', type: 'uint256' },
|
|
8226
|
+
],
|
|
8227
|
+
stateMutability: 'view',
|
|
8228
|
+
type: 'function',
|
|
8229
|
+
},
|
|
8230
|
+
{
|
|
8231
|
+
inputs: [],
|
|
8232
|
+
name: 'maxFundingRate',
|
|
8233
|
+
outputs: [{ internalType: 'int112', name: '', type: 'int112' }],
|
|
8234
|
+
stateMutability: 'view',
|
|
8235
|
+
type: 'function',
|
|
8236
|
+
},
|
|
8237
|
+
{
|
|
8238
|
+
inputs: [],
|
|
8239
|
+
name: 'minFundingRate',
|
|
8240
|
+
outputs: [{ internalType: 'int112', name: '', type: 'int112' }],
|
|
8241
|
+
stateMutability: 'view',
|
|
8242
|
+
type: 'function',
|
|
8243
|
+
},
|
|
8244
|
+
{
|
|
8245
|
+
inputs: [],
|
|
8246
|
+
name: 'name',
|
|
8247
|
+
outputs: [{ internalType: 'string', name: '', type: 'string' }],
|
|
8248
|
+
stateMutability: 'view',
|
|
8249
|
+
type: 'function',
|
|
8250
|
+
},
|
|
8251
|
+
{
|
|
8252
|
+
inputs: [
|
|
8253
|
+
{ internalType: 'int112', name: 'fundingRate', type: 'int112' },
|
|
8254
|
+
{ internalType: 'uint32', name: 'fundingTimestamp', type: 'uint32' },
|
|
8255
|
+
{ internalType: 'uint32', name: 'epochDuration', type: 'uint32' },
|
|
8256
|
+
],
|
|
8257
|
+
name: 'updateFundingRate',
|
|
8258
|
+
outputs: [],
|
|
8259
|
+
stateMutability: 'nonpayable',
|
|
8260
|
+
type: 'function',
|
|
8261
|
+
},
|
|
8262
|
+
];
|
|
8079
8263
|
exports.iAMMAbi = [
|
|
8080
8264
|
{
|
|
8081
8265
|
inputs: [
|
|
@@ -8530,25 +8714,28 @@ exports.iDeleveragerFacetAbi = [
|
|
|
8530
8714
|
components: [
|
|
8531
8715
|
{ internalType: 'MarketAcc', name: 'lose', type: 'bytes26' },
|
|
8532
8716
|
{ internalType: 'MarketId[]', name: 'marketIds', type: 'uint24[]' },
|
|
8717
|
+
{ internalType: 'MarketAcc[][]', name: 'wins', type: 'bytes26[][]' },
|
|
8533
8718
|
{
|
|
8534
8719
|
components: [
|
|
8535
|
-
{ internalType: '
|
|
8536
|
-
{ internalType: '
|
|
8537
|
-
{ internalType: '
|
|
8720
|
+
{ internalType: 'MarketId', name: 'marketId', type: 'uint24' },
|
|
8721
|
+
{ internalType: 'enum FundingRateSource', name: 'source', type: 'uint8' },
|
|
8722
|
+
{ internalType: 'bytes', name: 'data', type: 'bytes' },
|
|
8538
8723
|
],
|
|
8539
|
-
internalType: 'struct
|
|
8540
|
-
name: '
|
|
8724
|
+
internalType: 'struct UpcomingFIndexUpdate[]',
|
|
8725
|
+
name: 'fIndexUpdates',
|
|
8541
8726
|
type: 'tuple[]',
|
|
8542
8727
|
},
|
|
8728
|
+
{ internalType: 'int256', name: 'desiredHealthRatio', type: 'int256' },
|
|
8543
8729
|
{ internalType: 'bool', name: 'allowAMM', type: 'bool' },
|
|
8730
|
+
{ internalType: 'bool', name: 'allowPartial', type: 'bool' },
|
|
8544
8731
|
],
|
|
8545
|
-
internalType: 'struct IDeleveragerFacet.
|
|
8732
|
+
internalType: 'struct IDeleveragerFacet.DeleverageToHealthRequest',
|
|
8546
8733
|
name: 'req',
|
|
8547
8734
|
type: 'tuple',
|
|
8548
8735
|
},
|
|
8549
8736
|
],
|
|
8550
|
-
name: '
|
|
8551
|
-
outputs: [],
|
|
8737
|
+
name: 'calcDelevFactor',
|
|
8738
|
+
outputs: [{ internalType: 'int256', name: '', type: 'int256' }],
|
|
8552
8739
|
stateMutability: 'nonpayable',
|
|
8553
8740
|
type: 'function',
|
|
8554
8741
|
},
|
|
@@ -8566,6 +8753,16 @@ exports.iDeleveragerFacetAbi = [
|
|
|
8566
8753
|
{ internalType: 'MarketAcc', name: 'lose', type: 'bytes26' },
|
|
8567
8754
|
{ internalType: 'MarketId[]', name: 'marketIds', type: 'uint24[]' },
|
|
8568
8755
|
{ internalType: 'MarketAcc[][]', name: 'wins', type: 'bytes26[][]' },
|
|
8756
|
+
{
|
|
8757
|
+
components: [
|
|
8758
|
+
{ internalType: 'MarketId', name: 'marketId', type: 'uint24' },
|
|
8759
|
+
{ internalType: 'enum FundingRateSource', name: 'source', type: 'uint8' },
|
|
8760
|
+
{ internalType: 'bytes', name: 'data', type: 'bytes' },
|
|
8761
|
+
],
|
|
8762
|
+
internalType: 'struct UpcomingFIndexUpdate[]',
|
|
8763
|
+
name: 'fIndexUpdates',
|
|
8764
|
+
type: 'tuple[]',
|
|
8765
|
+
},
|
|
8569
8766
|
{ internalType: 'int256', name: 'desiredHealthRatio', type: 'int256' },
|
|
8570
8767
|
{ internalType: 'bool', name: 'allowAMM', type: 'bool' },
|
|
8571
8768
|
{ internalType: 'bool', name: 'allowPartial', type: 'bool' },
|
|
@@ -8580,6 +8777,34 @@ exports.iDeleveragerFacetAbi = [
|
|
|
8580
8777
|
stateMutability: 'nonpayable',
|
|
8581
8778
|
type: 'function',
|
|
8582
8779
|
},
|
|
8780
|
+
{
|
|
8781
|
+
inputs: [
|
|
8782
|
+
{
|
|
8783
|
+
components: [
|
|
8784
|
+
{ internalType: 'MarketAcc', name: 'lose', type: 'bytes26' },
|
|
8785
|
+
{ internalType: 'MarketId[]', name: 'marketIds', type: 'uint24[]' },
|
|
8786
|
+
{
|
|
8787
|
+
components: [
|
|
8788
|
+
{ internalType: 'uint256', name: 'lossFactor', type: 'uint256' },
|
|
8789
|
+
{ internalType: 'MarketAcc[]', name: 'wins', type: 'bytes26[]' },
|
|
8790
|
+
{ internalType: 'int256[]', name: 'sizesToWin', type: 'int256[]' },
|
|
8791
|
+
],
|
|
8792
|
+
internalType: 'struct IDeleveragerFacet.ManualDeleverageInput[]',
|
|
8793
|
+
name: 'inputs',
|
|
8794
|
+
type: 'tuple[]',
|
|
8795
|
+
},
|
|
8796
|
+
{ internalType: 'bool', name: 'allowAMM', type: 'bool' },
|
|
8797
|
+
],
|
|
8798
|
+
internalType: 'struct IDeleveragerFacet.DeleverageRequest',
|
|
8799
|
+
name: 'req',
|
|
8800
|
+
type: 'tuple',
|
|
8801
|
+
},
|
|
8802
|
+
],
|
|
8803
|
+
name: 'manualDeleverage',
|
|
8804
|
+
outputs: [],
|
|
8805
|
+
stateMutability: 'nonpayable',
|
|
8806
|
+
type: 'function',
|
|
8807
|
+
},
|
|
8583
8808
|
{
|
|
8584
8809
|
inputs: [{ internalType: 'int256', name: 'newDeleverageThresHR', type: 'int256' }],
|
|
8585
8810
|
name: 'setDeleverageThresHR',
|
|
@@ -8637,7 +8862,19 @@ exports.iOrderCancellerFacetAbi = [
|
|
|
8637
8862
|
type: 'event',
|
|
8638
8863
|
},
|
|
8639
8864
|
{
|
|
8640
|
-
inputs: [
|
|
8865
|
+
inputs: [
|
|
8866
|
+
{ internalType: 'MarketAcc', name: 'user', type: 'bytes26' },
|
|
8867
|
+
{
|
|
8868
|
+
components: [
|
|
8869
|
+
{ internalType: 'MarketId', name: 'marketId', type: 'uint24' },
|
|
8870
|
+
{ internalType: 'enum FundingRateSource', name: 'source', type: 'uint8' },
|
|
8871
|
+
{ internalType: 'bytes', name: 'data', type: 'bytes' },
|
|
8872
|
+
],
|
|
8873
|
+
internalType: 'struct UpcomingFIndexUpdate[]',
|
|
8874
|
+
name: 'fIndexUpdates',
|
|
8875
|
+
type: 'tuple[]',
|
|
8876
|
+
},
|
|
8877
|
+
],
|
|
8641
8878
|
name: 'findHealthJumpOrders',
|
|
8642
8879
|
outputs: [
|
|
8643
8880
|
{ internalType: 'bool', name: 'risky', type: 'bool' },
|
|
@@ -8658,6 +8895,16 @@ exports.iOrderCancellerFacetAbi = [
|
|
|
8658
8895
|
{
|
|
8659
8896
|
inputs: [
|
|
8660
8897
|
{ internalType: 'MarketAcc', name: 'user', type: 'bytes26' },
|
|
8898
|
+
{
|
|
8899
|
+
components: [
|
|
8900
|
+
{ internalType: 'MarketId', name: 'marketId', type: 'uint24' },
|
|
8901
|
+
{ internalType: 'enum FundingRateSource', name: 'source', type: 'uint8' },
|
|
8902
|
+
{ internalType: 'bytes', name: 'data', type: 'bytes' },
|
|
8903
|
+
],
|
|
8904
|
+
internalType: 'struct UpcomingFIndexUpdate[]',
|
|
8905
|
+
name: 'fIndexUpdates',
|
|
8906
|
+
type: 'tuple[]',
|
|
8907
|
+
},
|
|
8661
8908
|
{
|
|
8662
8909
|
components: [
|
|
8663
8910
|
{ internalType: 'MarketId', name: 'marketId', type: 'uint24' },
|