1 | import { ABI, AddressString, Event, InvokeReceipt, SmartContractNetworksDefinition, SmartContractReadOptions, TransactionOptions, TransactionResult } from '@neo-one/client-common';
|
2 | import BigNumber from 'bignumber.js';
|
3 | import { Client } from './Client';
|
4 | import { SmartContract } from './types';
|
5 | export declare type NEP5Event = NEP5TransferEvent;
|
6 | export interface NEP5TransferEventParameters {
|
7 | readonly from: AddressString | undefined;
|
8 | readonly to: AddressString | undefined;
|
9 | readonly amount: BigNumber;
|
10 | }
|
11 | export interface NEP5TransferEvent extends Event<'transfer', NEP5TransferEventParameters> {
|
12 | }
|
13 | export interface NEP5SmartContract<TClient extends Client = Client> extends SmartContract<TClient, NEP5Event> {
|
14 | readonly balanceOf: (address: AddressString, options?: SmartContractReadOptions) => Promise<BigNumber>;
|
15 | readonly decimals: (options?: SmartContractReadOptions) => Promise<BigNumber>;
|
16 | readonly name: (options?: SmartContractReadOptions) => Promise<string>;
|
17 | readonly owner: (options?: SmartContractReadOptions) => Promise<AddressString>;
|
18 | readonly symbol: (options?: SmartContractReadOptions) => Promise<string>;
|
19 | readonly totalSupply: (options?: SmartContractReadOptions) => Promise<BigNumber>;
|
20 | readonly transfer: (from: AddressString, to: AddressString, amount: BigNumber, options?: TransactionOptions) => TransactionResult<InvokeReceipt<boolean, NEP5Event>>;
|
21 | }
|
22 | export declare const abi: (decimals: number) => ABI;
|
23 | export declare const getDecimals: (client: Client<any, any>, networksDefinition: SmartContractNetworksDefinition, network: string) => Promise<number>;
|
24 | export declare const createNEP5SmartContract: <TClient extends Client<any, any>>(client: TClient, networksDefinition: SmartContractNetworksDefinition, decimals: number) => NEP5SmartContract<Client<any, any>>;
|