@zebec-network/zebec-stream-sdk 3.3.0 → 3.3.1

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.
@@ -13,6 +13,48 @@ export type ZebecStream = {
13
13
  description: "Created with Anchor";
14
14
  };
15
15
  instructions: [
16
+ {
17
+ name: "addFeeToken";
18
+ discriminator: [171, 6, 150, 97, 69, 55, 13, 136];
19
+ accounts: [
20
+ {
21
+ name: "admin";
22
+ writable: true;
23
+ signer: true;
24
+ },
25
+ {
26
+ name: "streamConfig";
27
+ writable: true;
28
+ pda: {
29
+ seeds: [
30
+ {
31
+ kind: "const";
32
+ value: [99, 111, 110, 102, 105, 103];
33
+ },
34
+ {
35
+ kind: "account";
36
+ path: "stream_config.config_name";
37
+ account: "streamConfig";
38
+ }
39
+ ];
40
+ };
41
+ },
42
+ {
43
+ name: "systemProgram";
44
+ address: "11111111111111111111111111111111";
45
+ }
46
+ ];
47
+ args: [
48
+ {
49
+ name: "params";
50
+ type: {
51
+ defined: {
52
+ name: "addFeeTokenParams";
53
+ };
54
+ };
55
+ }
56
+ ];
57
+ },
16
58
  {
17
59
  name: "cancelStream";
18
60
  discriminator: [218, 221, 38, 25, 177, 207, 188, 91];
@@ -504,6 +546,48 @@ export type ZebecStream = {
504
546
  ];
505
547
  args: [];
506
548
  },
549
+ {
550
+ name: "removeWhitelist";
551
+ discriminator: [148, 244, 73, 234, 131, 55, 247, 90];
552
+ accounts: [
553
+ {
554
+ name: "admin";
555
+ writable: true;
556
+ signer: true;
557
+ },
558
+ {
559
+ name: "streamConfig";
560
+ writable: true;
561
+ pda: {
562
+ seeds: [
563
+ {
564
+ kind: "const";
565
+ value: [99, 111, 110, 102, 105, 103];
566
+ },
567
+ {
568
+ kind: "account";
569
+ path: "stream_config.config_name";
570
+ account: "streamConfig";
571
+ }
572
+ ];
573
+ };
574
+ },
575
+ {
576
+ name: "systemProgram";
577
+ address: "11111111111111111111111111111111";
578
+ }
579
+ ];
580
+ args: [
581
+ {
582
+ name: "params";
583
+ type: {
584
+ defined: {
585
+ name: "removeWhitelistParams";
586
+ };
587
+ };
588
+ }
589
+ ];
590
+ },
507
591
  {
508
592
  name: "updateConfig";
509
593
  discriminator: [29, 158, 252, 191, 10, 83, 219, 99];
@@ -898,6 +982,18 @@ export type ZebecStream = {
898
982
  }
899
983
  ];
900
984
  types: [
985
+ {
986
+ name: "addFeeTokenParams";
987
+ type: {
988
+ kind: "struct";
989
+ fields: [
990
+ {
991
+ name: "token";
992
+ type: "pubkey";
993
+ }
994
+ ];
995
+ };
996
+ },
901
997
  {
902
998
  name: "burnEvent";
903
999
  type: {
@@ -1144,6 +1240,20 @@ export type ZebecStream = {
1144
1240
  ];
1145
1241
  };
1146
1242
  },
1243
+ {
1244
+ name: "removeWhitelistParams";
1245
+ type: {
1246
+ kind: "struct";
1247
+ fields: [
1248
+ {
1249
+ name: "tokens";
1250
+ type: {
1251
+ vec: "pubkey";
1252
+ };
1253
+ }
1254
+ ];
1255
+ };
1256
+ },
1147
1257
  {
1148
1258
  name: "streamCancelEvent";
1149
1259
  type: {
@@ -155,6 +155,48 @@
155
155
  }
156
156
  ],
157
157
  "instructions": [
158
+ {
159
+ "accounts": [
160
+ {
161
+ "name": "admin",
162
+ "signer": true,
163
+ "writable": true
164
+ },
165
+ {
166
+ "name": "stream_config",
167
+ "pda": {
168
+ "seeds": [
169
+ {
170
+ "kind": "const",
171
+ "value": [99, 111, 110, 102, 105, 103]
172
+ },
173
+ {
174
+ "account": "StreamConfig",
175
+ "kind": "account",
176
+ "path": "stream_config.config_name"
177
+ }
178
+ ]
179
+ },
180
+ "writable": true
181
+ },
182
+ {
183
+ "address": "11111111111111111111111111111111",
184
+ "name": "system_program"
185
+ }
186
+ ],
187
+ "args": [
188
+ {
189
+ "name": "params",
190
+ "type": {
191
+ "defined": {
192
+ "name": "AddFeeTokenParams"
193
+ }
194
+ }
195
+ }
196
+ ],
197
+ "discriminator": [171, 6, 150, 97, 69, 55, 13, 136],
198
+ "name": "add_fee_token"
199
+ },
158
200
  {
159
201
  "accounts": [
160
202
  {
@@ -472,6 +514,48 @@
472
514
  "discriminator": [173, 142, 243, 94, 154, 175, 5, 170],
473
515
  "name": "pause_resume_stream"
474
516
  },
517
+ {
518
+ "accounts": [
519
+ {
520
+ "name": "admin",
521
+ "signer": true,
522
+ "writable": true
523
+ },
524
+ {
525
+ "name": "stream_config",
526
+ "pda": {
527
+ "seeds": [
528
+ {
529
+ "kind": "const",
530
+ "value": [99, 111, 110, 102, 105, 103]
531
+ },
532
+ {
533
+ "account": "StreamConfig",
534
+ "kind": "account",
535
+ "path": "stream_config.config_name"
536
+ }
537
+ ]
538
+ },
539
+ "writable": true
540
+ },
541
+ {
542
+ "address": "11111111111111111111111111111111",
543
+ "name": "system_program"
544
+ }
545
+ ],
546
+ "args": [
547
+ {
548
+ "name": "params",
549
+ "type": {
550
+ "defined": {
551
+ "name": "RemoveWhitelistParams"
552
+ }
553
+ }
554
+ }
555
+ ],
556
+ "discriminator": [148, 244, 73, 234, 131, 55, 247, 90],
557
+ "name": "remove_whitelist"
558
+ },
475
559
  {
476
560
  "accounts": [
477
561
  {
@@ -667,6 +751,18 @@
667
751
  "version": "0.1.0"
668
752
  },
669
753
  "types": [
754
+ {
755
+ "name": "AddFeeTokenParams",
756
+ "type": {
757
+ "fields": [
758
+ {
759
+ "name": "token",
760
+ "type": "pubkey"
761
+ }
762
+ ],
763
+ "kind": "struct"
764
+ }
765
+ },
670
766
  {
671
767
  "name": "BurnEvent",
672
768
  "type": {
@@ -913,6 +1009,20 @@
913
1009
  "kind": "struct"
914
1010
  }
915
1011
  },
1012
+ {
1013
+ "name": "RemoveWhitelistParams",
1014
+ "type": {
1015
+ "fields": [
1016
+ {
1017
+ "name": "tokens",
1018
+ "type": {
1019
+ "vec": "pubkey"
1020
+ }
1021
+ }
1022
+ ],
1023
+ "kind": "struct"
1024
+ }
1025
+ },
916
1026
  {
917
1027
  "name": "StreamCancelEvent",
918
1028
  "type": {
@@ -1,4 +1,4 @@
1
- import type { RpcNetwork } from './types';
1
+ import type { RpcNetwork } from "./types";
2
2
  export declare const STREAM_NAME_BUFFER_SIZE = 128;
3
3
  export declare const STREAM_PROGRAM_ID: Record<RpcNetwork, string>;
4
4
  export declare const STREAM_PROGRAM_LOOKUP_TABLE_ADDRESS: Record<RpcNetwork, string>;
@@ -398,6 +398,7 @@ class ZebecStreamService {
398
398
  const [config] = (0, pda_1.deriveStreamConfigPda)(configName, this.programId);
399
399
  const configInfo = await this.program.account.streamConfig.fetch(config, commitment ?? this.connection.commitment);
400
400
  return {
401
+ configName,
401
402
  address: config,
402
403
  admin: configInfo.admin,
403
404
  withdrawerAccount: configInfo.withdrawAccount,
package/dist/types.d.ts CHANGED
@@ -3,6 +3,7 @@ import type { Keypair, PublicKey } from "@solana/web3.js";
3
3
  export type RpcNetwork = "mainnet-beta" | "devnet";
4
4
  export type Numeric = string | number;
5
5
  export type StreamConfigInfo = {
6
+ configName: string;
6
7
  address: PublicKey;
7
8
  admin: PublicKey;
8
9
  withdrawerAccount: PublicKey;
package/package.json CHANGED
@@ -39,5 +39,5 @@
39
39
  "test:single": "ts-mocha -p ./tsconfig.json -t 1000000000"
40
40
  },
41
41
  "types": "dist/index.d.ts",
42
- "version": "3.3.0"
43
- }
42
+ "version": "3.3.1"
43
+ }