Claim Royalty Fees
How to claim royalty fees from a Vertigo pool
Overview
The SDK provides two methods for claiming royalties from Vertigo pools:
buildClaimInstruction
Builds the claim instruction onlyclaim
Builds and sends the claim transaction in a single function call
When to use each method
claim
is simpler to use and good for scripting use casesbuildClaimInstruction
is useful when integrating into frontend applications or when you require more control (such as building multi-instruction transactions
Important
The token programs must match the token program of mintA, or the transaction will throw an invalid token account error
If
receiverTaA
account does not exist, then an instruction will added to the transaction to create it
Parameters
pool - the public key of the of pool address
claimer - the key pair of the pool owner, which has the right to call claim()
mintA - the public key of MintA
mintB - the public key of MintB
tokenProgramA: the public key of the token program for MintA
receiverTaA: the public key of the token account for MintA that should receive the royalties
unwrap: (optional) This will add instructions to unwrap wSOL to SOL. Only applies to pools where MintA is wSOL
Unwrapping wSOL to SOL
This only applies to pools where MintA is wSOL (wrapped SOL). By default, the claim methods will send royalties in the form of wSOL to the user's token account for MintA. If you would like to unwrap wSOL to SOL in the same transaction, then you can set unwrap
to true. Defaults to false.
Using claim()
Using buildClaimInstruction()
Last updated