Wallet1: Integrating with Luniverse PKMS

Luniverse PKMS is a service that you can create a private key for a user, manage the key and sign transactions with the key safely in the server.

Luniverse safely stores the private key created in DApps, and at the request from DApps, signs transactions using the key stored safely in the server.

With Luniverse PKMS, end users do not need to enter their private key, load the keystore file or enter the passphrase every time they sign transactions. This significantly improves the usability of the DApp and also prevents the risk of losing the private key.

Obtaining an address

  1. To use Luniverse PKMS, the end user’s wallet address needs to be created first. Call TX API to obtain the address using Luniverse PKMS as described below. ==> Please provide an explanation about the user key walletType.

curl -X POST 'https://dev-api.luniverse.io/tx/v1.0/wallets' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer KcUSCE7iCZoJfud8iLdmBLdZBrRyVai4e5o6x8d9c4ZpYu2h5mwtmhEPm6285f23' \
--data '
"userKey": "aacff550-4fa7-43c5-9f31-554db722e3a5",
"walletType": "LPKMS"

2. When the end user submits a request to Luniverse PKMS to obtain a wallet address in the DApp, the DApp submits the request for creating a wallet address to Luniverse TX API.

==> Please provide an explanation about the wallet address.

3. Luniverse TX API submits the request for creating a wallet address to Luniverse PKMS. Then, Luniverse PKMS creates a new private key and returns a wallet address (EOA: Externally Owned Account) to the TX API.

4. Finally, the DApp returns the wallet address to the user. With Luniverse Account Bridge, you can also use Luniverse to manage the EOA.

Using Account Bridge

Signing transactions

  1. When an end user initiates a transaction, the DApp asks the user to confirm signing the transaction and proceeds with user verification for the user.

  2. When the end user requests the execution of the transaction after confirming the transaction details and completing the user verification, the DApp requests that Luniverse process the transaction through the TX API.

    *Please note that the DApp may have its own user verification process, and for small transactions with a lower risk of losing assets, it may choose to skip the process.

===> Additional explanation required receiverAddress valueAmount

curl -X POST 'https://stg-api.luniverse.io/tx/v1.0/transactions/transfer' \
--header 'Authorization: Bearer DApp_API_KEY' \
--header 'Content-Type: application/json' \
--data '{ "from": "0xab9ccaBe5075273d0D422236176ffb28A15C470F",
"inputs": {
"receiverAddress": "0x3b1f1faa2bb0b913f9c50723d014c1bccc9b8020",
"valueAmount": "1000000000000000000"

==>. Additional explanation required txId txhash


3. The TX API requests Luniverse PKMS to sign a Luniverse Side Chain transaction after creating the transaction.

4. Luniverse PKMS signs the entered transaction and returns the signed transaction to the TX API.

5. The TX API records the signed transaction on the blockchain and returns the transaction hash value to the DApp.