Home > @3rdweb/sdk > SplitsModule
Create custom royalty splits to distribute funds.
Signature:
export declare class SplitsModule extends Module<Royalty> implements ISplitsModule
Extends: Module<Royalty>
Implements: ISplitsModule
import { ThirdwebSDK } from "@3rdweb/sdk";
// You can switch out this provider with any wallet or provider setup you like.
const provider = ethers.Wallet.createRandom();
const sdk = new ThirdwebSDK(provider);
const module = sdk.getSplitsModule("");
| Property | Modifiers | Type | Description |
|---|---|---|---|
| moduleType | static |
ModuleType |
| Method | Modifiers | Description |
|---|---|---|
| balanceOf(address) | Get Funds | |
| balanceOfAllRecipients() | Returns all the recipients and their balances in the native currency. | |
| balanceOfToken(walletAddress, tokenAddress) | Get Token Funds | |
| balanceOfTokenAllRecipients(tokenAddress) | Returns all the recipients and their balances in a non-native currency. | |
| distribute() | Distribute Funds | |
| distributeToken(tokenAddress) | Distribute Funds | |
| get() | ||
| getAllRecipients() | Get Recipients | |
| getRecipientSplitPercentage(address) | ||
| withdraw(address) | ||
| withdrawToken(walletAddress, tokenAddress) |