Withdrawal
With the PAKT SDK, users can create withdrawals, as well as fetch lists of withdrawal history. Withdrawals are executed from Chainsite wallets.
Last updated
With the PAKT SDK, users can create withdrawals, as well as fetch lists of withdrawal history. Withdrawals are executed from Chainsite wallets.
Last updated
Execute a withdrawal, using the CreateWithdrawal payload model.
coin
Currency of the value to be withdrawn
string
false
amount
Monetary worth to be withdrawn
number
false
address
Address to receive the value, the address is usually an external address not on the chainsite
string
false
password
The authenticated user password
string
false
twoFaCode
For users who have activated two-factor authentication.
string
true
Upon success, returns the IWithdrawalDto.
_id
Identification for the withdrawal record
string
owner
User details of the authenticated user who executed the withdrawal. The user details are populated
string | IUser
txId
The transaction record of the withdrawal
string | ITransactionDto
chainTxId
The transaction hash of the withdrawal
string
coin
Currency of the value that is withdrawn
string
address
The address that received the value
string
amount
Monetary worth withdrawn
number
usdValue
USD Monetary equivalent withdrawan
number
usdRate
Exchange rate that was implemented for the withdrawal
number
status
Classification of the withdrawal
IWithdrawalStatus
The IWithdrawalStatus details the different categories of placement of the withdrawal.
pending
Withdrawal is not yet in pipeline for execution
processing
Withdrawal is currently being executed
completed
Withdrawal execution is finished with success.
failed
Withdrawal execution is finished with an error or a result thats is rejected.
Here is an example of implementing the create withdrawal.
The withdrawal history of an authenticated user can be retrieved and paginated.
Use the FilterWithdrawalDto to filter and paginate.
page
The page of list of withdrawals
true
limit
Number of withdrawal records to be retrieved
true
owner
The id of the authenticated user
false
This feature returns FindWithdrawalsDto, upon success.
page
Notation of the list of record
number
pages
Total number of lists retrievable of withdrawals
number
total
Total withdrawal records
number
data
Array of the withdrawals records
Array
For example, implementing fetching withdrawals: