Cryptosat
WebsiteBlogSatellite Tracking
  • Cryptosat
    • 🛰️Satellite tracking
    • 📄SpaceTEE paper
    • Contribution to the Ethereum KZG Ceremony
      • Cryptosat KZG Operation Tracker
      • Crypto2 contribution output
      • Contribution verification
  • Cryptosim
    • Cryptosim
    • Asynchronous API
    • Use-case examples
    • Open-source contribution
  • 🗳️Private Voting
    • Private Voting on Snapshot X
    • Private Voting Contract
    • Browser Side Encryption
  • 🎲random-beacon
    • Verifiable Random Beacon
    • Using the random beacon on-chain
  • API documentation
    • Message Signing
    • Authentication
    • Randomness API
      • Tutorial
      • API reference
    • Queue API
      • API reference
        • Queue
          • Request
          • Requests
    • Public randomness SAPI
      • About
      • API reference
        • Public randomness
          • Result
    • FROST API
      • About
      • API reference
        • Frost
          • Partial sign
          • Private key
      • Specification
    • Satellite Public Keys
  • ⏳Time-based Primitives
    • ⌚Time-based primitives and delay-encryption
    • ⚛️Using Delay Encryption for Atomic Swaps
  • Flastsat Environment
    • Overview
    • Access and Control
    • Crypto Engine Specs
    • Power API
Powered by GitBook
On this page
  • Tutorial
  • Authentication
  • Store a Private Key
  1. API documentation
  2. FROST API

About

Provides documentation of API endpoints for storing and deleting private keys, as well as creating partial signatures.

PreviousFROST APINextAPI reference

Last updated 2 years ago

This API interfaces asynchronously with Cryptosat's satellites and ground testbeds known as "FlatSats". It enables queuing commands that are later sent within the operational time slots throughout the 24h time period.

Tutorial

The following is an example of how to store, sign with and delete a private key.

Authentication

Make sure you provide an.

Store a Private Key

Send the following body to:

POST {{api-url}}/frost/private_key

with the following body:

{
    "key_id" : "mXJQWAAq4L5DQ9zaEQJfqL3VNBmL6osKa0umzpYfTec=",
    "private_key" : "hdi/CAih7GbtA2uhFI0b+6xyy9vHeotaT6oonDNueD8Dh3eTrT1Ky5UFCyadOCbzSQreZEDoqc1zXQ3yf8OvwXgC9vi4uZqhbvHayYLck8NoB64SYXlYbKjgxgULeKWk2Lg="
}

You should get the following similar response:

{
    "statusCode": 200,
    "body": {
        "request": {
            "request_uuid": "c6f9c441-446d-4d07-bc11-1b5d868bb942",
            "request_name": "private_key",
            "request_verb": "POST",
            "request_status": {
                "status_code": 0,
                "status_name": "PENDING"
            },
            "response_eta": "2022-12-30 14:21:14",
            "created_at": "2022-12-30 10:21:14",
            "satellite_id": "crypto1"
        }
    }
}

You can check the status by using the request_uuid obtained from the store command to check if it has been sent off:

GET {{api-url}}/queue/request?=request_id=c6f9c441-446d-4d07-bc11-1b5d868bb942

You should get the following response:

{
    "request": {
        "request_uuid": "c6f9c441-446d-4d07-bc11-1b5d868bb942",
        "request_name": "private_key",
        "request_verb": "POST",
        "request_status": {
            "request_status": "PENDING",
            "status_code": "0"
        },
        "created_at": "2022-12-30 10:21:14",
        "response_eta": "2022-12-30 14:21:14",
        "satellite_id": "crypto1"
    },
    "response_payload": {}
}

When the command has changed to SENT, it can no longer be deleted. Once it is READY, the response_payload will be populated and the command can be archived.

The other commands function in a smilar way.

Note that the status_name is . This is because the command has not yet been sent to the satellite and is queued for the next visibility window indicated by response_eta.

API in the header
PENDING