Generate Address

Guide on generating and managing wallet address

There are two ways to generate an address on Bitpowr, either via the Dashboard which we have covered here or via the API.

In order to generate an address, you need to pass the values below:

  1. Label: The label attached to the address. This would be attached to the webhook whenever you received deposits
  2. Asset: The asset the address is associated.
  3. Account ID: The account/wallet uid to generate the address on
  4. Address Type: The address type can be segwit, wrappedsegwit or legacy or contract
  5. Derivation Index: The derivation index of the address you want to generate. address derivation index - default(last derivationIndex + 1). For instance, it can be used to generate the same address across multiple EVM chains and ERC20 tokens. Can also be used to generate a different version of BTC and LTC address at the same index.
  6. Enable Native Token: Automatically generate native address for non native token address at the same index. E.g USDC and ETH or USDT_TRON and TRON
  7. Is Contract: Generate a smart contract address for EVM chains. Ethereum, BSC, Polygon, Tron
  8. Customer ID : The customer id to attach to this address
  9. Deployment Params : Deployment paramaters to pass when generating a smart contract wallet.
    1. autoDeploy: Auto deploy wallet address when initial deposit is received
    2. autoFlush: Auto flush native tokens on chain
    3. autoFlushErc20: Auto flush erc20 tokens on chain
curl --request POST \
     --url https://developers.bitpowr.com/api/v1/addresses \
     -H 'content-type: application/json'
		 -H 'authorization: Bearer <encodedToken>'
		 -d '{
          "label": "citguru",
          "asset": "BTC",
          "accountId": "ee349-dd34-33djf-344x",
          "addressType": "segwit"
        }'
curl --request POST \
     --url https://developers.bitpowr.com/api/v1/addresses \
     -H 'content-type: application/json'
		 -H 'authorization: Bearer <encodedToken>'
		 -d '{
          "label": "citguru",
          "asset": "ETH",
          "accountId": "ee349-dd34-33djf-344x"
        }'
curl --request POST \
     --url https://developers.bitpowr.com/api/v1/addresses \
     -H 'content-type: application/json'
		 -H 'authorization: Bearer <encodedToken>'
		 -d '{
          "label": "citguru",
          "asset": "USDT_TRON",
          "accountId": "ee349-dd34-33djf-344x",
          "addressType": "segwit",
          "derivationIndex": 1
        }'
curl --request POST \
     --url https://developers.bitpowr.com/api/v1/addresses \
     -H 'content-type: application/json'
		 -H 'authorization: Bearer <encodedToken>'
		 -d '{
          "label": "citguru",
          "asset": "BTC",
          "accountId": "ee349-dd34-33djf-344x",
          "addressType": "segwit",
          "customerId": "customer Id"
        }'
curl --request POST \
     --url https://developers.bitpowr.com/api/v1/addresses \
     -H 'content-type: application/json'
		 -H 'authorization: Bearer <encodedToken>'
		 -d '{
          "label": "citguru",
          "asset": "ETH",
          "accountId": "ee349-dd34-33djf-344x",
          "derivationIndex": 1
        }'

API Reference

You can view the API reference for working with Addresses