@coinlist-co/react 0.12.2-rc.31c2f50 → 0.12.2-rc.3de3751
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-NBO5E2RO.js → chunk-HMLWCXAP.js} +1329 -945
- package/dist/chunk-HMLWCXAP.js.map +1 -0
- package/dist/{chunk-4IZ2F732.js → chunk-L7SVKXXW.js} +10 -10
- package/dist/chunk-L7SVKXXW.js.map +1 -0
- package/dist/chunk-MJ6YXZWH.js +22 -0
- package/dist/chunk-MJ6YXZWH.js.map +1 -0
- package/dist/{chunk-UJYSXXJF.js → chunk-RLOYYAMO.js} +193 -364
- package/dist/chunk-RLOYYAMO.js.map +1 -0
- package/dist/client/index.d.ts +3302 -4561
- package/dist/client/index.js +9396 -7549
- package/dist/client/index.js.map +1 -1
- package/dist/server/index.d.ts +7 -33
- package/dist/server/index.js +8 -4
- package/dist/server/index.js.map +1 -1
- package/dist/{tokens-namespace-D_XSpiS-.d.ts → time-DkU7jivQ.d.ts} +2179 -2906
- package/dist/{token-registry-snapshot-BsAfBL_b.d.ts → token-registry-snapshot-D0OWXMe4.d.ts} +62 -34
- package/dist/universal/index.d.ts +84 -1337
- package/dist/universal/index.js +39 -47
- package/package.json +18 -14
- package/dist/chunk-4IZ2F732.js.map +0 -1
- package/dist/chunk-NBO5E2RO.js.map +0 -1
- package/dist/chunk-UJYSXXJF.js.map +0 -1
- package/dist/client/index.cjs +0 -17133
- package/dist/client/index.cjs.map +0 -1
- package/dist/client/index.d.cts +0 -6671
- package/dist/server/index.cjs +0 -4269
- package/dist/server/index.cjs.map +0 -1
- package/dist/server/index.d.cts +0 -378
- package/dist/time-CFocgYyl.d.cts +0 -50
- package/dist/time-DvgN98Q9.d.ts +0 -50
- package/dist/token-registry-snapshot-Cc_eA5zM.d.cts +0 -181
- package/dist/tokens-namespace-D_XSpiS-.d.cts +0 -3436
- package/dist/universal/index.cjs +0 -4321
- package/dist/universal/index.cjs.map +0 -1
- package/dist/universal/index.d.cts +0 -1629
package/dist/{token-registry-snapshot-BsAfBL_b.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}`;
|
|
@@ -70,25 +50,73 @@ interface EvmWallet extends EvmSigner {
|
|
|
70
50
|
type ConnectWallet = EvmSigner & {
|
|
71
51
|
readonly chain: EthereumChain;
|
|
72
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* The host's connector for an external wallet, as two lambdas: one opens it,
|
|
55
|
+
* one tears the connection down. The SDK ships no wallet stack, so this is how
|
|
56
|
+
* a screen offers "Connect wallet" without knowing whether AppKit, Privy or the
|
|
57
|
+
* host's own modal is behind it.
|
|
58
|
+
*
|
|
59
|
+
* One product type rather than two optional lambdas, because they come as a
|
|
60
|
+
* pair: a screen that can connect a wallet must be able to let it go again,
|
|
61
|
+
* and a host that supports neither passes `null` for the whole adapter, which
|
|
62
|
+
* hides the connect affordance entirely.
|
|
63
|
+
*/
|
|
64
|
+
type ExternalWalletAdapter = {
|
|
65
|
+
/**
|
|
66
|
+
* Opens the host's wallet connector. Resolves once the attempt finishes; the
|
|
67
|
+
* SDK reads the outcome from the external wallet it is handed on the next
|
|
68
|
+
* render rather than from a return value, so a host that connects through a
|
|
69
|
+
* redirect still works.
|
|
70
|
+
*
|
|
71
|
+
* Rejecting is how a declined or failed connection is reported.
|
|
72
|
+
*/
|
|
73
|
+
connect: () => Promise<void>;
|
|
74
|
+
/** Disconnects the external wallet. Resolves when it is gone. */
|
|
75
|
+
disconnect: () => Promise<void>;
|
|
76
|
+
};
|
|
73
77
|
|
|
74
78
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
79
|
+
* The wallets a screen reads for and acts from, supplied by the host.
|
|
80
|
+
*
|
|
81
|
+
* The SDK ships no wallet stack, so wallet discovery and connection are
|
|
82
|
+
* inverted onto the host: it hands over ready {@link EvmWallet}s, and an
|
|
83
|
+
* adapter for connecting an external one when it supports that. Every wallet
|
|
84
|
+
* here is one that can sign for itself, so a screen can broadcast from the
|
|
85
|
+
* wallet that holds a position.
|
|
78
86
|
*/
|
|
79
|
-
type
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
type WalletSelection = {
|
|
88
|
+
/**
|
|
89
|
+
* The user's embedded (custodial) wallets, in display order. Empty when
|
|
90
|
+
* they have none, which is a normal state, not an error.
|
|
91
|
+
*/
|
|
92
|
+
embedded: EvmWallet[];
|
|
93
|
+
/** The connected external wallet, or `null` while none is connected. */
|
|
94
|
+
external: EvmWallet | null;
|
|
95
|
+
/**
|
|
96
|
+
* The host's external-wallet connector, or `null` when it offers none - in
|
|
97
|
+
* which case the screen shows no connect affordance at all. A host may
|
|
98
|
+
* still pass a connected `external` without one, to show a wallet the user
|
|
99
|
+
* cannot change from here.
|
|
100
|
+
*/
|
|
101
|
+
externalAdapter: ExternalWalletAdapter | null;
|
|
83
102
|
};
|
|
84
|
-
|
|
103
|
+
/** Operations over a {@link WalletSelection}. */
|
|
104
|
+
declare const WalletSelection: {
|
|
85
105
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
106
|
+
* Every wallet in display order - embedded first, then the external one -
|
|
107
|
+
* each address once. Addresses compare case-insensitively, so a host that
|
|
108
|
+
* hands the same wallet over as both embedded and external sees it once.
|
|
89
109
|
*/
|
|
90
|
-
|
|
110
|
+
all: (selection: WalletSelection) => EvmWallet[];
|
|
91
111
|
};
|
|
112
|
+
/**
|
|
113
|
+
* Names a wallet for display, e.g. `'CoinList Wallet'` for the user's
|
|
114
|
+
* embedded one. `null` means it has no name, and the screen shows its
|
|
115
|
+
* shortened address instead.
|
|
116
|
+
*
|
|
117
|
+
* @alpha
|
|
118
|
+
*/
|
|
119
|
+
type WalletLabelResolver = (address: EvmWalletAddress) => string | null;
|
|
92
120
|
|
|
93
121
|
type FormattedAmountUi = Newtype<string, 'FormattedAmountUi'>;
|
|
94
122
|
declare const FormattedAmountUi: (value: string) => FormattedAmountUi;
|
|
@@ -178,4 +206,4 @@ declare function offerDisplayTokens(offer: {
|
|
|
178
206
|
tokens: readonly OfferToken[];
|
|
179
207
|
}): OfferToken[];
|
|
180
208
|
|
|
181
|
-
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 };
|