@triadxyz/triad-protocol 1.5.2-beta → 1.5.3-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 CHANGED
@@ -59,9 +59,9 @@ export default class TriadProtocolClient {
59
59
  }, options?: RpcOptions): Promise<string>;
60
60
  /**
61
61
  * Collect Royalty
62
- * @param collection - Collection PublicKey
62
+ * @param collection - Collection Symbol
63
63
  *
64
64
  * @param options - RPC options
65
65
  */
66
- collectRoyalty(collection: PublicKey, options?: RpcOptions): Promise<string>;
66
+ collectRoyalty(collection: string, options?: RpcOptions): Promise<string>;
67
67
  }
package/dist/index.js CHANGED
@@ -24,7 +24,9 @@ const constants_1 = require("./utils/constants");
24
24
  const sendTransactionWithOptions_1 = __importDefault(require("./utils/sendTransactionWithOptions"));
25
25
  class TriadProtocolClient {
26
26
  constructor(connection, wallet) {
27
- this.provider = new anchor_1.AnchorProvider(connection, wallet);
27
+ this.provider = new anchor_1.AnchorProvider(connection, wallet, {
28
+ commitment: 'processed'
29
+ });
28
30
  this.program = new anchor_1.Program(idl_triad_protocol_json_1.default, this.provider);
29
31
  this.trade = new trade_1.default(this.program, this.provider);
30
32
  this.stake = new stake_1.default(this.program, this.provider);
@@ -154,15 +156,16 @@ class TriadProtocolClient {
154
156
  }
155
157
  /**
156
158
  * Collect Royalty
157
- * @param collection - Collection PublicKey
159
+ * @param collection - Collection Symbol
158
160
  *
159
161
  * @param options - RPC options
160
162
  */
161
163
  collectRoyalty(collection, options) {
162
164
  return __awaiter(this, void 0, void 0, function* () {
165
+ const collectionPDA = (0, pda_1.getCollectionPDA)(this.program.programId, collection);
163
166
  return (0, sendTransactionWithOptions_1.default)(this.program.methods.collectRoyalty().accounts({
164
167
  signer: this.provider.wallet.publicKey,
165
- collection
168
+ collection: collectionPDA
166
169
  }), options);
167
170
  });
168
171
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "1.5.2-beta",
3
+ "version": "1.5.3-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",