@pyron-finance/pyron-client 1.0.2 → 1.0.3
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/{chunk-D3ESV8qN.mjs → chunk-B9dir_RE.mjs} +1 -3
- package/dist/common/index.d.mts +1 -1
- package/dist/common/index.d.ts +1 -1
- package/dist/common/index.js +1 -1
- package/dist/common/index.mjs +1 -1
- package/dist/{index-Bpr6asS1.d.ts → index-C75esL_v.d.ts} +73 -5
- package/dist/index-C75esL_v.d.ts.map +1 -0
- package/dist/{index-CjdbT6Xw.d.mts → index-Y9VW4ezm.d.mts} +73 -5
- package/dist/index-Y9VW4ezm.d.mts.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-B_34n__D.mjs → src-DITEj1yC.mjs} +368 -227
- package/dist/src-DITEj1yC.mjs.map +1 -0
- package/dist/{src-CWX5tHYY.js → src-WLna_-6m.js} +380 -254
- package/package.json +4 -4
- package/dist/index-Bpr6asS1.d.ts.map +0 -1
- package/dist/index-CjdbT6Xw.d.mts.map +0 -1
- package/dist/src-B_34n__D.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __export } from "./chunk-
|
|
1
|
+
import { __export } from "./chunk-B9dir_RE.mjs";
|
|
2
2
|
import * as anchor from "@coral-xyz/anchor";
|
|
3
3
|
import { AnchorProvider, BN, BorshAccountsCoder, BorshCoder, BorshInstructionCoder, LangErrorMessage, Program, translateAddress } from "@coral-xyz/anchor";
|
|
4
4
|
import bs58 from "bs58";
|
|
@@ -2655,6 +2655,8 @@ const replenishPoolIx = (voteAccount) => {
|
|
|
2655
2655
|
//#endregion
|
|
2656
2656
|
//#region src/vendor/switchboard_legacy/account.ts
|
|
2657
2657
|
var Account = class {
|
|
2658
|
+
program;
|
|
2659
|
+
publicKey;
|
|
2658
2660
|
/**
|
|
2659
2661
|
* Account constructor
|
|
2660
2662
|
* @param program SwitchboardProgram
|
|
@@ -2691,16 +2693,10 @@ var AggregatorAccount = class extends Account {
|
|
|
2691
2693
|
//#endregion
|
|
2692
2694
|
//#region src/vendor/switchboard_legacy/AggregatorResolutionMode.ts
|
|
2693
2695
|
var ModeRoundResolution = class {
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
static {
|
|
2699
|
-
this.discriminator = 0;
|
|
2700
|
-
}
|
|
2701
|
-
static {
|
|
2702
|
-
this.kind = "ModeRoundResolution";
|
|
2703
|
-
}
|
|
2696
|
+
static discriminator = 0;
|
|
2697
|
+
static kind = "ModeRoundResolution";
|
|
2698
|
+
discriminator = 0;
|
|
2699
|
+
kind = "ModeRoundResolution";
|
|
2704
2700
|
toJSON() {
|
|
2705
2701
|
return { kind: "ModeRoundResolution" };
|
|
2706
2702
|
}
|
|
@@ -2709,16 +2705,10 @@ var ModeRoundResolution = class {
|
|
|
2709
2705
|
}
|
|
2710
2706
|
};
|
|
2711
2707
|
var ModeSlidingResolution = class {
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
static {
|
|
2717
|
-
this.discriminator = 1;
|
|
2718
|
-
}
|
|
2719
|
-
static {
|
|
2720
|
-
this.kind = "ModeSlidingResolution";
|
|
2721
|
-
}
|
|
2708
|
+
static discriminator = 1;
|
|
2709
|
+
static kind = "ModeSlidingResolution";
|
|
2710
|
+
discriminator = 1;
|
|
2711
|
+
kind = "ModeSlidingResolution";
|
|
2722
2712
|
toJSON() {
|
|
2723
2713
|
return { kind: "ModeSlidingResolution" };
|
|
2724
2714
|
}
|
|
@@ -2759,6 +2749,13 @@ function layout(property) {
|
|
|
2759
2749
|
//#endregion
|
|
2760
2750
|
//#region src/vendor/switchboard_legacy/switchboardDecimal.ts
|
|
2761
2751
|
var SwitchboardDecimal = class SwitchboardDecimal {
|
|
2752
|
+
/**
|
|
2753
|
+
* The part of a floating-point number that represents the significant digits of that number,
|
|
2754
|
+
* and that is multiplied by the base, 10, raised to the power of scale to give the actual value of the number.
|
|
2755
|
+
*/
|
|
2756
|
+
mantissa;
|
|
2757
|
+
/** The number of decimal places to move to the left to yield the actual value. */
|
|
2758
|
+
scale;
|
|
2762
2759
|
constructor(fields) {
|
|
2763
2760
|
this.mantissa = fields.mantissa;
|
|
2764
2761
|
this.scale = fields.scale;
|
|
@@ -2868,6 +2865,37 @@ var SwitchboardDecimal = class SwitchboardDecimal {
|
|
|
2868
2865
|
//#endregion
|
|
2869
2866
|
//#region src/vendor/switchboard_legacy/aggregatorRound.ts
|
|
2870
2867
|
var AggregatorRound = class AggregatorRound {
|
|
2868
|
+
/**
|
|
2869
|
+
* Maintains the number of successful responses received from nodes.
|
|
2870
|
+
* Nodes can submit one successful response per round.
|
|
2871
|
+
*/
|
|
2872
|
+
numSuccess;
|
|
2873
|
+
/** Number of error responses. */
|
|
2874
|
+
numError;
|
|
2875
|
+
/** Whether an update request round has ended. */
|
|
2876
|
+
isClosed;
|
|
2877
|
+
/** Maintains the `solana_program::clock::Slot` that the round was opened at. */
|
|
2878
|
+
roundOpenSlot;
|
|
2879
|
+
/** Maintains the `solana_program::clock::UnixTimestamp;` the round was opened at. */
|
|
2880
|
+
roundOpenTimestamp;
|
|
2881
|
+
/** Maintains the current median of all successful round responses. */
|
|
2882
|
+
result;
|
|
2883
|
+
/** Standard deviation of the accepted results in the round. */
|
|
2884
|
+
stdDeviation;
|
|
2885
|
+
/** Maintains the minimum node response this round. */
|
|
2886
|
+
minResponse;
|
|
2887
|
+
/** Maintains the maximum node response this round. */
|
|
2888
|
+
maxResponse;
|
|
2889
|
+
/** Pubkeys of the oracles fulfilling this round. */
|
|
2890
|
+
oraclePubkeysData;
|
|
2891
|
+
/** Represents all successful node responses this round. `NaN` if empty. */
|
|
2892
|
+
mediansData;
|
|
2893
|
+
/** Current rewards/slashes oracles have received this round. */
|
|
2894
|
+
currentPayout;
|
|
2895
|
+
/** Keep track of which responses are fulfilled here. */
|
|
2896
|
+
mediansFulfilled;
|
|
2897
|
+
/** Keeps track of which errors are fulfilled here. */
|
|
2898
|
+
errorsFulfilled;
|
|
2871
2899
|
constructor(fields) {
|
|
2872
2900
|
this.numSuccess = fields.numSuccess;
|
|
2873
2901
|
this.numError = fields.numError;
|
|
@@ -2982,6 +3010,8 @@ var AggregatorRound = class AggregatorRound {
|
|
|
2982
3010
|
//#endregion
|
|
2983
3011
|
//#region src/vendor/switchboard_legacy/Hash.ts
|
|
2984
3012
|
var Hash = class Hash {
|
|
3013
|
+
/** The bytes used to derive the hash. */
|
|
3014
|
+
data;
|
|
2985
3015
|
constructor(fields) {
|
|
2986
3016
|
this.data = fields.data;
|
|
2987
3017
|
}
|
|
@@ -3008,57 +3038,125 @@ var Hash = class Hash {
|
|
|
3008
3038
|
//#endregion
|
|
3009
3039
|
//#region src/vendor/switchboard_legacy/aggregatorAccountData.ts
|
|
3010
3040
|
var AggregatorAccountData = class AggregatorAccountData {
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3041
|
+
/** Name of the aggregator to store on-chain. */
|
|
3042
|
+
name;
|
|
3043
|
+
/** Metadata of the aggregator to store on-chain. */
|
|
3044
|
+
metadata;
|
|
3045
|
+
/** Reserved. */
|
|
3046
|
+
reserved1;
|
|
3047
|
+
/** Pubkey of the queue the aggregator belongs to. */
|
|
3048
|
+
queuePubkey;
|
|
3049
|
+
/**
|
|
3050
|
+
* CONFIGS
|
|
3051
|
+
* Number of oracles assigned to an update request.
|
|
3052
|
+
*/
|
|
3053
|
+
oracleRequestBatchSize;
|
|
3054
|
+
/** Minimum number of oracle responses required before a round is validated. */
|
|
3055
|
+
minOracleResults;
|
|
3056
|
+
/** Minimum number of job results before an oracle accepts a result. */
|
|
3057
|
+
minJobResults;
|
|
3058
|
+
/** Minimum number of seconds required between aggregator rounds. */
|
|
3059
|
+
minUpdateDelaySeconds;
|
|
3060
|
+
/** Unix timestamp for which no feed update will occur before. */
|
|
3061
|
+
startAfter;
|
|
3062
|
+
/** Change percentage required between a previous round and the current round. If variance percentage is not met, reject new oracle responses. */
|
|
3063
|
+
varianceThreshold;
|
|
3064
|
+
/** Number of seconds for which, even if the variance threshold is not passed, accept new responses from oracles. */
|
|
3065
|
+
forceReportPeriod;
|
|
3066
|
+
/** Timestamp when the feed is no longer needed. */
|
|
3067
|
+
expiration;
|
|
3068
|
+
/** Counter for the number of consecutive failures before a feed is removed from a queue. If set to 0, failed feeds will remain on the queue. */
|
|
3069
|
+
consecutiveFailureCount;
|
|
3070
|
+
/** Timestamp when the next update request will be available. */
|
|
3071
|
+
nextAllowedUpdateTime;
|
|
3072
|
+
/** Flag for whether an aggregators configuration is locked for editing. */
|
|
3073
|
+
isLocked;
|
|
3074
|
+
/** Optional, public key of the crank the aggregator is currently using. Event based feeds do not need a crank. */
|
|
3075
|
+
crankPubkey;
|
|
3076
|
+
/** Latest confirmed update request result that has been accepted as valid. */
|
|
3077
|
+
latestConfirmedRound;
|
|
3078
|
+
/** Oracle results from the current round of update request that has not been accepted as valid yet. */
|
|
3079
|
+
currentRound;
|
|
3080
|
+
/** List of public keys containing the job definitions for how data is sourced off-chain by oracles. */
|
|
3081
|
+
jobPubkeysData;
|
|
3082
|
+
/** Used to protect against malicious RPC nodes providing incorrect task definitions to oracles before fulfillment. */
|
|
3083
|
+
jobHashes;
|
|
3084
|
+
/** Number of jobs assigned to an oracle. */
|
|
3085
|
+
jobPubkeysSize;
|
|
3086
|
+
/** Used to protect against malicious RPC nodes providing incorrect task definitions to oracles before fulfillment. */
|
|
3087
|
+
jobsChecksum;
|
|
3088
|
+
/** The account delegated as the authority for making account changes. */
|
|
3089
|
+
authority;
|
|
3090
|
+
/** Optional, public key of a history buffer account storing the last N accepted results and their timestamps. */
|
|
3091
|
+
historyBuffer;
|
|
3092
|
+
/** The previous confirmed round result. */
|
|
3093
|
+
previousConfirmedRoundResult;
|
|
3094
|
+
/** The slot when the previous confirmed round was opened. */
|
|
3095
|
+
previousConfirmedRoundSlot;
|
|
3096
|
+
/** Whether an aggregator is permitted to join a crank. */
|
|
3097
|
+
disableCrank;
|
|
3098
|
+
/** Job weights used for the weighted median of the aggregator's assigned job accounts. */
|
|
3099
|
+
jobWeights;
|
|
3100
|
+
/** Unix timestamp when the feed was created. */
|
|
3101
|
+
creationTimestamp;
|
|
3102
|
+
/**
|
|
3103
|
+
* Use sliding window or round based resolution
|
|
3104
|
+
* NOTE: This changes result propogation in latest_round_result
|
|
3105
|
+
*/
|
|
3106
|
+
resolutionMode;
|
|
3107
|
+
basePriorityFee;
|
|
3108
|
+
priorityFeeBump;
|
|
3109
|
+
priorityFeeBumpPeriod;
|
|
3110
|
+
maxPriorityFeeMultiplier;
|
|
3111
|
+
/** Reserved for future info. */
|
|
3112
|
+
ebuf;
|
|
3113
|
+
static discriminator = Buffer.from([
|
|
3114
|
+
217,
|
|
3115
|
+
230,
|
|
3116
|
+
65,
|
|
3117
|
+
101,
|
|
3118
|
+
201,
|
|
3119
|
+
162,
|
|
3120
|
+
27,
|
|
3121
|
+
125
|
|
3122
|
+
]);
|
|
3123
|
+
static layout = borsh.struct([
|
|
3124
|
+
borsh.array(borsh.u8(), 32, "name"),
|
|
3125
|
+
borsh.array(borsh.u8(), 128, "metadata"),
|
|
3126
|
+
borsh.array(borsh.u8(), 32, "reserved1"),
|
|
3127
|
+
borsh.publicKey("queuePubkey"),
|
|
3128
|
+
borsh.u32("oracleRequestBatchSize"),
|
|
3129
|
+
borsh.u32("minOracleResults"),
|
|
3130
|
+
borsh.u32("minJobResults"),
|
|
3131
|
+
borsh.u32("minUpdateDelaySeconds"),
|
|
3132
|
+
borsh.i64("startAfter"),
|
|
3133
|
+
SwitchboardDecimal.layout("varianceThreshold"),
|
|
3134
|
+
borsh.i64("forceReportPeriod"),
|
|
3135
|
+
borsh.i64("expiration"),
|
|
3136
|
+
borsh.u64("consecutiveFailureCount"),
|
|
3137
|
+
borsh.i64("nextAllowedUpdateTime"),
|
|
3138
|
+
borsh.bool("isLocked"),
|
|
3139
|
+
borsh.publicKey("crankPubkey"),
|
|
3140
|
+
AggregatorRound.layout("latestConfirmedRound"),
|
|
3141
|
+
AggregatorRound.layout("currentRound"),
|
|
3142
|
+
borsh.array(borsh.publicKey(), 16, "jobPubkeysData"),
|
|
3143
|
+
borsh.array(Hash.layout({}), 16, "jobHashes"),
|
|
3144
|
+
borsh.u32("jobPubkeysSize"),
|
|
3145
|
+
borsh.array(borsh.u8(), 32, "jobsChecksum"),
|
|
3146
|
+
borsh.publicKey("authority"),
|
|
3147
|
+
borsh.publicKey("historyBuffer"),
|
|
3148
|
+
SwitchboardDecimal.layout("previousConfirmedRoundResult"),
|
|
3149
|
+
borsh.u64("previousConfirmedRoundSlot"),
|
|
3150
|
+
borsh.bool("disableCrank"),
|
|
3151
|
+
borsh.array(borsh.u8(), 16, "jobWeights"),
|
|
3152
|
+
borsh.i64("creationTimestamp"),
|
|
3153
|
+
layout("resolutionMode"),
|
|
3154
|
+
borsh.u32("basePriorityFee"),
|
|
3155
|
+
borsh.u32("priorityFeeBump"),
|
|
3156
|
+
borsh.u32("priorityFeeBumpPeriod"),
|
|
3157
|
+
borsh.u32("maxPriorityFeeMultiplier"),
|
|
3158
|
+
borsh.array(borsh.u8(), 122, "ebuf")
|
|
3159
|
+
]);
|
|
3062
3160
|
constructor(fields) {
|
|
3063
3161
|
this.name = fields.name;
|
|
3064
3162
|
this.metadata = fields.metadata;
|
|
@@ -6818,7 +6916,8 @@ function decodeSwitchboardPullFeedData(data) {
|
|
|
6818
6916
|
|
|
6819
6917
|
//#endregion
|
|
6820
6918
|
//#region src/vendor/index.ts
|
|
6821
|
-
var vendor_exports =
|
|
6919
|
+
var vendor_exports = {};
|
|
6920
|
+
__export(vendor_exports, {
|
|
6822
6921
|
AccountType: () => AccountType$1,
|
|
6823
6922
|
AggregatorAccount: () => AggregatorAccount,
|
|
6824
6923
|
AggregatorAccountData: () => AggregatorAccountData,
|
|
@@ -11626,6 +11725,8 @@ function isWeightedPrice(reqType) {
|
|
|
11626
11725
|
//#endregion
|
|
11627
11726
|
//#region src/models/account/wrapper.ts
|
|
11628
11727
|
var LendrAccountWrapper = class LendrAccountWrapper {
|
|
11728
|
+
address;
|
|
11729
|
+
_lendrAccount;
|
|
11629
11730
|
/**
|
|
11630
11731
|
* @internal
|
|
11631
11732
|
*/
|
|
@@ -13308,6 +13409,7 @@ var HealthCache = class HealthCache {
|
|
|
13308
13409
|
//#endregion
|
|
13309
13410
|
//#region src/services/transaction/helpers/bundle-sending.ts
|
|
13310
13411
|
var SendBundleError = class extends Error {
|
|
13412
|
+
bundleId;
|
|
13311
13413
|
constructor(message, bundleId) {
|
|
13312
13414
|
super(message);
|
|
13313
13415
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
@@ -19468,6 +19570,11 @@ let ProcessTransactionErrorType = /* @__PURE__ */ function(ProcessTransactionErr
|
|
|
19468
19570
|
return ProcessTransactionErrorType$1;
|
|
19469
19571
|
}({});
|
|
19470
19572
|
var ProcessTransactionError = class ProcessTransactionError extends Error {
|
|
19573
|
+
logs;
|
|
19574
|
+
type;
|
|
19575
|
+
programId;
|
|
19576
|
+
failedTxs;
|
|
19577
|
+
_error;
|
|
19471
19578
|
constructor({ message, type, logs, programId, code, failedTxs, _error }) {
|
|
19472
19579
|
super(message);
|
|
19473
19580
|
this.programId = programId;
|
|
@@ -20867,6 +20974,8 @@ function healthCacheToDto(healthCache) {
|
|
|
20867
20974
|
* Custom error class for health cache simulation failures
|
|
20868
20975
|
*/
|
|
20869
20976
|
var HealthCacheSimulationError = class HealthCacheSimulationError extends Error {
|
|
20977
|
+
lndrErr;
|
|
20978
|
+
internalErr;
|
|
20870
20979
|
constructor(message, lndrErr, internalErr) {
|
|
20871
20980
|
super(message);
|
|
20872
20981
|
this.name = "HealthCacheSimulationError";
|
|
@@ -21296,9 +21405,12 @@ const metadataSchema = z$1.object({
|
|
|
21296
21405
|
});
|
|
21297
21406
|
const endpointSchema = z$1.record(z$1.string(), metadataSchema);
|
|
21298
21407
|
var MetadataService = class {
|
|
21408
|
+
/** NOTE: record key is base58 of mint public key */
|
|
21409
|
+
_cache = new Map();
|
|
21410
|
+
/** NOTE: record key is base58 of mint public key */
|
|
21411
|
+
overrides;
|
|
21299
21412
|
constructor(connection, overrides = {}) {
|
|
21300
21413
|
this.connection = connection;
|
|
21301
|
-
this._cache = new Map();
|
|
21302
21414
|
this.overrides = overrides;
|
|
21303
21415
|
}
|
|
21304
21416
|
async forMints(mints) {
|
|
@@ -21665,6 +21777,8 @@ function fetchLatestIdl() {
|
|
|
21665
21777
|
//#endregion
|
|
21666
21778
|
//#region src/models/group.ts
|
|
21667
21779
|
var LendrGroup = class LendrGroup {
|
|
21780
|
+
address;
|
|
21781
|
+
admin;
|
|
21668
21782
|
constructor(admin, address$2) {
|
|
21669
21783
|
this.admin = admin;
|
|
21670
21784
|
this.address = address$2;
|
|
@@ -21714,6 +21828,24 @@ var LendrGroup = class LendrGroup {
|
|
|
21714
21828
|
* Entrypoint to interact with the lendr contract.
|
|
21715
21829
|
*/
|
|
21716
21830
|
var LendrClient = class LendrClient {
|
|
21831
|
+
program;
|
|
21832
|
+
wallet;
|
|
21833
|
+
config;
|
|
21834
|
+
isReadOnly;
|
|
21835
|
+
logger;
|
|
21836
|
+
group;
|
|
21837
|
+
banks;
|
|
21838
|
+
oraclePrices;
|
|
21839
|
+
mintDatas;
|
|
21840
|
+
addressLookupTables;
|
|
21841
|
+
lookupTablesAddresses;
|
|
21842
|
+
feedIdMap;
|
|
21843
|
+
processTransactionStrategy;
|
|
21844
|
+
bundleSimRpcEndpoint;
|
|
21845
|
+
bankMetadataMap;
|
|
21846
|
+
overrideBankAddresses;
|
|
21847
|
+
overrideBanksMetadata;
|
|
21848
|
+
metadataService;
|
|
21717
21849
|
constructor({ program, wallet, config, isReadOnly, group, banks, priceInfos, mintDatas, addressLookupTables, feedIdMap, logger, bankMetadataMap, overrideBanksMetadata, overrideBankAddresses, bundleSimRpcEndpoint, processTransactionStrategy, lookupTablesAddresses, metadataService }) {
|
|
21718
21850
|
this.program = program;
|
|
21719
21851
|
this.wallet = wallet;
|
|
@@ -21812,165 +21944,174 @@ var LendrClient = class LendrClient {
|
|
|
21812
21944
|
const accounts$2 = await Promise.all(addressLookupTableAddresses.map((address$2) => connection.getAddressLookupTable(address$2)));
|
|
21813
21945
|
return accounts$2.map((response) => response?.value).filter((table) => table !== null);
|
|
21814
21946
|
}
|
|
21815
|
-
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
|
|
21819
|
-
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
|
|
21826
|
-
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
|
|
21830
|
-
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21947
|
+
/**
|
|
21948
|
+
* Fetches all data for a group, including banks and oracle prices
|
|
21949
|
+
* NOTE: If bankAddresses not provided, this will make 2 RPC calls
|
|
21950
|
+
* @param connection
|
|
21951
|
+
* @param program The Lendr program
|
|
21952
|
+
* @param groupAddress The address of the group
|
|
21953
|
+
* @param logger Optional logger
|
|
21954
|
+
* @param commitment Transaction commitment level
|
|
21955
|
+
* @param overrideBankAddresses Optional list of bank addresses to fetch
|
|
21956
|
+
* @param overrideBanksMetadata Optional bank metadata for overriding on-chain metadata
|
|
21957
|
+
* @param metadataService Metadata service for fetching mint metadata
|
|
21958
|
+
* @returns Lending group data, banks, and oracle prices
|
|
21959
|
+
*/
|
|
21960
|
+
static fetchGroupData = async ({ connection, program, groupAddress, commitment, overrideBanksMetadata, overrideBankAddresses, logger = new NoopLogger(), metadataService }) => {
|
|
21961
|
+
const banksRawData = await LendrClient.fetchRawBanks({
|
|
21962
|
+
program,
|
|
21963
|
+
groupAddress,
|
|
21964
|
+
logger,
|
|
21965
|
+
bankAddresses: overrideBankAddresses,
|
|
21966
|
+
commitment
|
|
21967
|
+
});
|
|
21968
|
+
const feedIdMap = await buildFeedIdMap(banksRawData.map((b) => b.data.config), program.provider.connection);
|
|
21969
|
+
const mintKeys = [];
|
|
21970
|
+
const emissionMintKeys = [];
|
|
21971
|
+
const oracleKeys = [];
|
|
21972
|
+
for (const bank of banksRawData) {
|
|
21973
|
+
mintKeys.push(bank.data.mint);
|
|
21974
|
+
if (!bank.data.emissionsMint.equals(PublicKey.default)) {
|
|
21975
|
+
emissionMintKeys.push(bank.data.emissionsMint);
|
|
21834
21976
|
}
|
|
21835
|
-
|
|
21836
|
-
|
|
21837
|
-
|
|
21838
|
-
|
|
21839
|
-
|
|
21840
|
-
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
21977
|
+
oracleKeys.push(findOracleKey(BankConfig.fromAccountParsed(bank.data.config), feedIdMap).oracleKey);
|
|
21978
|
+
}
|
|
21979
|
+
const allAccountInfos = await chunkedGetRawMultipleAccountInfoOrdered(program.provider.connection, [
|
|
21980
|
+
groupAddress.toBase58(),
|
|
21981
|
+
...oracleKeys.map((pk) => pk.toBase58()),
|
|
21982
|
+
...mintKeys.map((pk) => pk.toBase58()),
|
|
21983
|
+
...emissionMintKeys.map((pk) => pk.toBase58())
|
|
21984
|
+
]);
|
|
21985
|
+
const groupAccountInfo = allAccountInfos.shift();
|
|
21986
|
+
if (!groupAccountInfo) {
|
|
21987
|
+
throw new Error("Failed to fetch the on-chain group data");
|
|
21988
|
+
}
|
|
21989
|
+
const oracleAccountInfos = allAccountInfos.splice(0, oracleKeys.length);
|
|
21990
|
+
const mintAccountInfos = allAccountInfos.splice(0, mintKeys.length);
|
|
21991
|
+
const emissionMintAccountInfos = allAccountInfos.splice(0);
|
|
21992
|
+
const lendrGroup = LendrGroup.fromBuffer(groupAddress, groupAccountInfo.data, program.idl);
|
|
21993
|
+
const banksExtendedMetadata = await fetchBanksExtendedMetadata({
|
|
21994
|
+
mintsWithOwner: mintKeys.map((mint, idx) => ({
|
|
21995
|
+
mint,
|
|
21996
|
+
owner: mintAccountInfos[idx].owner
|
|
21997
|
+
})),
|
|
21998
|
+
metadataService,
|
|
21999
|
+
logger,
|
|
22000
|
+
overrideBanksMetadata
|
|
22001
|
+
});
|
|
22002
|
+
const banks = new Map();
|
|
22003
|
+
const priceInfos = new Map();
|
|
22004
|
+
const pythStakedCollateralBanks = [];
|
|
22005
|
+
const tokensData = new Map();
|
|
22006
|
+
const stakedCollatMap = {};
|
|
22007
|
+
const solPools = [];
|
|
22008
|
+
const mints = [];
|
|
22009
|
+
banksRawData.forEach(({ address: address$2, data }, index) => {
|
|
22010
|
+
const bankAddressStr = address$2.toBase58();
|
|
22011
|
+
const metadata$2 = banksExtendedMetadata.get(data.mint.toBase58());
|
|
22012
|
+
const mintDataRaw = mintAccountInfos[index];
|
|
22013
|
+
if (!mintDataRaw) {
|
|
22014
|
+
throw new Error(`Failed to fetch mint account for bank ${bankAddressStr}`);
|
|
21844
22015
|
}
|
|
21845
|
-
const
|
|
21846
|
-
|
|
21847
|
-
|
|
21848
|
-
const lendrGroup = LendrGroup.fromBuffer(groupAddress, groupAccountInfo.data, program.idl);
|
|
21849
|
-
const banksExtendedMetadata = await fetchBanksExtendedMetadata({
|
|
21850
|
-
mintsWithOwner: mintKeys.map((mint, idx) => ({
|
|
21851
|
-
mint,
|
|
21852
|
-
owner: mintAccountInfos[idx].owner
|
|
21853
|
-
})),
|
|
21854
|
-
metadataService,
|
|
21855
|
-
logger,
|
|
21856
|
-
overrideBanksMetadata
|
|
21857
|
-
});
|
|
21858
|
-
const banks = new Map();
|
|
21859
|
-
const priceInfos = new Map();
|
|
21860
|
-
const pythStakedCollateralBanks = [];
|
|
21861
|
-
const tokensData = new Map();
|
|
21862
|
-
const stakedCollatMap = {};
|
|
21863
|
-
const solPools = [];
|
|
21864
|
-
const mints = [];
|
|
21865
|
-
banksRawData.forEach(({ address: address$2, data }, index) => {
|
|
21866
|
-
const bankAddressStr = address$2.toBase58();
|
|
21867
|
-
const metadata$2 = banksExtendedMetadata.get(data.mint.toBase58());
|
|
21868
|
-
const mintDataRaw = mintAccountInfos[index];
|
|
21869
|
-
if (!mintDataRaw) {
|
|
21870
|
-
throw new Error(`Failed to fetch mint account for bank ${bankAddressStr}`);
|
|
21871
|
-
}
|
|
21872
|
-
const priceDataRaw = oracleAccountInfos[index];
|
|
21873
|
-
if (!priceDataRaw) {
|
|
21874
|
-
throw new Error(`Failed to fetch price oracle account for bank ${bankAddressStr}`);
|
|
21875
|
-
}
|
|
21876
|
-
const bank = Bank.fromAccountParsed(address$2, data, feedIdMap, metadata$2, mintDataRaw.owner);
|
|
21877
|
-
banks.set(bankAddressStr, bank);
|
|
21878
|
-
let emissionTokenProgram = null;
|
|
21879
|
-
if (!data.emissionsMint.equals(PublicKey.default)) {
|
|
21880
|
-
const emissionMintDataRawIndex = emissionMintKeys.findIndex((pk) => pk.equals(data.emissionsMint));
|
|
21881
|
-
emissionTokenProgram = emissionMintDataRawIndex >= 0 ? emissionMintAccountInfos[emissionMintDataRawIndex].owner : null;
|
|
21882
|
-
}
|
|
21883
|
-
tokensData.set(bankAddressStr, {
|
|
21884
|
-
mint: mintKeys[index],
|
|
21885
|
-
tokenProgram: mintDataRaw.owner,
|
|
21886
|
-
feeBps: 0,
|
|
21887
|
-
emissionTokenProgram
|
|
21888
|
-
});
|
|
21889
|
-
const oracleSetup = parseOracleSetup(data.config.oracleSetup);
|
|
21890
|
-
priceInfos.set(bankAddressStr, parseOraclePriceData(oracleSetup, priceDataRaw.data, logger));
|
|
21891
|
-
if (oracleSetup === OracleSetup.StakedWithPythPush && metadata$2?.validatorVoteAccount) {
|
|
21892
|
-
const [poolAddress] = PublicKey.findProgramAddressSync([Buffer.from("pool"), new PublicKey(metadata$2.validatorVoteAccount).toBuffer()], SINGLE_POOL_PROGRAM_ID);
|
|
21893
|
-
const [stakePoolAddress] = PublicKey.findProgramAddressSync([Buffer.from("stake"), poolAddress.toBuffer()], SINGLE_POOL_PROGRAM_ID);
|
|
21894
|
-
stakedCollatMap[address$2.toBase58()] = {
|
|
21895
|
-
bankAddress: address$2,
|
|
21896
|
-
mint: new PublicKey(metadata$2.mint),
|
|
21897
|
-
stakePoolAddress,
|
|
21898
|
-
poolAddress
|
|
21899
|
-
};
|
|
21900
|
-
solPools.push(stakePoolAddress.toBase58());
|
|
21901
|
-
mints.push(metadata$2.mint);
|
|
21902
|
-
}
|
|
21903
|
-
});
|
|
21904
|
-
const dataAis = await chunkedGetRawMultipleAccountInfoOrdered(program.provider.connection, [...mints, ...solPools]);
|
|
21905
|
-
const stakePoolsAis = dataAis.slice(mints.length).map((ai) => getStakeAccount(ai.data));
|
|
21906
|
-
const lstMintsAis = dataAis.slice(0, mints.length).map((mintAi) => MintLayout.decode(mintAi.data));
|
|
21907
|
-
const lstMintRecord = Object.fromEntries(mints.map((mint, i) => [mint, lstMintsAis[i]]));
|
|
21908
|
-
const solPoolsRecord = Object.fromEntries(solPools.map((poolKey, i) => [poolKey, stakePoolsAis[i]]));
|
|
21909
|
-
for (const index in stakedCollatMap) {
|
|
21910
|
-
const { bankAddress, mint, stakePoolAddress, poolAddress } = stakedCollatMap[index];
|
|
21911
|
-
const stakeAccount = solPoolsRecord[stakePoolAddress.toBase58()];
|
|
21912
|
-
const tokenSupply = lstMintRecord[mint.toBase58()].supply;
|
|
21913
|
-
const stakeActual = Number(stakeAccount.stake.delegation.stake);
|
|
21914
|
-
const oracle = priceInfos.get(bankAddress.toBase58());
|
|
21915
|
-
if (oracle) {
|
|
21916
|
-
const adjustPrice = (price, stakeActual$1, tokenSupply$1) => {
|
|
21917
|
-
return Number(tokenSupply$1) === 0 ? price : new BigNumber(price.toNumber() * (stakeActual$1 - LAMPORTS_PER_SOL) / Number(tokenSupply$1));
|
|
21918
|
-
};
|
|
21919
|
-
const adjustPriceComponent$1 = (priceComponent, stakeActual$1, tokenSupply$1) => ({
|
|
21920
|
-
price: adjustPrice(priceComponent.price, stakeActual$1, tokenSupply$1),
|
|
21921
|
-
confidence: priceComponent.confidence,
|
|
21922
|
-
lowestPrice: adjustPrice(priceComponent.lowestPrice, stakeActual$1, tokenSupply$1),
|
|
21923
|
-
highestPrice: adjustPrice(priceComponent.highestPrice, stakeActual$1, tokenSupply$1)
|
|
21924
|
-
});
|
|
21925
|
-
const oraclePrice = {
|
|
21926
|
-
timestamp: oracle.timestamp,
|
|
21927
|
-
priceRealtime: adjustPriceComponent$1(oracle.priceRealtime, stakeActual, tokenSupply),
|
|
21928
|
-
priceWeighted: adjustPriceComponent$1(oracle.priceWeighted, stakeActual, tokenSupply)
|
|
21929
|
-
};
|
|
21930
|
-
priceInfos.set(bankAddress.toBase58(), oraclePrice);
|
|
21931
|
-
}
|
|
22016
|
+
const priceDataRaw = oracleAccountInfos[index];
|
|
22017
|
+
if (!priceDataRaw) {
|
|
22018
|
+
throw new Error(`Failed to fetch price oracle account for bank ${bankAddressStr}`);
|
|
21932
22019
|
}
|
|
21933
|
-
|
|
21934
|
-
|
|
21935
|
-
|
|
21936
|
-
|
|
21937
|
-
|
|
21938
|
-
|
|
21939
|
-
banks,
|
|
21940
|
-
priceInfos,
|
|
21941
|
-
tokensData,
|
|
21942
|
-
feedIdMap,
|
|
21943
|
-
banksExtendedMetadata
|
|
21944
|
-
};
|
|
21945
|
-
};
|
|
21946
|
-
}
|
|
21947
|
-
static {
|
|
21948
|
-
this.fetchRawBanks = async ({ groupAddress, bankAddresses, program, logger = new NoopLogger(), commitment }) => {
|
|
21949
|
-
if (!bankAddresses || bankAddresses.length === 0) {
|
|
21950
|
-
const bankAccountsData$1 = await program.account.bank.all([{ memcmp: {
|
|
21951
|
-
offset: 8 + 32 + 1,
|
|
21952
|
-
bytes: groupAddress.toBase58()
|
|
21953
|
-
} }]);
|
|
21954
|
-
return bankAccountsData$1.map((account) => ({
|
|
21955
|
-
address: account.publicKey,
|
|
21956
|
-
data: account.account
|
|
21957
|
-
}));
|
|
22020
|
+
const bank = Bank.fromAccountParsed(address$2, data, feedIdMap, metadata$2, mintDataRaw.owner);
|
|
22021
|
+
banks.set(bankAddressStr, bank);
|
|
22022
|
+
let emissionTokenProgram = null;
|
|
22023
|
+
if (!data.emissionsMint.equals(PublicKey.default)) {
|
|
22024
|
+
const emissionMintDataRawIndex = emissionMintKeys.findIndex((pk) => pk.equals(data.emissionsMint));
|
|
22025
|
+
emissionTokenProgram = emissionMintDataRawIndex >= 0 ? emissionMintAccountInfos[emissionMintDataRawIndex].owner : null;
|
|
21958
22026
|
}
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
|
|
21963
|
-
|
|
21964
|
-
|
|
21965
|
-
|
|
21966
|
-
|
|
21967
|
-
|
|
21968
|
-
|
|
22027
|
+
tokensData.set(bankAddressStr, {
|
|
22028
|
+
mint: mintKeys[index],
|
|
22029
|
+
tokenProgram: mintDataRaw.owner,
|
|
22030
|
+
feeBps: 0,
|
|
22031
|
+
emissionTokenProgram
|
|
22032
|
+
});
|
|
22033
|
+
const oracleSetup = parseOracleSetup(data.config.oracleSetup);
|
|
22034
|
+
priceInfos.set(bankAddressStr, parseOraclePriceData(oracleSetup, priceDataRaw.data, logger));
|
|
22035
|
+
if (oracleSetup === OracleSetup.StakedWithPythPush && metadata$2?.validatorVoteAccount) {
|
|
22036
|
+
const [poolAddress] = PublicKey.findProgramAddressSync([Buffer.from("pool"), new PublicKey(metadata$2.validatorVoteAccount).toBuffer()], SINGLE_POOL_PROGRAM_ID);
|
|
22037
|
+
const [stakePoolAddress] = PublicKey.findProgramAddressSync([Buffer.from("stake"), poolAddress.toBuffer()], SINGLE_POOL_PROGRAM_ID);
|
|
22038
|
+
stakedCollatMap[address$2.toBase58()] = {
|
|
22039
|
+
bankAddress: address$2,
|
|
22040
|
+
mint: new PublicKey(metadata$2.mint),
|
|
22041
|
+
stakePoolAddress,
|
|
22042
|
+
poolAddress
|
|
22043
|
+
};
|
|
22044
|
+
solPools.push(stakePoolAddress.toBase58());
|
|
22045
|
+
mints.push(metadata$2.mint);
|
|
22046
|
+
}
|
|
22047
|
+
});
|
|
22048
|
+
const dataAis = await chunkedGetRawMultipleAccountInfoOrdered(program.provider.connection, [...mints, ...solPools]);
|
|
22049
|
+
const stakePoolsAis = dataAis.slice(mints.length).map((ai) => getStakeAccount(ai.data));
|
|
22050
|
+
const lstMintsAis = dataAis.slice(0, mints.length).map((mintAi) => MintLayout.decode(mintAi.data));
|
|
22051
|
+
const lstMintRecord = Object.fromEntries(mints.map((mint, i) => [mint, lstMintsAis[i]]));
|
|
22052
|
+
const solPoolsRecord = Object.fromEntries(solPools.map((poolKey, i) => [poolKey, stakePoolsAis[i]]));
|
|
22053
|
+
for (const index in stakedCollatMap) {
|
|
22054
|
+
const { bankAddress, mint, stakePoolAddress, poolAddress } = stakedCollatMap[index];
|
|
22055
|
+
const stakeAccount = solPoolsRecord[stakePoolAddress.toBase58()];
|
|
22056
|
+
const tokenSupply = lstMintRecord[mint.toBase58()].supply;
|
|
22057
|
+
const stakeActual = Number(stakeAccount.stake.delegation.stake);
|
|
22058
|
+
const oracle = priceInfos.get(bankAddress.toBase58());
|
|
22059
|
+
if (oracle) {
|
|
22060
|
+
const adjustPrice = (price, stakeActual$1, tokenSupply$1) => {
|
|
22061
|
+
return Number(tokenSupply$1) === 0 ? price : new BigNumber(price.toNumber() * (stakeActual$1 - LAMPORTS_PER_SOL) / Number(tokenSupply$1));
|
|
22062
|
+
};
|
|
22063
|
+
const adjustPriceComponent$1 = (priceComponent, stakeActual$1, tokenSupply$1) => ({
|
|
22064
|
+
price: adjustPrice(priceComponent.price, stakeActual$1, tokenSupply$1),
|
|
22065
|
+
confidence: priceComponent.confidence,
|
|
22066
|
+
lowestPrice: adjustPrice(priceComponent.lowestPrice, stakeActual$1, tokenSupply$1),
|
|
22067
|
+
highestPrice: adjustPrice(priceComponent.highestPrice, stakeActual$1, tokenSupply$1)
|
|
21969
22068
|
});
|
|
22069
|
+
const oraclePrice = {
|
|
22070
|
+
timestamp: oracle.timestamp,
|
|
22071
|
+
priceRealtime: adjustPriceComponent$1(oracle.priceRealtime, stakeActual, tokenSupply),
|
|
22072
|
+
priceWeighted: adjustPriceComponent$1(oracle.priceWeighted, stakeActual, tokenSupply)
|
|
22073
|
+
};
|
|
22074
|
+
priceInfos.set(bankAddress.toBase58(), oraclePrice);
|
|
21970
22075
|
}
|
|
21971
|
-
|
|
22076
|
+
}
|
|
22077
|
+
logger.debug({
|
|
22078
|
+
banksSize: banks.size,
|
|
22079
|
+
priceFeedsSize: priceInfos.size
|
|
22080
|
+
}, "[lendr:client] Fetched banks and price feeds");
|
|
22081
|
+
return {
|
|
22082
|
+
lendrGroup,
|
|
22083
|
+
banks,
|
|
22084
|
+
priceInfos,
|
|
22085
|
+
tokensData,
|
|
22086
|
+
feedIdMap,
|
|
22087
|
+
banksExtendedMetadata
|
|
21972
22088
|
};
|
|
21973
|
-
}
|
|
22089
|
+
};
|
|
22090
|
+
static fetchRawBanks = async ({ groupAddress, bankAddresses, program, logger = new NoopLogger(), commitment }) => {
|
|
22091
|
+
if (!bankAddresses || bankAddresses.length === 0) {
|
|
22092
|
+
const bankAccountsData$1 = await program.account.bank.all([{ memcmp: {
|
|
22093
|
+
offset: 8 + 32 + 1,
|
|
22094
|
+
bytes: groupAddress.toBase58()
|
|
22095
|
+
} }]);
|
|
22096
|
+
return bankAccountsData$1.map((account) => ({
|
|
22097
|
+
address: account.publicKey,
|
|
22098
|
+
data: account.account
|
|
22099
|
+
}));
|
|
22100
|
+
}
|
|
22101
|
+
logger.debug({ banksLength: bankAddresses.length }, "[lending:client] Using preloaded bank addresses, skipping gpa call");
|
|
22102
|
+
const bankAccountsData = await program.account.bank.fetchMultiple(bankAddresses, commitment);
|
|
22103
|
+
const banksRawData = [];
|
|
22104
|
+
for (let i = 0; i < bankAccountsData.length; i++) {
|
|
22105
|
+
if (bankAccountsData[i] === null) {
|
|
22106
|
+
continue;
|
|
22107
|
+
}
|
|
22108
|
+
banksRawData.push({
|
|
22109
|
+
address: bankAddresses[i],
|
|
22110
|
+
data: bankAccountsData[i]
|
|
22111
|
+
});
|
|
22112
|
+
}
|
|
22113
|
+
return banksRawData;
|
|
22114
|
+
};
|
|
21974
22115
|
async reload() {
|
|
21975
22116
|
const { lendrGroup, banks, priceInfos, tokensData, feedIdMap, banksExtendedMetadata } = await LendrClient.fetchGroupData({
|
|
21976
22117
|
connection: this.program.provider.connection,
|
|
@@ -22490,4 +22631,4 @@ var client_default = LendrClient;
|
|
|
22490
22631
|
|
|
22491
22632
|
//#endregion
|
|
22492
22633
|
export { AccountFlags, AccountType, AssetTag, BUNDLE_TX_SIZE$1 as BUNDLE_TX_SIZE, Balance, Bank, BankConfig, BankVaultType, CustomNumberFormat, DEFAULT_CLUSTER, DEFAULT_COMMITMENT, DEFAULT_CONFIRM_OPTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_PROCESS_TX_OPTS, DEFAULT_PROCESS_TX_STRATEGY, DEFAULT_SEND_OPTS, DISABLED_FLAG, DUMMY_USDC_MINT, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodeSettings, EmodeTag, FLASHLOAN_ENABLED_FLAG, GROUP_PK, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, JUPITER_V6_PROGRAM, LENDR_IDL, LENDR_PROGRAM, LENDR_SPONSORED_SHARD_ID, LST_MINT, LUT_PROGRAM_AUTHORITY_INDEX, LendrAccount, LendrAccountWrapper, LendrGroup, LendrRequirementType, MAX_ACCOUNT_KEYS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE$1 as MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MetadataService, NodeWallet, OperationalState, OracleSetup, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PRIORITY_TX_SIZE$1 as PRIORITY_TX_SIZE, PROGRAM_ID, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, PriotitizationFeeLevels, ProcessTransactionError, ProcessTransactionErrorType, RiskTier, SINGLE_POOL_PROGRAM_ID, SKIP_SIMULATION, STAKE_CONFIG_ID$1 as STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionArenaKeyMap, TransactionConfigMap, TransactionType, USDC_DECIMALS, USDC_MINT, WSOL_EXTENDED_METADATA, WSOL_MINT, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankExtendedMetadataOverrideSchema, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildFeedIdMap, calculateApyFromInterest, calculateInterestFromApy, ceil, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, chunks, clampedNumeralFormatter, client_default, compareInstructions, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeEmodeImpacts, computeFreeCollateral, computeFreeCollateralLegacy, computeHealthAccountMetas, computeHealthCheckAccounts, computeHealthComponents, computeHealthComponentsLegacy, computeHealthComponentsWithoutBiasLegacy, computeInterestRates, computeLiabilityUsdValue, computeLoopingParams, computeMaxLeverage, computeNetApy, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, confirmTransaction, crankPythOracleIx, createLendrAccountTx, createUpdateFeedIx, decodeAccountRaw, decodeBankRaw, decodeComputeBudgetInstruction, decodeInstruction, decompileV0Transaction, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToLendrAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, dynamicNumeralFormatter, emodeSettingsRawToDto, feedIdToString, fetchBanksExtendedMetadata, fetchLendrAccountAddresses, fetchLendrAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchPythOracleData, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleData, findOracleKey, findPythPushOracleAddress, floor, freezeBankConfigIx, getAccountKeys, getActiveAccountFlags, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getActiveStaleBanks, getAssetQuantity, getAssetShares, getAssetWeight, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getCalculatedPrioritizationFeeByPercentile, getComputeBudgetUnits, getConfig, getConfigPda, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getMaxPrioritizationFeeByPercentile, getMeanPrioritizationFeeByPercentile, getMedianPrioritizationFeeByPercentile, getMinPrioritizationFeeByPercentile, getPrice, getPriceFeedAccountForProgram, getPriceWithConfidence, getRecentPrioritizationFeesByPercentile, getTotalAssetQuantity, getTotalLiabilityQuantity, getTreasuryPda, getTxSize, getValueInsensitive, groupToDto, groupedNumberFormatter, groupedNumberFormatterDyn, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, instructions_default, isV0Tx, isWeightedPrice, legacyTxToV0Tx, lendrAccountToDto, makeAddPermissionlessStakedBankIx, makeBundleTipIx, makeDisableAccountTransferForAccountIx, makeDisableFlashLoanForAccountIx, makeEnableAccountTransferForAccountIx, makeEnableFlashLoanForAccountIx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeTxPriorityIx, makeUnwrapSolIx, makeVersionedTransaction, makeWrapSolIxs, median, metadataSchema, microLamportsToUi, nativeToUi, numeralFormatter, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseBanksMetadataOverride, parseEmodeTag, parseErrorFromLogs, parseLendrAccountRaw, parseOperationalState, parseOraclePriceData, parseOracleSetup, parseRiskTier, parseTransactionError, percentFormatter, percentFormatterDyn, percentFormatterMod, processTransactions, replaceV0TxBlockhash, replaceV0TxInstructions, serializeBankConfigOpt, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, setTimeoutPromise, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateTransactions, sleep, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toNumber, tokenPriceFormatter, uiToMicroLamports, uiToNative, uiToNativeBigNumber, updateV0Tx, usdFormatter, usdFormatterDyn, validatorStakeGroupToDto, vendor_exports, wrappedI80F48toBigNumber };
|
|
22493
|
-
//# sourceMappingURL=src-
|
|
22634
|
+
//# sourceMappingURL=src-DITEj1yC.mjs.map
|