Create A Wallet
Description
This endpoint is used to create a Wallet (see page in the Taurus User Guides, for more info).
This is a POST
method with the following json structure as input in the body of the call:
{
"name": "Test Wallet",
"currency": "ETH",
"isOmnibus": false,
"comment": "Some comment",
"customerId": "Used when Omnibus is false",
"blockchain": "ETH",
"network": "mainnet",
"visibilityGroupID": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6"
}
A wallet is associated with exactly one network of one blockchain (e.g. ETH on sepolia). To identify which blockchain and network either the currency
or blockchain
parameters are required inputs.
name This is a required parameter and has to be unique per blockchain, network.
currency This can be a currency symbol or a currency ID (see api/rest/v1/currencies). Needs to be the native currency of a blockchain.
isOmnibus When set to true
, the Wallet can be used as a source for transactions, allowing the system to pick addresses with adequate funds. (This is called Single owner
in the GUI)
comment This can be set to any valid JSON string (254 characters maximum length). It is not used or interpreted by the system and will be returned as is in the replies from endpoints such as api/rest/v2/wallets.
customerID This can be set to any valid JSON string (254 characters maximum length). It is not used or interpreted by the system other than associating it with all addresses created in this wallet.
blockchain A string identifying the blockchain (e.g. "BTC"). Required if currency
is empty. If the blockchain is enabled on more than one network (e.g. "mainnet" and "testnet"), the network needs to be specified.
network A string identifying the network. Required if the specified blockchain
is enabled on multiple networks.
visibilityGroupID The UUID of a Visibility Group (uuid can be obtained from e.g. api/rest/v1/visibilitygroups). The created wallet will only be visible and can only be managed by users in this group (see User Administration for more info on restricted visibility groups)
Prerequisites
Required Roles
AccountCreator, TPUser
Preconditions
It is important to note that the selected currency needs to be enabled in the configuration file for the respective tenant and also enabled in the governance rules.
Call Example
You can find a basic example in cURL below.
Please note that you will need to update the BASEURL
and the APITOKEN
for the command to function.
export BASEURL=https://taurus-protect-instance.com
export APIToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZXh0ZXJuYWxVc2VySUQiOiJ0ZWFtMUV4dGVybmFsVXNlcklEIiwidGVuYW50SUQiOjEsImNhcGl0YWxUZW5hbnRJRCI6MSwiZmlyc3RuYW1lIjoiSm9obiIsImxhc3RuYW1lIjoiRG9lIiwicm9sZXMiOlsidHB1c2VyIl0sImVtYWlsIjoidGVhbTFAYmFuay5jb20iLCJ1c2VybmFtZSI6InRlYW0xIiwiand0X3JlbmV3YWJsZV9hbW91bnQiOjAsImlzX3RvdHBfZW5hYmxlZCI6ZmFsc2UsImF1dGhfc3RhdHVzIjoiU1VDQ0VTUyIsImxhc3RfbG9naW4iOiIyMDIzLTAxLTAxVDAwOjAwOjAwLjE0OTc0NDIzMloiLCJsb2dnZWRfaW5fd2l0aF9zc28iOmZhbHNlLCJrZXkiOiIiLCJleHAiOjE2ODEyMTkyNzYsImlhdCI6MTY4MTIxNzQ3Nn0.K_85arIrigpkN1yHttCydpeT6oVg2c6PyQnuji907Og
curl --location "$BASEURL/api/rest/v1/wallets" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $APIToken" \
--data '{
"currency": "ETH",
"name": "API-Documentation-Test"
}'
This piece of code sends a POST request to https://your-protect-instance.example.com/api/rest/v1/wallets with the JSON string in the request body.
Call Result
A successful response for the POST call to create a wallet might look like this:
{
"result": {
"id": "71336",
"balance": {
"totalConfirmed": "0",
"totalUnconfirmed": "0",
"availableConfirmed": "0",
"availableUnconfirmed": "0",
"reservedConfirmed": "0",
"reservedUnconfirmed": "0"
},
"currency": "ETH",
"coin": "ETH",
"name": "API-Documentation-Test",
"accountPath": "m/44'/60'/96'",
"creationDate": "2023-03-30T15:31:55.170253Z",
"updateDate": "2023-03-30T15:31:55.170253Z",
"blockchain": "ETH"
...
}
}
In this example the JSON response object contains the various wallet details, including the newly assigned unique Wallet id
. For a complete list of possible fields in the return object, please refer to the api/rest/v1/wallets reference documentation.
You can find the Swagger-generated page for this endpoint in the following link.
Updated 15 days ago