@gearbox-protocol/sdk 8.14.2 → 8.14.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/cjs/sdk/chain/chains.js +2 -3
- package/dist/cjs/sdk/sdk-legacy/gearboxRewards/api.js +2 -2
- package/dist/cjs/sdk/sdk-legacy/tokens/tokenData.js +4 -1
- package/dist/esm/sdk/chain/chains.js +2 -3
- package/dist/esm/sdk/sdk-legacy/gearboxRewards/api.js +2 -2
- package/dist/esm/sdk/sdk-legacy/tokens/tokenData.js +4 -1
- package/dist/types/sdk/sdk-legacy/gearboxRewards/api.d.ts +2 -3
- package/dist/types/sdk/sdk-legacy/tokens/tokenData.d.ts +1 -0
- package/package.json +1 -1
|
@@ -264,11 +264,10 @@ const chains = {
|
|
|
264
264
|
Hemi: (0, import_viem.defineChain)({
|
|
265
265
|
...import_chains.hemi,
|
|
266
266
|
network: "Hemi",
|
|
267
|
-
defaultMarketConfigurators: {
|
|
268
|
-
testMarketConfigurators: {
|
|
267
|
+
defaultMarketConfigurators: {
|
|
269
268
|
"0xc9961b8a0c763779690577f2c76962c086af2fe3": "Invariant Group"
|
|
270
269
|
},
|
|
271
|
-
isPublic:
|
|
270
|
+
isPublic: true,
|
|
272
271
|
wellKnownToken: {
|
|
273
272
|
address: "0xad11a8BEb98bbf61dbb1aa0F6d6F2ECD87b35afA",
|
|
274
273
|
symbol: "USDC.e"
|
|
@@ -44,7 +44,7 @@ class GearboxRewardsApi {
|
|
|
44
44
|
static async getLmRewardsV2({
|
|
45
45
|
provider,
|
|
46
46
|
account,
|
|
47
|
-
|
|
47
|
+
gearTokenAddress,
|
|
48
48
|
network,
|
|
49
49
|
airdropDistributorAddress,
|
|
50
50
|
reportError
|
|
@@ -83,7 +83,7 @@ class GearboxRewardsApi {
|
|
|
83
83
|
{
|
|
84
84
|
amount: availableToClaimV2,
|
|
85
85
|
type: "merkleV2",
|
|
86
|
-
rewardToken:
|
|
86
|
+
rewardToken: gearTokenAddress,
|
|
87
87
|
rewardTokenDecimals: 18,
|
|
88
88
|
rewardTokenSymbol: "GEAR"
|
|
89
89
|
}
|
|
@@ -57,11 +57,14 @@ class TokenData {
|
|
|
57
57
|
this.symbol = payload.symbol;
|
|
58
58
|
this.name = payload.name;
|
|
59
59
|
this.decimals = payload.decimals;
|
|
60
|
-
this.icon =
|
|
60
|
+
this.icon = TokenData.getTokenIcon(payload.symbol);
|
|
61
61
|
}
|
|
62
62
|
compareBySymbol(b) {
|
|
63
63
|
return this.symbol > b.symbol ? 1 : -1;
|
|
64
64
|
}
|
|
65
|
+
static getTokenIcon(symbol) {
|
|
66
|
+
return `${import_endpoint.GearboxBackendApi.getStaticTokenUrl()}${symbol.toLowerCase()}.svg`;
|
|
67
|
+
}
|
|
65
68
|
}
|
|
66
69
|
// Annotate the CommonJS export names for ESM import in node:
|
|
67
70
|
0 && (module.exports = {
|
|
@@ -250,11 +250,10 @@ const chains = {
|
|
|
250
250
|
Hemi: defineChain({
|
|
251
251
|
...hemi,
|
|
252
252
|
network: "Hemi",
|
|
253
|
-
defaultMarketConfigurators: {
|
|
254
|
-
testMarketConfigurators: {
|
|
253
|
+
defaultMarketConfigurators: {
|
|
255
254
|
"0xc9961b8a0c763779690577f2c76962c086af2fe3": "Invariant Group"
|
|
256
255
|
},
|
|
257
|
-
isPublic:
|
|
256
|
+
isPublic: true,
|
|
258
257
|
wellKnownToken: {
|
|
259
258
|
address: "0xad11a8BEb98bbf61dbb1aa0F6d6F2ECD87b35afA",
|
|
260
259
|
symbol: "USDC.e"
|
|
@@ -11,7 +11,7 @@ class GearboxRewardsApi {
|
|
|
11
11
|
static async getLmRewardsV2({
|
|
12
12
|
provider,
|
|
13
13
|
account,
|
|
14
|
-
|
|
14
|
+
gearTokenAddress,
|
|
15
15
|
network,
|
|
16
16
|
airdropDistributorAddress,
|
|
17
17
|
reportError
|
|
@@ -50,7 +50,7 @@ class GearboxRewardsApi {
|
|
|
50
50
|
{
|
|
51
51
|
amount: availableToClaimV2,
|
|
52
52
|
type: "merkleV2",
|
|
53
|
-
rewardToken:
|
|
53
|
+
rewardToken: gearTokenAddress,
|
|
54
54
|
rewardTokenDecimals: 18,
|
|
55
55
|
rewardTokenSymbol: "GEAR"
|
|
56
56
|
}
|
|
@@ -34,11 +34,14 @@ class TokenData {
|
|
|
34
34
|
this.symbol = payload.symbol;
|
|
35
35
|
this.name = payload.name;
|
|
36
36
|
this.decimals = payload.decimals;
|
|
37
|
-
this.icon =
|
|
37
|
+
this.icon = TokenData.getTokenIcon(payload.symbol);
|
|
38
38
|
}
|
|
39
39
|
compareBySymbol(b) {
|
|
40
40
|
return this.symbol > b.symbol ? 1 : -1;
|
|
41
41
|
}
|
|
42
|
+
static getTokenIcon(symbol) {
|
|
43
|
+
return `${GearboxBackendApi.getStaticTokenUrl()}${symbol.toLowerCase()}.svg`;
|
|
44
|
+
}
|
|
42
45
|
}
|
|
43
46
|
export {
|
|
44
47
|
TokenData
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Address, PublicClient, WalletClient } from "viem";
|
|
2
2
|
import type { NetworkType } from "../../chain/index.js";
|
|
3
|
-
import type { SupportedToken } from "../../sdk-gov-legacy/index.js";
|
|
4
3
|
import type { PoolData_Legacy } from "../core/pool.js";
|
|
5
4
|
import type { TokenData } from "../tokens/tokenData.js";
|
|
6
5
|
export interface GearboxExtraMerkleLmReward {
|
|
@@ -44,7 +43,7 @@ type ReportHandler = (e: unknown, description?: string) => void;
|
|
|
44
43
|
export interface GetLmRewardsV2Props {
|
|
45
44
|
account: Address;
|
|
46
45
|
provider: PublicClient;
|
|
47
|
-
|
|
46
|
+
gearTokenAddress: Address;
|
|
48
47
|
airdropDistributorAddress: Address;
|
|
49
48
|
network: NetworkType;
|
|
50
49
|
reportError?: ReportHandler;
|
|
@@ -75,7 +74,7 @@ export interface ClaimLmRewardsV3Props {
|
|
|
75
74
|
signer: WalletClient;
|
|
76
75
|
}
|
|
77
76
|
export declare class GearboxRewardsApi {
|
|
78
|
-
static getLmRewardsV2({ provider, account,
|
|
77
|
+
static getLmRewardsV2({ provider, account, gearTokenAddress, network, airdropDistributorAddress, reportError, }: GetLmRewardsV2Props): Promise<GearboxLmReward[]>;
|
|
79
78
|
static getLmRewardsV3({ pools, tokensList, provider, account, reportError, }: GetLmRewardsV3Props): Promise<(GearboxLmReward | GearboxLmReward[])[]>;
|
|
80
79
|
static getLmRewardsMerkle({ pools, account, network, reportError, }: GetLmRewardsMerkleProps): Promise<GearboxLmReward[]>;
|
|
81
80
|
private static extractFulfilled;
|