@inkwell.ar/sdk
Version:
SDK for interacting with the Inkwell Blog CRUD AO process using aoconnect for deployment and interactions
50 lines • 1.88 kB
TypeScript
import { RegistrySDKConfig, RegistrySDK, BlogPermission, WalletPermission, RegistryStats } from '../types';
export declare class InkwellRegistrySDK implements RegistrySDK {
private aoconnect;
private registryProcessId;
private logger;
constructor(config?: RegistrySDKConfig);
/**
* Note: Write operations (register, remove, update) are only available to blog processes
* for security reasons. The registry uses msg.From as the blog ID to ensure only
* the actual blog process can modify its own permissions.
*/
/**
* Get all blogs a wallet has permissions for
*/
getWalletBlogs(wallet: string): Promise<BlogPermission[]>;
/**
* Get all wallets with permissions for a specific blog
*/
getBlogWallets(blogId: string): Promise<WalletPermission[]>;
/**
* Check if a wallet has a specific role for a blog
*/
checkWalletRole(wallet: string, blogId: string, role: string): Promise<boolean>;
/**
* Get registry statistics
*/
getRegistryStats(): Promise<RegistryStats>;
/**
* Note: Bulk operations and sync operations are only available to blog processes
* for security reasons. The registry uses msg.From as the blog ID to ensure only
* the actual blog process can modify its own permissions.
*/
/**
* Get all blogs that a wallet can admin
*/
getAdminBlogs(wallet: string): Promise<BlogPermission[]>;
/**
* Get all blogs that a wallet can edit
*/
getEditableBlogs(wallet: string): Promise<BlogPermission[]>;
/**
* Check if a wallet can admin a specific blog
*/
canAdminBlog(wallet: string, blogId: string): Promise<boolean>;
/**
* Check if a wallet can edit a specific blog
*/
canEditBlog(wallet: string, blogId: string): Promise<boolean>;
}
//# sourceMappingURL=registry-sdk.d.ts.map