Wallets

How to create your first Blockchain Wallet.

Wallets

Once you created a new account, you first need to create a wallet. Since Relysia allows you to pick between multiple wallet types, we rather leave the wallet choice to the user on their setup. Lets explore how to set up your first wallet.

Types of Wallets

As the name already indicates, the createWallet() adds a new wallet straight to your user account. There is no limit to the number of wallets you can have in a single account. Lets first explore the most simple standard wallet case, before exploring the extended version. Using the walletTitle: 'default' tag, will create a wallet with deterministic path id 0000-00000000-00000 .

var parameters = {
    walletTitle: 'default'
}

const response = await relysia.wallet.v1.createWallet(parameters);

in most endpoints you see a walletId input, if you create a default wallet, you can leave the field open and the API will automatically access the default wallet for the operation.

The standard wallet will do the trick for most wallet applications in terms of encryption and usability. For extended functionality, such as password protection or escrow wallets, use the following synthax.

var parameters = {
    walletTitle: 'required',
    serviceId: 'optional',
    type: 'optional',
    walletLogo: 'optional',
    walletPassword: 'optional',
}

const response = await relysia.wallet.v1.createWallet(parameters);

Create a wallet.

GET https://api.relysia.com/v1/createWallet

Create a HD wallet of choice in your user account. You can select between standard, secure, escrow and shared wallets (see docs.relysia.com).

Headers

NameTypeDescription

walletTitle*

string

mnemonicPhrase

string

paymail

string

paymailActivate

boolean

type

string

walletLogo

string

{
  "statusCode": 200,
  "data": {
    "status": "success",
    "msg": "wallet created successfully",
    "walletID": "58c4e3e0-c4d3-413e-a8b9-3b30508e8c83"
  }
}

There are 4 wallet types: Standard Wallets have a base encryption, Secure Wallets are additionally password protected, unencrypted Escrow Wallets and Multi Party Wallets (that make use of multi-sig schemes). Each type has very specific use cases that depend on your applications needs

List All Wallets

The wallets endpoint returns you a list of all the wallets associated with your Relysia account. The response details include: walletID, walletTitle and a link to your walletLogo.

var parameters = {
    oauth: 'optional',
    serviceId: 'optional',
}

const response = await relysia.wallet.v1.wallets(parameters);

List of available user wallets.

GET https://api.relysia.com/v1/wallets

The endpoint provides the user with a list of all active wallets on their account. Depending on your service requirements, you might have one or multiple wallets.

{
  "statusCode": 200,
  "data": {
    "status": "success",
    "msg": "Operation completed successfully",
    "wallets": [
      {
        "walletID": "58c4e3e0-c4d3-413e-a8b9-3b30508e8c83",
        "walletTitle": "Relysia production wallet",
        "walletLogo": null
      },
      {
        "walletID": "ec4ae905-c5ef-41bd-adfb-4db361093245",
        "walletTitle": "Relysia secondary wallet",
        "walletLogo": null
      }
    ]
  }
}

Delete Specific Wallet

To delete any specific wallet from your account, you can use this endpoint. You need to pass your walletID that you received from List All Wallets endpoint.

Delete specific wallet

DELETE https://api.relysia.com/v1/wallet

To delete a wallet, this api will delete your wallet and related data of that walletId

Headers

NameTypeDescription

walletID*

string

{
  statusCode: 200,
  data: {
    status: 'success',
    msg: 'wallet deleted successfully !',
    walletId: '58c4e3e0-c4d3-413e-a8b9-3b30508e8c83'
  }
}

Delete All Wallets

Delete all wallets of account

DELETE https://api.relysia.com/v1/wallets

To delete all wallet, this api will delete all wallets at once

{
  statusCode: 200,
  data: { status: 'success', msg: 'wallets deleted successfully !' }
}

Last updated