🌐Environments & Networks

More detail about environments and networks

Depending on which environment your application is connecting to, your blockchain transactions will be directed to a specific blockchain network.

Details

Production

Endpoints

Click the link below to learn how to get started with Venly Products.

🧙 Click here to get started.

Blockchain networks

You are able to use your own nodes by making use of the network parameter.

Sandbox

Endpoints

Blockchain networks

How to select an environment

By default, you will connect to our production environment

// use production environment
const venlyConnect = new VenlyConnect('CLIENT_ID');

To connect to the sandbox environment you add the parameter environment

// use staging environment
const venlyConnect = new VenlyConnect('CLIENT_ID', { environment: 'sandbox'});

How to select a network

By default, you will connect to the blockchain network as described above. Mainnet when connecting to our production environment and a certain testnet when connecting to staging.

//Using the default Kovan Ethereum testnet
{
  "walletId" : "cdc4c08a-b8fa-4e4c-z5a2-92c87b80f174",
  "to" : "0xdc71b72db51e227e65a45004ab2798d31e8934c9",
  "secretType" : "ETHEREUM",
  "data" : "0x",
  "value" : 1.15
}

By making use of the network object, you can change the node endpoint. In the example below we are connecting to the Rinkeby Ethereum testnet, instead of the default Kovan testnet.

//Using a custom node to connect to the Rinkeby Ethereum testnet
{
  "walletId" : "cdc4c08a-b8fa-4e4c-z5a2-92c87b80f174",
  "to" : "0xdc71b72db51e227e65a45004ab2798d31e8934c9",
  "secretType" : "VECHAIN",
  "data" : "0x",
  "value" : 1.15
}

Last updated