UNPKG

@q-dev/q-ts-gdk-sdk

Version:

Typescript Library to interact with GDK Contracts

54 lines (53 loc) 2.49 kB
/// <reference types="node" /> import type BN from "bn.js"; import type { ContractOptions } from "web3-eth-contract"; import type { EventLog } from "web3-core"; import type { EventEmitter } from "events"; import type { Callback, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types"; export interface EventOptions { filter?: object; fromBlock?: BlockType; topics?: string[]; } export type DeployedQRC20 = ContractEventLog<{ token: string; 0: string; 1: [string, string, string, string, string]; }>; export type DeployedQRC721 = ContractEventLog<{ token: string; 0: string; 1: [string, string, string, string, string]; }>; export interface TokenFactory extends BaseContract { constructor(jsonInterface: any[], address?: string, options?: ContractOptions): TokenFactory; clone(): TokenFactory; methods: { TOKEN_FACTORY_RESOURCE(): NonPayableTransactionObject<string>; TOKEN_REGISTRY_DEP(): NonPayableTransactionObject<string>; deployQRC20(params_: [ string, string, string, number | string | BN, number | string | BN ]): NonPayableTransactionObject<string>; deployQRC721(params_: [string, string, string, string, number | string | BN]): NonPayableTransactionObject<string>; getInjector(): NonPayableTransactionObject<string>; permissionManager(): NonPayableTransactionObject<string>; setDependencies(registryAddress_: string, data_: string | number[]): NonPayableTransactionObject<void>; setInjector(injector_: string): NonPayableTransactionObject<void>; tokenRegistry(): NonPayableTransactionObject<string>; }; events: { DeployedQRC20(cb?: Callback<DeployedQRC20>): EventEmitter; DeployedQRC20(options?: EventOptions, cb?: Callback<DeployedQRC20>): EventEmitter; DeployedQRC721(cb?: Callback<DeployedQRC721>): EventEmitter; DeployedQRC721(options?: EventOptions, cb?: Callback<DeployedQRC721>): EventEmitter; allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter; }; once(event: "DeployedQRC20", cb: Callback<DeployedQRC20>): void; once(event: "DeployedQRC20", options: EventOptions, cb: Callback<DeployedQRC20>): void; once(event: "DeployedQRC721", cb: Callback<DeployedQRC721>): void; once(event: "DeployedQRC721", options: EventOptions, cb: Callback<DeployedQRC721>): void; }