UNPKG

@bridgesplit/rwa-token-sdk

Version:

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

47 lines (46 loc) 2.24 kB
/// <reference types="@coral-xyz/anchor/node_modules/@solana/web3.js" /> import { type PublicKey, type TransactionInstruction } from "@solana/web3.js"; import { type SetupUserArgs } from "../asset-controller"; import { type IxReturn } from "../utils"; import { type AddLevelToIdentityAccountArgs, type RemoveLevelFromIdentityAccountArgs } from "../identity-registry"; import { type RwaClient } from "./Client"; /** * Represents the client for Identity Registry for an RWA. */ export declare class IdentityRegistry { private readonly rwaClient; constructor(rwaClient: RwaClient); /** * Asynchronously generates instructions to setup a user. * @param - {@link SetupUserArgs} * @returns A Promise that resolves to the instructions to setup a user. * * It is required for at least a single user to be setup before issuing tokens. */ setupUserIxns(setupUserArgs: SetupUserArgs): Promise<IxReturn>; /** * Asynchronously update user account identity * @param - {@link AddLevelToIdentityAccountArgs} * @returns A Promise that resolves to the instructions to update user account identity. * */ addIdentityLevelToUserAccount(addLevelArgs: AddLevelToIdentityAccountArgs): Promise<TransactionInstruction>; /** * Asynchronously reduces a user identity account level * @param - {@link RemoveLevelFromIdentityAccount} * @returns A Promise that resolves to the instructions to reduce the level of a user identity account. */ removeIdentityLevelFromUserAccount(removeLevelArgs: RemoveLevelFromIdentityAccountArgs): Promise<TransactionInstruction>; /** * Retrieves the identity registry pda account for a specific asset mint. * @param assetMint - The string representation of the asset's mint address. * @returns The identity registry pda as a public key. */ getIdentityRegistryPda(assetMint: string): PublicKey; /** * Retrieves the identity account pda public key for a specific asset mint. * @param assetMint - The string representation of the asset's mint address. * @param owner - The string representation of the asset's owner. * @returns The identity account pda. */ getIdentityAccountPda(assetMint: string, owner: string): PublicKey; }