ordinalsbot
Advanced tools
Comparing version 0.2.1 to 0.2.2
import { AxiosInstance } from "axios"; | ||
import { InscriptionEnv } from "./types"; | ||
import { InscriptionPriceRequest, InscriptionPriceResponse, InscriptionOrderRequest, InscriptionOrder, InscriptionCollectionCreateRequest, InscriptionCollectionCreateResponse, InscriptionCollectionOrderRequest, InscriptionTextOrderRequest, InscriptionInventoryResponse, InscriptionReferralRequest, InscriptionReferralSetResponse, InscriptionReferralStatusResponse, CreateSpecialSatsRequest, CreateSpecialSatsResponse, InscriptionCollectionOrderResponse } from "./types/v1"; | ||
import { RunesEtchOrderRequest, RunesEtchOrderResponse, RunesMintOrderRequest, RunesMintOrderResponse } from "./types/runes_types"; | ||
export declare class InscriptionClient { | ||
@@ -16,2 +17,4 @@ env: InscriptionEnv; | ||
createTextOrder(order: InscriptionTextOrderRequest): Promise<InscriptionOrder>; | ||
createRunesEtchOrder(order: RunesEtchOrderRequest): Promise<RunesEtchOrderResponse>; | ||
createRunesMintOrder(order: RunesMintOrderRequest): Promise<RunesMintOrderResponse>; | ||
getInventory(): Promise<InscriptionInventoryResponse[]>; | ||
@@ -18,0 +21,0 @@ setReferralCode(referral: InscriptionReferralRequest): Promise<InscriptionReferralSetResponse>; |
@@ -88,2 +88,8 @@ "use strict"; | ||
} | ||
async createRunesEtchOrder(order) { | ||
return this.instanceV1.post(`/runes/etch`, order); | ||
} | ||
async createRunesMintOrder(order) { | ||
return this.instanceV1.post(`/runes/mint`, order); | ||
} | ||
async getInventory() { | ||
@@ -90,0 +96,0 @@ return this.instanceV1.get(`/inventory`); |
import { InscriptionClient } from "../client"; | ||
import { InscriptionEnv, v1 } from "../types"; | ||
import { RunesEtchOrderRequest, RunesEtchOrderResponse, RunesMintOrderRequest, RunesMintOrderResponse } from "../types/runes_types"; | ||
export declare class Inscription { | ||
@@ -12,2 +13,4 @@ instance: InscriptionClient; | ||
createTextOrder(order: v1.InscriptionTextOrderRequest): Promise<v1.InscriptionOrder>; | ||
createRunesEtchOrder(order: RunesEtchOrderRequest): Promise<RunesEtchOrderResponse>; | ||
createRunesMintOrder(order: RunesMintOrderRequest): Promise<RunesMintOrderResponse>; | ||
getInventory(): Promise<v1.InscriptionInventoryResponse[]>; | ||
@@ -14,0 +17,0 @@ setReferralCode(referral: v1.InscriptionReferralRequest): Promise<v1.InscriptionReferralSetResponse>; |
@@ -31,2 +31,8 @@ "use strict"; | ||
} | ||
createRunesEtchOrder(order) { | ||
return this.instance.createRunesEtchOrder(order); | ||
} | ||
createRunesMintOrder(order) { | ||
return this.instance.createRunesMintOrder(order); | ||
} | ||
getInventory() { | ||
@@ -33,0 +39,0 @@ return this.instance.getInventory(); |
@@ -16,2 +16,3 @@ export interface InscriptionTransaction { | ||
tx?: InscriptionTransaction; | ||
sent?: string; | ||
metadataDataURL?: string; | ||
@@ -273,3 +274,10 @@ metadataUrl?: string; | ||
} | ||
export declare enum OrderType { | ||
RUNE_ETCH = "rune-etch", | ||
RUNE_MINT = "rune-mint", | ||
BULK = "bulk", | ||
DIRECT = "direct", | ||
BRC20 = "brc20" | ||
} | ||
export {}; | ||
//# sourceMappingURL=v1.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.InscriptionOrderState = void 0; | ||
exports.OrderType = exports.InscriptionOrderState = void 0; | ||
var InscriptionOrderState; | ||
@@ -18,2 +18,10 @@ (function (InscriptionOrderState) { | ||
})(InscriptionOrderState = exports.InscriptionOrderState || (exports.InscriptionOrderState = {})); | ||
var OrderType; | ||
(function (OrderType) { | ||
OrderType["RUNE_ETCH"] = "rune-etch"; | ||
OrderType["RUNE_MINT"] = "rune-mint"; | ||
OrderType["BULK"] = "bulk"; | ||
OrderType["DIRECT"] = "direct"; | ||
OrderType["BRC20"] = "brc20"; | ||
})(OrderType = exports.OrderType || (exports.OrderType = {})); | ||
//# sourceMappingURL=v1.js.map |
{ | ||
"name": "ordinalsbot", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Node.js library for OrdinalsBot API", | ||
@@ -9,3 +9,4 @@ "main": "dist/index.js", | ||
"build": "rm -rf dist/ && tsc", | ||
"prepack": "pnpm build" | ||
"prepack": "pnpm build", | ||
"examples": "npx ts-node examples/example.ts" | ||
}, | ||
@@ -12,0 +13,0 @@ "repository": { |
@@ -21,2 +21,3 @@ import axios, { AxiosInstance } from "axios"; | ||
} from "./types/v1"; | ||
import { RunesEtchOrderRequest, RunesEtchOrderResponse, RunesMintOrderRequest, RunesMintOrderResponse } from "./types/runes_types"; | ||
@@ -188,2 +189,24 @@ const qs = require("qs"); | ||
/** | ||
* Creates an runes etch order. | ||
* @param {RunesEtchOrderRequest} order - The request object for creating the runes etch order. | ||
* @returns {Promise<RunesEtchOrder>} A promise resolving with the created runes etch order. | ||
*/ | ||
async createRunesEtchOrder( | ||
order: RunesEtchOrderRequest | ||
): Promise<RunesEtchOrderResponse> { | ||
return this.instanceV1.post(`/runes/etch`, order); | ||
} | ||
/** | ||
* Creates an runes mint order. | ||
* @param {RunesMintOrderRequest} order - The request object for creating the runes mint order. | ||
* @returns {Promise<RunesMintOrder>} A promise resolving with the created runes mint order. | ||
*/ | ||
async createRunesMintOrder( | ||
order: RunesMintOrderRequest | ||
): Promise<RunesMintOrderResponse> { | ||
return this.instanceV1.post(`/runes/mint`, order); | ||
} | ||
/** | ||
* Retrieves inventory information. | ||
@@ -190,0 +213,0 @@ * @returns {Promise<InscriptionInventoryResponse[]>} A promise resolving with the inventory information. |
import { InscriptionClient } from "../client"; | ||
import { InscriptionEnv, v1 } from "../types"; | ||
import { RunesEtchOrderRequest, RunesEtchOrderResponse, RunesMintOrderRequest, RunesMintOrderResponse } from "../types/runes_types"; | ||
@@ -87,2 +88,20 @@ /** | ||
/** | ||
* Creates an runes etch order with the given order request. | ||
* @param {RunesEtchOrderRequest} order The order request. | ||
* @returns {Promise<RunesEtchOrderResponse>} A promise that resolves with the created order. | ||
*/ | ||
createRunesEtchOrder(order: RunesEtchOrderRequest): Promise<RunesEtchOrderResponse> { | ||
return this.instance.createRunesEtchOrder(order); | ||
} | ||
/** | ||
* Creates an runes mint order with the given order request. | ||
* @param {RunesMintOrderRequest} order The order request. | ||
* @returns {Promise<RunesMintOrderResponse>} A promise that resolves with the created order. | ||
*/ | ||
createRunesMintOrder(order: RunesMintOrderRequest): Promise<RunesMintOrderResponse> { | ||
return this.instance.createRunesMintOrder(order); | ||
} | ||
/** | ||
* Gets the inventory of available items. | ||
@@ -89,0 +108,0 @@ * @returns {Promise<v1.InscriptionInventoryResponse[]>} A promise that resolves with the inventory response. |
@@ -41,2 +41,8 @@ export interface InscriptionTransaction { | ||
/* | ||
For some transactions this gets set to the txid | ||
that inscription gets sent to user receiveAddress | ||
*/ | ||
sent?: string; | ||
// only 1 of metadataDataURL or metadataUrl should be present. not both! | ||
@@ -593,2 +599,10 @@ /* metadata json to be stored on chain */ | ||
COMPLETED = 'completed', // order is completed, files are inscribed | ||
} | ||
export enum OrderType { | ||
RUNE_ETCH = 'rune-etch', | ||
RUNE_MINT = 'rune-mint', | ||
BULK = 'bulk', | ||
DIRECT = 'direct', | ||
BRC20 = 'brc20', | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
285277
115
5652