@triadxyz/triad-protocol 3.1.4-beta → 3.1.5-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
@@ -434,4 +434,13 @@ export default class TriadProtocolClient {
434
434
  * @param question - Question
435
435
  */
436
436
  updatePoolQuestion(poolId: number, question: string): Promise<string>;
437
+ /**
438
+ * Update Customer Fee
439
+ * @param customerId - Customer ID
440
+ * @param feeBps - Fee in basis points
441
+ */
442
+ updateCustomerFee({ customerId, feeBps }: {
443
+ customerId: number;
444
+ feeBps: number;
445
+ }): Promise<string>;
437
446
  }
package/dist/index.js CHANGED
@@ -1145,5 +1145,22 @@ class TriadProtocolClient {
1145
1145
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
1146
1146
  });
1147
1147
  }
1148
+ /**
1149
+ * Update Customer Fee
1150
+ * @param customerId - Customer ID
1151
+ * @param feeBps - Fee in basis points
1152
+ */
1153
+ updateCustomerFee({ customerId, feeBps }) {
1154
+ return __awaiter(this, void 0, void 0, function* () {
1155
+ const ixs = [];
1156
+ ixs.push(yield this.program.methods
1157
+ .updateCustomerFee({ id: customerId, feeBps })
1158
+ .accounts({
1159
+ signer: this.program.provider.publicKey
1160
+ })
1161
+ .instruction());
1162
+ return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
1163
+ });
1164
+ }
1148
1165
  }
1149
1166
  exports.default = TriadProtocolClient;
@@ -2566,6 +2566,47 @@
2566
2566
  }
2567
2567
  ]
2568
2568
  },
2569
+ {
2570
+ "name": "update_customer_fee",
2571
+ "discriminator": [218, 240, 1, 38, 34, 166, 40, 25],
2572
+ "accounts": [
2573
+ {
2574
+ "name": "signer",
2575
+ "writable": true,
2576
+ "signer": true
2577
+ },
2578
+ {
2579
+ "name": "customer",
2580
+ "writable": true,
2581
+ "pda": {
2582
+ "seeds": [
2583
+ {
2584
+ "kind": "const",
2585
+ "value": [99, 117, 115, 116, 111, 109, 101, 114]
2586
+ },
2587
+ {
2588
+ "kind": "arg",
2589
+ "path": "args.id"
2590
+ }
2591
+ ]
2592
+ }
2593
+ },
2594
+ {
2595
+ "name": "system_program",
2596
+ "address": "11111111111111111111111111111111"
2597
+ }
2598
+ ],
2599
+ "args": [
2600
+ {
2601
+ "name": "args",
2602
+ "type": {
2603
+ "defined": {
2604
+ "name": "UpdateCustomerFeeArgs"
2605
+ }
2606
+ }
2607
+ }
2608
+ ]
2609
+ },
2569
2610
  {
2570
2611
  "name": "update_market_end",
2571
2612
  "discriminator": [10, 188, 22, 219, 206, 83, 67, 31],
@@ -4713,6 +4754,22 @@
4713
4754
  ]
4714
4755
  }
4715
4756
  },
4757
+ {
4758
+ "name": "UpdateCustomerFeeArgs",
4759
+ "type": {
4760
+ "kind": "struct",
4761
+ "fields": [
4762
+ {
4763
+ "name": "id",
4764
+ "type": "u16"
4765
+ },
4766
+ {
4767
+ "name": "fee_bps",
4768
+ "type": "u16"
4769
+ }
4770
+ ]
4771
+ }
4772
+ },
4716
4773
  {
4717
4774
  "name": "UserTrade",
4718
4775
  "type": {
@@ -3599,6 +3599,47 @@ export type TriadProtocol = {
3599
3599
  }
3600
3600
  ];
3601
3601
  },
3602
+ {
3603
+ name: 'updateCustomerFee';
3604
+ discriminator: [218, 240, 1, 38, 34, 166, 40, 25];
3605
+ accounts: [
3606
+ {
3607
+ name: 'signer';
3608
+ writable: true;
3609
+ signer: true;
3610
+ },
3611
+ {
3612
+ name: 'customer';
3613
+ writable: true;
3614
+ pda: {
3615
+ seeds: [
3616
+ {
3617
+ kind: 'const';
3618
+ value: [99, 117, 115, 116, 111, 109, 101, 114];
3619
+ },
3620
+ {
3621
+ kind: 'arg';
3622
+ path: 'args.id';
3623
+ }
3624
+ ];
3625
+ };
3626
+ },
3627
+ {
3628
+ name: 'systemProgram';
3629
+ address: '11111111111111111111111111111111';
3630
+ }
3631
+ ];
3632
+ args: [
3633
+ {
3634
+ name: 'args';
3635
+ type: {
3636
+ defined: {
3637
+ name: 'updateCustomerFeeArgs';
3638
+ };
3639
+ };
3640
+ }
3641
+ ];
3642
+ },
3602
3643
  {
3603
3644
  name: 'updateMarketEnd';
3604
3645
  discriminator: [10, 188, 22, 219, 206, 83, 67, 31];
@@ -5758,6 +5799,22 @@ export type TriadProtocol = {
5758
5799
  ];
5759
5800
  };
5760
5801
  },
5802
+ {
5803
+ name: 'updateCustomerFeeArgs';
5804
+ type: {
5805
+ kind: 'struct';
5806
+ fields: [
5807
+ {
5808
+ name: 'id';
5809
+ type: 'u16';
5810
+ },
5811
+ {
5812
+ name: 'feeBps';
5813
+ type: 'u16';
5814
+ }
5815
+ ];
5816
+ };
5817
+ },
5761
5818
  {
5762
5819
  name: 'userTrade';
5763
5820
  type: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "3.1.4-beta",
3
+ "version": "3.1.5-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",