UNPKG

@dstoken-solana/rwa-token-sdk

Version:

RWA Token SDK for the development of permissioned tokens on SVM blockchains.

47 lines 2.9 kB
import { type Provider } from "@coral-xyz/anchor"; import { type IdentityRegistryAccount, type IdentityAccount, WalletIdentityAccount } from "./types"; import { PublicKey } from "@solana/web3.js"; /** * Retrieves identity registry account associated with a specific asset mint. * @param assetMint - The string representation of the asset mint. * @returns A promise resolving to {@link IdentityRegistryAccount}, or `undefined` if it doesn't exist. */ export declare function getIdentityRegistryAccount(assetMint: string, provider: Provider): Promise<IdentityRegistryAccount | undefined>; export interface IdentityRegistryFilter { assetMint?: string; authority?: string; } export declare const IDENTITY_REGISTRY_ASSET_MINT_OFFSET = 9; export declare const IDENTITY_REGISTRY_AUTHORITY_OFFSET = 41; /** * Retrieves identity registry account associated with a specific asset mint. * @param assetMint - The string representation of the asset mint. * @returns A promise resolving to {@link IdentityRegistryAccount}, or `undefined` if it doesn't exist. */ export declare function getIdentityRegistryAccountsWithFilter(filter: IdentityRegistryFilter, provider: Provider): Promise<IdentityRegistryAccount[] | undefined>; /** * Retrieves a identity account associated with a specific asset mint and owner. * @param assetMint - The string representation of the asset mint. * @param owner - The string representation of the asset owner. * @returns A promise resolving to the {@link IdentityAccount}, or `undefined` if it doesn't exist. */ export declare function getIdentityAccountFromOwner(assetMint: string, owner: string, provider: Provider): Promise<IdentityAccount | undefined>; export declare function getIdentityAccount(accountAddress: PublicKey, provider: Provider): Promise<IdentityAccount | undefined>; export declare function getWalletIdentityAccount(accountAddress: PublicKey, provider: Provider): Promise<WalletIdentityAccount | undefined>; export interface IdentityAccountFilter { assetMint?: string; registry?: string; owner?: string; } export declare const IDENTITY_ACCOUNT_REGISTRY_OFFSET = 9; export declare const IDENTITY_ACCOUNT_OWNER_OFFSET = 41; /** * Retrieves all identity accounts associated with a specific asset mint and owner. * @param assetMint - The string representation of the asset mint. * @param owner - The string representation of the asset owner. * @returns A promise resolving to the {@link IdentityAccount}, or `undefined` if it doesn't exist. */ export declare function getIdentityAccountsWithFilter(filter: IdentityAccountFilter, provider: Provider): Promise<IdentityAccount[] | undefined>; export declare const WALLET_IDENTITY_ACCOUNT_OWNER_OFFSET = 8; export declare function getWalletIdentityAccountsWithFilter(owner: string, provider: Provider): Promise<WalletIdentityAccount[] | undefined>; //# sourceMappingURL=data.d.ts.map