Skip to main content

gRPC API

UserService

RegisterUser

  • Type: Unary RPC
  • Request: RegisterUserRequest
  • Response: RegisterUserResponse

Creates a new user, either by generating a new UUID or by using a UUID specified in the request.

Request Message: RegisterUserRequest

FieldTypeRequiredDescription
userIdstringNoThe unique UUID of the user.

Response Message: RegisterUserResponse

FieldTypeDescription
userIdstringThe unique UUID of the user.

Errors:

Error CodeMessageDescription
InvalidArgumentInvalid userId (invalid UUID).Provided in the request userId is not a UUID.
InvalidArgumentInvalid userId (user exists).Provided in the request userId already exists in DB.
InternalAn error occurred while initiating an SQL transaction.None.
InternalAn error occurred while executing a SQL query.None.

UpdateCryptoKeys

  • Type: Unary RPC
  • Request: UpdateCryptoKeysRequest
  • Response: UpdateCryptoKeysResponse

Updates the user`s crypto keys.

Request Message: UpdateCryptoKeysRequest

FieldTypeRequiredDescription
userIdstringYesThe unique UUID of the user.
xmrReqXmrKeysUpdateRequestNoXMR crypto keys update request.
btcReqBtcKeysUpdateRequestNoBTC crypto keys update request.
ltcReqLtcKeysUpdateRequestNoLTC crypto keys update request.
ethReqEthKeysUpdateRequestNoETH crypto keys update request.
bnbReqBnbKeysUpdateRequestNoBNB crypto keys update request.

Response Message: UpdateCryptoKeysResponse

None.

Errors:

Error CodeMessageDescription
InvalidArgumentInvalid userId (invalid UUID).Provided in the request userId is not a UUID.
InvalidArgumentInvalid userId (user does not exist).The user with the provided userId in the request does not exist.
InternalAn error occurred while initiating an SQL transaction.None.
InternalAn error occurred while executing a SQL query.None.

InvoiceService

CreateInvoice

  • Type: Unary RPC
  • Request: CreateInvoiceRequest
  • Response: CreateInvoiceResponse

Creates a new invoice.

Request Message: CreateInvoiceRequest

FieldTypeRequiredDescription
userIdstringYesThe unique UUID of the user.
coinCoinTypeYesThe type of cryptocurrency for which the invoice is generated.
amountdoubleYesThe amount of cryptocurrency should be invoiced.
timeoutuint64YesThe maximum duration (in seconds) that the system should wait for an invoice to be paid before timing out.
confirmationsuint32YesThe number of confirmations required for the transaction to validate the invoice.

Response Message: CreateInvoiceResponse

FieldTypeDescription
paymentIdstringThe unique UUID of the invoice.
addressstringThe cryptocurrency address that was assigned to the invoice.

Errors:

Error CodeMessageDescription
InvalidArgumentInvoice amount can't be below 0.None.
InvalidArgumentInvalid userId (user does not exist).The user with the provided userId in the request does not exist.
InternalAn error occurred while handling invoice.None.

InvoiceStatusStream

  • Type: Stream RPC
  • Request: InvoiceStatusStreamRequest
  • Response: InvoiceStatusStreamResponse

The stream RPC provides real-time updates on the status of invoices.

Request Message: InvoiceStatusStreamRequest

None.

Response Stream Message: InvoiceStatusStreamResponse

FieldTypeDescription
invoiceInvoiceNone.

Errors:

Error CodeMessageDescription
CanceledStream has been closed.None.
CanceledAn error occured while sending data.None.

Misc types/enums

Invoice

FieldTypeDescription
idstringNone.
cryptoAddressstringNone.
coinCoinTypeNone.
requiredAmountdoubleNone.
actualAmountdoubleNone.
confirmationsRequireduint32None.
createdAtgoogle.protobuf.TimestampNone.
confirmedAtgoogle.protobuf.TimestampNone.
statusInvoiceStatusTypeNone.
expiresAtgoogle.protobuf.TimestampNone.
txIdstringNone.
userIdstringNone.

InvoiceStatusType

TypeDescription
PENDINGNone.
PENDING_MEMPOOLNone.
EXPIREDNone.
CONFIRMEDNone.

CoinType

TypeDescription
XMRNone.
BTCNone.
LTCNone.
ETHNone.
TONNone.
USDT_ERC20ERC-20 token.
USDC_ERC20ERC-20 token.
DAI_ERC20ERC-20 token.
WBTC_ERC20ERC-20 token.
UNI_ERC20ERC-20 token.
LINK_ERC20ERC-20 token.
AAVE_ERC20ERC-20 token.
CRV_ERC20ERC-20 token.
MATIC_ERC20ERC-20 token.
SHIB_ERC20ERC-20 token.
BNB_ERC20ERC-20 token.
ATOM_ERC20ERC-20 token.
ARB_ERC20ERC-20 token.
BNBNone.
BSCUSD_BEP20BEP-20 token
USDC_BEP20BEP-20 token
DAI_BEP20BEP-20 token
BUSD_BEP20BEP-20 token
WBTC_BEP20BEP-20 token
BTCB_BEP20BEP-20 token
UNI_BEP20BEP-20 token
LINK_BEP20BEP-20 token
AAVE_BEP20BEP-20 token
MATIC_BEP20BEP-20 token
SHIB_BEP20BEP-20 token
ATOM_BEP20BEP-20 token
ARB_BEP20BEP-20 token
ETH_BEP20BEP-20 token
XRP_BEP20BEP-20 token
ADA_BEP20BEP-20 token
TRX_BEP20BEP-20 token
DOGE_BEP20BEP-20 token
LTC_BEP20BEP-20 token
BCH_BEP20BEP-20 token
TWT_BEP20BEP-20 token
AVAX_BEP20BEP-20 token
CAKE_BEP20BEP-20 token

XmrKeysUpdateRequest

FieldTypeDescription
privViewKeystringNone.
pubSpendKeystringNone.

BtcKeysUpdateRequest

FieldTypeDescription
masterPubKeystringNone.

LtcKeysUpdateRequest

FieldTypeDescription
masterPubKeystringNone.

EthKeysUpdateRequest

FieldTypeDescription
masterPubKeystringNone.

BnbKeysUpdateRequest

FieldTypeDescription
masterPubKeystringNone.