WipClient
Methods
- deposit
- withdraw
- approve
- balanceOf
- transfer
- transferFrom
deposit
Wraps the selected amount of IP to WIP. The WIP will be deposited to the wallet that transferred the IP.Method | Type |
---|---|
deposit | (request: DepositRequest) |
request.amount
: The amount to deposit.
withdraw
Unwraps the selected amount of WIP to IP.Method | Type |
---|---|
withdraw | (request: WithdrawRequest) |
request.amount
: The amount to withdraw.
approve
Approve a spender to use the wallet’s WIP balance.Method | Type |
---|---|
approve | (request: ApproveRequest) |
request.amount
: The amount of WIP tokens to approve.request.spender
: The address that will use the WIP tokens
balanceOf
Returns the balance of WIP for an address.Method | Type |
---|---|
balanceOf | (addr: Address) => Promise<bigint> |
addr
: The address you want to check the baalnce for.
transfer
Transfersamount
of WIP to a recipient to
.
Method | Type |
---|---|
transfer | (request: TransferRequest) |
request.to
: Who you’re transferring to.request.amount
: The amount to transfer.
transferFrom
Transfersamount
of WIP from from
to a recipient to
.
Method | Type |
---|---|
transferFrom | (request: TransferFromRequest) |
request.to
: Who you’re transferring to.request.amount
: The amount to transfer.request.from
: The address to transfer from.