@triadxyz/triad-protocol 1.2.6-beta → 1.2.7-beta
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/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/dist/local-test.js +2 -6
- package/dist/types/index.d.ts +6 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -78,5 +78,5 @@ export default class TriadProtocolClient {
|
|
|
78
78
|
collectionSymbol: string;
|
|
79
79
|
supply: number;
|
|
80
80
|
}, options?: RpcOptions): Promise<string>;
|
|
81
|
-
mintTicket({
|
|
81
|
+
mintTicket({ discount, isBoosted, rarity, verifier, nftMint }: MintTicketArgs, options?: RpcOptions): Promise<string>;
|
|
82
82
|
}
|
package/dist/index.js
CHANGED
|
@@ -170,13 +170,15 @@ class TriadProtocolClient {
|
|
|
170
170
|
return (0, sendVersionedTransaction_1.default)(this.provider, [ix], options, keyPair);
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
mintTicket({
|
|
173
|
+
mintTicket({ discount, isBoosted, rarity, verifier, nftMint }, options) {
|
|
174
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
175
175
|
const asset = web3_js_1.Keypair.generate();
|
|
176
176
|
const userNftAta = (0, pda_1.getTokenATA)(this.provider.wallet.publicKey, nftMint);
|
|
177
|
+
const collectionSymbol = 'PTCKT';
|
|
178
|
+
const [collection] = yield this.program.account.collection.all();
|
|
177
179
|
const ix = yield this.program.methods
|
|
178
180
|
.mintTicket({
|
|
179
|
-
number: new anchor_1.BN(
|
|
181
|
+
number: new anchor_1.BN(collection.account.minted),
|
|
180
182
|
collectionSymbol,
|
|
181
183
|
discount: new anchor_1.BN(discount),
|
|
182
184
|
isBoosted,
|
package/dist/local-test.js
CHANGED
|
@@ -358,15 +358,11 @@ const collectFees = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
358
358
|
const mintTicket = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
359
359
|
console.log(wallet.publicKey.toBase58());
|
|
360
360
|
const response = yield triadProtocol.mintTicket({
|
|
361
|
-
number: 0,
|
|
362
|
-
collectionSymbol: 'PTCKT',
|
|
363
361
|
discount: 0,
|
|
364
362
|
isBoosted: false,
|
|
365
363
|
rarity: { uncommon: {} },
|
|
366
|
-
verifier: '
|
|
367
|
-
nftMint: new web3_js_1.PublicKey('
|
|
368
|
-
}, {
|
|
369
|
-
skipPreflight: true
|
|
364
|
+
verifier: '',
|
|
365
|
+
nftMint: new web3_js_1.PublicKey('')
|
|
370
366
|
});
|
|
371
367
|
console.log(response);
|
|
372
368
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,8 +9,6 @@ export type CreateUserArgs = {
|
|
|
9
9
|
referral?: PublicKey;
|
|
10
10
|
};
|
|
11
11
|
export type MintTicketArgs = {
|
|
12
|
-
collectionSymbol: string;
|
|
13
|
-
number: number;
|
|
14
12
|
discount: number;
|
|
15
13
|
isBoosted: boolean;
|
|
16
14
|
rarity: {
|
|
@@ -19,6 +17,12 @@ export type MintTicketArgs = {
|
|
|
19
17
|
uncommon: {};
|
|
20
18
|
} | {
|
|
21
19
|
rare: {};
|
|
20
|
+
} | {
|
|
21
|
+
legendary: {};
|
|
22
|
+
} | {
|
|
23
|
+
epic: {};
|
|
24
|
+
} | {
|
|
25
|
+
mythic: {};
|
|
22
26
|
};
|
|
23
27
|
verifier: string;
|
|
24
28
|
nftMint: PublicKey;
|