UNPKG

gray-market-js

Version:

Utility library for the Gray Market rental marketplace

40 lines (35 loc) 856 B
class RentalsClient { constructor(axiosInstance) { this.axiosInstance = axiosInstance; } getAllBySelf(token) { return this.axiosInstance.get(`/rentals/allbyself`, { headers: token ? { "Authorization": `Bearer ${token}` } : undefined }); } getAllByWallet(address) { return this.axiosInstance.get(`/rentals/allbywallet/${address}`); } getByToken(token) { return this.axiosInstance.get(`/rentals/bytoken/${token}`); } signPersonal(token, message) { return this.axiosInstance.post("/rentals/signpersonal", { token, message } ); } signTypedDataV4(token, message) { return this.axiosInstance.post("/rentals/signtypeddatav4", { token, message } ); } } module.exports = RentalsClient;