Skip to content

Repository files navigation

LOCK API

API for LOCK.space international staking service

Documentation

Registration

  1. Contact support to registrate your wallet name
  2. Create an address on selected blockchain (e.g. DeFiChain)
  3. Get the sign message from sign-message endpoint and sign it with the corresponding private key
  4. Register the user with the sign-up endpoint
  5. Now you can get your access token (with address & signature) with the sign-in endpoint

KYC

Before the user can stake he has to proceed a KYC.

  1. Trigger the KYC endpoint for KYC registration

  2. User has to do KYC

    a) If the user is already verified (kycStatus = Completed) at DFX.swiss with the same address you can transfer the KYC data after sign-in with the transfer endpoint at DFX API (use wallet name LOCK.space)

    b) If not, the user can do KYC at LOCK. Get and open the KYC Link which you can get from KYC endpoint or user endpoint

  3. Check with the user endpoint if KYC is finished (KYC status Light or Full)

Staking

  • Get the staking deposit address, id, information about fee, balance, min deposit, pending deposits, pending withdrawals etc. with the staking endpoint

Deposit

  1. To deposit you have to send the asset to the deposit address

  2. Optional you can create a pending Deposit to improve the UX for the user with the deposit endpoint

Withdrawal

  1. Create a withdrawal with withdrawal endpoint to get the id and the signMessage

    You can get all open drafts with the drafts endpoint

    You can change the amount of the withdrawal with the amount endpoint and you get also a signMessage

  2. Sign the signMessage to get a signature to approve the withdrawal

  3. Sign the withdrawal (with the generated signature) with the sign endpoint

Analytics

  • You can get the current APR/APY with the analytics/staking endpoint

  • You can get a compact history (json or csv) of transactions (withdrawals, deposits & rewards) with the compact endpoint

  • You can get a cointracking CSV of transactions (withdrawals, deposits & rewards) with the CT endpoint

Voting

Integration Example

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages