@volare.finance/volare.js
Version:
The SDK for Volare Protocol
38 lines • 1.14 kB
JavaScript
;
/**
* @file notification.ts
* @author astra <astra@volare.finance>
* @date 2022
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Notification = void 0;
const tslib_1 = require("tslib");
const url_1 = require("./url");
class Notification {
constructor(instance) {
this.instance = instance;
}
notifications(owner, isRead = false, filter) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const response = yield this.instance.post((0, url_1.NotificationsUrl)(), filter, {
params: {
owner,
isRead,
},
});
return response.data;
});
}
read(owner, ids) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const response = yield this.instance.post((0, url_1.NotificationsReadUrl)(), ids, {
params: {
owner,
},
});
return response.data;
});
}
}
exports.Notification = Notification;
//# sourceMappingURL=notification.js.map