@streamflow/distributor 11.4.0 → 12.1.0

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.
@@ -2,7 +2,7 @@
2
2
  "address": "MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N",
3
3
  "metadata": {
4
4
  "name": "merkle_distributor",
5
- "version": "2.0.0",
5
+ "version": "1.9.0",
6
6
  "spec": "0.1.0",
7
7
  "description": "A Solana program for distributing tokens according to a Merkle root.",
8
8
  "repository": "https://github.com/streamflow-finance/distributor"
@@ -572,6 +572,67 @@
572
572
  82,
573
573
  27
574
574
  ],
575
+ "accounts": [
576
+ {
577
+ "name": "distributor",
578
+ "docs": [
579
+ "The [MerkleDistributor]."
580
+ ],
581
+ "writable": true
582
+ },
583
+ {
584
+ "name": "from",
585
+ "docs": [
586
+ "Distributor ATA containing the tokens to distribute."
587
+ ],
588
+ "writable": true
589
+ },
590
+ {
591
+ "name": "to",
592
+ "docs": [
593
+ "The Clawback token account."
594
+ ],
595
+ "writable": true
596
+ },
597
+ {
598
+ "name": "authority",
599
+ "docs": [
600
+ "Signer that authorizes the clawback execution."
601
+ ],
602
+ "writable": true,
603
+ "signer": true
604
+ },
605
+ {
606
+ "name": "mint"
607
+ },
608
+ {
609
+ "name": "system_program",
610
+ "docs": [
611
+ "The [System] program."
612
+ ],
613
+ "address": "11111111111111111111111111111111"
614
+ },
615
+ {
616
+ "name": "token_program",
617
+ "docs": [
618
+ "SPL [Token] program."
619
+ ]
620
+ }
621
+ ],
622
+ "args": []
623
+ },
624
+ {
625
+ "name": "clawback_v2",
626
+ "discriminator": [
627
+ 21,
628
+ 210,
629
+ 60,
630
+ 179,
631
+ 193,
632
+ 134,
633
+ 82,
634
+ 155
635
+ ],
575
636
  "accounts": [
576
637
  {
577
638
  "name": "distributor",
@@ -597,7 +658,14 @@
597
658
  {
598
659
  "name": "admin",
599
660
  "docs": [
600
- "Only Admin can trigger the clawback of funds"
661
+ "even when the caller is `CANCEL_AUTHORITY`."
662
+ ],
663
+ "writable": true
664
+ },
665
+ {
666
+ "name": "authority",
667
+ "docs": [
668
+ "Signer that authorizes the clawback execution."
601
669
  ],
602
670
  "writable": true,
603
671
  "signer": true
@@ -605,6 +673,32 @@
605
673
  {
606
674
  "name": "mint"
607
675
  },
676
+ {
677
+ "name": "auto_claim_state",
678
+ "writable": true,
679
+ "pda": {
680
+ "seeds": [
681
+ {
682
+ "kind": "const",
683
+ "value": [
684
+ 65,
685
+ 117,
686
+ 116,
687
+ 111,
688
+ 67,
689
+ 108,
690
+ 97,
691
+ 105,
692
+ 109
693
+ ]
694
+ },
695
+ {
696
+ "kind": "account",
697
+ "path": "distributor"
698
+ }
699
+ ]
700
+ }
701
+ },
608
702
  {
609
703
  "name": "system_program",
610
704
  "docs": [
@@ -1040,96 +1134,71 @@
1040
1134
  ]
1041
1135
  },
1042
1136
  {
1043
- "name": "new_distributor",
1044
- "docs": [
1045
- "READ THE FOLLOWING:",
1046
- "",
1047
- "This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.",
1048
- "",
1049
- "An attack could look like:",
1050
- "- A legitimate user opens a new distributor.",
1051
- "- Someone observes the call to this instruction.",
1052
- "- They replace the clawback_receiver, admin, or time parameters with their own.",
1053
- "",
1054
- "One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own",
1055
- "and sets the clawback_start_ts with the minimal time allowed. After clawback_start_ts has elapsed,",
1056
- "the attacker can steal all funds from the distributor to their own clawback_receiver account.",
1057
- "",
1058
- "HOW TO AVOID:",
1059
- "- When you call into this instruction, ensure your transaction succeeds.",
1060
- "- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and",
1061
- "assert the parameters are what you expect, most importantly the clawback_receiver and admin.",
1062
- "- If your transaction fails, double check the value on-chain matches what you expect."
1063
- ],
1137
+ "name": "new_claim_by_worker",
1064
1138
  "discriminator": [
1065
- 32,
1066
- 139,
1067
- 112,
1068
- 171,
1069
- 0,
1070
- 2,
1071
- 225,
1072
- 155
1139
+ 181,
1140
+ 133,
1141
+ 223,
1142
+ 117,
1143
+ 188,
1144
+ 131,
1145
+ 243,
1146
+ 158
1073
1147
  ],
1074
1148
  "accounts": [
1075
1149
  {
1076
1150
  "name": "distributor",
1077
1151
  "docs": [
1078
- "[MerkleDistributor]."
1152
+ "The [MerkleDistributor]."
1153
+ ],
1154
+ "writable": true,
1155
+ "relations": [
1156
+ "auto_claim_state"
1157
+ ]
1158
+ },
1159
+ {
1160
+ "name": "auto_claim_state",
1161
+ "docs": [
1162
+ "Auto-claim SOL reserve for the distributor."
1079
1163
  ],
1164
+ "writable": true
1165
+ },
1166
+ {
1167
+ "name": "claim_status",
1080
1168
  "writable": true,
1081
1169
  "pda": {
1082
1170
  "seeds": [
1083
1171
  {
1084
1172
  "kind": "const",
1085
1173
  "value": [
1086
- 77,
1087
- 101,
1088
- 114,
1089
- 107,
1174
+ 67,
1090
1175
  108,
1091
- 101,
1092
- 68,
1176
+ 97,
1093
1177
  105,
1094
- 115,
1178
+ 109,
1179
+ 83,
1095
1180
  116,
1096
- 114,
1097
- 105,
1098
- 98,
1099
- 117,
1181
+ 97,
1100
1182
  116,
1101
- 111,
1102
- 114
1183
+ 117,
1184
+ 115
1103
1185
  ]
1104
1186
  },
1105
1187
  {
1106
1188
  "kind": "account",
1107
- "path": "mint"
1189
+ "path": "claimant"
1108
1190
  },
1109
1191
  {
1110
- "kind": "arg",
1111
- "path": "version"
1192
+ "kind": "account",
1193
+ "path": "distributor"
1112
1194
  }
1113
1195
  ]
1114
1196
  }
1115
1197
  },
1116
1198
  {
1117
- "name": "clawback_receiver",
1118
- "docs": [
1119
- "Clawback receiver token account"
1120
- ],
1121
- "writable": true
1122
- },
1123
- {
1124
- "name": "mint",
1125
- "docs": [
1126
- "The mint to distribute."
1127
- ]
1128
- },
1129
- {
1130
- "name": "token_vault",
1199
+ "name": "from",
1131
1200
  "docs": [
1132
- "Token vault"
1201
+ "Distributor ATA containing the tokens to distribute."
1133
1202
  ],
1134
1203
  "writable": true,
1135
1204
  "pda": {
@@ -1144,7 +1213,8 @@
1144
1213
  },
1145
1214
  {
1146
1215
  "kind": "account",
1147
- "path": "mint"
1216
+ "path": "distributor.mint",
1217
+ "account": "MerkleDistributor"
1148
1218
  }
1149
1219
  ],
1150
1220
  "program": {
@@ -1186,21 +1256,33 @@
1186
1256
  }
1187
1257
  }
1188
1258
  },
1259
+ {
1260
+ "name": "to",
1261
+ "writable": true
1262
+ },
1263
+ {
1264
+ "name": "claimant"
1265
+ },
1189
1266
  {
1190
1267
  "name": "admin",
1268
+ "writable": true
1269
+ },
1270
+ {
1271
+ "name": "worker",
1191
1272
  "docs": [
1192
- "Admin wallet, responsible for creating the distributor and paying for the transaction.",
1193
- "Also has the authority to set the clawback receiver and change itself."
1273
+ "Worker account, anyone can execute the instruction since distribution is validated by the protocol"
1194
1274
  ],
1195
1275
  "writable": true,
1196
1276
  "signer": true
1197
1277
  },
1198
1278
  {
1199
- "name": "system_program",
1279
+ "name": "mint",
1200
1280
  "docs": [
1201
- "The [System] program."
1281
+ "The mint to claim."
1202
1282
  ],
1203
- "address": "11111111111111111111111111111111"
1283
+ "relations": [
1284
+ "distributor"
1285
+ ]
1204
1286
  },
1205
1287
  {
1206
1288
  "name": "associated_token_program",
@@ -1212,53 +1294,618 @@
1212
1294
  {
1213
1295
  "name": "token_program",
1214
1296
  "docs": [
1215
- "The [Token] program."
1297
+ "SPL [Token] program."
1216
1298
  ]
1217
1299
  },
1218
1300
  {
1219
- "name": "partner_oracle_config",
1301
+ "name": "system_program",
1302
+ "docs": [
1303
+ "The [System] program."
1304
+ ],
1305
+ "address": "11111111111111111111111111111111"
1306
+ },
1307
+ {
1308
+ "name": "event_authority",
1220
1309
  "pda": {
1221
1310
  "seeds": [
1222
1311
  {
1223
1312
  "kind": "const",
1224
1313
  "value": [
1225
- 97,
1226
- 105,
1227
- 114,
1228
- 100,
1229
- 114,
1230
- 111,
1231
- 112,
1232
1314
  95,
1233
- 99,
1234
- 111,
1315
+ 95,
1316
+ 101,
1317
+ 118,
1318
+ 101,
1235
1319
  110,
1236
- 102,
1320
+ 116,
1321
+ 95,
1322
+ 97,
1323
+ 117,
1324
+ 116,
1325
+ 104,
1326
+ 111,
1327
+ 114,
1237
1328
  105,
1238
- 103
1329
+ 116,
1330
+ 121
1239
1331
  ]
1240
1332
  }
1241
- ],
1242
- "program": {
1243
- "kind": "const",
1244
- "value": [
1245
- 12,
1246
- 48,
1247
- 148,
1248
- 48,
1249
- 221,
1250
- 89,
1251
- 2,
1252
- 209,
1253
- 180,
1254
- 126,
1255
- 151,
1256
- 216,
1257
- 166,
1258
- 3,
1259
- 112,
1260
- 50,
1261
- 177,
1333
+ ]
1334
+ }
1335
+ },
1336
+ {
1337
+ "name": "program"
1338
+ }
1339
+ ],
1340
+ "args": [
1341
+ {
1342
+ "name": "amount_unlocked",
1343
+ "type": "u64"
1344
+ },
1345
+ {
1346
+ "name": "amount_locked",
1347
+ "type": "u64"
1348
+ },
1349
+ {
1350
+ "name": "proof",
1351
+ "type": {
1352
+ "vec": {
1353
+ "array": [
1354
+ "u8",
1355
+ 32
1356
+ ]
1357
+ }
1358
+ }
1359
+ }
1360
+ ]
1361
+ },
1362
+ {
1363
+ "name": "new_distributor",
1364
+ "docs": [
1365
+ "READ THE FOLLOWING:",
1366
+ "",
1367
+ "This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly.",
1368
+ "",
1369
+ "An attack could look like:",
1370
+ "- A legitimate user opens a new distributor.",
1371
+ "- Someone observes the call to this instruction.",
1372
+ "- They replace the clawback_receiver, admin, or time parameters with their own.",
1373
+ "",
1374
+ "One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own",
1375
+ "and sets the clawback_start_ts with the minimal time allowed. After clawback_start_ts has elapsed,",
1376
+ "the attacker can steal all funds from the distributor to their own clawback_receiver account.",
1377
+ "",
1378
+ "HOW TO AVOID:",
1379
+ "- When you call into this instruction, ensure your transaction succeeds.",
1380
+ "- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and",
1381
+ "assert the parameters are what you expect, most importantly the clawback_receiver and admin.",
1382
+ "- If your transaction fails, double check the value on-chain matches what you expect."
1383
+ ],
1384
+ "discriminator": [
1385
+ 32,
1386
+ 139,
1387
+ 112,
1388
+ 171,
1389
+ 0,
1390
+ 2,
1391
+ 225,
1392
+ 155
1393
+ ],
1394
+ "accounts": [
1395
+ {
1396
+ "name": "distributor",
1397
+ "docs": [
1398
+ "[MerkleDistributor]."
1399
+ ],
1400
+ "writable": true,
1401
+ "pda": {
1402
+ "seeds": [
1403
+ {
1404
+ "kind": "const",
1405
+ "value": [
1406
+ 77,
1407
+ 101,
1408
+ 114,
1409
+ 107,
1410
+ 108,
1411
+ 101,
1412
+ 68,
1413
+ 105,
1414
+ 115,
1415
+ 116,
1416
+ 114,
1417
+ 105,
1418
+ 98,
1419
+ 117,
1420
+ 116,
1421
+ 111,
1422
+ 114
1423
+ ]
1424
+ },
1425
+ {
1426
+ "kind": "account",
1427
+ "path": "mint"
1428
+ },
1429
+ {
1430
+ "kind": "arg",
1431
+ "path": "version"
1432
+ }
1433
+ ]
1434
+ }
1435
+ },
1436
+ {
1437
+ "name": "clawback_receiver",
1438
+ "docs": [
1439
+ "Clawback receiver token account"
1440
+ ],
1441
+ "writable": true
1442
+ },
1443
+ {
1444
+ "name": "mint",
1445
+ "docs": [
1446
+ "The mint to distribute."
1447
+ ]
1448
+ },
1449
+ {
1450
+ "name": "token_vault",
1451
+ "docs": [
1452
+ "Token vault"
1453
+ ],
1454
+ "writable": true,
1455
+ "pda": {
1456
+ "seeds": [
1457
+ {
1458
+ "kind": "account",
1459
+ "path": "distributor"
1460
+ },
1461
+ {
1462
+ "kind": "account",
1463
+ "path": "token_program"
1464
+ },
1465
+ {
1466
+ "kind": "account",
1467
+ "path": "mint"
1468
+ }
1469
+ ],
1470
+ "program": {
1471
+ "kind": "const",
1472
+ "value": [
1473
+ 140,
1474
+ 151,
1475
+ 37,
1476
+ 143,
1477
+ 78,
1478
+ 36,
1479
+ 137,
1480
+ 241,
1481
+ 187,
1482
+ 61,
1483
+ 16,
1484
+ 41,
1485
+ 20,
1486
+ 142,
1487
+ 13,
1488
+ 131,
1489
+ 11,
1490
+ 90,
1491
+ 19,
1492
+ 153,
1493
+ 218,
1494
+ 255,
1495
+ 16,
1496
+ 132,
1497
+ 4,
1498
+ 142,
1499
+ 123,
1500
+ 216,
1501
+ 219,
1502
+ 233,
1503
+ 248,
1504
+ 89
1505
+ ]
1506
+ }
1507
+ }
1508
+ },
1509
+ {
1510
+ "name": "admin",
1511
+ "docs": [
1512
+ "Admin wallet, responsible for creating the distributor and paying for the transaction.",
1513
+ "Also has the authority to set the clawback receiver and change itself."
1514
+ ],
1515
+ "writable": true,
1516
+ "signer": true
1517
+ },
1518
+ {
1519
+ "name": "system_program",
1520
+ "docs": [
1521
+ "The [System] program."
1522
+ ],
1523
+ "address": "11111111111111111111111111111111"
1524
+ },
1525
+ {
1526
+ "name": "associated_token_program",
1527
+ "docs": [
1528
+ "The [Associated Token] program."
1529
+ ],
1530
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1531
+ },
1532
+ {
1533
+ "name": "token_program",
1534
+ "docs": [
1535
+ "The [Token] program."
1536
+ ]
1537
+ },
1538
+ {
1539
+ "name": "partner_oracle_config",
1540
+ "pda": {
1541
+ "seeds": [
1542
+ {
1543
+ "kind": "const",
1544
+ "value": [
1545
+ 97,
1546
+ 105,
1547
+ 114,
1548
+ 100,
1549
+ 114,
1550
+ 111,
1551
+ 112,
1552
+ 95,
1553
+ 99,
1554
+ 111,
1555
+ 110,
1556
+ 102,
1557
+ 105,
1558
+ 103
1559
+ ]
1560
+ }
1561
+ ],
1562
+ "program": {
1563
+ "kind": "const",
1564
+ "value": [
1565
+ 12,
1566
+ 48,
1567
+ 148,
1568
+ 48,
1569
+ 221,
1570
+ 89,
1571
+ 2,
1572
+ 209,
1573
+ 180,
1574
+ 126,
1575
+ 151,
1576
+ 216,
1577
+ 166,
1578
+ 3,
1579
+ 112,
1580
+ 50,
1581
+ 177,
1582
+ 192,
1583
+ 141,
1584
+ 218,
1585
+ 37,
1586
+ 78,
1587
+ 51,
1588
+ 109,
1589
+ 243,
1590
+ 106,
1591
+ 174,
1592
+ 122,
1593
+ 93,
1594
+ 121,
1595
+ 191,
1596
+ 119
1597
+ ]
1598
+ }
1599
+ }
1600
+ },
1601
+ {
1602
+ "name": "partner_oracle",
1603
+ "docs": [
1604
+ "Partner Oracle program that stores fees"
1605
+ ],
1606
+ "address": "pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa"
1607
+ }
1608
+ ],
1609
+ "args": [
1610
+ {
1611
+ "name": "version",
1612
+ "type": "u64"
1613
+ },
1614
+ {
1615
+ "name": "root",
1616
+ "type": {
1617
+ "array": [
1618
+ "u8",
1619
+ 32
1620
+ ]
1621
+ }
1622
+ },
1623
+ {
1624
+ "name": "max_total_claim",
1625
+ "type": "u64"
1626
+ },
1627
+ {
1628
+ "name": "max_num_nodes",
1629
+ "type": "u64"
1630
+ },
1631
+ {
1632
+ "name": "unlock_period",
1633
+ "type": "u64"
1634
+ },
1635
+ {
1636
+ "name": "start_vesting_ts",
1637
+ "type": "u64"
1638
+ },
1639
+ {
1640
+ "name": "end_vesting_ts",
1641
+ "type": "u64"
1642
+ },
1643
+ {
1644
+ "name": "clawback_start_ts",
1645
+ "type": "u64"
1646
+ },
1647
+ {
1648
+ "name": "claims_closable_by_admin",
1649
+ "type": "bool"
1650
+ },
1651
+ {
1652
+ "name": "can_update_duration",
1653
+ "type": {
1654
+ "option": "bool"
1655
+ }
1656
+ },
1657
+ {
1658
+ "name": "total_amount_unlocked",
1659
+ "type": {
1660
+ "option": "u64"
1661
+ }
1662
+ },
1663
+ {
1664
+ "name": "total_amount_locked",
1665
+ "type": {
1666
+ "option": "u64"
1667
+ }
1668
+ },
1669
+ {
1670
+ "name": "claims_closable_by_claimant",
1671
+ "type": {
1672
+ "option": "bool"
1673
+ }
1674
+ },
1675
+ {
1676
+ "name": "claims_limit",
1677
+ "type": {
1678
+ "option": "u16"
1679
+ }
1680
+ }
1681
+ ]
1682
+ },
1683
+ {
1684
+ "name": "new_distributor_v2",
1685
+ "discriminator": [
1686
+ 45,
1687
+ 79,
1688
+ 3,
1689
+ 238,
1690
+ 185,
1691
+ 37,
1692
+ 253,
1693
+ 179
1694
+ ],
1695
+ "accounts": [
1696
+ {
1697
+ "name": "distributor",
1698
+ "docs": [
1699
+ "[MerkleDistributor]."
1700
+ ],
1701
+ "writable": true,
1702
+ "pda": {
1703
+ "seeds": [
1704
+ {
1705
+ "kind": "const",
1706
+ "value": [
1707
+ 77,
1708
+ 101,
1709
+ 114,
1710
+ 107,
1711
+ 108,
1712
+ 101,
1713
+ 68,
1714
+ 105,
1715
+ 115,
1716
+ 116,
1717
+ 114,
1718
+ 105,
1719
+ 98,
1720
+ 117,
1721
+ 116,
1722
+ 111,
1723
+ 114
1724
+ ]
1725
+ },
1726
+ {
1727
+ "kind": "account",
1728
+ "path": "mint"
1729
+ },
1730
+ {
1731
+ "kind": "arg",
1732
+ "path": "version"
1733
+ }
1734
+ ]
1735
+ }
1736
+ },
1737
+ {
1738
+ "name": "clawback_receiver",
1739
+ "docs": [
1740
+ "Clawback receiver token account"
1741
+ ],
1742
+ "writable": true
1743
+ },
1744
+ {
1745
+ "name": "mint",
1746
+ "docs": [
1747
+ "The mint to distribute."
1748
+ ]
1749
+ },
1750
+ {
1751
+ "name": "token_vault",
1752
+ "docs": [
1753
+ "Token vault"
1754
+ ],
1755
+ "writable": true,
1756
+ "pda": {
1757
+ "seeds": [
1758
+ {
1759
+ "kind": "account",
1760
+ "path": "distributor"
1761
+ },
1762
+ {
1763
+ "kind": "account",
1764
+ "path": "token_program"
1765
+ },
1766
+ {
1767
+ "kind": "account",
1768
+ "path": "mint"
1769
+ }
1770
+ ],
1771
+ "program": {
1772
+ "kind": "const",
1773
+ "value": [
1774
+ 140,
1775
+ 151,
1776
+ 37,
1777
+ 143,
1778
+ 78,
1779
+ 36,
1780
+ 137,
1781
+ 241,
1782
+ 187,
1783
+ 61,
1784
+ 16,
1785
+ 41,
1786
+ 20,
1787
+ 142,
1788
+ 13,
1789
+ 131,
1790
+ 11,
1791
+ 90,
1792
+ 19,
1793
+ 153,
1794
+ 218,
1795
+ 255,
1796
+ 16,
1797
+ 132,
1798
+ 4,
1799
+ 142,
1800
+ 123,
1801
+ 216,
1802
+ 219,
1803
+ 233,
1804
+ 248,
1805
+ 89
1806
+ ]
1807
+ }
1808
+ }
1809
+ },
1810
+ {
1811
+ "name": "admin",
1812
+ "docs": [
1813
+ "Admin wallet, responsible for creating the distributor and paying for the transaction.",
1814
+ "Also has the authority to set the clawback receiver and change itself."
1815
+ ],
1816
+ "writable": true,
1817
+ "signer": true
1818
+ },
1819
+ {
1820
+ "name": "auto_claim_state",
1821
+ "writable": true,
1822
+ "pda": {
1823
+ "seeds": [
1824
+ {
1825
+ "kind": "const",
1826
+ "value": [
1827
+ 65,
1828
+ 117,
1829
+ 116,
1830
+ 111,
1831
+ 67,
1832
+ 108,
1833
+ 97,
1834
+ 105,
1835
+ 109
1836
+ ]
1837
+ },
1838
+ {
1839
+ "kind": "account",
1840
+ "path": "distributor"
1841
+ }
1842
+ ]
1843
+ }
1844
+ },
1845
+ {
1846
+ "name": "system_program",
1847
+ "docs": [
1848
+ "The [System] program."
1849
+ ],
1850
+ "address": "11111111111111111111111111111111"
1851
+ },
1852
+ {
1853
+ "name": "associated_token_program",
1854
+ "docs": [
1855
+ "The [Associated Token] program."
1856
+ ],
1857
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1858
+ },
1859
+ {
1860
+ "name": "token_program",
1861
+ "docs": [
1862
+ "The [Token] program."
1863
+ ]
1864
+ },
1865
+ {
1866
+ "name": "partner_oracle_config",
1867
+ "pda": {
1868
+ "seeds": [
1869
+ {
1870
+ "kind": "const",
1871
+ "value": [
1872
+ 97,
1873
+ 105,
1874
+ 114,
1875
+ 100,
1876
+ 114,
1877
+ 111,
1878
+ 112,
1879
+ 95,
1880
+ 99,
1881
+ 111,
1882
+ 110,
1883
+ 102,
1884
+ 105,
1885
+ 103
1886
+ ]
1887
+ }
1888
+ ],
1889
+ "program": {
1890
+ "kind": "const",
1891
+ "value": [
1892
+ 12,
1893
+ 48,
1894
+ 148,
1895
+ 48,
1896
+ 221,
1897
+ 89,
1898
+ 2,
1899
+ 209,
1900
+ 180,
1901
+ 126,
1902
+ 151,
1903
+ 216,
1904
+ 166,
1905
+ 3,
1906
+ 112,
1907
+ 50,
1908
+ 177,
1262
1909
  192,
1263
1910
  141,
1264
1911
  218,
@@ -1304,6 +1951,14 @@
1304
1951
  "name": "max_total_claim",
1305
1952
  "type": "u64"
1306
1953
  },
1954
+ {
1955
+ "name": "total_amount_unlocked",
1956
+ "type": "u64"
1957
+ },
1958
+ {
1959
+ "name": "total_amount_locked",
1960
+ "type": "u64"
1961
+ },
1307
1962
  {
1308
1963
  "name": "max_num_nodes",
1309
1964
  "type": "u64"
@@ -1325,38 +1980,95 @@
1325
1980
  "type": "u64"
1326
1981
  },
1327
1982
  {
1328
- "name": "claims_closable_by_admin",
1983
+ "name": "claims_closable_by_admin",
1984
+ "type": "bool"
1985
+ },
1986
+ {
1987
+ "name": "claims_closable_by_claimant",
1988
+ "type": "bool"
1989
+ },
1990
+ {
1991
+ "name": "can_update_duration",
1992
+ "type": "bool"
1993
+ },
1994
+ {
1995
+ "name": "claims_limit",
1996
+ "type": "u16"
1997
+ },
1998
+ {
1999
+ "name": "auto_claim",
1329
2000
  "type": "bool"
1330
- },
2001
+ }
2002
+ ]
2003
+ },
2004
+ {
2005
+ "name": "realloc_distributor",
2006
+ "discriminator": [
2007
+ 167,
2008
+ 165,
2009
+ 22,
2010
+ 244,
2011
+ 248,
2012
+ 99,
2013
+ 33,
2014
+ 42
2015
+ ],
2016
+ "accounts": [
1331
2017
  {
1332
- "name": "can_update_duration",
1333
- "type": {
1334
- "option": "bool"
1335
- }
2018
+ "name": "payer",
2019
+ "writable": true,
2020
+ "signer": true
1336
2021
  },
1337
2022
  {
1338
- "name": "total_amount_unlocked",
1339
- "type": {
1340
- "option": "u64"
1341
- }
2023
+ "name": "mint"
1342
2024
  },
1343
2025
  {
1344
- "name": "total_amount_locked",
1345
- "type": {
1346
- "option": "u64"
2026
+ "name": "distributor",
2027
+ "writable": true,
2028
+ "pda": {
2029
+ "seeds": [
2030
+ {
2031
+ "kind": "const",
2032
+ "value": [
2033
+ 77,
2034
+ 101,
2035
+ 114,
2036
+ 107,
2037
+ 108,
2038
+ 101,
2039
+ 68,
2040
+ 105,
2041
+ 115,
2042
+ 116,
2043
+ 114,
2044
+ 105,
2045
+ 98,
2046
+ 117,
2047
+ 116,
2048
+ 111,
2049
+ 114
2050
+ ]
2051
+ },
2052
+ {
2053
+ "kind": "account",
2054
+ "path": "mint"
2055
+ },
2056
+ {
2057
+ "kind": "arg",
2058
+ "path": "version"
2059
+ }
2060
+ ]
1347
2061
  }
1348
2062
  },
1349
2063
  {
1350
- "name": "claims_closable_by_claimant",
1351
- "type": {
1352
- "option": "bool"
1353
- }
1354
- },
2064
+ "name": "system_program",
2065
+ "address": "11111111111111111111111111111111"
2066
+ }
2067
+ ],
2068
+ "args": [
1355
2069
  {
1356
- "name": "claims_limit",
1357
- "type": {
1358
- "option": "u16"
1359
- }
2070
+ "name": "version",
2071
+ "type": "u64"
1360
2072
  }
1361
2073
  ]
1362
2074
  },
@@ -1438,6 +2150,36 @@
1438
2150
  ],
1439
2151
  "args": []
1440
2152
  },
2153
+ {
2154
+ "name": "request_clawback",
2155
+ "discriminator": [
2156
+ 57,
2157
+ 57,
2158
+ 31,
2159
+ 191,
2160
+ 239,
2161
+ 66,
2162
+ 54,
2163
+ 8
2164
+ ],
2165
+ "accounts": [
2166
+ {
2167
+ "name": "distributor",
2168
+ "docs": [
2169
+ "The [MerkleDistributor]."
2170
+ ],
2171
+ "writable": true
2172
+ },
2173
+ {
2174
+ "name": "authority",
2175
+ "docs": [
2176
+ "Fee partner signer that may initiate the delayed clawback flow."
2177
+ ],
2178
+ "signer": true
2179
+ }
2180
+ ],
2181
+ "args": []
2182
+ },
1441
2183
  {
1442
2184
  "name": "set_admin",
1443
2185
  "discriminator": [
@@ -1594,9 +2336,52 @@
1594
2336
  }
1595
2337
  }
1596
2338
  ]
2339
+ },
2340
+ {
2341
+ "name": "withdraw_clawback_request",
2342
+ "discriminator": [
2343
+ 149,
2344
+ 159,
2345
+ 253,
2346
+ 249,
2347
+ 226,
2348
+ 250,
2349
+ 21,
2350
+ 8
2351
+ ],
2352
+ "accounts": [
2353
+ {
2354
+ "name": "distributor",
2355
+ "docs": [
2356
+ "The [MerkleDistributor]."
2357
+ ],
2358
+ "writable": true
2359
+ },
2360
+ {
2361
+ "name": "authority",
2362
+ "docs": [
2363
+ "Fee partner signer that may initiate the delayed clawback flow."
2364
+ ],
2365
+ "signer": true
2366
+ }
2367
+ ],
2368
+ "args": []
1597
2369
  }
1598
2370
  ],
1599
2371
  "accounts": [
2372
+ {
2373
+ "name": "AutoClaimState",
2374
+ "discriminator": [
2375
+ 216,
2376
+ 43,
2377
+ 239,
2378
+ 75,
2379
+ 58,
2380
+ 129,
2381
+ 132,
2382
+ 12
2383
+ ]
2384
+ },
1600
2385
  {
1601
2386
  "name": "ClaimStatus",
1602
2387
  "discriminator": [
@@ -1813,9 +2598,142 @@
1813
2598
  "code": 6026,
1814
2599
  "name": "NoFeesToClaim",
1815
2600
  "msg": "No fees to claim"
2601
+ },
2602
+ {
2603
+ "code": 6027,
2604
+ "name": "AutoClaimNotPossible",
2605
+ "msg": "Auto-claim is available only for instant airdrops"
2606
+ },
2607
+ {
2608
+ "code": 6028,
2609
+ "name": "AutoClaimEnabled",
2610
+ "msg": "Auto-claim is enabled for this airdrop, manual claims are not possible, clawback v2 is required"
2611
+ },
2612
+ {
2613
+ "code": 6029,
2614
+ "name": "AutoClaimNotEnabled",
2615
+ "msg": "Auto-claim is not enabled for this airdrop"
2616
+ },
2617
+ {
2618
+ "code": 6030,
2619
+ "name": "InvalidAutoClaimTokenAccount",
2620
+ "msg": "Invalid auto-claim recipient token account"
2621
+ },
2622
+ {
2623
+ "code": 6031,
2624
+ "name": "ClawbackRequestAlreadyRequested",
2625
+ "msg": "Clawback has already been requested"
2626
+ },
2627
+ {
2628
+ "code": 6032,
2629
+ "name": "ClawbackRequestNotRequested",
2630
+ "msg": "Clawback has not been requested"
2631
+ },
2632
+ {
2633
+ "code": 6033,
2634
+ "name": "ClawbackRequestDelayPending",
2635
+ "msg": "Clawback request delay has not passed yet"
1816
2636
  }
1817
2637
  ],
1818
2638
  "types": [
2639
+ {
2640
+ "name": "AutoClaimState",
2641
+ "docs": [
2642
+ "Tracks reserved and spent SOL for worker auto-claims."
2643
+ ],
2644
+ "type": {
2645
+ "kind": "struct",
2646
+ "fields": [
2647
+ {
2648
+ "name": "bump",
2649
+ "docs": [
2650
+ "Bump seed."
2651
+ ],
2652
+ "type": "u8"
2653
+ },
2654
+ {
2655
+ "name": "distributor",
2656
+ "docs": [
2657
+ "Distributor account this state belongs to."
2658
+ ],
2659
+ "type": "pubkey"
2660
+ },
2661
+ {
2662
+ "name": "tx_fee_lamports",
2663
+ "docs": [
2664
+ "Fixed reimbursement for transaction processing."
2665
+ ],
2666
+ "type": "u64"
2667
+ },
2668
+ {
2669
+ "name": "ata_rent_lamports",
2670
+ "docs": [
2671
+ "Fixed reimbursement for ATA creation when it is needed."
2672
+ ],
2673
+ "type": "u64"
2674
+ },
2675
+ {
2676
+ "name": "claim_status_rent_lamports",
2677
+ "docs": [
2678
+ "Fixed reimbursement tom cover ClaimStatus account creation."
2679
+ ],
2680
+ "type": "u64"
2681
+ },
2682
+ {
2683
+ "name": "total_funded",
2684
+ "docs": [
2685
+ "Total SOL funded for reimbursements."
2686
+ ],
2687
+ "type": "u64"
2688
+ },
2689
+ {
2690
+ "name": "total_spent",
2691
+ "docs": [
2692
+ "Total SOL reimbursed so far."
2693
+ ],
2694
+ "type": "u64"
2695
+ },
2696
+ {
2697
+ "name": "claims_processed",
2698
+ "docs": [
2699
+ "Number of claims processed by the worker."
2700
+ ],
2701
+ "type": "u64"
2702
+ },
2703
+ {
2704
+ "name": "ata_creations",
2705
+ "docs": [
2706
+ "Number of ATAs funded by the worker path."
2707
+ ],
2708
+ "type": "u64"
2709
+ },
2710
+ {
2711
+ "name": "buffer1",
2712
+ "docs": [
2713
+ "Buffer for additional fields"
2714
+ ],
2715
+ "type": {
2716
+ "array": [
2717
+ "u8",
2718
+ 32
2719
+ ]
2720
+ }
2721
+ },
2722
+ {
2723
+ "name": "buffer2",
2724
+ "docs": [
2725
+ "Buffer for additional fields"
2726
+ ],
2727
+ "type": {
2728
+ "array": [
2729
+ "u8",
2730
+ 32
2731
+ ]
2732
+ }
2733
+ }
2734
+ ]
2735
+ }
2736
+ },
1819
2737
  {
1820
2738
  "name": "ClaimClosedEvent",
1821
2739
  "docs": [
@@ -2237,14 +3155,56 @@
2237
3155
  "type": "u8"
2238
3156
  },
2239
3157
  {
2240
- "name": "buffer",
3158
+ "name": "auto_claim",
2241
3159
  "docs": [
2242
- "Buffer for additional fields"
3160
+ "Whether Distributor supports auto-claim"
3161
+ ],
3162
+ "type": "bool"
3163
+ },
3164
+ {
3165
+ "name": "align_buffer_1",
3166
+ "docs": [
3167
+ "Extra buffer to keep alignment, may be reused"
3168
+ ],
3169
+ "type": {
3170
+ "array": [
3171
+ "u8",
3172
+ 4
3173
+ ]
3174
+ }
3175
+ },
3176
+ {
3177
+ "name": "fee_partner",
3178
+ "docs": [
3179
+ "Partner wallet whose fee schedule was applied, if different from the creator"
3180
+ ],
3181
+ "type": "pubkey"
3182
+ },
3183
+ {
3184
+ "name": "clawback_request_ts",
3185
+ "docs": [
3186
+ "Timestamp when clawback was requested by the fee partner"
3187
+ ],
3188
+ "type": "u64"
3189
+ },
3190
+ {
3191
+ "name": "buffer_1",
3192
+ "docs": [
3193
+ "Buffers for additional fields"
2243
3194
  ],
2244
3195
  "type": {
2245
3196
  "array": [
2246
3197
  "u8",
2247
- 13
3198
+ 32
3199
+ ]
3200
+ }
3201
+ },
3202
+ {
3203
+ "name": "buffer_2",
3204
+ "type": {
3205
+ "array": [
3206
+ "u8",
3207
+ 32
2248
3208
  ]
2249
3209
  }
2250
3210
  }