@volare.finance/schemas.js
Version:
90 lines • 6.59 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.ERC1155MetadataSchema = exports.ERC1155Metadata = void 0;
const mongoose_1 = require("@nestjs/mongoose");
const swagger_1 = require("@nestjs/swagger");
const nft_1 = require("../nft");
let ERC1155Metadata = class ERC1155Metadata {
};
exports.ERC1155Metadata = ERC1155Metadata;
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: 'The ERC1155 address.', example: '0x57e9a39ae8ec404c08f88740a9e6e306f50c937f' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "contract", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: `The token id.`, example: '5' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "tokenId", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: `The token's name.`, example: 'Root for England' }),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "name", void 0);
__decorate([
(0, swagger_1.ApiProperty)({
description: `The token's description.`,
example: 'Holding this NFT means you support England to win games in the OKX NFT Football Cup.',
}),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "description", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: `The token's image URL.`, example: 'ipfs://QmQJGGJ6LMJxsUxj9kvrcafoEsiPgB2QLXomwv3DsDAfyz' }),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "image", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({
description: 'Raw SVG image data, if you want to generate images on the fly (not recommended).',
example: '<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="128px" height="128px" viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> <image id="image0" width="128" height="128" x="0" y="0" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAAgMAAAC+UIlYAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXMWG1BqjTtkdv///+fPGKRAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YDCAwTBZZCTHkAAABZSURBVFjD7dXBDQAgCANAlmRJpxSMECE4QdsX1vNHoohFLcsiNz57F2cCLBBomgnwgH5CgAemF6UjgALxkWiLd+eOAAr0oj8gwAK5GC2lI4ACuRhPSkeAAjYQ4HyuTir61AAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0wOFQxMjoxOTowNSswMDowMGB5OQQAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMDhUMTI6MTk6MDUrMDA6MDARJIG4AAAAAElFTkSuQmCC" /></svg>',
}),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "image_data", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ type: nft_1.AttributeDto, isArray: true, description: `The token's properties displayed on the OpenSea page.` }),
(0, mongoose_1.Prop)(),
__metadata("design:type", Array)
], ERC1155Metadata.prototype, "attributes", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({
description: 'A URL to a multi-media attachment for the token.',
example: 'https://rr4---sn-ogul7n7z.googlevideo.com/videoplayback?expire=1646764134&ei=BkwnYuX_G9eIkgaklZLYCw&ip=44.234.40.49&id=o-AOd1dTH7z0Qo0dP6Lh6ZyX-JtzGK7s7c68-C5g6-2Crd&itag=135&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303%2C308%2C315%2C394%2C395%2C396%2C397%2C398%2C399%2C400%2C401&source=youtube&requiressl=yes&vprv=1&mime=video%2Fmp4&ns=OGNrSG6S91zvgCImVgLReboG&gir=yes&clen=1418421&dur=358.999&lmt=1641739040884936&keepalive=yes&fexp=24001373,24007246,24162928&c=WEB&txp=4532434&n=9ygiGIA2pJj8LuP1f4Jp&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgbYDYFI44IvhhkoIFT0KXuUu7oOn7mgx0_OFv9NC1J-oCIFGM4S0vwG_SnHuuexGWukzyMQg9GtpAU1kPC00F3iAP&rm=sn-nx5ze7z&req_id=29cc321b7862a3ee&ipbypass=yes&redirect_counter=2&cm2rm=sn-ouu2j-ioqz7z&cms_redirect=yes&cmsv=e&mh=es&mip=164.70.90.41&mm=29&mn=sn-ogul7n7z&ms=rdu&mt=1646742339&mv=m&mvi=4&pl=22&lsparams=ipbypass,mh,mip,mm,mn,ms,mv,mvi,pl&lsig=AG3C_xAwRgIhAOixRweG18rKMarFNtEfeyZcdLPpSCUan4DTok6IqDZaAiEAl2fYsqwcHB5Io5GrNnKFPNdwi_ekCMk_bUNV993WgqY%3D',
}),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "animation_url", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: 'The image URL on OpenSea.', example: 'https://storage.googleapis.com/opensea-prod.appspot.com/puffs/2.png' }),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "external_url", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ description: 'The image URL on Youtube.', example: 'https://storage.googleapis.com/opensea-prod.appspot.com/puffs/3.png' }),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "youtube_url", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({
description: `The token's background color on OpenSea. Must be a six-character hexadecimal without a pre-pended #.`,
example: 'E6E6E6',
}),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], ERC1155Metadata.prototype, "background_color", void 0);
exports.ERC1155Metadata = ERC1155Metadata = __decorate([
(0, mongoose_1.Schema)({ collection: 'erc1155_metadata' })
], ERC1155Metadata);
exports.ERC1155MetadataSchema = mongoose_1.SchemaFactory.createForClass(ERC1155Metadata);
//# sourceMappingURL=erc1155.metadata.js.map