@skip-go/widget 2.1.3-alpha.1 → 2.2.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 +1 -0
- package/build/hooks/use-swap-widget.d.ts +1 -1
- package/build/index.es.js +12 -8
- package/build/index.es.js.map +1 -1
- package/build/ui/Widget.d.ts +2 -1
- package/package.json +4 -4
- package/build/preinstall.cjs +0 -16
- package/build/ui/WalletModal/PraxWalletIndex.d.ts +0 -4
- package/build/utils/prax.d.ts +0 -75
package/build/ui/Widget.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ToasterProps } from 'react-hot-toast';
|
|
2
2
|
export type SwapWidgetUIProps = Pick<React.HTMLAttributes<HTMLDivElement>, 'className' | 'style'> & {
|
|
3
3
|
toasterProps?: ToasterProps;
|
|
4
|
+
persistSwapWidgetState?: boolean;
|
|
4
5
|
};
|
|
5
|
-
export declare const SwapWidgetUI: ({ className, style, toasterProps, }: SwapWidgetUIProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const SwapWidgetUI: ({ className, style, toasterProps, persistSwapWidgetState, }: SwapWidgetUIProps) => import("react/jsx-runtime").JSX.Element;
|
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.2.0",
|
|
5
5
|
"repository": "https://github.com/skip-mev/widget",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@cosmos-kit/keplr-extension": "^2.7.9",
|
|
34
34
|
"@cosmos-kit/leap-extension": "^2.7.10",
|
|
35
35
|
"@cosmos-kit/okxwallet": "2.4.x",
|
|
36
|
-
"@cosmos-kit/react": "
|
|
36
|
+
"@cosmos-kit/react": "2.10.x",
|
|
37
37
|
"@cosmos-kit/station": "2.5.x",
|
|
38
38
|
"@cosmos-kit/vectis": "2.6.x",
|
|
39
39
|
"react": "^18.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@cosmos-kit/keplr-extension": "^2.7.9",
|
|
48
48
|
"@cosmos-kit/leap-extension": "^2.7.10",
|
|
49
49
|
"@cosmos-kit/okxwallet": "2.4.x",
|
|
50
|
-
"@cosmos-kit/react": "
|
|
50
|
+
"@cosmos-kit/react": "2.10.x",
|
|
51
51
|
"@cosmos-kit/station": "2.5.x",
|
|
52
52
|
"@cosmos-kit/vectis": "2.6.x",
|
|
53
53
|
"@emotion/css": "^11.11.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@radix-ui/react-scroll-area": "^1.0.5",
|
|
64
64
|
"@radix-ui/react-switch": "^1.0.3",
|
|
65
65
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
66
|
-
"@skip-go/core": "0.4.
|
|
66
|
+
"@skip-go/core": "0.4.2",
|
|
67
67
|
"@solana/spl-token": "^0.4.6",
|
|
68
68
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
69
69
|
"@solana/wallet-adapter-wallets": "^0.19.32",
|
package/build/preinstall.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const npmrcPath = path.resolve(__dirname, '.npmrc');
|
|
5
|
-
const registryConfig = '@buf:registry=https://buf.build/gen/npm/v1/';
|
|
6
|
-
|
|
7
|
-
if (!fs.existsSync(npmrcPath)) {
|
|
8
|
-
fs.writeFileSync(npmrcPath, registryConfig);
|
|
9
|
-
} else {
|
|
10
|
-
const npmrcContent = fs.readFileSync(npmrcPath, 'utf-8');
|
|
11
|
-
if (!npmrcContent.includes(registryConfig)) {
|
|
12
|
-
fs.appendFileSync(npmrcPath, `\n${registryConfig}`);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
console.log('.npmrc configured for @buf registry');
|
package/build/utils/prax.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { PromiseClient, Transport } from '@connectrpc/connect';
|
|
2
|
-
import { PenumbraService } from '@penumbra-zone/protobuf';
|
|
3
|
-
import { ChannelTransportOptions } from '@penumbra-zone/transport-dom/create';
|
|
4
|
-
export declare const getPraxOrigin: () => string;
|
|
5
|
-
export declare const getPraxManifest: () => Promise<PenumbraManifest>;
|
|
6
|
-
export declare const isPraxConnected: () => boolean;
|
|
7
|
-
export declare const isPraxInstalled: () => Promise<boolean>;
|
|
8
|
-
export declare const throwIfPraxNotConnected: () => import("@penumbra-zone/client").PenumbraInjection;
|
|
9
|
-
export declare const throwIfPraxNotInstalled: () => Promise<unknown>;
|
|
10
|
-
export declare const requestPraxAccess: () => Promise<void>;
|
|
11
|
-
export declare const createPraxTransport: () => Transport;
|
|
12
|
-
export declare const createPraxClient: <T extends PenumbraService>(service: T) => PromiseClient<T>;
|
|
13
|
-
export declare const getPenumbraManifest: (penumbraOrigin: string, signal?: AbortSignal) => Promise<PenumbraManifest>;
|
|
14
|
-
/** Currently, Penumbra manifests are chrome extension manifest v3. There's no type
|
|
15
|
-
* guard because manifest format is enforced by chrome. This type only describes
|
|
16
|
-
* fields we're interested in as a client.
|
|
17
|
-
*
|
|
18
|
-
* @see https://developer.chrome.com/docs/extensions/reference/manifest#keys
|
|
19
|
-
*/
|
|
20
|
-
export interface PenumbraManifest {
|
|
21
|
-
/**
|
|
22
|
-
* manifest id is present in production, but generally not in dev, because
|
|
23
|
-
* they are inserted by chrome store tooling. chrome extension id are simple
|
|
24
|
-
* hashes of the 'key' field, an extension-specific public key.
|
|
25
|
-
*
|
|
26
|
-
* developers may configure a public key in dev, and the extension id will
|
|
27
|
-
* match appropriately, but will not be present in the manifest.
|
|
28
|
-
*
|
|
29
|
-
* the extension id is also part of the extension's origin URI.
|
|
30
|
-
*
|
|
31
|
-
* @see https://developer.chrome.com/docs/extensions/reference/manifest/key
|
|
32
|
-
* @see https://web.archive.org/web/20120606044635/http://supercollider.dk/2010/01/calculating-chrome-extension-id-from-your-private-key-233
|
|
33
|
-
*/
|
|
34
|
-
id?: string;
|
|
35
|
-
key?: string;
|
|
36
|
-
name: string;
|
|
37
|
-
version: string;
|
|
38
|
-
description: string;
|
|
39
|
-
homepage_url?: string;
|
|
40
|
-
options_ui?: {
|
|
41
|
-
page: string;
|
|
42
|
-
};
|
|
43
|
-
options_page?: string;
|
|
44
|
-
icons: Record<`${number}`, string> & {
|
|
45
|
-
['128']: string;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
export declare const isPenumbraManifest: (mf: unknown) => mf is PenumbraManifest;
|
|
49
|
-
/**
|
|
50
|
-
* Synchronously create a channel transport for the specified provider, or the
|
|
51
|
-
* first available provider if unspecified.
|
|
52
|
-
*
|
|
53
|
-
* Will always succeed, but the transport may fail if the provider is not
|
|
54
|
-
* present, or if the provider rejects the connection.
|
|
55
|
-
*
|
|
56
|
-
* Confirms presence of the provider's manifest. Will attempt to request
|
|
57
|
-
* approval if connection is not already active.
|
|
58
|
-
*
|
|
59
|
-
* @param requireProvider optional string identifying a provider origin
|
|
60
|
-
* @param transportOptions optional `ChannelTransportOptions` without `getPort`
|
|
61
|
-
*/
|
|
62
|
-
export declare const createPenumbraChannelTransportSync: (requireProvider?: string, transportOptions?: Omit<ChannelTransportOptions, 'getPort'>) => Transport;
|
|
63
|
-
/**
|
|
64
|
-
* Given a specific origin, identify the relevant injection, and confirm its
|
|
65
|
-
* manifest is actually present or throw. An `undefined` origin is accepted but
|
|
66
|
-
* will throw.
|
|
67
|
-
*/
|
|
68
|
-
export declare const assertProviderManifest: (providerOrigin?: string, signal?: AbortSignal) => Promise<unknown>;
|
|
69
|
-
/**
|
|
70
|
-
* Given a specific origin, identify the relevant injection or throw. An
|
|
71
|
-
* `undefined` origin is accepted but will throw.
|
|
72
|
-
*/
|
|
73
|
-
export declare const assertProviderRecord: (providerOrigin?: string) => import("@penumbra-zone/client").PenumbraInjection;
|
|
74
|
-
export declare const assertStringIsOrigin: (s?: string) => string;
|
|
75
|
-
export declare const assertProvider: (providerOrigin?: string) => Promise<import("@penumbra-zone/client").PenumbraInjection>;
|