@skip-go/widget 2.4.3 → 2.4.5
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 +0 -2
- package/build/hooks/use-account.d.ts +28 -0
- package/build/hooks/use-skip-client.d.ts +3051 -0
- package/build/hooks/use-swap-widget.d.ts +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.es.js +198 -57
- package/build/index.es.js.map +1 -1
- package/build/provider/index.d.ts +14 -0
- package/build/provider/skip-provider.d.ts +15 -1
- package/build/ui/Icon/ShareIcon.d.ts +0 -1
- package/build/ui/PreviewRoute/types.d.ts +2 -2
- package/package.json +2 -6
- package/build/ui/WebComponent.d.ts +0 -16
|
@@ -22,6 +22,20 @@ export interface SkipAPIProviderProps {
|
|
|
22
22
|
apiURL?: string;
|
|
23
23
|
makeDestinationWallets?: (chainID: string) => MinimalWallet[];
|
|
24
24
|
chainIDsToAffiliates?: Record<string, ChainAffiliates>;
|
|
25
|
+
connectedWallet?: {
|
|
26
|
+
cosmos?: {
|
|
27
|
+
getAddress: (chainID: string) => Promise<string>;
|
|
28
|
+
getSigner: SkipClientOptions['getCosmosSigner'];
|
|
29
|
+
};
|
|
30
|
+
evm?: {
|
|
31
|
+
getAddress: (chainID: string) => Promise<string>;
|
|
32
|
+
getSigner: SkipClientOptions['getEVMSigner'];
|
|
33
|
+
};
|
|
34
|
+
svm?: {
|
|
35
|
+
getAddress: (chainID: string) => Promise<string>;
|
|
36
|
+
getSigner: SkipClientOptions['getSVMSigner'];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
25
39
|
}
|
|
26
40
|
export declare const WalletProvider: React.FC<WalletProviderProps>;
|
|
27
41
|
export declare const SkipAPIProvider: React.FC<SkipAPIProviderProps>;
|
|
@@ -8,5 +8,19 @@ export declare const SkipContext: import("react").Context<{
|
|
|
8
8
|
endpointOptions?: SkipClientOptions['endpointOptions'];
|
|
9
9
|
makeDestinationWallets?: ((chainID: string) => MinimalWallet[]) | undefined;
|
|
10
10
|
chainIDsToAffiliates?: Record<string, ChainAffiliates> | undefined;
|
|
11
|
+
connectedWallet?: {
|
|
12
|
+
cosmos?: {
|
|
13
|
+
getAddress: (chainID: string) => Promise<string>;
|
|
14
|
+
getSigner: SkipClientOptions['getCosmosSigner'];
|
|
15
|
+
} | undefined;
|
|
16
|
+
evm?: {
|
|
17
|
+
getAddress: (chainID: string) => Promise<string>;
|
|
18
|
+
getSigner: SkipClientOptions['getEVMSigner'];
|
|
19
|
+
} | undefined;
|
|
20
|
+
svm?: {
|
|
21
|
+
getAddress: (chainID: string) => Promise<string>;
|
|
22
|
+
getSigner: SkipClientOptions['getSVMSigner'];
|
|
23
|
+
} | undefined;
|
|
24
|
+
} | undefined;
|
|
11
25
|
} | undefined>;
|
|
12
|
-
export declare function SkipProvider({ children, apiURL, endpointOptions, makeDestinationWallets, chainIDsToAffiliates, }: SkipAPIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function SkipProvider({ children, apiURL, endpointOptions, makeDestinationWallets, chainIDsToAffiliates, connectedWallet, }: SkipAPIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,7 @@ export type ChainAddress = {
|
|
|
4
4
|
chainID: string;
|
|
5
5
|
chainType?: TrackWalletCtx;
|
|
6
6
|
address?: string;
|
|
7
|
-
source?: 'input' | Wallet;
|
|
7
|
+
source?: 'input' | 'parent' | Wallet;
|
|
8
8
|
};
|
|
9
9
|
export type ChainAddresses = Record<number, ChainAddress | undefined>;
|
|
10
10
|
export interface SetChainAddressesParam {
|
|
@@ -12,7 +12,7 @@ export interface SetChainAddressesParam {
|
|
|
12
12
|
chainID: string;
|
|
13
13
|
chainType: TrackWalletCtx;
|
|
14
14
|
address: string;
|
|
15
|
-
source: 'input' | Wallet;
|
|
15
|
+
source: 'input' | 'parent' | Wallet;
|
|
16
16
|
}
|
|
17
17
|
export interface BroadcastedTx {
|
|
18
18
|
chainID: string;
|
package/package.json
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skip-go/widget",
|
|
3
3
|
"description": "Swap widget",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.5",
|
|
5
5
|
"repository": "https://github.com/skip-mev/widget",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./build/index.d.ts",
|
|
10
10
|
"import": "./build/index.es.js"
|
|
11
|
-
},
|
|
12
|
-
"./style.css": {
|
|
13
|
-
"import": "./build/style.css",
|
|
14
|
-
"default": "./build/style.css"
|
|
15
11
|
}
|
|
16
12
|
},
|
|
17
13
|
"types": "./build/index.d.ts",
|
|
@@ -66,7 +62,7 @@
|
|
|
66
62
|
"@radix-ui/react-scroll-area": "^1.0.5",
|
|
67
63
|
"@radix-ui/react-switch": "^1.0.3",
|
|
68
64
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
69
|
-
"@skip-go/client": "0.
|
|
65
|
+
"@skip-go/client": "0.8.0",
|
|
70
66
|
"@solana/spl-token": "^0.4.6",
|
|
71
67
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
72
68
|
"@solana/wallet-adapter-wallets": "^0.19.32",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SwapWidgetProps } from './index';
|
|
2
|
-
import { SwapWidgetProviderProps } from '../provider';
|
|
3
|
-
type WebComponentProps = SwapWidgetProps & SwapWidgetProviderProps;
|
|
4
|
-
declare const WEB_COMPONENT_NAME = "skip-widget";
|
|
5
|
-
export declare const initializeSwapWidget: () => void;
|
|
6
|
-
type Stringify<T> = {
|
|
7
|
-
[K in keyof T]?: string;
|
|
8
|
-
};
|
|
9
|
-
declare global {
|
|
10
|
-
namespace JSX {
|
|
11
|
-
interface IntrinsicElements {
|
|
12
|
-
[WEB_COMPONENT_NAME]: Stringify<WebComponentProps>;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export {};
|