NAV Navigation
JavaScript Shell

Unbound CASP API for Built-in Wallets v1.0.2007

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Unbound’s Crypto Asset Security Platform ("CASP") provides the advanced technology and the architecture to secure crypto asset transactions. The crypto asset solution contains the CASP service and different end points (humans or BOTs).

CASP provides the framework to create Accounts, which hold multiple Vaults where secrets are stored. Access control is managed by the Quorum Policy for all of the Participants.

For information about using these APIs, see the Unbound CASP Developers Guide, or the API references:

For more information about CASP, see:

For more information about the BIP standards, see:

Email: Unbound Tech Support Web: Unbound Tech Support

System

Get configuration

Code samples


fetch('/api/v1.0/config',
{
  method: 'GET'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /api/v1.0/config

GET /config

Returns the configuration including supported blockchain providers and adaptors

Responses

Status Meaning Description Schema
default Default Returns configuration None

Get system status

Code samples


fetch('/api/v1.0/status',
{
  method: 'GET'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /api/v1.0/status

GET /status

Used for checking the system operational status

Responses

Status Meaning Description Schema
200 OK Current system status None

Ledger Operations

Get ledger address balance

Code samples


const headers = {
  'Accept':'application/json'

};

fetch('/api/v1.0/ledgers/{ledgerId}/addresses/{address}/balance',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /api/v1.0/ledgers/{ledgerId}/addresses/{address}/balance \
  -H 'Accept: application/json'

GET /ledgers/{ledgerId}/addresses/{address}/balance

Request balance for one or more assets per ledger address.

Parameters

Name In Type Required Description
ledgerId path string true none
address path string true The target address the balance is required for
assets query array[string] false A list of asset symbols the balance is requested for. If this parameter is not provided, then the default asset defined for the ledger is used.

Example responses

200 Response

{
  "address": "0x7827D7fDb2B161a27fFeD3cC25C560D7aEFE2BD5",
  "balances": [
    {
      "asset": "YEENUS",
      "amount": 885.82
    },
    {
      "asset": "ETH",
      "amount": 8.2221820926
    },
    {
      "asset": "BOKKY",
      "amount": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Requested balances AddressBalanceResponse
422 Unprocessable Entity One or more the provided arguments is invalid AppError

Validate ledger address

Code samples


const headers = {
  'Accept':'application/json'

};

fetch('/api/v1.0/ledgers/{ledgerId}/addresses/{address}/valid',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /api/v1.0/ledgers/{ledgerId}/addresses/{address}/valid \
  -H 'Accept: application/json'

GET /ledgers/{ledgerId}/addresses/{address}/valid

Check the validity of a ledger address.

Parameters

Name In Type Required Description
ledgerId path string true none
address path string true The address to check

Example responses

200 Response

{
  "address": "0x7827D7fDb2B161a27fFeD3cC25C560D7aEFE2BD5",
  "valid": true
}

Responses

Status Meaning Description Schema
200 OK Validity test result Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» address string false none Target address that was checked
» valid boolean false none True if the address is valid or false otherwise

Convert public key to ledger address

Code samples

const inputBody = '{
  "keys": [
    "3056301006072A8648CE3D020106052B8104000A03420004A17D64FCFCE5FE10943FCC7E6BBDE1BD49EBC596297813C4FE3CCB0343B44236DD189B32B0C88D6F12067F1237A95286C82162B078D686A79C986E1204A6E162"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'

};

fetch('/api/v1.0/ledgers/{ledgerId}/address-from-publickey',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /api/v1.0/ledgers/{ledgerId}/address-from-publickey \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /ledgers/{ledgerId}/address-from-publickey

Convert a public key to ledger address

Body parameter

{
  "keys": [
    "3056301006072A8648CE3D020106052B8104000A03420004A17D64FCFCE5FE10943FCC7E6BBDE1BD49EBC596297813C4FE3CCB0343B44236DD189B32B0C88D6F12067F1237A95286C82162B078D686A79C986E1204A6E162"
  ]
}

Parameters

Name In Type Required Description
ledgerId path string true none
body body object false none
» keys body [string] false none

Example responses

200 Response

{
  "items": [
    {
      "address": "0x63e4a30a5ce88660BBf99D7B0547E718558bC662"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Keys converted successfully Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» items [Address] false none none
»» address string false none none

Vault Operations

Refer to the Vault Operations section in the Unbound CASP Developers Guide.

For some functionality, you may need to refer to the BYOW Vault Operation APIs. For example, the endpoint to create a new vault is described there.

Get wallet balance

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/api/v1.0/vaults/{vaultId}/balance',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /api/v1.0/vaults/{vaultId}/balance \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

GET /vaults/{vaultId}/balance

Get vault wallet balance

Parameters

Name In Type Required Description
vaultId path string true none
assets query array[string] false A list of asset symbols the balance is requested for. If this parameter is not provided, then the default asset defined for the ledger is used.
coin query string false none
account query string false none

Example responses

200 Response

{
  "address": "0x7827D7fDb2B161a27fFeD3cC25C560D7aEFE2BD5",
  "balances": [
    {
      "asset": "YEENUS",
      "amount": 885.82
    },
    {
      "asset": "ETH",
      "amount": 8.2221820926
    },
    {
      "asset": "BOKKY",
      "amount": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Requested vault balance VaultBalanceResponse

Create withdrawal request

Code samples

const inputBody = '{
  "amount": "1.3",
  "asset": "YEENUS",
  "recipientAddress": "0x7827D7fDb2B161a27fFeD3cC25C560D7aEFE2BD5",
  "description": "Payment 3332",
  "fee": "HIGH"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/api/v1.0/vaults/{vaultId}/withdrawals',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /api/v1.0/vaults/{vaultId}/withdrawals \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: API_KEY'

POST /vaults/{vaultId}/withdrawals

Create a new withdrawal request.
The request is sent to CASP and starts the quorum approval process, which can take some time. Once the request is approved, CASP calls the POST /sign_complete_callback and the required signed transactions are sent to the ledger.

Body parameter

{
  "amount": "1.3",
  "asset": "YEENUS",
  "recipientAddress": "0x7827D7fDb2B161a27fFeD3cC25C560D7aEFE2BD5",
  "description": "Payment 3332",
  "fee": "HIGH"
}

Parameters

Name In Type Required Description
vaultId path string true none
body body WithdrawalRequest true none

Example responses

200 Response

{
  "id": "9767714e-4a32-4264-af91-0c48d437e698",
  "status": "EXECUTING",
  "isComplete": false,
  "appData": {
    "txs": [
      {
        "serialized": "f868808477359400828ccd94f6ff95d53e08c9660dc7820fd5a775484f77183a80b844a9059cbb0000000000000000000000007827d7fdb2b161a27ffed3cc25c560d7aefe2bd50000000000000000000000000000000000000000000000000000000007bfa480808080"
      }
    ]
  },
  "description": "dasdfa dfasdf "
}

Responses

Status Meaning Description Schema
200 OK Withdrawal request created successfully Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string false none The operation ID from CASP
» status string false none The request status. Normally this is EXECUTING.
» isComplete boolean false none The request completion status. Normally this is false as the request has just been submitted.
» description string false none The request description
» recipientVault string false none Optionally the recipient vault
» appData WithdrawalProviderData false none none
»» request WithdrawalRequest false none none
»»» recipientAddress string true none The ledger address to recieve the assets
»»» recipientVault string false none The target vault ID for internal transfers (originally for staking-pools)
»»» asset string false none (Optional) The asset to send. If not provided, the default ledger asset is used.
»»» amount any true none The asset amount to send

oneOf

Name Type Required Restrictions Description
»»»» anonymous number(double) false none none

xor

Name Type Required Restrictions Description
»»»» anonymous string false none none

continued

Name Type Required Restrictions Description
»»» description string true none A short text that describes the puprpose of this withdrawal.
»»» fee string false none A fee constant. Usually specificied as 'HIGH', 'MEDIUM' or 'LOW', but some ledgers use custom fee constants. If not provided, the ledger's default fee is used.
»» txs [object] false none A list of ledger tranasactions created for the withdrawal
»»» serialized string false none The HEX encoded serialized transaction

Update vault info

Code samples

const inputBody = '{
  "name": "string",
  "description": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'*/*',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{id}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X PUT /casp/api/v1.0/mng/vaults/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer API_KEY'

PUT /casp/api/v1.0/mng/vaults/{id}

Updates the details of an existing vault. The vault name and description can be updated.

Body parameter

{
  "name": "string",
  "description": "string"
}

Parameters

Name In Type Required Description
id path string true Vault ID
body body object true Update vault Request
» name body string false Vault name
» description body string false Vault description

Example responses

404 Response

Responses

Status Meaning Description Schema
200 OK OK None
202 Accepted Vault update accepted and needs to be approved by admin quorum. None
404 Not Found Vault not found Inline
500 Internal Server Error Update vault failed Inline

Response Schema

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Delete an existing vault

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X DELETE /casp/api/v1.0/mng/vaults/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

DELETE /casp/api/v1.0/mng/vaults/{id}

Deletes an existing vault. Only vaults which are not activated yet can be deleted.

Parameters

Name In Type Required Description
id path string true Vault ID

Example responses

403 Response

{
  "type": "string",
  "title": "string",
  "details": "string",
  "status": 0
}

Responses

Status Meaning Description Schema
200 OK OK None
403 Forbidden Vault deletion is not allowed Inline
404 Not Found Vault not found Inline
500 Internal Server Error Delete vault failed Inline

Response Schema

Status Code 403

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Resend sign transaction operation

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/sign/{operationid}/resend',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/operations/sign/{operationid}/resend \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/operations/sign/{operationid}/resend

Resend the sign operation metadata. This tries to resend the results of the sign operation and complete the coin transaction

Parameters

Name In Type Required Description
operationid path string true Operation ID

Example responses

400 Response

{
  "type": "string",
  "title": "string",
  "details": "string",
  "status": 0
}

Responses

Status Meaning Description Schema
200 OK OK None
400 Bad Request Cannot resend the sign operation Inline
404 Not Found Operation not found Inline
500 Internal Server Error Resend Operation failed Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

List UKC vault keys

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/ukcKeys',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/ukcKeys \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/vaults/{vaultId}/ukcKeys

List UKC vault keys

Parameters

Name In Type Required Description
vaultId path string true Vault ID

Example responses

200 Response

[
  {
    "ukcKeyId": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Vault not found Inline
500 Internal Server Error List UKC keys failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» ukcKeyId string true none The key UKC key ID

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Public key calculation status

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/calculatePublicKey/{operationid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/operations/calculatePublicKey/{operationid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/operations/calculatePublicKey/{operationid}

For some keys, calculating public keys requires approval of the admin group. This request queries the operation status.

Parameters

Name In Type Required Description
operationid path string true Operation ID

Example responses

200 Response

{
  "operationID": "string",
  "kind": "CREATE_VAULT",
  "status": "PENDING",
  "statusText": "string",
  "createdAt": "string",
  "vaultID": "string",
  "description": "string",
  "isApproved": true,
  "accountID": "string",
  "stakingPolicyID": "string",
  "groups": [
    {
      "name": "string",
      "members": [
        {
          "approvedAt": "string",
          "id": "string",
          "isApproved": true,
          "name": "string",
          "status": "STARTED",
          "approvalGroupAccount": {
            "id": "string",
            "name": "string"
          },
          "label": "string",
          "isGlobal": true,
          "isActive": true,
          "globalStatus": "string",
          "isOffline": true
        }
      ],
      "requiredApprovals": 0,
      "order": 0,
      "deactivateAllowed": true,
      "isOffline": true
    }
  ],
  "policy": {
    "id": "string",
    "name": "string"
  },
  "vaultName": "string",
  "recipientVaultInfo": {
    "recipientVaultID": "string",
    "recipientVaultName": "string"
  },
  "totsParams": [
    {
      "index": 0,
      "numberOfFragments": 0
    }
  ],
  "publicKeys": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Operation not found Inline
500 Internal Server Error Get Operation status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Request kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string true none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» stakingPolicyID string false none Staking Policy ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string true none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object true none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policy object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Item name for the operation
» recipientVaultInfo object false none Recipient vault info
»» recipientVaultID string false none none
»» recipientVaultName string false none none
» totsParams [object] true none Operation approval groups
»» index integer(int32) true none Index
»» numberOfFragments integer(int32) true none Number of fragments
» publicKeys [string] true none Operation approval groups

Enumerated Values

Property Value
kind CREATE_VAULT
kind ADD_MEMBER
kind SIGN
status PENDING
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status DECLINED
status CANCELED
status FAILED
status ERROR
status STARTED
status DONE
status DECLINED

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Policy Management

Refer to the Policy Management section in the Unbound CASP Developers Guide

Add member to vault

Code samples

const inputBody = '{
  "participantID": "string",
  "description": "string",
  "policyId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/approval_groups/{approvalGroupId}/members',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /casp/api/v1.0/mng/vaults/{vaultId}/approval_groups/{approvalGroupId}/members \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

POST /casp/api/v1.0/mng/vaults/{vaultId}/approval_groups/{approvalGroupId}/members

This API is used if a participant becomes unavailable or leaves an account and needs to be replaced with a new participant. A new participant may be added to an existing vault, but requires the approval of the existing vault quorum.

Body parameter

{
  "participantID": "string",
  "description": "string",
  "policyId": "string"
}

Parameters

Name In Type Required Description
vaultId path string true Vault ID
approvalGroupId path string true Approval Group Id
body body object true Add vault group participant request
» participantID body string true ParticipantWithVault ID
» description body string false Description
» policyId body string false policy id to join

Example responses

200 Response

{
  "operation": {
    "operationID": "string",
    "kind": "CREATE_VAULT",
    "status": "PENDING",
    "statusText": "string",
    "createdAt": "string",
    "vaultID": "string",
    "description": "string",
    "isApproved": true,
    "accountID": "string",
    "stakingPolicyID": "string",
    "groups": [
      {
        "name": "string",
        "members": [
          {
            "approvedAt": "string",
            "id": "string",
            "isApproved": true,
            "name": "string",
            "status": "STARTED",
            "approvalGroupAccount": {
              "id": "string",
              "name": "string"
            },
            "label": "string",
            "isGlobal": true,
            "isActive": true,
            "globalStatus": "string",
            "isOffline": true
          }
        ],
        "requiredApprovals": 0,
        "order": 0,
        "deactivateAllowed": true,
        "isOffline": true
      }
    ],
    "policy": {
      "id": "string",
      "name": "string"
    },
    "vaultName": "string",
    "recipientVaultInfo": {
      "recipientVaultID": "string",
      "recipientVaultName": "string"
    }
  },
  "participant": {
    "id": "string",
    "accountID": "string",
    "name": "string",
    "email": "string",
    "status": "NOT_ACTIVATED",
    "isActive": true,
    "accountName": "string",
    "role": "string",
    "pushEnabled": true,
    "offline": true,
    "activeOperations": 0,
    "deviceType": "IOS",
    "creationTime": "string",
    "modificationTime": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Item not found Inline
405 Method Not Allowed Not allowed Inline
500 Internal Server Error Add participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operation object true none Operation
»» operationID string true none Operation ID
»» kind string true none Request kind
»» status string true none Operation status
»» statusText string true none Operation status text
»» createdAt string true none Operation creation time
»» vaultID string true none Vault ID
»» description string true none Description of the operation
»» isApproved boolean true none Approval state for the operation
»» accountID string true none Account ID for the operation
»» stakingPolicyID string false none Staking Policy ID for the operation
»» groups [object] true none Operation approval groups
»»» name string true none Approval group name
»»» members [object] true none A list of participants in the group
»»»» approvedAt string true none ParticipantWithVault approval time
»»»» id string true none ParticipantWithVault ID
»»»» isApproved boolean true none ParticipantWithVault approval state
»»»» name string true none ParticipantWithVault name
»»»» status string true none ParticipantWithVault task status
»»»» approvalGroupAccount object true none none
»»»»» id string true none Account ID
»»»»» name string true none Account name
»»»» label string true none ParticipantWithVault label
»»»» isGlobal boolean true none ParticipantWithVault global state
»»»» isActive boolean true none none
»»»» globalStatus string true none none
»»»» isOffline boolean true none none
»»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»»» isOffline boolean true none Group is offline - conclude only offline participants
»» policy object false none Operation approval groups
»»» id string true none Policy id
»»» name string true none Policy name
»» vaultName string true none Item name for the operation
»» recipientVaultInfo object false none Recipient vault info
»»» recipientVaultID string false none none
»»» recipientVaultName string false none none
» participant object true none ParticipantWithVault
»» id string true none Participant ID
»» accountID string true none Participant account ID
»» name string true none Participant name
»» email string true none Participant email
»» status string true none Participant status
»» isActive boolean true none Participant activation state
»» accountName string true none Participant account name
»» role string true none Participant role
»» pushEnabled boolean true none Is the push notifications enabled for this participant
»» offline boolean true none Participant is offline
»» activeOperations integer(int64) true none Participant is offline
»» deviceType string false none Participant device type
»» creationTime string true none Participant creation time
»» modificationTime string true none Participant last modification time

Enumerated Values

Property Value
kind CREATE_VAULT
kind ADD_MEMBER
kind SIGN
status PENDING
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status DECLINED
status CANCELED
status FAILED
status ERROR
status STARTED
status DONE
status DECLINED
status NOT_ACTIVATED
status ACTIVATED
status DEACTIVATED
status SUSPENDED
status REVOKED
deviceType IOS
deviceType ANDROID
deviceType BOT

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 405

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Set vault member status

Code samples

const inputBody = '{
  "status": "DEACTIVATED"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/members/{participantId}/status',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X PUT /casp/api/v1.0/mng/vaults/{vaultId}/members/{participantId}/status \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

PUT /casp/api/v1.0/mng/vaults/{vaultId}/members/{participantId}/status

The suspended participant no longer takes part in the vault approval processes. Note that you can only suspend or revoke a user if the remaining number of participants is sufficient for the quorum, unless 'force' flag is provided.

Body parameter

{
  "status": "DEACTIVATED"
}

Parameters

Name In Type Required Description
participantId path string true Participant ID
vaultId path string true vault ID
force query boolean false Force update of participant status. Warning: Using this flag can result in an unusable vault!
body body object true Participant status update request
» status body string true ParticipantWithVault status in vault

Enumerated Values

Parameter Value
» status DEACTIVATED
» status SUSPENDED
» status REVOKED
» status ACTIVATED

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "status": "ACTIVATED",
  "approvalGroupAccount": {
    "id": "string",
    "name": "string"
  },
  "label": "string",
  "isGlobal": true,
  "isActive": true
}

Responses

Status Meaning Description Schema
200 OK OK Inline
202 Accepted Accepted Inline
403 Forbidden Suspending or revoking this participant would make the vault not operational (too few active participants left) Inline
404 Not Found Participant not found Inline
406 Not Acceptable Not supported Inline
500 Internal Server Error Set vault member status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string true none ParticipantWithVault ID
» name string true none ParticipantWithVault name
» status string true none ParticipantWithVault task status
» approvalGroupAccount object true none none
»» id string true none Account ID
»» name string true none Account name
» label string true none ParticipantWithVault label
» isGlobal boolean true none ParticipantWithVault global state
» isActive boolean true none none

Enumerated Values

Property Value
status ACTIVATED
status SUSPENDED
status REVOKED

Status Code 202

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Request kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string true none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» stakingPolicyID string false none Staking Policy ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string true none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object true none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policy object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Item name for the operation
» recipientVaultInfo object false none Recipient vault info
»» recipientVaultID string false none none
»» recipientVaultName string false none none

Enumerated Values

Property Value
kind CREATE_VAULT
kind ADD_MEMBER
kind SIGN
status PENDING
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status DECLINED
status CANCELED
status FAILED
status ERROR
status STARTED
status DONE
status DECLINED

Status Code 403

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 406

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Set vault member status (deprecated)

Code samples

const inputBody = '{
  "status": "DEACTIVATED",
  "policyId": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{id}/members/{participantId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X PUT /casp/api/v1.0/mng/vaults/{id}/members/{participantId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

PUT /casp/api/v1.0/mng/vaults/{id}/members/{participantId}

The suspended participant no longer takes part in the vault transaction approval processes. Note that you can only suspend or revoke a user, if the remaining number of participants is sufficient for the quorum policy, unless 'force' flag is provided.

Body parameter

{
  "status": "DEACTIVATED",
  "policyId": "string"
}

Parameters

Name In Type Required Description
participantId path string true Participant ID
id path string true vault ID
body body object true Participant status update request
» status body string true ParticipantWithVault status in vault
» policyId body string false The policy ID in which to change a participant's status. If none is specified, the participant's status will be changed in the admin quorum.

Enumerated Values

Parameter Value
» status DEACTIVATED
» status SUSPENDED
» status REVOKED
» status ACTIVATED

Example responses

404 Response

{
  "type": "string",
  "title": "string",
  "details": "string",
  "status": 0
}

Responses

Status Meaning Description Schema
200 OK OK None
404 Not Found Participant not found Inline
406 Not Acceptable Not supported Inline
500 Internal Server Error Set vault member status failed Inline

Response Schema

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 406

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Set policy member status

Code samples

const inputBody = '{
  "status": "DEACTIVATED"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/vaults/{vaultId}/policies/{policyId}/members/{participantId}/status',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X PUT /casp/api/v1.0/mng/vaults/{vaultId}/policies/{policyId}/members/{participantId}/status \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

PUT /casp/api/v1.0/mng/vaults/{vaultId}/policies/{policyId}/members/{participantId}/status

The suspended participant no longer takes part in the vault transaction approval processes. Note that you can only suspend or revoke a user, if the remaining number of participants is sufficient for the quorum policy, unless 'force' flag is provided.

Body parameter

{
  "status": "DEACTIVATED"
}

Parameters

Name In Type Required Description
participantId path string true Participant ID
vaultId path string true vault ID
policyId path string true policy ID
force query boolean false Force update of participant status
body body object true Participant status update request
» status body string true ParticipantWithVault status in vault

Enumerated Values

Parameter Value
» status DEACTIVATED
» status SUSPENDED
» status REVOKED
» status ACTIVATED

Example responses

200 Response

{
  "id": "string",
  "name": "string",
  "status": "ACTIVATED",
  "approvalGroupAccount": {
    "id": "string",
    "name": "string"
  },
  "label": "string",
  "isGlobal": true,
  "isActive": true
}

Responses

Status Meaning Description Schema
200 OK OK Inline
202 Accepted Accepted Inline
403 Forbidden Suspending or revoking this participant would make the vault not operational (too few active participants left) Inline
404 Not Found Item not found Inline
406 Not Acceptable Not supported Inline
500 Internal Server Error Set vault member status participant failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string true none ParticipantWithVault ID
» name string true none ParticipantWithVault name
» status string true none ParticipantWithVault task status
» approvalGroupAccount object true none none
»» id string true none Account ID
»» name string true none Account name
» label string true none ParticipantWithVault label
» isGlobal boolean true none ParticipantWithVault global state
» isActive boolean true none none

Enumerated Values

Property Value
status ACTIVATED
status SUSPENDED
status REVOKED

Status Code 202

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Request kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string true none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» stakingPolicyID string false none Staking Policy ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string true none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object true none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policy object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Item name for the operation
» recipientVaultInfo object false none Recipient vault info
»» recipientVaultID string false none none
»» recipientVaultName string false none none

Enumerated Values

Property Value
kind CREATE_VAULT
kind ADD_MEMBER
kind SIGN
status PENDING
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status DECLINED
status CANCELED
status FAILED
status ERROR
status STARTED
status DONE
status DECLINED

Status Code 403

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 406

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status of add member operation

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/addmember/{operationid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/operations/addmember/{operationid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/operations/addmember/{operationid}

Adding a new participant to a vault requires approval of the quorum. This request queries the status of such an asynchronous operation. The Operation ID parameter must be from an 'ADD_MEMBER' operation.

Parameters

Name In Type Required Description
operationid path string true Operation ID

Example responses

200 Response

{
  "operationID": "string",
  "kind": "CREATE_VAULT",
  "status": "PENDING",
  "statusText": "string",
  "createdAt": "string",
  "vaultID": "string",
  "description": "string",
  "isApproved": true,
  "accountID": "string",
  "stakingPolicyID": "string",
  "groups": [
    {
      "name": "string",
      "members": [
        {
          "approvedAt": "string",
          "id": "string",
          "isApproved": true,
          "name": "string",
          "status": "STARTED",
          "approvalGroupAccount": {
            "id": "string",
            "name": "string"
          },
          "label": "string",
          "isGlobal": true,
          "isActive": true,
          "globalStatus": "string",
          "isOffline": true
        }
      ],
      "requiredApprovals": 0,
      "order": 0,
      "deactivateAllowed": true,
      "isOffline": true
    }
  ],
  "policy": {
    "id": "string",
    "name": "string"
  },
  "vaultName": "string",
  "recipientVaultInfo": {
    "recipientVaultID": "string",
    "recipientVaultName": "string"
  },
  "groupName": "string",
  "participantName": "string",
  "participantID": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Operation not found Inline
500 Internal Server Error Get Operation status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Request kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string true none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» stakingPolicyID string false none Staking Policy ID for the operation
» groups [object] true none Operation approval groups
»» name string true none Approval group name
»» members [object] true none A list of participants in the group
»»» approvedAt string true none ParticipantWithVault approval time
»»» id string true none ParticipantWithVault ID
»»» isApproved boolean true none ParticipantWithVault approval state
»»» name string true none ParticipantWithVault name
»»» status string true none ParticipantWithVault task status
»»» approvalGroupAccount object true none none
»»»» id string true none Account ID
»»»» name string true none Account name
»»» label string true none ParticipantWithVault label
»»» isGlobal boolean true none ParticipantWithVault global state
»»» isActive boolean true none none
»»» globalStatus string true none none
»»» isOffline boolean true none none
»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»» isOffline boolean true none Group is offline - conclude only offline participants
» policy object false none Operation approval groups
»» id string true none Policy id
»» name string true none Policy name
» vaultName string true none Vault name for the operation
» recipientVaultInfo object false none Recipient vault info
»» recipientVaultID string false none none
»» recipientVaultName string false none none
» groupName string true none Group name to join
» participantName string true none Participant name
» participantID string true none Participan ID

Enumerated Values

Property Value
kind CREATE_VAULT
kind ADD_MEMBER
kind SIGN
status PENDING
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status DECLINED
status CANCELED
status FAILED
status ERROR
status STARTED
status DONE
status DECLINED

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status of join policy vault operation

Code samples


const headers = {
  'Accept':'application/json',
  'Authorization':'API_KEY'

};

fetch('/casp/api/v1.0/mng/operations/joinpolicyvault/{operationid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X GET /casp/api/v1.0/mng/operations/joinpolicyvault/{operationid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer API_KEY'

GET /casp/api/v1.0/mng/operations/joinpolicyvault/{operationid}

Returns join policy vault operation details. The Operation ID parameter must be from a 'JOIN_POLICY_VAULT' operation.

Parameters

Name In Type Required Description
operationid path string true Operation ID

Example responses

200 Response

{
  "operationID": "string",
  "kind": "CREATE_VAULT",
  "status": "PENDING",
  "statusText": "string",
  "createdAt": "string",
  "vaultID": "string",
  "description": "string",
  "isApproved": true,
  "accountID": "string",
  "stakingPolicyID": "string",
  "policies": [
    {
      "name": "string",
      "id": "string",
      "description": "string",
      "enabled": true,
      "timeZone": "string",
      "groups": [
        {
          "name": "string",
          "members": [
            {
              "approvedAt": "string",
              "id": "string",
              "isApproved": true,
              "name": "string",
              "status": "STARTED",
              "approvalGroupAccount": {
                "id": "string",
                "name": "string"
              },
              "label": "string",
              "isGlobal": true,
              "isActive": true,
              "globalStatus": "string",
              "isOffline": true
            }
          ],
          "requiredApprovals": 0,
          "order": 0,
          "deactivateAllowed": true,
          "isOffline": true
        }
      ],
      "rules": {
        "weeklyTimeSlots": [
          {
            "days": "string",
            "timeStart": "string",
            "timeEnd": "string"
          }
        ],
        "amountRange": {
          "property1": {
            "minimum": 0,
            "maximum": 0
          },
          "property2": {
            "minimum": 0,
            "maximum": 0
          }
        },
        "whiteList": [
          "string"
        ],
        "derivedWhiteList": [
          {
            "chainCode": "string",
            "publicKey": "string",
            "level": 0,
            "parentFingerprint": "string",
            "childNumber": 0
          }
        ]
      }
    }
  ],
  "vaultName": "string",
  "groupNameToJoin": "string"
}

Responses

Status Meaning Description Schema
200 OK OK Inline
404 Not Found Operation not found Inline
500 Internal Server Error Get Operation status failed Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» operationID string true none Operation ID
» kind string true none Request kind
» status string true none Operation status
» statusText string true none Operation status text
» createdAt string true none Operation creation time
» vaultID string true none Vault ID
» description string true none Description of the operation
» isApproved boolean true none Approval state for the operation
» accountID string true none Account ID for the operation
» stakingPolicyID string false none Staking Policy ID for the operation
» policies [object] true none Policies
»» name string true none policy name
»» id string true none policy id
»» description string false none Policy description
»» enabled boolean false none is the policy enabled, default is TRUE
»» timeZone string false none Policy time zone
»» groups [object] true none Approval groups
»»» name string true none Approval group name
»»» members [object] true none A list of participants in the group
»»»» approvedAt string true none ParticipantWithVault approval time
»»»» id string true none ParticipantWithVault ID
»»»» isApproved boolean true none ParticipantWithVault approval state
»»»» name string true none ParticipantWithVault name
»»»» status string true none ParticipantWithVault task status
»»»» approvalGroupAccount object true none none
»»»»» id string true none Account ID
»»»»» name string true none Account name
»»»» label string true none ParticipantWithVault label
»»»» isGlobal boolean true none ParticipantWithVault global state
»»»» isActive boolean true none none
»»»» globalStatus string true none none
»»»» isOffline boolean true none none
»»» requiredApprovals integer(int32) true none The number of group participants that need to give approval
»»» order integer(int32) true none This field determines the order in which groups are prompted for approvals
»»» deactivateAllowed boolean true none A group participant can be suspended or revoked from this group
»»» isOffline boolean true none Group is offline - conclude only offline participants
»» rules object false none Policy rules
»»» weeklyTimeSlots [object] false none none
»»»» days string true none Days of the week in comma separated list. e.g. 0,1,3 for Sunday, Monday and Wednesday
»»»» timeStart string true none Time of day in the following format: HH:MM
»»»» timeEnd string true none Time of day in the following format: HH:MM
»»» amountRange object false none withdrawal amountRange
»»»» additionalProperties object false none none
»»»»» minimum number false none lower limit
»»»»» maximum number false none upper limit
»»» whiteList [string] false none none
»»» derivedWhiteList [object] false none none
»»»» chainCode string false none none
»»»» publicKey string false none none
»»»» level integer(int32) true none none
»»»» parentFingerprint string false none none
»»»» childNumber integer(int32) true none none
» vaultName string true none Vault name for the operation
» groupNameToJoin string true none Group to join

Enumerated Values

Property Value
kind CREATE_VAULT
kind ADD_MEMBER
kind SIGN
status PENDING
status PENDING_ACTIVATION
status APPROVED
status COMPLETED
status DECLINED
status CANCELED
status FAILED
status ERROR
status STARTED
status DONE
status DECLINED

Status Code 404

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Status Code 500

Name Type Required Restrictions Description
» type string true none Error identification
» title string true none Error summary
» details string true none Error details
» status integer(int64) true none Original HTTP status code

Callbacks

Sign callback URL

Code samples

const inputBody = '{
  "publicKeys": [
    "string"
  ],
  "providerData": "string",
  "dataToSign": [
    "string"
  ],
  "signatures": [
    "string"
  ],
  "v": [
    0
  ],
  "originalEntryIds": [
    0
  ]
}';
const headers = {
  'Content-Type':'application/json'

};

fetch('/api/v1.0/sign_complete_callback/{vaultId}?ledgerId=string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

# You can also use wget
curl -X POST /api/v1.0/sign_complete_callback/{vaultId}?ledgerId=string \
  -H 'Content-Type: application/json'

POST /sign_complete_callback/{vaultId}

Sign callback url from CASP

Body parameter

{
  "publicKeys": [
    "string"
  ],
  "providerData": "string",
  "dataToSign": [
    "string"
  ],
  "signatures": [
    "string"
  ],
  "v": [
    0
  ],
  "originalEntryIds": [
    0
  ]
}

Parameters

Name In Type Required Description
vaultId path string true none
ledgerId query string true The id of the ledger on which the transaction should take place
body body object true Signed Operation Request
» publicKeys body [string] true Vault public key
» providerData body string true Used to store information in the CASP database. The information can subsequently be read back as needed for the coin specific coin type usage.
» dataToSign body [string] true List of data to sign
» signatures body [string] true Signatures
» v body [integer] true recovery codes
» originalEntryIds body [integer] false List of indices matching the original dataForSignature list in case the server sends a partial list of signatures (when used with policies)

Responses

Status Meaning Description Schema
default Default returns data to store in CASP None

Schemas

Address

{
  "items": [
    {
      "address": "mkoTSoVG1pdKqycgbVyXpLmmaNK7ELbRXn"
    }
  ]
}

Properties

Name Type Required Restrictions Description
address string false none none

AssetBalance

{
  "asset": "string",
  "amount": 0
}

Properties

Name Type Required Restrictions Description
asset string false none Asset symbol
amount number(double) false none Amount to send

BalanceResponse

{
  "balances": [
    {
      "asset": "string",
      "amount": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
balances [AssetBalance] false none none

AddressBalanceResponse

{
  "address": "0x7827D7fDb2B161a27fFeD3cC25C560D7aEFE2BD5",
  "balances": [
    {
      "asset": "YEENUS",
      "amount": 885.82
    },
    {
      "asset": "ETH",
      "amount": 8.2221820926
    },
    {
      "asset": "BOKKY",
      "amount": 0
    }
  ]
}

Properties

allOf

Name Type Required Restrictions Description
anonymous BalanceResponse false none none

and

Name Type Required Restrictions Description
anonymous object false none none
» address string false none none

VaultBalanceResponse

{
  "address": "0x7827D7fDb2B161a27fFeD3cC25C560D7aEFE2BD5",
  "balances": [
    {
      "asset": "YEENUS",
      "amount": 885.82
    },
    {
      "asset": "ETH",
      "amount": 8.2221820926
    },
    {
      "asset": "BOKKY",
      "amount": 0
    }
  ]
}

Properties

allOf

Name Type Required Restrictions Description
anonymous BalanceResponse false none none

and

Name Type Required Restrictions Description
anonymous object false none none
» address string false none If the vault has only one address this attribute is returned. Otherwise, this attribute is ommited.
» vaultId string false none The vault ID
» coin string false none For BIP44 vaults - the coin type of the BIP44 account that was used to get the balance, otherwise ommited.
» account string false none For BIP44 vaults - indicates the BIP44 account index that was used to get the balance, otherwise ommited.

AppError

{
  "title": "Invalid argument",
  "details": "Unknown asset 'yeenussd'. Valid assets are: ETH,BOKKY,YEENUS,PAX",
  "errCode": "ERR_INVALID_ARGUMENTS",
  "type": "/errors/ERR_INVALID_ARGUMENTS"
}

Properties

Name Type Required Restrictions Description
title string false none The error title that can be used for user display
details string false none Detailed information about the error and resolution
errCode string false none A textual code that can be used to classify the error
type string false none Path for more information about the error

WithdrawalRequest

{
  "amount": "1.3",
  "asset": "YEENUS",
  "recipientAddress": "0x7827D7fDb2B161a27fFeD3cC25C560D7aEFE2BD5",
  "description": "Payment 3332",
  "fee": "HIGH"
}

Properties

Name Type Required Restrictions Description
recipientAddress string true none The ledger address to recieve the assets
recipientVault string false none The target vault ID for internal transfers (originally for staking-pools)
asset string false none (Optional) The asset to send. If not provided, the default ledger asset is used.
amount any true none The asset amount to send

oneOf

Name Type Required Restrictions Description
» anonymous number(double) false none none

xor

Name Type Required Restrictions Description
» anonymous string false none none

continued

Name Type Required Restrictions Description
description string true none A short text that describes the puprpose of this withdrawal.
fee string false none A fee constant. Usually specificied as 'HIGH', 'MEDIUM' or 'LOW', but some ledgers use custom fee constants. If not provided, the ledger's default fee is used.

WithdrawalProviderData

{
  "request": {
    "amount": "1.3",
    "asset": "YEENUS",
    "recipientAddress": "0x7827D7fDb2B161a27fFeD3cC25C560D7aEFE2BD5",
    "description": "Payment 3332",
    "fee": "HIGH"
  },
  "txs": [
    {
      "serialized": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
request WithdrawalRequest false none none
txs [object] false none A list of ledger tranasactions created for the withdrawal
» serialized string false none The HEX encoded serialized transaction