Used to handle the wrapping/unwrapping of WIP (Wrapped IP) tokens within Story.
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) |
Parameters:
request.amount
: The amount to deposit.Unwraps the selected amount of WIP to IP.
Method | Type |
---|---|
withdraw | (request: WithdrawRequest) |
Parameters:
request.amount
: The amount to withdraw.Approve a spender to use the wallet’s WIP balance.
Method | Type |
---|---|
approve | (request: ApproveRequest) |
Parameters:
request.amount
: The amount of WIP tokens to approve.request.spender
: The address that will use the WIP tokensReturns the balance of WIP for an address.
Method | Type |
---|---|
balanceOf | (addr: Address) => Promise<bigint> |
Parameters:
addr
: The address you want to check the baalnce for.Transfers amount
of WIP to a recipient to
.
Method | Type |
---|---|
transfer | (request: TransferRequest) |
Parameters:
request.to
: Who you’re transferring to.request.amount
: The amount to transfer.Transfers amount
of WIP from from
to a recipient to
.
Method | Type |
---|---|
transferFrom | (request: TransferFromRequest) |
Parameters:
request.to
: Who you’re transferring to.request.amount
: The amount to transfer.request.from
: The address to transfer from.