@lombard.finance/sdk 3.5.7 → 3.5.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/index.cjs +1 -1
- package/dist/index.js +47 -46
- package/dist/index2.cjs +30 -30
- package/dist/index2.js +412 -396
- package/package.json +1 -1
- package/src/api-functions/getLBTCExchangeRate/index.ts +1 -0
- package/src/metrics/get-rewards-info.ts +3 -4
- package/src/tokens/token-addresses.ts +8 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
+
import { Address } from 'viem';
|
|
2
3
|
import { getApiConfig } from '../common/api-config';
|
|
3
4
|
import { IEnvParam } from '../common/parameters';
|
|
4
|
-
import { Address } from 'viem';
|
|
5
5
|
|
|
6
6
|
type Response = {
|
|
7
7
|
type: 'BALANCE_TYPE_DEFI';
|
|
@@ -18,12 +18,11 @@ type Response = {
|
|
|
18
18
|
*/
|
|
19
19
|
export async function getRewardsInfo({
|
|
20
20
|
account,
|
|
21
|
-
partnerId,
|
|
22
21
|
env,
|
|
23
|
-
}: { account: Address
|
|
22
|
+
}: { account: Address } & IEnvParam) {
|
|
24
23
|
const { baseApiUrl } = getApiConfig(env);
|
|
25
24
|
|
|
26
|
-
const url = `${baseApiUrl}/api/v1/rewards/${account}
|
|
25
|
+
const url = `${baseApiUrl}/api/v1/rewards/${account}`;
|
|
27
26
|
const { data } = await axios.get<Response>(url);
|
|
28
27
|
|
|
29
28
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Env } from '@lombard.finance/sdk-common';
|
|
1
2
|
import { Address } from 'viem';
|
|
2
3
|
import { ChainId } from '../common/chains';
|
|
3
|
-
import { Env } from '@lombard.finance/sdk-common';
|
|
4
4
|
|
|
5
5
|
export enum Token {
|
|
6
6
|
LBTC = 'LBTC',
|
|
@@ -63,6 +63,13 @@ export const TOKEN_ADDRESSES: TokenAddresses = {
|
|
|
63
63
|
},
|
|
64
64
|
[Env.dev]: {
|
|
65
65
|
// https://github.com/lombard-finance/smart-contracts/blob/2-token-model/devnet-bft.json
|
|
66
|
+
[ChainId.sepolia]: '0xc47e4b3124597FDF8DD07843D4a7052F2eE80C30',
|
|
67
|
+
[ChainId.baseSepoliaTestnet]:
|
|
68
|
+
'0xc47e4b3124597FDF8DD07843D4a7052F2eE80C30',
|
|
69
|
+
[ChainId.berachainBartioTestnet]:
|
|
70
|
+
'0xc47e4b3124597FDF8DD07843D4a7052F2eE80C30',
|
|
71
|
+
[ChainId.binanceSmartChainTestnet]:
|
|
72
|
+
'0xc47e4b3124597FDF8DD07843D4a7052F2eE80C30',
|
|
66
73
|
[ChainId.katanaTatara]: '0xc47e4b3124597FDF8DD07843D4a7052F2eE80C30',
|
|
67
74
|
},
|
|
68
75
|
},
|