Skip to main content
POST
/
wallets
/
mpc
/
projects
import cobo_waas2
from cobo_waas2.models.create_mpc_project_request import CreateMpcProjectRequest
from cobo_waas2.models.mpc_project import MPCProject
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)
    create_mpc_project_request = cobo_waas2.CreateMpcProjectRequest(
        name="Project name", participants=3, threshold=2
    )

    try:
        # Create project
        api_response = api_instance.create_mpc_project(
            create_mpc_project_request=create_mpc_project_request
        )
        print("The response of WalletsMPCWalletsApi->create_mpc_project:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling WalletsMPCWalletsApi->create_mpc_project: %s\n" % e
        )

{
  "project_id": "0111039d-27fb-49ba-b172-6e0aa80e37ec",
  "org_id": "f3b4a616-9c43-462e-8cb4-343e304fee64",
  "name": "Project name",
  "participants": 3,
  "threshold": 2,
  "created_timestamp": 1718619403933
}
import cobo_waas2
from cobo_waas2.models.create_mpc_project_request import CreateMpcProjectRequest
from cobo_waas2.models.mpc_project import MPCProject
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)
    create_mpc_project_request = cobo_waas2.CreateMpcProjectRequest(
        name="Project name", participants=3, threshold=2
    )

    try:
        # Create project
        api_response = api_instance.create_mpc_project(
            create_mpc_project_request=create_mpc_project_request
        )
        print("The response of WalletsMPCWalletsApi->create_mpc_project:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling WalletsMPCWalletsApi->create_mpc_project: %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.

Body

application/json

The request body to create a project.

name
string
required

The project name.

Example:

"Project name"

participants
integer
required

The number of key share holders in the project.

Notes:

  1. Currently, the available Threshold Signature Schemes (TSS) are 2-2, 2-3, and 3-3 schemes (in the "threshold - participants" format), so you can only set participants to 2 or 3.

  2. threshold must be less than or equal to participants.

Example:

3

threshold
integer
required

The number of key share holders required to sign an operation in the project.

Notes:

  1. Currently, the available Threshold Signature Schemes (TSS) are 2-2, 2-3, and 3-3 schemes (in the "threshold - participants" format), so you can only set threshold to 2 or 3.

  2. threshold must be less than or equal to participants.

Example:

2

Response

Successfully created project.

The data for project information.

project_id
string

The project ID.

Example:

"0111039d-27fb-49ba-b172-6e0aa80e37ec"

org_id
string

The organization ID.

Example:

"f3b4a616-9c43-462e-8cb4-343e304fee64"

name
string

The project name.

Example:

"Project name"

participants
integer

The number of key share holders in the project.

Example:

3

threshold
integer

The number of key share holders required to sign an operation in the project.

Example:

2

created_timestamp
integer

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

Example:

1718619403933