Skip to content

Wallet Management

Getting Started with Wallets on Chaingateway

Section titled “Getting Started with Wallets on Chaingateway”

Chaingateway provides two methods for generating wallets: Password-Protected Wallets and Unsecure Wallets. Below, we describe both approaches, their security implications, and usage examples.

Section titled “1. Password-Protected Wallets (Recommended)”

If you provide a password body parameter in your request to /api/v2/{blockchain}/addresses, the generated wallet will have its private key stored securely in an encrypted format.

  • The private key is encrypted using your password and additional internal encryption mechanisms.
  • When sending transactions, you provide the password instead of the private key.
  • This method increases security by ensuring private keys are never exposed in API requests.
  • Updating Password: Use UPDATE /api/v2/{blockchain}/addresses/{address} with parameters old_password and new_password.
  • Exporting Private Key: Use POST /api/v2/{blockchain}/addresses/export/{address} to retrieve your private key (requires password).

::: danger Store your password securely We never store private keys or passwords within our application—neither in our database nor in our logging or exception mechanisms. If you lose your password, we cannot restore your wallet’s private key. :::

Terminal window
curl --request POST \
--url https://app.chaingateway.io/api/v2/ethereum/addresses \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"password": "architecto"
}'
Terminal window
curl --request POST \
--url https://app.chaingateway.io/api/v2/ethereum/transactions \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"from": "0xSenderAddress",
"to": "0xRecipientAddress",
"amount": "100",
"password": "password"
}'

If you do not provide a password in your address creation request, the private key will be returned directly in the response. This means that the private key must be securely stored and managed on your end.

::: danger Only use for non-permanent wallets Since the private key is included in the response, it is your responsibility to securely store and protect it. We strongly recommend using password-protected wallets instead. If someone gains access to your private key, they can control all funds in the wallet. :::

  • The private key is exposed in the API response, making it vulnerable if intercepted.
  • If an attacker gains access to the private key, they can fully control the wallet.
  • This method should only be used for temporary wallets or single-use addresses.
Terminal window
curl --request POST \
--url https://app.chaingateway.io/api/v2/tron/addresses \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json'
Terminal window
curl --request POST \
--url https://app.chaingateway.io/api/v2/ethereum/transactions \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"from": "0xSenderAddress",
"to": "0xRecipientAddress",
"amount": "100",
"password": "password"
}'