@dynamic-labs-sdk/evm 0.26.9 → 0.27.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/dist/{addEIP6963Extension-C6V9wugj.esm.js → addEIP6963Extension-CsLDKxnC.esm.js} +3 -3
- package/dist/{addEIP6963Extension-C6V9wugj.esm.js.map → addEIP6963Extension-CsLDKxnC.esm.js.map} +1 -1
- package/dist/{addEIP6963Extension-xmttAYsJ.cjs → addEIP6963Extension-SnDMOqHg.cjs} +3 -3
- package/dist/{addEIP6963Extension-xmttAYsJ.cjs.map → addEIP6963Extension-SnDMOqHg.cjs.map} +1 -1
- package/dist/{addWaasEvmExtension-DO_xrGNd.cjs → addWaasEvmExtension-BdR7f-_3.cjs} +3 -3
- package/dist/{addWaasEvmExtension-DO_xrGNd.cjs.map → addWaasEvmExtension-BdR7f-_3.cjs.map} +1 -1
- package/dist/{addWaasEvmExtension-BuriM1RR.esm.js → addWaasEvmExtension-DkgyJUn7.esm.js} +3 -3
- package/dist/{addWaasEvmExtension-BuriM1RR.esm.js.map → addWaasEvmExtension-DkgyJUn7.esm.js.map} +1 -1
- package/dist/baseAccount.cjs +3 -3
- package/dist/baseAccount.esm.js +3 -3
- package/dist/baseAccount.native.esm.js +1 -1
- package/dist/{createWalletClientForWalletAccount-BRCTx54Y.cjs → createWalletClientForWalletAccount-CIg9pNK1.cjs} +2 -2
- package/dist/{createWalletClientForWalletAccount-BRCTx54Y.cjs.map → createWalletClientForWalletAccount-CIg9pNK1.cjs.map} +1 -1
- package/dist/{createWalletClientForWalletAccount-DNRmkFGz.esm.js → createWalletClientForWalletAccount-CrmwB-k7.esm.js} +2 -2
- package/dist/{createWalletClientForWalletAccount-DNRmkFGz.esm.js.map → createWalletClientForWalletAccount-CrmwB-k7.esm.js.map} +1 -1
- package/dist/{createWalletProviderFromEIP1193Provider-CYa7ifj6.esm.js → createWalletProviderFromEIP1193Provider-DIyEkaMG.esm.js} +2 -2
- package/dist/{createWalletProviderFromEIP1193Provider-CYa7ifj6.esm.js.map → createWalletProviderFromEIP1193Provider-DIyEkaMG.esm.js.map} +1 -1
- package/dist/{createWalletProviderFromEIP1193Provider-BtdyeO_q.cjs → createWalletProviderFromEIP1193Provider-V7mbAWY6.cjs} +2 -2
- package/dist/{createWalletProviderFromEIP1193Provider-BtdyeO_q.cjs.map → createWalletProviderFromEIP1193Provider-V7mbAWY6.cjs.map} +1 -1
- package/dist/eip6963.cjs +4 -4
- package/dist/eip6963.esm.js +4 -4
- package/dist/eip6963.native.esm.js +1 -1
- package/dist/errors/EvmGasSponsorshipNotEnabledError/EvmGasSponsorshipNotEnabledError.d.ts +5 -0
- package/dist/errors/EvmGasSponsorshipNotEnabledError/EvmGasSponsorshipNotEnabledError.d.ts.map +1 -0
- package/dist/errors/EvmGasSponsorshipNotEnabledError/index.d.ts +2 -0
- package/dist/errors/EvmGasSponsorshipNotEnabledError/index.d.ts.map +1 -0
- package/dist/errors/SponsorTransactionError/SponsorTransactionError.d.ts +5 -0
- package/dist/errors/SponsorTransactionError/SponsorTransactionError.d.ts.map +1 -0
- package/dist/errors/SponsorTransactionError/index.d.ts +2 -0
- package/dist/errors/SponsorTransactionError/index.d.ts.map +1 -0
- package/dist/{evmTransferAmount-DHhD0MEF.esm.js → evmTransferAmount-DkQzNUHB.esm.js} +2 -2
- package/dist/{evmTransferAmount-DHhD0MEF.esm.js.map → evmTransferAmount-DkQzNUHB.esm.js.map} +1 -1
- package/dist/{evmTransferAmount-2oHtkHtg.cjs → evmTransferAmount-Dqw2C8RA.cjs} +2 -2
- package/dist/{evmTransferAmount-2oHtkHtg.cjs.map → evmTransferAmount-Dqw2C8RA.cjs.map} +1 -1
- package/dist/exports/index.d.ts +9 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/gasless/constants.d.ts +55 -0
- package/dist/gasless/constants.d.ts.map +1 -0
- package/dist/gasless/gasless.types.d.ts +61 -0
- package/dist/gasless/gasless.types.d.ts.map +1 -0
- package/dist/gasless/generateIntentNonce/generateIntentNonce.d.ts +20 -0
- package/dist/gasless/generateIntentNonce/generateIntentNonce.d.ts.map +1 -0
- package/dist/gasless/generateIntentNonce/index.d.ts +2 -0
- package/dist/gasless/generateIntentNonce/index.d.ts.map +1 -0
- package/dist/gasless/generateRandomNonce/generateRandomNonce.d.ts +8 -0
- package/dist/gasless/generateRandomNonce/generateRandomNonce.d.ts.map +1 -0
- package/dist/gasless/generateRandomNonce/index.d.ts +2 -0
- package/dist/gasless/generateRandomNonce/index.d.ts.map +1 -0
- package/dist/gasless/getEVMSponsoredTransactionStatus/getEVMSponsoredTransactionStatus.d.ts +22 -0
- package/dist/gasless/getEVMSponsoredTransactionStatus/getEVMSponsoredTransactionStatus.d.ts.map +1 -0
- package/dist/gasless/getEVMSponsoredTransactionStatus/index.d.ts +2 -0
- package/dist/gasless/getEVMSponsoredTransactionStatus/index.d.ts.map +1 -0
- package/dist/gasless/isEvmGasSponsorshipEnabled/index.d.ts +2 -0
- package/dist/gasless/isEvmGasSponsorshipEnabled/index.d.ts.map +1 -0
- package/dist/gasless/isEvmGasSponsorshipEnabled/isEvmGasSponsorshipEnabled.d.ts +9 -0
- package/dist/gasless/isEvmGasSponsorshipEnabled/isEvmGasSponsorshipEnabled.d.ts.map +1 -0
- package/dist/gasless/relaySponsoredTransaction/index.d.ts +2 -0
- package/dist/gasless/relaySponsoredTransaction/index.d.ts.map +1 -0
- package/dist/gasless/relaySponsoredTransaction/relaySponsoredTransaction.d.ts +40 -0
- package/dist/gasless/relaySponsoredTransaction/relaySponsoredTransaction.d.ts.map +1 -0
- package/dist/gasless/resolveChainId/index.d.ts +2 -0
- package/dist/gasless/resolveChainId/index.d.ts.map +1 -0
- package/dist/gasless/resolveChainId/resolveChainId.d.ts +18 -0
- package/dist/gasless/resolveChainId/resolveChainId.d.ts.map +1 -0
- package/dist/gasless/sendSponsoredTransaction/index.d.ts +2 -0
- package/dist/gasless/sendSponsoredTransaction/index.d.ts.map +1 -0
- package/dist/gasless/sendSponsoredTransaction/sendSponsoredTransaction.d.ts +38 -0
- package/dist/gasless/sendSponsoredTransaction/sendSponsoredTransaction.d.ts.map +1 -0
- package/dist/gasless/signSponsoredTransaction/index.d.ts +2 -0
- package/dist/gasless/signSponsoredTransaction/index.d.ts.map +1 -0
- package/dist/gasless/signSponsoredTransaction/signSponsoredTransaction.d.ts +31 -0
- package/dist/gasless/signSponsoredTransaction/signSponsoredTransaction.d.ts.map +1 -0
- package/dist/gasless/toSerializedAuthorization/index.d.ts +2 -0
- package/dist/gasless/toSerializedAuthorization/index.d.ts.map +1 -0
- package/dist/gasless/toSerializedAuthorization/toSerializedAuthorization.d.ts +10 -0
- package/dist/gasless/toSerializedAuthorization/toSerializedAuthorization.d.ts.map +1 -0
- package/dist/gasless/waitForSponsoredTransaction/index.d.ts +2 -0
- package/dist/gasless/waitForSponsoredTransaction/index.d.ts.map +1 -0
- package/dist/gasless/waitForSponsoredTransaction/waitForSponsoredTransaction.d.ts +24 -0
- package/dist/gasless/waitForSponsoredTransaction/waitForSponsoredTransaction.d.ts.map +1 -0
- package/dist/index.cjs +387 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +382 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +379 -5
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{package-C1ZYfyHb.native.esm.js → package-DylwzO_9.native.esm.js} +2 -2
- package/dist/package-DylwzO_9.native.esm.js.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/viem.cjs +1 -1
- package/dist/viem.esm.js +1 -1
- package/dist/viem.native.esm.js +1 -1
- package/dist/waas.cjs +3 -3
- package/dist/waas.esm.js +3 -3
- package/dist/waas.native.esm.js +1 -1
- package/dist/walletConnect.cjs +2 -2
- package/dist/walletConnect.esm.js +2 -2
- package/dist/walletConnect.native.esm.js +1 -1
- package/dist/windowInjected.cjs +3 -3
- package/dist/windowInjected.esm.js +3 -3
- package/dist/windowInjected.native.esm.js +1 -1
- package/package.json +5 -5
- package/dist/package-C1ZYfyHb.native.esm.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DynamicClient } from '@dynamic-labs-sdk/client';
|
|
2
|
+
import type { EvmWalletAccount } from '../../EvmWalletAccount.types';
|
|
3
|
+
type GenerateIntentNonceParams = {
|
|
4
|
+
walletAccount: EvmWalletAccount;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Generates a random bitmap nonce for UGD AuthorizedExecutions signing.
|
|
8
|
+
*
|
|
9
|
+
* Uses crypto.getRandomValues() for 256-bit randomness. Validates against
|
|
10
|
+
* the on-chain isNonceUsed check as a safety measure, although collision
|
|
11
|
+
* is essentially impossible with 256-bit random values.
|
|
12
|
+
*
|
|
13
|
+
* @param params.walletAccount - The wallet account whose delegation contract is checked.
|
|
14
|
+
* @param [client] - The Dynamic client instance.
|
|
15
|
+
* @returns A unique bigint nonce for the EIP-712 intent.
|
|
16
|
+
* @not-instrumented
|
|
17
|
+
*/
|
|
18
|
+
export declare const generateIntentNonce: ({ walletAccount }: GenerateIntentNonceParams, client: DynamicClient) => Promise<bigint>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=generateIntentNonce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateIntentNonce.d.ts","sourceRoot":"","sources":["../../../src/gasless/generateIntentNonce/generateIntentNonce.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAK9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAKrE,KAAK,yBAAyB,GAAG;IAC/B,aAAa,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,sBACX,yBAAyB,UACpC,aAAa,KACpB,OAAO,CAAC,MAAM,CAkChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/generateIntentNonce/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateRandomNonce.d.ts","sourceRoot":"","sources":["../../../src/gasless/generateRandomNonce/generateRandomNonce.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,QAAO,MAKtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/generateRandomNonce/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SponsoredTransactionStatusResult } from '../gasless.types';
|
|
2
|
+
type GetEVMSponsoredTransactionStatusParams = {
|
|
3
|
+
/** The request ID returned by `relaySponsoredTransaction` / `sendSponsoredTransaction`. */
|
|
4
|
+
requestId: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Fetches the current relay state for a sponsored EVM transaction.
|
|
8
|
+
*
|
|
9
|
+
* Returns the lifecycle status, the on-chain transaction hash (when the relay
|
|
10
|
+
* has broadcast it), and any terminal-failure error message. Use this as the
|
|
11
|
+
* building block for custom polling flows; for the common "wait until done"
|
|
12
|
+
* case prefer `waitForSponsoredTransaction`.
|
|
13
|
+
*
|
|
14
|
+
* @param params.requestId - The request ID returned when the transaction was relayed.
|
|
15
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
16
|
+
* @returns The current status, optional transaction hash, and optional error message.
|
|
17
|
+
* @throws {SponsorTransactionError} If the API call fails.
|
|
18
|
+
* @not-instrumented
|
|
19
|
+
*/
|
|
20
|
+
export declare const getEVMSponsoredTransactionStatus: ({ requestId }: GetEVMSponsoredTransactionStatusParams, client?: import("@dynamic-labs-sdk/client").DynamicClient) => Promise<SponsoredTransactionStatusResult>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=getEVMSponsoredTransactionStatus.d.ts.map
|
package/dist/gasless/getEVMSponsoredTransactionStatus/getEVMSponsoredTransactionStatus.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEVMSponsoredTransactionStatus.d.ts","sourceRoot":"","sources":["../../../src/gasless/getEVMSponsoredTransactionStatus/getEVMSponsoredTransactionStatus.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAEV,gCAAgC,EACjC,MAAM,kBAAkB,CAAC;AAE1B,KAAK,sCAAsC,GAAG;IAC5C,2FAA2F;IAC3F,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gCAAgC,kBAC5B,sCAAsC,gEAEpD,OAAO,CAAC,gCAAgC,CA2B1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/getEVMSponsoredTransactionStatus/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/isEvmGasSponsorshipEnabled/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if EVM gas sponsorship is enabled for the current project.
|
|
3
|
+
*
|
|
4
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5
|
+
* @returns True if EVM gas sponsorship is enabled, false otherwise.
|
|
6
|
+
* @not-instrumented
|
|
7
|
+
*/
|
|
8
|
+
export declare const isEvmGasSponsorshipEnabled: (client?: import("@dynamic-labs-sdk/client").DynamicClient) => boolean;
|
|
9
|
+
//# sourceMappingURL=isEvmGasSponsorshipEnabled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isEvmGasSponsorshipEnabled.d.ts","sourceRoot":"","sources":["../../../src/gasless/isEvmGasSponsorshipEnabled/isEvmGasSponsorshipEnabled.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,iEAEpC,OAOF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/relaySponsoredTransaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SignAuthorizationReturnType } from 'viem/accounts';
|
|
2
|
+
import type { EvmWalletAccount } from '../../EvmWalletAccount.types';
|
|
3
|
+
import type { SignedSponsoredTransaction, SponsoredTransactionCall } from '../gasless.types';
|
|
4
|
+
type RelaySponsoredTransactionWithCallsParams = {
|
|
5
|
+
/** Pre-signed EIP-7702 authorization to include in the payload. */
|
|
6
|
+
authorization?: SignAuthorizationReturnType;
|
|
7
|
+
/** The batch of calls to execute. */
|
|
8
|
+
calls: SponsoredTransactionCall[];
|
|
9
|
+
/** How long the signed intent remains valid, in seconds. Defaults to 600 (10 minutes). */
|
|
10
|
+
validForSeconds?: number;
|
|
11
|
+
/** The EVM wallet account to sign and relay the transaction for. */
|
|
12
|
+
walletAccount: EvmWalletAccount;
|
|
13
|
+
};
|
|
14
|
+
type RelaySponsoredTransactionWithSignedTxParams = {
|
|
15
|
+
/** A pre-signed sponsored transaction payload from signSponsoredTransaction. */
|
|
16
|
+
signedTransaction: SignedSponsoredTransaction;
|
|
17
|
+
};
|
|
18
|
+
type RelaySponsoredTransactionParams = RelaySponsoredTransactionWithCallsParams | RelaySponsoredTransactionWithSignedTxParams;
|
|
19
|
+
/**
|
|
20
|
+
* Relays a sponsored EVM transaction to the Dynamic backend.
|
|
21
|
+
*
|
|
22
|
+
* Accepts either a pre-signed transaction or unsigned calls. When given
|
|
23
|
+
* unsigned calls, signs the transaction first via signSponsoredTransaction.
|
|
24
|
+
*
|
|
25
|
+
* The backend encodes the transaction, submits it to the relay provider,
|
|
26
|
+
* and returns a request ID for tracking. The relay may retry the on-chain
|
|
27
|
+
* submission, so the request ID (not a transaction hash) is the stable
|
|
28
|
+
* identifier for the sponsored transaction.
|
|
29
|
+
*
|
|
30
|
+
* @param params - Either { signedTransaction } or { walletAccount, calls, ... }.
|
|
31
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
32
|
+
* @returns An object containing the request ID for tracking the relayed transaction.
|
|
33
|
+
* @throws {SponsorTransactionError} If the API call fails or returns an unexpected response.
|
|
34
|
+
* @not-instrumented
|
|
35
|
+
*/
|
|
36
|
+
export declare const relaySponsoredTransaction: (params: RelaySponsoredTransactionParams, client?: import("@dynamic-labs-sdk/client").DynamicClient) => Promise<{
|
|
37
|
+
requestId: string;
|
|
38
|
+
}>;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=relaySponsoredTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relaySponsoredTransaction.d.ts","sourceRoot":"","sources":["../../../src/gasless/relaySponsoredTransaction/relaySponsoredTransaction.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAG1B,KAAK,wCAAwC,GAAG;IAC9C,mEAAmE;IACnE,aAAa,CAAC,EAAE,2BAA2B,CAAC;IAC5C,qCAAqC;IACrC,KAAK,EAAE,wBAAwB,EAAE,CAAC;IAClC,0FAA0F;IAC1F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,aAAa,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF,KAAK,2CAA2C,GAAG;IACjD,gFAAgF;IAChF,iBAAiB,EAAE,0BAA0B,CAAC;CAC/C,CAAC;AAEF,KAAK,+BAA+B,GAChC,wCAAwC,GACxC,2CAA2C,CAAC;AAOhD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,yBAAyB,WAC5B,+BAA+B,gEAEtC,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CA8C/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/resolveChainId/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DynamicClient } from '@dynamic-labs-sdk/client';
|
|
2
|
+
import type { EvmWalletAccount } from '../../EvmWalletAccount.types';
|
|
3
|
+
type ResolveChainIdParams = {
|
|
4
|
+
chainId?: number;
|
|
5
|
+
walletAccount: EvmWalletAccount;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Resolves a chain ID from either an explicit override or the wallet's active network.
|
|
9
|
+
*
|
|
10
|
+
* @param params.chainId - Explicit chain ID override.
|
|
11
|
+
* @param params.walletAccount - The wallet account to resolve the chain from.
|
|
12
|
+
* @param client - The Dynamic client instance.
|
|
13
|
+
* @returns The resolved chain ID.
|
|
14
|
+
* @not-instrumented
|
|
15
|
+
*/
|
|
16
|
+
export declare const resolveChainId: ({ chainId, walletAccount }: ResolveChainIdParams, client: DynamicClient) => Promise<number>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=resolveChainId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveChainId.d.ts","sourceRoot":"","sources":["../../../src/gasless/resolveChainId/resolveChainId.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,KAAK,oBAAoB,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,+BACG,oBAAoB,UACxC,aAAa,KACpB,OAAO,CAAC,MAAM,CAgBhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/sendSponsoredTransaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Hex } from 'viem';
|
|
2
|
+
import type { SignAuthorizationReturnType } from 'viem/accounts';
|
|
3
|
+
import type { EvmWalletAccount } from '../../EvmWalletAccount.types';
|
|
4
|
+
import type { SignedSponsoredTransaction, SponsoredTransactionCall } from '../gasless.types';
|
|
5
|
+
type SendSponsoredTransactionWithCallsParams = {
|
|
6
|
+
/** Pre-signed EIP-7702 authorization to include in the payload. */
|
|
7
|
+
authorization?: SignAuthorizationReturnType;
|
|
8
|
+
/** The batch of calls to execute. */
|
|
9
|
+
calls: SponsoredTransactionCall[];
|
|
10
|
+
/** How long the signed intent remains valid, in seconds. Defaults to 600 (10 minutes). */
|
|
11
|
+
validForSeconds?: number;
|
|
12
|
+
/** The EVM wallet account to sign and send the transaction for. */
|
|
13
|
+
walletAccount: EvmWalletAccount;
|
|
14
|
+
};
|
|
15
|
+
type SendSponsoredTransactionWithSignedTxParams = {
|
|
16
|
+
/** A pre-signed sponsored transaction payload from signSponsoredTransaction. */
|
|
17
|
+
signedTransaction: SignedSponsoredTransaction;
|
|
18
|
+
};
|
|
19
|
+
type SendSponsoredTransactionParams = SendSponsoredTransactionWithCallsParams | SendSponsoredTransactionWithSignedTxParams;
|
|
20
|
+
/**
|
|
21
|
+
* Sends a sponsored EVM transaction and waits for the on-chain transaction hash.
|
|
22
|
+
*
|
|
23
|
+
* Accepts either a pre-signed transaction or unsigned calls. When given
|
|
24
|
+
* unsigned calls, signs the transaction first via signSponsoredTransaction.
|
|
25
|
+
* Relays the transaction and polls until the relay reports a CONFIRMED
|
|
26
|
+
* status, then returns the resulting transaction hash.
|
|
27
|
+
*
|
|
28
|
+
* @param params - Either { signedTransaction } or { walletAccount, calls, ... }.
|
|
29
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
30
|
+
* @returns An object containing the on-chain transaction hash.
|
|
31
|
+
* @throws {SponsorTransactionError} If the relay returns a terminal failure or polling times out.
|
|
32
|
+
* @not-instrumented
|
|
33
|
+
*/
|
|
34
|
+
export declare const sendSponsoredTransaction: (params: SendSponsoredTransactionParams, client?: import("@dynamic-labs-sdk/client").DynamicClient) => Promise<{
|
|
35
|
+
transactionHash: Hex;
|
|
36
|
+
}>;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=sendSponsoredTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendSponsoredTransaction.d.ts","sourceRoot":"","sources":["../../../src/gasless/sendSponsoredTransaction/sendSponsoredTransaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAI1B,KAAK,uCAAuC,GAAG;IAC7C,mEAAmE;IACnE,aAAa,CAAC,EAAE,2BAA2B,CAAC;IAC5C,qCAAqC;IACrC,KAAK,EAAE,wBAAwB,EAAE,CAAC;IAClC,0FAA0F;IAC1F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,aAAa,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF,KAAK,0CAA0C,GAAG;IAChD,gFAAgF;IAChF,iBAAiB,EAAE,0BAA0B,CAAC;CAC/C,CAAC;AAEF,KAAK,8BAA8B,GAC/B,uCAAuC,GACvC,0CAA0C,CAAC;AAE/C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,WAC3B,8BAA8B,gEAErC,OAAO,CAAC;IAAE,eAAe,EAAE,GAAG,CAAA;CAAE,CAGlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/signSponsoredTransaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SignAuthorizationReturnType } from 'viem/accounts';
|
|
2
|
+
import type { EvmWalletAccount } from '../../EvmWalletAccount.types';
|
|
3
|
+
import type { SignedSponsoredTransaction, SponsoredTransactionCall } from '../gasless.types';
|
|
4
|
+
type SignSponsoredTransactionParams = {
|
|
5
|
+
/** Pre-signed EIP-7702 authorization to include in the payload. */
|
|
6
|
+
authorization?: SignAuthorizationReturnType;
|
|
7
|
+
/** The batch of calls to execute. */
|
|
8
|
+
calls: SponsoredTransactionCall[];
|
|
9
|
+
/** How long the signed intent remains valid, in seconds. Defaults to 600 (10 minutes). */
|
|
10
|
+
validForSeconds?: number;
|
|
11
|
+
/** The EVM wallet account to sign the transaction for. */
|
|
12
|
+
walletAccount: EvmWalletAccount;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Signs a sponsored transaction by creating an EIP-712 intent signature.
|
|
16
|
+
*
|
|
17
|
+
* If an authorization is provided, it is serialized and included in the
|
|
18
|
+
* payload. Otherwise the intent is signed without any authorization
|
|
19
|
+
* (caller manages delegation separately).
|
|
20
|
+
*
|
|
21
|
+
* @param params.walletAccount - The EVM wallet account to sign with.
|
|
22
|
+
* @param params.calls - The batch of calls to execute.
|
|
23
|
+
* @param [params.authorization] - Pre-signed EIP-7702 authorization to include.
|
|
24
|
+
* @param [params.validForSeconds] - How long the signed intent remains valid, in seconds. Defaults to 600 (10 minutes).
|
|
25
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
26
|
+
* @returns The signed sponsored transaction payload ready to be sent to the API.
|
|
27
|
+
* @not-instrumented
|
|
28
|
+
*/
|
|
29
|
+
export declare const signSponsoredTransaction: ({ walletAccount, calls, authorization, validForSeconds, }: SignSponsoredTransactionParams, client?: import("@dynamic-labs-sdk/client").DynamicClient) => Promise<SignedSponsoredTransaction>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=signSponsoredTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signSponsoredTransaction.d.ts","sourceRoot":"","sources":["../../../src/gasless/signSponsoredTransaction/signSponsoredTransaction.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAUrE,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAI1B,KAAK,8BAA8B,GAAG;IACpC,mEAAmE;IACnE,aAAa,CAAC,EAAE,2BAA2B,CAAC;IAC5C,qCAAqC;IACrC,KAAK,EAAE,wBAAwB,EAAE,CAAC;IAClC,0FAA0F;IAC1F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,aAAa,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,8DAMhC,8BAA8B,gEAEhC,OAAO,CAAC,0BAA0B,CAwDpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/toSerializedAuthorization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SignAuthorizationReturnType } from 'viem/accounts';
|
|
2
|
+
import type { SerializedAuthorization } from '../gasless.types';
|
|
3
|
+
/**
|
|
4
|
+
* Converts a viem SignAuthorizationReturnType into a plain serializable object
|
|
5
|
+
* suitable for JSON transport to the sponsorship API.
|
|
6
|
+
*
|
|
7
|
+
* @not-instrumented
|
|
8
|
+
*/
|
|
9
|
+
export declare const toSerializedAuthorization: (auth: SignAuthorizationReturnType) => SerializedAuthorization;
|
|
10
|
+
//# sourceMappingURL=toSerializedAuthorization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toSerializedAuthorization.d.ts","sourceRoot":"","sources":["../../../src/gasless/toSerializedAuthorization/toSerializedAuthorization.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAEjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,SAC9B,2BAA2B,KAChC,uBAaF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gasless/waitForSponsoredTransaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Hex } from 'viem';
|
|
2
|
+
type WaitForSponsoredTransactionParams = {
|
|
3
|
+
/** The request ID returned by `relaySponsoredTransaction` / `sendSponsoredTransaction`. */
|
|
4
|
+
requestId: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Polls `getEVMSponsoredTransactionStatus` until the relay reaches a terminal
|
|
8
|
+
* state and returns the on-chain transaction hash.
|
|
9
|
+
*
|
|
10
|
+
* Resolves on `CONFIRMED`. Throws `SponsorTransactionError` on terminal
|
|
11
|
+
* failure statuses (`FAILED`, `CANCELED`, `EXPIRED`, `REJECTED`) or after a
|
|
12
|
+
* 60s timeout.
|
|
13
|
+
*
|
|
14
|
+
* @param params.requestId - The request ID returned when the transaction was relayed.
|
|
15
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
16
|
+
* @returns An object containing the on-chain transaction hash.
|
|
17
|
+
* @throws {SponsorTransactionError} If the relay returns a terminal failure or polling times out.
|
|
18
|
+
* @not-instrumented
|
|
19
|
+
*/
|
|
20
|
+
export declare const waitForSponsoredTransaction: ({ requestId }: WaitForSponsoredTransactionParams, client?: import("@dynamic-labs-sdk/client").DynamicClient) => Promise<{
|
|
21
|
+
transactionHash: Hex;
|
|
22
|
+
}>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=waitForSponsoredTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitForSponsoredTransaction.d.ts","sourceRoot":"","sources":["../../../src/gasless/waitForSponsoredTransaction/waitForSponsoredTransaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAShC,KAAK,iCAAiC,GAAG;IACvC,2FAA2F;IAC3F,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B,kBACvB,iCAAiC,gEAE/C,OAAO,CAAC;IAAE,eAAe,EAAE,GAAG,CAAA;CAAE,CAqClC,CAAC"}
|