@skip-go/widget 0.0.1-alpha.2 → 0.0.1-alpha.20
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 +0 -2
- package/build/hooks/use-swap-widget.d.ts +1 -1
- package/build/index.d.ts +3 -1
- package/build/index.es.js +155 -98
- package/build/index.es.js.map +1 -1
- package/build/lib/wagmi.d.ts +64 -0
- package/build/provider/index.d.ts +3 -3
- package/build/provider/skip-provider.d.ts +4 -5
- package/build/store/swap-widget.d.ts +26 -1
- package/build/ui/CraftedBySkip.d.ts +1 -0
- 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/index.d.ts +1 -3
- package/package.json +13 -14
package/build/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACn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
8895
8895
|
formatters?: undefined;
|
|
8896
8896
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
|
|
8897
|
+
}, {
|
|
8898
|
+
blockExplorers: {
|
|
8899
|
+
readonly default: {
|
|
8900
|
+
readonly name: "Forma Explorer";
|
|
8901
|
+
readonly url: "https://explorer.forma.art";
|
|
8902
|
+
};
|
|
8903
|
+
};
|
|
8904
|
+
contracts: {
|
|
8905
|
+
readonly multicall3: {
|
|
8906
|
+
readonly address: "0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079";
|
|
8907
|
+
readonly blockCreated: 252705;
|
|
8908
|
+
};
|
|
8909
|
+
};
|
|
8910
|
+
id: 984122;
|
|
8911
|
+
name: "Forma";
|
|
8912
|
+
nativeCurrency: {
|
|
8913
|
+
readonly name: "TIA";
|
|
8914
|
+
readonly symbol: "TIA";
|
|
8915
|
+
readonly decimals: 18;
|
|
8916
|
+
};
|
|
8917
|
+
rpcUrls: {
|
|
8918
|
+
readonly default: {
|
|
8919
|
+
readonly http: readonly ["https://rpc.forma.art"];
|
|
8920
|
+
};
|
|
8921
|
+
};
|
|
8922
|
+
sourceId?: number | undefined;
|
|
8923
|
+
testnet: false;
|
|
8924
|
+
custom?: Record<string, unknown> | undefined;
|
|
8925
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
8926
|
+
formatters?: undefined;
|
|
8927
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
8928
|
+
}, {
|
|
8929
|
+
blockExplorers: {
|
|
8930
|
+
readonly default: {
|
|
8931
|
+
readonly name: "Forma Explorer";
|
|
8932
|
+
readonly url: "https://explorer.sketchpad-1.forma.art";
|
|
8933
|
+
};
|
|
8934
|
+
};
|
|
8935
|
+
contracts?: {
|
|
8936
|
+
[x: string]: import("viem").ChainContract | {
|
|
8937
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
8938
|
+
} | undefined;
|
|
8939
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
8940
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
8941
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
8942
|
+
} | undefined;
|
|
8943
|
+
id: 984123;
|
|
8944
|
+
name: "Forma Testnet";
|
|
8945
|
+
nativeCurrency: {
|
|
8946
|
+
readonly name: "TIA";
|
|
8947
|
+
readonly symbol: "TIA";
|
|
8948
|
+
readonly decimals: 18;
|
|
8949
|
+
};
|
|
8950
|
+
rpcUrls: {
|
|
8951
|
+
readonly default: {
|
|
8952
|
+
readonly http: readonly ["https://rpc.sketchpad-1.forma.art"];
|
|
8953
|
+
};
|
|
8954
|
+
};
|
|
8955
|
+
sourceId?: number | undefined;
|
|
8956
|
+
testnet: true;
|
|
8957
|
+
custom?: Record<string, unknown> | undefined;
|
|
8958
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
8959
|
+
formatters?: undefined;
|
|
8960
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
8897
8961
|
}], {
|
|
8898
8962
|
42161: import("viem").HttpTransport;
|
|
8899
8963
|
43114: import("viem").HttpTransport;
|
|
@@ -10,16 +10,16 @@ export interface WidgetConfig {
|
|
|
10
10
|
defaultRoute?: DefaultRouteConfig;
|
|
11
11
|
routeConfig?: RouteConfig;
|
|
12
12
|
}
|
|
13
|
-
interface
|
|
13
|
+
export interface SwapWidgetProviderProps extends SkipAPIProviderProps {
|
|
14
14
|
children: React.ReactNode;
|
|
15
15
|
toasterProps?: ToasterProps;
|
|
16
16
|
}
|
|
17
|
-
export interface SkipAPIProviderProps
|
|
17
|
+
export interface SkipAPIProviderProps {
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
endpointOptions?: SkipRouterOptions['endpointOptions'];
|
|
20
20
|
apiURL?: string;
|
|
21
21
|
}
|
|
22
22
|
export declare const WalletProvider: React.FC<WalletProviderProps>;
|
|
23
23
|
export declare const SkipAPIProvider: React.FC<SkipAPIProviderProps>;
|
|
24
|
-
export declare const SwapWidgetProvider: React.FC<
|
|
24
|
+
export declare const SwapWidgetProvider: React.FC<SwapWidgetProviderProps>;
|
|
25
25
|
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { SkipRouter, SkipRouterOptions } from '@skip-router/core';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
export declare const SkipContext: import("react").Context<({
|
|
3
|
+
export declare const SkipContext: import("react").Context<{
|
|
5
4
|
skipClient: SkipRouter;
|
|
6
5
|
apiURL?: string | undefined;
|
|
7
6
|
endpointOptions?: SkipRouterOptions['endpointOptions'];
|
|
8
|
-
}
|
|
9
|
-
export declare function SkipProvider({ children, apiURL, endpointOptions,
|
|
7
|
+
} | undefined>;
|
|
8
|
+
export declare function SkipProvider({ children, apiURL, endpointOptions, }: {
|
|
10
9
|
children: ReactNode;
|
|
11
10
|
apiURL?: string;
|
|
12
11
|
endpointOptions?: SkipRouterOptions['endpointOptions'];
|
|
13
|
-
}
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,34 @@
|
|
|
1
|
+
import { DefaultRouteConfig } from '../hooks/use-swap-widget';
|
|
2
|
+
import { RouteConfig } from '../hooks/use-route';
|
|
3
|
+
import { PersistOptions } from 'zustand/middleware';
|
|
1
4
|
interface SwapWidgetStore {
|
|
2
5
|
colors: {
|
|
3
6
|
primary?: string;
|
|
4
7
|
};
|
|
5
8
|
onlyTestnet?: boolean;
|
|
9
|
+
defaultRoute?: DefaultRouteConfig;
|
|
10
|
+
routeConfig?: RouteConfig;
|
|
6
11
|
}
|
|
7
12
|
export declare const swapWidgetDefaultValues: SwapWidgetStore;
|
|
8
|
-
export declare const useSwapWidgetUIStore: import("zustand").UseBoundStore<import("zustand").StoreApi<SwapWidgetStore
|
|
13
|
+
export declare const useSwapWidgetUIStore: import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<SwapWidgetStore>, "subscribe"> & {
|
|
14
|
+
subscribe: {
|
|
15
|
+
(listener: (selectedState: SwapWidgetStore, previousSelectedState: SwapWidgetStore) => void): () => void;
|
|
16
|
+
<U>(selector: (state: SwapWidgetStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
17
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
18
|
+
fireImmediately?: boolean | undefined;
|
|
19
|
+
} | undefined): () => void;
|
|
20
|
+
};
|
|
21
|
+
}, "persist"> & {
|
|
22
|
+
persist: {
|
|
23
|
+
setOptions: (options: Partial<PersistOptions<SwapWidgetStore, Pick<SwapWidgetStore, "defaultRoute">>>) => void;
|
|
24
|
+
clearStorage: () => void;
|
|
25
|
+
rehydrate: () => void | Promise<void>;
|
|
26
|
+
hasHydrated: () => boolean;
|
|
27
|
+
onHydrate: (fn: (state: SwapWidgetStore) => void) => () => void;
|
|
28
|
+
onFinishHydration: (fn: (state: SwapWidgetStore) => void) => () => void;
|
|
29
|
+
getOptions: () => Partial<PersistOptions<SwapWidgetStore, Pick<SwapWidgetStore, "defaultRoute">>>;
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
9
32
|
export interface ConfigureSwapWidgetArgs {
|
|
10
33
|
colors?: {
|
|
11
34
|
/**
|
|
@@ -26,6 +49,8 @@ export interface ConfigureSwapWidgetArgs {
|
|
|
26
49
|
slippage?: number;
|
|
27
50
|
};
|
|
28
51
|
onlyTestnet?: boolean;
|
|
52
|
+
defaultRoute?: DefaultRouteConfig;
|
|
53
|
+
routeConfig?: RouteConfig;
|
|
29
54
|
}
|
|
30
55
|
export declare const configureSwapWidget: (args: ConfigureSwapWidgetArgs) => void;
|
|
31
56
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CraftedBySkip: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BridgeType, RouteResponse } from
|
|
1
|
+
import { BridgeType, RouteResponse } from '@skip-router/core';
|
|
2
2
|
export interface TransferAction {
|
|
3
|
-
type:
|
|
3
|
+
type: 'TRANSFER';
|
|
4
4
|
denomIn: string;
|
|
5
5
|
denomOut: string;
|
|
6
6
|
fromChainID: string;
|
|
@@ -13,7 +13,7 @@ export interface TransferAction {
|
|
|
13
13
|
txIndex: number;
|
|
14
14
|
}
|
|
15
15
|
export interface SwapAction {
|
|
16
|
-
type:
|
|
16
|
+
type: 'SWAP';
|
|
17
17
|
denomIn: string;
|
|
18
18
|
denomOut: string;
|
|
19
19
|
chainID: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RouteResponse } from
|
|
2
|
-
import { Action, SwapAction, TransferAction } from
|
|
1
|
+
import { RouteResponse } from '@skip-router/core';
|
|
2
|
+
import { Action, SwapAction, TransferAction } from './make-actions';
|
|
3
3
|
export interface ChainIDWithAction {
|
|
4
4
|
chainID: string;
|
|
5
5
|
transferAction?: TransferAction | undefined;
|
package/build/ui/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SkipAPIProviderProps } from '../provider';
|
|
3
2
|
import { ConfigureSwapWidgetArgs } from '../store/swap-widget';
|
|
4
|
-
interface SwapWidgetProps extends
|
|
3
|
+
export interface SwapWidgetProps extends Pick<React.HTMLAttributes<HTMLDivElement>, 'className' | 'style'>, ConfigureSwapWidgetArgs {
|
|
5
4
|
}
|
|
6
5
|
export declare const SwapWidget: React.FC<SwapWidgetProps>;
|
|
7
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skip-go/widget",
|
|
3
3
|
"description": "Swap widget",
|
|
4
|
-
"version": "0.0.1-alpha.
|
|
4
|
+
"version": "0.0.1-alpha.20",
|
|
5
5
|
"repository": "https://github.com/skip-mev/widget",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -24,19 +24,8 @@
|
|
|
24
24
|
"chains:generate": "tsx ./src/scripts/codegen.ts"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@cosmos-kit/cosmostation-extension": "^2.7.10",
|
|
28
|
-
"@cosmos-kit/keplr-extension": "^2.7.9",
|
|
29
|
-
"@cosmos-kit/leap-extension": "^2.7.10",
|
|
30
|
-
"@cosmos-kit/okxwallet": "2.4.x",
|
|
31
|
-
"@cosmos-kit/react": "2.10.x",
|
|
32
|
-
"@cosmos-kit/station": "2.5.x",
|
|
33
|
-
"@cosmos-kit/vectis": "2.6.x",
|
|
34
|
-
"@graz-sh/types": "0.0.14",
|
|
35
|
-
"@tanstack/react-query": ">=5.0.0",
|
|
36
27
|
"react": "17.x || 18.x",
|
|
37
|
-
"react-dom": "17.x || 18.x"
|
|
38
|
-
"viem": "2.x",
|
|
39
|
-
"wagmi": "2.x"
|
|
28
|
+
"react-dom": "17.x || 18.x"
|
|
40
29
|
},
|
|
41
30
|
"devDependencies": {
|
|
42
31
|
"@types/node": "18.7.18",
|
|
@@ -66,7 +55,15 @@
|
|
|
66
55
|
"@graz-sh/types": "0.0.14"
|
|
67
56
|
},
|
|
68
57
|
"dependencies": {
|
|
58
|
+
"@cosmos-kit/cosmostation-extension": "^2.7.10",
|
|
59
|
+
"@cosmos-kit/keplr-extension": "^2.7.9",
|
|
60
|
+
"@cosmos-kit/leap-extension": "^2.7.10",
|
|
61
|
+
"@cosmos-kit/okxwallet": "2.4.x",
|
|
62
|
+
"@cosmos-kit/react": "2.10.x",
|
|
63
|
+
"@cosmos-kit/station": "2.5.x",
|
|
64
|
+
"@cosmos-kit/vectis": "2.6.x",
|
|
69
65
|
"@emotion/css": "^11.11.2",
|
|
66
|
+
"@graz-sh/types": "0.0.14",
|
|
70
67
|
"@heroicons/react": "^2.1.3",
|
|
71
68
|
"@interchain-ui/react": "^1.23.13",
|
|
72
69
|
"@radix-ui/colors": "^3.0.0",
|
|
@@ -76,7 +73,7 @@
|
|
|
76
73
|
"@radix-ui/react-scroll-area": "^1.0.5",
|
|
77
74
|
"@radix-ui/react-switch": "^1.0.3",
|
|
78
75
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
79
|
-
"@skip-router/core": "
|
|
76
|
+
"@skip-router/core": "5.1.0",
|
|
80
77
|
"@solana/spl-token": "^0.4.6",
|
|
81
78
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
82
79
|
"@solana/wallet-adapter-wallets": "^0.19.32",
|
|
@@ -88,6 +85,8 @@
|
|
|
88
85
|
"react-hot-toast": "^2.4.1",
|
|
89
86
|
"react-icons": "^5.2.1",
|
|
90
87
|
"tailwind-merge": "^2.3.0",
|
|
88
|
+
"viem": "2.x",
|
|
89
|
+
"wagmi": "2.x",
|
|
91
90
|
"zustand": "^4.5.2"
|
|
92
91
|
},
|
|
93
92
|
"publishConfig": {
|