@stakekit/widget 0.0.292 → 0.0.293
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/bundle/index.bundle.css +1 -1
- package/dist/bundle/index.bundle.js +13049 -12662
- package/dist/package/index.package.css +162 -162
- package/dist/package/index.package.js +9473 -8630
- package/dist/types/domain/earn/contract.d.ts +1 -0
- package/dist/types/generated/yield-provider-ids.d.ts +86 -0
- package/dist/types/index.bundle.d.ts +2 -2
- package/dist/types/index.package.d.ts +2 -2
- package/dist/types/public-api/types.d.ts +21 -3
- package/dist/website/assets/index-CRRnuuvK.js +540 -0
- package/dist/website/assets/{index-Dpi1HuAK.css → index-mVJBJZFp.css} +1 -1
- package/dist/website/index.html +2 -2
- package/package.json +2 -1
- package/dist/website/assets/index-3l3n0-cX.js +0 -540
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/** Yield provider IDs, as the Yield API reports a yield's `providerId`. */
|
|
2
|
+
export declare const YieldProviderId: {
|
|
3
|
+
readonly Aave: "aave";
|
|
4
|
+
readonly Edel: "edel";
|
|
5
|
+
readonly Anchor: "anchor";
|
|
6
|
+
readonly Benqi: "benqi";
|
|
7
|
+
readonly Compound: "compound";
|
|
8
|
+
readonly Lido: "lido";
|
|
9
|
+
readonly Marinade: "marinade";
|
|
10
|
+
readonly Sushi: "sushi";
|
|
11
|
+
readonly Yearn: "yearn";
|
|
12
|
+
readonly Ape: "ape";
|
|
13
|
+
readonly CHAINLINK: "chainlink";
|
|
14
|
+
readonly Pendle: "pendle";
|
|
15
|
+
readonly ParaX: "parax";
|
|
16
|
+
readonly RocketPool: "rocket-pool";
|
|
17
|
+
readonly Stakewise: "stakewise";
|
|
18
|
+
readonly Etherfi: "etherfi";
|
|
19
|
+
readonly MorphoAave: "morpho-aave";
|
|
20
|
+
readonly Morpho: "morpho";
|
|
21
|
+
readonly MorphoCompound: "morpho-compound";
|
|
22
|
+
readonly Angle: "angle";
|
|
23
|
+
readonly KelpDAO: "kelpdao";
|
|
24
|
+
readonly Figment: "figment";
|
|
25
|
+
readonly Kiln: "kiln";
|
|
26
|
+
readonly P2P: "P2P";
|
|
27
|
+
readonly Everstake: "everstake";
|
|
28
|
+
readonly EigenLayer: "eigenlayer";
|
|
29
|
+
readonly Luganodes: "luganodes";
|
|
30
|
+
readonly Renzo: "renzo";
|
|
31
|
+
readonly InfStones: "infstones";
|
|
32
|
+
readonly Ethena: "ethena";
|
|
33
|
+
readonly Upshift: "upshift";
|
|
34
|
+
readonly Fluid: "fluid";
|
|
35
|
+
readonly IdleFinance: "idle-finance";
|
|
36
|
+
readonly Gearbox: "gearbox";
|
|
37
|
+
readonly ChorusOne: "chorus-one";
|
|
38
|
+
readonly StakeKit: "stakekit";
|
|
39
|
+
readonly Spark: "spark";
|
|
40
|
+
readonly Sommelier: "sommelier";
|
|
41
|
+
readonly SummerFi: "summer-fi";
|
|
42
|
+
readonly Venus: "venus";
|
|
43
|
+
readonly VenusFlux: "venus-flux";
|
|
44
|
+
readonly Mantle: "mantle";
|
|
45
|
+
readonly TonWhales: "ton-whales";
|
|
46
|
+
readonly Blend: "blend";
|
|
47
|
+
readonly Synthetix: "synthetix";
|
|
48
|
+
readonly Drift: "drift";
|
|
49
|
+
readonly Euler: "euler";
|
|
50
|
+
readonly Maple: "maple";
|
|
51
|
+
readonly Sky: "sky";
|
|
52
|
+
readonly YO: "yo-protocol";
|
|
53
|
+
readonly Meria: "meria";
|
|
54
|
+
readonly Stakin: "stakin";
|
|
55
|
+
readonly GlobalStake: "globalstake";
|
|
56
|
+
readonly SimplyStaking: "simplystaking";
|
|
57
|
+
readonly Coinbase: "coinbase";
|
|
58
|
+
readonly ValidationCloud: "validation-cloud";
|
|
59
|
+
readonly Curve: "curve";
|
|
60
|
+
readonly PancakeSwap: "pancakeswap";
|
|
61
|
+
readonly YieldXyz: "yield-xyz";
|
|
62
|
+
readonly Kamino: "kamino";
|
|
63
|
+
readonly Veda: "veda";
|
|
64
|
+
readonly Kinetiq: "kinetiq";
|
|
65
|
+
readonly Lista: "lista";
|
|
66
|
+
readonly Dolomite: "dolomite";
|
|
67
|
+
readonly Midas: "midas";
|
|
68
|
+
readonly Concrete: "concrete";
|
|
69
|
+
readonly Dinari: "dinari";
|
|
70
|
+
readonly Ondo: "ondo";
|
|
71
|
+
readonly Superstate: "superstate";
|
|
72
|
+
readonly Securitize: "securitize";
|
|
73
|
+
readonly Nest: "nest";
|
|
74
|
+
readonly PaxosLabs: "paxos-labs";
|
|
75
|
+
readonly R25: "r25";
|
|
76
|
+
readonly InfiniFi: "infinifi";
|
|
77
|
+
readonly RockSolid: "rocksolid";
|
|
78
|
+
readonly T9: "t9";
|
|
79
|
+
readonly GamiLabs: "gami-labs";
|
|
80
|
+
readonly Lagoon: "lagoon";
|
|
81
|
+
readonly Yuzu: "yuzu";
|
|
82
|
+
readonly Sentora: "sentora";
|
|
83
|
+
readonly Zama: "zama";
|
|
84
|
+
readonly Ember: "ember";
|
|
85
|
+
};
|
|
86
|
+
export type YieldProviderId = (typeof YieldProviderId)[keyof typeof YieldProviderId];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BundledSKWidgetProps, SKTheme } from "./public-api/types.js";
|
|
2
|
-
export type { ActionMeta, BittensorTx, BundledSKWidgetProps, EvmTx, SKActionArguments, SKActionType, SKBorrowExternalProviders, SKBorrowMarketsScope, SKBorrowSignatureResult, SKBorrowTx, SKBorrowTxMeta, SKBorrowTxResult, SKBorrowWallet, SKCustomTranslations, SKEip712TypedData, SKExternalProviders, SKHostVariant, SKLanguage, SKNetwork, SKPreferredTokenYieldsPerNetwork, SKSignMessageResult, SKTheme, SKToken, SKTrackEvent, SKTrackingConfig, SKTrackPage, SKTransactionResult, SKTransactionType, SKTranslationTree, SKTx, SKTxMeta, SKWallet, SKWalletPolicy, SKZamaPermitMeta, SKZamaPermitResult, SolanaTx, SupportedSKChainIds, TonTx, TronTx, } from "./public-api/types.js";
|
|
3
|
-
export { DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, } from "./public-api/types.js";
|
|
2
|
+
export type { ActionMeta, BittensorTx, BundledSKWidgetProps, EvmTx, SKActionArguments, SKActionType, SKBorrowExternalProviders, SKBorrowMarketsScope, SKBorrowSignatureResult, SKBorrowTx, SKBorrowTxMeta, SKBorrowTxResult, SKBorrowWallet, SKCustomTranslations, SKEip712TypedData, SKExternalProviders, SKHostVariant, SKLanguage, SKNetwork, SKPreferredTokenYieldsPerNetwork, SKSignMessageResult, SKTheme, SKToken, SKTrackEvent, SKTrackingConfig, SKTrackPage, SKTransactionResult, SKTransactionType, SKTranslationTree, SKTx, SKTxMeta, SKWallet, SKWalletPolicy, SKYieldProviderOrder, SKZamaPermitMeta, SKZamaPermitResult, SolanaTx, SupportedSKChainIds, TonTx, TronTx, } from "./public-api/types.js";
|
|
3
|
+
export { DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, YieldProviderId, } from "./public-api/types.js";
|
|
4
4
|
export declare const renderSKWidget: (props: BundledSKWidgetProps & {
|
|
5
5
|
container: Element | DocumentFragment;
|
|
6
6
|
}) => {
|
|
@@ -7,8 +7,8 @@ import type { ReactElement } from "react";
|
|
|
7
7
|
import type { HelpModalProps, SKAppProps } from "./public-api/react-types.js";
|
|
8
8
|
import type { SKTheme } from "./public-api/types.js";
|
|
9
9
|
export type { HelpModalProps, SKAppProps } from "./public-api/react-types.js";
|
|
10
|
-
export type { ActionMeta, BittensorTx, EvmTx, SKActionArguments, SKActionType, SKBorrowExternalProviders, SKBorrowMarketsScope, SKBorrowSignatureResult, SKBorrowTx, SKBorrowTxMeta, SKBorrowTxResult, SKBorrowWallet, SKCustomTranslations, SKEip712TypedData, SKExternalProviders, SKHostVariant, SKLanguage, SKNetwork, SKPreferredTokenYieldsPerNetwork, SKSignMessageResult, SKTheme, SKToken, SKTrackEvent, SKTrackingConfig, SKTrackPage, SKTransactionResult, SKTransactionType, SKTranslationTree, SKTx, SKTxMeta, SKWallet, SKWalletPolicy, SKZamaPermitMeta, SKZamaPermitResult, SolanaTx, SupportedSKChainIds, TonTx, TronTx, } from "./public-api/types.js";
|
|
11
|
-
export { DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, } from "./public-api/types.js";
|
|
10
|
+
export type { ActionMeta, BittensorTx, EvmTx, SKActionArguments, SKActionType, SKBorrowExternalProviders, SKBorrowMarketsScope, SKBorrowSignatureResult, SKBorrowTx, SKBorrowTxMeta, SKBorrowTxResult, SKBorrowWallet, SKCustomTranslations, SKEip712TypedData, SKExternalProviders, SKHostVariant, SKLanguage, SKNetwork, SKPreferredTokenYieldsPerNetwork, SKSignMessageResult, SKTheme, SKToken, SKTrackEvent, SKTrackingConfig, SKTrackPage, SKTransactionResult, SKTransactionType, SKTranslationTree, SKTx, SKTxMeta, SKWallet, SKWalletPolicy, SKYieldProviderOrder, SKZamaPermitMeta, SKZamaPermitResult, SolanaTx, SupportedSKChainIds, TonTx, TronTx, } from "./public-api/types.js";
|
|
11
|
+
export { DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, YieldProviderId, } from "./public-api/types.js";
|
|
12
12
|
export declare const SKApp: (props: SKAppProps) => ReactElement;
|
|
13
13
|
export declare const HelpModal: (props: HelpModalProps) => ReactElement;
|
|
14
14
|
export declare const darkTheme: SKTheme;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type DashboardYieldCategory, DashboardYieldCategory as DomainDashboardYieldCategory } from "../domain/earn/contract.js";
|
|
1
|
+
import { type DashboardYieldCategory, DashboardYieldCategory as DomainDashboardYieldCategory, YieldProviderId as DomainYieldProviderId, type YieldProviderId } from "../domain/earn/contract.js";
|
|
2
2
|
import type { Network } from "../domain/network/contract.js";
|
|
3
3
|
import { EvmChainIds, MiscChainIds, type WalletPolicy as SKWalletPolicy, SubstrateChainIds, type SupportedSKChainIds } from "../domain/wallet/contract.js";
|
|
4
4
|
import type { SKTheme } from "./theme.js";
|
|
5
5
|
export type { SupportedSKChainIds, WalletPolicy as SKWalletPolicy, } from "../domain/wallet/contract.js";
|
|
6
6
|
export type { SKTheme } from "./theme.js";
|
|
7
|
-
export { DomainDashboardYieldCategory as DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, };
|
|
7
|
+
export { DomainDashboardYieldCategory as DashboardYieldCategory, DomainYieldProviderId as YieldProviderId, EvmChainIds, MiscChainIds, SubstrateChainIds, };
|
|
8
8
|
type Hex = `0x${string}`;
|
|
9
9
|
export type SKEip712TypedData = {
|
|
10
10
|
readonly domain: {
|
|
@@ -201,7 +201,10 @@ export type SKTxMeta = ActionMeta & {
|
|
|
201
201
|
};
|
|
202
202
|
/**
|
|
203
203
|
* Outcome of `SKWallet.sendTransaction`. A bare string is the broadcast hash.
|
|
204
|
-
* `cancelled
|
|
204
|
+
* - `cancelled`: the user declined in the wallet. Nothing was broadcast.
|
|
205
|
+
* - `error`: the request failed. Include `txHash` whenever the transaction
|
|
206
|
+
* was broadcast before the failure (for example a receipt timeout): the
|
|
207
|
+
* Widget then tracks that transaction instead of asking to sign it again.
|
|
205
208
|
*/
|
|
206
209
|
export type SKTransactionResult = string | {
|
|
207
210
|
type: "success";
|
|
@@ -211,6 +214,7 @@ export type SKTransactionResult = string | {
|
|
|
211
214
|
} | {
|
|
212
215
|
type: "error";
|
|
213
216
|
error: string;
|
|
217
|
+
txHash?: string;
|
|
214
218
|
};
|
|
215
219
|
/**
|
|
216
220
|
* Outcome of `SKWallet.signMessage`. A bare string is the signature.
|
|
@@ -375,6 +379,13 @@ export type SKTrackingConfig = {
|
|
|
375
379
|
* The value is a yield ID, or `"*"` for the widget's default choice.
|
|
376
380
|
*/
|
|
377
381
|
export type SKPreferredTokenYieldsPerNetwork = Readonly<Record<string, Readonly<Record<`${string}-${string}`, string>>>>;
|
|
382
|
+
/**
|
|
383
|
+
* Yield provider IDs to list first in each dashboard category tab, in rank
|
|
384
|
+
* order. Matches a yield's provider, not the validators it stakes with.
|
|
385
|
+
* Known IDs are in `YieldProviderId`; other strings are accepted so newer
|
|
386
|
+
* providers work before the widget lists them.
|
|
387
|
+
*/
|
|
388
|
+
export type SKYieldProviderOrder = Partial<Record<DashboardYieldCategory, Array<YieldProviderId | (string & {})>>>;
|
|
378
389
|
type SettingsPropsBase = {
|
|
379
390
|
/** StakeKit API key. Read at mount; remount the widget to change it. */
|
|
380
391
|
apiKey: string;
|
|
@@ -394,6 +405,8 @@ type SettingsPropsBase = {
|
|
|
394
405
|
onMountAnimationComplete?: () => void;
|
|
395
406
|
/** Hides the network badge on token icons. */
|
|
396
407
|
hideNetworkLogo?: boolean;
|
|
408
|
+
/** Hides the estimated gas fee on the review screen. Commission and protocol fees stay visible. */
|
|
409
|
+
hideGasFee?: boolean;
|
|
397
410
|
/** Skips the initial layout and reveal animation. */
|
|
398
411
|
disableInitLayoutAnimation?: boolean;
|
|
399
412
|
/** Keeps the amount input font size fixed instead of shrinking it for long values. */
|
|
@@ -443,6 +456,11 @@ type SettingsPropsBase = {
|
|
|
443
456
|
dashboardVariant?: boolean;
|
|
444
457
|
/** Order of yield categories. Omitted categories follow in the default order. */
|
|
445
458
|
dashboardYieldCategoryOrder?: DashboardYieldCategory[];
|
|
459
|
+
/**
|
|
460
|
+
* Lists these yield providers first within each category tab, and selects
|
|
461
|
+
* the first one by default. Applies only with category yield grouping.
|
|
462
|
+
*/
|
|
463
|
+
yieldProviderOrder?: SKYieldProviderOrder;
|
|
446
464
|
/** Lists yields flat or grouped by category. Defaults to `"category"` with `dashboardVariant`, else `"flat"`. */
|
|
447
465
|
yieldGrouping?: "flat" | "category";
|
|
448
466
|
/** Offers institutional wallets instead of the regular wallet list. Read at mount. */
|