Skip to main content

zksync-service

Functions

<dl> <dt><a href="#getChainConfig">getChainConfig()</a></dt> <dd><p>Get chain config by name</p> </dd> <dt><a href="#createClientWithFallback">createClientWithFallback()</a></dt> <dd><p>Create a client with fallback RPCs</p> </dd> <dt><a href="#getSupportedChains">getSupportedChains()</a></dt> <dd><p>Get supported chains</p> </dd> <dt><a href="#generatePrivateKey">generatePrivateKey()</a></dt> <dd><p>Generate a random private key</p> </dd> <dt><a href="#createWallet">createWallet()</a></dt> <dd><p>Create a new wallet on zkSync Era</p> </dd> <dt><a href="#getBalance">getBalance()</a></dt> <dd><p>Get wallet balance</p> </dd> <dt><a href="#getNativeBalance">getNativeBalance()</a></dt> <dd><p>Get native token balance</p> </dd> <dt><a href="#transfer">transfer()</a></dt> <dd><p>Transfer native tokens (ETH)</p> </dd> <dt><a href="#estimateGas">estimateGas()</a></dt> <dd><p>Estimate gas for a transaction</p> </dd> <dt><a href="#getTransactionReceipt">getTransactionReceipt()</a></dt> <dd><p>Get transaction receipt</p> </dd> <dt><a href="#getChainId">getChainId()</a></dt> <dd><p>Get chain ID</p> </dd> <dt><a href="#isValidAddress">isValidAddress()</a></dt> <dd><p>Validate address format</p> </dd> <dt><a href="#deployAccount">deployAccount()</a></dt> <dd><p>Deploy account (for account abstraction on zkSync) Note: This creates an EOA. For true AA, you'd need to deploy a smart contract account</p> </dd> <dt><a href="#getFeeEstimate">getFeeEstimate()</a></dt> <dd><p>Get fee estimate (includes zkSync specific L1 gas fee)</p> </dd> </dl>

<a name="getChainConfig"></a>

getChainConfig()

Get chain config by name

Kind: global function
<a name="createClientWithFallback"></a>

createClientWithFallback()

Create a client with fallback RPCs

Kind: global function
<a name="getSupportedChains"></a>

getSupportedChains()

Get supported chains

Kind: global function
<a name="generatePrivateKey"></a>

generatePrivateKey()

Generate a random private key

Kind: global function
<a name="createWallet"></a>

createWallet()

Create a new wallet on zkSync Era

Kind: global function
<a name="getBalance"></a>

getBalance()

Get wallet balance

Kind: global function
<a name="getNativeBalance"></a>

getNativeBalance()

Get native token balance

Kind: global function
<a name="transfer"></a>

transfer()

Transfer native tokens (ETH)

Kind: global function
<a name="estimateGas"></a>

estimateGas()

Estimate gas for a transaction

Kind: global function
<a name="getTransactionReceipt"></a>

getTransactionReceipt()

Get transaction receipt

Kind: global function
<a name="getChainId"></a>

getChainId()

Get chain ID

Kind: global function
<a name="isValidAddress"></a>

isValidAddress()

Validate address format

Kind: global function
<a name="deployAccount"></a>

deployAccount()

Deploy account (for account abstraction on zkSync) Note: This creates an EOA. For true AA, you'd need to deploy a smart contract account

Kind: global function
<a name="getFeeEstimate"></a>

getFeeEstimate()

Get fee estimate (includes zkSync specific L1 gas fee)

Kind: global function