@skip-go/widget 0.0.1-alpha.14 → 0.0.1-alpha.3
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 +7 -12
- package/build/chains/types.d.ts +2 -2
- package/build/hooks/use-skip-client.d.ts +2 -0
- package/build/hooks/use-swap-widget.d.ts +1 -1
- package/build/index.d.ts +1 -3
- package/build/index.es.js +59 -76
- package/build/index.es.js.map +1 -1
- package/build/provider/index.d.ts +3 -3
- package/build/provider/skip-provider.d.ts +5 -4
- package/build/store/swap-widget.d.ts +1 -26
- package/build/ui/index.d.ts +3 -1
- package/package.json +14 -13
- package/build/ui/CraftedBySkip.d.ts +0 -1
package/README.md
CHANGED
|
@@ -73,6 +73,13 @@ 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.
|
|
76
83
|
routeConfig?: {
|
|
77
84
|
experimentalFeatures?: ['hyperlane'];
|
|
78
85
|
allowMultiTx?: boolean;
|
|
@@ -98,17 +105,5 @@ interface SwapWidgetProps {
|
|
|
98
105
|
The `SwapWidgetProvider` component accepts the following prop:
|
|
99
106
|
|
|
100
107
|
- `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.
|
|
113
108
|
|
|
114
109
|
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 ["acre_9052-1", "eightball-1", "agoric-3", "aioz_168-1", "
|
|
1
|
+
export declare const chainIds: readonly ["acre_9052-1", "eightball-1", "agoric-3", "aioz_168-1", "akashnet-2", "akiro-1", "althea_258432-1", "andromeda-1", "andromeda-1", "arkh", "archway-1", "mantle-1", "aura_6322-2", "xstaxy-1", "axelar-dojo-1", "beezee-1", "laozi-mainnet", "bitsong-2b", "bluzelle-9", "bitcanna-1", "bostrom", "canto_7700-1", "cerberus-chain-1", "perun-1", "celestia", "carbon-1", "cheqd-mainnet-1", "chimba", "morocco-1", "chihuahua-1", "cifer-2", "cifer-1", "comdex-1", "commercio-3", "centauri-1", "cvn_2032-1", "coreum-mainnet-1", "coss-1", "cosmoshub-4", "cronosmainnet_25-1", "crescent-1", "crypto-org-chain-mainnet-1", "cudos-1", "mainnet-3", "desmos-mainnet", "dig-1", "dhealth", "vota-ash", "dydx-mainnet-1", "dymension_1100-1", "dyson-mainnet-01", "echelon_3000-3", "emoney-3", "empowerchain-1", "ethos_7003-1", "evmos_9001-2", "fetchhub-4", "furya-1", "finschia-2", "galaxy-1", "colosseum-1", "genesis_29-2", "gitopia", "wormchain", "fxcore", "govgen-1", "gravity-bridge-3", "highbury_710-1", "Antora", "haqq_11235-1", "imversed_5555555-1", "humans_1089-1", "ixo-5", "injective-1", "irishub-1", "jackal-1", "joltify_1729-1", "juno-1", "kava_2222-10", "kichain-2", "darchub", "kaiyo-1", "kyve-1", "lambda_92000-1", "lava-mainnet-1", "likecoin-mainnet-2", "logos_7002-1", "loop-1", "loyal-main-02", "LumenX", "lum-network-1", "mayachain-mainnet-v1", "medasdigital-1", "microtick-1", "mars-1", "meme-1", "mainnet", "mun-1", "migaloo-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", "omniflixhub-1", "onomy-mainnet-1", "Oraichain", "panacea-3", "passage-2", "osmosis-1", "passage-1", "core-1", "planq_7070-2", "point_10687-1", "pio-mainnet-1", "PUNDIX", "pryzm-1", "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", "iov-mainnet-ibc", "stratos-1", "stride-1", "stargaze-1", "tenet_1559-1", "sunrise-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", "blockspacerace-0", "cascadia_6102-1", "arabica-11", "babajaga-1", "mocha-4", "cheqd-testnet-6", "chimba-testnet", "banksy-testnet-3", "kitten-04", "coreum-testnet-1", "theta-testnet-001", "malaga-420", "coss-testnet-1", "cudos-testnet-public-3", "deardoge-testnet", "morpheus-apollo-3", "vota-testnet", "vota-vk", "dydx-testnet-4", "elystestnet-1", "circulus-1", "entrypoint-pubtest-2", "evmos_9000-4", "dorado-1", "ebony-2", "galactica_9302-1", "gitopia-janus-testnet-2", "berberis-1", "testnet-1", "prajna-1", "devnet-1", "pandora-8", "imversed-test-1", "injective-888", "canine-1", "uni-6", "mesomelas-1", "kichain-t-4", "harpoon-4", "korellia-2", "kaon-1", "lava-testnet-2", "lava-testnet-1", "likecoin-public-testnet-5", "lumenx-test", "mantra-hongbai-1", "ares-1", "narwhal-2", "neura_268-1", "neura_267-1", "pion-1", "nibiru-devnet-1", "nibiru-devnet-2", "nibiru-testnet-1", "nibiru-testnet-2", "grand-1", "nois-testnet-005", "rila-1", "sandbox", "okp4-nemeton-1", "osmo-test-4", "osmo-test-5", "INVALID-ID-permtestnet-testnet-1", "test-core-1", "test-core-2", "planq_7077-1", "indigo-1", "quasar-test-1", "rhye-2", "earendel-1", "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", "soarchaintestnet", "sourcetest-1", "elgafar-1", "stateset-1-testnet", "stride-testnet-1", "swisstronik_1291-1", "temporal-test-2", "90u-4", "90u-2", "pisco-1", "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 ["acrechain", "8ball", "agoric", "aioz", "
|
|
3
|
+
export declare const chainNames: readonly ["acrechain", "8ball", "agoric", "aioz", "akash", "akiro", "althea", "andromeda1", "andromeda", "arkh", "archway", "assetmantle", "aura", "aura1", "axelar", "beezee", "bandchain", "bitsong", "bluzelle", "bitcanna", "bostrom", "canto", "cerberus", "chain4energy", "celestia", "carbon", "cheqd", "chimba", "chronicnetwork", "chihuahua", "cifer", "cifer1", "comdex", "commercionetwork", "composable", "conscious", "coreum", "coss", "cosmoshub", "cronos", "crescent", "cryptoorgchain", "cudos", "decentr", "desmos", "dig", "dhealth", "doravota", "dydx", "dymension", "dyson", "echelon", "emoney", "empowerchain", "ethos", "evmos", "fetchhub", "furya", "finschia", "galaxy", "firmachain", "genesisl1", "gitopia", "gateway", "fxcore", "govgen", "gravitybridge", "highbury", "idep", "haqq", "imversed", "humans", "impacthub", "injective", "irisnet", "jackal", "joltify", "juno", "kava", "kichain", "konstellation", "kujira", "kyve", "lambda", "lava", "likecoin", "logos", "loop", "loyal", "lumenx", "lumnetwork", "mayachain", "medasdigital", "microtick", "mars", "meme", "mises", "mun", "migaloo", "mythos", "neura", "neutaro", "neutron", "nim", "nibiru", "noble", "nois", "nolus", "nomic", "nyx", "octa", "odin", "odin", "okexchain", "onex", "omniflixhub", "onomy", "oraichain", "panacea", "passage", "osmosis", "passage1", "persistence", "planq", "point", "provenance", "pundix", "pryzm", "pylons", "quasar", "quicksilver", "qwoyn", "realio", "regen", "rebus", "rizon", "saga", "scorum", "secretnetwork", "seda", "sei", "sentinel", "shareledger", "sge", "shentu", "shido", "sifchain", "six", "sommelier", "source", "stafihub", "starname", "stratos", "stride", "stargaze", "tenet", "sunrise", "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", "celestiatestnet", "cascadiatestnet", "celestiatestnet2", "chain4energytestnet", "celestiatestnet3", "cheqdtestnet", "chimbatestnet", "composabletestnet", "coolcattestnet", "coreumtestnet", "cosmoshubtestnet", "cosmwasmtestnet", "cosstestnet", "cudostestnet", "deardogetestnet", "desmostestnet", "doravotatestnet", "doravotatestnet2", "dydxtestnet", "elystestnet", "empowertestnet", "entrypointtestnet", "evmostestnet", "fetchhubtestnet", "finschiatestnet", "galacticatestnet", "gitopiatestnet", "hedgetestnet", "humanstestnet", "hypersigntestnet", "impacthubdevnet", "impacthubtestnet", "imversedtestnet", "injectivetestnet", "jackaltestnet", "junotestnet", "jackaltestnet2", "kichaintestnet", "kujiratestnet", "kyvedevnet", "kyvetestnet", "lavatestnet", "lavatestnet1", "likecointestnet", "lumenxtestnet", "mantrachaintestnet", "marstestnet", "migalootestnet", "neuradevnet", "neuratestnet", "neutrontestnet", "nibirudevnet", "nibirudevnet2", "nibirutestnet", "nibirutestnet2", "nobletestnet", "noistestnet", "nolustestnet", "nyxtestnet", "okp4testnet", "osmosistestnet4", "osmosistestnet", "permtestnet", "persistencetestnet", "persistencetestnet2", "planqtestnet", "pryzmtestnet", "quasartestnet", "quicksilvertestnet", "qwoyntestnet", "rsprovidertestnet", "sagatestnet", "secretnetworktestnet", "secretnetworktestnet2", "seidevnet3", "seitestnet", "seitestnet2", "selfchaindevnet", "sgetestnet", "sgetestnet4", "sixtestnet", "soarchaintestnet", "sourcetestnet", "stargazetestnet", "statesettestnet", "stridetestnet", "swisstroniktestnet", "temporaltestnet", "terpnettestnet", "terpnettestnet2", "terra2testnet", "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>;
|
|
@@ -6,4 +6,6 @@ export declare function useSkipConfig(): {
|
|
|
6
6
|
getRpcEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
|
|
7
7
|
getRestEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
|
|
8
8
|
} | undefined;
|
|
9
|
+
defaultRoute: import("./use-swap-widget").DefaultRouteConfig | undefined;
|
|
10
|
+
routeConfig: import("./use-route").RouteConfig | undefined;
|
|
9
11
|
};
|
|
@@ -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
|
|
32
|
+
onSourceChainChange: (chain: Chain) => Promise<void>;
|
|
33
33
|
priceImpactThresholdReached: boolean;
|
|
34
34
|
route: import("@skip-router/core").RouteResponse | undefined;
|
|
35
35
|
routeError: string;
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import './styles/global.css';
|
|
2
2
|
export { SwapWidgetProvider } from './provider';
|
|
3
|
-
export { SwapWidget
|
|
4
|
-
export { useAssets } from './provider/assets';
|
|
5
|
-
export { useChains, useChainByID } from './hooks/use-chains';
|
|
3
|
+
export { SwapWidget } from './ui';
|