UNPKG

@unique.vc/udm.js

Version:

UDM - Unique Delegation Manager is a simple yet efficient solution allowing to bridge self-custody and user experience, have best from both worlds and potentially extend the reach of the industry.

26 lines (25 loc) 2.14 kB
import { AccountInfo, Connection, ParsedAccountData, PublicKey, RpcResponseAndContext } from '@solana/web3.js'; import { ITokenAccountInfo, IDelegation } from './common/interfaces'; export declare const checkNumberOfTokenAccounts: (connection: Connection, representative: PublicKey, master: PublicKey, mint: PublicKey) => Promise<ITokenAccountInfo>; export declare const getAllMastersTokenAccountsWithSpecifiedMint: (connection: Connection, representative: PublicKey, master: PublicKey, mint: PublicKey) => Promise<RpcResponseAndContext<{ pubkey: PublicKey; account: AccountInfo<ParsedAccountData>; }[]>>; export declare const getRepresentativeForPublicKey: (publicKey: PublicKey, connection: Connection) => Promise<IDelegation[]>; export declare const getMastersForPublicKey: (publicKey: PublicKey, connection: Connection) => Promise<IDelegation[]>; export declare const getAllMasters: (connection: Connection) => Promise<IDelegation[]>; export declare const getAllRepresentative: (connection: Connection) => Promise<IDelegation[]>; export declare const getDelegationAddress: (connection: Connection, master: PublicKey, representative: PublicKey) => PublicKey; export declare const checkIfDelegationExists: (connection: Connection, master: PublicKey, representative: PublicKey) => Promise<IDelegation>; declare const _default: { getMastersForPublicKey: (publicKey: PublicKey, connection: Connection) => Promise<IDelegation[]>; getRepresentativeForPublicKey: (publicKey: PublicKey, connection: Connection) => Promise<IDelegation[]>; getAllMasters: (connection: Connection) => Promise<IDelegation[]>; getAllRepresentative: (connection: Connection) => Promise<IDelegation[]>; getAllMastersTokenAccountsWithSpecifiedMint: (connection: Connection, representative: PublicKey, master: PublicKey, mint: PublicKey) => Promise<RpcResponseAndContext<{ pubkey: PublicKey; account: AccountInfo<ParsedAccountData>; }[]>>; checkNumberOfTokenAccounts: (connection: Connection, representative: PublicKey, master: PublicKey, mint: PublicKey) => Promise<ITokenAccountInfo>; }; export default _default;