@wuwei-labs/srsly
Version:
TypeScript SDK for SRSLY
38 lines • 1.49 kB
TypeScript
/**
* @purpose Simplified claimContract instruction wrapper
*
* Thin convenience wrapper around Codama-generated claimContract instruction.
* Permissionless — anyone can trigger, but tokens always go to the owner's ATA.
*/
import { type Address } from '@solana/kit';
import { type SdkConfig } from '../utils/config';
import { type UniversalSigner } from '../utils/signer';
import { prepareInstructions } from '../utils/instructions';
/**
* Parameters for claiming contract ATLAS earnings
*/
export interface ClaimContractParams {
/**
* Payer for the transaction (pays ATA init if needed).
* Permissionless — any wallet can trigger a claim.
* Accepts string address, web3.js Keypair, or @solana/kit signer
*/
payer: UniversalSigner;
/** Contract address to claim from */
contract: Address | string;
/**
* Sets compute units to allocate for the transaction.
* @example 400000
*/
computeUnits?: number;
}
/**
* Sweep a contract's accumulated ATLAS earnings into the owner's ATA.
* Permissionless — anyone can trigger; funds always land at the owner's ATA.
*
* @param params - Contract claim parameters
* @param config - Optional SDK configuration overrides
* @returns Kit instruction (or web3.js if PublicKey in config)
*/
export declare function claimContract(params: ClaimContractParams, config?: Partial<SdkConfig>): Promise<ReturnType<typeof prepareInstructions>>;
//# sourceMappingURL=claimContract.d.ts.map