Copy link
Using API for wallet security
Postman collection with all endpoints - Using_API_for_wallet_security.postman_collection.zip
This functionality is only available for account wallets.
Login to wallet
First, you need to log into your wallet:
post
https://api.cpay.world
/api/public/auth
Endpoint POST /api/public/auth
Parameters
Request body
- publicKey
*
string
- privateKey
*
string
- walletId
*
string
- passphrase
*
string
Responses
- 200:OK{token: "String"}
- 200:Example{token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyMDI5MDg0ZDA4NmM2MDExMzc3ODFlMiIsInVzZXIiOiI2MDlhNjM0MGU1ZTFjZjAyMTU2ZDBkZjciLCJpYXQiOjE2OTgyNDU5NTcsImV4cCI6MTY5ODMzMjM1N30.ogoBh6UolGWJUy0bOcNPjNNqPqstoj8ld_u3siUSEQU"}
Checking auto-signing status
get
https://api.cpay.world
/api/public/wallet/signature/status
Endpoint GET /api/public/wallet/signature/status
Responses
- 200:OK{data: "true"}
Setting a password
post
https://api.cpay.world
/api/public/wallet/signature/change-password
Endpoint POST /api/public/wallet/signature/change-password
Parameters
Body
- password
*
string
- repeatPassword
*
string
- oldPassword
string
- verifyCode
string
- emailOtp
*
string
- twoFactorToken
*
string
Responses
- 200:OK{data: 'boolean'}
- 200:OK
Example
{data: true}
Checking password status
get
https://api.cpay.world
/api/public/wallet/signature/password-status
Endpoint GET /api/public/wallet/signature/password-status
Responses
- 200:OK{data: "true"}
Auto-signing downloading
post
https://api.cpay.world
/api/public/wallet/signature/download
Endpoint POST /api/public/wallet/signature/download
Parameters
Body
- password
*
string
- verifyCode
string
- emailOtp
*
string
- twoFactorToken
*
string
Responses
- 200:OK{data: 'string'}
- 200:OK
Example
{data: U2FsdGVkX1+IPWeY0A34JeIBEuk+3HH3ClNwZMhvXzIbIiXBZ5MhJw6I9lzafyo0tCMnKoVOu0xZBZPcJOXW7Q==}
Auto-signing off
post
https://api.cpay.world
/api/public/wallet/signature/off
Endpoint POST /api/public/wallet/signature/off
Parameters
Body
- password
*
string
- verifyCode
string
- emailOtp
*
string
- twoFactorToken
*
string
Responses
- 200:OK{data: 'string'}
- 200:OK
Example
{data: U2FsdGVkX1+IPWeY0A34JeIBEuk+3HH3ClNwZMhvXzIbIiXBZ5MhJw6I9lzafyo0tCMnKoVOu0xZBZPcJOXW7Q==}
Auto-signing on
post
https://api.cpay.world
/api/public/wallet/signature/on
Endpoint POST /api/public/wallet/signature/on
Parameters
Body
- password
*
string
- sign
*
string
base64 format
- verifyCode
string
- emailOtp
*
string
- twoFactorToken
*
string
Responses
- 200:OK{data: 'boolean'}
- 200:OK
Example
{data: true}
If autosigning is disabled, then use the downloaded signature and its password for withdrawal, multisend, swap, NFT withdrawal and external calls.