Overview

Welcome to the ChainUp Custody platform. This document is used by the third-party technical team to add the self-developed mainchain to the ChainUp Custody for alliance members.

Note

When third-party technical team using WAPI to access the the server and keeping private keys, ChainUp Custody is not responsible for the security of assets. Therefore, the third-party technical team must establish a complete private key custody system and API private key custody system

Development Notes

The Role of Public and Private Keys

  • Party A is a third-party public chain docking party

  • Party B is the ChainUp Custody BaaS Cloud

  • The Role of Public and Private Keys: Party A needs to generate a pair of public and private keys in advance when registering the WAPI interface. The public key (rsa_third_pub) is provided to Party B. The private key is kept by yourself, and the private key is not disclosed to anyone. When requesting WAPI services, Party A shall encrypt the request parameters with Party B’s public key and sign the original data after MD5 with Party A’s private key. Upon receiving the request, Party B shall decrypt the data with Party B’s private key and check the original data after MD5 with Party A’s public key

Account Preparation

  • Developers need to prepare the following information:
  1. Generate a pair of public and private keys, and provide the public key to the platform;

  2. Third-party application server IP;

  • Contact the relevant people of the platform and provide the above two types of information. The platform prepares WAPI docking information for you, and provides you with the following information:
  1. The unique identifier for third-party docking: app_id;

  2. WAPI public key:rsa_wapi_pub

  • RSA public and private key:

Password length:2048

Key format:PKCS#8

openssl genrsa -out rsa_private_key.pem 2048

openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key_2048.pem

openssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform pem -nocrypt -out private_pkcs8.pem

Interface rules

Transmission method:https (the test environment temporarily uses http)
Signature Field:Except for the sign field, all other required fields need to be signed
The response status code:0indicating successful processing; non-zero, indicating request error or system abnormality
Request Address:domain name + interface address
Encryption Algorithm:Java Encryption and Decryption Demo

Domain Name and API Key

Production Environment

Domain Name:https://baas.waas.group
app_id:To be assigned
rsa_wallet_pub:To be allocated

Test environment

Domain Name:http://baas.dw2nn.com
app_id:8ee3794a7e5bd188c6af4fd7dda191f3

rsa_third_pub:

MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0P18OcSRr2mnWAWwn6hWlKCyChBb8bF6X1gHiFfdyejHmPn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V0nLYJzs4WQZa3/RL0rh2IlVlfs1eHod+PX99o+Aog80kmUx8NF6ExsoO4qI9y3wW8CH+5tGVqHvq3NaD3jHyS3DYrRztfxuJw9k/YTfZ6rDJVXmD7onqvZe2leSe5h/ehu321y7nB7+2uTJ76i1YOmIrEBW8KupwQUU1JuZKvMCzcLowLjIOYysU8JfpxXH+MQIDAQAB
TypeToken NameAccuracy
memoSRM8 decimals
non-memoVLX8 decimals

Note

rsa_third_prv is a third-party application private key, which is mainly used to encrypt request parameters. If it is a production environment, rsa_third_prv is generated by the developer, and then the corresponding public key is provided to the platform. In order to simplify the developer connection process in the test environment, a set of third-party public and private keys and token names are directly provided here for developers to quickly connect.

Was this page helpful?