@triadxyz/triad-protocol 1.4.9-beta → 1.5.1-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 +7 -0
- package/dist/index.js +14 -0
- package/dist/types/idl_triad_protocol.json +25 -0
- package/dist/types/trade.d.ts +1 -1
- package/dist/types/triad_protocol.d.ts +25 -0
- package/dist/utils/helpers.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -57,4 +57,11 @@ export default class TriadProtocolClient {
|
|
|
57
57
|
poseidonAsset: PublicKey;
|
|
58
58
|
nft: number;
|
|
59
59
|
}, options?: RpcOptions): Promise<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Collect Royalty
|
|
62
|
+
* @param collection - Collection PublicKey
|
|
63
|
+
*
|
|
64
|
+
* @param options - RPC options
|
|
65
|
+
*/
|
|
66
|
+
collectRoyalty(collection: PublicKey, options?: RpcOptions): Promise<string>;
|
|
60
67
|
}
|
package/dist/index.js
CHANGED
|
@@ -152,5 +152,19 @@ class TriadProtocolClient {
|
|
|
152
152
|
}), options);
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Collect Royalty
|
|
157
|
+
* @param collection - Collection PublicKey
|
|
158
|
+
*
|
|
159
|
+
* @param options - RPC options
|
|
160
|
+
*/
|
|
161
|
+
collectRoyalty(collection, options) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
return (0, sendTransactionWithOptions_1.default)(this.program.methods.collectRoyalty().accounts({
|
|
164
|
+
signer: this.provider.wallet.publicKey,
|
|
165
|
+
collection
|
|
166
|
+
}), options);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
155
169
|
}
|
|
156
170
|
exports.default = TriadProtocolClient;
|
|
@@ -421,6 +421,31 @@
|
|
|
421
421
|
],
|
|
422
422
|
"args": []
|
|
423
423
|
},
|
|
424
|
+
{
|
|
425
|
+
"name": "collect_royalty",
|
|
426
|
+
"discriminator": [189, 235, 7, 168, 255, 50, 30, 75],
|
|
427
|
+
"accounts": [
|
|
428
|
+
{
|
|
429
|
+
"name": "signer",
|
|
430
|
+
"writable": true,
|
|
431
|
+
"signer": true
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "squads",
|
|
435
|
+
"writable": true,
|
|
436
|
+
"address": "6fcSf6qfwPNR9AUUNC1UWYZDy5cQ4TzTb2aaipN2zFdq"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "collection",
|
|
440
|
+
"writable": true
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"name": "system_program",
|
|
444
|
+
"address": "11111111111111111111111111111111"
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
"args": []
|
|
448
|
+
},
|
|
424
449
|
{
|
|
425
450
|
"name": "create_user_trade",
|
|
426
451
|
"discriminator": [232, 235, 58, 194, 135, 248, 153, 1],
|
package/dist/types/trade.d.ts
CHANGED
|
@@ -659,6 +659,31 @@ export type TriadProtocol = {
|
|
|
659
659
|
];
|
|
660
660
|
args: [];
|
|
661
661
|
},
|
|
662
|
+
{
|
|
663
|
+
name: 'collectRoyalty';
|
|
664
|
+
discriminator: [189, 235, 7, 168, 255, 50, 30, 75];
|
|
665
|
+
accounts: [
|
|
666
|
+
{
|
|
667
|
+
name: 'signer';
|
|
668
|
+
writable: true;
|
|
669
|
+
signer: true;
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
name: 'squads';
|
|
673
|
+
writable: true;
|
|
674
|
+
address: '6fcSf6qfwPNR9AUUNC1UWYZDy5cQ4TzTb2aaipN2zFdq';
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
name: 'collection';
|
|
678
|
+
writable: true;
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
name: 'systemProgram';
|
|
682
|
+
address: '11111111111111111111111111111111';
|
|
683
|
+
}
|
|
684
|
+
];
|
|
685
|
+
args: [];
|
|
686
|
+
},
|
|
662
687
|
{
|
|
663
688
|
name: 'createUserTrade';
|
|
664
689
|
discriminator: [232, 235, 58, 194, 135, 248, 153, 1];
|
package/dist/utils/helpers.js
CHANGED
|
@@ -78,7 +78,7 @@ const formatMarket = (account, address) => {
|
|
|
78
78
|
openedOrders: account.openedOrders.toString(),
|
|
79
79
|
nextOrderId: account.nextOrderId.toString(),
|
|
80
80
|
feeBps: account.feeBps,
|
|
81
|
-
|
|
81
|
+
isAllowedToPayout: account.isAllowedToPayout,
|
|
82
82
|
marketStart: account.marketStart.toString(),
|
|
83
83
|
marketEnd: account.marketEnd.toString(),
|
|
84
84
|
question: Buffer.from(account.question).toString().replace(/\0+$/, ''),
|
|
@@ -111,7 +111,7 @@ const accountToMarketV1 = (account, address) => {
|
|
|
111
111
|
openedOrders: account.openOrdersCount.toString(),
|
|
112
112
|
nextOrderId: account.nextOrderId.toString(),
|
|
113
113
|
feeBps: account.feeBps,
|
|
114
|
-
|
|
114
|
+
isAllowedToPayout: account.isActive,
|
|
115
115
|
marketStart: account.currentQuestionStart.toString(),
|
|
116
116
|
marketEnd: account.currentQuestionEnd.toString(),
|
|
117
117
|
question: Buffer.from(account.currentQuestion)
|