1. Home
  2. Docs
  3. Enterprise Wallet
  4. Developer Documentation
  5. Wallets

Wallets

Before you can safely send or receive crypto assets using our product, you need to set up a multi-signature wallet. You will be asked to provide root public keys or BIP32 specification. In a typical 2/3 multi-signature setup, User and Enterprise Wallet will hold one root private key. A backup key will be also required in case the user loses his primary root private key.

Credence API Endpoint.

Key Generation

This endpoint in Credence creates a new HD root private-public key pair. A set of 24 words – called Mnemonic words will be generated which is supposed to be kept safe by the user. These words are equivalent to your private key since the private key can be derived from these words. Enterprise Wallet does not store this and cannot recover these words for you at any point.

Request Type and Endpoint

GET /credenceapi/rootkey/generate
Request – Response Example
curl --request GET \
  --url http://localhost:5000/credenceapi/v1/rootkey/generate \
  --header 'content-type: application/json'
{
  "seed": "54D04AF25135CFEC1579656FA8DB725FF86FB19CD33704257DCB020E317E5D6AE0C4A8CC0DDD975B4B3B0450B3F4F114D43173A29F7D72D669CF6D6C1082A3B7",
  "words": "arena valve initial come sugar patch royal never push exile spoon rifle laugh wait stock index math claim awkward forget good gold upon carbon",
  "x_priv": "xprv9s21ZrQH143K4LJe2Ko8XKFX5dFX4XHU6tdvNHptCZZPnxgQjdYHtwwYESjbPegCyqnHBuB4rFieGUHadXBdi7Re3ds7PPmMKJbHwh33TS7",
  "x_pub": "xpub661MyMwAqRbcGpP78ML8tTCFdf61Tz1KU7ZXAgEVku6Nfm1ZHArYSkG25mUmfrXZ2ssqJff9vGQFZ8Z6vywQyHQxMWuVxaQps6MPbge5MZQ"
}

Credence API Endpoint.

Key Recovery

This endpoint in Credence recovers private-public key pair from the provided mnemonic words. This can be used in case user no longer remembers his private public key pairs.

This functionality is also available in Credence desktop application.

Request Type and Endpoint

GET /credenceapi/rootkey/generate
Request – Response Example
curl --request POST \
  --url http://localhost:5000/credenceapi/v1/rootkey/generate \
  --header 'content-type: application/json' \
  --data '{"words": "minute lab claw whale tone reunion element blur smoke stone lady habit sponsor food lunar"}'
{
  "seed": "2542FCF849EFCDE147B6E182FFF3DFCB78DCE7C9F977678B59DA10282F07E41ECA719A64B2A15C386D74ACC2D63FFFD9D79489A65CEEEDF9850197C1FC516131",
  "words": "minute lab claw whale tone reunion element blur smoke stone lady habit sponsor food lunar",
  "x_priv": "xprv9s21ZrQH143K34bSKH9ea65FSBFjVNBkMzU4sRqu9m7H4BwVmq83PbJPYF6oGjiPJa8Zj3RS99cKLSJaeCYbcEd7Haju6GWS8Nd27Nz1DWE",
  "x_pub": "xpub661MyMwAqRbcFYfuRJgewE1yzD6DtpubjDPffpFWi6eFvzGeKNSHwPcsPZYfhFB7jn5YqFSqfvzhQBonFrRikk7JippsSD85icekru1Pb8t"
}

Enterprise Wallet API Endpoint.

Create Wallet

This endpoint creates a new wallet.

Request Type and Endpoint

POST api/v1/wallets

Request Parameters

ParameterTypeDescriptionRequired
client_keys[string]Root public key from user, omit if signature type is hostedNo
labelstringA name for the walletYes
signature_typestringType of multisig walletYes
recoveryboolRecovery option is false add params to recovery_keysNo
recovery_keys[string]Recovery keys from userNo
coin_namestringSupported coin name. eg: bitcoinYes

Response Parameters

ParameterTypeDescriptionRequired
public_keystringRoot public key from userYes
labelstringA name for the walletYes
Request – Response Example

UTXO based coin example

HTTP_METHOD=POST  
HOST=https://coinome.com/wallet  
URI=/api/v1/wallets  
CONTENT_TYPE=application/json  
ACCESS_TOKEN=2c6bbada11f6c21738deea51c215ba664d6f6a4a707e4e5fdc10161ee2bb6abf
DATA='{
    "client_keys": ["xpub661MyMwAqRbcF4ceR3gLXaH4FL48WdnocXxs7pZvwSBkJNMhqRWZA7LUefxjjprdFFhR3nhowFs1fNnQVEMUikxLDUhdY9YMUANyMJGT6Qy"],
    "label": "mywallet",
    "signature_type": "multisig-2-of-3",
    "coin_name": "bitcoin",
    "recovery": false,
    "recovery_keys": ["xpub661MyMwAqRbcEjTKyonWcwzp8mcuZCqBnLDrf3bJ1cGGNxBnHqgvMWCVBNiwtBbDgokowDDtzYBdF1kqYUVDcC4mPXUwKw2MXQMNvNkCxUU"]
}'

curl -H "Content-Type: $CONTENT_TYPE" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-X $HTTP_METHOD "$HOST$URI" \
-d "$DATA"
{
    "data": {
        "id": "592071639",
        "type": "wallet",
        "attributes": {
            "label": "my bitcoin 2",
            "active": true,
            "coin": "btc",
            "signature_type": "multisig 2/3",
            "recovery": true,
            "created_at": "2019-03-28T10:37:09.000Z",
            "updated_at": "2019-03-28T10:37:09.000Z"
        }
    }
}

Account based coin example

HTTP_METHOD=POST  
HOST=https://coinome.com/wallet  
URI=/api/v1/wallets
CONTENT_TYPE=application/json  
ACCESS_TOKEN=8e1ef1348b9de58be50e0ba1d9fba6ea8a57676e66c3ab560fbebe3ae692fd0f
DATA='{
    "client_keys": ["xpub661MyMwAqRbcEzMVZcTXvXq6LMX2zZceK8xC1jTGVorFdFCHTB8jUbxw3rVtT4k2GcZus7RYTM6AeP28bGXsG6PuADQFBsMMZJWvHWtpwco"],
    "label": "my eth wallet1",
    "coin_name": "ethereum",
    "signature_type": "single_multisig_2/3",
    "recovery": true
}'  

curl -H "Content-Type: $CONTENT_TYPE" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-X $HTTP_METHOD "$HOST$URI" \
-d "$DATA"
{
    "data": {
        "id": "1064699362",
        "type": "wallet",
        "attributes": {
            "label": "my eth wallet21",
            "active": true,
            "coin": "eth",
            "signature_type": "multisig 2/3",
            "recovery": false,
            "created_at": "2019-03-28T12:10:56.665Z",
            "updated_at": "2019-03-28T12:10:56.665Z",
            "details": {
                "fee_address": "0xaedead1ed65cd96c27e324e81a52d0d948d519b1"
            }
        }
    }
}


Enterprise Wallet API Endpoint.

Show Wallet

Request Type and Endpoint

GET api/v1/wallets/:id

Request Query Parameters

ParameterTypeDescriptionRequired
IDIntegerThe ID of the Wallet to retrieveYes
Request – Response Example

UTXO based coin example

HTTP_METHOD=GET    
HOST=https://coinome.com/wallet 
URI=/api/v1/wallets/1331612684  
CONTENT_TYPE=application/json   
ACCESS_TOKEN=2c6bbada11f6c21738deea51c215ba664d6f6a4a707e4e5fdc10161ee2bb6abf  

curl -H "Content-Type: $CONTENT_TYPE" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-X $HTTP_METHOD "$HOST$URI"
{
    "data": {
        "id": "592071639",
        "type": "wallet",
        "attributes": {
            "label": "my bitcoin 2",
            "active": true,
            "coin": "btc",
            "signature_type": "multisig 2/3",
            "recovery": true,
            "created_at": "2019-03-28T10:37:09.000Z",
            "updated_at": "2019-03-28T10:37:09.000Z",
            "details": {
                "balance": {
                    "confirmed_balance": 0,
                    "unconfirmed_balance": 0,
                    "locked_balance": 0
                }
            }
        }
    }
}

Account based coin example

HTTP_METHOD=GET
HOST=https://coinome.com/wallet
URI=/api/v1/wallets/285295588
CONTENT_TYPE=application/json
ACCESS_TOKEN=8e1ef1348b9de58be50e0ba1d9fba6ea8a57676e66c3ab560fbebe3ae692fd0f

curl -H "Content-Type: $CONTENT_TYPE" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-X $HTTP_METHOD "$HOST$URI"
{
    "data": {
        "id": "1064699362",
        "type": "wallet",
        "attributes": {
            "label": "my eth wallet21",
            "active": true,
            "coin": "eth",
            "signature_type": "multisig 2/3",
            "recovery": false,
            "created_at": "2019-03-28T12:10:56.665Z",
            "updated_at": "2019-03-28T12:10:56.665Z",
            "details": {
                "balance": {
                    "pool_address": null,
                    "fee_address": {
                        "address": "0xaedead1ed65cd96c27e324e81a52d0d948d519b1",
                        "balance": 0
                    }
                }
            }
        }
    }
}


Enterprise Wallet API Endpoint.

List Wallets

Request Type and Endpoint

GET  api/v1/wallets

Request Query Parameters

ParameterTypeDescriptionRequired
coin_namestringSupported coin name. eg: bitcoinYes
Request – Response Example

UTXO based coin example

HTTP_METHOD=GET    
HOST=https://coinome.com/wallet  
URI=/api/v1/wallets   
CONTENT_TYPE=application/json   
ACCESS_TOKEN=2c6bbada11f6c21738deea51c215ba664d6f6a4a707e4e5fdc10161ee2bb6abf  

curl -H "Content-Type: $CONTENT_TYPE" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-X $HTTP_METHOD "$HOST$URI"
{
    "data": [{
        "id": "1425973693",
        "type": "wallet",
        "attributes": {
            "label": "my bitcoin 1",
            "active": true,
            "coin": "btc",
            "signature_type": "multisig 2/3",
            "recovery": true,
            "created_at": "2019-03-28T09:22:17.225Z",
            "updated_at": "2019-03-28T09:22:17.225Z",
            "details": {
                "balance": {
                    "confirmed_balance": 0,
                    "unconfirmed_balance": 0,
                    "locked_balance": 0
                }
            }
        }
    }, {
        "id": "592071639",
        "type": "wallet",
        "attributes": {
            "label": "my bitcoin 2",
            "active": true,
            "coin": "btc",
            "signature_type": "multisig 2/3",
            "recovery": true,
            "created_at": "2019-03-28T10:37:09.000Z",
            "updated_at": "2019-03-28T10:37:09.000Z",
            "details": {
                "balance": {
                    "confirmed_balance": 0,
                    "unconfirmed_balance": 0,
                    "locked_balance": 0
                }
            }
        }
    }]
}

*Account based coin example

HTTP_METHOD=GET
HOST=https://coinome.com/wallet 
URI=/api/v1/wallets
CONTENT_TYPE=application/json
ACCESS_TOKEN=8e1ef1348b9de58be50e0ba1d9fba6ea8a57676e66c3ab560fbebe3ae692fd0f

curl -H "Content-Type: $CONTENT_TYPE" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-X $HTTP_METHOD "$HOST$URI"
{
    "data": [{
        "id": "660888859",
        "type": "wallet",
        "attributes": {
            "label": "eth single 2 of 3",
            "active": true,
            "coin": "eth",
            "signature_type": "multisig 2/3",
            "recovery": false,
            "created_at": "2019-03-22T10:26:28.802Z",
            "updated_at": "2019-03-28T12:39:42.923Z",
            "details": {
                "balance": {
                    "pool_address": {
                        "address": "0x490f3e00d778bfa9e1e408647dd53541d7d5c5fc",
                        "balance": 500600000000000000
                    },
                    "fee_address": {
                        "address": "0x23ba2b52cd55f95cb0216630e73ae465415eb20c",
                        "balance": 997630853000000000
                    }
                }
            }
        }
    }, {
        "id": "285295588",
        "type": "wallet",
        "attributes": {
            "label": "eth multisig2 2 of 3 ",
            "active": true,
            "coin": "eth",
            "signature_type": "multisig 2/3",
            "recovery": false,
            "created_at": "2019-03-22T12:08:22.507Z",
            "updated_at": "2019-03-28T12:39:42.929Z",
            "details": {
                "balance": {
                    "pool_address": {
                        "address": "0x34b6591051c3d5a712b37bf24647df8cc519a6d2",
                        "balance": 498420000000000000
                    },
                    "fee_address": {
                        "address": "0x8309f08d61138d2c086531c3a84c16d25589e54f",
                        "balance": 998552790000000000
                    }
                }
            }
        }
    }]
}

Enterprise Wallet API Endpoint.

Spending Limits

Users of Enterprise Wallet can set various limits on their wallet for added security and control.

Create Spending Limits

Request Type and Endpoint

POST  /api/v1/wallets/wallet_id/settings/spending_limits

Request Query Parameters

ParameterTypeDescriptionRequired
wallet_idIntegerId of the wallet.Yes
ParameterTypeDescriptionRequired
categoryStringLimit can be set for per_transaction, per_day, per_hourYes
valueFloatValue of currency. Eg: To add a limit of 2.5 BTC per dayYes
otpIntegerTOTP value from google authenticatorYes
Request – Response Example
HTTP_METHOD=POST  
HOST=https://coinome.com/wallet  
URI=/api/v1/wallets/1339701456/settings/spending_limits
CONTENT_TYPE=application/json   
ACCESS_TOKEN=2c6bbada11f6c21738deea51c215ba664d6f6a4a707e4e5fdc10161ee2bb6abf  
DATA='{"category": "per_transaction","value": 1, "otp": 456789}'

curl -H "Content-Type: $CONTENT_TYPE" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-X $HTTP_METHOD "$HOST$URI" \
-d "$DATA" 
{
	"data": {
		"id": "18",
		"type": "spending_limit",
		"attributes": {
			"wallet_id": 1339701456,
			"category": "per_transaction",
			"value": 100000000,
			"active": true,
			"created_at": "2019-04-11T09:42:11.705Z",
			"updated_at": "2019-04-24T09:12:33.266Z"
		}
	}
}


Lists of Spending Limits

Request Type and Endpoint

GET  /api/v1/wallets/wallet_id/settings/spending_limits

Request Query Parameters

ParameterTypeDescriptionRequired
wallet_idIntegerId of the wallet.Yes
Request – Response Example
HTTP_METHOD=GET
HOST=https://coinome.com/wallet   
URI=/api/v1/wallets/1339701456/settings/spending_limits   
CONTENT_TYPE=application/json   
ACCESS_TOKEN=2c6bbada11f6c21738deea51c215ba664d6f6a4a707e4e5fdc10161ee2bb6abf  

curl -H "Content-Type: $CONTENT_TYPE" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-X $HTTP_METHOD "$HOST$URI"
{
	"data": [{
		"id": "35",
		"type": "spending_limit",
		"attributes": {
			"wallet_id": 1339701456,
			"category": "per_day",
			"value": 400000000,
			"active": true,
			"created_at": "2019-04-18T06:52:45.943Z",
			"updated_at": "2019-04-18T10:20:47.426Z"
		}
	}, {
		"id": "19",
		"type": "spending_limit",
		"attributes": {
			"wallet_id": 1339701456,
			"category": "per_hour",
			"value": 300000000,
			"active": false,
			"created_at": "2019-04-11T09:42:11.726Z",
			"updated_at": "2019-04-18T10:20:50.706Z"
		}
	}, {
		"id": "18",
		"type": "spending_limit",
		"attributes": {
			"wallet_id": 1339701456,
			"category": "per_transaction",
			"value": 100000000,
			"active": true,
			"created_at": "2019-04-11T09:42:11.705Z",
			"updated_at": "2019-04-24T09:12:33.266Z"
		}
	}]
}


Deactivate Spending Limit

Request Type and Endpoint

PATCH  /api/v1/wallets/:wallet_id/settings/spending_limits/:id

Request Query Parameters

ParameterTypeDescriptionRequired
wallet_idIntegerId of the wallet.Yes
idIntegerSpending limit id.Yes
otpIntegerTOTP from google authenticatorYes
Request – Response Example
HTTP_METHOD=PATCH
HOST=https://coinome.com/wallet   
URI=/api/v1/wallets/1339701456/settings/spending_limits/18
CONTENT_TYPE=application/json   
ACCESS_TOKEN=2c6bbada11f6c21738deea51c215ba664d6f6a4a707e4e5fdc10161ee2bb6abf     
DATA='{"otp": 456789}'

curl -H "Content-Type: $CONTENT_TYPE" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-X $HTTP_METHOD "$HOST$URI" \
-d "$DATA"
{
	"data": {
		"id": "18",
		"type": "spending_limit",
		"attributes": {
			"wallet_id": 1339701456,
			"category": "per_transaction",
			"value": 100000000,
			"active": false,
			"created_at": "2019-04-11T09:42:11.705Z",
			"updated_at": "2019-04-24T09:17:03.491Z"
		}
	}
}