@skip-go/widget 2.3.8 → 2.4.1-alpha.0
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 +2 -193
- package/build/hooks/use-assets.d.ts +3 -4
- package/build/hooks/use-auto-set-address.d.ts +2 -1
- package/build/hooks/use-balances-by-chain.d.ts +4 -3
- package/build/hooks/use-bridges.d.ts +3 -2
- package/build/hooks/use-broadcasted-txs.d.ts +8 -6
- package/build/hooks/use-chains.d.ts +3 -2
- package/build/hooks/use-route.d.ts +3 -2
- package/build/hooks/use-skip-client.d.ts +1 -1
- package/build/hooks/use-swap-widget.d.ts +1 -1
- package/build/hooks/use-usd-value.d.ts +3 -2
- package/build/index.es.js +166 -16
- package/build/index.es.js.map +1 -1
- package/build/lib/penumbra.d.ts +7 -0
- package/build/lib/wagmi.d.ts +2 -8986
- package/build/provider/index.d.ts +3 -2
- package/build/provider/skip-provider.d.ts +7 -10
- package/build/store/callbacks.d.ts +31 -0
- package/build/ui/index.d.ts +2 -1
- package/package.json +6 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ChainAffiliates, SkipClientOptions } from '@skip-go/client';
|
|
3
3
|
import { DefaultRouteConfig } from '../hooks/use-swap-widget';
|
|
4
4
|
import { RouteConfig } from '../hooks/use-route';
|
|
5
5
|
import { MinimalWallet } from '../hooks/use-make-wallets';
|
|
@@ -15,9 +15,10 @@ export interface SwapWidgetProviderProps extends SkipAPIProviderProps {
|
|
|
15
15
|
}
|
|
16
16
|
export interface SkipAPIProviderProps {
|
|
17
17
|
children: React.ReactNode;
|
|
18
|
-
endpointOptions?:
|
|
18
|
+
endpointOptions?: SkipClientOptions['endpointOptions'];
|
|
19
19
|
apiURL?: string;
|
|
20
20
|
makeDestinationWallets?: (chainID: string) => MinimalWallet[];
|
|
21
|
+
chainIDsToAffiliates?: Record<string, ChainAffiliates>;
|
|
21
22
|
}
|
|
22
23
|
export declare const WalletProvider: React.FC<WalletProviderProps>;
|
|
23
24
|
export declare const SkipAPIProvider: React.FC<SkipAPIProviderProps>;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChainAffiliates, SkipClient, SkipClientOptions } from '@skip-go/client';
|
|
3
3
|
import { MinimalWallet } from '../hooks/use-make-wallets';
|
|
4
|
+
import { SkipAPIProviderProps } from './index';
|
|
4
5
|
export declare const SkipContext: import("react").Context<{
|
|
5
|
-
skipClient:
|
|
6
|
+
skipClient: SkipClient;
|
|
6
7
|
apiURL?: string | undefined;
|
|
7
|
-
endpointOptions?:
|
|
8
|
+
endpointOptions?: SkipClientOptions['endpointOptions'];
|
|
8
9
|
makeDestinationWallets?: ((chainID: string) => MinimalWallet[]) | undefined;
|
|
10
|
+
chainIDsToAffiliates?: Record<string, ChainAffiliates> | undefined;
|
|
9
11
|
} | undefined>;
|
|
10
|
-
export declare function SkipProvider({ children, apiURL, endpointOptions, makeDestinationWallets, }:
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
apiURL?: string;
|
|
13
|
-
endpointOptions?: SkipRouterOptions['endpointOptions'];
|
|
14
|
-
makeDestinationWallets?: (chainID: string) => MinimalWallet[];
|
|
15
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function SkipProvider({ children, apiURL, endpointOptions, makeDestinationWallets, chainIDsToAffiliates, }: SkipAPIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type OnWalletConnected = {
|
|
2
|
+
walletName: string;
|
|
3
|
+
chainId: string;
|
|
4
|
+
address?: string;
|
|
5
|
+
};
|
|
6
|
+
type OnWalletDisconnected = {
|
|
7
|
+
chainType?: string;
|
|
8
|
+
};
|
|
9
|
+
type OnTransactionBroadcasted = {
|
|
10
|
+
txHash: string;
|
|
11
|
+
chainId: string;
|
|
12
|
+
explorerLink: string;
|
|
13
|
+
};
|
|
14
|
+
type OnTransactionComplete = {
|
|
15
|
+
txHash: string;
|
|
16
|
+
chainId: string;
|
|
17
|
+
explorerLink: string;
|
|
18
|
+
};
|
|
19
|
+
type OnTransactionFailed = {
|
|
20
|
+
error: string;
|
|
21
|
+
};
|
|
22
|
+
export type CallbackStore = {
|
|
23
|
+
onWalletConnected?: (props: OnWalletConnected) => void;
|
|
24
|
+
onWalletDisconnected?: (props: OnWalletDisconnected) => void;
|
|
25
|
+
onTransactionBroadcasted?: (props: OnTransactionBroadcasted) => void;
|
|
26
|
+
onTransactionComplete?: (props: OnTransactionComplete) => void;
|
|
27
|
+
onTransactionFailed?: (props: OnTransactionFailed) => void;
|
|
28
|
+
};
|
|
29
|
+
export declare const defaultValues: CallbackStore;
|
|
30
|
+
export declare const useCallbackStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CallbackStore>>;
|
|
31
|
+
export {};
|
package/build/ui/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import { SwapWidgetProviderProps } from '../provider';
|
|
|
3
3
|
import { ConfigureSwapWidgetArgs } from '../store/swap-widget';
|
|
4
4
|
import { SwapWidgetUIProps } from './Widget';
|
|
5
5
|
import { PartialTheme } from './theme';
|
|
6
|
-
|
|
6
|
+
import { CallbackStore } from '../store/callbacks';
|
|
7
|
+
export type SwapWidgetWithoutProvidersProps = SwapWidgetUIProps & ConfigureSwapWidgetArgs & CallbackStore & {
|
|
7
8
|
theme?: PartialTheme;
|
|
8
9
|
};
|
|
9
10
|
export type SwapWidgetProps = SwapWidgetWithoutProvidersProps & Partial<SwapWidgetProviderProps>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skip-go/widget",
|
|
3
3
|
"description": "Swap widget",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.1-alpha.0",
|
|
5
5
|
"repository": "https://github.com/skip-mev/widget",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -54,6 +54,10 @@
|
|
|
54
54
|
"@initia/initia-registry": "latest",
|
|
55
55
|
"@injectivelabs/utils": "1.14.6",
|
|
56
56
|
"@interchain-ui/react": "^1.23.13",
|
|
57
|
+
"@penumbra-zone/bech32m": "7.0.0",
|
|
58
|
+
"@penumbra-zone/client": "18.0.0",
|
|
59
|
+
"@penumbra-zone/protobuf": "6.0.0",
|
|
60
|
+
"@penumbra-zone/transport-dom": "7.5.0",
|
|
57
61
|
"@r2wc/react-to-web-component": "^2.0.3",
|
|
58
62
|
"@radix-ui/colors": "^3.0.0",
|
|
59
63
|
"@radix-ui/react-accordion": "^1.1.2",
|
|
@@ -62,7 +66,7 @@
|
|
|
62
66
|
"@radix-ui/react-scroll-area": "^1.0.5",
|
|
63
67
|
"@radix-ui/react-switch": "^1.0.3",
|
|
64
68
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
65
|
-
"@skip-go/client": "0.
|
|
69
|
+
"@skip-go/client": "0.7.0",
|
|
66
70
|
"@solana/spl-token": "^0.4.6",
|
|
67
71
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
68
72
|
"@solana/wallet-adapter-wallets": "^0.19.32",
|