@bridgesplit/rwa-token-sdk
Version:
RWA Token SDK for the development of permissioned tokens on SVM blockchains.
35 lines (34 loc) • 1.72 kB
TypeScript
import { type AnchorProvider } from "@coral-xyz/anchor";
import { type DataRegistryAccount, type DataAccount } from "./types";
/**
* Retrieves data registry account associated with a specific asset mint.
* @param assetMint - The string representation of the asset mint.
* @returns A promise resolving to the fetched data registry account, or `undefined` if it doesn't exist.
*/
export declare function getDataRegistryAccount(assetMint: string, provider: AnchorProvider): Promise<DataRegistryAccount | undefined>;
export interface DataRegistryFilter {
assetMint?: string;
authority?: string;
delegate?: string;
}
export declare const DATA_REGISTRY_ASSET_MINT_OFFSET = 9;
export declare const DATA_REGISTRY_AUTHORITY_OFFSET = 41;
export declare const DATA_REGISTRY_DELEGATE_OFFSET = 73;
/**
* Retrieves data registry account associated with a specific asset mint.
* @param assetMint - The string representation of the asset mint.
* @returns A promise resolving to the fetched data registry account, or `undefined` if it doesn't exist.
*/
export declare function getDataRegistryAccountsWithFilter(filter: DataRegistryFilter, provider: AnchorProvider): Promise<DataRegistryAccount[] | undefined>;
export interface DataAccountFilter {
assetMint?: string;
registry?: string;
type?: string;
}
export declare const DATA_ACCOUNT_REGISTRY_OFFSET = 9;
export declare const DATA_ACCOUNT_TYPE_OFFSET = 41;
/**
* Retrieves all data accounts associated with a specific asset mint and owner.
* @param assetMint - The string representation of the asset mint.
*/
export declare function getDataAccountsWithFilter(filter: DataAccountFilter, provider: AnchorProvider): Promise<DataAccount[] | undefined>;