Create a Vertex client
The VertexClient
Object
VertexClient
ObjectTo start using the SDK, you need an initialized VertexClient
from the client
package. The VertexClient
is the main entrypoint to common APIs.
Create a VertexClient
object
VertexClient
objectThe VertexClient
class is rarely instantiated directly. Instead, call the createVertexClient
function from the client
package and provide the relevant parameters.
Import the dependencies
Create a WalletClient
and PublicClient
WalletClient
and PublicClient
The WalletClient
is optional and required only for write operations
Call createVertexClient
createVertexClient
The first argument is the ChainEnv
associated with the client. Each client can talk to one chain that Vertex Edge is deployed on. For example, use arbitrumTestnet
to connect to Vertex's instance on Arbitrum Sepolia.
Full example
Run the script, this example uses ts-node
:
If no errors are thrown, you're good to go!
Last updated