@lombard.finance/sdk 3.6.3 → 3.6.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/README.md CHANGED
@@ -557,6 +557,16 @@ The results of the above includes:
557
557
  _Formula: `balance * rate = BTC equivalent`_
558
558
  * **`lastUpdated: Date`**
559
559
  The timestamp when the position summary was last updated.
560
+ * **`inProgress: boolean`**
561
+ Indicates whether the backend is currently processing the PnL calculation.
562
+ - `true`: A new calculation request was received, but the backend is experiencing high load
563
+ or processing is not yet complete. The latest data is not yet available.
564
+ - `false`: The most recent calculation has been completed and cached.
565
+ Use `lastUpdated` to understand how fresh the data is:
566
+ - If `lastUpdated` is recent (e.g., within the last few seconds), you're seeing the latest data.
567
+ - If `lastUpdated` is up to 30 minutes old, you're seeing cached data from a recent request.
568
+ The backend avoids recalculating within this caching window.
569
+
560
570
 
561
571
  #### 9.6. Getting the LBTC APY
562
572
 
@@ -575,6 +585,22 @@ The above returns:
575
585
  * **`effectiveApy: BigNumber`**
576
586
  The effective APY for LBTC, including any additional rewards, compounding effects, or protocol-specific incentives.
577
587
 
588
+ To retrieve the estimated APY (annual percentage yield) for LBTC in the context of a specific partner integration, use the `getEstimatedApy` function:
589
+
590
+ ```javascript
591
+ const estimated = await getEstimatedApy({
592
+ partnerId, // Optional partner identifier. Influences the estimated APY.
593
+ env, // Optional env flag
594
+ });
595
+ ```
596
+
597
+ The above returns:
598
+
599
+ * **`estimatedApy: BigNumber`**
600
+ The estimated APY for LBTC, taking into account partner-specific incentives, compounding assumptions, and projected rewards. This value may differ from the effective APY depending on the partner context.
601
+
602
+ > **Note**: If no `partnerId` is provided, the function returns a default estimate based on global assumptions.
603
+
578
604
  #### 9.7. Getting the additional rewards data
579
605
 
580
606
  In order to retrieve the additional rewards that have been distributed or are pending use the below function:
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index2.cjs");exports.BTC_DECIMALS=e.BTC_DECIMALS;exports.BasculeDepositStatus=e.BasculeDepositStatus;exports.BlockchainIdentifier=e.BlockchainIdentifier;exports.CHAIN_ID_TO_VIEM_CHAIN_MAP=e.CHAIN_ID_TO_VIEM_CHAIN_MAP;exports.ChainId=e.ChainId;exports.ENotarizationStatus=e.ENotarizationStatus;exports.ESessionState=e.ESessionState;exports.Env=e.t;exports.OFT_GAS_LIMIT=e.OFT_GAS_LIMIT;exports.OFT_HI_GAS_LIMIT=e.OFT_HI_GAS_LIMIT;exports.OFT_HI_GAS_LIMIT_CHAINS=e.OFT_HI_GAS_LIMIT_CHAINS;exports.PayoutTxStatus=e.PayoutTxStatus;exports.RATIO_TOKEN_MAP=e.RATIO_TOKEN_MAP;exports.RewardBlockchainType=e.RewardBlockchainType;exports.RewardToken=e.RewardToken;exports.RewardWithdrawalStatus=e.RewardWithdrawalStatus;exports.SANCTIONED_ADDRESS=e.SANCTIONED_ADDRESS;exports.SATOSHI_SCALE=e.SATOSHI_SCALE;exports.SOLANA_DEVNET_CHAIN=e.SOLANA_DEVNET_CHAIN;exports.SOLANA_MAINNET_CHAIN=e.SOLANA_MAINNET_CHAIN;exports.SOLANA_TESTNET_CHAIN=e.SOLANA_TESTNET_CHAIN;exports.SUI_DEVNET_CHAIN=e.SUI_DEVNET_CHAIN;exports.SUI_LOCALNET_CHAIN=e.SUI_LOCALNET_CHAIN;exports.SUI_MAINNET_CHAIN=e.SUI_MAINNET_CHAIN;exports.SUI_TESTNET_CHAIN=e.SUI_TESTNET_CHAIN;exports.TOKEN_ADDRESSES=e.TOKEN_ADDRESSES;exports.Token=e.Token;exports.Vault=e.Vault;exports.addChain=e.addChain;exports.approveLBTC=e.approveLBTC;exports.bridge=e.bridge;exports.bridgeCCIP=e.bridgeCCIP;exports.bridgeOFT=e.bridgeOFT;exports.cancelWithdraw=e.cancelWithdraw;exports.claimLBTC=e.claimLBTC;exports.claimReward=e.claimReward;exports.deposit=e.deposit;exports.fromSatoshi=e.fromSatoshi;exports.generateDepositBtcAddress=e.generateDepositBtcAddress;exports.getAdditionalRewards=e.getAdditionalRewards;exports.getApiConfig=e.getApiConfig;exports.getApy=e.getApy;exports.getBasculeDepositStatus=e.getBasculeDepositStatus;exports.getBaseNetworkByEnv=e.getBaseNetworkByEnv;exports.getBridgeInfo=e.getBridgeInfo;exports.getBscNetworkByEnv=e.getBscNetworkByEnv;exports.getChainIdByName=e.getChainIdByName;exports.getChainNameById=e.getChainNameById;exports.getDepositBtcAddress=e.getDepositBtcAddress;exports.getDepositBtcAddresses=e.getDepositBtcAddresses;exports.getDepositsByAddress=e.getDepositsByAddress;exports.getEthNetworkByEnv=e.getEthNetworkByEnv;exports.getExchangeRatio=e.getExchangeRatio;exports.getLBTCBurningFee=e.getLBTCBurningFee;exports.getLBTCExchangeRate=e.getLBTCExchangeRate;exports.getLBTCMintingFee=e.getLBTCMintingFee;exports.getLBTCStats=e.getLBTCStats;exports.getLBTCTotalSupply=e.getLBTCTotalSupply;exports.getLbtcContractAddresses=e.getLbtcContractAddresses;exports.getMintingFee=e.getMintingFee;exports.getNetworkFeeSignature=e.getNetworkFeeSignature;exports.getPermitNonce=e.getPermitNonce;exports.getPointsByAddress=e.getPointsByAddress;exports.getPositionsSummary=e.getPositionsSummary;exports.getRedeemFee=e.getRedeemFee;exports.getRewardBalances=e.getRewardBalances;exports.getRewardSigningData=e.getRewardSigningData;exports.getRewardWithdrawalFee=e.getRewardWithdrawalFee;exports.getRewardWithdrawals=e.getRewardWithdrawals;exports.getShareValue=e.getShareValue;exports.getSharesByAddress=e.getSharesByAddress;exports.getSolanaNetworkByEnv=e.getSolanaNetworkByEnv;exports.getSonicNetworkByEnv=e.getSonicNetworkByEnv;exports.getStakeAndBakeFee=e.getStakeAndBakeFee;exports.getSuiNetworkByEnv=e.getSuiNetworkByEnv;exports.getUnstakesByAddress=e.getUnstakesByAddress;exports.getUserStakeAndBakeSignature=e.getUserStakeAndBakeSignature;exports.getVaultApy=e.getVaultApy;exports.getVaultDeposits=e.getVaultDeposits;exports.getVaultPoints=e.getVaultPoints;exports.getVaultTVL=e.getVaultTVL;exports.getVaultWithdrawals=e.getVaultWithdrawals;exports.isKatanaChain=e.isKatanaChain;exports.isRewardTokenSupported=e.isRewardTokenSupported;exports.isValidChain=e.isValidChain;exports.katana=e.katana;exports.katanaTatara=e.katanaTatara;exports.mintToken=e.mintToken;exports.queueWithdraw=e.queueWithdraw;exports.redeemToken=e.redeemToken;exports.setReferral=e.setReferral;exports.signLbtcDestinationAddr=e.signLbtcDestinationAddr;exports.signNetworkFee=e.signNetworkFee;exports.signStakeAndBake=e.signStakeAndBake;exports.storeNetworkFeeSignature=e.storeNetworkFeeSignature;exports.storeStakeAndBakeSignature=e.storeStakeAndBakeSignature;exports.tac=e.tac;exports.toSatoshi=e.toSatoshi;exports.unstakeLBTC=e.unstakeLBTC;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index2.cjs");exports.BTC_DECIMALS=e.BTC_DECIMALS;exports.BasculeDepositStatus=e.BasculeDepositStatus;exports.BlockchainIdentifier=e.BlockchainIdentifier;exports.CHAIN_ID_TO_VIEM_CHAIN_MAP=e.CHAIN_ID_TO_VIEM_CHAIN_MAP;exports.ChainId=e.ChainId;exports.ENotarizationStatus=e.ENotarizationStatus;exports.ESessionState=e.ESessionState;exports.Env=e.t;exports.OFT_GAS_LIMIT=e.OFT_GAS_LIMIT;exports.OFT_HI_GAS_LIMIT=e.OFT_HI_GAS_LIMIT;exports.OFT_HI_GAS_LIMIT_CHAINS=e.OFT_HI_GAS_LIMIT_CHAINS;exports.PayoutTxStatus=e.PayoutTxStatus;exports.RATIO_TOKEN_MAP=e.RATIO_TOKEN_MAP;exports.RewardBlockchainType=e.RewardBlockchainType;exports.RewardToken=e.RewardToken;exports.RewardWithdrawalStatus=e.RewardWithdrawalStatus;exports.SANCTIONED_ADDRESS=e.SANCTIONED_ADDRESS;exports.SATOSHI_SCALE=e.SATOSHI_SCALE;exports.SOLANA_DEVNET_CHAIN=e.SOLANA_DEVNET_CHAIN;exports.SOLANA_MAINNET_CHAIN=e.SOLANA_MAINNET_CHAIN;exports.SOLANA_TESTNET_CHAIN=e.SOLANA_TESTNET_CHAIN;exports.SUI_DEVNET_CHAIN=e.SUI_DEVNET_CHAIN;exports.SUI_LOCALNET_CHAIN=e.SUI_LOCALNET_CHAIN;exports.SUI_MAINNET_CHAIN=e.SUI_MAINNET_CHAIN;exports.SUI_TESTNET_CHAIN=e.SUI_TESTNET_CHAIN;exports.TOKEN_ADDRESSES=e.TOKEN_ADDRESSES;exports.Token=e.Token;exports.Vault=e.Vault;exports.addChain=e.addChain;exports.approveLBTC=e.approveLBTC;exports.bridge=e.bridge;exports.bridgeCCIP=e.bridgeCCIP;exports.bridgeOFT=e.bridgeOFT;exports.cancelWithdraw=e.cancelWithdraw;exports.claimLBTC=e.claimLBTC;exports.claimReward=e.claimReward;exports.deposit=e.deposit;exports.fromSatoshi=e.fromSatoshi;exports.generateDepositBtcAddress=e.generateDepositBtcAddress;exports.getAdditionalRewards=e.getAdditionalRewards;exports.getApiConfig=e.getApiConfig;exports.getApy=e.getApy;exports.getBasculeDepositStatus=e.getBasculeDepositStatus;exports.getBaseNetworkByEnv=e.getBaseNetworkByEnv;exports.getBridgeInfo=e.getBridgeInfo;exports.getBscNetworkByEnv=e.getBscNetworkByEnv;exports.getChainIdByName=e.getChainIdByName;exports.getChainNameById=e.getChainNameById;exports.getDepositBtcAddress=e.getDepositBtcAddress;exports.getDepositBtcAddresses=e.getDepositBtcAddresses;exports.getDepositsByAddress=e.getDepositsByAddress;exports.getEstimatedApy=e.getEstimatedApy;exports.getEthNetworkByEnv=e.getEthNetworkByEnv;exports.getExchangeRatio=e.getExchangeRatio;exports.getLBTCBurningFee=e.getLBTCBurningFee;exports.getLBTCExchangeRate=e.getLBTCExchangeRate;exports.getLBTCMintingFee=e.getLBTCMintingFee;exports.getLBTCStats=e.getLBTCStats;exports.getLBTCTotalSupply=e.getLBTCTotalSupply;exports.getLbtcContractAddresses=e.getLbtcContractAddresses;exports.getMintingFee=e.getMintingFee;exports.getNetworkFeeSignature=e.getNetworkFeeSignature;exports.getPermitNonce=e.getPermitNonce;exports.getPointsByAddress=e.getPointsByAddress;exports.getPositionsSummary=e.getPositionsSummary;exports.getRedeemFee=e.getRedeemFee;exports.getRewardBalances=e.getRewardBalances;exports.getRewardSigningData=e.getRewardSigningData;exports.getRewardWithdrawalFee=e.getRewardWithdrawalFee;exports.getRewardWithdrawals=e.getRewardWithdrawals;exports.getShareValue=e.getShareValue;exports.getSharesByAddress=e.getSharesByAddress;exports.getSolanaNetworkByEnv=e.getSolanaNetworkByEnv;exports.getSonicNetworkByEnv=e.getSonicNetworkByEnv;exports.getStakeAndBakeFee=e.getStakeAndBakeFee;exports.getSuiNetworkByEnv=e.getSuiNetworkByEnv;exports.getUnstakesByAddress=e.getUnstakesByAddress;exports.getUserStakeAndBakeSignature=e.getUserStakeAndBakeSignature;exports.getVaultApy=e.getVaultApy;exports.getVaultDeposits=e.getVaultDeposits;exports.getVaultPoints=e.getVaultPoints;exports.getVaultTVL=e.getVaultTVL;exports.getVaultWithdrawals=e.getVaultWithdrawals;exports.isKatanaChain=e.isKatanaChain;exports.isRewardTokenSupported=e.isRewardTokenSupported;exports.isValidChain=e.isValidChain;exports.katana=e.katana;exports.katanaTatara=e.katanaTatara;exports.mintToken=e.mintToken;exports.queueWithdraw=e.queueWithdraw;exports.redeemToken=e.redeemToken;exports.setReferral=e.setReferral;exports.signLbtcDestinationAddr=e.signLbtcDestinationAddr;exports.signNetworkFee=e.signNetworkFee;exports.signStakeAndBake=e.signStakeAndBake;exports.storeNetworkFeeSignature=e.storeNetworkFeeSignature;exports.storeStakeAndBakeSignature=e.storeStakeAndBakeSignature;exports.tac=e.tac;exports.toSatoshi=e.toSatoshi;exports.unstakeLBTC=e.unstakeLBTC;
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { aR as e, V as t, av as i, aJ as n, aI as r, F as g, G as d, t as o, y as S, z as A, O as T, P as N, aP as B, an as I, at as C, ar as _, A as E, aS as k, S as u, h as w, j as l, k as c, aH as h, m as L, n as p, aQ as y, aO as D, ac as R, aM as O, a2 as F, v as m, w as H, x as M, ag as V, a3 as v, al as P, ad as U, aT as f, C as W, r as b, au as x, q as G, W as K, az as q, u as z, ay as j, aD as J, aw as Q, D as X, E as Y, I as Z, ax as $, K as aa, Y as sa, J as ea, X as ta, o as ia, $ as na, aN as ra, Z as ga, L as da, a0 as oa, M as Sa, p as Aa, _ as Ta, am as Na, ao as Ba, ap as Ia, aq as Ca, aa as _a, ab as Ea, aC as ka, aB as ua, a1 as wa, aA as la, N as ca, Q as ha, ak as La, ae as pa, ai as ya, aj as Da, ah as Ra, aK as Oa, as as Fa, aL as ma, aE as Ha, aF as Ma, a4 as Va, af as va, a9 as Pa, R as Ua, a5 as fa, a6 as Wa, a7 as ba, T as xa, U as Ga, aG as Ka, aU as qa, a8 as za } from "./index2.js";
1
+ import { aS as e, W as t, aw as i, aK as n, aJ as g, G as r, I as d, u as o, z as S, A, O as T, Q as N, aQ as B, ao as I, au as C, as as E, C as _, aT as k, S as u, h as w, j as l, k as c, aI as h, m as L, n as p, aR as y, aP as D, ad as R, aN as O, a3 as m, w as F, x as H, y as V, ah as M, a4 as v, am as P, ae as U, aU as f, D as W, t as b, av as x, q as G, X as K, aA as q, v as z, az as j, aE as J, ax as Q, E as X, F as Y, J as Z, r as $, ay as aa, L as sa, Z as ea, K as ta, Y as ia, o as na, a0 as ga, aO as ra, _ as da, M as oa, a1 as Sa, N as Aa, p as Ta, $ as Na, an as Ba, ap as Ia, aq as Ca, ar as Ea, ab as _a, ac as ka, aD as ua, aC as wa, a2 as la, aB as ca, P as ha, R as La, al as pa, af as ya, aj as Da, ak as Ra, ai as Oa, aL as ma, at as Fa, aM as Ha, aF as Va, aG as Ma, a5 as va, ag as Pa, aa as Ua, T as fa, a6 as Wa, a7 as ba, a8 as xa, U as Ga, V as Ka, aH as qa, aV as za, a9 as ja } from "./index2.js";
2
2
  export {
3
3
  e as BTC_DECIMALS,
4
4
  t as BasculeDepositStatus,
5
5
  i as BlockchainIdentifier,
6
6
  n as CHAIN_ID_TO_VIEM_CHAIN_MAP,
7
- r as ChainId,
8
- g as ENotarizationStatus,
7
+ g as ChainId,
8
+ r as ENotarizationStatus,
9
9
  d as ESessionState,
10
10
  o as Env,
11
11
  S as OFT_GAS_LIMIT,
@@ -15,8 +15,8 @@ export {
15
15
  B as RATIO_TOKEN_MAP,
16
16
  I as RewardBlockchainType,
17
17
  C as RewardToken,
18
- _ as RewardWithdrawalStatus,
19
- E as SANCTIONED_ADDRESS,
18
+ E as RewardWithdrawalStatus,
19
+ _ as SANCTIONED_ADDRESS,
20
20
  k as SATOSHI_SCALE,
21
21
  u as SOLANA_DEVNET_CHAIN,
22
22
  w as SOLANA_MAINNET_CHAIN,
@@ -29,11 +29,11 @@ export {
29
29
  D as Token,
30
30
  R as Vault,
31
31
  O as addChain,
32
- F as approveLBTC,
33
- m as bridge,
32
+ m as approveLBTC,
33
+ F as bridge,
34
34
  H as bridgeCCIP,
35
- M as bridgeOFT,
36
- V as cancelWithdraw,
35
+ V as bridgeOFT,
36
+ M as cancelWithdraw,
37
37
  v as claimLBTC,
38
38
  P as claimReward,
39
39
  U as deposit,
@@ -51,52 +51,53 @@ export {
51
51
  X as getDepositBtcAddress,
52
52
  Y as getDepositBtcAddresses,
53
53
  Z as getDepositsByAddress,
54
- $ as getEthNetworkByEnv,
55
- aa as getExchangeRatio,
56
- sa as getLBTCBurningFee,
57
- ea as getLBTCExchangeRate,
58
- ta as getLBTCMintingFee,
59
- ia as getLBTCStats,
60
- na as getLBTCTotalSupply,
54
+ $ as getEstimatedApy,
55
+ aa as getEthNetworkByEnv,
56
+ sa as getExchangeRatio,
57
+ ea as getLBTCBurningFee,
58
+ ta as getLBTCExchangeRate,
59
+ ia as getLBTCMintingFee,
60
+ na as getLBTCStats,
61
+ ga as getLBTCTotalSupply,
61
62
  ra as getLbtcContractAddresses,
62
- ga as getMintingFee,
63
- da as getNetworkFeeSignature,
64
- oa as getPermitNonce,
65
- Sa as getPointsByAddress,
66
- Aa as getPositionsSummary,
67
- Ta as getRedeemFee,
68
- Na as getRewardBalances,
69
- Ba as getRewardSigningData,
70
- Ia as getRewardWithdrawalFee,
71
- Ca as getRewardWithdrawals,
63
+ da as getMintingFee,
64
+ oa as getNetworkFeeSignature,
65
+ Sa as getPermitNonce,
66
+ Aa as getPointsByAddress,
67
+ Ta as getPositionsSummary,
68
+ Na as getRedeemFee,
69
+ Ba as getRewardBalances,
70
+ Ia as getRewardSigningData,
71
+ Ca as getRewardWithdrawalFee,
72
+ Ea as getRewardWithdrawals,
72
73
  _a as getShareValue,
73
- Ea as getSharesByAddress,
74
- ka as getSolanaNetworkByEnv,
75
- ua as getSonicNetworkByEnv,
76
- wa as getStakeAndBakeFee,
77
- la as getSuiNetworkByEnv,
78
- ca as getUnstakesByAddress,
79
- ha as getUserStakeAndBakeSignature,
80
- La as getVaultApy,
81
- pa as getVaultDeposits,
82
- ya as getVaultPoints,
83
- Da as getVaultTVL,
84
- Ra as getVaultWithdrawals,
85
- Oa as isKatanaChain,
74
+ ka as getSharesByAddress,
75
+ ua as getSolanaNetworkByEnv,
76
+ wa as getSonicNetworkByEnv,
77
+ la as getStakeAndBakeFee,
78
+ ca as getSuiNetworkByEnv,
79
+ ha as getUnstakesByAddress,
80
+ La as getUserStakeAndBakeSignature,
81
+ pa as getVaultApy,
82
+ ya as getVaultDeposits,
83
+ Da as getVaultPoints,
84
+ Ra as getVaultTVL,
85
+ Oa as getVaultWithdrawals,
86
+ ma as isKatanaChain,
86
87
  Fa as isRewardTokenSupported,
87
- ma as isValidChain,
88
- Ha as katana,
88
+ Ha as isValidChain,
89
+ Va as katana,
89
90
  Ma as katanaTatara,
90
- Va as mintToken,
91
- va as queueWithdraw,
92
- Pa as redeemToken,
93
- Ua as setReferral,
94
- fa as signLbtcDestinationAddr,
95
- Wa as signNetworkFee,
96
- ba as signStakeAndBake,
97
- xa as storeNetworkFeeSignature,
98
- Ga as storeStakeAndBakeSignature,
99
- Ka as tac,
100
- qa as toSatoshi,
101
- za as unstakeLBTC
91
+ va as mintToken,
92
+ Pa as queueWithdraw,
93
+ Ua as redeemToken,
94
+ fa as setReferral,
95
+ Wa as signLbtcDestinationAddr,
96
+ ba as signNetworkFee,
97
+ xa as signStakeAndBake,
98
+ Ga as storeNetworkFeeSignature,
99
+ Ka as storeStakeAndBakeSignature,
100
+ qa as tac,
101
+ za as toSatoshi,
102
+ ja as unstakeLBTC
102
103
  };