Copper.co Sign Async API

The Sign Async API from Copper.co — 2 operation(s) for sign async.

OpenAPI Specification

copper-co-sign-async-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Copper Unlimited Online Sign Async API
  description: API for signing transactions asynchronously with Copper Unlimited Online
  version: 1.0.0
servers:
- url: http://0.0.0.0:3010
  description: Local server
tags:
- name: Sign Async
paths:
  /sign-async:
    post:
      summary: Sign transaction asynchronously
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignAsyncRequest'
      responses:
        '200':
          description: Transaction signed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignAsyncResponse'
      tags:
      - Sign Async
  /sign-async/{transactionRequestId}:
    get:
      summary: Get status of the sign request
      parameters:
      - name: transactionRequestId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Status of the sign request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignAsyncStatusResponse'
      tags:
      - Sign Async
components:
  schemas:
    SignAsyncStatus:
      type: object
      enum:
      - starting
      - session-established
      - in-progress
      - completed
      - error
      description: '* `starting`: The request is accepted for processing

        * `session-established`: The CU session has been established

        * `in-progress`: The signature is being generated

        * `completed`: The transaction has been signed

        * `error`: Something went wrong, see the message field'
    SignAsyncStatusResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/SignAsyncStatus'
          type: string
        message:
          type: string
          examples:
          - AQRwL5FqGrbLaPO4w+NoEq9oZ...R5I/wjEQND/4YmIn+rbN9uh5U/0=
    SignAsyncRequest:
      type: object
      properties:
        type:
          type: string
          enum:
          - request
        keyPassword:
          description: The password from the shard
          type: string
        keyFilename:
          description: The filename of the key
          type: string
        transactionRequestId:
          description: The transaction request id
          type: string
        masterPassword:
          description: The organization master password
          type: string
        apiKey:
          description: The Copper's Platform API Key
          type: string
        apiSecret:
          description: The Copper's Platform API Key
          type: string
        signRequest:
          description: All this fields from order.extra.transactionRequest
          type: object
      required:
      - type
      - keyPassword
      - keyFilename
      - transactionRequestId
      - masterPassword
      - apiKey
      - apiSecret
      - signRequest
    SignAsyncResponse:
      type: object
      properties:
        transactionRequestId:
          type: string
        sessionKey:
          type: string
        sessionTimestamp:
          type: string
          examples:
          - '1608296004000'