@pooflabs/core 0.0.46 → 0.0.47-rc1
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.
- package/dist/index.js +60 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -48
- package/dist/index.mjs.map +1 -1
- package/dist/utils/sol/poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZpDevnet-program.d.ts +1 -137
- package/dist/utils/sol/poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZpMainnet-program.d.ts +31 -227
- package/dist/utils/sol/sol-utils.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1015,7 +1015,7 @@ export type Tarobase = {
|
|
|
1015
1015
|
"type": {
|
|
1016
1016
|
"vec": {
|
|
1017
1017
|
"defined": {
|
|
1018
|
-
"name": "
|
|
1018
|
+
"name": "txData";
|
|
1019
1019
|
};
|
|
1020
1020
|
};
|
|
1021
1021
|
};
|
|
@@ -1049,118 +1049,6 @@ export type Tarobase = {
|
|
|
1049
1049
|
"address": "11111111111111111111111111111111";
|
|
1050
1050
|
}
|
|
1051
1051
|
];
|
|
1052
|
-
"args": [
|
|
1053
|
-
{
|
|
1054
|
-
"name": "appId";
|
|
1055
|
-
"type": "string";
|
|
1056
|
-
},
|
|
1057
|
-
{
|
|
1058
|
-
"name": "documents";
|
|
1059
|
-
"type": {
|
|
1060
|
-
"vec": {
|
|
1061
|
-
"defined": {
|
|
1062
|
-
"name": "setDocumentData";
|
|
1063
|
-
};
|
|
1064
|
-
};
|
|
1065
|
-
};
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
"name": "deletePaths";
|
|
1069
|
-
"type": {
|
|
1070
|
-
"vec": "string";
|
|
1071
|
-
};
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
"name": "txData";
|
|
1075
|
-
"type": {
|
|
1076
|
-
"vec": {
|
|
1077
|
-
"defined": {
|
|
1078
|
-
"name": "txDataV1";
|
|
1079
|
-
};
|
|
1080
|
-
};
|
|
1081
|
-
};
|
|
1082
|
-
}
|
|
1083
|
-
];
|
|
1084
|
-
},
|
|
1085
|
-
{
|
|
1086
|
-
"name": "setDocumentsNoUserV2";
|
|
1087
|
-
"discriminator": [
|
|
1088
|
-
204,
|
|
1089
|
-
116,
|
|
1090
|
-
232,
|
|
1091
|
-
56,
|
|
1092
|
-
12,
|
|
1093
|
-
252,
|
|
1094
|
-
33,
|
|
1095
|
-
108
|
|
1096
|
-
];
|
|
1097
|
-
"accounts": [
|
|
1098
|
-
{
|
|
1099
|
-
"name": "payer";
|
|
1100
|
-
"writable": true;
|
|
1101
|
-
"signer": true;
|
|
1102
|
-
},
|
|
1103
|
-
{
|
|
1104
|
-
"name": "systemProgram";
|
|
1105
|
-
"address": "11111111111111111111111111111111";
|
|
1106
|
-
}
|
|
1107
|
-
];
|
|
1108
|
-
"args": [
|
|
1109
|
-
{
|
|
1110
|
-
"name": "appId";
|
|
1111
|
-
"type": "string";
|
|
1112
|
-
},
|
|
1113
|
-
{
|
|
1114
|
-
"name": "documents";
|
|
1115
|
-
"type": {
|
|
1116
|
-
"vec": {
|
|
1117
|
-
"defined": {
|
|
1118
|
-
"name": "setDocumentData";
|
|
1119
|
-
};
|
|
1120
|
-
};
|
|
1121
|
-
};
|
|
1122
|
-
},
|
|
1123
|
-
{
|
|
1124
|
-
"name": "deletePaths";
|
|
1125
|
-
"type": {
|
|
1126
|
-
"vec": "string";
|
|
1127
|
-
};
|
|
1128
|
-
},
|
|
1129
|
-
{
|
|
1130
|
-
"name": "txData";
|
|
1131
|
-
"type": {
|
|
1132
|
-
"vec": {
|
|
1133
|
-
"defined": {
|
|
1134
|
-
"name": "txData";
|
|
1135
|
-
};
|
|
1136
|
-
};
|
|
1137
|
-
};
|
|
1138
|
-
}
|
|
1139
|
-
];
|
|
1140
|
-
},
|
|
1141
|
-
{
|
|
1142
|
-
"name": "setDocumentsV2";
|
|
1143
|
-
"discriminator": [
|
|
1144
|
-
22,
|
|
1145
|
-
236,
|
|
1146
|
-
242,
|
|
1147
|
-
185,
|
|
1148
|
-
145,
|
|
1149
|
-
61,
|
|
1150
|
-
26,
|
|
1151
|
-
39
|
|
1152
|
-
];
|
|
1153
|
-
"accounts": [
|
|
1154
|
-
{
|
|
1155
|
-
"name": "payer";
|
|
1156
|
-
"writable": true;
|
|
1157
|
-
"signer": true;
|
|
1158
|
-
},
|
|
1159
|
-
{
|
|
1160
|
-
"name": "systemProgram";
|
|
1161
|
-
"address": "11111111111111111111111111111111";
|
|
1162
|
-
}
|
|
1163
|
-
];
|
|
1164
1052
|
"args": [
|
|
1165
1053
|
{
|
|
1166
1054
|
"name": "appId";
|
|
@@ -1191,10 +1079,6 @@ export type Tarobase = {
|
|
|
1191
1079
|
};
|
|
1192
1080
|
};
|
|
1193
1081
|
};
|
|
1194
|
-
},
|
|
1195
|
-
{
|
|
1196
|
-
"name": "simulate";
|
|
1197
|
-
"type": "bool";
|
|
1198
1082
|
}
|
|
1199
1083
|
];
|
|
1200
1084
|
},
|
|
@@ -1967,26 +1851,6 @@ export type Tarobase = {
|
|
|
1967
1851
|
},
|
|
1968
1852
|
{
|
|
1969
1853
|
"name": "txData";
|
|
1970
|
-
"type": {
|
|
1971
|
-
"kind": "struct";
|
|
1972
|
-
"fields": [
|
|
1973
|
-
{
|
|
1974
|
-
"name": "pluginFunctionKey";
|
|
1975
|
-
"type": "string";
|
|
1976
|
-
},
|
|
1977
|
-
{
|
|
1978
|
-
"name": "txData";
|
|
1979
|
-
"type": "bytes";
|
|
1980
|
-
},
|
|
1981
|
-
{
|
|
1982
|
-
"name": "raIndices";
|
|
1983
|
-
"type": "bytes";
|
|
1984
|
-
}
|
|
1985
|
-
];
|
|
1986
|
-
};
|
|
1987
|
-
},
|
|
1988
|
-
{
|
|
1989
|
-
"name": "txDataV1";
|
|
1990
1854
|
"type": {
|
|
1991
1855
|
"kind": "struct";
|
|
1992
1856
|
"fields": [
|
|
@@ -1015,7 +1015,7 @@ export type Tarobase = {
|
|
|
1015
1015
|
"type": {
|
|
1016
1016
|
"vec": {
|
|
1017
1017
|
"defined": {
|
|
1018
|
-
"name": "
|
|
1018
|
+
"name": "txData";
|
|
1019
1019
|
};
|
|
1020
1020
|
};
|
|
1021
1021
|
};
|
|
@@ -1049,118 +1049,6 @@ export type Tarobase = {
|
|
|
1049
1049
|
"address": "11111111111111111111111111111111";
|
|
1050
1050
|
}
|
|
1051
1051
|
];
|
|
1052
|
-
"args": [
|
|
1053
|
-
{
|
|
1054
|
-
"name": "appId";
|
|
1055
|
-
"type": "string";
|
|
1056
|
-
},
|
|
1057
|
-
{
|
|
1058
|
-
"name": "documents";
|
|
1059
|
-
"type": {
|
|
1060
|
-
"vec": {
|
|
1061
|
-
"defined": {
|
|
1062
|
-
"name": "setDocumentData";
|
|
1063
|
-
};
|
|
1064
|
-
};
|
|
1065
|
-
};
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
"name": "deletePaths";
|
|
1069
|
-
"type": {
|
|
1070
|
-
"vec": "string";
|
|
1071
|
-
};
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
"name": "txData";
|
|
1075
|
-
"type": {
|
|
1076
|
-
"vec": {
|
|
1077
|
-
"defined": {
|
|
1078
|
-
"name": "txDataV1";
|
|
1079
|
-
};
|
|
1080
|
-
};
|
|
1081
|
-
};
|
|
1082
|
-
}
|
|
1083
|
-
];
|
|
1084
|
-
},
|
|
1085
|
-
{
|
|
1086
|
-
"name": "setDocumentsNoUserV2";
|
|
1087
|
-
"discriminator": [
|
|
1088
|
-
204,
|
|
1089
|
-
116,
|
|
1090
|
-
232,
|
|
1091
|
-
56,
|
|
1092
|
-
12,
|
|
1093
|
-
252,
|
|
1094
|
-
33,
|
|
1095
|
-
108
|
|
1096
|
-
];
|
|
1097
|
-
"accounts": [
|
|
1098
|
-
{
|
|
1099
|
-
"name": "payer";
|
|
1100
|
-
"writable": true;
|
|
1101
|
-
"signer": true;
|
|
1102
|
-
},
|
|
1103
|
-
{
|
|
1104
|
-
"name": "systemProgram";
|
|
1105
|
-
"address": "11111111111111111111111111111111";
|
|
1106
|
-
}
|
|
1107
|
-
];
|
|
1108
|
-
"args": [
|
|
1109
|
-
{
|
|
1110
|
-
"name": "appId";
|
|
1111
|
-
"type": "string";
|
|
1112
|
-
},
|
|
1113
|
-
{
|
|
1114
|
-
"name": "documents";
|
|
1115
|
-
"type": {
|
|
1116
|
-
"vec": {
|
|
1117
|
-
"defined": {
|
|
1118
|
-
"name": "setDocumentData";
|
|
1119
|
-
};
|
|
1120
|
-
};
|
|
1121
|
-
};
|
|
1122
|
-
},
|
|
1123
|
-
{
|
|
1124
|
-
"name": "deletePaths";
|
|
1125
|
-
"type": {
|
|
1126
|
-
"vec": "string";
|
|
1127
|
-
};
|
|
1128
|
-
},
|
|
1129
|
-
{
|
|
1130
|
-
"name": "txData";
|
|
1131
|
-
"type": {
|
|
1132
|
-
"vec": {
|
|
1133
|
-
"defined": {
|
|
1134
|
-
"name": "txData";
|
|
1135
|
-
};
|
|
1136
|
-
};
|
|
1137
|
-
};
|
|
1138
|
-
}
|
|
1139
|
-
];
|
|
1140
|
-
},
|
|
1141
|
-
{
|
|
1142
|
-
"name": "setDocumentsV2";
|
|
1143
|
-
"discriminator": [
|
|
1144
|
-
22,
|
|
1145
|
-
236,
|
|
1146
|
-
242,
|
|
1147
|
-
185,
|
|
1148
|
-
145,
|
|
1149
|
-
61,
|
|
1150
|
-
26,
|
|
1151
|
-
39
|
|
1152
|
-
];
|
|
1153
|
-
"accounts": [
|
|
1154
|
-
{
|
|
1155
|
-
"name": "payer";
|
|
1156
|
-
"writable": true;
|
|
1157
|
-
"signer": true;
|
|
1158
|
-
},
|
|
1159
|
-
{
|
|
1160
|
-
"name": "systemProgram";
|
|
1161
|
-
"address": "11111111111111111111111111111111";
|
|
1162
|
-
}
|
|
1163
|
-
];
|
|
1164
1052
|
"args": [
|
|
1165
1053
|
{
|
|
1166
1054
|
"name": "appId";
|
|
@@ -1191,10 +1079,6 @@ export type Tarobase = {
|
|
|
1191
1079
|
};
|
|
1192
1080
|
};
|
|
1193
1081
|
};
|
|
1194
|
-
},
|
|
1195
|
-
{
|
|
1196
|
-
"name": "simulate";
|
|
1197
|
-
"type": "bool";
|
|
1198
1082
|
}
|
|
1199
1083
|
];
|
|
1200
1084
|
},
|
|
@@ -1478,138 +1362,78 @@ export type Tarobase = {
|
|
|
1478
1362
|
"errors": [
|
|
1479
1363
|
{
|
|
1480
1364
|
"code": 6000;
|
|
1481
|
-
"name": "
|
|
1482
|
-
"msg": "
|
|
1365
|
+
"name": "unauthorized";
|
|
1366
|
+
"msg": "Unauthorized: Only the owner can perform this action.";
|
|
1483
1367
|
},
|
|
1484
1368
|
{
|
|
1485
1369
|
"code": 6001;
|
|
1486
|
-
"name": "
|
|
1487
|
-
"msg": "
|
|
1370
|
+
"name": "unauthorizedUpdate";
|
|
1371
|
+
"msg": "Unauthorized: Failed policy check to update this document.";
|
|
1488
1372
|
},
|
|
1489
1373
|
{
|
|
1490
1374
|
"code": 6002;
|
|
1491
|
-
"name": "
|
|
1492
|
-
"msg": "
|
|
1375
|
+
"name": "unauthorizedDelete";
|
|
1376
|
+
"msg": "Unauthorized: Failed policy check to delete this document.";
|
|
1493
1377
|
},
|
|
1494
1378
|
{
|
|
1495
1379
|
"code": 6003;
|
|
1496
|
-
"name": "
|
|
1497
|
-
"msg": "
|
|
1380
|
+
"name": "unauthorizedCreate";
|
|
1381
|
+
"msg": "Unauthorized: Failed policy check to create document at this path.";
|
|
1498
1382
|
},
|
|
1499
1383
|
{
|
|
1500
1384
|
"code": 6004;
|
|
1501
|
-
"name": "
|
|
1502
|
-
"msg": "
|
|
1385
|
+
"name": "constraintMismatch";
|
|
1386
|
+
"msg": "Constraint mismatch: provided values do not match stored document values.";
|
|
1503
1387
|
},
|
|
1504
1388
|
{
|
|
1505
1389
|
"code": 6005;
|
|
1506
|
-
"name": "
|
|
1507
|
-
"msg": "
|
|
1390
|
+
"name": "cannotDeleteFieldsFromNonexistentAccount";
|
|
1391
|
+
"msg": "Cannot delete fields from a nonexistent account.";
|
|
1508
1392
|
},
|
|
1509
1393
|
{
|
|
1510
1394
|
"code": 6006;
|
|
1511
|
-
"name": "
|
|
1512
|
-
"msg": "
|
|
1395
|
+
"name": "fieldNotFound";
|
|
1396
|
+
"msg": "Field not found: Cannot delete a field that doesn't exist.";
|
|
1513
1397
|
},
|
|
1514
1398
|
{
|
|
1515
1399
|
"code": 6007;
|
|
1516
|
-
"name": "
|
|
1517
|
-
"msg": "
|
|
1400
|
+
"name": "createHookFailed";
|
|
1401
|
+
"msg": "Create hook failed: Document creation was rejected by hook.";
|
|
1518
1402
|
},
|
|
1519
1403
|
{
|
|
1520
1404
|
"code": 6008;
|
|
1521
|
-
"name": "
|
|
1522
|
-
"msg": "
|
|
1405
|
+
"name": "updateHookFailed";
|
|
1406
|
+
"msg": "Update hook failed: Document update was rejected by hook.";
|
|
1523
1407
|
},
|
|
1524
1408
|
{
|
|
1525
1409
|
"code": 6009;
|
|
1526
|
-
"name": "
|
|
1527
|
-
"msg": "
|
|
1410
|
+
"name": "deleteHookFailed";
|
|
1411
|
+
"msg": "Delete hook failed: Document deletion was rejected by hook.";
|
|
1528
1412
|
},
|
|
1529
1413
|
{
|
|
1530
1414
|
"code": 6010;
|
|
1531
|
-
"name": "
|
|
1532
|
-
"msg": "
|
|
1415
|
+
"name": "executionDataUpdating";
|
|
1416
|
+
"msg": "GenericPathExecutionData is currently being updated.";
|
|
1533
1417
|
},
|
|
1534
1418
|
{
|
|
1535
1419
|
"code": 6011;
|
|
1536
|
-
"name": "
|
|
1537
|
-
"msg": "
|
|
1420
|
+
"name": "appIsNotInitialized";
|
|
1421
|
+
"msg": "App is not initialized";
|
|
1538
1422
|
},
|
|
1539
1423
|
{
|
|
1540
1424
|
"code": 6012;
|
|
1541
|
-
"name": "
|
|
1542
|
-
"msg": "
|
|
1425
|
+
"name": "invalidAuthorityPermit";
|
|
1426
|
+
"msg": "Invalid authority permit.";
|
|
1543
1427
|
},
|
|
1544
1428
|
{
|
|
1545
1429
|
"code": 6013;
|
|
1546
|
-
"name": "
|
|
1547
|
-
"msg": "
|
|
1430
|
+
"name": "accountMissing";
|
|
1431
|
+
"msg": "Account is missing.";
|
|
1548
1432
|
},
|
|
1549
1433
|
{
|
|
1550
1434
|
"code": 6014;
|
|
1551
|
-
"name": "
|
|
1552
|
-
"msg": "
|
|
1553
|
-
},
|
|
1554
|
-
{
|
|
1555
|
-
"code": 6015;
|
|
1556
|
-
"name": "fieldNotFound";
|
|
1557
|
-
"msg": "The field was not found.";
|
|
1558
|
-
},
|
|
1559
|
-
{
|
|
1560
|
-
"code": 6016;
|
|
1561
|
-
"name": "documentDataMissingFromMap";
|
|
1562
|
-
"msg": "The document data was missing from the map.";
|
|
1563
|
-
},
|
|
1564
|
-
{
|
|
1565
|
-
"code": 6017;
|
|
1566
|
-
"name": "streamAlreadyActive";
|
|
1567
|
-
"msg": "A bytecode stream is already active for this account.";
|
|
1568
|
-
},
|
|
1569
|
-
{
|
|
1570
|
-
"code": 6018;
|
|
1571
|
-
"name": "noActiveStream";
|
|
1572
|
-
"msg": "No bytecode stream is currently active.";
|
|
1573
|
-
},
|
|
1574
|
-
{
|
|
1575
|
-
"code": 6019;
|
|
1576
|
-
"name": "wrongFinalSize";
|
|
1577
|
-
"msg": "Chunk upload finished but size does not match expected_len.";
|
|
1578
|
-
},
|
|
1579
|
-
{
|
|
1580
|
-
"code": 6020;
|
|
1581
|
-
"name": "invalidBytecodeIndex";
|
|
1582
|
-
"msg": "Bytecode index must be 0-5";
|
|
1583
|
-
},
|
|
1584
|
-
{
|
|
1585
|
-
"code": 6021;
|
|
1586
|
-
"name": "missingEd25519VerifyIx";
|
|
1587
|
-
"msg": "Missing or invalid Ed25519 verify instruction.";
|
|
1588
|
-
},
|
|
1589
|
-
{
|
|
1590
|
-
"code": 6022;
|
|
1591
|
-
"name": "permitExpired";
|
|
1592
|
-
"msg": "Permit has expired.";
|
|
1593
|
-
},
|
|
1594
|
-
{
|
|
1595
|
-
"code": 6023;
|
|
1596
|
-
"name": "invalidSignature";
|
|
1597
|
-
"msg": "Invalid signature.";
|
|
1598
|
-
},
|
|
1599
|
-
{
|
|
1600
|
-
"code": 6024;
|
|
1601
|
-
"name": "invalidSigner";
|
|
1602
|
-
"msg": "Invalid signer.";
|
|
1603
|
-
},
|
|
1604
|
-
{
|
|
1605
|
-
"code": 6025;
|
|
1606
|
-
"name": "invalidMessage";
|
|
1607
|
-
"msg": "Invalid message.";
|
|
1608
|
-
},
|
|
1609
|
-
{
|
|
1610
|
-
"code": 6026;
|
|
1611
|
-
"name": "failedToParse";
|
|
1612
|
-
"msg": "Failed to parse.";
|
|
1435
|
+
"name": "numericalOverflow";
|
|
1436
|
+
"msg": "numericalOverflow";
|
|
1613
1437
|
}
|
|
1614
1438
|
];
|
|
1615
1439
|
"types": [
|
|
@@ -1967,26 +1791,6 @@ export type Tarobase = {
|
|
|
1967
1791
|
},
|
|
1968
1792
|
{
|
|
1969
1793
|
"name": "txData";
|
|
1970
|
-
"type": {
|
|
1971
|
-
"kind": "struct";
|
|
1972
|
-
"fields": [
|
|
1973
|
-
{
|
|
1974
|
-
"name": "pluginFunctionKey";
|
|
1975
|
-
"type": "string";
|
|
1976
|
-
},
|
|
1977
|
-
{
|
|
1978
|
-
"name": "txData";
|
|
1979
|
-
"type": "bytes";
|
|
1980
|
-
},
|
|
1981
|
-
{
|
|
1982
|
-
"name": "raIndices";
|
|
1983
|
-
"type": "bytes";
|
|
1984
|
-
}
|
|
1985
|
-
];
|
|
1986
|
-
};
|
|
1987
|
-
},
|
|
1988
|
-
{
|
|
1989
|
-
"name": "txDataV1";
|
|
1990
1794
|
"type": {
|
|
1991
1795
|
"kind": "struct";
|
|
1992
1796
|
"fields": [
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Connection, PublicKey, Transaction, TransactionInstruction, VersionedTransaction } from "@solana/web3.js";
|
|
2
2
|
import * as anchor from "@coral-xyz/anchor";
|
|
3
|
+
import BN from "bn.js";
|
|
3
4
|
export type RemainingAccount = {
|
|
4
5
|
pubkey: PublicKey;
|
|
5
6
|
isWritable: boolean;
|
|
@@ -8,10 +9,10 @@ export type RemainingAccount = {
|
|
|
8
9
|
export type TxData = {
|
|
9
10
|
pluginFunctionKey: string;
|
|
10
11
|
txData: Buffer;
|
|
11
|
-
raIndices:
|
|
12
|
+
raIndices: BN[];
|
|
12
13
|
};
|
|
13
14
|
export declare function genSolanaMessage(address: string, nonce: string): Promise<string>;
|
|
14
|
-
export declare function isHexString(value:
|
|
15
|
+
export declare function isHexString(value: string): boolean;
|
|
15
16
|
export declare function convertRemainingAccounts(remainingAccounts: any[]): {
|
|
16
17
|
pubkey: PublicKey;
|
|
17
18
|
isWritable: boolean;
|