With the multisignature (multi-sig) API, you can create a wallet that can create and send a transaction which requires signatures from multiple accounts, and you can convert a transaction into a multi-sig transaction by combining multiple signatures with it.

Create Multisig Wallet

Creates a wallet account that can send a transaction which requires multiple signatures to be sent to a blockchain.

Request URL

Live URL https://bc-api.qpyou.cn/core/v1/multisig
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/multisig
HTTP Method POST
Content-Type application/json

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} string Y
Authorization Authentication token required to call the API string Y

Request Body

Field Name Description Type Required
from This is the account address that will send the transaction of creating a multi-sig wallet. For the Polygon blockchain, from should sign the API response value data.rawTx to send this transaction to the Polygon blockchain. string Y
signers These are the wallet addresses that can sign a multi-sig transaction. For the XPLA, you need to provide active wallet addresses where you can get the public key for each wallet address. To make your wallet active, send any transaction from your wallet to the blockchain. array Y
threshold The number of signers required to send the transaction (quorum) number Y

Responses

Field Name Description Type
code api request result code, 0: success number
message the result message string
data API response data json
data.address the created multi-sig wallet address string
data.rawTx This is the encoded transaction data of creating a multi-sig wallet. You only receives this data when you use the Polygon blockchain. string

Request Sample

Response Sample

Create Multisig Transaction

Converts a transaction into a multi-sig transaction by adding signatures to it. Refer to the steps below for creating a multi-sig transaction.

 

  1. Create a multi-sig wallet.
  2. Create a transaction that will be sent to a blockchain (Example: Send Token)
  3. The signers sign the created transaction data (data.rawTx or data.hashedTx) and each receives the “signature” string.
    • If the threshold value is 3, then there needs 3 “signature” strings.
  4. Each signer sends “signature” string to the person who will creates a multi-sig transaction.
  5. With the “signature” strings and the transaction data created at the step 2, the creator of a multi-sig transaction call this API with to create a multi-sig transaction (the transaction that will be recorded on the blockchain finally).

The creator of the multi-sig transaction above can sign the created transaction and send it to a blockchain. Note that for the XPLA blockchain, the creator should send the multi-sig transaction to the XPLA blockchain without signing it.

 

Request URL

Live URL https://bc-api.qpyou.cn/core/v1/multisig/tx
Sandbox URL https://sandbox-bc-api.qpyou.cn/core/v1/multisig/tx
HTTP Method POST
Content-Type application/json

Header Parameters

Field Name Description Type Required
x-network the blockchain networks {ploygon, xpla} string Y
Authorization Authentication token required to call the API string Y

Request Body

Field Name Description Type Required
encoded whether the returned transaction is encoded or not

  • true: Receive the encoded raw transaction string (data.rawTx).
  • false: Receive the decoded data.rawTx (JSON).
string Y
from the wallet address that sends the multi-sig transaction to the blockchain string Y
to the multi-sig wallet address string Y
tx the data.rawTx which is returned as the response of the transaction creating APIs (Token API, NFT API, etc.) string or json Y
signatures the “signature” values (string) that each signer receives after they sign the transaction

  • polygon: the “signature” value that is obtained after signing data.hashedTx, which is returned as a response value of APIs that create transactions
  • XPLA: the “signature” value that is obtained after signing data.rawTx, which is returned as a response value of APIs that create transactions
array Y

Responses

Field Name Description Type
code api request result code, 0: success number
message the result message string
data API response data json
data.rawTx This is the encoded transaction data of the created multi-sig transaction. For the Polygon blockchain, the creator of a multi-sig transaction can send the transaction to the blockchain after signing this value. string
data.reqeustId the unique value that can identify each API request string

Request Sample

Response Sample