UNPKG

banx-vaults-sdk

Version:

Fbonds SDK for interacting with protocol banx vaults

25 lines (24 loc) 1.1 kB
import { BanxVaults } from './idl/banx_vaults'; import { Program } from '@coral-xyz/anchor'; import * as anchor from '@coral-xyz/anchor'; export declare enum ParseType { Number = "number", String = "string" } type ReturnAnchorProgram = (connection: anchor.web3.Connection) => Program<BanxVaults>; export declare const returnAnchorProgram: ReturnAnchorProgram; export declare const anchorRawBNsAndPubkeysToNumsAndStrings: (rawAccount: any) => any; export declare const anchorRawBNsAndPubkeysToNumsAndStringsWithType: (rawAccount: any, parseType: ParseType) => any; export interface CnftParams { dataHash: string; creatorHash: string; leafId: number; tree?: string; } export declare const createDecodeEnum: <T extends string, D>(enumValue: T, decodedEnumType: D) => D; export declare const enumToAnchorEnumNew: <T extends string | number, E>(enumValue: T, enumObject: E) => { [K in keyof E]?: {} | undefined; } & { [K_1 in T]: {}; }; export declare const nowInSeconds: () => number; export declare const enumToAnchorEnum: (anyEnum: any) => { [x: number]: {}; }; export {};