Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ordinalsbot

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ordinalsbot - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

5

dist/marketplace.d.ts
import { InscriptionEnv } from "./types";
import { MarketplaceConfirmPaddingOutputsRequest, MarketplaceConfirmPaddingOutputsResponse, MarketplaceCreateListingRequest, MarketplaceCreateListingResponse, MarketplaceCreateOfferRequest, MarketplaceCreateOfferResponse, MarketplaceSetupPaddingOutputsRequest, MarketplaceSetupPaddingOutputsResponse, MarketplaceCreateRequest, MarketplaceCreateResponse, MarketplaceGetListingResponse, MarketplaceSubmitOfferRequest, MarketplaceSubmitOfferResponse, MarketplaceGetListingRequest, MarketplaceSaveListingRequest, MarketplaceSaveListingResponse, MarketplaceTransferRequest, MarketplaceTransferAPIResponse, MarketplaceConfirmListingRequest, MarketplaceConfirmListingResponse, MarketplaceReListingRequest, MarketplaceReListingResponse, MarketplaceConfirmReListResponse, MarketplaceConfirmReListRequest, MarketplaceDeListRequest, MarketplaceDeListAPIResponse } from "./types/marketplace_types";
import { MarketplaceConfirmPaddingOutputsRequest, MarketplaceConfirmPaddingOutputsResponse, MarketplaceCreateListingRequest, MarketplaceCreateListingResponse, MarketplaceCreateOfferRequest, MarketplaceCreateOfferResponse, MarketplaceSetupPaddingOutputsRequest, MarketplaceSetupPaddingOutputsResponse, MarketplaceCreateRequest, MarketplaceCreateResponse, MarketplaceGetListingResponse, MarketplaceSubmitOfferRequest, MarketplaceSubmitOfferResponse, MarketplaceGetListingRequest, MarketplaceSaveListingRequest, MarketplaceSaveListingResponse, MarketplaceTransferRequest, MarketplaceTransferAPIResponse, MarketplaceConfirmListingRequest, MarketplaceConfirmListingResponse, MarketplaceReListingRequest, MarketplaceReListingResponse, MarketplaceConfirmReListResponse, MarketplaceConfirmReListRequest, MarketplaceDeListRequest, MarketplaceDeListAPIResponse, MarketplaceConfirmDeListRequest, MarketplaceConfirmDeListResponse } from "./types/marketplace_types";
import { SignTransactionResponse } from 'sats-connect';

@@ -20,4 +20,5 @@ export declare class MarketPlace {

transfer(transferRequest: MarketplaceTransferRequest): Promise<SignTransactionResponse | MarketplaceTransferAPIResponse>;
deList(deListingRequest: MarketplaceDeListRequest): Promise<MarketplaceDeListAPIResponse | SignTransactionResponse>;
deList(deListingRequest: MarketplaceDeListRequest): Promise<MarketplaceDeListAPIResponse | MarketplaceConfirmDeListResponse>;
confirmDeListing(confirmDeListingRequest: MarketplaceConfirmDeListRequest): Promise<MarketplaceConfirmDeListResponse>;
}
//# sourceMappingURL=marketplace.d.ts.map

23

dist/marketplace.js

@@ -303,12 +303,29 @@ "use strict";

onFinish: async (response) => {
return resolve(response);
try {
const confirmDeListingPayload = {
ordinalId: deListingRequest.ordinalId,
sellerPaymentAddress: deListingRequest.senderPaymentAddress,
};
const confirmDeListResponse = await this.confirmDeListing(confirmDeListingPayload);
resolve({
...confirmDeListResponse,
txId: response?.txId,
});
}
catch (error) {
console.error("Error delisting ordinal:", error);
reject(error);
}
},
onCancel: () => {
console.log('Transaction canceled');
}
console.log("Transaction canceled");
},
});
});
}
confirmDeListing(confirmDeListingRequest) {
return this.marketplaceInstance.confirmDeListing(confirmDeListingRequest);
}
}
exports.MarketPlace = MarketPlace;
//# sourceMappingURL=marketplace.js.map

@@ -1,2 +0,2 @@

import { MarketplaceConfirmPaddingOutputsRequest, MarketplaceConfirmPaddingOutputsResponse, MarketplaceCreateListingRequest, MarketplaceCreateListingResponse, MarketplaceCreateOfferRequest, MarketplaceCreateOfferResponse, MarketplaceSetupPaddingOutputsRequest, MarketplaceSetupPaddingOutputsResponse, MarketplaceCreateRequest, MarketplaceCreateResponse, MarketplaceGetListingResponse, MarketplaceSubmitOfferRequest, MarketplaceSubmitOfferResponse, MarketplaceGetListingRequest, MarketplaceSaveListingRequest, MarketplaceSaveListingResponse, MarketplaceTransferRequest, MarketplaceTransferAPIResponse, MarketplaceConfirmListingRequest, MarketplaceConfirmListingResponse, MarketplaceReListingRequest, MarketplaceReListingResponse, MarketplaceConfirmReListRequest, MarketplaceConfirmReListResponse, MarketplaceDeListRequest, MarketplaceDeListAPIResponse } from "./types/marketplace_types";
import { MarketplaceConfirmPaddingOutputsRequest, MarketplaceConfirmPaddingOutputsResponse, MarketplaceCreateListingRequest, MarketplaceCreateListingResponse, MarketplaceCreateOfferRequest, MarketplaceCreateOfferResponse, MarketplaceSetupPaddingOutputsRequest, MarketplaceSetupPaddingOutputsResponse, MarketplaceCreateRequest, MarketplaceCreateResponse, MarketplaceGetListingResponse, MarketplaceSubmitOfferRequest, MarketplaceSubmitOfferResponse, MarketplaceGetListingRequest, MarketplaceSaveListingRequest, MarketplaceSaveListingResponse, MarketplaceTransferRequest, MarketplaceTransferAPIResponse, MarketplaceConfirmListingRequest, MarketplaceConfirmListingResponse, MarketplaceReListingRequest, MarketplaceReListingResponse, MarketplaceConfirmReListRequest, MarketplaceConfirmReListResponse, MarketplaceDeListRequest, MarketplaceDeListAPIResponse, MarketplaceConfirmDeListRequest, MarketplaceConfirmDeListResponse } from "./types/marketplace_types";
import { InscriptionEnv } from "./types";

@@ -20,4 +20,5 @@ export declare class MarketPlaceClient {

deList(deListRequest: MarketplaceDeListRequest): Promise<MarketplaceDeListAPIResponse>;
confirmDeListing(confirmDeListRequest: MarketplaceConfirmDeListRequest): Promise<MarketplaceConfirmDeListResponse>;
transfer(transferRequest: MarketplaceTransferRequest): Promise<MarketplaceTransferAPIResponse>;
}
//# sourceMappingURL=marketplaceClient.d.ts.map

@@ -97,2 +97,7 @@ "use strict";

}
async confirmDeListing(confirmDeListRequest) {
return this.instanceV1.post(`/confirm-delist`, {
...confirmDeListRequest,
});
}
async transfer(transferRequest) {

@@ -99,0 +104,0 @@ return this.instanceV1.post(`/transfer-ordinal`, {

@@ -183,3 +183,11 @@ export declare enum LISTING_STATUS {

}
export interface MarketplaceConfirmDeListRequest {
ordinalId: string;
sellerPaymentAddress: string;
}
export interface MarketplaceConfirmDeListResponse {
message: string;
txId: string | undefined;
}
export {};
//# sourceMappingURL=marketplace_types.d.ts.map
{
"name": "ordinalsbot",
"version": "0.2.3",
"version": "0.2.4",
"description": "Node.js library for OrdinalsBot API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -30,3 +30,5 @@ import { MarketPlaceClient } from "./marketplaceClient";

MarketplaceDeListRequest,
MarketplaceDeListAPIResponse
MarketplaceDeListAPIResponse,
MarketplaceConfirmDeListRequest,
MarketplaceConfirmDeListResponse
} from "./types/marketplace_types";

@@ -358,3 +360,3 @@

deListingRequest: MarketplaceDeListRequest
): Promise<MarketplaceDeListAPIResponse | SignTransactionResponse> {
): Promise<MarketplaceDeListAPIResponse | MarketplaceConfirmDeListResponse> {
if (!deListingRequest.walletProvider) {

@@ -387,15 +389,40 @@ return this.marketplaceInstance.deList(

};
return new Promise((resolve, reject) => {
signTransaction({
payload,
onFinish: async (response: any) => {
return resolve(response)
onFinish: async (response) => {
try {
const confirmDeListingPayload = {
ordinalId: deListingRequest.ordinalId,
sellerPaymentAddress: deListingRequest.senderPaymentAddress,
};
const confirmDeListResponse = await this.confirmDeListing(
confirmDeListingPayload
);
resolve({
...confirmDeListResponse,
txId: response?.txId,
});
} catch (error) {
console.error("Error delisting ordinal:", error);
reject(error);
}
},
onCancel: () => {
console.log('Transaction canceled');
}
console.log("Transaction canceled");
},
});
});
}
/**
* Confirms delisting in the marketplace.
* @param {MarketplaceConfirmDeListRequest} confirmDeListingRequest - The request object for confirming the listing.
* @returns {Promise<MarketplaceConfirmDeListResponse>} A promise that resolves with the response from confirming the listing.
*/
confirmDeListing(
confirmDeListingRequest: MarketplaceConfirmDeListRequest
): Promise<MarketplaceConfirmDeListResponse> {
return this.marketplaceInstance.confirmDeListing(confirmDeListingRequest)
}
}

@@ -30,2 +30,4 @@ import axios, { AxiosInstance } from "axios";

MarketplaceDeListAPIResponse,
MarketplaceConfirmDeListRequest,
MarketplaceConfirmDeListResponse,
} from "./types/marketplace_types";

@@ -200,2 +202,15 @@ import { InscriptionEnv } from "./types";

/**
* Confirms delisting in the marketplace.
* @param {MarketplaceConfirmDeListRequest} confirmDeListRequest - The request object for confirming the listing.
* @returns {Promise<MarketplaceConfirmDeListResponse>} A promise that resolves with the response from confirming the listing.
*/
async confirmDeListing(
confirmDeListRequest: MarketplaceConfirmDeListRequest
): Promise<MarketplaceConfirmDeListResponse> {
return this.instanceV1.post(`/confirm-delist`, {
...confirmDeListRequest,
})
}
/**
* transfer the ordinal to another ordinal address.

@@ -202,0 +217,0 @@ * @param {MarketplaceTransferRequest} transferRequest - The request object for transfer.

@@ -403,2 +403,29 @@ export enum LISTING_STATUS {

senderPaymentInputs: Array<number>;
}
/**
* Request object for confirming a delisting in the marketplace.
*/
export interface MarketplaceConfirmDeListRequest {
/**
* The ordinal id for relist
*/
ordinalId: string;
/**
* seller payment address
*/
sellerPaymentAddress: string;
}
/**
* Response object for confirming a delisting in the marketplace.
*/
export interface MarketplaceConfirmDeListResponse {
/**
* A message indicating the result of the confirmation operation.
*/
message: string;
/** transaction id of the transfer */
txId: string | undefined;
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc