@unspent/phi
Version:
a collection of anyone can spend contracts
46 lines • 2.13 kB
TypeScript
import { ConstructorArgument as Argument, Artifact, Utxo, NetworkProvider } from "cashscript";
import { ParsedContractI } from "./interface.js";
import { ContractOptions } from "cashscript/dist/interfaces.js";
export declare class BaseUtxPhiContract {
private artifact;
private contract;
protected testnet: boolean;
provider?: NetworkProvider;
addressType: ContractOptions["addressType"];
static delimiter: string;
static _PROTOCOL_ID: string;
static PROTOCOL_ID: string;
constructor(network: string, artifact: Artifact, constructorArguments: Argument[]);
_refresh(constructorArguments: Argument[]): void;
static parseSerializedString(str: string, network?: string): {
code: string | undefined;
options: {
version: number;
network: string;
};
args: string[];
lockingBytecode: string;
address: string;
};
static parseOpReturn(opReturn: Uint8Array | string, network?: string): ParsedContractI;
static parseOutputs(opReturn: Uint8Array | string): Uint8Array[];
static getExecutorAllowance(opReturn: Uint8Array | string, network?: string): bigint;
static getSpendableBalance(opReturn: Uint8Array | string, network?: string, networkProvider?: NetworkProvider, blockHeight?: number): Promise<bigint>;
static getBalance(address: string, networkProvider: NetworkProvider): Promise<bigint>;
getBalance(): Promise<bigint>;
getAddress(): string;
getLegacyAddress(): string;
getUtxos(ageFilter?: number): Promise<Utxo[] | undefined>;
getLockingBytecode(hex?: boolean): string | Uint8Array;
checkLockingBytecode(lockingBytecode?: string | Uint8Array): boolean;
asText(): string;
asCommand(): string;
asSeries(): Promise<any>;
getRedeemScriptHex(): string;
getFunction(fn: string): import("cashscript").ContractFunction | undefined;
isTestnet(): boolean;
asOpReturn(chunks: string[], hex: boolean): string | Uint8Array;
isFunded(): Promise<boolean>;
info(cat?: boolean): Promise<string | undefined>;
}
//# sourceMappingURL=contract.d.ts.map