@streamflow/common 10.0.3 → 11.0.0-alpha.p334.7c3dbf7

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.
@@ -3,6 +3,7 @@
3
3
  var splToken = require('@solana/spl-token');
4
4
  var web3_js = require('@solana/web3.js');
5
5
  var bs58 = require('bs58');
6
+ var anchor = require('@coral-xyz/anchor');
6
7
  var BN = require('bn.js');
7
8
  var buffer = require('buffer');
8
9
 
@@ -778,6 +779,985 @@ function assertHasPublicKey(value, message) {
778
779
  invariant(value.publicKey, message ?? "publicKey is missing");
779
780
  }
780
781
 
782
+ // solana/descriptor/idl/partner_oracle.json
783
+ var partner_oracle_default = {
784
+ address: "pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa",
785
+ metadata: {
786
+ name: "partner_oracle",
787
+ version: "1.0.0",
788
+ spec: "0.1.0",
789
+ description: "Created with Anchor"
790
+ },
791
+ instructions: [
792
+ {
793
+ name: "airdrop_clear_expired_fees",
794
+ discriminator: [
795
+ 203,
796
+ 5,
797
+ 237,
798
+ 235,
799
+ 32,
800
+ 38,
801
+ 150,
802
+ 235
803
+ ],
804
+ accounts: [
805
+ {
806
+ name: "config",
807
+ docs: [
808
+ "Account that stores the config"
809
+ ],
810
+ writable: true,
811
+ pda: {
812
+ seeds: [
813
+ {
814
+ kind: "const",
815
+ value: [
816
+ 97,
817
+ 105,
818
+ 114,
819
+ 100,
820
+ 114,
821
+ 111,
822
+ 112,
823
+ 95,
824
+ 99,
825
+ 111,
826
+ 110,
827
+ 102,
828
+ 105,
829
+ 103
830
+ ]
831
+ }
832
+ ]
833
+ }
834
+ }
835
+ ],
836
+ args: []
837
+ },
838
+ {
839
+ name: "airdrop_get_fees",
840
+ discriminator: [
841
+ 185,
842
+ 20,
843
+ 28,
844
+ 207,
845
+ 70,
846
+ 243,
847
+ 32,
848
+ 62
849
+ ],
850
+ accounts: [
851
+ {
852
+ name: "config",
853
+ docs: [
854
+ "Account that stores the config"
855
+ ],
856
+ pda: {
857
+ seeds: [
858
+ {
859
+ kind: "const",
860
+ value: [
861
+ 97,
862
+ 105,
863
+ 114,
864
+ 100,
865
+ 114,
866
+ 111,
867
+ 112,
868
+ 95,
869
+ 99,
870
+ 111,
871
+ 110,
872
+ 102,
873
+ 105,
874
+ 103
875
+ ]
876
+ }
877
+ ]
878
+ }
879
+ }
880
+ ],
881
+ args: [
882
+ {
883
+ name: "pubkey",
884
+ type: "pubkey"
885
+ }
886
+ ],
887
+ returns: {
888
+ defined: {
889
+ name: "AirdropFees"
890
+ }
891
+ }
892
+ },
893
+ {
894
+ name: "airdrop_initialize_config",
895
+ discriminator: [
896
+ 2,
897
+ 110,
898
+ 102,
899
+ 10,
900
+ 34,
901
+ 83,
902
+ 164,
903
+ 55
904
+ ],
905
+ accounts: [
906
+ {
907
+ name: "payer",
908
+ docs: [
909
+ "Account that will cover tx fees, can be anybody since the instruction is safe"
910
+ ],
911
+ writable: true,
912
+ signer: true
913
+ },
914
+ {
915
+ name: "config",
916
+ writable: true,
917
+ pda: {
918
+ seeds: [
919
+ {
920
+ kind: "const",
921
+ value: [
922
+ 97,
923
+ 105,
924
+ 114,
925
+ 100,
926
+ 114,
927
+ 111,
928
+ 112,
929
+ 95,
930
+ 99,
931
+ 111,
932
+ 110,
933
+ 102,
934
+ 105,
935
+ 103
936
+ ]
937
+ }
938
+ ]
939
+ }
940
+ },
941
+ {
942
+ name: "system_program",
943
+ address: "11111111111111111111111111111111"
944
+ }
945
+ ],
946
+ args: []
947
+ },
948
+ {
949
+ name: "airdrop_remove_fees",
950
+ discriminator: [
951
+ 119,
952
+ 246,
953
+ 202,
954
+ 91,
955
+ 59,
956
+ 94,
957
+ 252,
958
+ 239
959
+ ],
960
+ accounts: [
961
+ {
962
+ name: "authority",
963
+ docs: [
964
+ "Fee Authority"
965
+ ],
966
+ writable: true,
967
+ signer: true,
968
+ address: "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"
969
+ },
970
+ {
971
+ name: "config",
972
+ docs: [
973
+ "Account that stores the config"
974
+ ],
975
+ writable: true,
976
+ pda: {
977
+ seeds: [
978
+ {
979
+ kind: "const",
980
+ value: [
981
+ 97,
982
+ 105,
983
+ 114,
984
+ 100,
985
+ 114,
986
+ 111,
987
+ 112,
988
+ 95,
989
+ 99,
990
+ 111,
991
+ 110,
992
+ 102,
993
+ 105,
994
+ 103
995
+ ]
996
+ }
997
+ ]
998
+ }
999
+ }
1000
+ ],
1001
+ args: [
1002
+ {
1003
+ name: "pubkey",
1004
+ type: "pubkey"
1005
+ }
1006
+ ]
1007
+ },
1008
+ {
1009
+ name: "airdrop_write_default_fees",
1010
+ discriminator: [
1011
+ 37,
1012
+ 104,
1013
+ 254,
1014
+ 202,
1015
+ 136,
1016
+ 124,
1017
+ 245,
1018
+ 94
1019
+ ],
1020
+ accounts: [
1021
+ {
1022
+ name: "authority",
1023
+ docs: [
1024
+ "Fee Authority"
1025
+ ],
1026
+ writable: true,
1027
+ signer: true,
1028
+ address: "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"
1029
+ },
1030
+ {
1031
+ name: "config",
1032
+ docs: [
1033
+ "Account that stores the config"
1034
+ ],
1035
+ writable: true,
1036
+ pda: {
1037
+ seeds: [
1038
+ {
1039
+ kind: "const",
1040
+ value: [
1041
+ 97,
1042
+ 105,
1043
+ 114,
1044
+ 100,
1045
+ 114,
1046
+ 111,
1047
+ 112,
1048
+ 95,
1049
+ 99,
1050
+ 111,
1051
+ 110,
1052
+ 102,
1053
+ 105,
1054
+ 103
1055
+ ]
1056
+ }
1057
+ ]
1058
+ }
1059
+ }
1060
+ ],
1061
+ args: [
1062
+ {
1063
+ name: "creation_fee",
1064
+ type: "u32"
1065
+ },
1066
+ {
1067
+ name: "price_oracle_fee",
1068
+ type: "u32"
1069
+ },
1070
+ {
1071
+ name: "claim_min_fee",
1072
+ type: "u32"
1073
+ },
1074
+ {
1075
+ name: "claim_max_fee",
1076
+ type: "u32"
1077
+ },
1078
+ {
1079
+ name: "allocation_factor",
1080
+ type: "f64"
1081
+ },
1082
+ {
1083
+ name: "clawback_token_fee_percent",
1084
+ type: "f64"
1085
+ }
1086
+ ]
1087
+ },
1088
+ {
1089
+ name: "airdrop_write_fees",
1090
+ discriminator: [
1091
+ 71,
1092
+ 165,
1093
+ 178,
1094
+ 215,
1095
+ 19,
1096
+ 70,
1097
+ 146,
1098
+ 71
1099
+ ],
1100
+ accounts: [
1101
+ {
1102
+ name: "authority",
1103
+ docs: [
1104
+ "Fee Authority"
1105
+ ],
1106
+ writable: true,
1107
+ signer: true,
1108
+ address: "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"
1109
+ },
1110
+ {
1111
+ name: "config",
1112
+ docs: [
1113
+ "Account that stores the config"
1114
+ ],
1115
+ writable: true,
1116
+ pda: {
1117
+ seeds: [
1118
+ {
1119
+ kind: "const",
1120
+ value: [
1121
+ 97,
1122
+ 105,
1123
+ 114,
1124
+ 100,
1125
+ 114,
1126
+ 111,
1127
+ 112,
1128
+ 95,
1129
+ 99,
1130
+ 111,
1131
+ 110,
1132
+ 102,
1133
+ 105,
1134
+ 103
1135
+ ]
1136
+ }
1137
+ ]
1138
+ }
1139
+ }
1140
+ ],
1141
+ args: [
1142
+ {
1143
+ name: "pubkey",
1144
+ type: "pubkey"
1145
+ },
1146
+ {
1147
+ name: "creation_fee",
1148
+ type: "u32"
1149
+ },
1150
+ {
1151
+ name: "price_oracle_fee",
1152
+ type: "u32"
1153
+ },
1154
+ {
1155
+ name: "claim_min_fee",
1156
+ type: "u32"
1157
+ },
1158
+ {
1159
+ name: "claim_max_fee",
1160
+ type: "u32"
1161
+ },
1162
+ {
1163
+ name: "allocation_factor",
1164
+ type: "f64"
1165
+ },
1166
+ {
1167
+ name: "clawback_token_fee_percent",
1168
+ type: "f64"
1169
+ },
1170
+ {
1171
+ name: "expiry_ts",
1172
+ type: "u64"
1173
+ }
1174
+ ]
1175
+ },
1176
+ {
1177
+ name: "vesting_get_fees",
1178
+ discriminator: [
1179
+ 239,
1180
+ 230,
1181
+ 28,
1182
+ 173,
1183
+ 134,
1184
+ 247,
1185
+ 57,
1186
+ 176
1187
+ ],
1188
+ accounts: [
1189
+ {
1190
+ name: "partners",
1191
+ pda: {
1192
+ seeds: [
1193
+ {
1194
+ kind: "const",
1195
+ value: [
1196
+ 115,
1197
+ 116,
1198
+ 114,
1199
+ 109,
1200
+ 95,
1201
+ 102,
1202
+ 101,
1203
+ 101,
1204
+ 115
1205
+ ]
1206
+ }
1207
+ ]
1208
+ }
1209
+ }
1210
+ ],
1211
+ args: [
1212
+ {
1213
+ name: "pubkey",
1214
+ type: "pubkey"
1215
+ }
1216
+ ],
1217
+ returns: {
1218
+ defined: {
1219
+ name: "VestingFees"
1220
+ }
1221
+ }
1222
+ },
1223
+ {
1224
+ name: "vesting_initialize_partners",
1225
+ discriminator: [
1226
+ 205,
1227
+ 170,
1228
+ 148,
1229
+ 219,
1230
+ 143,
1231
+ 38,
1232
+ 77,
1233
+ 196
1234
+ ],
1235
+ accounts: [
1236
+ {
1237
+ name: "payer",
1238
+ docs: [
1239
+ "Account that will cover tx fees, can be anybody since the instruction is safe"
1240
+ ],
1241
+ writable: true,
1242
+ signer: true
1243
+ },
1244
+ {
1245
+ name: "partners",
1246
+ writable: true,
1247
+ pda: {
1248
+ seeds: [
1249
+ {
1250
+ kind: "const",
1251
+ value: [
1252
+ 115,
1253
+ 116,
1254
+ 114,
1255
+ 109,
1256
+ 95,
1257
+ 102,
1258
+ 101,
1259
+ 101,
1260
+ 115
1261
+ ]
1262
+ }
1263
+ ]
1264
+ }
1265
+ },
1266
+ {
1267
+ name: "system_program",
1268
+ address: "11111111111111111111111111111111"
1269
+ }
1270
+ ],
1271
+ args: []
1272
+ },
1273
+ {
1274
+ name: "vesting_remove_fees",
1275
+ discriminator: [
1276
+ 233,
1277
+ 176,
1278
+ 222,
1279
+ 64,
1280
+ 79,
1281
+ 14,
1282
+ 48,
1283
+ 168
1284
+ ],
1285
+ accounts: [
1286
+ {
1287
+ name: "authority",
1288
+ docs: [
1289
+ "Account that will cover tx fees, should be equal to creator if not is not expired"
1290
+ ],
1291
+ writable: true,
1292
+ signer: true,
1293
+ address: "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"
1294
+ },
1295
+ {
1296
+ name: "partners",
1297
+ writable: true,
1298
+ pda: {
1299
+ seeds: [
1300
+ {
1301
+ kind: "const",
1302
+ value: [
1303
+ 115,
1304
+ 116,
1305
+ 114,
1306
+ 109,
1307
+ 95,
1308
+ 102,
1309
+ 101,
1310
+ 101,
1311
+ 115
1312
+ ]
1313
+ }
1314
+ ]
1315
+ }
1316
+ }
1317
+ ],
1318
+ args: [
1319
+ {
1320
+ name: "pubkey",
1321
+ type: "pubkey"
1322
+ }
1323
+ ]
1324
+ },
1325
+ {
1326
+ name: "vesting_write_default_fees",
1327
+ discriminator: [
1328
+ 96,
1329
+ 198,
1330
+ 97,
1331
+ 81,
1332
+ 162,
1333
+ 50,
1334
+ 51,
1335
+ 10
1336
+ ],
1337
+ accounts: [
1338
+ {
1339
+ name: "authority",
1340
+ docs: [
1341
+ "Account that will cover tx fees, should be equal to creator if not is not expired"
1342
+ ],
1343
+ writable: true,
1344
+ signer: true,
1345
+ address: "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"
1346
+ },
1347
+ {
1348
+ name: "partners",
1349
+ writable: true,
1350
+ pda: {
1351
+ seeds: [
1352
+ {
1353
+ kind: "const",
1354
+ value: [
1355
+ 115,
1356
+ 116,
1357
+ 114,
1358
+ 109,
1359
+ 95,
1360
+ 102,
1361
+ 101,
1362
+ 101,
1363
+ 115
1364
+ ]
1365
+ }
1366
+ ]
1367
+ }
1368
+ }
1369
+ ],
1370
+ args: [
1371
+ {
1372
+ name: "creation_fee",
1373
+ type: "u32"
1374
+ },
1375
+ {
1376
+ name: "auto_claim_fee",
1377
+ type: "u32"
1378
+ },
1379
+ {
1380
+ name: "token_fee_percent",
1381
+ type: "f32"
1382
+ }
1383
+ ]
1384
+ },
1385
+ {
1386
+ name: "vesting_write_fees",
1387
+ discriminator: [
1388
+ 251,
1389
+ 24,
1390
+ 6,
1391
+ 241,
1392
+ 182,
1393
+ 56,
1394
+ 93,
1395
+ 100
1396
+ ],
1397
+ accounts: [
1398
+ {
1399
+ name: "authority",
1400
+ docs: [
1401
+ "Account that will cover tx fees, should be equal to creator if not is not expired"
1402
+ ],
1403
+ writable: true,
1404
+ signer: true,
1405
+ address: "CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"
1406
+ },
1407
+ {
1408
+ name: "partners",
1409
+ writable: true,
1410
+ pda: {
1411
+ seeds: [
1412
+ {
1413
+ kind: "const",
1414
+ value: [
1415
+ 115,
1416
+ 116,
1417
+ 114,
1418
+ 109,
1419
+ 95,
1420
+ 102,
1421
+ 101,
1422
+ 101,
1423
+ 115
1424
+ ]
1425
+ }
1426
+ ]
1427
+ }
1428
+ }
1429
+ ],
1430
+ args: [
1431
+ {
1432
+ name: "pubkey",
1433
+ type: "pubkey"
1434
+ },
1435
+ {
1436
+ name: "creation_fee",
1437
+ type: "u32"
1438
+ },
1439
+ {
1440
+ name: "auto_claim_fee",
1441
+ type: "u32"
1442
+ },
1443
+ {
1444
+ name: "token_fee_percent",
1445
+ type: "f32"
1446
+ }
1447
+ ]
1448
+ }
1449
+ ],
1450
+ accounts: [
1451
+ {
1452
+ name: "AirdropConfig",
1453
+ discriminator: [
1454
+ 194,
1455
+ 149,
1456
+ 223,
1457
+ 142,
1458
+ 42,
1459
+ 98,
1460
+ 128,
1461
+ 16
1462
+ ]
1463
+ }
1464
+ ],
1465
+ errors: [
1466
+ {
1467
+ code: 6e3,
1468
+ name: "Unauthorized",
1469
+ msg: "Account is not authorized to execute this instruction"
1470
+ },
1471
+ {
1472
+ code: 6001,
1473
+ name: "ArithmeticError",
1474
+ msg: "Arithmetic Error (overflow/underflow)"
1475
+ },
1476
+ {
1477
+ code: 6100,
1478
+ name: "InvalidExpiry",
1479
+ msg: "Provided expiry ts is invalid"
1480
+ },
1481
+ {
1482
+ code: 6101,
1483
+ name: "NoExpiredFees",
1484
+ msg: "No expired fees found, transaction won't change the config"
1485
+ },
1486
+ {
1487
+ code: 6200,
1488
+ name: "InvalidVestingFee",
1489
+ msg: "Received invalid Vesting Fee configuration"
1490
+ },
1491
+ {
1492
+ code: 6300,
1493
+ name: "InvalidAirdropFee",
1494
+ msg: "Received invalid Airdrop Fee configuration"
1495
+ },
1496
+ {
1497
+ code: 6301,
1498
+ name: "AirdropConfigFull",
1499
+ msg: "Airdrop config is full, can not write fees"
1500
+ }
1501
+ ],
1502
+ types: [
1503
+ {
1504
+ name: "AirdropConfig",
1505
+ serialization: "bytemuck",
1506
+ repr: {
1507
+ kind: "c"
1508
+ },
1509
+ type: {
1510
+ kind: "struct",
1511
+ fields: [
1512
+ {
1513
+ name: "version",
1514
+ type: "u32"
1515
+ },
1516
+ {
1517
+ name: "usd_multiplier",
1518
+ docs: [
1519
+ "Multiplier to apply when calculating ALL fees"
1520
+ ],
1521
+ type: "f32"
1522
+ },
1523
+ {
1524
+ name: "solana_price",
1525
+ docs: [
1526
+ "Last solana price used"
1527
+ ],
1528
+ type: "u64"
1529
+ },
1530
+ {
1531
+ name: "creation_fee",
1532
+ docs: [
1533
+ "Creation SOL fee"
1534
+ ],
1535
+ type: "u32"
1536
+ },
1537
+ {
1538
+ name: "price_oracle_fee",
1539
+ docs: [
1540
+ "Fee for custom price oracle used in dynamic airdrops"
1541
+ ],
1542
+ type: "u32"
1543
+ },
1544
+ {
1545
+ name: "claim_min_fee",
1546
+ docs: [
1547
+ "Dynamic claim fee in SOL, min"
1548
+ ],
1549
+ type: "u32"
1550
+ },
1551
+ {
1552
+ name: "claim_max_fee",
1553
+ docs: [
1554
+ "Dynamic claim fee in SOL, max"
1555
+ ],
1556
+ type: "u32"
1557
+ },
1558
+ {
1559
+ name: "allocation_factor",
1560
+ docs: [
1561
+ "Factor to multiple claimable SOL by when calculating fee"
1562
+ ],
1563
+ type: "f64"
1564
+ },
1565
+ {
1566
+ name: "clawback_token_fee_percent",
1567
+ docs: [
1568
+ "Toke % fee on clawback"
1569
+ ],
1570
+ type: "f64"
1571
+ },
1572
+ {
1573
+ name: "buffer",
1574
+ type: {
1575
+ array: [
1576
+ "u8",
1577
+ 144
1578
+ ]
1579
+ }
1580
+ },
1581
+ {
1582
+ name: "partners",
1583
+ type: {
1584
+ array: [
1585
+ {
1586
+ defined: {
1587
+ name: "AirdropPartner"
1588
+ }
1589
+ },
1590
+ 100
1591
+ ]
1592
+ }
1593
+ }
1594
+ ]
1595
+ }
1596
+ },
1597
+ {
1598
+ name: "AirdropFees",
1599
+ type: {
1600
+ kind: "struct",
1601
+ fields: [
1602
+ {
1603
+ name: "pubkey",
1604
+ docs: [
1605
+ "Account for which the fees were configured"
1606
+ ],
1607
+ type: "pubkey"
1608
+ },
1609
+ {
1610
+ name: "creation_fee",
1611
+ docs: [
1612
+ "Creation SOL fee"
1613
+ ],
1614
+ type: "u32"
1615
+ },
1616
+ {
1617
+ name: "price_oracle_fee",
1618
+ docs: [
1619
+ "Fee for custom price oracle used in dynamic airdrops"
1620
+ ],
1621
+ type: "u32"
1622
+ },
1623
+ {
1624
+ name: "claim_min_fee",
1625
+ docs: [
1626
+ "Dynamic claim fee in SOL, min"
1627
+ ],
1628
+ type: "u32"
1629
+ },
1630
+ {
1631
+ name: "claim_max_fee",
1632
+ docs: [
1633
+ "Dynamic claim fee in SOL, max"
1634
+ ],
1635
+ type: "u32"
1636
+ },
1637
+ {
1638
+ name: "allocation_factor",
1639
+ docs: [
1640
+ "Factor to multiple claimable SOL by when calculating fee"
1641
+ ],
1642
+ type: "f64"
1643
+ },
1644
+ {
1645
+ name: "clawback_token_fee_percent",
1646
+ docs: [
1647
+ "Token % fee on clawback"
1648
+ ],
1649
+ type: "f64"
1650
+ }
1651
+ ]
1652
+ }
1653
+ },
1654
+ {
1655
+ name: "AirdropPartner",
1656
+ serialization: "bytemuck",
1657
+ repr: {
1658
+ kind: "c"
1659
+ },
1660
+ type: {
1661
+ kind: "struct",
1662
+ fields: [
1663
+ {
1664
+ name: "pubkey",
1665
+ docs: [
1666
+ "Pubkey of the partner"
1667
+ ],
1668
+ type: "pubkey"
1669
+ },
1670
+ {
1671
+ name: "creation_fee",
1672
+ docs: [
1673
+ "Creation SOL fee"
1674
+ ],
1675
+ type: "u32"
1676
+ },
1677
+ {
1678
+ name: "price_oracle_fee",
1679
+ docs: [
1680
+ "Fee for custom price oracle used in dynamic airdrops"
1681
+ ],
1682
+ type: "u32"
1683
+ },
1684
+ {
1685
+ name: "claim_min_fee",
1686
+ docs: [
1687
+ "Dynamic claim fee in SOL, min"
1688
+ ],
1689
+ type: "u32"
1690
+ },
1691
+ {
1692
+ name: "claim_max_fee",
1693
+ docs: [
1694
+ "Dynamic claim fee in SOL, max"
1695
+ ],
1696
+ type: "u32"
1697
+ },
1698
+ {
1699
+ name: "allocation_factor",
1700
+ docs: [
1701
+ "Factor to multiple claimable SOL by when calculating fee"
1702
+ ],
1703
+ type: "f64"
1704
+ },
1705
+ {
1706
+ name: "clawback_token_fee_percent",
1707
+ docs: [
1708
+ "Toke % fee on clawback"
1709
+ ],
1710
+ type: "f64"
1711
+ },
1712
+ {
1713
+ name: "expiry_ts",
1714
+ docs: [
1715
+ "Time when fee configuration expires"
1716
+ ],
1717
+ type: "u64"
1718
+ },
1719
+ {
1720
+ name: "buffer",
1721
+ docs: [
1722
+ "Buffer for additional fields"
1723
+ ],
1724
+ type: {
1725
+ array: [
1726
+ "u8",
1727
+ 16
1728
+ ]
1729
+ }
1730
+ }
1731
+ ]
1732
+ }
1733
+ },
1734
+ {
1735
+ name: "VestingFees",
1736
+ type: {
1737
+ kind: "struct",
1738
+ fields: [
1739
+ {
1740
+ name: "pubkey",
1741
+ type: "pubkey"
1742
+ },
1743
+ {
1744
+ name: "creation_fee",
1745
+ type: "u32"
1746
+ },
1747
+ {
1748
+ name: "auto_claim_fee",
1749
+ type: "u32"
1750
+ },
1751
+ {
1752
+ name: "token_fee_percent",
1753
+ type: "f32"
1754
+ }
1755
+ ]
1756
+ }
1757
+ }
1758
+ ]
1759
+ };
1760
+
781
1761
  // solana/utils.ts
782
1762
  var SIMULATE_TRIES = 3;
783
1763
  var buildSendThrottler = (sendRate, sendInterval = 1e3) => {
@@ -1084,6 +2064,9 @@ async function getMultipleAccountsInfoBatched(connection, pubKeys, commitment) {
1084
2064
  const results = await Promise.all(batches);
1085
2065
  return results.flat();
1086
2066
  }
2067
+ function buildPartnerOracle(connection) {
2068
+ return new anchor.Program(partner_oracle_default, { connection });
2069
+ }
1087
2070
  function deserializeRawTransaction(serializedTx) {
1088
2071
  const txBuffer = buffer.Buffer.from(serializedTx, "base64");
1089
2072
  try {
@@ -1209,6 +2192,7 @@ exports.TransactionFailedError = TransactionFailedError;
1209
2192
  exports.assertHasPublicKey = assertHasPublicKey;
1210
2193
  exports.ata = ata;
1211
2194
  exports.ataBatchExist = ataBatchExist;
2195
+ exports.buildPartnerOracle = buildPartnerOracle;
1212
2196
  exports.buildSendThrottler = buildSendThrottler;
1213
2197
  exports.checkOrCreateAtaBatch = checkOrCreateAtaBatch;
1214
2198
  exports.confirmAndEnsureTransaction = confirmAndEnsureTransaction;