@coinlist-co/react 0.12.2-rc.8a0d02a → 0.12.2-rc.99b1bd5
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 +10 -0
- package/dist/{chunk-IZJ4JSSC.js → chunk-IQAJ3L25.js} +173 -253
- package/dist/chunk-IQAJ3L25.js.map +1 -0
- package/dist/{chunk-3WW5FLT7.js → chunk-J45AY2FX.js} +10 -10
- package/dist/chunk-J45AY2FX.js.map +1 -0
- package/dist/{chunk-C6GF7MDF.js → chunk-M2TURNJH.js} +876 -800
- package/dist/chunk-M2TURNJH.js.map +1 -0
- package/dist/chunk-MJ6YXZWH.js +22 -0
- package/dist/chunk-MJ6YXZWH.js.map +1 -0
- package/dist/client/index.d.ts +2836 -5619
- package/dist/client/index.js +7157 -8250
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.d.ts +2 -32
- package/dist/server/index.js +6 -4
- package/dist/server/index.js.map +1 -1
- package/dist/{time-CVZpAkGY.d.cts → time-DkU7jivQ.d.ts} +1907 -3185
- package/dist/{token-registry-snapshot-BkwA8KmD.d.ts → token-registry-snapshot-D0OWXMe4.d.ts} +22 -58
- package/dist/universal/index.d.ts +81 -1067
- package/dist/universal/index.js +22 -46
- package/package.json +18 -14
- package/dist/chunk-3WW5FLT7.js.map +0 -1
- package/dist/chunk-C6GF7MDF.js.map +0 -1
- package/dist/chunk-IZJ4JSSC.js.map +0 -1
- package/dist/client/index.cjs +0 -20460
- package/dist/client/index.cjs.map +0 -1
- package/dist/client/index.d.cts +0 -8195
- package/dist/server/index.cjs +0 -4525
- package/dist/server/index.cjs.map +0 -1
- package/dist/server/index.d.cts +0 -382
- package/dist/time-CVZpAkGY.d.ts +0 -3987
- package/dist/token-registry-snapshot-bR14QehS.d.cts +0 -245
- package/dist/universal/index.cjs +0 -4562
- package/dist/universal/index.cjs.map +0 -1
- package/dist/universal/index.d.cts +0 -1362
package/dist/{token-registry-snapshot-BkwA8KmD.d.ts → token-registry-snapshot-D0OWXMe4.d.ts}
RENAMED
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { q as EvmWalletAddress, E as EthereumChain, c2 as Tx, bn as Newtype, F as TokenMetadata, aL as Chain, b as EvmContractAddress, bv as OfferToken } from './time-DkU7jivQ.js';
|
|
2
2
|
import { Hex, Abi, Hash, TransactionReceipt } from 'viem';
|
|
3
3
|
|
|
4
|
-
type PKCEParams = {
|
|
5
|
-
clientId: ClientId;
|
|
6
|
-
responseType: 'code';
|
|
7
|
-
redirectUri: RedirectUri;
|
|
8
|
-
codeChallenge: CodeChallenge;
|
|
9
|
-
codeChallengeMethod: 'S256';
|
|
10
|
-
state: PKCEState;
|
|
11
|
-
codeVerifier: CodeVerifier;
|
|
12
|
-
};
|
|
13
|
-
type PKCEConfig = {
|
|
14
|
-
clientId: ClientId;
|
|
15
|
-
redirectUri: RedirectUri;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Generates PKCE parameters for an OAuth2 authorization code flow.
|
|
19
|
-
* Pure crypto — no React, no DOM beyond Web Crypto API. Safe to use
|
|
20
|
-
* in server-side code and Next.js middleware.
|
|
21
|
-
*/
|
|
22
|
-
declare function generatePKCEParams(config: PKCEConfig): Promise<PKCEParams>;
|
|
23
|
-
|
|
24
4
|
type WriteContractParams = {
|
|
25
5
|
abi: Abi;
|
|
26
6
|
address: `0x${string}`;
|
|
@@ -95,42 +75,6 @@ type ExternalWalletAdapter = {
|
|
|
95
75
|
disconnect: () => Promise<void>;
|
|
96
76
|
};
|
|
97
77
|
|
|
98
|
-
/**
|
|
99
|
-
* A read-only quote for a swap as domain amounts: how much goes in, the
|
|
100
|
-
* protocol fee, and how much would come out. Derived from the raw
|
|
101
|
-
* {@link SwapPreview} the swap contract returns.
|
|
102
|
-
*/
|
|
103
|
-
type SwapQuote = {
|
|
104
|
-
inputTokenAmount: BlockchainAmount;
|
|
105
|
-
fee: BlockchainAmount;
|
|
106
|
-
outputTokenAmount: BlockchainAmount;
|
|
107
|
-
};
|
|
108
|
-
declare const SwapQuote: {
|
|
109
|
-
/**
|
|
110
|
-
* Assembles a {@link SwapQuote} from a raw contract {@link SwapPreview}. The
|
|
111
|
-
* input and fee are denominated in the input token; the output in the output
|
|
112
|
-
* token.
|
|
113
|
-
*/
|
|
114
|
-
fromPreview: (preview: SwapPreview, inputDecimals: AssetDecimals, outputDecimals: AssetDecimals) => SwapQuote;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
type FormattedAmountUi = Newtype<string, 'FormattedAmountUi'>;
|
|
118
|
-
declare const FormattedAmountUi: (value: string) => FormattedAmountUi;
|
|
119
|
-
type FormattedPercentUi = Newtype<string, 'FormattedPercentUi'>;
|
|
120
|
-
declare const FormattedPercentUi: (value: string) => FormattedPercentUi;
|
|
121
|
-
type TxExplorerUrl = Newtype<string, 'TxExplorerUrl'>;
|
|
122
|
-
declare const TxExplorerUrl: (value: string) => TxExplorerUrl;
|
|
123
|
-
/**
|
|
124
|
-
* A wallet address shortened for display (e.g. `0x1234…5678`). Keeps a
|
|
125
|
-
* `0x${string}` base but drops the runtime `0x` narrowing.
|
|
126
|
-
*/
|
|
127
|
-
type ShortenedWalletAddress = Newtype<`0x${string}`, 'ShortenedWalletAddress'>;
|
|
128
|
-
declare const ShortenedWalletAddress: (value: string) => ShortenedWalletAddress;
|
|
129
|
-
type FormattedAmountAssetUi = Newtype<string, 'FormattedAmountAssetUi'>;
|
|
130
|
-
declare const FormattedAmountAssetUi: (value: string) => FormattedAmountAssetUi;
|
|
131
|
-
type AssetIconUrl = Newtype<string, 'AssetIconUrl'>;
|
|
132
|
-
declare const AssetIconUrl: (value: string) => AssetIconUrl;
|
|
133
|
-
|
|
134
78
|
/**
|
|
135
79
|
* The wallets a screen reads for and acts from, supplied by the host.
|
|
136
80
|
*
|
|
@@ -156,6 +100,7 @@ type WalletSelection = {
|
|
|
156
100
|
*/
|
|
157
101
|
externalAdapter: ExternalWalletAdapter | null;
|
|
158
102
|
};
|
|
103
|
+
/** Operations over a {@link WalletSelection}. */
|
|
159
104
|
declare const WalletSelection: {
|
|
160
105
|
/**
|
|
161
106
|
* Every wallet in display order - embedded first, then the external one -
|
|
@@ -168,9 +113,28 @@ declare const WalletSelection: {
|
|
|
168
113
|
* Names a wallet for display, e.g. `'CoinList Wallet'` for the user's
|
|
169
114
|
* embedded one. `null` means it has no name, and the screen shows its
|
|
170
115
|
* shortened address instead.
|
|
116
|
+
*
|
|
117
|
+
* @alpha
|
|
171
118
|
*/
|
|
172
119
|
type WalletLabelResolver = (address: EvmWalletAddress) => string | null;
|
|
173
120
|
|
|
121
|
+
type FormattedAmountUi = Newtype<string, 'FormattedAmountUi'>;
|
|
122
|
+
declare const FormattedAmountUi: (value: string) => FormattedAmountUi;
|
|
123
|
+
type FormattedPercentUi = Newtype<string, 'FormattedPercentUi'>;
|
|
124
|
+
declare const FormattedPercentUi: (value: string) => FormattedPercentUi;
|
|
125
|
+
type TxExplorerUrl = Newtype<string, 'TxExplorerUrl'>;
|
|
126
|
+
declare const TxExplorerUrl: (value: string) => TxExplorerUrl;
|
|
127
|
+
/**
|
|
128
|
+
* A wallet address shortened for display (e.g. `0x1234…5678`). Keeps a
|
|
129
|
+
* `0x${string}` base but drops the runtime `0x` narrowing.
|
|
130
|
+
*/
|
|
131
|
+
type ShortenedWalletAddress = Newtype<`0x${string}`, 'ShortenedWalletAddress'>;
|
|
132
|
+
declare const ShortenedWalletAddress: (value: string) => ShortenedWalletAddress;
|
|
133
|
+
type FormattedAmountAssetUi = Newtype<string, 'FormattedAmountAssetUi'>;
|
|
134
|
+
declare const FormattedAmountAssetUi: (value: string) => FormattedAmountAssetUi;
|
|
135
|
+
type AssetIconUrl = Newtype<string, 'AssetIconUrl'>;
|
|
136
|
+
declare const AssetIconUrl: (value: string) => AssetIconUrl;
|
|
137
|
+
|
|
174
138
|
/**
|
|
175
139
|
* An array guaranteed to hold at least one element. Use it where an empty list
|
|
176
140
|
* would be a bug (e.g. the set of assets a swap always offers).
|
|
@@ -242,4 +206,4 @@ declare function offerDisplayTokens(offer: {
|
|
|
242
206
|
tokens: readonly OfferToken[];
|
|
243
207
|
}): OfferToken[];
|
|
244
208
|
|
|
245
|
-
export { AssetIconUrl as A, type BroadcastTxParams as B, type ConnectWallet as C, type EvmWallet as E, FormattedAmountAssetUi as F, type NonEmptyArray as N,
|
|
209
|
+
export { AssetIconUrl as A, type BroadcastTxParams as B, type ConnectWallet as C, type EvmWallet as E, FormattedAmountAssetUi as F, type NonEmptyArray as N, ShortenedWalletAddress as S, TxExplorerUrl as T, WalletSelection as W, type WalletLabelResolver as a, FormattedPercentUi as b, TokenRegistrySnapshot as c, FormattedAmountUi as d, type EvmSigner as e, type ExternalWalletAdapter as f, type TokenKey as g, type WriteContractParams as h, offerDisplayTokens as o };
|