UNPKG

opnet

Version:

The perfect library for building Bitcoin-based applications.

63 lines (62 loc) 2.3 kB
import { Address } from '../../../../../node_modules/@btc-vision/transaction/build/index.js'; import { CallResult } from '../../../../contracts/CallResult.js'; import { OPNetEvent } from '../../../../contracts/OPNetEvent.js'; import { IOP721Contract, TransferredEventNFT, URIEventNFT } from './IOP721Contract.js'; export type MintStatusChangedEventNFT = { readonly enabled: boolean; }; export type ReservationCreatedEventNFT = { readonly user: Address; readonly amount: bigint; readonly block: bigint; readonly feePaid: bigint; }; export type ReservationClaimedEventNFT = { readonly user: Address; readonly amount: bigint; readonly firstTokenId: bigint; }; export type ReservationExpiredEventNFT = { readonly block: bigint; readonly amountRecovered: bigint; }; export type SetMintEnabled = CallResult<{}, [OPNetEvent<MintStatusChangedEventNFT>]>; export type IsMintEnabled = CallResult<{ enabled: boolean; }, [ ]>; export type ReserveNFT = CallResult<{ readonly remainingPayment: bigint; readonly reservationBlock: bigint; }, [ OPNetEvent<ReservationCreatedEventNFT> ]>; export type ClaimNFT = CallResult<{}, [ OPNetEvent<ReservationClaimedEventNFT>, ...OPNetEvent<TransferredEventNFT>[] ]>; export type PurgeExpiredNFT = CallResult<{}, [...OPNetEvent<ReservationExpiredEventNFT>[]]>; export type GetStatus = CallResult<{ minted: bigint; reserved: bigint; available: bigint; maxSupply: bigint; blocksWithReservations: number; pricePerToken: bigint; reservationFeePercent: bigint; minReservationFee: bigint; }, [ ]>; export type AirdropNFT = CallResult<{}, [...OPNetEvent<TransferredEventNFT>[]]>; export type SetTokenURI = CallResult<{}, [OPNetEvent<URIEventNFT>]>; export interface IExtendedOP721Contract extends IOP721Contract { setMintEnabled(enabled: boolean): Promise<SetMintEnabled>; isMintEnabled(): Promise<IsMintEnabled>; airdrop(addresses: Address[], amounts: number[]): Promise<AirdropNFT>; reserve(quantity: bigint): Promise<ReserveNFT>; claim(): Promise<ClaimNFT>; purgeExpired(): Promise<PurgeExpiredNFT>; getStatus(): Promise<GetStatus>; setTokenURI(tokenId: bigint, uri: string): Promise<SetTokenURI>; } export type IExtendedOP721 = IExtendedOP721Contract;