Comparing version 1.1.3 to 1.1.4
"use strict"; | ||
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 }); | ||
@@ -16,2 +25,23 @@ exports.PrivateMetadata = exports.BaseMinaNFT = void 0; | ||
Object.defineProperty(exports, "PrivateMetadata", { enumerable: true, get: function () { return privatemetadata_1.PrivateMetadata; } }); | ||
// Dummy class to ovecome o1js compile bug | ||
class Key extends o1js_1.SmartContract { | ||
constructor() { | ||
super(...arguments); | ||
this.key = (0, o1js_1.State)(); | ||
} | ||
mint(key) { | ||
this.key.assertEquals((0, o1js_1.Field)(0)); | ||
this.key.set(key); | ||
} | ||
} | ||
__decorate([ | ||
(0, o1js_1.state)(o1js_1.Field), | ||
__metadata("design:type", Object) | ||
], Key.prototype, "key", void 0); | ||
__decorate([ | ||
o1js_1.method, | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [o1js_1.Field]), | ||
__metadata("design:returntype", void 0) | ||
], Key.prototype, "mint", null); | ||
/** | ||
@@ -157,2 +187,3 @@ * Base class for MinaNFT | ||
console.time("MinaNFTMetadataUpdate compiled"); | ||
await Key.compile(); | ||
const { verificationKey } = await update_1.MinaNFTMetadataUpdate.compile(); | ||
@@ -159,0 +190,0 @@ console.timeEnd("MinaNFTMetadataUpdate compiled"); |
@@ -22,1 +22,2 @@ export { MinaNFT } from "./minanft"; | ||
export { TextData } from "./storage/text"; | ||
export { blockchain, initBlockchain } from "./mina"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TextData = exports.MapData = exports.FileData = exports.File = exports.IPFS = exports.EscrowDeposit = exports.Escrow = exports.MinaNFTVerifier = exports.MapElement = exports.RedactedMinaNFTMapStateProof = exports.RedactedMinaNFTMapState = exports.RedactedMinaNFTMapCalculation = exports.MinaNFTBadgeProof = exports.MinaNFTBadgeCalculation = exports.BadgeDataWitness = exports.BadgeData = exports.MinaNFTVerifierBadge = exports.MinaNFTVerifierBadgeEvent = exports.MinaNFTMetadataUpdateProof = exports.MinaNFTMetadataUpdate = exports.MetadataMap = exports.MetadataTransition = exports.MetadataUpdate = exports.Storage = exports.MetadataWitness = exports.Metadata = exports.Update = exports.EscrowApproval = exports.EscrowTransfer = exports.MinaNFTContract = exports.BaseMinaNFTObject = exports.PrivateMetadata = exports.BaseMinaNFT = exports.RedactedMinaNFT = exports.MinaNFTEscrow = exports.MinaNFTBadge = exports.MinaNFT = void 0; | ||
exports.initBlockchain = exports.TextData = exports.MapData = exports.FileData = exports.File = exports.IPFS = exports.EscrowDeposit = exports.Escrow = exports.MinaNFTVerifier = exports.MapElement = exports.RedactedMinaNFTMapStateProof = exports.RedactedMinaNFTMapState = exports.RedactedMinaNFTMapCalculation = exports.MinaNFTBadgeProof = exports.MinaNFTBadgeCalculation = exports.BadgeDataWitness = exports.BadgeData = exports.MinaNFTVerifierBadge = exports.MinaNFTVerifierBadgeEvent = exports.MinaNFTMetadataUpdateProof = exports.MinaNFTMetadataUpdate = exports.MetadataMap = exports.MetadataTransition = exports.MetadataUpdate = exports.Storage = exports.MetadataWitness = exports.Metadata = exports.Update = exports.EscrowApproval = exports.EscrowTransfer = exports.MinaNFTContract = exports.BaseMinaNFTObject = exports.PrivateMetadata = exports.BaseMinaNFT = exports.RedactedMinaNFT = exports.MinaNFTEscrow = exports.MinaNFTBadge = exports.MinaNFT = void 0; | ||
var minanft_1 = require("./minanft"); | ||
@@ -61,1 +61,3 @@ Object.defineProperty(exports, "MinaNFT", { enumerable: true, get: function () { return minanft_1.MinaNFT; } }); | ||
Object.defineProperty(exports, "TextData", { enumerable: true, get: function () { return text_1.TextData; } }); | ||
var mina_1 = require("./mina"); | ||
Object.defineProperty(exports, "initBlockchain", { enumerable: true, get: function () { return mina_1.initBlockchain; } }); |
@@ -8,2 +8,3 @@ export { MinaNFT }; | ||
import { MinaNFTStringUpdate, MinaNFTFieldUpdate, MinaNFTImageUpdate, MinaNFTTextUpdate, MinaNFTFileUpdate } from "./update"; | ||
import { blockchain } from "./mina"; | ||
/** | ||
@@ -57,3 +58,3 @@ * MinaNFT is the class for the NFT, wrapper around the MinaNFTContract | ||
*/ | ||
static minaInit(local?: boolean): void; | ||
static minaInit(chain: blockchain): void; | ||
/** | ||
@@ -60,0 +61,0 @@ * Get current Mina network fee |
@@ -13,2 +13,3 @@ "use strict"; | ||
const ipfs_1 = require("./storage/ipfs"); | ||
const mina_1 = require("./mina"); | ||
const config_json_1 = require("../src/config.json"); | ||
@@ -112,11 +113,4 @@ /** | ||
*/ | ||
static minaInit(local = true) { | ||
const berkeley = o1js_1.Mina.Network({ | ||
mina: config_json_1.MINAURL, | ||
archive: config_json_1.ARCHIVEURL, | ||
}); | ||
const Network = local | ||
? o1js_1.Mina.LocalBlockchain({ proofsEnabled: true }) | ||
: berkeley; | ||
o1js_1.Mina.setActiveInstance(Network); | ||
static minaInit(chain) { | ||
(0, mina_1.initBlockchain)(chain); | ||
} | ||
@@ -123,0 +117,0 @@ /** |
"use strict"; | ||
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 }); | ||
@@ -16,2 +25,23 @@ exports.PrivateMetadata = exports.BaseMinaNFT = void 0; | ||
Object.defineProperty(exports, "PrivateMetadata", { enumerable: true, get: function () { return privatemetadata_1.PrivateMetadata; } }); | ||
// Dummy class to ovecome o1js compile bug | ||
class Key extends o1js_1.SmartContract { | ||
constructor() { | ||
super(...arguments); | ||
this.key = (0, o1js_1.State)(); | ||
} | ||
mint(key) { | ||
this.key.assertEquals((0, o1js_1.Field)(0)); | ||
this.key.set(key); | ||
} | ||
} | ||
__decorate([ | ||
(0, o1js_1.state)(o1js_1.Field), | ||
__metadata("design:type", Object) | ||
], Key.prototype, "key", void 0); | ||
__decorate([ | ||
o1js_1.method, | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [o1js_1.Field]), | ||
__metadata("design:returntype", void 0) | ||
], Key.prototype, "mint", null); | ||
/** | ||
@@ -157,2 +187,3 @@ * Base class for MinaNFT | ||
console.time("MinaNFTMetadataUpdate compiled"); | ||
await Key.compile(); | ||
const { verificationKey } = await update_1.MinaNFTMetadataUpdate.compile(); | ||
@@ -159,0 +190,0 @@ console.timeEnd("MinaNFTMetadataUpdate compiled"); |
@@ -22,1 +22,2 @@ export { MinaNFT } from "./minanft"; | ||
export { TextData } from "./storage/text"; | ||
export { blockchain, initBlockchain } from "./mina"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TextData = exports.MapData = exports.FileData = exports.File = exports.IPFS = exports.EscrowDeposit = exports.Escrow = exports.MinaNFTVerifier = exports.MapElement = exports.RedactedMinaNFTMapStateProof = exports.RedactedMinaNFTMapState = exports.RedactedMinaNFTMapCalculation = exports.MinaNFTBadgeProof = exports.MinaNFTBadgeCalculation = exports.BadgeDataWitness = exports.BadgeData = exports.MinaNFTVerifierBadge = exports.MinaNFTVerifierBadgeEvent = exports.MinaNFTMetadataUpdateProof = exports.MinaNFTMetadataUpdate = exports.MetadataMap = exports.MetadataTransition = exports.MetadataUpdate = exports.Storage = exports.MetadataWitness = exports.Metadata = exports.Update = exports.EscrowApproval = exports.EscrowTransfer = exports.MinaNFTContract = exports.BaseMinaNFTObject = exports.PrivateMetadata = exports.BaseMinaNFT = exports.RedactedMinaNFT = exports.MinaNFTEscrow = exports.MinaNFTBadge = exports.MinaNFT = void 0; | ||
exports.initBlockchain = exports.TextData = exports.MapData = exports.FileData = exports.File = exports.IPFS = exports.EscrowDeposit = exports.Escrow = exports.MinaNFTVerifier = exports.MapElement = exports.RedactedMinaNFTMapStateProof = exports.RedactedMinaNFTMapState = exports.RedactedMinaNFTMapCalculation = exports.MinaNFTBadgeProof = exports.MinaNFTBadgeCalculation = exports.BadgeDataWitness = exports.BadgeData = exports.MinaNFTVerifierBadge = exports.MinaNFTVerifierBadgeEvent = exports.MinaNFTMetadataUpdateProof = exports.MinaNFTMetadataUpdate = exports.MetadataMap = exports.MetadataTransition = exports.MetadataUpdate = exports.Storage = exports.MetadataWitness = exports.Metadata = exports.Update = exports.EscrowApproval = exports.EscrowTransfer = exports.MinaNFTContract = exports.BaseMinaNFTObject = exports.PrivateMetadata = exports.BaseMinaNFT = exports.RedactedMinaNFT = exports.MinaNFTEscrow = exports.MinaNFTBadge = exports.MinaNFT = void 0; | ||
var minanft_1 = require("./minanft"); | ||
@@ -61,1 +61,3 @@ Object.defineProperty(exports, "MinaNFT", { enumerable: true, get: function () { return minanft_1.MinaNFT; } }); | ||
Object.defineProperty(exports, "TextData", { enumerable: true, get: function () { return text_1.TextData; } }); | ||
var mina_1 = require("./mina"); | ||
Object.defineProperty(exports, "initBlockchain", { enumerable: true, get: function () { return mina_1.initBlockchain; } }); |
@@ -8,2 +8,3 @@ export { MinaNFT }; | ||
import { MinaNFTStringUpdate, MinaNFTFieldUpdate, MinaNFTImageUpdate, MinaNFTTextUpdate, MinaNFTFileUpdate } from "./update"; | ||
import { blockchain } from "./mina"; | ||
/** | ||
@@ -57,3 +58,3 @@ * MinaNFT is the class for the NFT, wrapper around the MinaNFTContract | ||
*/ | ||
static minaInit(local?: boolean): void; | ||
static minaInit(chain: blockchain): void; | ||
/** | ||
@@ -60,0 +61,0 @@ * Get current Mina network fee |
@@ -13,2 +13,3 @@ "use strict"; | ||
const ipfs_1 = require("./storage/ipfs"); | ||
const mina_1 = require("./mina"); | ||
const config_json_1 = require("../src/config.json"); | ||
@@ -112,11 +113,4 @@ /** | ||
*/ | ||
static minaInit(local = true) { | ||
const berkeley = o1js_1.Mina.Network({ | ||
mina: config_json_1.MINAURL, | ||
archive: config_json_1.ARCHIVEURL, | ||
}); | ||
const Network = local | ||
? o1js_1.Mina.LocalBlockchain({ proofsEnabled: true }) | ||
: berkeley; | ||
o1js_1.Mina.setActiveInstance(Network); | ||
static minaInit(chain) { | ||
(0, mina_1.initBlockchain)(chain); | ||
} | ||
@@ -123,0 +117,0 @@ /** |
{ | ||
"name": "minanft", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "MinaNFT Typescript/JavaScript integration library", | ||
@@ -5,0 +5,0 @@ "author": "dfst.io", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
488812
98
9506