@eluvio/elv-client-js 3.2.13 → 3.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -927,6 +927,35 @@ exports.ListingAttributes = async function({marketplaceParams, displayName}={})
|
|
|
927
927
|
);
|
|
928
928
|
};
|
|
929
929
|
|
|
930
|
+
/* PURCHASE / CLAIM */
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Claim the specified item from the specified marketplace
|
|
934
|
+
*
|
|
935
|
+
* Use the <a href="#.ClaimStatus">ClaimStatus</a> method to check minting status after claiming
|
|
936
|
+
*
|
|
937
|
+
* @methodGroup Purchase
|
|
938
|
+
* @namedParams
|
|
939
|
+
* @param {Object} marketplaceParams - Parameters of the marketplace
|
|
940
|
+
* @param {string} sku - The SKU of the item to claime
|
|
941
|
+
*/
|
|
942
|
+
exports.ClaimItem = async function({marketplaceParams, sku}) {
|
|
943
|
+
const marketplaceInfo = await this.MarketplaceInfo({marketplaceParams});
|
|
944
|
+
|
|
945
|
+
await this.client.authClient.MakeAuthServiceRequest({
|
|
946
|
+
method: "POST",
|
|
947
|
+
path: UrlJoin("as", "wlt", "act", marketplaceInfo.tenant_id),
|
|
948
|
+
body: {
|
|
949
|
+
op: "nft-claim",
|
|
950
|
+
sid: marketplaceInfo.marketplaceId,
|
|
951
|
+
sku
|
|
952
|
+
},
|
|
953
|
+
headers: {
|
|
954
|
+
Authorization: `Bearer ${this.AuthToken()}`
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
};
|
|
958
|
+
|
|
930
959
|
/* MINTING STATUS */
|
|
931
960
|
|
|
932
961
|
/**
|