@dynamic-labs/types 4.79.1 → 4.80.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/CHANGELOG.md CHANGED
@@ -1,4 +1,20 @@
1
1
 
2
+ ## [4.80.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.79.2...v4.80.0) (2026-05-05)
3
+
4
+
5
+ ### Features
6
+
7
+ * **aleo:** Aleo wallet connectors + send/shield token registries + UI transaction type ([#11101](https://github.com/dynamic-labs/dynamic-auth/issues/11101)) ([5478d9c](https://github.com/dynamic-labs/dynamic-auth/commit/5478d9c21ee065e2e6c8e96d37ab17b74c5aa0f8))
8
+ * **midnight:** add address query methods and getProvider to InjectedWalletBase ([#11082](https://github.com/dynamic-labs/dynamic-auth/issues/11082)) ([9b6a870](https://github.com/dynamic-labs/dynamic-auth/commit/9b6a8709f83d04673e9dbe23bb0caae5827b036c))
9
+ * **ton:** recognize v3R1/v3R2/v4 wallets in TonConnect proof verification ([#11130](https://github.com/dynamic-labs/dynamic-auth/issues/11130)) ([6c40ab1](https://github.com/dynamic-labs/dynamic-auth/commit/6c40ab11e56d56e278aeb5ee2ae982a42767b5cb))
10
+
11
+ ### [4.79.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.79.1...v4.79.2) (2026-05-04)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **react-native:** remove extra react-native turbo modules instructions ([#11126](https://github.com/dynamic-labs/dynamic-auth/issues/11126))
17
+
2
18
  ### [4.79.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.79.0...v4.79.1) (2026-05-01)
3
19
 
4
20
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.79.1";
6
+ var version = "4.80.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.79.1";
2
+ var version = "4.80.0";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/types",
3
- "version": "4.79.1",
3
+ "version": "4.80.0",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -18,8 +18,8 @@
18
18
  "./package.json": "./package.json"
19
19
  },
20
20
  "dependencies": {
21
- "@dynamic-labs/sdk-api-core": "0.0.956",
22
- "@dynamic-labs/assert-package-version": "4.79.1"
21
+ "@dynamic-labs/sdk-api-core": "0.0.964",
22
+ "@dynamic-labs/assert-package-version": "4.80.0"
23
23
  },
24
24
  "peerDependencies": {}
25
25
  }
@@ -1 +1 @@
1
- export type { IUITransaction, IUITransactionFormatOptions, TransactionReceipt, } from './transaction';
1
+ export type { IUITransaction, IUITransactionFormatOptions, RecordMergeAction, TransactionModeOption, TransactionReceipt, } from './transaction';
@@ -1,3 +1,4 @@
1
+ import type { TokenBalance } from '@dynamic-labs/sdk-api-core';
1
2
  /**
2
3
  * Generic type for a transaction to navigate through the different chains
3
4
  * for sending transaction with dynamic's UI
@@ -144,6 +145,100 @@ export interface IUITransaction {
144
145
  * For example, Stellar returns an error if sending < 1 XLM to an unfunded account.
145
146
  */
146
147
  getPreSubmitValidationError?: () => string | undefined;
148
+ /**
149
+ * Optional set of chain-specific transaction modes (e.g. Aleo's
150
+ * Individual / Exchange = private vs. public transfer). When provided,
151
+ * the widget's send form renders a segmented control below the recipient
152
+ * field; the user's selection is delivered back via [setTransactionMode].
153
+ *
154
+ * Other chains leave this undefined and the widget renders no toggle
155
+ * (current behaviour preserved).
156
+ */
157
+ transactionModes?: TransactionModeOption[];
158
+ /**
159
+ * The currently selected transaction mode id. The form reads this to
160
+ * highlight the active segment of the toggle. Mirror of [setTransactionMode]
161
+ * — the widget is the source of truth for selection, the transaction
162
+ * is the source of truth for behaviour at submit time.
163
+ */
164
+ selectedTransactionMode?: string;
165
+ /**
166
+ * Called by the widget when the user picks a mode in the segmented
167
+ * control. Implementations should update `selectedTransactionMode` and
168
+ * mutate any internal state that affects [submit] / [getRecordMergeAction].
169
+ */
170
+ setTransactionMode?: (modeId: string) => void;
171
+ /**
172
+ * Optional inline call-to-action surfaced on the form when the current
173
+ * (mode, amount, balance) state requires user remediation that the form
174
+ * itself can trigger — e.g. Aleo's "no single private record covers the
175
+ * amount; merge records first". Returning `undefined` hides the banner.
176
+ *
177
+ * The widget renders an alert showing `message` plus a button that
178
+ * invokes `onAction`; while the action is in-flight the form disables
179
+ * the submit button.
180
+ */
181
+ getRecordMergeAction?: () => RecordMergeAction | undefined;
182
+ /**
183
+ * Optional. Called by the send form whenever the amount input changes
184
+ * (on blur) so the transaction can keep any derived state — chiefly
185
+ * [getRecordMergeAction] — current with what the user has typed.
186
+ * Implementations should never throw on invalid input; they should
187
+ * either no-op or clear the derived state. The form already handles
188
+ * Yup validation separately.
189
+ */
190
+ setPendingAmount?: (amountInput: string) => void;
191
+ /**
192
+ * Optional. When provided, the SendBalanceView uses this list as the
193
+ * token picker's source AND for the "Available" balance display,
194
+ * instead of the default `useTokenBalances` (redcoast-backed) fetch.
195
+ *
196
+ * Useful for chains where the SPENDABLE balance differs from a public
197
+ * balance lookup. For example, Aleo always spends from private records
198
+ * during a Send, so the picker should reflect the user's shielded
199
+ * balance — not the public mapping value redcoast returns.
200
+ *
201
+ * Implementations should return `TokenBalance` entries shaped like
202
+ * what `useTokenBalances` would return (so the rest of the form
203
+ * renders unchanged): `address`, `name`, `symbol`, `decimals`,
204
+ * `balance` (display units, number) and `rawBalance` (atomic units,
205
+ * number) at minimum, plus optional `logoURI`, `isNative`, `price`.
206
+ *
207
+ * Resolves to `undefined` (or absent) → form falls back to the
208
+ * default fetcher and behaves as today for every other chain.
209
+ */
210
+ getSendableTokenBalances?: () => Promise<TokenBalance[] | undefined>;
211
+ /**
212
+ * Optional. Called by the send form whenever the user picks a different
213
+ * token in the picker, with the token's `address` (`contractAddress`).
214
+ * Implementations should update any per-token state that affects
215
+ * [submit], [getBalance], [getRecordMergeAction], or [parse]/[format]
216
+ * decimals. Used by chains where the picker entries map to materially
217
+ * different submit paths (e.g. Aleo: credits vs. stablecoin vs. ARC-21,
218
+ * each with its own program id and transition signature).
219
+ *
220
+ * Other chains leave this undefined; the form does not call it.
221
+ */
222
+ setSelectedToken?: (contractAddress: string) => void;
223
+ }
224
+ /** A single option rendered in the send form's transaction-mode toggle. */
225
+ export interface TransactionModeOption {
226
+ /** Stable id, returned by `setTransactionMode`. */
227
+ id: string;
228
+ /** User-facing label (e.g. "Individual"). */
229
+ label: string;
230
+ icon?: 'individual' | 'exchange';
231
+ /** When true, the segment renders disabled and is non-interactive. */
232
+ disabled?: boolean;
233
+ /** Optional tooltip explaining the disabled state. */
234
+ disabledReason?: string;
235
+ }
236
+ export interface RecordMergeAction {
237
+ /** Plain-text explanation of what's wrong. */
238
+ message: string;
239
+ /** Label for the action button (e.g. "Merge records"). */
240
+ actionLabel: string;
241
+ onAction: () => Promise<void>;
147
242
  }
148
243
  export interface IUITransactionFormatOptions {
149
244
  precision?: number;