@ercworldio/blockchain-shared 1.0.5-dev.8-PLAT134.2 → 1.0.5-dev.8-PLAT134.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 (46) hide show
  1. package/build/chains/networks_dev.json +0 -10
  2. package/build/chains/networks_prod-bu.json +14 -0
  3. package/build/chains/networks_prod-dz.json +1 -22
  4. package/build/contracts/artifacts/Escrow.json +0 -13
  5. package/build/contracts/contract-events/EscrowEvents.d.ts +2 -16
  6. package/build/contracts/contract-events/EscrowEvents.d.ts.map +1 -1
  7. package/build/contracts/contract-events/EscrowEvents.js +0 -5
  8. package/build/contracts/contract-events/types/events.d.ts +1 -5
  9. package/build/contracts/contract-events/types/events.d.ts.map +1 -1
  10. package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts +1 -15
  11. package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts.map +1 -1
  12. package/build/contracts/typechain-types/contracts/lib/Events.d.ts +1 -15
  13. package/build/contracts/typechain-types/contracts/lib/Events.d.ts.map +1 -1
  14. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts +1 -11
  15. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts.map +1 -1
  16. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.js +1 -14
  17. package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.d.ts +1 -11
  18. package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.d.ts.map +1 -1
  19. package/build/contracts/typechain-types/factories/contracts/lib/Events__factory.js +1 -14
  20. package/build/index.d.ts +0 -1
  21. package/build/index.d.ts.map +1 -1
  22. package/build/index.js +2 -4
  23. package/build/services/AlchemyService.d.ts.map +1 -1
  24. package/build/services/AlchemyService.js +3 -2
  25. package/build/services/AzureEventHubHandler.d.ts.map +1 -1
  26. package/build/services/AzureEventHubHandler.js +1 -4
  27. package/build/services/ClaimJobService.d.ts.map +1 -1
  28. package/build/services/ClaimJobService.js +5 -12
  29. package/build/services/Redis.js +2 -2
  30. package/build/services/RedisPubSub.js +1 -1
  31. package/build/services/db/timelock/ScheduleTransactionService.d.ts +2 -16
  32. package/build/services/db/timelock/ScheduleTransactionService.d.ts.map +1 -1
  33. package/build/services/db/timelock/ScheduleTransactionService.js +1 -265
  34. package/build/services/solana/escrow/idl/escrow.json +1206 -32
  35. package/build/services/solana/escrow/types/escrow.d.ts +1205 -31
  36. package/build/services/solana/escrow/types/escrow.d.ts.map +1 -1
  37. package/build/services/types/azure_event_hub_handler.d.ts +1 -3
  38. package/build/services/types/azure_event_hub_handler.d.ts.map +1 -1
  39. package/build/services/types/azure_event_hub_handler.js +0 -3
  40. package/build/services/types/claim.d.ts +0 -1
  41. package/build/services/types/claim.d.ts.map +1 -1
  42. package/build/services/types/db/timelock.d.ts +0 -56
  43. package/build/services/types/db/timelock.d.ts.map +1 -1
  44. package/build/utils/solana.d.ts.map +1 -1
  45. package/build/utils/solana.js +3 -5
  46. package/package.json +1 -1
@@ -912,6 +912,101 @@
912
912
  }
913
913
  ]
914
914
  },
915
+ {
916
+ "name": "add_treasury_receiver",
917
+ "docs": [
918
+ "Whitelists a receiver for admin withdrawals (mirrors EVM grantRole TREASURY_RECEIVER_ROLE)."
919
+ ],
920
+ "discriminator": [
921
+ 218,
922
+ 173,
923
+ 230,
924
+ 27,
925
+ 126,
926
+ 71,
927
+ 202,
928
+ 54
929
+ ],
930
+ "accounts": [
931
+ {
932
+ "name": "escrow_config",
933
+ "pda": {
934
+ "seeds": [
935
+ {
936
+ "kind": "const",
937
+ "value": [
938
+ 101,
939
+ 115,
940
+ 99,
941
+ 114,
942
+ 111,
943
+ 119,
944
+ 45,
945
+ 99,
946
+ 111,
947
+ 110,
948
+ 102,
949
+ 105,
950
+ 103,
951
+ 45,
952
+ 118,
953
+ 50
954
+ ]
955
+ }
956
+ ]
957
+ }
958
+ },
959
+ {
960
+ "name": "treasury_receiver",
961
+ "writable": true,
962
+ "pda": {
963
+ "seeds": [
964
+ {
965
+ "kind": "const",
966
+ "value": [
967
+ 116,
968
+ 114,
969
+ 101,
970
+ 97,
971
+ 115,
972
+ 117,
973
+ 114,
974
+ 121,
975
+ 45,
976
+ 114,
977
+ 101,
978
+ 99,
979
+ 101,
980
+ 105,
981
+ 118,
982
+ 101,
983
+ 114
984
+ ]
985
+ },
986
+ {
987
+ "kind": "arg",
988
+ "path": "receiver"
989
+ }
990
+ ]
991
+ }
992
+ },
993
+ {
994
+ "name": "admin",
995
+ "writable": true,
996
+ "signer": true
997
+ },
998
+ {
999
+ "name": "system_program",
1000
+ "address": "11111111111111111111111111111111"
1001
+ }
1002
+ ],
1003
+ "args": [
1004
+ {
1005
+ "name": "receiver",
1006
+ "type": "pubkey"
1007
+ }
1008
+ ]
1009
+ },
915
1010
  {
916
1011
  "name": "admin_deposit_sol",
917
1012
  "docs": [
@@ -1025,53 +1120,704 @@
1025
1120
  119,
1026
1121
  45,
1027
1122
  99,
1028
- 111,
1029
- 110,
1030
- 102,
1123
+ 111,
1124
+ 110,
1125
+ 102,
1126
+ 105,
1127
+ 103,
1128
+ 45,
1129
+ 118,
1130
+ 50
1131
+ ]
1132
+ }
1133
+ ]
1134
+ }
1135
+ },
1136
+ {
1137
+ "name": "vault_authority",
1138
+ "writable": true,
1139
+ "pda": {
1140
+ "seeds": [
1141
+ {
1142
+ "kind": "const",
1143
+ "value": [
1144
+ 101,
1145
+ 115,
1146
+ 99,
1147
+ 114,
1148
+ 111,
1149
+ 119
1150
+ ]
1151
+ }
1152
+ ]
1153
+ }
1154
+ },
1155
+ {
1156
+ "name": "recipient",
1157
+ "writable": true
1158
+ },
1159
+ {
1160
+ "name": "admin",
1161
+ "writable": true,
1162
+ "signer": true
1163
+ },
1164
+ {
1165
+ "name": "system_program",
1166
+ "address": "11111111111111111111111111111111"
1167
+ }
1168
+ ],
1169
+ "args": [
1170
+ {
1171
+ "name": "amount",
1172
+ "type": "u64"
1173
+ }
1174
+ ]
1175
+ },
1176
+ {
1177
+ "name": "admin_withdraw_sol_v2",
1178
+ "docs": [
1179
+ "Pull-based admin withdrawal of native SOL, multisig-aware (mirrors EVM adminWithdraw)."
1180
+ ],
1181
+ "discriminator": [
1182
+ 76,
1183
+ 84,
1184
+ 255,
1185
+ 156,
1186
+ 101,
1187
+ 7,
1188
+ 49,
1189
+ 42
1190
+ ],
1191
+ "accounts": [
1192
+ {
1193
+ "name": "escrow_config",
1194
+ "pda": {
1195
+ "seeds": [
1196
+ {
1197
+ "kind": "const",
1198
+ "value": [
1199
+ 101,
1200
+ 115,
1201
+ 99,
1202
+ 114,
1203
+ 111,
1204
+ 119,
1205
+ 45,
1206
+ 99,
1207
+ 111,
1208
+ 110,
1209
+ 102,
1210
+ 105,
1211
+ 103,
1212
+ 45,
1213
+ 118,
1214
+ 50
1215
+ ]
1216
+ }
1217
+ ]
1218
+ }
1219
+ },
1220
+ {
1221
+ "name": "treasury_config",
1222
+ "pda": {
1223
+ "seeds": [
1224
+ {
1225
+ "kind": "const",
1226
+ "value": [
1227
+ 116,
1228
+ 114,
1229
+ 101,
1230
+ 97,
1231
+ 115,
1232
+ 117,
1233
+ 114,
1234
+ 121,
1235
+ 45,
1236
+ 99,
1237
+ 111,
1238
+ 110,
1239
+ 102,
1240
+ 105,
1241
+ 103
1242
+ ]
1243
+ }
1244
+ ]
1245
+ }
1246
+ },
1247
+ {
1248
+ "name": "admin_withdraw_config",
1249
+ "pda": {
1250
+ "seeds": [
1251
+ {
1252
+ "kind": "const",
1253
+ "value": [
1254
+ 97,
1255
+ 100,
1256
+ 109,
1257
+ 105,
1258
+ 110,
1259
+ 45,
1260
+ 119,
1261
+ 105,
1262
+ 116,
1263
+ 104,
1264
+ 100,
1265
+ 114,
1266
+ 97,
1267
+ 119,
1268
+ 45,
1269
+ 99,
1270
+ 111,
1271
+ 110,
1272
+ 102,
1273
+ 105,
1274
+ 103
1275
+ ]
1276
+ }
1277
+ ]
1278
+ }
1279
+ },
1280
+ {
1281
+ "name": "admin_withdrawal_used",
1282
+ "docs": [
1283
+ "Anti-replay marker — `init` fails if `request_id` was already used."
1284
+ ],
1285
+ "writable": true,
1286
+ "pda": {
1287
+ "seeds": [
1288
+ {
1289
+ "kind": "const",
1290
+ "value": [
1291
+ 97,
1292
+ 100,
1293
+ 109,
1294
+ 105,
1295
+ 110,
1296
+ 45,
1297
+ 119,
1298
+ 105,
1299
+ 116,
1300
+ 104,
1301
+ 100,
1302
+ 114,
1303
+ 97,
1304
+ 119,
1305
+ 97,
1306
+ 108,
1307
+ 45,
1308
+ 117,
1309
+ 115,
1310
+ 101,
1311
+ 100
1312
+ ]
1313
+ },
1314
+ {
1315
+ "kind": "arg",
1316
+ "path": "request_id"
1317
+ }
1318
+ ]
1319
+ }
1320
+ },
1321
+ {
1322
+ "name": "vault_authority",
1323
+ "writable": true,
1324
+ "pda": {
1325
+ "seeds": [
1326
+ {
1327
+ "kind": "const",
1328
+ "value": [
1329
+ 101,
1330
+ 115,
1331
+ 99,
1332
+ 114,
1333
+ 111,
1334
+ 119
1335
+ ]
1336
+ }
1337
+ ]
1338
+ }
1339
+ },
1340
+ {
1341
+ "name": "recipient",
1342
+ "writable": true
1343
+ },
1344
+ {
1345
+ "name": "treasury_receiver",
1346
+ "docs": [
1347
+ "Mirrors EVM's onlyTreasuryReceiver(receiver) — the payout target must be whitelisted."
1348
+ ],
1349
+ "pda": {
1350
+ "seeds": [
1351
+ {
1352
+ "kind": "const",
1353
+ "value": [
1354
+ 116,
1355
+ 114,
1356
+ 101,
1357
+ 97,
1358
+ 115,
1359
+ 117,
1360
+ 114,
1361
+ 121,
1362
+ 45,
1363
+ 114,
1364
+ 101,
1365
+ 99,
1366
+ 101,
1367
+ 105,
1368
+ 118,
1369
+ 101,
1370
+ 114
1371
+ ]
1372
+ },
1373
+ {
1374
+ "kind": "account",
1375
+ "path": "recipient"
1376
+ }
1377
+ ]
1378
+ }
1379
+ },
1380
+ {
1381
+ "name": "admin",
1382
+ "writable": true,
1383
+ "signer": true
1384
+ },
1385
+ {
1386
+ "name": "system_program",
1387
+ "address": "11111111111111111111111111111111"
1388
+ },
1389
+ {
1390
+ "name": "instructions",
1391
+ "address": "Sysvar1nstructions1111111111111111111111111"
1392
+ }
1393
+ ],
1394
+ "args": [
1395
+ {
1396
+ "name": "chain_id",
1397
+ "type": "u64"
1398
+ },
1399
+ {
1400
+ "name": "request_id",
1401
+ "type": "u64"
1402
+ },
1403
+ {
1404
+ "name": "amount",
1405
+ "type": "u64"
1406
+ }
1407
+ ]
1408
+ },
1409
+ {
1410
+ "name": "admin_withdraw_spl_v2",
1411
+ "docs": [
1412
+ "Pull-based admin withdrawal of an SPL token, multisig-aware (mirrors EVM adminWithdraw)."
1413
+ ],
1414
+ "discriminator": [
1415
+ 174,
1416
+ 14,
1417
+ 175,
1418
+ 111,
1419
+ 48,
1420
+ 41,
1421
+ 185,
1422
+ 32
1423
+ ],
1424
+ "accounts": [
1425
+ {
1426
+ "name": "escrow_config",
1427
+ "pda": {
1428
+ "seeds": [
1429
+ {
1430
+ "kind": "const",
1431
+ "value": [
1432
+ 101,
1433
+ 115,
1434
+ 99,
1435
+ 114,
1436
+ 111,
1437
+ 119,
1438
+ 45,
1439
+ 99,
1440
+ 111,
1441
+ 110,
1442
+ 102,
1443
+ 105,
1444
+ 103,
1445
+ 45,
1446
+ 118,
1447
+ 50
1448
+ ]
1449
+ }
1450
+ ]
1451
+ }
1452
+ },
1453
+ {
1454
+ "name": "mint"
1455
+ },
1456
+ {
1457
+ "name": "treasury_config",
1458
+ "pda": {
1459
+ "seeds": [
1460
+ {
1461
+ "kind": "const",
1462
+ "value": [
1463
+ 116,
1464
+ 114,
1465
+ 101,
1466
+ 97,
1467
+ 115,
1468
+ 117,
1469
+ 114,
1470
+ 121,
1471
+ 45,
1472
+ 99,
1473
+ 111,
1474
+ 110,
1475
+ 102,
1476
+ 105,
1477
+ 103
1478
+ ]
1479
+ }
1480
+ ]
1481
+ }
1482
+ },
1483
+ {
1484
+ "name": "admin_withdraw_config",
1485
+ "pda": {
1486
+ "seeds": [
1487
+ {
1488
+ "kind": "const",
1489
+ "value": [
1490
+ 97,
1491
+ 100,
1492
+ 109,
1493
+ 105,
1494
+ 110,
1495
+ 45,
1496
+ 119,
1497
+ 105,
1498
+ 116,
1499
+ 104,
1500
+ 100,
1501
+ 114,
1502
+ 97,
1503
+ 119,
1504
+ 45,
1505
+ 99,
1506
+ 111,
1507
+ 110,
1508
+ 102,
1509
+ 105,
1510
+ 103
1511
+ ]
1512
+ }
1513
+ ]
1514
+ }
1515
+ },
1516
+ {
1517
+ "name": "admin_withdrawal_used",
1518
+ "docs": [
1519
+ "Anti-replay marker — `init` fails if `request_id` was already used."
1520
+ ],
1521
+ "writable": true,
1522
+ "pda": {
1523
+ "seeds": [
1524
+ {
1525
+ "kind": "const",
1526
+ "value": [
1527
+ 97,
1528
+ 100,
1529
+ 109,
1530
+ 105,
1531
+ 110,
1532
+ 45,
1533
+ 119,
1534
+ 105,
1535
+ 116,
1536
+ 104,
1537
+ 100,
1538
+ 114,
1539
+ 97,
1540
+ 119,
1541
+ 97,
1542
+ 108,
1543
+ 45,
1544
+ 117,
1545
+ 115,
1546
+ 101,
1547
+ 100
1548
+ ]
1549
+ },
1550
+ {
1551
+ "kind": "arg",
1552
+ "path": "request_id"
1553
+ }
1554
+ ]
1555
+ }
1556
+ },
1557
+ {
1558
+ "name": "vault_authority",
1559
+ "pda": {
1560
+ "seeds": [
1561
+ {
1562
+ "kind": "const",
1563
+ "value": [
1564
+ 101,
1565
+ 115,
1566
+ 99,
1567
+ 114,
1568
+ 111,
1569
+ 119
1570
+ ]
1571
+ }
1572
+ ]
1573
+ }
1574
+ },
1575
+ {
1576
+ "name": "vault_token_account",
1577
+ "writable": true,
1578
+ "pda": {
1579
+ "seeds": [
1580
+ {
1581
+ "kind": "account",
1582
+ "path": "vault_authority"
1583
+ },
1584
+ {
1585
+ "kind": "const",
1586
+ "value": [
1587
+ 6,
1588
+ 221,
1589
+ 246,
1590
+ 225,
1591
+ 215,
1592
+ 101,
1593
+ 161,
1594
+ 147,
1595
+ 217,
1596
+ 203,
1597
+ 225,
1598
+ 70,
1599
+ 206,
1600
+ 235,
1601
+ 121,
1602
+ 172,
1603
+ 28,
1604
+ 180,
1605
+ 133,
1606
+ 237,
1607
+ 95,
1608
+ 91,
1609
+ 55,
1610
+ 145,
1611
+ 58,
1612
+ 140,
1613
+ 245,
1614
+ 133,
1615
+ 126,
1616
+ 255,
1617
+ 0,
1618
+ 169
1619
+ ]
1620
+ },
1621
+ {
1622
+ "kind": "account",
1623
+ "path": "mint"
1624
+ }
1625
+ ],
1626
+ "program": {
1627
+ "kind": "const",
1628
+ "value": [
1629
+ 140,
1630
+ 151,
1631
+ 37,
1632
+ 143,
1633
+ 78,
1634
+ 36,
1635
+ 137,
1636
+ 241,
1637
+ 187,
1638
+ 61,
1639
+ 16,
1640
+ 41,
1641
+ 20,
1642
+ 142,
1643
+ 13,
1644
+ 131,
1645
+ 11,
1646
+ 90,
1647
+ 19,
1648
+ 153,
1649
+ 218,
1650
+ 255,
1651
+ 16,
1652
+ 132,
1653
+ 4,
1654
+ 142,
1655
+ 123,
1656
+ 216,
1657
+ 219,
1658
+ 233,
1659
+ 248,
1660
+ 89
1661
+ ]
1662
+ }
1663
+ }
1664
+ },
1665
+ {
1666
+ "name": "recipient"
1667
+ },
1668
+ {
1669
+ "name": "treasury_receiver",
1670
+ "docs": [
1671
+ "Mirrors EVM's onlyTreasuryReceiver(receiver) — the payout target must be whitelisted."
1672
+ ],
1673
+ "pda": {
1674
+ "seeds": [
1675
+ {
1676
+ "kind": "const",
1677
+ "value": [
1678
+ 116,
1679
+ 114,
1680
+ 101,
1681
+ 97,
1682
+ 115,
1683
+ 117,
1684
+ 114,
1685
+ 121,
1686
+ 45,
1687
+ 114,
1688
+ 101,
1689
+ 99,
1690
+ 101,
1031
1691
  105,
1032
- 103,
1033
- 45,
1034
1692
  118,
1035
- 50
1693
+ 101,
1694
+ 114
1036
1695
  ]
1696
+ },
1697
+ {
1698
+ "kind": "account",
1699
+ "path": "recipient"
1037
1700
  }
1038
1701
  ]
1039
1702
  }
1040
1703
  },
1041
1704
  {
1042
- "name": "vault_authority",
1705
+ "name": "recipient_token_account",
1043
1706
  "writable": true,
1044
1707
  "pda": {
1045
1708
  "seeds": [
1709
+ {
1710
+ "kind": "account",
1711
+ "path": "recipient"
1712
+ },
1046
1713
  {
1047
1714
  "kind": "const",
1048
1715
  "value": [
1716
+ 6,
1717
+ 221,
1718
+ 246,
1719
+ 225,
1720
+ 215,
1049
1721
  101,
1050
- 115,
1051
- 99,
1052
- 114,
1053
- 111,
1054
- 119
1722
+ 161,
1723
+ 147,
1724
+ 217,
1725
+ 203,
1726
+ 225,
1727
+ 70,
1728
+ 206,
1729
+ 235,
1730
+ 121,
1731
+ 172,
1732
+ 28,
1733
+ 180,
1734
+ 133,
1735
+ 237,
1736
+ 95,
1737
+ 91,
1738
+ 55,
1739
+ 145,
1740
+ 58,
1741
+ 140,
1742
+ 245,
1743
+ 133,
1744
+ 126,
1745
+ 255,
1746
+ 0,
1747
+ 169
1055
1748
  ]
1749
+ },
1750
+ {
1751
+ "kind": "account",
1752
+ "path": "mint"
1056
1753
  }
1057
- ]
1754
+ ],
1755
+ "program": {
1756
+ "kind": "const",
1757
+ "value": [
1758
+ 140,
1759
+ 151,
1760
+ 37,
1761
+ 143,
1762
+ 78,
1763
+ 36,
1764
+ 137,
1765
+ 241,
1766
+ 187,
1767
+ 61,
1768
+ 16,
1769
+ 41,
1770
+ 20,
1771
+ 142,
1772
+ 13,
1773
+ 131,
1774
+ 11,
1775
+ 90,
1776
+ 19,
1777
+ 153,
1778
+ 218,
1779
+ 255,
1780
+ 16,
1781
+ 132,
1782
+ 4,
1783
+ 142,
1784
+ 123,
1785
+ 216,
1786
+ 219,
1787
+ 233,
1788
+ 248,
1789
+ 89
1790
+ ]
1791
+ }
1058
1792
  }
1059
1793
  },
1060
- {
1061
- "name": "recipient",
1062
- "writable": true
1063
- },
1064
1794
  {
1065
1795
  "name": "admin",
1066
1796
  "writable": true,
1067
1797
  "signer": true
1068
1798
  },
1799
+ {
1800
+ "name": "token_program",
1801
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1802
+ },
1069
1803
  {
1070
1804
  "name": "system_program",
1071
1805
  "address": "11111111111111111111111111111111"
1806
+ },
1807
+ {
1808
+ "name": "instructions",
1809
+ "address": "Sysvar1nstructions1111111111111111111111111"
1072
1810
  }
1073
1811
  ],
1074
1812
  "args": [
1813
+ {
1814
+ "name": "chain_id",
1815
+ "type": "u64"
1816
+ },
1817
+ {
1818
+ "name": "request_id",
1819
+ "type": "u64"
1820
+ },
1075
1821
  {
1076
1822
  "name": "amount",
1077
1823
  "type": "u64"
@@ -4321,7 +5067,153 @@
4321
5067
  110,
4322
5068
  102,
4323
5069
  105,
4324
- 103
5070
+ 103
5071
+ ]
5072
+ }
5073
+ ]
5074
+ }
5075
+ },
5076
+ {
5077
+ "name": "admin",
5078
+ "writable": true,
5079
+ "signer": true
5080
+ }
5081
+ ],
5082
+ "args": [
5083
+ {
5084
+ "name": "pubkey",
5085
+ "type": "pubkey"
5086
+ }
5087
+ ]
5088
+ },
5089
+ {
5090
+ "name": "remove_treasury_receiver",
5091
+ "docs": [
5092
+ "Revokes a receiver's admin-withdrawal whitelist entry (mirrors EVM revokeRole TREASURY_RECEIVER_ROLE)."
5093
+ ],
5094
+ "discriminator": [
5095
+ 94,
5096
+ 45,
5097
+ 107,
5098
+ 230,
5099
+ 200,
5100
+ 85,
5101
+ 152,
5102
+ 15
5103
+ ],
5104
+ "accounts": [
5105
+ {
5106
+ "name": "escrow_config",
5107
+ "pda": {
5108
+ "seeds": [
5109
+ {
5110
+ "kind": "const",
5111
+ "value": [
5112
+ 101,
5113
+ 115,
5114
+ 99,
5115
+ 114,
5116
+ 111,
5117
+ 119,
5118
+ 45,
5119
+ 99,
5120
+ 111,
5121
+ 110,
5122
+ 102,
5123
+ 105,
5124
+ 103,
5125
+ 45,
5126
+ 118,
5127
+ 50
5128
+ ]
5129
+ }
5130
+ ]
5131
+ }
5132
+ },
5133
+ {
5134
+ "name": "treasury_receiver",
5135
+ "writable": true,
5136
+ "pda": {
5137
+ "seeds": [
5138
+ {
5139
+ "kind": "const",
5140
+ "value": [
5141
+ 116,
5142
+ 114,
5143
+ 101,
5144
+ 97,
5145
+ 115,
5146
+ 117,
5147
+ 114,
5148
+ 121,
5149
+ 45,
5150
+ 114,
5151
+ 101,
5152
+ 99,
5153
+ 101,
5154
+ 105,
5155
+ 118,
5156
+ 101,
5157
+ 114
5158
+ ]
5159
+ },
5160
+ {
5161
+ "kind": "arg",
5162
+ "path": "receiver"
5163
+ }
5164
+ ]
5165
+ }
5166
+ },
5167
+ {
5168
+ "name": "admin",
5169
+ "writable": true,
5170
+ "signer": true
5171
+ }
5172
+ ],
5173
+ "args": [
5174
+ {
5175
+ "name": "receiver",
5176
+ "type": "pubkey"
5177
+ }
5178
+ ]
5179
+ },
5180
+ {
5181
+ "name": "set_admin",
5182
+ "discriminator": [
5183
+ 251,
5184
+ 163,
5185
+ 0,
5186
+ 52,
5187
+ 91,
5188
+ 194,
5189
+ 187,
5190
+ 92
5191
+ ],
5192
+ "accounts": [
5193
+ {
5194
+ "name": "escrow_config",
5195
+ "writable": true,
5196
+ "pda": {
5197
+ "seeds": [
5198
+ {
5199
+ "kind": "const",
5200
+ "value": [
5201
+ 101,
5202
+ 115,
5203
+ 99,
5204
+ 114,
5205
+ 111,
5206
+ 119,
5207
+ 45,
5208
+ 99,
5209
+ 111,
5210
+ 110,
5211
+ 102,
5212
+ 105,
5213
+ 103,
5214
+ 45,
5215
+ 118,
5216
+ 50
4325
5217
  ]
4326
5218
  }
4327
5219
  ]
@@ -4329,33 +5221,35 @@
4329
5221
  },
4330
5222
  {
4331
5223
  "name": "admin",
4332
- "writable": true,
4333
5224
  "signer": true
4334
5225
  }
4335
5226
  ],
4336
5227
  "args": [
4337
5228
  {
4338
- "name": "pubkey",
5229
+ "name": "new_admin",
4339
5230
  "type": "pubkey"
4340
5231
  }
4341
5232
  ]
4342
5233
  },
4343
5234
  {
4344
- "name": "set_admin",
5235
+ "name": "set_admin_withdraw_threshold",
5236
+ "docs": [
5237
+ "Sets the single, global admin-withdrawal execution threshold (mirrors EVM's",
5238
+ "setAdminTokenMultisigThreshold). DEFAULT_ADMIN-only."
5239
+ ],
4345
5240
  "discriminator": [
4346
- 251,
4347
- 163,
4348
- 0,
4349
- 52,
4350
- 91,
4351
- 194,
4352
- 187,
4353
- 92
5241
+ 125,
5242
+ 10,
5243
+ 239,
5244
+ 123,
5245
+ 136,
5246
+ 236,
5247
+ 104,
5248
+ 144
4354
5249
  ],
4355
5250
  "accounts": [
4356
5251
  {
4357
5252
  "name": "escrow_config",
4358
- "writable": true,
4359
5253
  "pda": {
4360
5254
  "seeds": [
4361
5255
  {
@@ -4382,15 +5276,58 @@
4382
5276
  ]
4383
5277
  }
4384
5278
  },
5279
+ {
5280
+ "name": "admin_withdraw_config",
5281
+ "writable": true,
5282
+ "pda": {
5283
+ "seeds": [
5284
+ {
5285
+ "kind": "const",
5286
+ "value": [
5287
+ 97,
5288
+ 100,
5289
+ 109,
5290
+ 105,
5291
+ 110,
5292
+ 45,
5293
+ 119,
5294
+ 105,
5295
+ 116,
5296
+ 104,
5297
+ 100,
5298
+ 114,
5299
+ 97,
5300
+ 119,
5301
+ 45,
5302
+ 99,
5303
+ 111,
5304
+ 110,
5305
+ 102,
5306
+ 105,
5307
+ 103
5308
+ ]
5309
+ }
5310
+ ]
5311
+ }
5312
+ },
4385
5313
  {
4386
5314
  "name": "admin",
5315
+ "writable": true,
4387
5316
  "signer": true
5317
+ },
5318
+ {
5319
+ "name": "system_program",
5320
+ "address": "11111111111111111111111111111111"
4388
5321
  }
4389
5322
  ],
4390
5323
  "args": [
4391
5324
  {
4392
- "name": "new_admin",
4393
- "type": "pubkey"
5325
+ "name": "manager_required",
5326
+ "type": "u8"
5327
+ },
5328
+ {
5329
+ "name": "executive_required",
5330
+ "type": "u8"
4394
5331
  }
4395
5332
  ]
4396
5333
  },
@@ -6121,6 +7058,32 @@
6121
7058
  }
6122
7059
  ],
6123
7060
  "accounts": [
7061
+ {
7062
+ "name": "AdminWithdrawConfig",
7063
+ "discriminator": [
7064
+ 213,
7065
+ 66,
7066
+ 12,
7067
+ 39,
7068
+ 88,
7069
+ 172,
7070
+ 14,
7071
+ 255
7072
+ ]
7073
+ },
7074
+ {
7075
+ "name": "AdminWithdrawalUsed",
7076
+ "discriminator": [
7077
+ 195,
7078
+ 177,
7079
+ 31,
7080
+ 159,
7081
+ 77,
7082
+ 197,
7083
+ 190,
7084
+ 217
7085
+ ]
7086
+ },
6124
7087
  {
6125
7088
  "name": "EscrowConfig",
6126
7089
  "discriminator": [
@@ -6238,6 +7201,19 @@
6238
7201
  41
6239
7202
  ]
6240
7203
  },
7204
+ {
7205
+ "name": "TreasuryReceiver",
7206
+ "discriminator": [
7207
+ 160,
7208
+ 74,
7209
+ 145,
7210
+ 140,
7211
+ 88,
7212
+ 105,
7213
+ 185,
7214
+ 168
7215
+ ]
7216
+ },
6241
7217
  {
6242
7218
  "name": "WithdrawNonce",
6243
7219
  "discriminator": [
@@ -6279,6 +7255,19 @@
6279
7255
  26
6280
7256
  ]
6281
7257
  },
7258
+ {
7259
+ "name": "AdminPullWithdrawEvent",
7260
+ "discriminator": [
7261
+ 76,
7262
+ 105,
7263
+ 32,
7264
+ 75,
7265
+ 3,
7266
+ 121,
7267
+ 252,
7268
+ 169
7269
+ ]
7270
+ },
6282
7271
  {
6283
7272
  "name": "AdminWithdraw",
6284
7273
  "discriminator": [
@@ -6292,6 +7281,19 @@
6292
7281
  171
6293
7282
  ]
6294
7283
  },
7284
+ {
7285
+ "name": "AdminWithdrawThresholdConfiguredEvent",
7286
+ "discriminator": [
7287
+ 192,
7288
+ 107,
7289
+ 62,
7290
+ 233,
7291
+ 204,
7292
+ 248,
7293
+ 176,
7294
+ 209
7295
+ ]
7296
+ },
6295
7297
  {
6296
7298
  "name": "DepositSolEvent",
6297
7299
  "discriminator": [
@@ -6684,6 +7686,16 @@
6684
7686
  "code": 6033,
6685
7687
  "name": "InvalidGovernanceGroup",
6686
7688
  "msg": "Unknown governance group"
7689
+ },
7690
+ {
7691
+ "code": 6034,
7692
+ "name": "AdminWithdrawConfigNotSet",
7693
+ "msg": "Admin withdrawal threshold is not configured"
7694
+ },
7695
+ {
7696
+ "code": 6035,
7697
+ "name": "ReceiverNotWhitelisted",
7698
+ "msg": "Receiver is not whitelisted for admin withdrawals"
6687
7699
  }
6688
7700
  ],
6689
7701
  "types": [
@@ -6723,6 +7735,52 @@
6723
7735
  ]
6724
7736
  }
6725
7737
  },
7738
+ {
7739
+ "name": "AdminPullWithdrawEvent",
7740
+ "docs": [
7741
+ "Emitted by `admin_withdraw_sol_v2`/`admin_withdraw_spl_v2`. Distinct from the legacy",
7742
+ "`AdminWithdraw` event (emitted by the untouched `admin_withdraw_sol`/`admin_withdraw_spl`) so",
7743
+ "downstream consumers can tell the two paths apart. Carries `request_id` so a future event",
7744
+ "listener/worker can match by identity rather than guessing from tx logs."
7745
+ ],
7746
+ "type": {
7747
+ "kind": "struct",
7748
+ "fields": [
7749
+ {
7750
+ "name": "chain_id",
7751
+ "type": "u64"
7752
+ },
7753
+ {
7754
+ "name": "request_id",
7755
+ "type": "u64"
7756
+ },
7757
+ {
7758
+ "name": "recipient",
7759
+ "type": "pubkey"
7760
+ },
7761
+ {
7762
+ "name": "token",
7763
+ "type": "pubkey"
7764
+ },
7765
+ {
7766
+ "name": "amount",
7767
+ "type": "u64"
7768
+ },
7769
+ {
7770
+ "name": "admin",
7771
+ "type": "pubkey"
7772
+ },
7773
+ {
7774
+ "name": "slot",
7775
+ "type": "u64"
7776
+ },
7777
+ {
7778
+ "name": "timestamp",
7779
+ "type": "i64"
7780
+ }
7781
+ ]
7782
+ }
7783
+ },
6726
7784
  {
6727
7785
  "name": "AdminWithdraw",
6728
7786
  "type": {
@@ -6755,6 +7813,94 @@
6755
7813
  ]
6756
7814
  }
6757
7815
  },
7816
+ {
7817
+ "name": "AdminWithdrawConfig",
7818
+ "docs": [
7819
+ "Single, global (not per-token) execution threshold for the interim pull-based admin withdrawal",
7820
+ "(mirrors EVM's `adminTokenThresholdSettings` — one fixed level, no amount bands). Signatures are",
7821
+ "verified against the existing `TreasuryConfig` roster (the same managers/executives who approve",
7822
+ "regular withdrawals) rather than a separate admin-only roster — see the plan doc for why this is",
7823
+ "a deliberate scope simplification vs EVM's distinct ADMIN_TREASURY_MANAGER/EXECUTIVE roles.",
7824
+ "",
7825
+ "PDA seeds: `[b\"admin-withdraw-config\"]`."
7826
+ ],
7827
+ "type": {
7828
+ "kind": "struct",
7829
+ "fields": [
7830
+ {
7831
+ "name": "manager_required",
7832
+ "type": "u8"
7833
+ },
7834
+ {
7835
+ "name": "executive_required",
7836
+ "type": "u8"
7837
+ },
7838
+ {
7839
+ "name": "is_set",
7840
+ "type": "bool"
7841
+ }
7842
+ ]
7843
+ }
7844
+ },
7845
+ {
7846
+ "name": "AdminWithdrawThresholdConfiguredEvent",
7847
+ "docs": [
7848
+ "Emitted when the admin-withdrawal execution threshold is set (mirrors EVM",
7849
+ "ConfigureAdminMultisig, but this is Solana-only global state — see AdminWithdrawConfig)."
7850
+ ],
7851
+ "type": {
7852
+ "kind": "struct",
7853
+ "fields": [
7854
+ {
7855
+ "name": "manager_required",
7856
+ "type": "u8"
7857
+ },
7858
+ {
7859
+ "name": "executive_required",
7860
+ "type": "u8"
7861
+ },
7862
+ {
7863
+ "name": "sender",
7864
+ "type": "pubkey"
7865
+ },
7866
+ {
7867
+ "name": "slot",
7868
+ "type": "u64"
7869
+ },
7870
+ {
7871
+ "name": "timestamp",
7872
+ "type": "i64"
7873
+ }
7874
+ ]
7875
+ }
7876
+ },
7877
+ {
7878
+ "name": "AdminWithdrawalUsed",
7879
+ "docs": [
7880
+ "Anti-replay marker for the interim pull-based admin withdrawal",
7881
+ "(`admin_withdraw_sol_v2`/`admin_withdraw_spl_v2`). One PDA per `request_id`, created via `init`",
7882
+ "(which fails automatically if the account already exists) and never closed — the withdrawal is",
7883
+ "a direct, single-shot transfer with no schedule/claim step, so unlike `WithdrawalCommitment`",
7884
+ "there is nothing to clean up on completion. Admin withdrawals are low-volume (occasional treasury",
7885
+ "management, not a user-facing high-throughput path), so a dedicated account per request is",
7886
+ "simpler and clearer here than the `WithdrawalBitmap` scheme used for regular withdrawals.",
7887
+ "",
7888
+ "PDA seeds: `[b\"admin-withdrawal-used\", request_id.to_le_bytes()]`."
7889
+ ],
7890
+ "type": {
7891
+ "kind": "struct",
7892
+ "fields": [
7893
+ {
7894
+ "name": "request_id",
7895
+ "type": "u64"
7896
+ },
7897
+ {
7898
+ "name": "timestamp",
7899
+ "type": "i64"
7900
+ }
7901
+ ]
7902
+ }
7903
+ },
6758
7904
  {
6759
7905
  "name": "DepositSolEvent",
6760
7906
  "type": {
@@ -7156,6 +8302,9 @@
7156
8302
  },
7157
8303
  {
7158
8304
  "name": "TimelockExecutive"
8305
+ },
8306
+ {
8307
+ "name": "TreasuryReceiver"
7159
8308
  }
7160
8309
  ]
7161
8310
  }
@@ -7516,6 +8665,31 @@
7516
8665
  ]
7517
8666
  }
7518
8667
  },
8668
+ {
8669
+ "name": "TreasuryReceiver",
8670
+ "docs": [
8671
+ "Whitelist entry for a single admin-withdrawal receiver (mirrors EVM's TREASURY_RECEIVER_ROLE).",
8672
+ "Existence with `is_whitelisted = true` means `admin_withdraw_sol_v2`/`admin_withdraw_spl_v2`",
8673
+ "may pay out to this address; anything else (account missing, since `remove_treasury_receiver`",
8674
+ "closes it rather than flipping a flag) is rejected.",
8675
+ "",
8676
+ "A dedicated PDA per receiver rather than a roster `Vec` (like `TreasuryConfig`'s managers/",
8677
+ "executives) — this whitelist can grow much larger than the manager/executive rosters and is",
8678
+ "checked per-withdrawal, so an O(1) PDA lookup keyed by the receiver's own address is a better",
8679
+ "fit than deserializing and scanning a list on every withdrawal.",
8680
+ "",
8681
+ "PDA seeds: `[b\"treasury-receiver\", receiver]`."
8682
+ ],
8683
+ "type": {
8684
+ "kind": "struct",
8685
+ "fields": [
8686
+ {
8687
+ "name": "is_whitelisted",
8688
+ "type": "bool"
8689
+ }
8690
+ ]
8691
+ }
8692
+ },
7519
8693
  {
7520
8694
  "name": "WithdrawNonce",
7521
8695
  "type": {