Kiosk client/Transfer policy transaction
TransferPolicyTransaction
TransferPolicyTransaction
is the client to build transactions that involve transfer policy
management. It's used similar to KioskTransaction
, and helps in crafting transactions to manage a
transfer policy.
You need to instantiate it once in every Programmable Transaction Block (PTB) that you're building.
Similar to KioskTransaction
, you can either create a new transfer policy, or use an existing one.
Using an existing transfer policy
If you have already retrieved a transfer policy from kioskClient.getOwnedTransferPolicies()
, or
kioskClient.getOwnedTransferPoliciesByType()
, you can pass a TransferPolicyCap
result when
instantiating.
Creating a new transfer policy
If you don't have an existing transfer policy, you can create a new one. You can also attach rules in the same PTB.