@fluent.xyz/connect 0.6.3 → 0.7.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 -0
- package/dist/batchOperation-CIcgSRv5.d.ts +524 -0
- package/dist/fluent-connect.css +1 -1
- package/dist/index.d.ts +6 -507
- package/dist/index.js +197 -154
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +293 -0
- package/dist/internal.js +4781 -0
- package/dist/internal.js.map +1 -0
- package/docs/api.md +3 -3
- package/docs/concepts.md +5 -0
- package/docs/errors.md +7 -6
- package/docs/guides/transactions.md +8 -8
- package/docs/internal.md +109 -0
- package/docs/upgrading-0.5.md +40 -8
- package/package.json +5 -1
package/docs/api.md
CHANGED
|
@@ -631,7 +631,7 @@ export type FluentBatchOperation = {
|
|
|
631
631
|
| `calls` | `readonly FluentBatchCallInput[]` | no | no | The calls as the host passed them. |
|
|
632
632
|
| `encodedCalls` | `FluentEncodedBatchCall[]` | no | no | The same calls encoded, in order: what `execute()` sends. |
|
|
633
633
|
| `canExecute` | `boolean` | no | no | Whether the widget could send the operation when it was built: the Widget account ready, or able to prepare itself when `execute()` is called. Not updated afterwards; read `widget.account.executionReady` for the live value. |
|
|
634
|
-
| `execute` | `(options?: FluentBatchOperationExecuteOptions) => Promise<FluentExecuteResult>` | no | no | Executes the operation for the Widget account and resolves once it is included. **Throws** `FluentReviewRejectedError` with `code` `transaction_review_rejected` when the person dismisses the Review, which a Fluent ID shows in Prompt mode; an External wallet's refusal in its own prompt rejects with the wallet's error. **Throws** `FluentSponsorshipFallbackError` when a Fluent ID asked for Sponsorship, a sponsored submission failed, and the submission in which the account pays its own gas failed too; its `code` says why Sponsorship failed: `denied`, `unauthorized`, `unreachable` or `no_token`. A failure while waiting for an operation's inclusion is not wrapped: it rejects with its own error, and an operation whose wait failed was submitted. What else is not wrapped: [guides/sponsorship.md](guides/sponsorship.md#both-failed-fluentsponsorshipfallbackerror). **Throws** `FluentUserOperationGasError` (experimental) with `code` `invalid_policy` for a `skipEstimation` policy that cannot be used (other invalid `userOperationGas` values throw a plain `Error`), and `paymaster_gas_mismatch` when, with estimation skipped, the paymaster's authorization of a Gas token payment does not match the fixed gas limits. Under Sponsorship, a failed check of the paymaster's gas fails the sponsored submission instead, and the account pays its own gas. **Throws** `FluentGasPaymentError` when a Fluent ID's operation is paid in a Gas token and cannot be prepared; nothing has been signed or sent. Its `code` is `paymaster_unavailable` when the address of the paymaster to approve the Gas token to cannot be read, `insufficient_gas_token` when the
|
|
634
|
+
| `execute` | `(options?: FluentBatchOperationExecuteOptions) => Promise<FluentExecuteResult>` | no | no | Executes the operation for the Widget account and resolves once it is included. **Throws** `FluentReviewRejectedError` with `code` `transaction_review_rejected` when the person dismisses the Review, which a Fluent ID shows in Prompt mode; an External wallet's refusal in its own prompt rejects with the wallet's error. **Throws** `FluentSponsorshipFallbackError` when a Fluent ID asked for Sponsorship, a sponsored submission failed, and the submission in which the account pays its own gas failed too; its `code` says why Sponsorship failed: `denied`, `unauthorized`, `unreachable` or `no_token`. A failure while waiting for an operation's inclusion is not wrapped: it rejects with its own error, and an operation whose wait failed was submitted. What else is not wrapped: [guides/sponsorship.md](guides/sponsorship.md#both-failed-fluentsponsorshipfallbackerror). **Throws** `FluentUserOperationGasError` (experimental) with `code` `invalid_policy` for a `skipEstimation` policy that cannot be used (other invalid `userOperationGas` values throw a plain `Error`), and `paymaster_gas_mismatch` when, with estimation skipped, the paymaster's authorization of a Gas token payment does not match the fixed gas limits. Under Sponsorship, a failed check of the paymaster's gas fails the sponsored submission instead, and the account pays its own gas. **Throws** `FluentGasPaymentError` when a Fluent ID's operation is paid in a Gas token and cannot be prepared; nothing has been signed or sent. Its `code` is `paymaster_unavailable` when the address of the paymaster to approve the Gas token to cannot be read, `insufficient_gas_token` when the paymaster's simulation of the operation cannot charge the fee in the Gas token, and `paymaster_rejected` when the paymaster refuses to charge the fee in the Gas token for another reason. The account's balance of the Gas token is not read first: the operation may acquire the fee itself. |
|
|
635
635
|
|
|
636
636
|
### `FluentBatchOperationExecuteOptions`
|
|
637
637
|
|
|
@@ -1147,8 +1147,8 @@ export class FluentGasPaymentError extends Error {
|
|
|
1147
1147
|
Why a `FluentGasPaymentError` was thrown. `paymaster_unavailable`: the request for the address
|
|
1148
1148
|
of the paymaster that charges Gas tokens on the operation's Network failed, or its answer held
|
|
1149
1149
|
no address, so the widget has no spender to approve the Gas token to.
|
|
1150
|
-
`insufficient_gas_token`: the
|
|
1151
|
-
|
|
1150
|
+
`insufficient_gas_token`: the paymaster's simulation of the operation could not charge the fee
|
|
1151
|
+
in the Gas token, the account's balance of it not covering the fee.
|
|
1152
1152
|
`paymaster_rejected`: the paymaster refused to charge the fee in the Gas token for another
|
|
1153
1153
|
reason. Keep a `default` branch in a `switch` over it: a later release may add a code.
|
|
1154
1154
|
|
package/docs/concepts.md
CHANGED
|
@@ -91,6 +91,11 @@ account swaps what landed, on Fluent, through FluxFlow. The user signs the bridg
|
|
|
91
91
|
alone; once the deposit lands, the swap is priced and sent without a second
|
|
92
92
|
press, from whichever drawer page the user is on.
|
|
93
93
|
|
|
94
|
+
The page connects the External wallet that holds the funds by itself, on both
|
|
95
|
+
networks. A desktop browser offers the wallet extensions it announces; a phone
|
|
96
|
+
offers MetaMask, Trust Wallet and Rainbow, each opened through a link that
|
|
97
|
+
carries the WalletConnect pairing.
|
|
98
|
+
|
|
94
99
|
Five consequences reach your integration:
|
|
95
100
|
|
|
96
101
|
- **The swap is an operation from the smart account**, like a Send: it uses the
|
package/docs/errors.md
CHANGED
|
@@ -206,11 +206,12 @@ measured.
|
|
|
206
206
|
|
|
207
207
|
A Fluent ID's Batch operation paid in a Gas token could not be prepared. Before the operation is
|
|
208
208
|
signed, the widget reads the address of the paymaster that charges Gas tokens, because the
|
|
209
|
-
approval it may add to the operation names that paymaster as the spender
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
209
|
+
approval it may add to the operation names that paymaster as the spender, and it asks the
|
|
210
|
+
paymaster to charge the fee in the token. It throws before any signature is requested and before
|
|
211
|
+
anything is sent. The widget does not read the account's balance of the Gas token first: an
|
|
212
|
+
operation may acquire the fee itself, such as a swap into the Gas token, and only the paymaster's
|
|
213
|
+
simulation of the operation decides whether the fee can be charged. `cause` holds the error of the
|
|
214
|
+
failed request when there was one,
|
|
214
215
|
and `message` names the Gas token for `insufficient_gas_token` and `paymaster_rejected`. An
|
|
215
216
|
External wallet pays its own gas and an operation paid in ETH has no Gas token, so neither throws
|
|
216
217
|
it.
|
|
@@ -218,7 +219,7 @@ it.
|
|
|
218
219
|
| `code` | Thrown by | What it means | What to do |
|
|
219
220
|
|---|---|---|---|
|
|
220
221
|
| `paymaster_unavailable` | `execute()` | The request for the paymaster's address on the operation's Network failed, or its answer held no address, so the widget has no spender to approve the Gas token to. | Try again later, or pay in ETH (`gasPayment: { symbol: "ETH" }`). |
|
|
221
|
-
| `insufficient_gas_token` | `execute()` | The
|
|
222
|
+
| `insufficient_gas_token` | `execute()` | The paymaster's simulation of the operation could not charge the fee in the Gas token. | Ask the person to pay the fee in ETH (`gasPayment: { symbol: "ETH" }`) or to add more of the Gas token, then send the operation again. The widget's own flows say "Not enough {symbol} to pay the network fee. Pay the fee in ETH or add {symbol}." |
|
|
222
223
|
| `paymaster_rejected` | `execute()` | The paymaster refused to charge the fee in the Gas token for another reason; `cause` holds its answer. | Pay in ETH (`gasPayment: { symbol: "ETH" }`) or try again later; report `cause` if it persists. |
|
|
223
224
|
|
|
224
225
|
## `FluentUserOperationGasError`
|
|
@@ -180,14 +180,14 @@ allowance the widget cannot read counts as none, and when ZeroDev cannot name th
|
|
|
180
180
|
amount instead, whatever the allowance. The Review lists the operation's own calls, not the
|
|
181
181
|
approval, and an operation paid in ETH or sent by an External wallet gets none.
|
|
182
182
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
`
|
|
187
|
-
|
|
188
|
-
signed or sent in either case: offer the person the fee in
|
|
189
|
-
or ask them to add more of the token.
|
|
190
|
-
|
|
183
|
+
The widget does not read the account's balance of the Gas token before sending: an operation may
|
|
184
|
+
acquire the fee itself, such as a swap into the Gas token from a balance of 0, and the paymaster's
|
|
185
|
+
simulation of the operation decides. When that simulation cannot charge the fee in the token,
|
|
186
|
+
`execute()` rejects with a `FluentGasPaymentError` whose `code` is `insufficient_gas_token` and
|
|
187
|
+
whose `message` names the token; any other refusal by the paymaster rejects with `code`
|
|
188
|
+
`paymaster_rejected`. Nothing has been signed or sent in either case: offer the person the fee in
|
|
189
|
+
ETH (`gasPayment: { symbol: "ETH" }`) or ask them to add more of the token. The full list is in
|
|
190
|
+
[errors.md](../errors.md#fluentgaspaymenterror).
|
|
191
191
|
|
|
192
192
|
Gas limits can be fixed by hand with the experimental `userOperationGas` option
|
|
193
193
|
([experimental.md](../experimental.md#useroperationgas)); leaving it out lets the widget
|
package/docs/internal.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Internal entry
|
|
2
|
+
|
|
3
|
+
> **Nothing on this page is promised.** `@fluent.xyz/connect/internal` is the Internal entry:
|
|
4
|
+
> the helpers the widget is built from, importable by name. Any of them may change or go in any
|
|
5
|
+
> release, a patch included, and none is in [api.md](api.md). The root entry,
|
|
6
|
+
> `@fluent.xyz/connect`, is what is kept after 0.6.0; [experimental.md](experimental.md) says
|
|
7
|
+
> which of its names may still change. Import from here only where you can read this page at
|
|
8
|
+
> every upgrade.
|
|
9
|
+
|
|
10
|
+
The entry exists so that an App which needs the widget's own helpers, such as a wallet
|
|
11
|
+
dashboard that reads balances or builds a transfer without the widget's Send form, imports them
|
|
12
|
+
instead of copying their source, which drifts from the SDK silently. A name an App comes to rely
|
|
13
|
+
on is moved to the root entry, where it becomes a promise; ask for it.
|
|
14
|
+
|
|
15
|
+
| Name | What it is |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `fluentTestnetTokenDefaults`, `fluentMainnetTokenDefaults`, `getFluentTokenDefaultsForNetwork` | The Default tokens of a Network, by symbol. |
|
|
18
|
+
| `getFluentDefaultWidgetDisplayTokens` | The Default tokens in the order the widget shows them. |
|
|
19
|
+
| `isFluentNativeToken`, `fluentTokenIdentity` | Whether a token is the chain's own currency; a token's Token identity. |
|
|
20
|
+
| `readFluentTokenBalances`, `FluentTokenBalance` | One account's balance of each token, read through a viem public client. |
|
|
21
|
+
| `FluentTokenDefinition` | The widget's own token shape, with `native` and `gasPriority`; see below. |
|
|
22
|
+
| `parseFluentTransferRecipient`, `parseFluentTransferAmount`, `FluentTransferRecipient`, `FluentTransferAmount` | The validation of the widget's Send form: a recipient, an amount. |
|
|
23
|
+
| `buildFluentTransferCall`, `fluentTransferAbi` | The one call of a Batch operation that moves a token, and the ERC-20 ABI it encodes with. |
|
|
24
|
+
| `isFaucetNetwork`, `getFluentExplorerBaseUrl` | Whether a Network has a faucet; its block explorer URL. |
|
|
25
|
+
| `normalizeFluentWidgetNetwork` | The Network an App's own setting names (`"prod"`, `"Development"`, …), or `undefined`; the widget reads no environment variable, so the App passes the result as `network`. |
|
|
26
|
+
| `createFluentFamiliesClient`, `FluentFamilies`, `FluentFamily`, `FluentFamilyTier`, `FluentFamilyType`, `FluentFamiliesClient`, `FluentFamiliesClientConfig` | A client of the service's families endpoint, read by the person's Privy DID. |
|
|
27
|
+
| `buildFluentBridgeUrl` | The portal bridge URL with a recipient, for an App that links out to the bridge. |
|
|
28
|
+
|
|
29
|
+
## Two `FluentTokenDefinition`s
|
|
30
|
+
|
|
31
|
+
The root entry's `FluentTokenDefinition` is an Integrator token: what an App passes in `tokens`,
|
|
32
|
+
with no `native` and no `gasPriority`, because the widget grants neither to a token it did not
|
|
33
|
+
declare itself. The Internal entry's `FluentTokenDefinition` is a Default token as the widget
|
|
34
|
+
declares it, and carries both; the helpers above take and return that one. An App that imports
|
|
35
|
+
both renames one:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import type { FluentTokenDefinition } from "@fluent.xyz/connect";
|
|
39
|
+
import type { FluentTokenDefinition as FluentDefaultToken } from "@fluent.xyz/connect/internal";
|
|
40
|
+
|
|
41
|
+
export function isNative(token: FluentDefaultToken): boolean {
|
|
42
|
+
return token.native === true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function integratorToken(token: FluentDefaultToken): FluentTokenDefinition {
|
|
46
|
+
const { native: _native, gasPriority: _gasPriority, ...rest } = token;
|
|
47
|
+
return rest;
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Reading balances
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { createPublicClient, http, type Address } from "viem";
|
|
55
|
+
import { fluentTestnet } from "@fluent.xyz/connect";
|
|
56
|
+
import {
|
|
57
|
+
getFluentDefaultWidgetDisplayTokens,
|
|
58
|
+
readFluentTokenBalances,
|
|
59
|
+
} from "@fluent.xyz/connect/internal";
|
|
60
|
+
|
|
61
|
+
const client = createPublicClient({ chain: fluentTestnet, transport: http() });
|
|
62
|
+
|
|
63
|
+
export async function balancesOf(account: Address) {
|
|
64
|
+
const balances = await readFluentTokenBalances({
|
|
65
|
+
client,
|
|
66
|
+
account,
|
|
67
|
+
tokens: getFluentDefaultWidgetDisplayTokens("testnet"),
|
|
68
|
+
});
|
|
69
|
+
return balances.filter((balance) => balance.status === "ready");
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Building a transfer
|
|
74
|
+
|
|
75
|
+
The call goes to the Widget API's `execute()` like any other; the widget's Send form does the
|
|
76
|
+
same.
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
import type { FluentBatchCallInput } from "@fluent.xyz/connect";
|
|
80
|
+
import {
|
|
81
|
+
buildFluentTransferCall,
|
|
82
|
+
fluentMainnetTokenDefaults,
|
|
83
|
+
parseFluentTransferAmount,
|
|
84
|
+
parseFluentTransferRecipient,
|
|
85
|
+
} from "@fluent.xyz/connect/internal";
|
|
86
|
+
|
|
87
|
+
export function transferCall(params: {
|
|
88
|
+
from: `0x${string}`;
|
|
89
|
+
to: string;
|
|
90
|
+
amount: string;
|
|
91
|
+
balance: bigint;
|
|
92
|
+
}): FluentBatchCallInput | string {
|
|
93
|
+
const token = fluentMainnetTokenDefaults.BLEND;
|
|
94
|
+
const recipient = parseFluentTransferRecipient({
|
|
95
|
+
input: params.to,
|
|
96
|
+
self: params.from,
|
|
97
|
+
contracts: new Set([token.address.toLowerCase()]),
|
|
98
|
+
});
|
|
99
|
+
if (recipient.status !== "ok") return recipient.status === "empty" ? "" : recipient.message;
|
|
100
|
+
const amount = parseFluentTransferAmount({
|
|
101
|
+
input: params.amount,
|
|
102
|
+
symbol: token.symbol,
|
|
103
|
+
decimals: token.decimals,
|
|
104
|
+
balance: params.balance,
|
|
105
|
+
});
|
|
106
|
+
if (amount.status !== "ok") return amount.status === "empty" ? "" : amount.message;
|
|
107
|
+
return buildFluentTransferCall({ token, to: recipient.address, amount: amount.raw });
|
|
108
|
+
}
|
|
109
|
+
```
|
package/docs/upgrading-0.5.md
CHANGED
|
@@ -165,7 +165,8 @@ export function chainDefinitionOf(network: FluentWidgetNetwork) {
|
|
|
165
165
|
#### Recipe: `getFluentExplorerBaseUrl`
|
|
166
166
|
|
|
167
167
|
0.5's `getFluentExplorerBaseUrl(network)` was this expression. Like it, it returns testnet's
|
|
168
|
-
explorer for any value other than `"mainnet"`.
|
|
168
|
+
explorer for any value other than `"mainnet"`. The Internal entry exports the function itself
|
|
169
|
+
([Recipe: the Internal entry](#recipe-the-internal-entry)).
|
|
169
170
|
|
|
170
171
|
```ts
|
|
171
172
|
import { getFluentChainForNetwork, type FluentWidgetNetwork } from "@fluent.xyz/connect";
|
|
@@ -179,9 +180,10 @@ export function explorerBaseUrlOf(network: FluentWidgetNetwork): string | undefi
|
|
|
179
180
|
|
|
180
181
|
| Removed | Kind | Use instead |
|
|
181
182
|
|---|---|---|
|
|
182
|
-
| `normalizeFluentWidgetNetwork` |
|
|
183
|
+
| `normalizeFluentWidgetNetwork` | recipe | [Recipe: the Internal entry](#recipe-the-internal-entry) |
|
|
183
184
|
| `resolveFluentWidgetNetworkFromEnv` | none | The widget reads no environment variable; the App passes `network`. |
|
|
184
|
-
| `FluentWidgetNetworkProvider`, `useFluentWidgetNetwork
|
|
185
|
+
| `FluentWidgetNetworkProvider`, `useFluentWidgetNetwork` | none | Internal: the App passes `network` itself, so it already knows it. |
|
|
186
|
+
| `isFaucetNetwork` | recipe | [Recipe: the Internal entry](#recipe-the-internal-entry) |
|
|
185
187
|
| `ResolvedFluentWidgetConfig`, `ResolvedFluentWidgetExecution` | none | There is no public resolved config. |
|
|
186
188
|
| `FLUENT_CONNECT_DEFAULT_ASSETS` | none | The widget's default images are internal. |
|
|
187
189
|
|
|
@@ -198,16 +200,45 @@ export function explorerBaseUrlOf(network: FluentWidgetNetwork): string | undefi
|
|
|
198
200
|
|
|
199
201
|
| Removed | Kind | Use instead |
|
|
200
202
|
|---|---|---|
|
|
201
|
-
| `fluent`, `createFluentClient`, `FluentClient`, `FluentClientConfig
|
|
203
|
+
| `fluent`, `createFluentClient`, `FluentClient`, `FluentClientConfig` | none | The feature is removed: the standalone client. |
|
|
204
|
+
| `createFluentFamiliesClient`, `FluentFamilies`, `FluentFamiliesClient`, `FluentFamiliesClientConfig`, `FluentFamily`, `FluentFamilyTier`, `FluentFamilyType` | recipe | [Recipe: the Internal entry](#recipe-the-internal-entry) |
|
|
202
205
|
|
|
203
206
|
### Tokens and balances
|
|
204
207
|
|
|
205
208
|
| Removed | Kind | Use instead |
|
|
206
209
|
|---|---|---|
|
|
207
|
-
| `
|
|
208
|
-
| `
|
|
210
|
+
| `getFluentTokenDefaults`, `getFluentDefaultWidgetGasTokens`, `isFluentDefaultToken`, `mergeFluentDisplayTokens`, `findFluentSymbolCollisions` | none | The widget does this itself: it lists its Default tokens beside the App's `tokens`. |
|
|
211
|
+
| `fluentMainnetTokenDefaults`, `fluentTestnetTokenDefaults`, `getFluentTokenDefaultsForNetwork`, `getFluentDefaultWidgetDisplayTokens`, `isFluentNativeToken`, `fluentTokenIdentity` | recipe | [Recipe: the Internal entry](#recipe-the-internal-entry) |
|
|
212
|
+
| `readFluentTokenMetadata` | none | The widget reads balances itself; `refreshBalances` refetches them. |
|
|
213
|
+
| `readFluentTokenBalances`, `FluentTokenBalance` | recipe | [Recipe: the Internal entry](#recipe-the-internal-entry) |
|
|
209
214
|
| `FLUENT_USER_TOKEN_LIMIT`, `createFluentUserTokenStore`, `createFluentBackendUserTokenStore`, `useFluentUserTokens`, `UserTokenStore`, `BackendUserTokenStore`, `FluentUserTokenAddResult` | none | The widget keeps the person's User tokens itself. |
|
|
210
215
|
|
|
216
|
+
#### Recipe: the Internal entry
|
|
217
|
+
|
|
218
|
+
Every row that points here names a helper 0.6.0 removed from the root entry and the package
|
|
219
|
+
publishes again, promised nothing, as the Internal entry, `@fluent.xyz/connect/internal`
|
|
220
|
+
([internal.md](internal.md)): the name is the same, so the import path is all that changes. A
|
|
221
|
+
name there may change or go in any release; read that page at every upgrade.
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
import { createPublicClient, http, type Address } from "viem";
|
|
225
|
+
import { fluentTestnet } from "@fluent.xyz/connect";
|
|
226
|
+
import {
|
|
227
|
+
getFluentDefaultWidgetDisplayTokens,
|
|
228
|
+
readFluentTokenBalances,
|
|
229
|
+
} from "@fluent.xyz/connect/internal";
|
|
230
|
+
|
|
231
|
+
const client = createPublicClient({ chain: fluentTestnet, transport: http() });
|
|
232
|
+
|
|
233
|
+
export function balancesOf(account: Address) {
|
|
234
|
+
return readFluentTokenBalances({
|
|
235
|
+
client,
|
|
236
|
+
account,
|
|
237
|
+
tokens: getFluentDefaultWidgetDisplayTokens("testnet"),
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
211
242
|
### Gas payment
|
|
212
243
|
|
|
213
244
|
| Removed | Kind | Use instead |
|
|
@@ -219,7 +250,8 @@ export function explorerBaseUrlOf(network: FluentWidgetNetwork): string | undefi
|
|
|
219
250
|
|
|
220
251
|
| Removed | Kind | Use instead |
|
|
221
252
|
|---|---|---|
|
|
222
|
-
| `
|
|
253
|
+
| `checkFluentTransferFee`, `FluentTokenTransferOutcome`, `FluentTokenTransferRequest`, `FluentTokenTransferSender`, `FluentTransferFee` | none | Internal to the widget's Send form. |
|
|
254
|
+
| `buildFluentTransferCall`, `fluentTransferAbi`, `parseFluentTransferAmount`, `parseFluentTransferRecipient`, `FluentTransferAmount`, `FluentTransferRecipient` | recipe | [Recipe: the Internal entry](#recipe-the-internal-entry) |
|
|
223
255
|
|
|
224
256
|
### User settings
|
|
225
257
|
|
|
@@ -301,7 +333,7 @@ export function signingModeOf(confirmation: "always" | "session"): FluentSigning
|
|
|
301
333
|
|
|
302
334
|
| Member | Kind | Use instead |
|
|
303
335
|
|---|---|---|
|
|
304
|
-
| `FluentTokenDefinition.gasPriority`, `FluentTokenDefinition.native` | none | The widget already ignored both on a token the App passed: only a Default token can be a Gas token or the chain's own currency. |
|
|
336
|
+
| `FluentTokenDefinition.gasPriority`, `FluentTokenDefinition.native` | none | The widget already ignored both on a token the App passed: only a Default token can be a Gas token or the chain's own currency. The Internal entry's `FluentTokenDefinition`, the Default token's shape, keeps both ([internal.md](internal.md#two-fluenttokendefinitions)). |
|
|
305
337
|
|
|
306
338
|
### `FluentWidgetAccount`
|
|
307
339
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluent.xyz/connect",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Fluent Connect React widget \u2014 Privy login, ZeroDev smart account, batch operations, and wallet UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,6 +41,10 @@
|
|
|
41
41
|
"types": "./dist/index.d.ts",
|
|
42
42
|
"import": "./dist/index.js"
|
|
43
43
|
},
|
|
44
|
+
"./internal": {
|
|
45
|
+
"types": "./dist/internal.d.ts",
|
|
46
|
+
"import": "./dist/internal.js"
|
|
47
|
+
},
|
|
44
48
|
"./styles.css": "./dist/fluent-connect.css",
|
|
45
49
|
"./package.json": "./package.json"
|
|
46
50
|
},
|