@q-dev/q-ts-gdk-sdk
Version:
Typescript Library to interact with GDK Contracts
47 lines (46 loc) • 1.98 kB
TypeScript
/// <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 ITokenFactory extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): ITokenFactory;
clone(): ITokenFactory;
methods: {
deployQRC20(params_: [
string,
string,
string,
number | string | BN,
number | string | BN
]): NonPayableTransactionObject<string>;
deployQRC721(params_: [string, string, string, string, number | string | BN]): 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;
}