ordinalsbot
Version:
Node.js library for OrdinalsBot API
397 lines • 9.92 kB
TypeScript
export interface InscriptionTransaction {
commit: string;
reveal: string;
inscription: string;
fees: number;
satpoint?: string;
updatedAt?: string;
}
export interface InscriptionFile {
size: number;
type: string;
name: string;
dataURL?: string;
url?: string;
tx?: InscriptionTransaction;
sent?: string;
metadataDataURL?: string;
metadataUrl?: string;
metadataSize?: number;
metaprotocol?: string;
completed?: boolean;
inscriptionId?: string;
iqueued?: boolean;
iqueuedAt?: number;
processing?: boolean;
status?: string;
itemId?: string;
error?: string;
}
export interface Delegate {
delegateId: string;
tx?: InscriptionTransaction;
sent?: string;
metadataDataURL?: string;
metadataUrl?: string;
metadataSize?: number;
metaprotocol?: string;
}
export interface InscriptionOrderRequest {
files?: InscriptionFile[];
delegates?: Delegate[];
fee?: number;
postage?: number;
receiveAddress?: string | string[];
rareSats?: string;
referral?: string;
additionalFee?: number;
timeout?: number;
webhookUrl?: string;
compress?: boolean;
parent?: InscriptionOrderParentRequest;
projectTag?: string;
batchMode?: BatchModeType;
}
export interface DirectInscriptionOrderRequest {
files?: InscriptionFile[];
delegates?: Delegate[];
fee?: number;
postage?: number;
receiveAddress?: string | string[];
parents?: InscriptionOrderParentRequest[];
allowedSatributes?: string[];
referral?: string;
additionalFee?: number;
inscriptionIdPrefix?: string;
webhookUrl?: string;
}
export interface DirectInscriptionOrder extends DirectInscriptionOrderRequest {
id: string;
status: string;
charge: DirectInscriptionCharge;
chainFee: number;
serviceFee: number;
baseFee: number;
postage: number;
orderType: OrderType;
state: InscriptionOrderState;
createdAt: number;
paid?: boolean;
}
export interface InscriptionOrderParentRequest {
inscriptionId: string;
returnAddress: string;
depositAddress?: string;
parentReturnTx?: string;
value?: string;
}
export interface InscriptionCharge {
id: string;
description: string;
amount: number;
missing_amt: number;
status: string;
fiat_value: number;
source_fiat_value: number;
currency: string;
created_at: number;
order_id: string;
address: string;
metadata?: InscriptionChargeMetadata;
expires_at?: string;
auto_settle?: boolean;
chain_invoice?: InscriptionOnchainInvoice;
lightning_invoice?: InscriptionLightningInvoice;
transactions?: InscriptionChargeTransaction[];
uri?: string;
callback_url?: string;
hosted_checkout_url?: string;
}
export interface DirectInscriptionCharge {
amount: number;
address: string;
}
export interface InscriptionOrder extends InscriptionOrderRequest {
id: string;
status: string;
charge: InscriptionCharge;
chainFee: number;
serviceFee: number;
baseFee: number;
rareSatsFee: number;
postage: number;
orderType: string;
zeroConf: string | null;
state: InscriptionOrderState;
createdAt: number;
tx?: string;
error?: string;
refund?: string;
underpaid?: boolean;
overpaid?: boolean;
launchpadId?: string;
sent?: string;
expired?: boolean;
amount?: number;
inscribedCount?: number;
paid?: boolean;
}
export interface InscriptionOnchainInvoice {
address: string;
settled_at: number;
tx: string;
}
export interface InscriptionLightningInvoice {
expires_at: number;
payreq: string;
}
export interface InscriptionChargeTransaction {
address: string;
created_at: number;
settled_at: number;
tx: string;
status: string;
amount: number;
}
export interface InscriptionChargeMetadata {
email: string;
invoice_id: string;
}
export interface InscriptionPriceRequest {
size: number;
fee: number;
count: number;
rareSats: string;
postage?: number;
type?: OrderType;
batchMode?: BatchModeType;
additionalFee?: number;
baseFee?: number;
}
export interface InscriptionPriceResponse {
chainFee: number;
baseFee: number;
serviceFee: number;
rareSatsFee: number;
additionalFee: number;
postage: number;
amount: number;
totalFee: number;
}
export interface InscriptionCollectionCreateRequest {
files: InscriptionFile[];
id?: string;
name?: string;
description?: string;
creator: string;
price: number;
totalCount?: number;
twitter?: string;
website?: string;
banner?: string;
cover?: string;
fee?: number;
serviceFee?: number;
"creator-address": string;
allowList?: AllocationMap;
phases?: CollectionPhase[];
discord?: string;
parent?: InscriptionOrderParentRequest;
deployInscription?: string;
saleSize?: number;
}
export type AllocationMap = {
[address: string]: {
allocation: number;
};
};
export interface UpdateCollectionPhasesRequest {
id?: string;
phases: CollectionPhase[];
}
export interface GetAllocationRequest {
id: String;
receiveAddress: String;
}
interface allocationPhase {
phaseId: String;
public: Boolean;
allocation?: Number;
inscribedCount?: Number;
paidItemCount?: Number;
}
export interface GetAllocationResponse {
phases: allocationPhase[];
}
export type CollectionPhase = {
id?: string;
inscriptionsCount: number;
allowList?: AllocationMap[];
isPublic: number;
price: number;
startDate: number;
endDate?: number | null;
};
export interface InscriptionCollectionCreateResponse extends InscriptionCollectionCreateRequest {
averageSize: number;
inscribedCount: number;
status: string;
active: boolean;
apikeyhash?: string;
createdAt: number;
}
export interface InscriptionCollection {
id: string;
count: number;
requestedIds?: number[];
}
export interface InscriptionCollectionOrderRequest {
fee?: number;
receiveAddress?: string;
collection?: InscriptionCollection;
referral?: string;
token?: string;
rareSats?: string;
timeout?: number;
additionalFee?: number;
}
export interface InscriptionCollectionOrderResponse {
charge: InscriptionCharge;
collection: InscriptionCollection;
fee: number;
rareSatsFee: number;
serviceFee: number;
price: number;
fileCount: number;
orderType: string;
postage: number;
chainFee: number;
amount: number;
id: string;
additionalFee: number;
rareSats: string;
receiveAddress: string;
referral: string;
zeroConf: string;
status: string;
state: InscriptionOrderState;
createdAt: number;
}
export interface InscriptionTextOrderRequest {
texts: string[];
fee?: number;
postage?: number;
receiveAddress?: string | string[];
rareSats?: string;
referral?: string;
additionalFee?: number;
timeout?: number;
webhookUrl?: string;
compress?: boolean;
parent?: InscriptionOrderParentRequest;
projectTag?: string;
batchMode?: BatchModeType;
}
type InscriptionInventoryData = {
amount: number;
baseFee: number;
count: number;
maxSize: number;
minSize: number;
};
type InscriptionInventoryItem = {
[specialSatType: string]: InscriptionInventoryData;
};
export interface InscriptionInventoryResponse {
[specialSatType: string]: InscriptionInventoryItem;
}
export interface InscriptionReferralRequest {
referral: string;
address: string;
}
export interface InscriptionPayout {
id: string;
count: number;
custom_id: string;
paidAmount: number;
email: string;
address: string;
amount: string;
fee: string;
tx: string;
status: string;
created_at: number;
processed_at: string;
checkout_id: string;
}
export interface InscriptionReferralStatusResponse {
address: string;
orderCound: number;
paidCount: number;
payments?: InscriptionPayout[];
orders?: {
[orderId: string]: true;
}[];
}
export interface InscriptionReferralSetResponse {
status: string;
}
export interface CreateSpecialSatsResponse {
psbtBase64: string;
ordinalInputIndices: Array<number>;
paymentInputIndices: Array<number>;
psbtHex: string;
}
export interface CreateSpecialSatsRequest {
chargeAmount: string;
fundingAddress: string;
specialSatsOutput: string;
paymentAddress: string;
paymentPublicKey: string;
ordinalAddress: string;
ordinalPublicKey: string;
feeRate: number;
walletProvider?: string;
}
export declare enum InscriptionOrderState {
WAITING_PAYMENT = "waiting-payment",
WAITING_CONFIRMATION = "waiting-confirmation",
WAITING_PARENT = "waiting-parent",
PREP = "prep",
QUEUED = "queued",
ERROR = "error",
CANCELED = "cancelled",
WAITING_REFUND = "waiting-refund",
REFUNDED = "refunded",
EXPIRED = "expired",
COMPLETED = "completed"
}
export declare enum OrderType {
RUNE_ETCH = "rune-etch",
RUNE_MINT = "rune-mint",
RUNE_LAUNCHPAD_MINT = "rune-launchpad-mint",
BULK = "bulk",
DIRECT = "direct",
BRC20 = "brc20"
}
export declare enum BatchModeType {
SEPARATE_OUTPUTS = "separate-outputs",
SHARED_OUTPUT = "shared-output"
}
export interface CreateParentChildPsbtRequest {
orderId: string;
paymentAddress: string;
paymentPublicKey: string;
ordinalsAddress: string;
ordinalPublicKey: string;
feeRate: number;
walletProvider?: string;
}
export interface CreateParentChildPsbtResponse {
psbtBase64: string;
ordinalInputIndices: Array<number>;
paymentInputIndices: Array<number>;
psbtHex: string;
}
export {};
//# sourceMappingURL=v1.d.ts.map