UNPKG

@ardier16/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

257 lines (221 loc) 6.2 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 ColDeposited = ContractEventLog<{ _user: string; _vaultId: string; _amount: string; 0: string; 1: string; 2: string; }>; export type ColWithdrawn = ContractEventLog<{ _user: string; _vaultId: string; _amount: string; 0: string; 1: string; 2: string; }>; export type Liquidated = ContractEventLog<{ _user: string; _vaultId: string; 0: string; 1: string; }>; export type StcGenerated = ContractEventLog<{ _user: string; _vaultId: string; _amount: string; 0: string; 1: string; 2: string; }>; export type StcRepaid = ContractEventLog<{ _user: string; _vaultId: string; _burnt: string; _surplus: string; 0: string; 1: string; 2: string; 3: string; }>; export type VaultCreated = ContractEventLog<{ _user: string; _vaultId: string; _colKey: string; 0: string; 1: string; 2: string; }>; export interface BorrowingCore extends BaseContract { constructor( jsonInterface: any[], address?: string, options?: ContractOptions ): BorrowingCore; clone(): BorrowingCore; methods: { aggregatedMintedAmount(): NonPayableTransactionObject<string>; aggregatedNormalizedDebts( arg0: string ): NonPayableTransactionObject<string>; compoundRateKeeper(arg0: string): NonPayableTransactionObject<string>; totalStcBackedByCol(arg0: string): NonPayableTransactionObject<string>; userVaults( arg0: string, arg1: number | string | BN ): NonPayableTransactionObject<{ colKey: string; colAsset: string; normalizedDebt: string; mintedAmount: string; isLiquidated: boolean; liquidationFullDebt: string; 0: string; 1: string; 2: string; 3: string; 4: boolean; 5: string; }>; userVaultsCount(arg0: string): NonPayableTransactionObject<string>; initialize( _registry: string, _stc: string ): NonPayableTransactionObject<void>; createVault(_colKey: string): NonPayableTransactionObject<string>; depositCol( _vaultId: number | string | BN, _amount: number | string | BN ): NonPayableTransactionObject<boolean>; generateStc( _vaultId: number | string | BN, _stcAmount: number | string | BN ): NonPayableTransactionObject<boolean>; withdrawCol( _vaultId: number | string | BN, _amount: number | string | BN ): NonPayableTransactionObject<boolean>; clearVault( _user: string, _vaultId: number | string | BN, _amount: number | string | BN ): NonPayableTransactionObject<void>; liquidate( _user: string, _vaultId: number | string | BN ): NonPayableTransactionObject<boolean>; transferCol( _user: string, _vaultId: number | string | BN, _recepient: string ): NonPayableTransactionObject<void>; updateCompoundRate(_colKey: string): NonPayableTransactionObject<string>; payBackStc( _vaultId: number | string | BN, _amount: number | string | BN ): NonPayableTransactionObject<void>; getVaultStats( _user: string, _vaultId: number | string | BN ): NonPayableTransactionObject< [ [string, string, string, string, string], [string, string, string, string, string, string, string, string, string] ] >; getAggregatedTotals(): NonPayableTransactionObject< [string, string, string] >; getCurrentColRatio( _user: string, _vaultId: number | string | BN ): NonPayableTransactionObject<string>; getFullDebt( _user: string, _vaultId: number | string | BN ): NonPayableTransactionObject<string>; }; events: { ColDeposited(cb?: Callback<ColDeposited>): EventEmitter; ColDeposited( options?: EventOptions, cb?: Callback<ColDeposited> ): EventEmitter; ColWithdrawn(cb?: Callback<ColWithdrawn>): EventEmitter; ColWithdrawn( options?: EventOptions, cb?: Callback<ColWithdrawn> ): EventEmitter; Liquidated(cb?: Callback<Liquidated>): EventEmitter; Liquidated(options?: EventOptions, cb?: Callback<Liquidated>): EventEmitter; StcGenerated(cb?: Callback<StcGenerated>): EventEmitter; StcGenerated( options?: EventOptions, cb?: Callback<StcGenerated> ): EventEmitter; StcRepaid(cb?: Callback<StcRepaid>): EventEmitter; StcRepaid(options?: EventOptions, cb?: Callback<StcRepaid>): EventEmitter; VaultCreated(cb?: Callback<VaultCreated>): EventEmitter; VaultCreated( options?: EventOptions, cb?: Callback<VaultCreated> ): EventEmitter; allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter; }; once(event: "ColDeposited", cb: Callback<ColDeposited>): void; once( event: "ColDeposited", options: EventOptions, cb: Callback<ColDeposited> ): void; once(event: "ColWithdrawn", cb: Callback<ColWithdrawn>): void; once( event: "ColWithdrawn", options: EventOptions, cb: Callback<ColWithdrawn> ): void; once(event: "Liquidated", cb: Callback<Liquidated>): void; once( event: "Liquidated", options: EventOptions, cb: Callback<Liquidated> ): void; once(event: "StcGenerated", cb: Callback<StcGenerated>): void; once( event: "StcGenerated", options: EventOptions, cb: Callback<StcGenerated> ): void; once(event: "StcRepaid", cb: Callback<StcRepaid>): void; once( event: "StcRepaid", options: EventOptions, cb: Callback<StcRepaid> ): void; once(event: "VaultCreated", cb: Callback<VaultCreated>): void; once( event: "VaultCreated", options: EventOptions, cb: Callback<VaultCreated> ): void; }