SDK Reference
WIP
Used to handle the wrapping/unwrapping of WIP (Wrapped IP) tokens within Story.
WIP
Methods
- deposit
- withdraw
- approve
- balance_of
- transfer
- transfer_from
- allowance
deposit
Wraps the selected amount of IP to WIP. The WIP will be deposited to the wallet that transferred the IP.
Method |
---|
deposit |
Parameters:
amount
: The amount to deposit.tx_options
: [Optional] Transaction options dictionary.
withdraw
Unwraps the selected amount of WIP to IP.
Method |
---|
withdraw |
Parameters:
amount
: The amount to withdraw.tx_options
: [Optional] Transaction options dictionary.
approve
Approve a spender to use the wallet’s WIP balance.
Method |
---|
approve |
Parameters:
amount
: The amount of WIP tokens to approve.spender
: The address that will use the WIP tokens.tx_options
: [Optional] Transaction options dictionary.
balance_of
Returns the balance of WIP for an address.
Method |
---|
balance_of |
Parameters:
address
: The address you want to check the balance for.
transfer
Transfers amount
of WIP to a recipient to
.
Method |
---|
transfer |
Parameters:
to
: Who you’re transferring to.amount
: The amount to transfer.tx_options
: [Optional] Transaction options dictionary.
transfer_from
Transfers amount
of WIP from from
to a recipient to
.
Method |
---|
transfer_from |
Parameters:
to
: Who you’re transferring to.amount
: The amount to transfer.from_address
: The address to transfer from.tx_options
: [Optional] Transaction options dictionary.
allowance
Returns the amount of WIP tokens that spender
is allowed to spend on behalf of owner
.
Method |
---|
allowance |
Parameters:
owner
: The address of the token owner.spender
: The address of the spender.