UNPKG

@ardier16/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

106 lines (87 loc) 2.61 kB
/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import BN from "bn.js"; import { ContractOptions } from "web3-eth-contract"; import { EventLog } from "web3-core"; import { EventEmitter } from "events"; import { Callback, PayableTransactionObject, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract, } from "./types"; interface EventOptions { filter?: object; fromBlock?: BlockType; topics?: string[]; } export type Approval = ContractEventLog<{ owner: string; spender: string; value: string; 0: string; 1: string; 2: string; }>; export type Transfer = ContractEventLog<{ from: string; to: string; value: string; 0: string; 1: string; 2: string; }>; export interface ERC20 extends BaseContract { constructor( jsonInterface: any[], address?: string, options?: ContractOptions ): ERC20; clone(): ERC20; methods: { name(): NonPayableTransactionObject<string>; symbol(): NonPayableTransactionObject<string>; decimals(): NonPayableTransactionObject<string>; totalSupply(): NonPayableTransactionObject<string>; balanceOf(account: string): NonPayableTransactionObject<string>; transfer( recipient: string, amount: number | string | BN ): NonPayableTransactionObject<boolean>; allowance( owner: string, spender: string ): NonPayableTransactionObject<string>; approve( spender: string, amount: number | string | BN ): NonPayableTransactionObject<boolean>; transferFrom( sender: string, recipient: string, amount: number | string | BN ): NonPayableTransactionObject<boolean>; increaseAllowance( spender: string, addedValue: number | string | BN ): NonPayableTransactionObject<boolean>; decreaseAllowance( spender: string, subtractedValue: number | string | BN ): NonPayableTransactionObject<boolean>; }; events: { Approval(cb?: Callback<Approval>): EventEmitter; Approval(options?: EventOptions, cb?: Callback<Approval>): EventEmitter; Transfer(cb?: Callback<Transfer>): EventEmitter; Transfer(options?: EventOptions, cb?: Callback<Transfer>): EventEmitter; allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter; }; once(event: "Approval", cb: Callback<Approval>): void; once(event: "Approval", options: EventOptions, cb: Callback<Approval>): void; once(event: "Transfer", cb: Callback<Transfer>): void; once(event: "Transfer", options: EventOptions, cb: Callback<Transfer>): void; }