Multi-signature

Create Multi-signature Account

Create a multi-signature account.

PUT /api/multisignatures

Request

 {
    "secret": "your secret. string. required.",
    "secondSecret": "your second secret of the account. optional",
    "lifetime": "request lifetime in hours (1-72). required.",
    "min": "minimum signatures needed to approve a tx or a change (1-16). integer. required",
    "keysgroup": [array of public keys strings]. add '+' before publicKey to add an account. required. immutable.
}

Response

 {
  "success": true,
  "transactionId": "transaction id"
}

Example

curl -k -H "Content-Type: application/json" \
-X PUT -d '{"secret":"<INSERT SECRET HERE>","lifetime":<INSERT NUMBER HERE>,"min":<INSERT NUMBER OF SIGNATURES HERE>,"keysgroup":["+<INSERT PUBLIC KEY HERE>","+<INSERT PUBLIC KEY HERE>"] }' \
http://localhost:8000/api/multisignatures

Get Multi-signature Accounts

Gets a list of accounts that belong to a multi-signature account.

GET /api/multisignatures/accounts?publicKey=publicKey

  • publicKey: Public key of multi-signature account (String)

Response

 {
  "success": true,
  "accounts": "array of accounts",
  "accounts": [
    {
      "address": "Multisig account. String",
      "balance": "Multisig account balance. String",
      "multisignatures": [
        "Multisig public key member. String"
      ],
      "multimin": "Min N of sign for a valid tx. Integer",
      "multilifetime": "Lifetime. Integer",
      multisigaccounts": [
        {
          "address": "Multisig address member. String",
          "publicKey": "Multisig public key member. String",
          "balance": "Multisig balance member. String"
        }
      ]
    }
  ]
}

Example

curl -k -X GET http://localhost:8000/api/multisignatures/accounts?publicKey=<publicKey>

Sign Multi-signature Transaction

Signs a transaction that is awaiting signature.

POST /api/multisignatures/sign

Request

 {
  "secret": "your secret. string. required.",
  "publicKey": "public key of your account. string. optional.",
  "transactionId": "id of transaction to sign. REQUIRED"
}

Response

 {
  "success": true,
  "transactionId": "transaction id"
}

Example

curl -k -H "Content-Type: application/json" \
-X POST -d '{"secret":"<INSERT SECRET HERE>","transactionId":"<INSERT TRANSACTION ID HERE>"}' \
http://localhost:8000/api/multisignatures/sign

Get Pending Multi-signature Transactions

Returns a list of multi-signature transactions that waiting for signature by publicKey.

GET /api/multisignatures/pending?publicKey=publicKey

  • publicKey: Public key of account (String)

Response

 {
  "success": true,
  "transactions": [
    {
      "max": "Max. Integer",
      "min": "Min. Integer",
      "lifetime": "Lifetime. Integer",
      "signed": true,
      "transaction": {
        "type": "Type of transaction. Integer",
        "amount": "Amount. Integer",
        "senderPublicKey": "Sender public key of transaction. Hex",
        "requesterPublicKey": "Requester public key. String",
        "timestamp": "Timestamp. Integer",
        "asset": {
          "multisignature": {
            "min": "Min signatures needed for valid tx. Integer",
            "keysgroup": [
              "+Multisig public key member. String"
            ],
            "lifetime": "Lifetime. Integer",
          }
        },
        "recipientId": "Recipient address. String",
        "signature": "Signature. String",
        "signSignature": "Sign signature. String",
        "id": "Tx ID",
        "fee": "Fee. Integer",
        "senderId": "Sender address. String",
        "relays": "Propagation. Integer",
        "receivedAt": "Time. String",
        "signatures": [
          "array of signatures"
        ],
        "ready": false
      }
    }
  ]
}

Example

curl -k -X GET http://localhost:8000/api/multisignatures/pending?publicKey=<publicKey>

What's next?
Lisk API 1.0