@silvana-one/nft 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1400 -0
- package/dist/node/admin/advanced.d.ts +469 -0
- package/dist/node/admin/advanced.js +525 -0
- package/dist/node/admin/advanced.js.map +1 -0
- package/dist/node/admin/index.d.ts +1 -0
- package/dist/node/admin/index.js +2 -0
- package/dist/node/admin/index.js.map +1 -0
- package/dist/node/contracts/admin.d.ts +140 -0
- package/dist/node/contracts/admin.js +336 -0
- package/dist/node/contracts/admin.js.map +1 -0
- package/dist/node/contracts/collection.d.ts +551 -0
- package/dist/node/contracts/collection.js +1049 -0
- package/dist/node/contracts/collection.js.map +1 -0
- package/dist/node/contracts/index.d.ts +3 -0
- package/dist/node/contracts/index.js +4 -0
- package/dist/node/contracts/index.js.map +1 -0
- package/dist/node/contracts/nft.d.ts +76 -0
- package/dist/node/contracts/nft.js +329 -0
- package/dist/node/contracts/nft.js.map +1 -0
- package/dist/node/contracts.d.ts +709 -0
- package/dist/node/contracts.js +61 -0
- package/dist/node/contracts.js.map +1 -0
- package/dist/node/index.cjs +5032 -0
- package/dist/node/index.d.ts +8 -0
- package/dist/node/index.js +9 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/interfaces/admin.d.ts +102 -0
- package/dist/node/interfaces/admin.js +2 -0
- package/dist/node/interfaces/admin.js.map +1 -0
- package/dist/node/interfaces/approval.d.ts +57 -0
- package/dist/node/interfaces/approval.js +62 -0
- package/dist/node/interfaces/approval.js.map +1 -0
- package/dist/node/interfaces/collection.d.ts +57 -0
- package/dist/node/interfaces/collection.js +2 -0
- package/dist/node/interfaces/collection.js.map +1 -0
- package/dist/node/interfaces/encoding.d.ts +24 -0
- package/dist/node/interfaces/encoding.js +32 -0
- package/dist/node/interfaces/encoding.js.map +1 -0
- package/dist/node/interfaces/events.d.ts +833 -0
- package/dist/node/interfaces/events.js +106 -0
- package/dist/node/interfaces/events.js.map +1 -0
- package/dist/node/interfaces/index.d.ts +10 -0
- package/dist/node/interfaces/index.js +11 -0
- package/dist/node/interfaces/index.js.map +1 -0
- package/dist/node/interfaces/ownable.d.ts +94 -0
- package/dist/node/interfaces/ownable.js +12 -0
- package/dist/node/interfaces/ownable.js.map +1 -0
- package/dist/node/interfaces/owner.d.ts +61 -0
- package/dist/node/interfaces/owner.js +101 -0
- package/dist/node/interfaces/owner.js.map +1 -0
- package/dist/node/interfaces/pausable.d.ts +74 -0
- package/dist/node/interfaces/pausable.js +14 -0
- package/dist/node/interfaces/pausable.js.map +1 -0
- package/dist/node/interfaces/types.d.ts +2297 -0
- package/dist/node/interfaces/types.js +507 -0
- package/dist/node/interfaces/types.js.map +1 -0
- package/dist/node/interfaces/update.d.ts +53 -0
- package/dist/node/interfaces/update.js +58 -0
- package/dist/node/interfaces/update.js.map +1 -0
- package/dist/node/marketplace/auction.d.ts +775 -0
- package/dist/node/marketplace/auction.js +430 -0
- package/dist/node/marketplace/auction.js.map +1 -0
- package/dist/node/marketplace/bid.d.ts +254 -0
- package/dist/node/marketplace/bid.js +260 -0
- package/dist/node/marketplace/bid.js.map +1 -0
- package/dist/node/marketplace/index.d.ts +5 -0
- package/dist/node/marketplace/index.js +6 -0
- package/dist/node/marketplace/index.js.map +1 -0
- package/dist/node/marketplace/nft-shares.d.ts +1083 -0
- package/dist/node/marketplace/nft-shares.js +398 -0
- package/dist/node/marketplace/nft-shares.js.map +1 -0
- package/dist/node/marketplace/offer.d.ts +192 -0
- package/dist/node/marketplace/offer.js +132 -0
- package/dist/node/marketplace/offer.js.map +1 -0
- package/dist/node/marketplace/types.d.ts +374 -0
- package/dist/node/marketplace/types.js +33 -0
- package/dist/node/marketplace/types.js.map +1 -0
- package/dist/node/metadata/index.d.ts +3 -0
- package/dist/node/metadata/index.js +4 -0
- package/dist/node/metadata/index.js.map +1 -0
- package/dist/node/metadata/metadata.d.ts +337 -0
- package/dist/node/metadata/metadata.js +439 -0
- package/dist/node/metadata/metadata.js.map +1 -0
- package/dist/node/metadata/text.d.ts +44 -0
- package/dist/node/metadata/text.js +42 -0
- package/dist/node/metadata/text.js.map +1 -0
- package/dist/node/metadata/tree.d.ts +75 -0
- package/dist/node/metadata/tree.js +85 -0
- package/dist/node/metadata/tree.js.map +1 -0
- package/dist/node/vk.d.ts +42 -0
- package/dist/node/vk.js +45 -0
- package/dist/node/vk.js.map +1 -0
- package/dist/node/zkprogram-example/game.d.ts +76 -0
- package/dist/node/zkprogram-example/game.js +108 -0
- package/dist/node/zkprogram-example/game.js.map +1 -0
- package/dist/node/zkprogram-example/index.d.ts +2 -0
- package/dist/node/zkprogram-example/index.js +3 -0
- package/dist/node/zkprogram-example/index.js.map +1 -0
- package/dist/node/zkprogram-example/update.d.ts +76 -0
- package/dist/node/zkprogram-example/update.js +85 -0
- package/dist/node/zkprogram-example/update.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tsconfig.web.tsbuildinfo +1 -0
- package/dist/web/admin/advanced.d.ts +469 -0
- package/dist/web/admin/advanced.js +525 -0
- package/dist/web/admin/advanced.js.map +1 -0
- package/dist/web/admin/index.d.ts +1 -0
- package/dist/web/admin/index.js +2 -0
- package/dist/web/admin/index.js.map +1 -0
- package/dist/web/contracts/admin.d.ts +140 -0
- package/dist/web/contracts/admin.js +336 -0
- package/dist/web/contracts/admin.js.map +1 -0
- package/dist/web/contracts/collection.d.ts +551 -0
- package/dist/web/contracts/collection.js +1049 -0
- package/dist/web/contracts/collection.js.map +1 -0
- package/dist/web/contracts/index.d.ts +3 -0
- package/dist/web/contracts/index.js +4 -0
- package/dist/web/contracts/index.js.map +1 -0
- package/dist/web/contracts/nft.d.ts +76 -0
- package/dist/web/contracts/nft.js +329 -0
- package/dist/web/contracts/nft.js.map +1 -0
- package/dist/web/contracts.d.ts +709 -0
- package/dist/web/contracts.js +61 -0
- package/dist/web/contracts.js.map +1 -0
- package/dist/web/index.d.ts +8 -0
- package/dist/web/index.js +9 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/interfaces/admin.d.ts +102 -0
- package/dist/web/interfaces/admin.js +2 -0
- package/dist/web/interfaces/admin.js.map +1 -0
- package/dist/web/interfaces/approval.d.ts +57 -0
- package/dist/web/interfaces/approval.js +62 -0
- package/dist/web/interfaces/approval.js.map +1 -0
- package/dist/web/interfaces/collection.d.ts +57 -0
- package/dist/web/interfaces/collection.js +2 -0
- package/dist/web/interfaces/collection.js.map +1 -0
- package/dist/web/interfaces/encoding.d.ts +24 -0
- package/dist/web/interfaces/encoding.js +32 -0
- package/dist/web/interfaces/encoding.js.map +1 -0
- package/dist/web/interfaces/events.d.ts +833 -0
- package/dist/web/interfaces/events.js +106 -0
- package/dist/web/interfaces/events.js.map +1 -0
- package/dist/web/interfaces/index.d.ts +10 -0
- package/dist/web/interfaces/index.js +11 -0
- package/dist/web/interfaces/index.js.map +1 -0
- package/dist/web/interfaces/ownable.d.ts +94 -0
- package/dist/web/interfaces/ownable.js +12 -0
- package/dist/web/interfaces/ownable.js.map +1 -0
- package/dist/web/interfaces/owner.d.ts +61 -0
- package/dist/web/interfaces/owner.js +101 -0
- package/dist/web/interfaces/owner.js.map +1 -0
- package/dist/web/interfaces/pausable.d.ts +74 -0
- package/dist/web/interfaces/pausable.js +14 -0
- package/dist/web/interfaces/pausable.js.map +1 -0
- package/dist/web/interfaces/types.d.ts +2297 -0
- package/dist/web/interfaces/types.js +507 -0
- package/dist/web/interfaces/types.js.map +1 -0
- package/dist/web/interfaces/update.d.ts +53 -0
- package/dist/web/interfaces/update.js +58 -0
- package/dist/web/interfaces/update.js.map +1 -0
- package/dist/web/marketplace/auction.d.ts +775 -0
- package/dist/web/marketplace/auction.js +430 -0
- package/dist/web/marketplace/auction.js.map +1 -0
- package/dist/web/marketplace/bid.d.ts +254 -0
- package/dist/web/marketplace/bid.js +260 -0
- package/dist/web/marketplace/bid.js.map +1 -0
- package/dist/web/marketplace/index.d.ts +5 -0
- package/dist/web/marketplace/index.js +6 -0
- package/dist/web/marketplace/index.js.map +1 -0
- package/dist/web/marketplace/nft-shares.d.ts +1083 -0
- package/dist/web/marketplace/nft-shares.js +398 -0
- package/dist/web/marketplace/nft-shares.js.map +1 -0
- package/dist/web/marketplace/offer.d.ts +192 -0
- package/dist/web/marketplace/offer.js +132 -0
- package/dist/web/marketplace/offer.js.map +1 -0
- package/dist/web/marketplace/types.d.ts +374 -0
- package/dist/web/marketplace/types.js +33 -0
- package/dist/web/marketplace/types.js.map +1 -0
- package/dist/web/metadata/index.d.ts +3 -0
- package/dist/web/metadata/index.js +4 -0
- package/dist/web/metadata/index.js.map +1 -0
- package/dist/web/metadata/metadata.d.ts +337 -0
- package/dist/web/metadata/metadata.js +439 -0
- package/dist/web/metadata/metadata.js.map +1 -0
- package/dist/web/metadata/text.d.ts +44 -0
- package/dist/web/metadata/text.js +42 -0
- package/dist/web/metadata/text.js.map +1 -0
- package/dist/web/metadata/tree.d.ts +75 -0
- package/dist/web/metadata/tree.js +85 -0
- package/dist/web/metadata/tree.js.map +1 -0
- package/dist/web/vk.d.ts +42 -0
- package/dist/web/vk.js +45 -0
- package/dist/web/vk.js.map +1 -0
- package/dist/web/zkprogram-example/game.d.ts +76 -0
- package/dist/web/zkprogram-example/game.js +108 -0
- package/dist/web/zkprogram-example/game.js.map +1 -0
- package/dist/web/zkprogram-example/index.d.ts +2 -0
- package/dist/web/zkprogram-example/index.js +3 -0
- package/dist/web/zkprogram-example/index.js.map +1 -0
- package/dist/web/zkprogram-example/update.d.ts +76 -0
- package/dist/web/zkprogram-example/update.js +85 -0
- package/dist/web/zkprogram-example/update.js.map +1 -0
- package/package.json +65 -0
- package/src/admin/advanced.ts +601 -0
- package/src/admin/index.ts +1 -0
- package/src/contracts/admin.ts +301 -0
- package/src/contracts/collection.ts +1172 -0
- package/src/contracts/index.ts +3 -0
- package/src/contracts/nft.ts +344 -0
- package/src/contracts.ts +107 -0
- package/src/index.ts +8 -0
- package/src/interfaces/admin.ts +127 -0
- package/src/interfaces/approval.ts +99 -0
- package/src/interfaces/collection.ts +68 -0
- package/src/interfaces/encoding.ts +32 -0
- package/src/interfaces/events.ts +115 -0
- package/src/interfaces/index.ts +10 -0
- package/src/interfaces/ownable.ts +32 -0
- package/src/interfaces/owner.ts +143 -0
- package/src/interfaces/pausable.ts +41 -0
- package/src/interfaces/types.ts +623 -0
- package/src/interfaces/update.ts +104 -0
- package/src/marketplace/auction.ts +527 -0
- package/src/marketplace/bid.ts +294 -0
- package/src/marketplace/index.ts +5 -0
- package/src/marketplace/nft-shares.ts +388 -0
- package/src/marketplace/offer.ts +153 -0
- package/src/marketplace/types.ts +33 -0
- package/src/metadata/index.ts +3 -0
- package/src/metadata/metadata.ts +603 -0
- package/src/metadata/text.ts +60 -0
- package/src/metadata/tree.ts +128 -0
- package/src/vk.ts +64 -0
- package/src/zkprogram-example/game.ts +136 -0
- package/src/zkprogram-example/index.ts +2 -0
- package/src/zkprogram-example/update.ts +98 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { AccountUpdate, method, Permissions, PublicKey, State, state, UInt64, SmartContract, Bool, Field, } from "o1js";
|
|
3
|
+
import { UInt64Option, NFTTransactionContext, TransferExtendedParams, TransferEvent, } from "../interfaces/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Creates a new NFT Collection Contract class.
|
|
6
|
+
*
|
|
7
|
+
* @param params - Constructor parameters including admin and upgrade contracts, and network ID.
|
|
8
|
+
* @returns The Collection class extending TokenContract and implementing required interfaces.
|
|
9
|
+
*/
|
|
10
|
+
export function OfferFactory(params) {
|
|
11
|
+
const { collectionContract } = params;
|
|
12
|
+
class NonFungibleTokenOfferContract extends SmartContract {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.owner = State();
|
|
16
|
+
// @state(Whitelist) whitelist = State<Whitelist>();
|
|
17
|
+
this.price = State();
|
|
18
|
+
this.collection = State();
|
|
19
|
+
this.nft = State();
|
|
20
|
+
this.insideBuy = State();
|
|
21
|
+
this.events = {
|
|
22
|
+
buy: TransferEvent,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
async deploy(args) {
|
|
26
|
+
await super.deploy(args);
|
|
27
|
+
this.owner.set(args.owner);
|
|
28
|
+
// this.whitelist.set(args.whitelist);
|
|
29
|
+
this.price.set(args.price);
|
|
30
|
+
this.collection.set(args.collection);
|
|
31
|
+
this.nft.set(args.nft);
|
|
32
|
+
this.insideBuy.set(Bool(false));
|
|
33
|
+
this.account.permissions.set({
|
|
34
|
+
...Permissions.default(),
|
|
35
|
+
send: Permissions.proof(),
|
|
36
|
+
setVerificationKey: Permissions.VerificationKey.impossibleDuringCurrentVersion(),
|
|
37
|
+
setPermissions: Permissions.impossible(),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
getCollectionContract(address) {
|
|
41
|
+
const CollectionContract = collectionContract();
|
|
42
|
+
return new CollectionContract(address);
|
|
43
|
+
}
|
|
44
|
+
async buy() {
|
|
45
|
+
const insideBuy = this.insideBuy.getAndRequireEquals();
|
|
46
|
+
insideBuy.assertFalse("Already inside buy method");
|
|
47
|
+
this.insideBuy.set(Bool(true));
|
|
48
|
+
const collectionAddress = this.collection.getAndRequireEquals();
|
|
49
|
+
const nftAddress = this.nft.getAndRequireEquals();
|
|
50
|
+
const price = this.price.getAndRequireEquals();
|
|
51
|
+
const collection = this.getCollectionContract(collectionAddress);
|
|
52
|
+
await collection.transferByProof({
|
|
53
|
+
address: nftAddress,
|
|
54
|
+
from: this.address,
|
|
55
|
+
to: this.sender.getUnconstrained(),
|
|
56
|
+
price: UInt64Option.fromValue(price),
|
|
57
|
+
context: new NFTTransactionContext({
|
|
58
|
+
custom: [Field(0), Field(0), Field(0)],
|
|
59
|
+
}),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
// @method async sellWithApproval(nftAddress: NFTAddress, price: UInt64) {
|
|
63
|
+
// await this._sell(nftAddress, price);
|
|
64
|
+
// const buyer = this.buyer.getAndRequireEquals();
|
|
65
|
+
// const collection = new Collection(nftAddress.collection);
|
|
66
|
+
// await collection.sellWithApproval(nftAddress.nft, price, buyer);
|
|
67
|
+
// }
|
|
68
|
+
async canTransfer(params) {
|
|
69
|
+
this.insideBuy.requireEquals(Bool(true));
|
|
70
|
+
// We do not set the insideBuy to false here as buy() can be called once only
|
|
71
|
+
// and then the offer is accepted and not valid anymore for other buyers
|
|
72
|
+
const collectionAddress = this.collection.getAndRequireEquals();
|
|
73
|
+
const nftAddress = this.nft.getAndRequireEquals();
|
|
74
|
+
const owner = this.owner.getAndRequireEquals();
|
|
75
|
+
const price = this.price.getAndRequireEquals();
|
|
76
|
+
const sender = this.sender.getUnconstrained();
|
|
77
|
+
params.collection.assertEquals(collectionAddress);
|
|
78
|
+
params.nft.assertEquals(nftAddress);
|
|
79
|
+
params.from.assertEquals(owner);
|
|
80
|
+
params.approved.assertEquals(this.address);
|
|
81
|
+
params.price.assertSome().assertEquals(price);
|
|
82
|
+
params.to.assertEquals(sender);
|
|
83
|
+
params.fee.orElse(UInt64.zero).assertLessThan(price, "Fee is too high");
|
|
84
|
+
const payment = price.sub(params.fee.orElse(UInt64.zero));
|
|
85
|
+
const senderUpdate = AccountUpdate.createSigned(sender);
|
|
86
|
+
senderUpdate.account.balance.requireBetween(payment, UInt64.MAXINT());
|
|
87
|
+
senderUpdate.balance.subInPlace(payment);
|
|
88
|
+
const ownerUpdate = AccountUpdate.create(owner);
|
|
89
|
+
ownerUpdate.balance.addInPlace(payment);
|
|
90
|
+
senderUpdate.body.useFullCommitment = Bool(true);
|
|
91
|
+
ownerUpdate.body.useFullCommitment = Bool(true);
|
|
92
|
+
this.emitEvent("buy", new TransferEvent({
|
|
93
|
+
...params,
|
|
94
|
+
}));
|
|
95
|
+
return Bool(true);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
__decorate([
|
|
99
|
+
state(PublicKey),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], NonFungibleTokenOfferContract.prototype, "owner", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
state(UInt64),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], NonFungibleTokenOfferContract.prototype, "price", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
state(PublicKey),
|
|
108
|
+
__metadata("design:type", Object)
|
|
109
|
+
], NonFungibleTokenOfferContract.prototype, "collection", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
state(PublicKey),
|
|
112
|
+
__metadata("design:type", Object)
|
|
113
|
+
], NonFungibleTokenOfferContract.prototype, "nft", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
state(Bool),
|
|
116
|
+
__metadata("design:type", Object)
|
|
117
|
+
], NonFungibleTokenOfferContract.prototype, "insideBuy", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
method,
|
|
120
|
+
__metadata("design:type", Function),
|
|
121
|
+
__metadata("design:paramtypes", []),
|
|
122
|
+
__metadata("design:returntype", Promise)
|
|
123
|
+
], NonFungibleTokenOfferContract.prototype, "buy", null);
|
|
124
|
+
__decorate([
|
|
125
|
+
method.returns(Bool),
|
|
126
|
+
__metadata("design:type", Function),
|
|
127
|
+
__metadata("design:paramtypes", [TransferExtendedParams]),
|
|
128
|
+
__metadata("design:returntype", Promise)
|
|
129
|
+
], NonFungibleTokenOfferContract.prototype, "canTransfer", null);
|
|
130
|
+
return NonFungibleTokenOfferContract;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=offer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offer.js","sourceRoot":"","sources":["../../../src/marketplace/offer.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EAEb,MAAM,EACN,WAAW,EACX,SAAS,EACT,KAAK,EACL,KAAK,EACL,MAAM,EACN,aAAa,EACb,IAAI,EACJ,KAAK,GACN,MAAM,MAAM,CAAC;AACd,OAAO,EACL,YAAY,EAIZ,qBAAq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AU,CAAC,OAAO,CAAC,CAAC;YACzC,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAChD,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACxC,YAAY,CAAC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;YACjD,WAAW,CAAC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;YAEhD,IAAI,CAAC,SAAS,CACZ,KAAK,EACL,IAAI,aAAa,CAAC;gBAChB,GAAG,MAAM;aACV,CAAC,CACH,CAAC;YACF,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;KACF;IAhGmB;QAAjB,KAAK,CAAC,SAAS,CAAC;;gEAA4B;IAE9B;QAAd,KAAK,CAAC,MAAM,CAAC;;gEAAyB;IACrB;QAAjB,KAAK,CAAC,SAAS,CAAC;;qEAAiC;IAChC;QAAjB,KAAK,CAAC,SAAS,CAAC;;8DAA0B;IAC9B;QAAZ,KAAK,CAAC,IAAI,CAAC;;oEAA2B;IA4BzB;QAAb,MAAM;;;;4DAiBN;IAUK;QADL,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;;yCACK,sBAAsB;;oEAmC/C;IAGH,OAAO,6BAA6B,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { PublicKey, UInt64, Bool, Field } from "o1js";
|
|
2
|
+
import { Storage } from "@silvana-one/storage";
|
|
3
|
+
export { NFTAddress, SellEvent, DepositEvent, WithdrawEvent, BidEvent };
|
|
4
|
+
declare const NFTAddress_base: (new (value: {
|
|
5
|
+
collection: PublicKey;
|
|
6
|
+
nft: PublicKey;
|
|
7
|
+
}) => {
|
|
8
|
+
collection: PublicKey;
|
|
9
|
+
nft: PublicKey;
|
|
10
|
+
}) & {
|
|
11
|
+
_isStruct: true;
|
|
12
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
|
13
|
+
collection: PublicKey;
|
|
14
|
+
nft: PublicKey;
|
|
15
|
+
}, {
|
|
16
|
+
collection: {
|
|
17
|
+
x: bigint;
|
|
18
|
+
isOdd: boolean;
|
|
19
|
+
};
|
|
20
|
+
nft: {
|
|
21
|
+
x: bigint;
|
|
22
|
+
isOdd: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>, "fromFields"> & {
|
|
25
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
|
26
|
+
collection: PublicKey;
|
|
27
|
+
nft: PublicKey;
|
|
28
|
+
};
|
|
29
|
+
} & {
|
|
30
|
+
fromValue: (value: {
|
|
31
|
+
collection: PublicKey | {
|
|
32
|
+
x: Field | bigint;
|
|
33
|
+
isOdd: Bool | boolean;
|
|
34
|
+
};
|
|
35
|
+
nft: PublicKey | {
|
|
36
|
+
x: Field | bigint;
|
|
37
|
+
isOdd: Bool | boolean;
|
|
38
|
+
};
|
|
39
|
+
}) => {
|
|
40
|
+
collection: PublicKey;
|
|
41
|
+
nft: PublicKey;
|
|
42
|
+
};
|
|
43
|
+
toInput: (x: {
|
|
44
|
+
collection: PublicKey;
|
|
45
|
+
nft: PublicKey;
|
|
46
|
+
}) => {
|
|
47
|
+
fields?: Field[] | undefined;
|
|
48
|
+
packed?: [Field, number][] | undefined;
|
|
49
|
+
};
|
|
50
|
+
toJSON: (x: {
|
|
51
|
+
collection: PublicKey;
|
|
52
|
+
nft: PublicKey;
|
|
53
|
+
}) => {
|
|
54
|
+
collection: string;
|
|
55
|
+
nft: string;
|
|
56
|
+
};
|
|
57
|
+
fromJSON: (x: {
|
|
58
|
+
collection: string;
|
|
59
|
+
nft: string;
|
|
60
|
+
}) => {
|
|
61
|
+
collection: PublicKey;
|
|
62
|
+
nft: PublicKey;
|
|
63
|
+
};
|
|
64
|
+
empty: () => {
|
|
65
|
+
collection: PublicKey;
|
|
66
|
+
nft: PublicKey;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
declare class NFTAddress extends NFTAddress_base {
|
|
70
|
+
}
|
|
71
|
+
declare const SellEvent_base: (new (value: {
|
|
72
|
+
collection: PublicKey;
|
|
73
|
+
nft: PublicKey;
|
|
74
|
+
price: UInt64;
|
|
75
|
+
}) => {
|
|
76
|
+
collection: PublicKey;
|
|
77
|
+
nft: PublicKey;
|
|
78
|
+
price: UInt64;
|
|
79
|
+
}) & {
|
|
80
|
+
_isStruct: true;
|
|
81
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
|
82
|
+
collection: PublicKey;
|
|
83
|
+
nft: PublicKey;
|
|
84
|
+
price: UInt64;
|
|
85
|
+
}, {
|
|
86
|
+
collection: {
|
|
87
|
+
x: bigint;
|
|
88
|
+
isOdd: boolean;
|
|
89
|
+
};
|
|
90
|
+
nft: {
|
|
91
|
+
x: bigint;
|
|
92
|
+
isOdd: boolean;
|
|
93
|
+
};
|
|
94
|
+
price: bigint;
|
|
95
|
+
}>, "fromFields"> & {
|
|
96
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
|
97
|
+
collection: PublicKey;
|
|
98
|
+
nft: PublicKey;
|
|
99
|
+
price: UInt64;
|
|
100
|
+
};
|
|
101
|
+
} & {
|
|
102
|
+
fromValue: (value: {
|
|
103
|
+
collection: PublicKey | {
|
|
104
|
+
x: Field | bigint;
|
|
105
|
+
isOdd: Bool | boolean;
|
|
106
|
+
};
|
|
107
|
+
nft: PublicKey | {
|
|
108
|
+
x: Field | bigint;
|
|
109
|
+
isOdd: Bool | boolean;
|
|
110
|
+
};
|
|
111
|
+
price: bigint | UInt64;
|
|
112
|
+
}) => {
|
|
113
|
+
collection: PublicKey;
|
|
114
|
+
nft: PublicKey;
|
|
115
|
+
price: UInt64;
|
|
116
|
+
};
|
|
117
|
+
toInput: (x: {
|
|
118
|
+
collection: PublicKey;
|
|
119
|
+
nft: PublicKey;
|
|
120
|
+
price: UInt64;
|
|
121
|
+
}) => {
|
|
122
|
+
fields?: Field[] | undefined;
|
|
123
|
+
packed?: [Field, number][] | undefined;
|
|
124
|
+
};
|
|
125
|
+
toJSON: (x: {
|
|
126
|
+
collection: PublicKey;
|
|
127
|
+
nft: PublicKey;
|
|
128
|
+
price: UInt64;
|
|
129
|
+
}) => {
|
|
130
|
+
collection: string;
|
|
131
|
+
nft: string;
|
|
132
|
+
price: string;
|
|
133
|
+
};
|
|
134
|
+
fromJSON: (x: {
|
|
135
|
+
collection: string;
|
|
136
|
+
nft: string;
|
|
137
|
+
price: string;
|
|
138
|
+
}) => {
|
|
139
|
+
collection: PublicKey;
|
|
140
|
+
nft: PublicKey;
|
|
141
|
+
price: UInt64;
|
|
142
|
+
};
|
|
143
|
+
empty: () => {
|
|
144
|
+
collection: PublicKey;
|
|
145
|
+
nft: PublicKey;
|
|
146
|
+
price: UInt64;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
declare class SellEvent extends SellEvent_base {
|
|
150
|
+
}
|
|
151
|
+
declare const DepositEvent_base: (new (value: {
|
|
152
|
+
buyer: PublicKey;
|
|
153
|
+
amount: UInt64;
|
|
154
|
+
maxPoints: UInt64;
|
|
155
|
+
}) => {
|
|
156
|
+
buyer: PublicKey;
|
|
157
|
+
amount: UInt64;
|
|
158
|
+
maxPoints: UInt64;
|
|
159
|
+
}) & {
|
|
160
|
+
_isStruct: true;
|
|
161
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
|
162
|
+
buyer: PublicKey;
|
|
163
|
+
amount: UInt64;
|
|
164
|
+
maxPoints: UInt64;
|
|
165
|
+
}, {
|
|
166
|
+
buyer: {
|
|
167
|
+
x: bigint;
|
|
168
|
+
isOdd: boolean;
|
|
169
|
+
};
|
|
170
|
+
amount: bigint;
|
|
171
|
+
maxPoints: bigint;
|
|
172
|
+
}>, "fromFields"> & {
|
|
173
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
|
174
|
+
buyer: PublicKey;
|
|
175
|
+
amount: UInt64;
|
|
176
|
+
maxPoints: UInt64;
|
|
177
|
+
};
|
|
178
|
+
} & {
|
|
179
|
+
fromValue: (value: {
|
|
180
|
+
buyer: PublicKey | {
|
|
181
|
+
x: Field | bigint;
|
|
182
|
+
isOdd: Bool | boolean;
|
|
183
|
+
};
|
|
184
|
+
amount: bigint | UInt64;
|
|
185
|
+
maxPoints: bigint | UInt64;
|
|
186
|
+
}) => {
|
|
187
|
+
buyer: PublicKey;
|
|
188
|
+
amount: UInt64;
|
|
189
|
+
maxPoints: UInt64;
|
|
190
|
+
};
|
|
191
|
+
toInput: (x: {
|
|
192
|
+
buyer: PublicKey;
|
|
193
|
+
amount: UInt64;
|
|
194
|
+
maxPoints: UInt64;
|
|
195
|
+
}) => {
|
|
196
|
+
fields?: Field[] | undefined;
|
|
197
|
+
packed?: [Field, number][] | undefined;
|
|
198
|
+
};
|
|
199
|
+
toJSON: (x: {
|
|
200
|
+
buyer: PublicKey;
|
|
201
|
+
amount: UInt64;
|
|
202
|
+
maxPoints: UInt64;
|
|
203
|
+
}) => {
|
|
204
|
+
buyer: string;
|
|
205
|
+
amount: string;
|
|
206
|
+
maxPoints: string;
|
|
207
|
+
};
|
|
208
|
+
fromJSON: (x: {
|
|
209
|
+
buyer: string;
|
|
210
|
+
amount: string;
|
|
211
|
+
maxPoints: string;
|
|
212
|
+
}) => {
|
|
213
|
+
buyer: PublicKey;
|
|
214
|
+
amount: UInt64;
|
|
215
|
+
maxPoints: UInt64;
|
|
216
|
+
};
|
|
217
|
+
empty: () => {
|
|
218
|
+
buyer: PublicKey;
|
|
219
|
+
amount: UInt64;
|
|
220
|
+
maxPoints: UInt64;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
declare class DepositEvent extends DepositEvent_base {
|
|
224
|
+
}
|
|
225
|
+
declare const WithdrawEvent_base: (new (value: {
|
|
226
|
+
buyer: PublicKey;
|
|
227
|
+
amount: UInt64;
|
|
228
|
+
maxPoints: UInt64;
|
|
229
|
+
}) => {
|
|
230
|
+
buyer: PublicKey;
|
|
231
|
+
amount: UInt64;
|
|
232
|
+
maxPoints: UInt64;
|
|
233
|
+
}) & {
|
|
234
|
+
_isStruct: true;
|
|
235
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
|
236
|
+
buyer: PublicKey;
|
|
237
|
+
amount: UInt64;
|
|
238
|
+
maxPoints: UInt64;
|
|
239
|
+
}, {
|
|
240
|
+
buyer: {
|
|
241
|
+
x: bigint;
|
|
242
|
+
isOdd: boolean;
|
|
243
|
+
};
|
|
244
|
+
amount: bigint;
|
|
245
|
+
maxPoints: bigint;
|
|
246
|
+
}>, "fromFields"> & {
|
|
247
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
|
248
|
+
buyer: PublicKey;
|
|
249
|
+
amount: UInt64;
|
|
250
|
+
maxPoints: UInt64;
|
|
251
|
+
};
|
|
252
|
+
} & {
|
|
253
|
+
fromValue: (value: {
|
|
254
|
+
buyer: PublicKey | {
|
|
255
|
+
x: Field | bigint;
|
|
256
|
+
isOdd: Bool | boolean;
|
|
257
|
+
};
|
|
258
|
+
amount: bigint | UInt64;
|
|
259
|
+
maxPoints: bigint | UInt64;
|
|
260
|
+
}) => {
|
|
261
|
+
buyer: PublicKey;
|
|
262
|
+
amount: UInt64;
|
|
263
|
+
maxPoints: UInt64;
|
|
264
|
+
};
|
|
265
|
+
toInput: (x: {
|
|
266
|
+
buyer: PublicKey;
|
|
267
|
+
amount: UInt64;
|
|
268
|
+
maxPoints: UInt64;
|
|
269
|
+
}) => {
|
|
270
|
+
fields?: Field[] | undefined;
|
|
271
|
+
packed?: [Field, number][] | undefined;
|
|
272
|
+
};
|
|
273
|
+
toJSON: (x: {
|
|
274
|
+
buyer: PublicKey;
|
|
275
|
+
amount: UInt64;
|
|
276
|
+
maxPoints: UInt64;
|
|
277
|
+
}) => {
|
|
278
|
+
buyer: string;
|
|
279
|
+
amount: string;
|
|
280
|
+
maxPoints: string;
|
|
281
|
+
};
|
|
282
|
+
fromJSON: (x: {
|
|
283
|
+
buyer: string;
|
|
284
|
+
amount: string;
|
|
285
|
+
maxPoints: string;
|
|
286
|
+
}) => {
|
|
287
|
+
buyer: PublicKey;
|
|
288
|
+
amount: UInt64;
|
|
289
|
+
maxPoints: UInt64;
|
|
290
|
+
};
|
|
291
|
+
empty: () => {
|
|
292
|
+
buyer: PublicKey;
|
|
293
|
+
amount: UInt64;
|
|
294
|
+
maxPoints: UInt64;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
declare class WithdrawEvent extends WithdrawEvent_base {
|
|
298
|
+
}
|
|
299
|
+
declare const BidEvent_base: (new (value: {
|
|
300
|
+
bids: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
301
|
+
whitelist: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
302
|
+
storage: Storage;
|
|
303
|
+
}) => {
|
|
304
|
+
bids: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
305
|
+
whitelist: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
306
|
+
storage: Storage;
|
|
307
|
+
}) & {
|
|
308
|
+
_isStruct: true;
|
|
309
|
+
} & Omit<import("node_modules/o1js/dist/node/lib/provable/types/provable-intf.js").Provable<{
|
|
310
|
+
bids: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
311
|
+
whitelist: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
312
|
+
storage: Storage;
|
|
313
|
+
}, {
|
|
314
|
+
bids: bigint;
|
|
315
|
+
whitelist: bigint;
|
|
316
|
+
storage: {
|
|
317
|
+
url: bigint[];
|
|
318
|
+
};
|
|
319
|
+
}>, "fromFields"> & {
|
|
320
|
+
fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => {
|
|
321
|
+
bids: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
322
|
+
whitelist: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
323
|
+
storage: Storage;
|
|
324
|
+
};
|
|
325
|
+
} & {
|
|
326
|
+
fromValue: (value: {
|
|
327
|
+
bids: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
328
|
+
whitelist: string | number | bigint | import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
329
|
+
storage: Storage | {
|
|
330
|
+
url: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[] | bigint[];
|
|
331
|
+
};
|
|
332
|
+
}) => {
|
|
333
|
+
bids: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
334
|
+
whitelist: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
335
|
+
storage: Storage;
|
|
336
|
+
};
|
|
337
|
+
toInput: (x: {
|
|
338
|
+
bids: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
339
|
+
whitelist: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
340
|
+
storage: Storage;
|
|
341
|
+
}) => {
|
|
342
|
+
fields?: Field[] | undefined;
|
|
343
|
+
packed?: [Field, number][] | undefined;
|
|
344
|
+
};
|
|
345
|
+
toJSON: (x: {
|
|
346
|
+
bids: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
347
|
+
whitelist: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
348
|
+
storage: Storage;
|
|
349
|
+
}) => {
|
|
350
|
+
bids: string;
|
|
351
|
+
whitelist: string;
|
|
352
|
+
storage: {
|
|
353
|
+
url: string[];
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
fromJSON: (x: {
|
|
357
|
+
bids: string;
|
|
358
|
+
whitelist: string;
|
|
359
|
+
storage: {
|
|
360
|
+
url: string[];
|
|
361
|
+
};
|
|
362
|
+
}) => {
|
|
363
|
+
bids: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
364
|
+
whitelist: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
365
|
+
storage: Storage;
|
|
366
|
+
};
|
|
367
|
+
empty: () => {
|
|
368
|
+
bids: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
369
|
+
whitelist: import("node_modules/o1js/dist/node/lib/provable/field.js").Field;
|
|
370
|
+
storage: Storage;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
declare class BidEvent extends BidEvent_base {
|
|
374
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PublicKey, UInt64, Field, Struct } from "o1js";
|
|
2
|
+
import { Storage } from "@silvana-one/storage";
|
|
3
|
+
export { NFTAddress, SellEvent, DepositEvent, WithdrawEvent, BidEvent };
|
|
4
|
+
class NFTAddress extends Struct({
|
|
5
|
+
collection: PublicKey,
|
|
6
|
+
nft: PublicKey,
|
|
7
|
+
}) {
|
|
8
|
+
}
|
|
9
|
+
class SellEvent extends Struct({
|
|
10
|
+
collection: PublicKey,
|
|
11
|
+
nft: PublicKey,
|
|
12
|
+
price: UInt64,
|
|
13
|
+
}) {
|
|
14
|
+
}
|
|
15
|
+
class DepositEvent extends Struct({
|
|
16
|
+
buyer: PublicKey,
|
|
17
|
+
amount: UInt64,
|
|
18
|
+
maxPoints: UInt64,
|
|
19
|
+
}) {
|
|
20
|
+
}
|
|
21
|
+
class WithdrawEvent extends Struct({
|
|
22
|
+
buyer: PublicKey,
|
|
23
|
+
amount: UInt64,
|
|
24
|
+
maxPoints: UInt64,
|
|
25
|
+
}) {
|
|
26
|
+
}
|
|
27
|
+
class BidEvent extends Struct({
|
|
28
|
+
bids: Field,
|
|
29
|
+
whitelist: Field,
|
|
30
|
+
storage: Storage,
|
|
31
|
+
}) {
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/marketplace/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAQ,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC;AAExE,MAAM,UAAW,SAAQ,MAAM,CAAC;IAC9B,UAAU,EAAE,SAAS;IACrB,GAAG,EAAE,SAAS;CACf,CAAC;CAAG;AAEL,MAAM,SAAU,SAAQ,MAAM,CAAC;IAC7B,UAAU,EAAE,SAAS;IACrB,GAAG,EAAE,SAAS;IACd,KAAK,EAAE,MAAM;CACd,CAAC;CAAG;AAEL,MAAM,YAAa,SAAQ,MAAM,CAAC;IAChC,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,MAAM;CAClB,CAAC;CAAG;AAEL,MAAM,aAAc,SAAQ,MAAM,CAAC;IACjC,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,MAAM;CAClB,CAAC;CAAG;AAEL,MAAM,QAAS,SAAQ,MAAM,CAAC;IAC5B,IAAI,EAAE,KAAK;IACX,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,OAAO;CACjB,CAAC;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|