@dynamic-labs/ethereum-gasless-core 4.84.1 → 4.86.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 +30 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +2 -2
- package/src/lib/relaySponsoredTransaction/relaySponsoredTransaction.cjs +1 -0
- package/src/lib/relaySponsoredTransaction/relaySponsoredTransaction.d.ts +6 -0
- package/src/lib/relaySponsoredTransaction/relaySponsoredTransaction.js +1 -0
- package/src/lib/sendSponsoredTransaction/sendSponsoredTransaction.d.ts +6 -0
- package/src/lib/signSponsoredTransaction/signSponsoredTransaction.cjs +2 -2
- package/src/lib/signSponsoredTransaction/signSponsoredTransaction.d.ts +10 -1
- package/src/lib/signSponsoredTransaction/signSponsoredTransaction.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,34 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.86.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.85.0...v4.86.0) (2026-06-01)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add support to new MetaMask SDK ([#11056](https://github.com/dynamic-labs/dynamic-auth/issues/11056)) ([8a6c973](https://github.com/dynamic-labs/dynamic-auth/commit/8a6c973876207256c06b04f6a16454f07446393d))
|
|
8
|
+
* **ethereum-gasless:** expose optional nonce on sign/send/relay ([#11422](https://github.com/dynamic-labs/dynamic-auth/issues/11422)) ([d2d074e](https://github.com/dynamic-labs/dynamic-auth/commit/d2d074ebe82452990281eba14a73f52a0af1e98b))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **sdk-react-core:** retry auto wallet creation on transient failures before erroring ([#11408](https://github.com/dynamic-labs/dynamic-auth/issues/11408)) ([8175460](https://github.com/dynamic-labs/dynamic-auth/commit/8175460bdee6f041ead0ea3f020cfd2168683239)), closes [#11399](https://github.com/dynamic-labs/dynamic-auth/issues/11399) [forward-mpc-client#286](https://github.com/dynamic-labs/forward-mpc-client/issues/286) [#11396](https://github.com/dynamic-labs/dynamic-auth/issues/11396)
|
|
14
|
+
|
|
15
|
+
## [4.85.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.84.1...v4.85.0) (2026-05-29)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **moonpay:** add getMoonPayCurrencies API, MOONPAY_PROVIDER_ID, and chain enum fix ([#11362](https://github.com/dynamic-labs/dynamic-auth/issues/11362)) ([8f1c841](https://github.com/dynamic-labs/dynamic-auth/commit/8f1c841dcab3249e82a7152be373c0e0204a2f47))
|
|
21
|
+
* **sdk-react-core:** extend usePrivateTokenBalances with `accountAddress`, `tokenAddresses`, `includeNativeBalance`, `includeFiat` ([#11380](https://github.com/dynamic-labs/dynamic-auth/issues/11380)) ([ccb6d47](https://github.com/dynamic-labs/dynamic-auth/commit/ccb6d47b4683a12a13aaf8311ecffae3d46464a3))
|
|
22
|
+
* **sdk-react-core:** forward `chainName` + `networkId` through `usePrivateTokenBalances` ([#11383](https://github.com/dynamic-labs/dynamic-auth/issues/11383)) ([c2ad110](https://github.com/dynamic-labs/dynamic-auth/commit/c2ad1103d4d4fdba67fc9b50b60945a843adae99))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **aleo:** drop optimistically deducted unshielded rows when balance hits zero ([#11371](https://github.com/dynamic-labs/dynamic-auth/issues/11371)) ([a3bb8e8](https://github.com/dynamic-labs/dynamic-auth/commit/a3bb8e8fa7e877340c829c991ba31eeb8fa4fcf1)), closes [#11337](https://github.com/dynamic-labs/dynamic-auth/issues/11337)
|
|
28
|
+
* **aleo:** re-read gas sponsored flag after async fetchFee resolves ([#11375](https://github.com/dynamic-labs/dynamic-auth/issues/11375)) ([d27e74a](https://github.com/dynamic-labs/dynamic-auth/commit/d27e74a309aff18eb6b18046fe34e9e64363d331))
|
|
29
|
+
* remediate high-severity dependency vulnerabilities ([#11339](https://github.com/dynamic-labs/dynamic-auth/issues/11339)) ([f025b30](https://github.com/dynamic-labs/dynamic-auth/commit/f025b308e29153de49c88d91233139bb00caaf4e))
|
|
30
|
+
* **waas:** guard upgradeToDynamicWaas on the wallet arg, not primaryWallet ([#11324](https://github.com/dynamic-labs/dynamic-auth/issues/11324)) ([3e95eaf](https://github.com/dynamic-labs/dynamic-auth/commit/3e95eaf50afd2f49ff1cc416e5bf211ee04fbb23))
|
|
31
|
+
|
|
2
32
|
### [4.84.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.84.0...v4.84.1) (2026-05-28)
|
|
3
33
|
|
|
4
34
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum-gasless-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.86.0",
|
|
4
4
|
"main": "./src/index.cjs",
|
|
5
5
|
"module": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@dynamic-labs/sdk-api-core": "0.0.985",
|
|
18
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
18
|
+
"@dynamic-labs/assert-package-version": "4.86.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"viem": "^2.45.3"
|
|
@@ -23,6 +23,7 @@ const relaySponsoredTransaction = async (params, deps) => {
|
|
|
23
23
|
authorization: params.authorization,
|
|
24
24
|
autoDelegate: params.autoDelegate,
|
|
25
25
|
calls: params.calls,
|
|
26
|
+
nonce: params.nonce,
|
|
26
27
|
validForSeconds: params.validForSeconds ?? constants.DEFAULT_VALID_FOR_SECONDS,
|
|
27
28
|
}, deps);
|
|
28
29
|
let data;
|
|
@@ -7,6 +7,12 @@ type RelayWithCallsParams = {
|
|
|
7
7
|
autoDelegate?: boolean;
|
|
8
8
|
/** The batch of calls to execute. */
|
|
9
9
|
calls: SponsoredTransactionCall[];
|
|
10
|
+
/**
|
|
11
|
+
* Optional bitmap nonce to sign the intent with. When provided, nonce
|
|
12
|
+
* generation (and its on-chain check) is skipped and the supplied value is
|
|
13
|
+
* used as-is. Useful for mutually-exclusive / cancel-replace intents.
|
|
14
|
+
*/
|
|
15
|
+
nonce?: bigint;
|
|
10
16
|
/** How long the signed intent remains valid, in seconds. Defaults to 600. */
|
|
11
17
|
validForSeconds?: number;
|
|
12
18
|
};
|
|
@@ -19,6 +19,7 @@ const relaySponsoredTransaction = async (params, deps) => {
|
|
|
19
19
|
authorization: params.authorization,
|
|
20
20
|
autoDelegate: params.autoDelegate,
|
|
21
21
|
calls: params.calls,
|
|
22
|
+
nonce: params.nonce,
|
|
22
23
|
validForSeconds: params.validForSeconds ?? DEFAULT_VALID_FOR_SECONDS,
|
|
23
24
|
}, deps);
|
|
24
25
|
let data;
|
|
@@ -8,6 +8,12 @@ type SendWithCallsParams = {
|
|
|
8
8
|
autoDelegate?: boolean;
|
|
9
9
|
/** The batch of calls to execute. */
|
|
10
10
|
calls: SponsoredTransactionCall[];
|
|
11
|
+
/**
|
|
12
|
+
* Optional bitmap nonce to sign the intent with. When provided, nonce
|
|
13
|
+
* generation (and its on-chain check) is skipped and the supplied value is
|
|
14
|
+
* used as-is. Useful for mutually-exclusive / cancel-replace intents.
|
|
15
|
+
*/
|
|
16
|
+
nonce?: bigint;
|
|
11
17
|
/** How long the signed intent remains valid, in seconds. Defaults to 600. */
|
|
12
18
|
validForSeconds?: number;
|
|
13
19
|
};
|
|
@@ -17,11 +17,11 @@ var toSerializedAuthorization = require('../toSerializedAuthorization/toSerializ
|
|
|
17
17
|
* the target chain, and signs the typed-data payload with the wallet client
|
|
18
18
|
* provided in `deps`.
|
|
19
19
|
*/
|
|
20
|
-
const signSponsoredTransaction = async ({ authorization, autoDelegate = true, calls, validForSeconds = constants.DEFAULT_VALID_FOR_SECONDS, }, deps) => {
|
|
20
|
+
const signSponsoredTransaction = async ({ authorization, autoDelegate = true, calls, nonce: providedNonce, validForSeconds = constants.DEFAULT_VALID_FOR_SECONDS, }, deps) => {
|
|
21
21
|
const { chainId, walletClient } = deps;
|
|
22
22
|
const walletAddress = walletClient.account.address;
|
|
23
23
|
const resolvedAuthorization = await resolveAuthorization.resolveAuthorization({ authorization, autoDelegate, walletAddress }, deps);
|
|
24
|
-
const nonce = await generateIntentNonce.generateIntentNonce({ walletAddress }, deps);
|
|
24
|
+
const nonce = providedNonce ?? (await generateIntentNonce.generateIntentNonce({ walletAddress }, deps));
|
|
25
25
|
const deadline = BigInt(Math.floor(Date.now() / 1000) + validForSeconds);
|
|
26
26
|
const { relayerAddress } = await getAvailableEvmGaslessRelayer.getAvailableEvmGaslessRelayer({ chainId }, deps);
|
|
27
27
|
const signature = await walletClient.signTypedData({
|
|
@@ -7,6 +7,15 @@ type SignSponsoredTransactionParams = {
|
|
|
7
7
|
autoDelegate?: boolean;
|
|
8
8
|
/** The batch of calls to execute. */
|
|
9
9
|
calls: SponsoredTransactionCall[];
|
|
10
|
+
/**
|
|
11
|
+
* Optional bitmap nonce to sign the intent with. When provided, intent nonce
|
|
12
|
+
* generation is skipped entirely (no on-chain `isNonceUsed` check) and the
|
|
13
|
+
* supplied value is used as-is. Matches the `nonce` field returned on the
|
|
14
|
+
* signed-transaction result so callers can reuse it. Useful for
|
|
15
|
+
* mutually-exclusive / cancel-replace intents: signing multiple intents with
|
|
16
|
+
* the same nonce so at most one can ever land on-chain.
|
|
17
|
+
*/
|
|
18
|
+
nonce?: bigint;
|
|
10
19
|
/** How long the signed intent remains valid, in seconds. Defaults to 600 (10 minutes). */
|
|
11
20
|
validForSeconds?: number;
|
|
12
21
|
};
|
|
@@ -18,5 +27,5 @@ type SignSponsoredTransactionParams = {
|
|
|
18
27
|
* the target chain, and signs the typed-data payload with the wallet client
|
|
19
28
|
* provided in `deps`.
|
|
20
29
|
*/
|
|
21
|
-
export declare const signSponsoredTransaction: ({ authorization, autoDelegate, calls, validForSeconds, }: SignSponsoredTransactionParams, deps: EvmGaslessChainDeps) => Promise<SignedSponsoredTransaction>;
|
|
30
|
+
export declare const signSponsoredTransaction: ({ authorization, autoDelegate, calls, nonce: providedNonce, validForSeconds, }: SignSponsoredTransactionParams, deps: EvmGaslessChainDeps) => Promise<SignedSponsoredTransaction>;
|
|
22
31
|
export {};
|
|
@@ -13,11 +13,11 @@ import { toSerializedAuthorization } from '../toSerializedAuthorization/toSerial
|
|
|
13
13
|
* the target chain, and signs the typed-data payload with the wallet client
|
|
14
14
|
* provided in `deps`.
|
|
15
15
|
*/
|
|
16
|
-
const signSponsoredTransaction = async ({ authorization, autoDelegate = true, calls, validForSeconds = DEFAULT_VALID_FOR_SECONDS, }, deps) => {
|
|
16
|
+
const signSponsoredTransaction = async ({ authorization, autoDelegate = true, calls, nonce: providedNonce, validForSeconds = DEFAULT_VALID_FOR_SECONDS, }, deps) => {
|
|
17
17
|
const { chainId, walletClient } = deps;
|
|
18
18
|
const walletAddress = walletClient.account.address;
|
|
19
19
|
const resolvedAuthorization = await resolveAuthorization({ authorization, autoDelegate, walletAddress }, deps);
|
|
20
|
-
const nonce = await generateIntentNonce({ walletAddress }, deps);
|
|
20
|
+
const nonce = providedNonce ?? (await generateIntentNonce({ walletAddress }, deps));
|
|
21
21
|
const deadline = BigInt(Math.floor(Date.now() / 1000) + validForSeconds);
|
|
22
22
|
const { relayerAddress } = await getAvailableEvmGaslessRelayer({ chainId }, deps);
|
|
23
23
|
const signature = await walletClient.signTypedData({
|