UNPKG

opnet

Version:

The perfect library for building Bitcoin-based applications.

88 lines (87 loc) 3.5 kB
import { Address } from '@btc-vision/transaction'; import { CallResult } from '../../../../contracts/CallResult.js'; import { OPNetEvent } from '../../../../contracts/OPNetEvent.js'; import { BurnedEvent } from '../opnet/IOP20Contract.js'; import { IOP20SContract } from '../opnet/IOP20SContract.js'; export type BlacklistedEventStable = { readonly account: Address; readonly blacklister: Address; }; export type UnblacklistedEventStable = { readonly account: Address; readonly blacklister: Address; }; export type PausedEventStable = { readonly pauser: Address; }; export type UnpausedEventStable = { readonly pauser: Address; }; export type OwnershipTransferStartedEventStable = { readonly currentOwner: Address; readonly pendingOwner: Address; }; export type OwnershipTransferredEventStable = { readonly previousOwner: Address; readonly newOwner: Address; }; export type MinterChangedEventStable = { readonly previousMinter: Address; readonly newMinter: Address; }; export type BlacklisterChangedEventStable = { readonly previousBlacklister: Address; readonly newBlacklister: Address; }; export type PauserChangedEventStable = { readonly previousPauser: Address; readonly newPauser: Address; }; export type BurnFromStable = CallResult<{}, [OPNetEvent<BurnedEvent>]>; export type BlacklistStable = CallResult<{}, [OPNetEvent<BlacklistedEventStable>]>; export type UnblacklistStable = CallResult<{}, [OPNetEvent<UnblacklistedEventStable>]>; export type IsBlacklistedStable = CallResult<{ blacklisted: boolean; }, []>; export type PauseStable = CallResult<{}, [OPNetEvent<PausedEventStable>]>; export type UnpauseStable = CallResult<{}, [OPNetEvent<UnpausedEventStable>]>; export type IsPausedStable = CallResult<{ paused: boolean; }, []>; export type TransferOwnershipStable = CallResult<{}, [ OPNetEvent<OwnershipTransferStartedEventStable> ]>; export type AcceptOwnershipStable = CallResult<{}, [OPNetEvent<OwnershipTransferredEventStable>]>; export type SetMinterStable = CallResult<{}, [OPNetEvent<MinterChangedEventStable>]>; export type SetBlacklisterStable = CallResult<{}, [OPNetEvent<BlacklisterChangedEventStable>]>; export type SetPauserStable = CallResult<{}, [OPNetEvent<PauserChangedEventStable>]>; export type OwnerStable = CallResult<{ owner: Address; }, []>; export type MinterStable = CallResult<{ minter: Address; }, []>; export type BlacklisterStable = CallResult<{ blacklister: Address; }, []>; export type PauserStable = CallResult<{ pauser: Address; }, []>; export interface IStableCoinContract extends IOP20SContract { burnFrom(from: Address, amount: bigint): Promise<BurnFromStable>; blacklist(account: Address): Promise<BlacklistStable>; unblacklist(account: Address): Promise<UnblacklistStable>; isBlacklisted(account: Address): Promise<IsBlacklistedStable>; pause(): Promise<PauseStable>; unpause(): Promise<UnpauseStable>; isPaused(): Promise<IsPausedStable>; transferOwnership(newOwner: Address): Promise<TransferOwnershipStable>; acceptOwnership(): Promise<AcceptOwnershipStable>; setMinter(newMinter: Address): Promise<SetMinterStable>; setBlacklister(newBlacklister: Address): Promise<SetBlacklisterStable>; setPauser(newPauser: Address): Promise<SetPauserStable>; owner(): Promise<OwnerStable>; minter(): Promise<MinterStable>; blacklister(): Promise<BlacklisterStable>; pauser(): Promise<PauserStable>; }