{
usedCodeRanges?: UintRange[]; // Ranges of used code indices
}
{ password: string }
{
password: string; // The password to check against
}
{
maxUses: number; // Maximum total claims allowed
hideCurrentState?: boolean; // Hide current count from users
displayAsUnlimited?: boolean; // Display as "unlimited" in UI
}
{
numUses?: number; // Current claim count
usedClaimNumbers?: UintRange[]; // Which claim numbers are taken
claimedUsers?: {
[bitbadgesAddress: string]: number[]; // Claim numbers per address
};
}
{
transferTimes: UintRange[]; // Array of allowed time ranges (UNIX ms)
}
{
listId?: string; // Reference to an existing address list
list?: AddressList; // Inline address list
maxUsesPerAddress?: number; // Max claims per address
hasPrivateList?: boolean; // True if the list is hidden from public
}
{
useDynamicStore?: boolean; // Use a dynamic store instead of static list
dynamicDataId?: string; // Dynamic store ID
dataSecret?: string; // Dynamic store secret
listId?: string; // Address list ID (private variant)
list?: AddressList; // Inline list (private variant)
}
{
addresses: { [address: string]: number }; // Claims per address
}
// Get a single plugin by ID
const res = await BitBadgesApi.getPlugin('must-own-badges');
const latestVersion = res.versions[res.versions.length - 1];
console.log(latestVersion.userInputsSchema); // What users must provide
console.log(latestVersion.publicParamsSchema); // Creator-configured public params
console.log(latestVersion.privateParamsSchema); // Creator-configured private params
console.log(latestVersion.stateFunctionPreset); // State management type
console.log(latestVersion.verificationCall); // HTTP endpoint config
// Fetch multiple plugins at once
const res = await BitBadgesApi.getPlugins({
pluginIds: ['must-own-badges', 'min-badge', 'url-clicker'],
returnSensitiveData: false // true = include pluginSecret (owner only)
});
// Search published plugins by name
const res = await BitBadgesApi.searchPlugins({
searchValue: 'badge',
bookmark: undefined, // For pagination
locale: 'en'
});