Basic Description

This endpoint is used to create a pledge in Taurus-NETWORK. An pledge may be done to any participant of Taurus-NETWORK, so long as the addresses have been shared.

This endpoint would accept a POST request with a JSON payload containing details of the shared address, the currency, and the amount. The sharedAddressID , currencyID , amount are the only required parameters that must be included within the JSON payload.

Prerequisites

Required Roles

Certain API endpoints require that the user has a specific role in order to access them. Roles are used to restrict access to certain functionality within the system and ensure that only authorized users are able to perform specific actions.

Here is the list of required Roles for this particular endpoint:

  • TPUser

To find out more about roles, please refer to the following page in the Taurus User Guides.

Required Input Parameters

Certain API endpoints require specific input parameters. Here is the list of Required Input Parameters for this particular endpoint:

  • sharedAddressID: the id of the shared address that the funds will be pledged from.
  • currencyID: The id of the currency to be shared.
  • amount: amount to be pledged.

📘

Preconditions

You must first share an address with the desired participant on the required blockchain before creating a pledge in favor of a participant.

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/tn/pledges" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $APIToken" \
--data '{
  "sharedAddressID": "6bb3c50a-804e-4da6-9509-8dcc80a04fd3",
  "currencyID": "01f41ae940e6a9506a47927b35ce487b7646e87255996b3ae56b9512bfe679ba",
  "amount": "1"
}'

This piece of code sends a POST request to https://your-protect-instance.example.com/api/rest/v1/tn/pledges with the JSON string in the request body.

👍

Call Result

A successful response for the POST call to create a pledge might look like this:

{
    "result": {
        "id": "70f17413-14d8-4d84-9adc-2998af266bc3",
        "sharedAddressID": "94b620ab-58e0-46b9-b72a-23d2a23da5b8",
        "ownerParticipantID": "b209e26d-49a0-412f-b329-ee9da85f41e7",
        "targetParticipantID": "a4a45081-705b-41fb-9d02-875493d108e3",
        "currencyID": "4fb517ca989362d75b090610744a685d3791ef0d11637a97fddfe77095207a87",
        "blockchain": "Cosmos",
        "network": "cosmoshub",
        "arg1": "{\"kind\":\"CosmosModule\",\"cosmosModule\":\"/cosmos.bank.v1beta1\"}",
        "arg2": "{\"kind\":\"CosmosBankDenom\",\"cosmosBankDenom\":\"uatom\"}",
        "amount": "1000000",
        "status": "CREATED",
        "pledgeType": "PLEDGEE_WITHDRAWALS_RIGHTS",
        "originCreationDate": "2025-03-04T10:32:01.264470687Z",
        "direction": "outgoing"
    },
    "pledgeActionID": "893fe863-dfc5-40bc-99b8-292627b7f40a"
}

In this example, Taurus-PROTECT has made a share request to a participant of Taurus-NETWORK.

Requirements for Future Use

For this particular endpoint, we do not have any storage requirements.

You can find the Swagger-generated page for this endpoint in the following link.




  © 2025 Taurus SA. All rights reserved.