Skip to content

Latest commit

 

History

History
214 lines (143 loc) · 9.11 KB

TravelRuleApi.md

File metadata and controls

214 lines (143 loc) · 9.11 KB

CoboWaas2.TravelRuleApi

All URIs are relative to https://api.dev.cobo.com/v2

Method HTTP request Description
getTransactionLimitation GET /travel_rule/transaction/limitation Retrieve transaction limitations
listSupportedCountries GET /travel_rule/transaction/countries List supported countries
submitDepositTravelRuleInfo POST /travel_rule/transaction/deposit/travel_rule_info Submit Deposit Transaction Travel Rule information
submitWithdrawTravelRuleInfo POST /travel_rule/transaction/withdraw/travel_rule_info Submit Withdraw Transaction Travel Rule information

getTransactionLimitation

GetTransactionLimitation200Response getTransactionLimitation(transaction_type, transaction_id)

Retrieve transaction limitations

This endpoint retrieves transaction-related limitations based on the provided `transaction_type` and `transaction_id`. The response includes the following information: - `vasp_list`: A list of Virtual Asset Service Providers (VASPs) associated with the transaction token. - `is_threshold_reached`: Indicates whether the transaction amount has exceeded the predefined threshold. - If `true`: Additional Travel Rule information may be required for processing. - `self_custody_wallet_challenge`: A challenge string for verifying ownership of self-custody wallets. - `connect_wallet_list`: A list of supported wallet integrations for the transaction, such as MetaMask or WalletConnect. Use this endpoint to ensure compliance with Travel Rule requirements and to retrieve supported options for completing the transaction.

Example

const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.TravelRuleApi();
const transaction_type = "DEPOSIT";
const transaction_id = "123e4567-e89b-12d3-a456-426614174000";
apiInstance.getTransactionLimitation(transaction_type, transaction_id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
transaction_type String The transaction type. Possible values include: - `DEPOSIT`: A deposit transaction. - `WITHDRAW`: A withdrawal transaction.
transaction_id String The transaction ID

Return type

GetTransactionLimitation200Response

Authorization

OAuth2, CoboAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listSupportedCountries

[ListSupportedCountries200ResponseInner] listSupportedCountries()

List supported countries

This operation retrieves all countries supported.

Example

const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.TravelRuleApi();
apiInstance.listSupportedCountries().then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

[ListSupportedCountries200ResponseInner]

Authorization

OAuth2, CoboAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

submitDepositTravelRuleInfo

SubmitDepositTravelRuleInfo201Response submitDepositTravelRuleInfo(opts)

Submit Deposit Transaction Travel Rule information

This operation allows you to submit the required Travel Rule information based on the transaction details. It supports both self-custody wallets and exchanges/VASPs, ensuring compliance with Travel Rule requirements. - Destination Wallet Type (`destination_wallet_type`): - `SELF_CUSTODY_WALLET`: A self-custodial wallet (e.g., plugin wallet). Requires `self_custody_wallet_sign`, `self_custody_wallet_address`, and `self_custody_wallet_challenge`. - `EXCHANGES_OR_VASP`: A wallet associated with an exchange or VASP. Requires `vendor_vasp_id` and information depending on `selected_entity_type`. - Entity Types (`selected_entity_type`): - `LEGAL`: For legal entities, provide `legal_name`, `date_of_incorporation`, and `place_of_incorporation`. - `NATURAL`: For natural persons, provide `date_of_birth`, `place_of_birth`, `first_name`, and `last_name`.

Example

const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.TravelRuleApi();
const opts = {
  'TravelRuleDepositRequest': new CoboWaas2.TravelRuleDepositRequest()
};
apiInstance.submitDepositTravelRuleInfo(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
TravelRuleDepositRequest TravelRuleDepositRequest [optional]

Return type

SubmitDepositTravelRuleInfo201Response

Authorization

OAuth2, CoboAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

submitWithdrawTravelRuleInfo

SubmitDepositTravelRuleInfo201Response submitWithdrawTravelRuleInfo(opts)

Submit Withdraw Transaction Travel Rule information

This operation allows you to submit the required Travel Rule information based on the transaction details. It supports both self-custody wallets and exchanges/VASPs, ensuring compliance with Travel Rule requirements. - Destination Wallet Type (`destination_wallet_type`): - `SELF_CUSTODY_WALLET`: A self-custodial wallet (e.g., plugin wallet). Requires `self_custody_wallet_sign`, `self_custody_wallet_address`, and `self_custody_wallet_challenge`. - `EXCHANGES_OR_VASP`: A wallet associated with an exchange or VASP. Requires `vendor_vasp_id` and information depending on `selected_entity_type`. - Entity Types (`selected_entity_type`): - `LEGAL`: For legal entities, provide `legal_name`. - `NATURAL`: For natural persons, provide `date_of_birth`, `place_of_birth`, `first_name`, and `last_name`.

Example

const CoboWaas2 = require('@cobo/cobo-waas2');
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.TravelRuleApi();
const opts = {
  'TravelRuleWithdrawRequest': new CoboWaas2.TravelRuleWithdrawRequest()
};
apiInstance.submitWithdrawTravelRuleInfo(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
TravelRuleWithdrawRequest TravelRuleWithdrawRequest [optional]

Return type

SubmitDepositTravelRuleInfo201Response

Authorization

OAuth2, CoboAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json