@ercworldio/blockchain-shared 1.0.5-dev.8-PLAT134.5 → 1.0.5-dev.8-PLAT272.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.
@@ -918,6 +918,101 @@ export type Escrow = {
918
918
  }
919
919
  ];
920
920
  },
921
+ {
922
+ "name": "addTreasuryReceiver";
923
+ "docs": [
924
+ "Whitelists a receiver for admin withdrawals (mirrors EVM grantRole TREASURY_RECEIVER_ROLE)."
925
+ ];
926
+ "discriminator": [
927
+ 218,
928
+ 173,
929
+ 230,
930
+ 27,
931
+ 126,
932
+ 71,
933
+ 202,
934
+ 54
935
+ ];
936
+ "accounts": [
937
+ {
938
+ "name": "escrowConfig";
939
+ "pda": {
940
+ "seeds": [
941
+ {
942
+ "kind": "const";
943
+ "value": [
944
+ 101,
945
+ 115,
946
+ 99,
947
+ 114,
948
+ 111,
949
+ 119,
950
+ 45,
951
+ 99,
952
+ 111,
953
+ 110,
954
+ 102,
955
+ 105,
956
+ 103,
957
+ 45,
958
+ 118,
959
+ 50
960
+ ];
961
+ }
962
+ ];
963
+ };
964
+ },
965
+ {
966
+ "name": "treasuryReceiver";
967
+ "writable": true;
968
+ "pda": {
969
+ "seeds": [
970
+ {
971
+ "kind": "const";
972
+ "value": [
973
+ 116,
974
+ 114,
975
+ 101,
976
+ 97,
977
+ 115,
978
+ 117,
979
+ 114,
980
+ 121,
981
+ 45,
982
+ 114,
983
+ 101,
984
+ 99,
985
+ 101,
986
+ 105,
987
+ 118,
988
+ 101,
989
+ 114
990
+ ];
991
+ },
992
+ {
993
+ "kind": "arg";
994
+ "path": "receiver";
995
+ }
996
+ ];
997
+ };
998
+ },
999
+ {
1000
+ "name": "admin";
1001
+ "writable": true;
1002
+ "signer": true;
1003
+ },
1004
+ {
1005
+ "name": "systemProgram";
1006
+ "address": "11111111111111111111111111111111";
1007
+ }
1008
+ ];
1009
+ "args": [
1010
+ {
1011
+ "name": "receiver";
1012
+ "type": "pubkey";
1013
+ }
1014
+ ];
1015
+ },
921
1016
  {
922
1017
  "name": "adminDepositSol";
923
1018
  "docs": [
@@ -1250,11 +1345,43 @@ export type Escrow = {
1250
1345
  },
1251
1346
  {
1252
1347
  "name": "recipient";
1348
+ "writable": true;
1349
+ },
1350
+ {
1351
+ "name": "treasuryReceiver";
1253
1352
  "docs": [
1254
- "(see the plan doc's \"minimal parity\" decision; EVM enforces TREASURY_RECEIVER_ROLE on-chain,",
1255
- "this is a known interim gap, not an oversight)."
1353
+ "Mirrors EVM's onlyTreasuryReceiver(receiver) the payout target must be whitelisted."
1256
1354
  ];
1257
- "writable": true;
1355
+ "pda": {
1356
+ "seeds": [
1357
+ {
1358
+ "kind": "const";
1359
+ "value": [
1360
+ 116,
1361
+ 114,
1362
+ 101,
1363
+ 97,
1364
+ 115,
1365
+ 117,
1366
+ 114,
1367
+ 121,
1368
+ 45,
1369
+ 114,
1370
+ 101,
1371
+ 99,
1372
+ 101,
1373
+ 105,
1374
+ 118,
1375
+ 101,
1376
+ 114
1377
+ ];
1378
+ },
1379
+ {
1380
+ "kind": "account";
1381
+ "path": "recipient";
1382
+ }
1383
+ ];
1384
+ };
1258
1385
  },
1259
1386
  {
1260
1387
  "name": "admin";
@@ -1543,9 +1670,42 @@ export type Escrow = {
1543
1670
  },
1544
1671
  {
1545
1672
  "name": "recipient";
1673
+ },
1674
+ {
1675
+ "name": "treasuryReceiver";
1546
1676
  "docs": [
1547
- "(see the plan doc's \"minimal parity\" decision)."
1677
+ "Mirrors EVM's onlyTreasuryReceiver(receiver) the payout target must be whitelisted."
1548
1678
  ];
1679
+ "pda": {
1680
+ "seeds": [
1681
+ {
1682
+ "kind": "const";
1683
+ "value": [
1684
+ 116,
1685
+ 114,
1686
+ 101,
1687
+ 97,
1688
+ 115,
1689
+ 117,
1690
+ 114,
1691
+ 121,
1692
+ 45,
1693
+ 114,
1694
+ 101,
1695
+ 99,
1696
+ 101,
1697
+ 105,
1698
+ 118,
1699
+ 101,
1700
+ 114
1701
+ ];
1702
+ },
1703
+ {
1704
+ "kind": "account";
1705
+ "path": "recipient";
1706
+ }
1707
+ ];
1708
+ };
1549
1709
  },
1550
1710
  {
1551
1711
  "name": "recipientTokenAccount";
@@ -4932,6 +5092,97 @@ export type Escrow = {
4932
5092
  }
4933
5093
  ];
4934
5094
  },
5095
+ {
5096
+ "name": "removeTreasuryReceiver";
5097
+ "docs": [
5098
+ "Revokes a receiver's admin-withdrawal whitelist entry (mirrors EVM revokeRole TREASURY_RECEIVER_ROLE)."
5099
+ ];
5100
+ "discriminator": [
5101
+ 94,
5102
+ 45,
5103
+ 107,
5104
+ 230,
5105
+ 200,
5106
+ 85,
5107
+ 152,
5108
+ 15
5109
+ ];
5110
+ "accounts": [
5111
+ {
5112
+ "name": "escrowConfig";
5113
+ "pda": {
5114
+ "seeds": [
5115
+ {
5116
+ "kind": "const";
5117
+ "value": [
5118
+ 101,
5119
+ 115,
5120
+ 99,
5121
+ 114,
5122
+ 111,
5123
+ 119,
5124
+ 45,
5125
+ 99,
5126
+ 111,
5127
+ 110,
5128
+ 102,
5129
+ 105,
5130
+ 103,
5131
+ 45,
5132
+ 118,
5133
+ 50
5134
+ ];
5135
+ }
5136
+ ];
5137
+ };
5138
+ },
5139
+ {
5140
+ "name": "treasuryReceiver";
5141
+ "writable": true;
5142
+ "pda": {
5143
+ "seeds": [
5144
+ {
5145
+ "kind": "const";
5146
+ "value": [
5147
+ 116,
5148
+ 114,
5149
+ 101,
5150
+ 97,
5151
+ 115,
5152
+ 117,
5153
+ 114,
5154
+ 121,
5155
+ 45,
5156
+ 114,
5157
+ 101,
5158
+ 99,
5159
+ 101,
5160
+ 105,
5161
+ 118,
5162
+ 101,
5163
+ 114
5164
+ ];
5165
+ },
5166
+ {
5167
+ "kind": "arg";
5168
+ "path": "receiver";
5169
+ }
5170
+ ];
5171
+ };
5172
+ },
5173
+ {
5174
+ "name": "admin";
5175
+ "writable": true;
5176
+ "signer": true;
5177
+ }
5178
+ ];
5179
+ "args": [
5180
+ {
5181
+ "name": "receiver";
5182
+ "type": "pubkey";
5183
+ }
5184
+ ];
5185
+ },
4935
5186
  {
4936
5187
  "name": "setAdmin";
4937
5188
  "discriminator": [
@@ -6956,6 +7207,19 @@ export type Escrow = {
6956
7207
  41
6957
7208
  ];
6958
7209
  },
7210
+ {
7211
+ "name": "treasuryReceiver";
7212
+ "discriminator": [
7213
+ 160,
7214
+ 74,
7215
+ 145,
7216
+ 140,
7217
+ 88,
7218
+ 105,
7219
+ 185,
7220
+ 168
7221
+ ];
7222
+ },
6959
7223
  {
6960
7224
  "name": "withdrawNonce";
6961
7225
  "discriminator": [
@@ -7433,6 +7697,11 @@ export type Escrow = {
7433
7697
  "code": 6034;
7434
7698
  "name": "adminWithdrawConfigNotSet";
7435
7699
  "msg": "Admin withdrawal threshold is not configured";
7700
+ },
7701
+ {
7702
+ "code": 6035;
7703
+ "name": "receiverNotWhitelisted";
7704
+ "msg": "Receiver is not whitelisted for admin withdrawals";
7436
7705
  }
7437
7706
  ];
7438
7707
  "types": [
@@ -8039,6 +8308,9 @@ export type Escrow = {
8039
8308
  },
8040
8309
  {
8041
8310
  "name": "timelockExecutive";
8311
+ },
8312
+ {
8313
+ "name": "treasuryReceiver";
8042
8314
  }
8043
8315
  ];
8044
8316
  };
@@ -8399,6 +8671,31 @@ export type Escrow = {
8399
8671
  ];
8400
8672
  };
8401
8673
  },
8674
+ {
8675
+ "name": "treasuryReceiver";
8676
+ "docs": [
8677
+ "Whitelist entry for a single admin-withdrawal receiver (mirrors EVM's TREASURY_RECEIVER_ROLE).",
8678
+ "Existence with `is_whitelisted = true` means `admin_withdraw_sol_v2`/`admin_withdraw_spl_v2`",
8679
+ "may pay out to this address; anything else (account missing, since `remove_treasury_receiver`",
8680
+ "closes it rather than flipping a flag) is rejected.",
8681
+ "",
8682
+ "A dedicated PDA per receiver rather than a roster `Vec` (like `TreasuryConfig`'s managers/",
8683
+ "executives) — this whitelist can grow much larger than the manager/executive rosters and is",
8684
+ "checked per-withdrawal, so an O(1) PDA lookup keyed by the receiver's own address is a better",
8685
+ "fit than deserializing and scanning a list on every withdrawal.",
8686
+ "",
8687
+ "PDA seeds: `[b\"treasury-receiver\", receiver]`."
8688
+ ];
8689
+ "type": {
8690
+ "kind": "struct";
8691
+ "fields": [
8692
+ {
8693
+ "name": "isWhitelisted";
8694
+ "type": "bool";
8695
+ }
8696
+ ];
8697
+ };
8698
+ },
8402
8699
  {
8403
8700
  "name": "withdrawNonce";
8404
8701
  "type": {