6. Preview Wallet

In this method, we will decrypt only the public information so you can have a look of what we store in the publicData.

Endpoint: Preview Wallet

POST /api/wallets/preview

This endpoint is used to preview a wallet by decrypting the publicData data inside the ZelfProof (which in the case of the wallet we store the public address of every chain this wallet supports at the moment of creation). This endpoint returns also if it requires a password on top of the biometric encryption.

Request

  • Endpoint: /api/wallets/preview

  • Method: POST

  • Content-Type: application/json

Request Body

The request body should be a JSON object containing the following fields:

{
    "zelfProof": "Ali39vzv+KC25oskP1gV2fAid8/O4rKeOvgwzazTUH4DAoIuRAwjosbwtL2jEkbMPdXp+LBcnegRmc/uYoX8M43Z9Gi4oPmyGSCGgqiDUvk9CG1sa7SJlHKi2+Wlq81QfbXn+KpUi0qi9lm/U3Q76oqjEnfbJzbP8MNrHMAR99PaWIXSw/r9ZUi5YL2OUH6athRWtJxsLZ9XZAAdPc9ze4c2AwLNG2nqk1He/D2elHGm++tFAVtp5yH4Rt9hyH7u3rbgtA/iBKYAmmhfRgF7ySMhWo+5Ug19T41zrjXFwlA871pbiAbav2LQMg03OMclwoY3fcspECALuSMW4evKXgosu4/R4oRxMr4iAPsdMjvnbElWhj4AU2a8X4sIhL7loTXbK1F07uQeg2UvtRUqFd35dk/Tl/WElXvbhFl2BITc0APZO5yilKS8NhLtZXVy//FNqRq4pcxq+FwdTdxN0qgr/+vzmwcLr4Z11QP44yiTo1NQ4AMSO5IENhP8KNjZ1IYEeBSgGRLfLCk4HVtDf5j/zhtUjM/xs61uL7X56xtHxw5SBIjibTXFE9qjuQvwyVgKBhDYXkHpUfxpwlUxs2JKUmvbrarTfvj6g8IN9tbNeCSE3wbMQg18Eo0A35N8RxUdBBywaS+2Vtnrc4T1vVsQWSRoS/oKog3yp/uGHXQ+IzykZ1N57iG+HQk1Z/eybEs1WX85YeewXaP8O1wxJQ12vocRwyLlWNQdsSOa3ejAlhRfvm6hdoE4n9qhf3X25nm0T1GVLBrJ2EVVjbJHwNgcUERxkz18iLrPR91uOZGfz1mdl+zS"
}

Fields:

  • zelfProof: string (required) - The ZelfProof is your public key that contains all the information encrypted, which in this case is your secret phrase that is stored inside the ZelfProof.

Example Request


const axios = require('axios');
let data = JSON.stringify({
  "zelfProof": "Ali39vzv+KC25oskP1gV2fAid8/O4rKeOvgwzazTUH4DAoIuRAwjosbwtL2jEkbMPdXp+LBcnegRmc/uYoX8M43Z9Gi4oPmyGSCGgqiDUvk9CG1sa7SJlHKi2+Wlq81QfbXn+KpUi0qi9lm/U3Q76oqjEnfbJzbP8MNrHMAR99PaWIXSw/r9ZUi5YL2OUH6athRWtJxsLZ9XZAAdPc9ze4c2AwLNG2nqk1He/D2elHGm++tFAVtp5yH4Rt9hyH7u3rbgtA/iBKYAmmhfRgF7ySMhWo+5Ug19T41zrjXFwlA871pbiAbav2LQMg03OMclwoY3fcspECALuSMW4evKXgosu4/R4oRxMr4iAPsdMjvnbElWhj4AU2a8X4sIhL7loTXbK1F07uQeg2UvtRUqFd35dk/Tl/WElXvbhFl2BITc0APZO5yilKS8NhLtZXVy//FNqRq4pcxq+FwdTdxN0qgr/+vzmwcLr4Z11QP44yiTo1NQ4AMSO5IENhP8KNjZ1IYEeBSgGRLfLCk4HVtDf5j/zhtUjM/xs61uL7X56xtHxw5SBIjibTXFE9qjuQvwyVgKBhDYXkHpUfxpwlUxs2JKUmvbrarTfvj6g8IN9tbNeCSE3wbMQg18Eo0A35N8RxUdBBywaS+2Vtnrc4T1vVsQWSRoS/oKog3yp/uGHXQ+IzykZ1N57iG+HQk1Z/eybEs1WX85YeewXaP8O1wxJQ12vocRwyLlWNQdsSOa3ejAlhRfvm6hdoE4n9qhf3X25nm0T1GVLBrJ2EVVjbJHwNgcUERxkz18iLrPR91uOZGfz1mdl+zS"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.zelf.world/api/wallets/preview',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '••••••'
  },
  data : data
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });

Response

  • 200 OK: The request was successful, and the wallet has been identified. The response contains details about the wallet.

    • Response Body:

      {
          "data": {
              "type": "NoPassword",
              "wallet": {
                  "_id": "667dbc8cab919824d4f0280b",
                  "ethAddress": "0x13901AE0F17E2875E86C86721f9943598601b0C4",
                  "solanaAddress": "7PEBTVnsabjvKCVkfwpNoobL8rtFc94Y8wGsWUBCzhJL"
              },
              "requireLiveFace": true
          }
      }

Last updated