Creating a wallet
When deploying and interacting with Smart Contracts, you can create a wallet on KMS to sign transactions.
caution
Do not use wallets on Starton KMS for production.Starton provides test wallets hosted on our Key Management System, but when going in production, to maintain control over your wallets, you should use your own KMS. To create a wallet on Starton KMS use the /kms/wallet endpoint and enter for "kmsId" the value "kms_33333333333333333333333333333333”.
- From Code
- From Webapp
To create a wallet from the code of your application, use the following snippet. You can find the full list of networks and event types in our API reference.
const axios = require("axios")
// First, authenticate to the API
const startonApi = axios.create({
baseURL: "https://api.starton.com",
headers: {
"x-api-key": "YOUR_API_KEY",
},
})
// Use the wallet creation endpoint
startonApi
.post("/v3/kms/wallet", {
description: '',
name: '',
metadata: {},
kmsId: ''}
})
.then((response) => {
console.log(response.data)
})
- From Dashboard, go to Wallet.
- Click Add a wallet.
- Select a type of wallet:
- Create a wallet on Starton's Key Management System enables you to deploy and interact with Smart Contracts on testnets.
- Connect a single Wallet from a Key Management System enables you to set up a wallet to sign transactions automatically.
- Connect your KMS and grand full access to Starton enables you to use multiple wallets for advanced projects.
- Enter a Name and a Description for your wallet.
You can now use your wallet.