Skip to content

Commit

Permalink
Add getTransactions endpoint and remove projectKey, graphqlEndpoint p…
Browse files Browse the repository at this point in the history
…arameters (#109)
  • Loading branch information
kaushalrajbacancy authored Mar 21, 2024
1 parent 658f675 commit b51581c
Show file tree
Hide file tree
Showing 37 changed files with 189 additions and 90 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/ban-types': 'off'
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
},
};
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog
## [1.6.4] - 2024-03-20
### New
- Added `getTransactions` endpoint into DataUtils
### Breaking changes
- The parameters named `projectKey` and `graphqlEndpoint` have been removed in the PrimeSdk module

## [1.6.3] - 2024-03-19
### New
- Added ArkaPaymaster as a sub-module
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ cloning down an example repo and setting up a dapp in your own environment.

The mainnet bundler API key `eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxMDZiOGY2NTRhZTRhZTM4MGVjYjJiN2Q2NDMzMjM4IiwiaCI6Im11cm11cjEyOCJ9` is included in the example programs which is a public API key with rate limits, to get higher limits register to https://portal.etherspot.io

**Note: It is no longer necessary to include the `projectKey` parameter in the PrimeSdk.**

## 📖 Documentation

- [Quick Start](https://etherspot.fyi/getting-started)
Expand Down
2 changes: 1 addition & 1 deletion examples/01-get-address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function main() {
const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxMDZiOGY2NTRhZTRhZTM4MGVjYjJiN2Q2NDMzMjM4IiwiaCI6Im11cm11cjEyOCJ9';
const customBundlerUrl = '';
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey, customBundlerUrl) }) // Testnets dont need apiKey on bundlerProvider
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey, customBundlerUrl) }) // Testnets dont need apiKey on bundlerProvider

// get EtherspotWallet address...
const address: string = await primeSdk.getCounterFactualAddress();
Expand Down
2 changes: 1 addition & 1 deletion examples/02-transfer-funds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxM

async function main() {
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })

console.log('address: ', primeSdk.state.EOAAddress)

Expand Down
2 changes: 1 addition & 1 deletion examples/03-transfer-erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxM

async function main() {
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })

console.log('address: ', primeSdk.state.EOAAddress)

Expand Down
2 changes: 1 addition & 1 deletion examples/04-transfer-nft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxM

async function main() {
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })

console.log('address: ', primeSdk.state.EOAAddress)

Expand Down
21 changes: 21 additions & 0 deletions examples/07-transactions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { DataUtils } from '../src';
import * as dotenv from 'dotenv';
dotenv.config();

const dataApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjI4ZWJiMGQ5YTMxYjQ3MmY4NmU4MWY2YTVhYzBhMzE1IiwiaCI6Im11cm11cjEyOCJ9';

async function main(): Promise<void> {
// initializating Data service...
const dataService = new DataUtils(dataApiKey);
const account = '0xe05fb316eb8c4ba7288d43c1bd87be8a8d16761c';
const transactions = await dataService.getTransactions({
account,
chainId: 122,
});

console.log('\x1b[33m%s\x1b[0m', `EtherspotWallet transactions:`, transactions);
}

main()
.catch(console.error)
.finally(() => process.exit());
2 changes: 1 addition & 1 deletion examples/12-add-guardians.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function main() {
// initializating sdk...
const primeSdk = new PrimeSdk(
{ privateKey: process.env.WALLET_PRIVATE_KEY },
{ chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) },
{ chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) },
);

console.log('address: ', primeSdk.state.EOAAddress);
Expand Down
2 changes: 1 addition & 1 deletion examples/13-paymaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxM
async function main() {
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, {
chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key',
chainId: Number(process.env.CHAIN_ID),
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
})

Expand Down
5 changes: 3 additions & 2 deletions examples/14-zeroDev-address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ dotenv.config();
async function main() {
const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxMDZiOGY2NTRhZTRhZTM4MGVjYjJiN2Q2NDMzMjM4IiwiaCI6Im11cm11cjEyOCJ9';
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', factoryWallet: Factory.ZERO_DEV,
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, {
chainId: Number(process.env.CHAIN_ID), factoryWallet: Factory.ZERO_DEV,
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
})

// get ZeroDev address...
Expand Down
5 changes: 3 additions & 2 deletions examples/15-simpleAccount-address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ dotenv.config();
async function main() {
const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxMDZiOGY2NTRhZTRhZTM4MGVjYjJiN2Q2NDMzMjM4IiwiaCI6Im11cm11cjEyOCJ9';
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', factoryWallet: Factory.SIMPLE_ACCOUNT,
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, {
chainId: Number(process.env.CHAIN_ID), factoryWallet: Factory.SIMPLE_ACCOUNT,
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
})

// get SimpleAccount address...
Expand Down
2 changes: 1 addition & 1 deletion examples/16-paymaster-arka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const queryString = `?apiKey=${arka_api_key}&chainId=${Number(process.env.CHAIN_
async function main() {
// initializing sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, {
chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key',
chainId: Number(process.env.CHAIN_ID),
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
})

Expand Down
2 changes: 1 addition & 1 deletion examples/19-paymaster-validUntil-validAfter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const queryString = `?apiKey=${arka_api_key}&chainId=${Number(process.env.CHAIN_
async function main() {
// initializing sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, {
chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
})

console.log('address: ', primeSdk.state.EOAAddress)
Expand Down
5 changes: 3 additions & 2 deletions examples/20-callGasLimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxM

async function main() {
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key',
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, {
chainId: Number(process.env.CHAIN_ID),
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
})

console.log('address: ', primeSdk.state.EOAAddress)
Expand Down
4 changes: 2 additions & 2 deletions examples/21-get-multiple-accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function main() {
// initializating sdk for index 0...
const primeSdk = new PrimeSdk(
{ privateKey: process.env.WALLET_PRIVATE_KEY },
{ chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) },
{ chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) },
);

// get EtherspotWallet address for index 0...
Expand All @@ -19,7 +19,7 @@ async function main() {
// initializating sdk for index 1...
const primeSdk1 = new PrimeSdk(
{ privateKey: process.env.WALLET_PRIVATE_KEY },
{ chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key', index: 1, bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) },
{ chainId: Number(process.env.CHAIN_ID), index: 1, bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) },
);

// get EtherspotWallet address for index 1...
Expand Down
5 changes: 3 additions & 2 deletions examples/22-concurrent-userops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxM
async function main() {
const provider = new providers.JsonRpcProvider(process.env.RPC_PROVIDER_URL);
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key',
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, {
chainId: Number(process.env.CHAIN_ID),
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey)
})

console.log('address: ', primeSdk.state.EOAAddress)
Expand Down
5 changes: 3 additions & 2 deletions examples/23-bundlerApiKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ dotenv.config();
async function main() {
const etherspotBundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxMDZiOGY2NTRhZTRhZTM4MGVjYjJiN2Q2NDMzMjM4IiwiaCI6Im11cm11cjEyOCJ9';
// initializating sdk...
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key',
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), etherspotBundlerApiKey)
const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, {
chainId: Number(process.env.CHAIN_ID),
bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), etherspotBundlerApiKey)
})

// get EtherspotWallet address...
Expand Down
1 change: 0 additions & 1 deletion examples/scripts/commands/erc20Transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default async function main(
amt: string,
) {
const primeSdk = new PrimeSdk({ privateKey: config.signingKey }, { chainId: config.chainId, rpcProviderUrl: config.rpcProviderUrl })
const address = await primeSdk.getCounterFactualAddress();

const provider = new ethers.providers.JsonRpcProvider(config.rpcProviderUrl);
const token = ethers.utils.getAddress(tkn);
Expand Down
1 change: 0 additions & 1 deletion examples/scripts/commands/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { sleep } from "../../../src/sdk/common";

export default async function main(t: string, amt: string) {
const primeSdk = new PrimeSdk({ privateKey: config.signingKey }, { chainId: config.chainId, rpcProviderUrl: config.rpcProviderUrl })
const address = await primeSdk.getCounterFactualAddress();

const target = ethers.utils.getAddress(t);
const value = ethers.utils.parseEther(amt);
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@etherspot/prime-sdk",
"version": "1.6.3",
"version": "1.6.4",
"description": "Etherspot Prime (Account Abstraction) SDK",
"keywords": [
"ether",
Expand All @@ -27,6 +27,7 @@
"03-transfer-erc20": "./node_modules/.bin/ts-node ./examples/03-transfer-erc20",
"05-get-account-balances": "./node_modules/.bin/ts-node ./examples/05-get-account-balances",
"06-transaction": "./node_modules/.bin/ts-node ./examples/06-transaction",
"07-transactions": "./node_modules/.bin/ts-node ./examples/07-transactions",
"08-nft-list": "./node_modules/.bin/ts-node ./examples/08-nft-list",
"09-exchange": "./node_modules/.bin/ts-node ./examples/09-exchange",
"10-advance-routes-lifi": "./node_modules/.bin/ts-node ./examples/10-advance-routes-lifi",
Expand All @@ -42,7 +43,7 @@
"21-get-multiple-accounts": "./node_modules/.bin/ts-node ./examples/21-get-multiple-accounts",
"22-concurrent-userops": "./node_modules/.bin/ts-node ./examples/22-concurrent-userops",
"format": "prettier --write \"{src,test,examples}/**/*.ts\"",
"lint": "eslint \"{src,test}/**/*.ts\"",
"lint": "eslint \"{src,test,examples}/**/*.ts\"",
"lint-fix": "npm run lint -- --fix",
"prebuild": "rimraf ./dist",
"build": "npm run compile",
Expand Down
4 changes: 1 addition & 3 deletions src/sdk/api/api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ export class ApiService {
const authLink = setContext(async () => {

return {
headers: {
['x-project-key']: this.options.projectKey,
},
headers: {},
};
});

Expand Down
6 changes: 2 additions & 4 deletions src/sdk/api/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@ export const сacheSettings = {
export const MethodTypes = {
GET: 'GET',
POST: 'POST',
PUT: 'PUT',
DELETE: 'DELETE',
PATCH: 'PATCH',
};

export const BACKEND_API_ENDPOINT = 'https://rpc.etherspot.io/data-api';

export const API_ENDPOINTS = {
GET_ACCOUNT_BALANCES: 'account/balances',
GET_ACCOUNT_NFTS: 'account/nfts',
GET_TRANSACTION: 'transactions/transaction',
GET_TRANSACTION: 'transactions/transactionByHash',
GET_TRANSACTIONS: 'transactions',
GET_ADVANCE_ROUTES_LIFI: 'exchange/getAdvanceRoutesLiFi',
GET_STEP_TRANSACTIONS: 'exchange/getStepTransactions',
GET_EXCHANGE_SUPPORTED_ASSETS: 'assets/exchangeSupportedAssets',
Expand Down
1 change: 0 additions & 1 deletion src/sdk/api/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { FetchPolicy } from '@apollo/client/core';

export interface ApiOptions {
host: string;
projectKey: string;
port?: number;
useSsl?: boolean;
}
Expand Down
2 changes: 0 additions & 2 deletions src/sdk/base/VerifyingPaymasterAPI.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { ethers } from 'ethers';
import fetch from 'cross-fetch';
import { Buffer } from 'buffer';
import { calcPreVerificationGas } from './calcPreVerificationGas';
import { PaymasterAPI } from './PaymasterAPI';
import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount';
import { toJSON } from '../common/OperationUtils';

const SIG_SIZE = 65;
const DUMMY_PAYMASTER_AND_DATA =
'0x0101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101';

Expand Down
1 change: 0 additions & 1 deletion src/sdk/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
export enum HeaderNames {
AuthToken = 'x-auth-token',
AnalyticsToken = 'x-analytics-token',
ProjectKey = 'x-project-key',
ProjectMetadata = 'x-project-metadata',
}

Expand Down
1 change: 1 addition & 0 deletions src/sdk/data/classes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ export * from './token-list';
export * from './token-lists';
export * from './token-list-token';
export * from './paginated-tokens';
export * from './transactions';
71 changes: 71 additions & 0 deletions src/sdk/data/classes/transactions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { BigNumber } from 'ethers';
import { TransactionStatuses } from '../constants';

export class Transactions {
transactions: UserOpsTransaction[];
pageInfo?: {
currentPage: number;
limit: number;
};
}

class UserOpsTransaction {
chainId: number;
sender: string;
target?: string | null;
transactionHash: string;
userOpHash: string;
actualGasCost: number;
actualGasUsed: number;
success: TransactionStatuses;
timestamp: number;
paymaster: string;
value: number;
blockExplorerUrl: string;
input: string;
nonce: number;
initCode?: string;
callData?: string;
accountGasLimits?: string;
gasFees?: string;
callGasLimit: BigNumber;
verificationGasLimit: BigNumber;
preVerificationGas: BigNumber;
maxFeePerGas: BigNumber;
maxPriorityFeePerGas: BigNumber;
paymasterAndData?: string;
signature?: string;
beneficiary?: string;
nativeTransfers?: NativeTransfersEntity[];
erc20Transfers?: Erc20TransfersEntity[];
nftTransfers?: NFTTransfersEntity[];
}

class Erc20TransfersEntity {
from: string;
to: string;
value: number;
asset?: string;
address: string;
decimal: number;
}

class NativeTransfersEntity {
from: string;
to: string;
value: string;
asset?: string;
address: string;
decimal: number;
data: string;
}

class NFTTransfersEntity {
from: string;
to: string;
value: number;
tokenId: number;
asset?: string;
category: string;
address: string;
}
Loading

0 comments on commit b51581c

Please sign in to comment.