Skip to main content
POST
/
wallets
/
mpc
/
vaults
/
{vault_id}
/
tss_requests
import cobo_waas2
from cobo_waas2.models.create_tss_request_request import CreateTssRequestRequest
from cobo_waas2.models.tss_request import TSSRequest
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.WalletsMPCWalletsApi(api_client)
    vault_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    create_tss_request_request = cobo_waas2.CreateTssRequestRequest(
        type="Recovery",
        target_key_share_holder_group_id="a1bf161f-8b60-4f61-9c35-6434b8654437",
    )

    try:
        # Create TSS request
        api_response = api_instance.create_tss_request(
            vault_id, create_tss_request_request=create_tss_request_request
        )
        print("The response of WalletsMPCWalletsApi->create_tss_request:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling WalletsMPCWalletsApi->create_tss_request: %s\n" % e
        )

{
  "tss_request_id": "20240711114129000132315000003970",
  "source_key_share_holder_group": {
    "key_share_holder_group_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "tss_node_ids": [
      "cobo5yb7BNEBwwp5XXedbhnzQfvQtp132W4dH4Jz4x4eDp4KA"
    ]
  },
  "target_key_share_holder_group_id": "fd9519ae-507b-4605-b108-04d4e5ffcdd3",
  "type": "Recovery",
  "status": "Success",
  "description": "This is a request to create key shares using the Recovery Group for a key share holder in the Main Group if their key share has been lost (e.g. by losing their phone).",
  "created_timestamp": 1701396866000
}
import cobo_waas2
from cobo_waas2.models.create_tss_request_request import CreateTssRequestRequest
from cobo_waas2.models.tss_request import TSSRequest
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.WalletsMPCWalletsApi(api_client)
    vault_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    create_tss_request_request = cobo_waas2.CreateTssRequestRequest(
        type="Recovery",
        target_key_share_holder_group_id="a1bf161f-8b60-4f61-9c35-6434b8654437",
    )

    try:
        # Create TSS request
        api_response = api_instance.create_tss_request(
            vault_id, create_tss_request_request=create_tss_request_request
        )
        print("The response of WalletsMPCWalletsApi->create_tss_request:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling WalletsMPCWalletsApi->create_tss_request: %s\n" % e
        )

Authorizations

BIZ-API-KEY
string
header
required

The API key. For more details, refer to API key.

In the API playground, enter your API secret, and your API key will be accordingly calculated.

Path Parameters

vault_id
string<uuid>
required

The vault ID, which you can retrieve by calling List all vaults.

Body

application/json

The request body to create a TSS request.

type
enum<string>
required

The TSS request type. Possible values include:

Available options:
KeyGen,
KeyGenFromKeyGroup,
Recovery
Example:

"Recovery"

target_key_share_holder_group_id
string
required

The target key share holder group ID.

Example:

"a1bf161f-8b60-4f61-9c35-6434b8654437"

source_key_share_holder_group
object

The source key share holder group.

Note: source_key_share_holder_group is used only when type is set to either KeyGenfromKeyGroup or Recovery. This is to specify the key share holder group to be used as the source key share holder group to create key shares for the target_key_share_holder_group.

description
string

The description of the TSS request.

Example:

"This is a request to create key shares using the Recovery Group for a key share holder in the Main Group if their key share has been lost (e.g. by losing their phone)."

Response

mpc vault successfully created

The information about the TSS request.

tss_request_id
string

The TSS request ID.

Example:

"20240711114129000132315000003970"

source_key_share_holder_group
object

The source key share holder group.

Note: source_key_share_holder_group is used only when type is set to either KeyGenfromKeyGroup or Recovery. This is to specify the key share holder group to be used as the source key share holder group to create key shares for the target_key_share_holder_group.

target_key_share_holder_group_id
string

The target key share holder group ID.

Example:

"fd9519ae-507b-4605-b108-04d4e5ffcdd3"

type
enum<string>

The TSS request type. Possible values include:

Available options:
KeyGen,
KeyGenFromKeyGroup,
Recovery
Example:

"Recovery"

status
enum<string>

The TSS request status. Possible values include:

  • PendingKeyHolderConfirmation: The action done to the TSS request is currently pending enough key share holders to approve.

  • KeyHolderConfirmationFailed: Key share holders failed to approve the the action to be done to the TSS request.

  • KeyGenerating: The key share is currently being generated for the action to be done to the TSS request.

  • MPCProcessing: The TSS request approval is waiting to be started.

  • KeyGeneratingFailed: The key share generation process has failed for the action to be done to the TSS request.

  • Success: The action done to the TSS request has been completed successfully. If you see this status while running Cancel TSS request, this mean the specified TSS request has been successfully canceled.

Available options:
PendingKeyHolderConfirmation,
KeyHolderConfirmationFailed,
KeyGenerating,
MPCProcessing,
KeyGeneratingFailed,
Success
Example:

"Success"

description
string

The description of the TSS request.

Example:

"This is a request to create key shares using the Recovery Group for a key share holder in the Main Group if their key share has been lost (e.g. by losing their phone)."

created_timestamp
integer

The TSS request's creation time in Unix timestamp format, measured in milliseconds.

Example:

1701396866000