@skip-go/widget 0.0.1-alpha.2 → 0.0.1-alpha.21
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 +12 -7
- package/build/chains/types.d.ts +2 -2
- package/build/constants/defaults.d.ts +1 -1
- package/build/constants/swap-venues.d.ts +4 -0
- package/build/hooks/use-route.d.ts +3 -2
- package/build/hooks/use-skip-client.d.ts +3 -5
- package/build/hooks/use-swap-widget.d.ts +3 -3
- package/build/index.d.ts +3 -1
- package/build/index.es.js +154 -127
- package/build/index.es.js.map +1 -1
- package/build/lib/wagmi.d.ts +3199 -3135
- package/build/provider/index.d.ts +3 -3
- package/build/provider/skip-provider.d.ts +6 -7
- package/build/provider/wallet/solana.d.ts +0 -1
- package/build/store/disclosures.d.ts +1 -1
- package/build/store/settings.d.ts +1 -1
- package/build/store/swap-widget.d.ts +26 -1
- package/build/store/track-wallet.d.ts +1 -1
- package/build/store/tx-history.d.ts +1 -1
- package/build/style.css +4 -0
- package/build/ui/Button/HistoryButton.d.ts +1 -1
- package/build/ui/Button/SettingsButton.d.ts +1 -1
- package/build/ui/ChainSelect/ChainSelectTrigger.d.ts +0 -1
- package/build/ui/CraftedBySkip.d.ts +1 -0
- package/build/ui/HistoryDialog/DescriptionList.d.ts +4 -4
- package/build/ui/PreviewRoute/AlertCollapse.d.ts +4 -4
- package/build/ui/PreviewRoute/make-actions.d.ts +3 -3
- package/build/ui/PreviewRoute/make-chain-ids-with-actions.d.ts +2 -2
- package/build/ui/UsdValue.d.ts +1 -1
- package/build/ui/index.d.ts +1 -4
- package/package.json +21 -16
package/README.md
CHANGED
|
@@ -73,13 +73,6 @@ interface SwapWidgetProps {
|
|
|
73
73
|
destChainID?: string;
|
|
74
74
|
destAssetDenom?: string;
|
|
75
75
|
};
|
|
76
|
-
endpointOptions?: {
|
|
77
|
-
// Endpoint options to override endpoints. Defaults to Skip proxied endpoints. Please reach out to us first if you want to be whitelisted.
|
|
78
|
-
endpoints?: Record<string, EndpointOptions>;
|
|
79
|
-
getRpcEndpointForChain?: (chainID: string) => Promise<string>;
|
|
80
|
-
getRestEndpointForChain?: (chainID: string) => Promise<string>;
|
|
81
|
-
};
|
|
82
|
-
apiURL?: string; // Custom API URL to override Skip API endpoint. Defaults to Skip proxied endpoints. Please reach out to us first if you want to be whitelisted.
|
|
83
76
|
routeConfig?: {
|
|
84
77
|
experimentalFeatures?: ['hyperlane'];
|
|
85
78
|
allowMultiTx?: boolean;
|
|
@@ -105,5 +98,17 @@ interface SwapWidgetProps {
|
|
|
105
98
|
The `SwapWidgetProvider` component accepts the following prop:
|
|
106
99
|
|
|
107
100
|
- `toasterProps` (Optional): Props for the toaster component. Refer to [ToasterProps](https://react-hot-toast.com/docs/toast-options) for more details. Defaults to `{ position: 'top-right' }`.
|
|
101
|
+
- `endpointOptions` (Optional): Endpoint options to override endpoints. Defaults to Skip proxied endpoints. Please reach out to us first if you want to be whitelisted.
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
endpointOptions?: {
|
|
105
|
+
// Endpoint options to override endpoints. Defaults to Skip proxied endpoints. Please reach out to us first if you want to be whitelisted.
|
|
106
|
+
endpoints?: Record<string, EndpointOptions>;
|
|
107
|
+
getRpcEndpointForChain?: (chainID: string) => Promise<string>;
|
|
108
|
+
getRestEndpointForChain?: (chainID: string) => Promise<string>;
|
|
109
|
+
};
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- `apiURL` (Optional): Custom API URL to override Skip API endpoint. Defaults to Skip proxied endpoints. Please reach out to us first if you want to be whitelisted.
|
|
108
113
|
|
|
109
114
|
By following these steps, you can easily integrate the Skip Go Widget into your React application and customize it to meet your specific needs.
|
package/build/chains/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const chainIds: readonly ["eightball-1", "acre_9052-1", "
|
|
1
|
+
export declare const chainIds: readonly ["eightball-1", "acre_9052-1", "aioz_168-1", "akashnet-2", "agoric-3", "akiro-1", "althea_258432-1", "andromeda-1", "archway-1", "arkh", "andromeda-1", "mantle-1", "aura_6322-2", "xstaxy-1", "bitcanna-1", "laozi-mainnet", "axelar-dojo-1", "beezee-1", "bitsong-2b", "bluzelle-9", "bostrom", "canto_7700-1", "cerberus-chain-1", "carbon-1", "chihuahua-1", "celestia", "perun-1", "chimba", "cheqd-mainnet-1", "morocco-1", "cifer-2", "cifer-1", "comdex-1", "commercio-3", "cvn_2032-1", "coreum-mainnet-1", "coss-1", "crescent-1", "centauri-1", "cosmoshub-4", "cronosmainnet_25-1", "crypto-org-chain-mainnet-1", "mainnet-3", "cudos-1", "desmos-mainnet", "dhealth", "dig-1", "vota-ash", "dydx-mainnet-1", "dyson-mainnet-01", "dymension_1100-1", "echelon_3000-3", "emoney-3", "empowerchain-1", "ethos_7003-1", "evmos_9001-2", "fetchhub-4", "finschia-2", "colosseum-1", "galaxy-1", "furya-1", "fxcore", "wormchain", "genesis_29-2", "gitopia", "govgen-1", "gravity-bridge-3", "haqq_11235-1", "highbury_710-1", "humans_1089-1", "imversed_5555555-1", "Antora", "ixo-5", "injective-1", "irishub-1", "jackal-1", "joltify_1729-1", "kava_2222-10", "juno-1", "darchub", "kichain-2", "kyve-1", "kaiyo-1", "lambda_92000-1", "logos_7002-1", "lava-mainnet-1", "likecoin-mainnet-2", "loop-1", "loyal-main-02", "LumenX", "mars-1", "lum-network-1", "mayachain-mainnet-v1", "medasdigital-1", "microtick-1", "meme-1", "mainnet", "migaloo-1", "mun-1", "mythos_7001-1", "neura_266-1", "Neutaro-1", "neutron-1", "nim_1122-1", "cataclysm-1", "noble-1", "nois-1", "pirin-1", "nomic-stakenet-3", "nyx", "octa", "odin-mainnet-freya", "odin-mainnet-freya", "exchain-66", "onex-mainnet-1", "onomy-mainnet-1", "omniflixhub-1", "Oraichain", "panacea-3", "osmosis-1", "passage-2", "passage-1", "planq_7070-2", "core-1", "point_10687-1", "pio-mainnet-1", "pryzm-1", "PUNDIX", "pylons-mainnet-1", "quasar-1", "quicksilver-2", "qwoyn-1", "realionetwork_3301-1", "regen-1", "reb_1111-1", "titan-1", "ssc-1", "scorum-1", "secret-4", "seda-1", "pacific-1", "sentinelhub-2", "ShareRing-VoyagerNet", "sgenet-1", "shentu-2.2", "shido_9008-1", "sifchain-1", "sixnet", "sommelier-3", "source-1", "stafihub-1", "stargaze-1", "iov-mainnet-ibc", "stratos-1", "stride-1", "sunrise-1", "tenet_1559-1", "teritori-1", "morocco-1", "columbus-5", "phoenix-1", "tgrade-mainnet-1", "thorchain-mainnet-v1", "titan_18888-1", "umee-1", "FUND-MainNet-2", "ununifi-beta-v1", "uptick_117-1", "vidulum-1", "dimension_37-1", "zetachain_7000-1", "sandbox-01", "constantine-3", "arkeo", "artela_11820-1", "aura_6321-3", "axelar-testnet-lisbon-3", "bbn-test3", "bbn-test1", "bitcanna-dev-6", "bitcanna-dev-1", "blockx_190-1", "cascadia_6102-1", "blockspacerace-0", "arabica-11", "mocha-4", "babajaga-1", "cheqd-testnet-6", "chimba-testnet", "banksy-testnet-3", "kitten-04", "malaga-420", "theta-testnet-001", "coreum-testnet-1", "coss-testnet-1", "cudos-testnet-public-3", "deardoge-testnet", "morpheus-apollo-3", "vota-testnet", "vota-vk", "elystestnet-1", "dydx-testnet-4", "circulus-1", "entrypoint-pubtest-2", "evmos_9000-4", "ebony-2", "dorado-1", "gitopia-janus-testnet-2", "galactica_9302-1", "berberis-1", "testnet-1", "prajna-1", "devnet-1", "pandora-8", "imversed-test-1", "injective-888", "canine-1", "mesomelas-1", "kichain-t-4", "uni-6", "harpoon-4", "korellia-2", "lava-testnet-2", "kaon-1", "lava-testnet-1", "likecoin-public-testnet-5", "lumenx-test", "ares-1", "mantra-hongbai-1", "narwhal-2", "neura_267-1", "neura_268-1", "pion-1", "nibiru-devnet-2", "nibiru-devnet-1", "nibiru-testnet-1", "nibiru-testnet-2", "grand-1", "nois-testnet-005", "rila-1", "sandbox", "okp4-nemeton-1", "osmo-test-5", "osmo-test-4", "INVALID-ID-permtestnet-testnet-1", "test-core-1", "test-core-2", "planq_7077-1", "indigo-1", "quasar-test-1", "earendel-1", "rhye-2", "provider", "ssc-testnet-1", "pulsar-3", "pulsar-2", "sei-devnet-3", "atlantic-1", "atlantic-2", "self-dev-1", "sge-network-3", "sge-network-4", "fivenet", "sourcetest-1", "soarchaintestnet", "elgafar-1", "stateset-1-testnet", "stride-testnet-1", "temporal-test-2", "symphony-testnet-1", "swisstronik_1291-1", "90u-2", "pisco-1", "90u-4", "titan_18889-1", "ulas", "union-testnet-8", "uptick_7000-2", "vince_1903-1", "buenavista-1", "INVALID-ID-wavehashtestnet-testnet-1", "xion-testnet-1", "athens_7001-1", "landlord-1", "tomcat-1", "init-ai-1", "initiation-1", "minimove-1", "miniwasm-1", "burrito-1", "birdee-1"];
|
|
2
2
|
export type ChainId = (typeof chainIds)[number] | (string & {});
|
|
3
|
-
export declare const chainNames: readonly ["8ball", "acrechain", "
|
|
3
|
+
export declare const chainNames: readonly ["8ball", "acrechain", "aioz", "akash", "agoric", "akiro", "althea", "andromeda", "archway", "arkh", "andromeda1", "assetmantle", "aura", "aura1", "bitcanna", "bandchain", "axelar", "beezee", "bitsong", "bluzelle", "bostrom", "canto", "cerberus", "carbon", "chihuahua", "celestia", "chain4energy", "chimba", "cheqd", "chronicnetwork", "cifer", "cifer1", "comdex", "commercionetwork", "conscious", "coreum", "coss", "crescent", "composable", "cosmoshub", "cronos", "cryptoorgchain", "decentr", "cudos", "desmos", "dhealth", "dig", "doravota", "dydx", "dyson", "dymension", "echelon", "emoney", "empowerchain", "ethos", "evmos", "fetchhub", "finschia", "firmachain", "galaxy", "furya", "fxcore", "gateway", "genesisl1", "gitopia", "govgen", "gravitybridge", "haqq", "highbury", "humans", "imversed", "idep", "impacthub", "injective", "irisnet", "jackal", "joltify", "kava", "juno", "konstellation", "kichain", "kyve", "kujira", "lambda", "logos", "lava", "likecoin", "loop", "loyal", "lumenx", "mars", "lumnetwork", "mayachain", "medasdigital", "microtick", "meme", "mises", "migaloo", "mun", "mythos", "neura", "neutaro", "neutron", "nim", "nibiru", "noble", "nois", "nolus", "nomic", "nyx", "octa", "odin", "odin", "okexchain", "onex", "onomy", "omniflixhub", "oraichain", "panacea", "osmosis", "passage", "passage1", "planq", "persistence", "point", "provenance", "pryzm", "pundix", "pylons", "quasar", "quicksilver", "qwoyn", "realio", "regen", "rebus", "rizon", "saga", "scorum", "secretnetwork", "seda", "sei", "sentinel", "shareledger", "sge", "shentu", "shido", "sifchain", "six", "sommelier", "source", "stafihub", "stargaze", "starname", "stratos", "stride", "sunrise", "tenet", "teritori", "terpnetwork", "terra", "terra2", "tgrade", "thorchain", "titan", "umee", "unification", "ununifi", "uptick", "vidulum", "xpla", "zetachain", "akashtestnet", "archwaytestnet", "arkeonetworktestnet", "artelatestnet", "auratestnet", "axelartestnet", "babylontestnet", "babylontestnet1", "bitcannadevnet2", "bitcannadevnet", "blockxtestnet", "cascadiatestnet", "celestiatestnet", "celestiatestnet2", "celestiatestnet3", "chain4energytestnet", "cheqdtestnet", "chimbatestnet", "composabletestnet", "coolcattestnet", "cosmwasmtestnet", "cosmoshubtestnet", "coreumtestnet", "cosstestnet", "cudostestnet", "deardogetestnet", "desmostestnet", "doravotatestnet", "doravotatestnet2", "elystestnet", "dydxtestnet", "empowertestnet", "entrypointtestnet", "evmostestnet", "finschiatestnet", "fetchhubtestnet", "gitopiatestnet", "galacticatestnet", "hedgetestnet", "humanstestnet", "hypersigntestnet", "impacthubdevnet", "impacthubtestnet", "imversedtestnet", "injectivetestnet", "jackaltestnet", "jackaltestnet2", "kichaintestnet", "junotestnet", "kujiratestnet", "kyvedevnet", "lavatestnet", "kyvetestnet", "lavatestnet1", "likecointestnet", "lumenxtestnet", "marstestnet", "mantrachaintestnet", "migalootestnet", "neuratestnet", "neuradevnet", "neutrontestnet", "nibirudevnet2", "nibirudevnet", "nibirutestnet", "nibirutestnet2", "nobletestnet", "noistestnet", "nolustestnet", "nyxtestnet", "okp4testnet", "osmosistestnet", "osmosistestnet4", "permtestnet", "persistencetestnet", "persistencetestnet2", "planqtestnet", "pryzmtestnet", "quasartestnet", "qwoyntestnet", "quicksilvertestnet", "rsprovidertestnet", "sagatestnet", "secretnetworktestnet", "secretnetworktestnet2", "seidevnet3", "seitestnet", "seitestnet2", "selfchaindevnet", "sgetestnet", "sgetestnet4", "sixtestnet", "sourcetestnet", "soarchaintestnet", "stargazetestnet", "statesettestnet", "stridetestnet", "temporaltestnet", "symphonytestnet", "swisstroniktestnet", "terpnettestnet2", "terra2testnet", "terpnettestnet", "titantestnet", "ulastestnet", "uniontestnet", "upticktestnet", "vincechaintestnet", "wardenprotocoltestnet", "wavehashtestnet", "xiontestnet", "zetachaintestnet", "civitia", "blackwing", "init_ai", "initia", "minimove", "miniwasm", "noon", "tucana"];
|
|
4
4
|
export type ChainName = (typeof chainNames)[number] | (string & {});
|
|
5
5
|
export declare const chainIdToName: Record<ChainId, ChainName>;
|
|
6
6
|
export declare const chainNameToId: Record<ChainName, ChainId>;
|
|
@@ -2,4 +2,4 @@ export declare const endpointOptions: {
|
|
|
2
2
|
getRpcEndpointForChain: (chainID: string) => Promise<string>;
|
|
3
3
|
getRestEndpointForChain: (chainID: string) => Promise<string>;
|
|
4
4
|
};
|
|
5
|
-
export declare const apiURL = "https://ibc
|
|
5
|
+
export declare const apiURL = "https://ibc.fun/api/skip";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { BridgeType, ExperimentalFeature, SwapVenueRequest } from '@skip-router/core';
|
|
1
|
+
import { BridgeType, ExperimentalFeature, SmartSwapOptions, SwapVenueRequest } from '@skip-router/core';
|
|
2
2
|
export interface RouteConfig {
|
|
3
3
|
experimentalFeatures?: ExperimentalFeature[];
|
|
4
4
|
allowMultiTx?: boolean;
|
|
5
5
|
allowUnsafe?: boolean;
|
|
6
6
|
bridges?: BridgeType[];
|
|
7
7
|
swapVenues?: SwapVenueRequest[];
|
|
8
|
+
smartSwapOptions?: SmartSwapOptions;
|
|
8
9
|
}
|
|
9
10
|
interface UseRouteArgs extends RouteConfig {
|
|
10
11
|
direction: 'swap-in' | 'swap-out';
|
|
@@ -15,5 +16,5 @@ interface UseRouteArgs extends RouteConfig {
|
|
|
15
16
|
destinationAssetChainID?: string;
|
|
16
17
|
enabled?: boolean;
|
|
17
18
|
}
|
|
18
|
-
export declare function useRoute({ direction, amount, sourceAsset, sourceAssetChainID, destinationAsset, destinationAssetChainID, enabled, swapVenues, bridges, experimentalFeatures, allowMultiTx, allowUnsafe, }: UseRouteArgs): import("@tanstack/react-query").UseQueryResult<import("@skip-router/core").RouteResponse | undefined, Error>;
|
|
19
|
+
export declare function useRoute({ direction, amount, sourceAsset, sourceAssetChainID, destinationAsset, destinationAssetChainID, enabled, swapVenues, bridges, experimentalFeatures, allowMultiTx, allowUnsafe, smartSwapOptions, }: UseRouteArgs): import("@tanstack/react-query").UseQueryResult<import("@skip-router/core").RouteResponse | undefined, Error>;
|
|
19
20
|
export {};
|
|
@@ -2,10 +2,8 @@ export declare function useSkipClient(): import("@skip-router/core").SkipRouter;
|
|
|
2
2
|
export declare function useSkipConfig(): {
|
|
3
3
|
apiURL: string | undefined;
|
|
4
4
|
endpointOptions: {
|
|
5
|
-
endpoints?: Record<string, import("@skip-router/core").EndpointOptions
|
|
6
|
-
getRpcEndpointForChain?: (
|
|
7
|
-
getRestEndpointForChain?: (
|
|
5
|
+
endpoints?: Record<string, import("@skip-router/core").EndpointOptions>;
|
|
6
|
+
getRpcEndpointForChain?: (chainID: string) => Promise<string>;
|
|
7
|
+
getRestEndpointForChain?: (chainID: string) => Promise<string>;
|
|
8
8
|
} | undefined;
|
|
9
|
-
defaultRoute: import("./use-swap-widget").DefaultRouteConfig | undefined;
|
|
10
|
-
routeConfig: import("./use-route").RouteConfig | undefined;
|
|
11
9
|
};
|
|
@@ -29,7 +29,7 @@ export declare function useSwapWidget(): {
|
|
|
29
29
|
onSourceAmountChange: (amount: string) => void;
|
|
30
30
|
onSourceAmountMax: <T extends HTMLElement>(event: MouseEvent<T>) => false | undefined;
|
|
31
31
|
onSourceAssetChange: (asset: Asset) => void;
|
|
32
|
-
onSourceChainChange: (chain: Chain) => Promise<void>;
|
|
32
|
+
onSourceChainChange: (chain: Chain, injectAsset?: Asset) => Promise<void>;
|
|
33
33
|
priceImpactThresholdReached: boolean;
|
|
34
34
|
route: import("@skip-router/core").RouteResponse | undefined;
|
|
35
35
|
routeError: string;
|
|
@@ -65,14 +65,14 @@ export declare const useSwapWidgetStore: import("zustand/traditional").UseBoundS
|
|
|
65
65
|
(listener: (selectedState: SwapWidgetStore, previousSelectedState: SwapWidgetStore) => void): () => void;
|
|
66
66
|
<U>(selector: (state: SwapWidgetStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
67
67
|
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
68
|
-
fireImmediately?: boolean
|
|
68
|
+
fireImmediately?: boolean;
|
|
69
69
|
} | undefined): () => void;
|
|
70
70
|
};
|
|
71
71
|
}, "persist"> & {
|
|
72
72
|
persist: {
|
|
73
73
|
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SwapWidgetStore, unknown>>) => void;
|
|
74
74
|
clearStorage: () => void;
|
|
75
|
-
rehydrate: () => void |
|
|
75
|
+
rehydrate: () => Promise<void> | void;
|
|
76
76
|
hasHydrated: () => boolean;
|
|
77
77
|
onHydrate: (fn: (state: SwapWidgetStore) => void) => () => void;
|
|
78
78
|
onFinishHydration: (fn: (state: SwapWidgetStore) => void) => () => void;
|
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import './styles/global.css';
|
|
2
2
|
export { SwapWidgetProvider } from './provider';
|
|
3
|
-
export { SwapWidget } from './ui';
|
|
3
|
+
export { SwapWidget, SwapWidgetProps } from './ui';
|
|
4
|
+
export { useAssets } from './provider/assets';
|
|
5
|
+
export { useChains, useChainByID } from './hooks/use-chains';
|