Welcome, {user.email}
Your Smart Wallet: {user.accountAbstractionAddress}
{/* Add your app content here */}methodSignature
and set only address
(recipient) and value
(in wei).
userOperationHash
with the EOA, then queue execution.
```js
const signature = await account.signMessage({
message: { raw: userOperation.userOperationHash },
})
const executionResponse = await fetch(`${BASE_URL}/crypto/execute-user-op`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': API_KEY,
},
body: JSON.stringify({
userOperationHash: userOperation.userOperationHash,
signature,
}),
}).then((r) => r.json())
console.log(executionResponse)
```
authorization
signature when executing.
viem
We’ll use viem, a library for blockchain interactions, to simplify our integration. Install it by running:
```package-install
npm i viem
```
tokenIn: 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
. This ensures that the Notus API recognizes the asset as a native token.
payGasFeeToken
field should contain the address of an ERC-20 token held in the smart wallet. This token will be used to pay both the partner’s transactionFeePercent
and the gas fees for the UserOperation. In most cases, payGasFeeToken
is the same as token
, typically the token the user already holds in their wallet.
viem
We’ll use viem, a library for blockchain interactions, to simplify our integration. Install it by running:
```package-install
npm i viem
```
tokenIn: 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
. This ensures that the Notus API recognizes the asset as a native token.
payGasFeeToken
field should contain the address of an ERC-20 token held in the smart wallet. This token will be used to pay both the partner’s transactionFeePercent
and the gas fees for the UserOperation. In most cases, payGasFeeToken
is the same as token
, typically the token the user already holds in their wallet.
viem
We’ll use [`viem`](https://viem.sh/), a library for blockchain interactions, to simplify our integration. Install it by running:
```package-install
npm i viem
```
createWalletClient
initializes the wallet connection.
* requestAddresses
fetches the connected wallet's account address.
* The address is stored in the externallyOwnedAccount
state for future use.
salt
is a unique value that, when combined with the EOA and factory, generates a deterministic smart wallet address. If no salt is provided, the default value is zero. Each distinct salt creates a new smart wallet for the same EOA and factory, allowing flexibility while ensuring consistent and predictable address generation.
* The POST
request is sent to register a smart wallet if it hasn’t been registered yet. The request uses the EOA, a factory address, and a salt value.
* If the POST
request fails (e.g., because the wallet is already registered), a fallback GET
request retrieves the existing smart wallet details.
* Once the smart wallet address is retrieved, it’s stored in the accountAbstraction
state for further use.
0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
as the token address.
payGasFeeToken
field should contain the address of an ERC-20 token held in the smart wallet. This token will be used to pay both the partner’s transactionFeePercent
and the gas fees for the UserOperation. In most cases, payGasFeeToken
is the same as token
, typically the token the user already holds in their wallet.
swapParams
object contains details of the swap, including token addresses, wallet address, and fees.
* The Notus API returns a swap quote, which is stored in the quote
state.
userOpHash
confirms the transaction.
* Signatures are validated on-chain, transactions won't be executed unless the EOA match
Your Smart Wallet: {user.accountAbstractionAddress}
{/* Add your app content here */}payGasFeeToken
field should contain the address of an ERC-20 token held in the smart wallet. This token will be used to pay both the partner’s transactionFeePercent
and the gas fees for the UserOperation. In most cases, payGasFeeToken
is the same as token
, typically the token the user already holds in their wallet.
Quote ID: {quoteId}
} {userOpHash &&UserOp Hash: {userOpHash}
} {error &&{error}
}viem
We’ll use viem, a library for blockchain interactions, to simplify our integration. Install it by running:
```package-install
npm i viem
```
web3Auth
```package-install
npm i @web3auth/base @web3auth/ethereum-provider @web3auth/modal
```
salt
is a unique value that, when combined with the EOA and factory, generates a deterministic smart wallet address. If no salt is provided, the default value is zero. Each distinct salt creates a new smart wallet for the same EOA and factory, allowing flexibility while ensuring consistent and predictable address generation.
* The POST
request is sent to register a smart wallet if it hasn’t been registered yet. The request uses the EOA, a factory address, and a salt value.
* If the POST
request fails (e.g., because the wallet is already registered), a fallback GET
request retrieves the existing smart wallet details.
* Once the smart wallet address is retrieved, it’s stored in the accountAbstraction
state for further use.
tokenIn: 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
. This ensures that the Notus API recognizes the asset as a native token.
swapParams
object contains details of the swap, including token addresses, wallet address, and fees.
The Notus API returns a swap quote
, which is stored in the quote state.
payGasFeeToken
field should contain the address of an ERC-20 token held in the smart wallet. This token will be used to pay both the partner’s transactionFeePercent
and the gas fees for the UserOperation. In most cases, payGasFeeToken
is the same as token
, typically the token the user already holds in their wallet.
viem
We’ll use viem, a library for blockchain interactions, to simplify our integration. Install it by running:
```package-install
npm i viem
```
payGasFeeToken
field should contain the address of an ERC-20 token held in the smart wallet. This token will be used to pay both the partner’s transactionFeePercent
and the gas fees for the UserOperation. In most cases, payGasFeeToken
is the same as token
, typically the token the user already holds in their wallet.
viem
We’ll use viem, a library for blockchain interactions, to simplify our integration. Install it by running:
```package-install
npm i viem
```
viem
We’ll use viem, a library for blockchain interactions, to simplify our integration. Install it by running:
```package-install
npm i viem
```