@volare.finance/schemas.js
Version:
100 lines • 5.06 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.VolareShortSchema = exports.VolareShort = void 0;
const mongoose_1 = require("@nestjs/mongoose");
const swagger_1 = require("@nestjs/swagger");
let VolareShort = class VolareShort {
};
exports.VolareShort = VolareShort;
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The owner address.', example: '0xd894cf83f2f8d1d795b4c0ddc7f86e2baedef3b1' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], VolareShort.prototype, "owner", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The vault ID.', example: 1 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], VolareShort.prototype, "vaultId", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The index in vault.', example: 0 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], VolareShort.prototype, "index", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The vToken address.', example: '0x495d33cf1bd948158bce0ac2393e09b213f3abe7' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], VolareShort.prototype, "vTokenAddress", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The vToken is put when true, or the vToken is call when false.', example: false }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Boolean)
], VolareShort.prototype, "isPut", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The timestamp when this vToken expired.', example: 1670400000 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], VolareShort.prototype, "expiry", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The amount of options minted by the owner.', example: 5 }),
(0, mongoose_1.Prop)(),
__metadata("design:type", Number)
], VolareShort.prototype, "amount", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The strike price (denominated in strike asset).', example: 1000 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], VolareShort.prototype, "strikePrice", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: 'The expiry price (denominated in strike asset).', example: 1600 }),
(0, mongoose_1.Prop)(),
__metadata("design:type", Number)
], VolareShort.prototype, "expiryPrice", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: 'The payout (denominated in collateral asset).', example: 1.875 }),
(0, mongoose_1.Prop)(),
__metadata("design:type", Number)
], VolareShort.prototype, "payout", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: 'Return on equity (n per thousand).', example: -375 }),
(0, mongoose_1.Prop)(),
__metadata("design:type", Number)
], VolareShort.prototype, "roe", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({
description: 'The fee at which the remaining collateral is withdrawn (denominated in collateral asset).',
example: 0.003125,
}),
(0, mongoose_1.Prop)(),
__metadata("design:type", Number)
], VolareShort.prototype, "fee", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The short position state.', example: 1 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], VolareShort.prototype, "state", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The first timestamp at which mint options.', example: 1655289127 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], VolareShort.prototype, "ctime", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The timestamp when the amount changed.', example: 1655289127 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], VolareShort.prototype, "mtime", void 0);
exports.VolareShort = VolareShort = __decorate([
(0, mongoose_1.Schema)({ collection: 'volare_short' })
], VolareShort);
exports.VolareShortSchema = mongoose_1.SchemaFactory.createForClass(VolareShort);
//# sourceMappingURL=volare.short.js.map