@ercworldio/blockchain-shared 1.0.5-dev.8-PLAT300.7 → 1.0.6

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.
Files changed (35) hide show
  1. package/build/chains/networks_dev.json +2 -1
  2. package/build/chains/networks_prod-ab120.json +644 -0
  3. package/build/chains/networks_prod-dz.json +2 -2
  4. package/build/chains/networks_stg-ab120-mainnet.json +681 -0
  5. package/build/chains/networks_stg-ab120.json +597 -0
  6. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts +1 -1
  7. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts.map +1 -1
  8. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.js +1 -1
  9. package/build/index.d.ts +1 -0
  10. package/build/index.d.ts.map +1 -1
  11. package/build/index.js +4 -2
  12. package/build/services/AzureEventHubHandler.d.ts.map +1 -1
  13. package/build/services/AzureEventHubHandler.js +4 -1
  14. package/build/services/db/multisig/MultisigService.d.ts +26 -1
  15. package/build/services/db/multisig/MultisigService.d.ts.map +1 -1
  16. package/build/services/db/multisig/MultisigService.js +70 -0
  17. package/build/services/db/timelock/ScheduleTransactionService.d.ts +16 -2
  18. package/build/services/db/timelock/ScheduleTransactionService.d.ts.map +1 -1
  19. package/build/services/db/timelock/ScheduleTransactionService.js +265 -1
  20. package/build/services/solana/escrow/idl/escrow.json +528 -17
  21. package/build/services/solana/escrow/services/EscrowAdminUtility.d.ts +8 -0
  22. package/build/services/solana/escrow/services/EscrowAdminUtility.d.ts.map +1 -1
  23. package/build/services/solana/escrow/services/EscrowAdminUtility.js +46 -5
  24. package/build/services/solana/escrow/types/escrow.d.ts +528 -17
  25. package/build/services/solana/escrow/types/escrow.d.ts.map +1 -1
  26. package/build/services/types/azure_event_hub_handler.d.ts +3 -1
  27. package/build/services/types/azure_event_hub_handler.d.ts.map +1 -1
  28. package/build/services/types/azure_event_hub_handler.js +3 -0
  29. package/build/services/types/claim.d.ts +1 -0
  30. package/build/services/types/claim.d.ts.map +1 -1
  31. package/build/services/types/db/multisig_service.d.ts +70 -0
  32. package/build/services/types/db/multisig_service.d.ts.map +1 -1
  33. package/build/services/types/db/timelock.d.ts +56 -0
  34. package/build/services/types/db/timelock.d.ts.map +1 -1
  35. package/package.json +1 -1
@@ -68,6 +68,188 @@ export type Escrow = {
68
68
  }
69
69
  ];
70
70
  },
71
+ {
72
+ "name": "addAdminTreasuryExecutive";
73
+ "discriminator": [
74
+ 19,
75
+ 201,
76
+ 206,
77
+ 150,
78
+ 205,
79
+ 172,
80
+ 131,
81
+ 126
82
+ ];
83
+ "accounts": [
84
+ {
85
+ "name": "escrowConfig";
86
+ "pda": {
87
+ "seeds": [
88
+ {
89
+ "kind": "const";
90
+ "value": [
91
+ 101,
92
+ 115,
93
+ 99,
94
+ 114,
95
+ 111,
96
+ 119,
97
+ 45,
98
+ 99,
99
+ 111,
100
+ 110,
101
+ 102,
102
+ 105,
103
+ 103,
104
+ 45,
105
+ 118,
106
+ 50
107
+ ];
108
+ }
109
+ ];
110
+ };
111
+ },
112
+ {
113
+ "name": "adminTreasuryRoles";
114
+ "writable": true;
115
+ "pda": {
116
+ "seeds": [
117
+ {
118
+ "kind": "const";
119
+ "value": [
120
+ 97,
121
+ 100,
122
+ 109,
123
+ 105,
124
+ 110,
125
+ 45,
126
+ 116,
127
+ 114,
128
+ 101,
129
+ 97,
130
+ 115,
131
+ 117,
132
+ 114,
133
+ 121,
134
+ 45,
135
+ 114,
136
+ 111,
137
+ 108,
138
+ 101,
139
+ 115
140
+ ];
141
+ }
142
+ ];
143
+ };
144
+ },
145
+ {
146
+ "name": "admin";
147
+ "writable": true;
148
+ "signer": true;
149
+ },
150
+ {
151
+ "name": "systemProgram";
152
+ "address": "11111111111111111111111111111111";
153
+ }
154
+ ];
155
+ "args": [
156
+ {
157
+ "name": "pubkey";
158
+ "type": "pubkey";
159
+ }
160
+ ];
161
+ },
162
+ {
163
+ "name": "addAdminTreasuryManager";
164
+ "discriminator": [
165
+ 68,
166
+ 147,
167
+ 56,
168
+ 98,
169
+ 60,
170
+ 102,
171
+ 81,
172
+ 38
173
+ ];
174
+ "accounts": [
175
+ {
176
+ "name": "escrowConfig";
177
+ "pda": {
178
+ "seeds": [
179
+ {
180
+ "kind": "const";
181
+ "value": [
182
+ 101,
183
+ 115,
184
+ 99,
185
+ 114,
186
+ 111,
187
+ 119,
188
+ 45,
189
+ 99,
190
+ 111,
191
+ 110,
192
+ 102,
193
+ 105,
194
+ 103,
195
+ 45,
196
+ 118,
197
+ 50
198
+ ];
199
+ }
200
+ ];
201
+ };
202
+ },
203
+ {
204
+ "name": "adminTreasuryRoles";
205
+ "writable": true;
206
+ "pda": {
207
+ "seeds": [
208
+ {
209
+ "kind": "const";
210
+ "value": [
211
+ 97,
212
+ 100,
213
+ 109,
214
+ 105,
215
+ 110,
216
+ 45,
217
+ 116,
218
+ 114,
219
+ 101,
220
+ 97,
221
+ 115,
222
+ 117,
223
+ 114,
224
+ 121,
225
+ 45,
226
+ 114,
227
+ 111,
228
+ 108,
229
+ 101,
230
+ 115
231
+ ];
232
+ }
233
+ ];
234
+ };
235
+ },
236
+ {
237
+ "name": "admin";
238
+ "writable": true;
239
+ "signer": true;
240
+ },
241
+ {
242
+ "name": "systemProgram";
243
+ "address": "11111111111111111111111111111111";
244
+ }
245
+ ];
246
+ "args": [
247
+ {
248
+ "name": "pubkey";
249
+ "type": "pubkey";
250
+ }
251
+ ];
252
+ },
71
253
  {
72
254
  "name": "addConfigExecutive";
73
255
  "discriminator": [
@@ -1224,12 +1406,18 @@ export type Escrow = {
1224
1406
  };
1225
1407
  },
1226
1408
  {
1227
- "name": "treasuryConfig";
1409
+ "name": "adminTreasuryRoles";
1228
1410
  "pda": {
1229
1411
  "seeds": [
1230
1412
  {
1231
1413
  "kind": "const";
1232
1414
  "value": [
1415
+ 97,
1416
+ 100,
1417
+ 109,
1418
+ 105,
1419
+ 110,
1420
+ 45,
1233
1421
  116,
1234
1422
  114,
1235
1423
  101,
@@ -1239,12 +1427,11 @@ export type Escrow = {
1239
1427
  114,
1240
1428
  121,
1241
1429
  45,
1242
- 99,
1430
+ 114,
1243
1431
  111,
1244
- 110,
1245
- 102,
1246
- 105,
1247
- 103
1432
+ 108,
1433
+ 101,
1434
+ 115
1248
1435
  ];
1249
1436
  }
1250
1437
  ];
@@ -1460,12 +1647,18 @@ export type Escrow = {
1460
1647
  "name": "mint";
1461
1648
  },
1462
1649
  {
1463
- "name": "treasuryConfig";
1650
+ "name": "adminTreasuryRoles";
1464
1651
  "pda": {
1465
1652
  "seeds": [
1466
1653
  {
1467
1654
  "kind": "const";
1468
1655
  "value": [
1656
+ 97,
1657
+ 100,
1658
+ 109,
1659
+ 105,
1660
+ 110,
1661
+ 45,
1469
1662
  116,
1470
1663
  114,
1471
1664
  101,
@@ -1475,12 +1668,11 @@ export type Escrow = {
1475
1668
  114,
1476
1669
  121,
1477
1670
  45,
1478
- 99,
1671
+ 114,
1479
1672
  111,
1480
- 110,
1481
- 102,
1482
- 105,
1483
- 103
1673
+ 108,
1674
+ 101,
1675
+ 115
1484
1676
  ];
1485
1677
  }
1486
1678
  ];
@@ -3703,6 +3895,92 @@ export type Escrow = {
3703
3895
  "args": [];
3704
3896
  "returns": "u64";
3705
3897
  },
3898
+ {
3899
+ "name": "initializeAdminTreasuryRoles";
3900
+ "discriminator": [
3901
+ 145,
3902
+ 145,
3903
+ 154,
3904
+ 38,
3905
+ 140,
3906
+ 204,
3907
+ 170,
3908
+ 127
3909
+ ];
3910
+ "accounts": [
3911
+ {
3912
+ "name": "escrowConfig";
3913
+ "pda": {
3914
+ "seeds": [
3915
+ {
3916
+ "kind": "const";
3917
+ "value": [
3918
+ 101,
3919
+ 115,
3920
+ 99,
3921
+ 114,
3922
+ 111,
3923
+ 119,
3924
+ 45,
3925
+ 99,
3926
+ 111,
3927
+ 110,
3928
+ 102,
3929
+ 105,
3930
+ 103,
3931
+ 45,
3932
+ 118,
3933
+ 50
3934
+ ];
3935
+ }
3936
+ ];
3937
+ };
3938
+ },
3939
+ {
3940
+ "name": "adminTreasuryRoles";
3941
+ "writable": true;
3942
+ "pda": {
3943
+ "seeds": [
3944
+ {
3945
+ "kind": "const";
3946
+ "value": [
3947
+ 97,
3948
+ 100,
3949
+ 109,
3950
+ 105,
3951
+ 110,
3952
+ 45,
3953
+ 116,
3954
+ 114,
3955
+ 101,
3956
+ 97,
3957
+ 115,
3958
+ 117,
3959
+ 114,
3960
+ 121,
3961
+ 45,
3962
+ 114,
3963
+ 111,
3964
+ 108,
3965
+ 101,
3966
+ 115
3967
+ ];
3968
+ }
3969
+ ];
3970
+ };
3971
+ },
3972
+ {
3973
+ "name": "admin";
3974
+ "writable": true;
3975
+ "signer": true;
3976
+ },
3977
+ {
3978
+ "name": "systemProgram";
3979
+ "address": "11111111111111111111111111111111";
3980
+ }
3981
+ ];
3982
+ "args": [];
3983
+ },
3706
3984
  {
3707
3985
  "name": "initializeEscrowConfig";
3708
3986
  "discriminator": [
@@ -4376,6 +4654,180 @@ export type Escrow = {
4376
4654
  }
4377
4655
  ];
4378
4656
  },
4657
+ {
4658
+ "name": "removeAdminTreasuryExecutive";
4659
+ "discriminator": [
4660
+ 245,
4661
+ 211,
4662
+ 237,
4663
+ 57,
4664
+ 23,
4665
+ 70,
4666
+ 97,
4667
+ 168
4668
+ ];
4669
+ "accounts": [
4670
+ {
4671
+ "name": "escrowConfig";
4672
+ "pda": {
4673
+ "seeds": [
4674
+ {
4675
+ "kind": "const";
4676
+ "value": [
4677
+ 101,
4678
+ 115,
4679
+ 99,
4680
+ 114,
4681
+ 111,
4682
+ 119,
4683
+ 45,
4684
+ 99,
4685
+ 111,
4686
+ 110,
4687
+ 102,
4688
+ 105,
4689
+ 103,
4690
+ 45,
4691
+ 118,
4692
+ 50
4693
+ ];
4694
+ }
4695
+ ];
4696
+ };
4697
+ },
4698
+ {
4699
+ "name": "adminTreasuryRoles";
4700
+ "writable": true;
4701
+ "pda": {
4702
+ "seeds": [
4703
+ {
4704
+ "kind": "const";
4705
+ "value": [
4706
+ 97,
4707
+ 100,
4708
+ 109,
4709
+ 105,
4710
+ 110,
4711
+ 45,
4712
+ 116,
4713
+ 114,
4714
+ 101,
4715
+ 97,
4716
+ 115,
4717
+ 117,
4718
+ 114,
4719
+ 121,
4720
+ 45,
4721
+ 114,
4722
+ 111,
4723
+ 108,
4724
+ 101,
4725
+ 115
4726
+ ];
4727
+ }
4728
+ ];
4729
+ };
4730
+ },
4731
+ {
4732
+ "name": "admin";
4733
+ "writable": true;
4734
+ "signer": true;
4735
+ }
4736
+ ];
4737
+ "args": [
4738
+ {
4739
+ "name": "pubkey";
4740
+ "type": "pubkey";
4741
+ }
4742
+ ];
4743
+ },
4744
+ {
4745
+ "name": "removeAdminTreasuryManager";
4746
+ "discriminator": [
4747
+ 255,
4748
+ 44,
4749
+ 160,
4750
+ 215,
4751
+ 194,
4752
+ 194,
4753
+ 237,
4754
+ 228
4755
+ ];
4756
+ "accounts": [
4757
+ {
4758
+ "name": "escrowConfig";
4759
+ "pda": {
4760
+ "seeds": [
4761
+ {
4762
+ "kind": "const";
4763
+ "value": [
4764
+ 101,
4765
+ 115,
4766
+ 99,
4767
+ 114,
4768
+ 111,
4769
+ 119,
4770
+ 45,
4771
+ 99,
4772
+ 111,
4773
+ 110,
4774
+ 102,
4775
+ 105,
4776
+ 103,
4777
+ 45,
4778
+ 118,
4779
+ 50
4780
+ ];
4781
+ }
4782
+ ];
4783
+ };
4784
+ },
4785
+ {
4786
+ "name": "adminTreasuryRoles";
4787
+ "writable": true;
4788
+ "pda": {
4789
+ "seeds": [
4790
+ {
4791
+ "kind": "const";
4792
+ "value": [
4793
+ 97,
4794
+ 100,
4795
+ 109,
4796
+ 105,
4797
+ 110,
4798
+ 45,
4799
+ 116,
4800
+ 114,
4801
+ 101,
4802
+ 97,
4803
+ 115,
4804
+ 117,
4805
+ 114,
4806
+ 121,
4807
+ 45,
4808
+ 114,
4809
+ 111,
4810
+ 108,
4811
+ 101,
4812
+ 115
4813
+ ];
4814
+ }
4815
+ ];
4816
+ };
4817
+ },
4818
+ {
4819
+ "name": "admin";
4820
+ "writable": true;
4821
+ "signer": true;
4822
+ }
4823
+ ];
4824
+ "args": [
4825
+ {
4826
+ "name": "pubkey";
4827
+ "type": "pubkey";
4828
+ }
4829
+ ];
4830
+ },
4379
4831
  {
4380
4832
  "name": "removeConfigExecutive";
4381
4833
  "discriminator": [
@@ -7162,6 +7614,19 @@ export type Escrow = {
7162
7614
  }
7163
7615
  ];
7164
7616
  "accounts": [
7617
+ {
7618
+ "name": "adminTreasuryRoles";
7619
+ "discriminator": [
7620
+ 133,
7621
+ 108,
7622
+ 246,
7623
+ 222,
7624
+ 12,
7625
+ 121,
7626
+ 141,
7627
+ 177
7628
+ ];
7629
+ },
7165
7630
  {
7166
7631
  "name": "adminWithdrawConfig";
7167
7632
  "discriminator": [
@@ -7800,6 +8265,11 @@ export type Escrow = {
7800
8265
  "code": 6035;
7801
8266
  "name": "receiverNotWhitelisted";
7802
8267
  "msg": "Receiver is not whitelisted for admin withdrawals";
8268
+ },
8269
+ {
8270
+ "code": 6036;
8271
+ "name": "adminTreasuryRolesNotInitialized";
8272
+ "msg": "Admin treasury roles not initialized";
7803
8273
  }
7804
8274
  ];
7805
8275
  "types": [
@@ -7885,6 +8355,41 @@ export type Escrow = {
7885
8355
  ];
7886
8356
  };
7887
8357
  },
8358
+ {
8359
+ "name": "adminTreasuryRoles";
8360
+ "docs": [
8361
+ "Signer rosters for **admin withdrawal** approvals — mirrors EVM's distinct",
8362
+ "`ADMIN_TREASURY_MANAGER_ROLE` / `ADMIN_TREASURY_EXECUTIVE_ROLE` signer groups, kept separate from",
8363
+ "the `TreasuryConfig` roster that approves *user* withdrawals (they are different people/quorums).",
8364
+ "",
8365
+ "The required counts live in `AdminWithdrawConfig` (single fixed level, no amount bands). The",
8366
+ "admin's wallet composes `[Ed25519 sig ixs] + [admin_withdraw_*_v2 ix]` and the instruction verifies",
8367
+ "the collected signatures against these rosters. Unbounded: adding a member grows the account.",
8368
+ "",
8369
+ "PDA seeds: [b\"admin-treasury-roles\"]."
8370
+ ];
8371
+ "type": {
8372
+ "kind": "struct";
8373
+ "fields": [
8374
+ {
8375
+ "name": "adminTreasuryManagers";
8376
+ "type": {
8377
+ "vec": "pubkey";
8378
+ };
8379
+ },
8380
+ {
8381
+ "name": "adminTreasuryExecutives";
8382
+ "type": {
8383
+ "vec": "pubkey";
8384
+ };
8385
+ },
8386
+ {
8387
+ "name": "isInitialized";
8388
+ "type": "bool";
8389
+ }
8390
+ ];
8391
+ };
8392
+ },
7888
8393
  {
7889
8394
  "name": "adminWithdraw";
7890
8395
  "type": {
@@ -7920,11 +8425,11 @@ export type Escrow = {
7920
8425
  {
7921
8426
  "name": "adminWithdrawConfig";
7922
8427
  "docs": [
7923
- "Single, global (not per-token) execution threshold for the interim pull-based admin withdrawal",
7924
- "(mirrors EVM's `adminTokenThresholdSettings` — one fixed level, no amount bands). Signatures are",
7925
- "verified against the existing `TreasuryConfig` roster (the same managers/executives who approve",
7926
- "regular withdrawals) rather than a separate admin-only rostersee the plan doc for why this is",
7927
- "a deliberate scope simplification vs EVM's distinct ADMIN_TREASURY_MANAGER/EXECUTIVE roles.",
8428
+ "Single, global (not per-token) execution threshold for the pull-based admin withdrawal (mirrors",
8429
+ "EVM's `adminTokenThresholdSettings` — one fixed level, no amount bands). Signatures are verified",
8430
+ "against the dedicated `AdminTreasuryRoles` roster (`ADMIN_TREASURY_MANAGER` / `_EXECUTIVE`),",
8431
+ "mirroring EVM's distinct admin-treasury signer groups kept separate from the `TreasuryConfig`",
8432
+ "roster that approves regular user withdrawals.",
7928
8433
  "",
7929
8434
  "PDA seeds: `[b\"admin-withdraw-config\"]`."
7930
8435
  ];
@@ -8409,6 +8914,12 @@ export type Escrow = {
8409
8914
  },
8410
8915
  {
8411
8916
  "name": "treasuryReceiver";
8917
+ },
8918
+ {
8919
+ "name": "adminTreasuryManager";
8920
+ },
8921
+ {
8922
+ "name": "adminTreasuryExecutive";
8412
8923
  }
8413
8924
  ];
8414
8925
  };