@bridgesplit/rwa-token-sdk
Version:
RWA Token SDK for the development of permissioned tokens on SVM blockchains.
54 lines (53 loc) • 2.53 kB
TypeScript
/// <reference types="@coral-xyz/anchor/node_modules/@solana/web3.js" />
import { type PublicKey, type TransactionInstruction } from "@solana/web3.js";
import { type IssueTokenArgs, type SetupAssetControllerArgs, type TransferTokensArgs, type VoidTokensArgs, UpdateAssetMetadataArgs } from "../asset-controller";
import { type IxReturn } from "../utils";
import { type RwaClient } from "./Client";
/**
* Represents the client for Asset Controller for an RWA.
*/
export declare class AssetController {
private readonly rwaClient;
constructor(rwaClient: RwaClient);
/**
* Asynchronously generates instructions to setup a new asset controller.
* @param - {@link SetupAssetControllerArgs}
* @returns A Promise that resolves to the instructions to create an asset controller.
*/
setupNewRegistry(createAssetControllerArgs: SetupAssetControllerArgs): Promise<IxReturn>;
/**
* Update the asset controller's metadata.
* @param - {@link UpdateAssetMetadataArgs}
* @returns A Promise that resolves to the instructions to update the asset controller's metadata.
* */
updateAssetMetadata(updateAssetControllerArgs: UpdateAssetMetadataArgs): Promise<TransactionInstruction>;
/**
* Asynchronously generates instructions to issue tokens.
* @param - {@link IssueTokenArgs}
* @returns A Promise that resolves to the instructions to issue tokens.
*/
issueTokenIxns(IssueArgs: IssueTokenArgs): Promise<TransactionInstruction[]>;
/**
* Asynchronously generates instructions to revoke assets.
* @param - {@link VoidTokensArgs}
* @returns A Promise that resolves to the instructions to revoke assets.
*/
voidTokenIxns(voidTokenArgs: VoidTokensArgs): Promise<TransactionInstruction>;
/**
* Executes a token transfer.
* @returns A promise that resolves to transaction instruction.
*/
transfer(transferArgs: TransferTokensArgs): Promise<TransactionInstruction[]>;
/**
* Retrieves the asset controller pda account for a specific asset mint.
* @param assetMint - The string representation of the asset's mint address.
* @returns The asset controllers pda as a public key.
*/
getAssetControllerPda(assetMint: string): PublicKey;
/**
* Retrieves the asset controller's metadata pda account for a specific asset mint.
* @param assetMint - The string representation of the asset's mint address.
* @returns The asset controller's extra metadata pda.
*/
getExtraMetasListPda(assetMint: string): PublicKey;
}