@story-protocol/core-sdk 0.1.0-alpha-rc.3 → 0.1.0-alpha-rc.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/declarations/src/enums/ActionType.d.ts +5 -5
- package/dist/declarations/src/enums/ActionType.d.ts.map +1 -1
- package/dist/declarations/src/enums/HookType.d.ts +2 -2
- package/dist/declarations/src/enums/HookType.d.ts.map +1 -1
- package/dist/declarations/src/enums/Relatables.d.ts +12 -0
- package/dist/declarations/src/enums/Relatables.d.ts.map +1 -0
- package/dist/declarations/src/enums/ResourceType.d.ts +9 -9
- package/dist/declarations/src/enums/ResourceType.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts +4 -3
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/declarations/src/resources/hook.d.ts +1 -2
- package/dist/declarations/src/resources/hook.d.ts.map +1 -1
- package/dist/declarations/src/resources/hookReadOnly.d.ts +1 -2
- package/dist/declarations/src/resources/hookReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipAsset.d.ts +1 -1
- package/dist/declarations/src/resources/ipAssetReadOnly.d.ts +2 -2
- package/dist/declarations/src/resources/ipOrg.d.ts +1 -2
- package/dist/declarations/src/resources/ipOrg.d.ts.map +1 -1
- package/dist/declarations/src/resources/ipOrgReadOnly.d.ts +2 -3
- package/dist/declarations/src/resources/ipOrgReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/module.d.ts +1 -2
- package/dist/declarations/src/resources/module.d.ts.map +1 -1
- package/dist/declarations/src/resources/moduleReadOnly.d.ts +3 -5
- package/dist/declarations/src/resources/moduleReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/relationship.d.ts +1 -1
- package/dist/declarations/src/resources/relationshipReadOnly.d.ts +5 -5
- package/dist/declarations/src/resources/relationshipReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/relationshipType.d.ts +1 -1
- package/dist/declarations/src/resources/relationshipTypeReadOnly.d.ts +5 -6
- package/dist/declarations/src/resources/relationshipTypeReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/resources/transaction.d.ts +1 -2
- package/dist/declarations/src/resources/transaction.d.ts.map +1 -1
- package/dist/declarations/src/resources/transactionReadOnly.d.ts +3 -5
- package/dist/declarations/src/resources/transactionReadOnly.d.ts.map +1 -1
- package/dist/declarations/src/types/common.d.ts +6 -0
- package/dist/declarations/src/types/common.d.ts.map +1 -0
- package/dist/declarations/src/types/config.d.ts +5 -0
- package/dist/declarations/src/types/config.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/IPOrg.d.ts +8 -8
- package/dist/declarations/src/types/resources/IPOrg.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/hook.d.ts +2 -1
- package/dist/declarations/src/types/resources/hook.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/ipAsset.d.ts +9 -4
- package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/relationship.d.ts +34 -100
- package/dist/declarations/src/types/resources/relationship.d.ts.map +1 -1
- package/dist/declarations/src/types/resources/relationshipType.d.ts +50 -5
- package/dist/declarations/src/types/resources/relationshipType.d.ts.map +1 -1
- package/dist/declarations/src/utils/platform.d.ts.map +1 -1
- package/dist/story-protocol-core-sdk.cjs.dev.js +979 -125
- package/dist/story-protocol-core-sdk.cjs.prod.js +979 -125
- package/dist/story-protocol-core-sdk.esm.js +980 -126
- package/package.json +1 -1
- package/dist/declarations/src/enums/IPAssetType.d.ts +0 -11
- package/dist/declarations/src/enums/IPAssetType.d.ts.map +0 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import axios from 'axios';
|
2
|
-
import { isAddress, parseAbi, getAddress, decodeEventLog, toHex, http, createPublicClient, createWalletClient } from 'viem';
|
2
|
+
import { isAddress, parseAbi, getAddress, decodeEventLog, encodeAbiParameters, parseAbiParameters, toHex, http, createPublicClient, createWalletClient } from 'viem';
|
3
3
|
import { sepolia } from 'viem/chains';
|
4
4
|
import * as dotenv from 'dotenv';
|
5
5
|
import { formatAbi } from 'abitype';
|
@@ -497,8 +497,7 @@ function handleError(error, msg) {
|
|
497
497
|
}
|
498
498
|
|
499
499
|
/**
|
500
|
-
* IPOrgReadOnlyClient allows you to view
|
501
|
-
* Story Protocol.
|
500
|
+
* IPOrgReadOnlyClient allows you to view and search IPOrgs on Story Protocol.
|
502
501
|
*/
|
503
502
|
var IPOrgReadOnlyClient = /*#__PURE__*/function () {
|
504
503
|
function IPOrgReadOnlyClient(httpClient, rpcClient) {
|
@@ -549,7 +548,7 @@ var IPOrgReadOnlyClient = /*#__PURE__*/function () {
|
|
549
548
|
return get;
|
550
549
|
}()
|
551
550
|
/**
|
552
|
-
* List
|
551
|
+
* List IPOrgs.
|
553
552
|
*
|
554
553
|
* @returns the response object that contains a list of IPOrgs
|
555
554
|
*/
|
@@ -1173,6 +1172,878 @@ var storyProtocolJson = [
|
|
1173
1172
|
],
|
1174
1173
|
stateMutability: "nonpayable",
|
1175
1174
|
type: "function"
|
1175
|
+
},
|
1176
|
+
{
|
1177
|
+
inputs: [
|
1178
|
+
{
|
1179
|
+
internalType: "uint8",
|
1180
|
+
name: "hookType",
|
1181
|
+
type: "uint8"
|
1182
|
+
}
|
1183
|
+
],
|
1184
|
+
name: "BaseModule_HooksParamsLengthMismatch",
|
1185
|
+
type: "error"
|
1186
|
+
},
|
1187
|
+
{
|
1188
|
+
inputs: [
|
1189
|
+
],
|
1190
|
+
name: "BaseModule_OnlyModuleRegistry",
|
1191
|
+
type: "error"
|
1192
|
+
},
|
1193
|
+
{
|
1194
|
+
inputs: [
|
1195
|
+
],
|
1196
|
+
name: "BaseModule_ZeroIpaRegistry",
|
1197
|
+
type: "error"
|
1198
|
+
},
|
1199
|
+
{
|
1200
|
+
inputs: [
|
1201
|
+
],
|
1202
|
+
name: "BaseModule_ZeroLicenseRegistry",
|
1203
|
+
type: "error"
|
1204
|
+
},
|
1205
|
+
{
|
1206
|
+
inputs: [
|
1207
|
+
],
|
1208
|
+
name: "BaseModule_ZeroModuleRegistry",
|
1209
|
+
type: "error"
|
1210
|
+
},
|
1211
|
+
{
|
1212
|
+
inputs: [
|
1213
|
+
],
|
1214
|
+
name: "BaseRelationshipProcessor_OnlyRelationshipModule",
|
1215
|
+
type: "error"
|
1216
|
+
},
|
1217
|
+
{
|
1218
|
+
inputs: [
|
1219
|
+
],
|
1220
|
+
name: "CollectModule_CallerUnauthorized",
|
1221
|
+
type: "error"
|
1222
|
+
},
|
1223
|
+
{
|
1224
|
+
inputs: [
|
1225
|
+
],
|
1226
|
+
name: "CollectModule_CollectNotYetInitialized",
|
1227
|
+
type: "error"
|
1228
|
+
},
|
1229
|
+
{
|
1230
|
+
inputs: [
|
1231
|
+
],
|
1232
|
+
name: "CollectModule_CollectUnauthorized",
|
1233
|
+
type: "error"
|
1234
|
+
},
|
1235
|
+
{
|
1236
|
+
inputs: [
|
1237
|
+
],
|
1238
|
+
name: "CollectModule_IPAssetAlreadyInitialized",
|
1239
|
+
type: "error"
|
1240
|
+
},
|
1241
|
+
{
|
1242
|
+
inputs: [
|
1243
|
+
],
|
1244
|
+
name: "CollectModule_IPAssetNonExistent",
|
1245
|
+
type: "error"
|
1246
|
+
},
|
1247
|
+
{
|
1248
|
+
inputs: [
|
1249
|
+
],
|
1250
|
+
name: "CollectModule_IPOrgNonExistent",
|
1251
|
+
type: "error"
|
1252
|
+
},
|
1253
|
+
{
|
1254
|
+
inputs: [
|
1255
|
+
],
|
1256
|
+
name: "CollectNFT_AlreadyInitialized",
|
1257
|
+
type: "error"
|
1258
|
+
},
|
1259
|
+
{
|
1260
|
+
inputs: [
|
1261
|
+
],
|
1262
|
+
name: "CollectNFT_CallerUnauthorized",
|
1263
|
+
type: "error"
|
1264
|
+
},
|
1265
|
+
{
|
1266
|
+
inputs: [
|
1267
|
+
],
|
1268
|
+
name: "CollectNFT_CollectorInvalid",
|
1269
|
+
type: "error"
|
1270
|
+
},
|
1271
|
+
{
|
1272
|
+
inputs: [
|
1273
|
+
],
|
1274
|
+
name: "CollectNFT_IPAssetNonExistent",
|
1275
|
+
type: "error"
|
1276
|
+
},
|
1277
|
+
{
|
1278
|
+
inputs: [
|
1279
|
+
],
|
1280
|
+
name: "CollectPaymentModule_AmountInvalid",
|
1281
|
+
type: "error"
|
1282
|
+
},
|
1283
|
+
{
|
1284
|
+
inputs: [
|
1285
|
+
],
|
1286
|
+
name: "CollectPaymentModule_ERC20TransferFailed",
|
1287
|
+
type: "error"
|
1288
|
+
},
|
1289
|
+
{
|
1290
|
+
inputs: [
|
1291
|
+
],
|
1292
|
+
name: "CollectPaymentModule_ERC20TransferInvalidABIEncoding",
|
1293
|
+
type: "error"
|
1294
|
+
},
|
1295
|
+
{
|
1296
|
+
inputs: [
|
1297
|
+
],
|
1298
|
+
name: "CollectPaymentModule_ERC20TransferInvalidReturnValue",
|
1299
|
+
type: "error"
|
1300
|
+
},
|
1301
|
+
{
|
1302
|
+
inputs: [
|
1303
|
+
],
|
1304
|
+
name: "CollectPaymentModule_InvalidSettings",
|
1305
|
+
type: "error"
|
1306
|
+
},
|
1307
|
+
{
|
1308
|
+
inputs: [
|
1309
|
+
],
|
1310
|
+
name: "CollectPaymentModule_NativeTokenNotAllowed",
|
1311
|
+
type: "error"
|
1312
|
+
},
|
1313
|
+
{
|
1314
|
+
inputs: [
|
1315
|
+
],
|
1316
|
+
name: "CollectPaymentModule_NativeTransferFailed",
|
1317
|
+
type: "error"
|
1318
|
+
},
|
1319
|
+
{
|
1320
|
+
inputs: [
|
1321
|
+
],
|
1322
|
+
name: "CollectPaymentModule_PaymentInsufficient",
|
1323
|
+
type: "error"
|
1324
|
+
},
|
1325
|
+
{
|
1326
|
+
inputs: [
|
1327
|
+
],
|
1328
|
+
name: "CollectPaymentModule_PaymentParamsInvalid",
|
1329
|
+
type: "error"
|
1330
|
+
},
|
1331
|
+
{
|
1332
|
+
inputs: [
|
1333
|
+
],
|
1334
|
+
name: "CollectPaymentModule_TokenInvalid",
|
1335
|
+
type: "error"
|
1336
|
+
},
|
1337
|
+
{
|
1338
|
+
inputs: [
|
1339
|
+
],
|
1340
|
+
name: "ERC721_OwnerInvalid",
|
1341
|
+
type: "error"
|
1342
|
+
},
|
1343
|
+
{
|
1344
|
+
inputs: [
|
1345
|
+
],
|
1346
|
+
name: "ERC721_ReceiverInvalid",
|
1347
|
+
type: "error"
|
1348
|
+
},
|
1349
|
+
{
|
1350
|
+
inputs: [
|
1351
|
+
],
|
1352
|
+
name: "ERC721_SafeTransferUnsupported",
|
1353
|
+
type: "error"
|
1354
|
+
},
|
1355
|
+
{
|
1356
|
+
inputs: [
|
1357
|
+
],
|
1358
|
+
name: "ERC721_SenderUnauthorized",
|
1359
|
+
type: "error"
|
1360
|
+
},
|
1361
|
+
{
|
1362
|
+
inputs: [
|
1363
|
+
],
|
1364
|
+
name: "ERC721_TokenAlreadyMinted",
|
1365
|
+
type: "error"
|
1366
|
+
},
|
1367
|
+
{
|
1368
|
+
inputs: [
|
1369
|
+
],
|
1370
|
+
name: "ERC721_TokenNonExistent",
|
1371
|
+
type: "error"
|
1372
|
+
},
|
1373
|
+
{
|
1374
|
+
inputs: [
|
1375
|
+
],
|
1376
|
+
name: "EmptyArray",
|
1377
|
+
type: "error"
|
1378
|
+
},
|
1379
|
+
{
|
1380
|
+
inputs: [
|
1381
|
+
],
|
1382
|
+
name: "HookRegistry_CallerNotIPOrgOwner",
|
1383
|
+
type: "error"
|
1384
|
+
},
|
1385
|
+
{
|
1386
|
+
inputs: [
|
1387
|
+
],
|
1388
|
+
name: "HookRegistry_HooksConfigLengthMismatch",
|
1389
|
+
type: "error"
|
1390
|
+
},
|
1391
|
+
{
|
1392
|
+
inputs: [
|
1393
|
+
{
|
1394
|
+
internalType: "uint256",
|
1395
|
+
name: "hooksIndex",
|
1396
|
+
type: "uint256"
|
1397
|
+
}
|
1398
|
+
],
|
1399
|
+
name: "HookRegistry_IndexOutOfBounds",
|
1400
|
+
type: "error"
|
1401
|
+
},
|
1402
|
+
{
|
1403
|
+
inputs: [
|
1404
|
+
],
|
1405
|
+
name: "HookRegistry_MaxHooksExceeded",
|
1406
|
+
type: "error"
|
1407
|
+
},
|
1408
|
+
{
|
1409
|
+
inputs: [
|
1410
|
+
],
|
1411
|
+
name: "HookRegistry_RegisteringDuplicatedHook",
|
1412
|
+
type: "error"
|
1413
|
+
},
|
1414
|
+
{
|
1415
|
+
inputs: [
|
1416
|
+
],
|
1417
|
+
name: "HookRegistry_RegisteringZeroAddressHook",
|
1418
|
+
type: "error"
|
1419
|
+
},
|
1420
|
+
{
|
1421
|
+
inputs: [
|
1422
|
+
{
|
1423
|
+
internalType: "bytes32",
|
1424
|
+
name: "invalidRequestId",
|
1425
|
+
type: "bytes32"
|
1426
|
+
}
|
1427
|
+
],
|
1428
|
+
name: "Hook_InvalidAsyncRequestId",
|
1429
|
+
type: "error"
|
1430
|
+
},
|
1431
|
+
{
|
1432
|
+
inputs: [
|
1433
|
+
{
|
1434
|
+
internalType: "address",
|
1435
|
+
name: "current",
|
1436
|
+
type: "address"
|
1437
|
+
},
|
1438
|
+
{
|
1439
|
+
internalType: "address",
|
1440
|
+
name: "expected",
|
1441
|
+
type: "address"
|
1442
|
+
}
|
1443
|
+
],
|
1444
|
+
name: "Hook_OnlyCallbackCallerCanCallback",
|
1445
|
+
type: "error"
|
1446
|
+
},
|
1447
|
+
{
|
1448
|
+
inputs: [
|
1449
|
+
],
|
1450
|
+
name: "Hook_UnsupportedAsyncOperation",
|
1451
|
+
type: "error"
|
1452
|
+
},
|
1453
|
+
{
|
1454
|
+
inputs: [
|
1455
|
+
],
|
1456
|
+
name: "Hook_UnsupportedSyncOperation",
|
1457
|
+
type: "error"
|
1458
|
+
},
|
1459
|
+
{
|
1460
|
+
inputs: [
|
1461
|
+
],
|
1462
|
+
name: "IPAccountImpl_CallerNotOwner",
|
1463
|
+
type: "error"
|
1464
|
+
},
|
1465
|
+
{
|
1466
|
+
inputs: [
|
1467
|
+
],
|
1468
|
+
name: "IPAccountRegistry_InitializationFailed",
|
1469
|
+
type: "error"
|
1470
|
+
},
|
1471
|
+
{
|
1472
|
+
inputs: [
|
1473
|
+
],
|
1474
|
+
name: "IPAccountRegistry_NonExistentIpAccountImpl",
|
1475
|
+
type: "error"
|
1476
|
+
},
|
1477
|
+
{
|
1478
|
+
inputs: [
|
1479
|
+
],
|
1480
|
+
name: "IPOrgController_IPOrgNonExistent",
|
1481
|
+
type: "error"
|
1482
|
+
},
|
1483
|
+
{
|
1484
|
+
inputs: [
|
1485
|
+
],
|
1486
|
+
name: "IPOrgController_InvalidIPOrgOwner",
|
1487
|
+
type: "error"
|
1488
|
+
},
|
1489
|
+
{
|
1490
|
+
inputs: [
|
1491
|
+
],
|
1492
|
+
name: "IPOrgController_InvalidNewIPOrgOwner",
|
1493
|
+
type: "error"
|
1494
|
+
},
|
1495
|
+
{
|
1496
|
+
inputs: [
|
1497
|
+
],
|
1498
|
+
name: "IPOrgController_InvalidOwner",
|
1499
|
+
type: "error"
|
1500
|
+
},
|
1501
|
+
{
|
1502
|
+
inputs: [
|
1503
|
+
],
|
1504
|
+
name: "IPOrgController_OwnerTransferUninitialized",
|
1505
|
+
type: "error"
|
1506
|
+
},
|
1507
|
+
{
|
1508
|
+
inputs: [
|
1509
|
+
],
|
1510
|
+
name: "IPOrg_IdDoesNotExist",
|
1511
|
+
type: "error"
|
1512
|
+
},
|
1513
|
+
{
|
1514
|
+
inputs: [
|
1515
|
+
],
|
1516
|
+
name: "IPOrg_IdOverBounds",
|
1517
|
+
type: "error"
|
1518
|
+
},
|
1519
|
+
{
|
1520
|
+
inputs: [
|
1521
|
+
],
|
1522
|
+
name: "IPOrg_LicensingNotConfigured",
|
1523
|
+
type: "error"
|
1524
|
+
},
|
1525
|
+
{
|
1526
|
+
inputs: [
|
1527
|
+
],
|
1528
|
+
name: "LengthMismatch",
|
1529
|
+
type: "error"
|
1530
|
+
},
|
1531
|
+
{
|
1532
|
+
inputs: [
|
1533
|
+
],
|
1534
|
+
name: "LibDuration_CallerNotRenewer",
|
1535
|
+
type: "error"
|
1536
|
+
},
|
1537
|
+
{
|
1538
|
+
inputs: [
|
1539
|
+
],
|
1540
|
+
name: "LibDuration_InvalidStartTime",
|
1541
|
+
type: "error"
|
1542
|
+
},
|
1543
|
+
{
|
1544
|
+
inputs: [
|
1545
|
+
],
|
1546
|
+
name: "LibDuration_NotRenewable",
|
1547
|
+
type: "error"
|
1548
|
+
},
|
1549
|
+
{
|
1550
|
+
inputs: [
|
1551
|
+
],
|
1552
|
+
name: "LibDuration_ZeroTTL",
|
1553
|
+
type: "error"
|
1554
|
+
},
|
1555
|
+
{
|
1556
|
+
inputs: [
|
1557
|
+
],
|
1558
|
+
name: "LibUintArrayMask_EmptyArray",
|
1559
|
+
type: "error"
|
1560
|
+
},
|
1561
|
+
{
|
1562
|
+
inputs: [
|
1563
|
+
],
|
1564
|
+
name: "LicenseRegistry_CallerNotLicensingModule",
|
1565
|
+
type: "error"
|
1566
|
+
},
|
1567
|
+
{
|
1568
|
+
inputs: [
|
1569
|
+
],
|
1570
|
+
name: "LicenseRegistry_CallerNotRevoker",
|
1571
|
+
type: "error"
|
1572
|
+
},
|
1573
|
+
{
|
1574
|
+
inputs: [
|
1575
|
+
],
|
1576
|
+
name: "LicenseRegistry_InvalidIpa",
|
1577
|
+
type: "error"
|
1578
|
+
},
|
1579
|
+
{
|
1580
|
+
inputs: [
|
1581
|
+
],
|
1582
|
+
name: "LicenseRegistry_InvalidLicenseStatus",
|
1583
|
+
type: "error"
|
1584
|
+
},
|
1585
|
+
{
|
1586
|
+
inputs: [
|
1587
|
+
],
|
1588
|
+
name: "LicenseRegistry_LicenseNotPending",
|
1589
|
+
type: "error"
|
1590
|
+
},
|
1591
|
+
{
|
1592
|
+
inputs: [
|
1593
|
+
],
|
1594
|
+
name: "LicenseRegistry_NotLicenseNFT",
|
1595
|
+
type: "error"
|
1596
|
+
},
|
1597
|
+
{
|
1598
|
+
inputs: [
|
1599
|
+
],
|
1600
|
+
name: "LicenseRegistry_UnknownLicenseId",
|
1601
|
+
type: "error"
|
1602
|
+
},
|
1603
|
+
{
|
1604
|
+
inputs: [
|
1605
|
+
],
|
1606
|
+
name: "LicenseRegistry_ZeroIpaRegistryAddress",
|
1607
|
+
type: "error"
|
1608
|
+
},
|
1609
|
+
{
|
1610
|
+
inputs: [
|
1611
|
+
],
|
1612
|
+
name: "LicenseRegistry_ZeroModuleRegistryAddress",
|
1613
|
+
type: "error"
|
1614
|
+
},
|
1615
|
+
{
|
1616
|
+
inputs: [
|
1617
|
+
],
|
1618
|
+
name: "LicensingModule_CallerNotIpOrgOwner",
|
1619
|
+
type: "error"
|
1620
|
+
},
|
1621
|
+
{
|
1622
|
+
inputs: [
|
1623
|
+
],
|
1624
|
+
name: "LicensingModule_CallerNotLicenseOwner",
|
1625
|
+
type: "error"
|
1626
|
+
},
|
1627
|
+
{
|
1628
|
+
inputs: [
|
1629
|
+
],
|
1630
|
+
name: "LicensingModule_CallerNotLicensor",
|
1631
|
+
type: "error"
|
1632
|
+
},
|
1633
|
+
{
|
1634
|
+
inputs: [
|
1635
|
+
],
|
1636
|
+
name: "LicensingModule_CantFindParentLicenseOrRelatedIpa",
|
1637
|
+
type: "error"
|
1638
|
+
},
|
1639
|
+
{
|
1640
|
+
inputs: [
|
1641
|
+
],
|
1642
|
+
name: "LicensingModule_CommercialLicenseNotAllowed",
|
1643
|
+
type: "error"
|
1644
|
+
},
|
1645
|
+
{
|
1646
|
+
inputs: [
|
1647
|
+
],
|
1648
|
+
name: "LicensingModule_DuplicateTermId",
|
1649
|
+
type: "error"
|
1650
|
+
},
|
1651
|
+
{
|
1652
|
+
inputs: [
|
1653
|
+
],
|
1654
|
+
name: "LicensingModule_InvalidAction",
|
1655
|
+
type: "error"
|
1656
|
+
},
|
1657
|
+
{
|
1658
|
+
inputs: [
|
1659
|
+
],
|
1660
|
+
name: "LicensingModule_InvalidConfigType",
|
1661
|
+
type: "error"
|
1662
|
+
},
|
1663
|
+
{
|
1664
|
+
inputs: [
|
1665
|
+
],
|
1666
|
+
name: "LicensingModule_InvalidIpa",
|
1667
|
+
type: "error"
|
1668
|
+
},
|
1669
|
+
{
|
1670
|
+
inputs: [
|
1671
|
+
],
|
1672
|
+
name: "LicensingModule_InvalidLicenseeType",
|
1673
|
+
type: "error"
|
1674
|
+
},
|
1675
|
+
{
|
1676
|
+
inputs: [
|
1677
|
+
],
|
1678
|
+
name: "LicensingModule_InvalidLicensorType",
|
1679
|
+
type: "error"
|
1680
|
+
},
|
1681
|
+
{
|
1682
|
+
inputs: [
|
1683
|
+
],
|
1684
|
+
name: "LicensingModule_InvalidTermCommercialStatus",
|
1685
|
+
type: "error"
|
1686
|
+
},
|
1687
|
+
{
|
1688
|
+
inputs: [
|
1689
|
+
],
|
1690
|
+
name: "LicensingModule_IpOrgFrameworkAlreadySet",
|
1691
|
+
type: "error"
|
1692
|
+
},
|
1693
|
+
{
|
1694
|
+
inputs: [
|
1695
|
+
],
|
1696
|
+
name: "LicensingModule_IpOrgNotConfigured",
|
1697
|
+
type: "error"
|
1698
|
+
},
|
1699
|
+
{
|
1700
|
+
inputs: [
|
1701
|
+
],
|
1702
|
+
name: "LicensingModule_NonCommercialTermsRequired",
|
1703
|
+
type: "error"
|
1704
|
+
},
|
1705
|
+
{
|
1706
|
+
inputs: [
|
1707
|
+
],
|
1708
|
+
name: "LicensingModule_ParentLicenseNotActive",
|
1709
|
+
type: "error"
|
1710
|
+
},
|
1711
|
+
{
|
1712
|
+
inputs: [
|
1713
|
+
],
|
1714
|
+
name: "LicensingModule_ShareAlikeDisabled",
|
1715
|
+
type: "error"
|
1716
|
+
},
|
1717
|
+
{
|
1718
|
+
inputs: [
|
1719
|
+
],
|
1720
|
+
name: "LicensingModule_ipOrgTermNotFound",
|
1721
|
+
type: "error"
|
1722
|
+
},
|
1723
|
+
{
|
1724
|
+
inputs: [
|
1725
|
+
],
|
1726
|
+
name: "LicensorApprovalHook_ApprovalAlreadyRequested",
|
1727
|
+
type: "error"
|
1728
|
+
},
|
1729
|
+
{
|
1730
|
+
inputs: [
|
1731
|
+
],
|
1732
|
+
name: "LicensorApprovalHook_InvalidLicenseId",
|
1733
|
+
type: "error"
|
1734
|
+
},
|
1735
|
+
{
|
1736
|
+
inputs: [
|
1737
|
+
],
|
1738
|
+
name: "LicensorApprovalHook_InvalidLicensor",
|
1739
|
+
type: "error"
|
1740
|
+
},
|
1741
|
+
{
|
1742
|
+
inputs: [
|
1743
|
+
],
|
1744
|
+
name: "LicensorApprovalHook_InvalidResponseStatus",
|
1745
|
+
type: "error"
|
1746
|
+
},
|
1747
|
+
{
|
1748
|
+
inputs: [
|
1749
|
+
],
|
1750
|
+
name: "LicensorApprovalHook_NoApprovalRequested",
|
1751
|
+
type: "error"
|
1752
|
+
},
|
1753
|
+
{
|
1754
|
+
inputs: [
|
1755
|
+
{
|
1756
|
+
internalType: "bytes32",
|
1757
|
+
name: "role",
|
1758
|
+
type: "bytes32"
|
1759
|
+
},
|
1760
|
+
{
|
1761
|
+
internalType: "address",
|
1762
|
+
name: "account",
|
1763
|
+
type: "address"
|
1764
|
+
}
|
1765
|
+
],
|
1766
|
+
name: "MissingRole",
|
1767
|
+
type: "error"
|
1768
|
+
},
|
1769
|
+
{
|
1770
|
+
inputs: [
|
1771
|
+
],
|
1772
|
+
name: "ModuleRegistry_CallerNotOrgOwner",
|
1773
|
+
type: "error"
|
1774
|
+
},
|
1775
|
+
{
|
1776
|
+
inputs: [
|
1777
|
+
{
|
1778
|
+
internalType: "string",
|
1779
|
+
name: "moduleName",
|
1780
|
+
type: "string"
|
1781
|
+
}
|
1782
|
+
],
|
1783
|
+
name: "ModuleRegistry_ModuleNotRegistered",
|
1784
|
+
type: "error"
|
1785
|
+
},
|
1786
|
+
{
|
1787
|
+
inputs: [
|
1788
|
+
{
|
1789
|
+
internalType: "uint256",
|
1790
|
+
name: "id",
|
1791
|
+
type: "uint256"
|
1792
|
+
}
|
1793
|
+
],
|
1794
|
+
name: "NonExistentID",
|
1795
|
+
type: "error"
|
1796
|
+
},
|
1797
|
+
{
|
1798
|
+
inputs: [
|
1799
|
+
],
|
1800
|
+
name: "RegistrationModule_CallerNotAuthorized",
|
1801
|
+
type: "error"
|
1802
|
+
},
|
1803
|
+
{
|
1804
|
+
inputs: [
|
1805
|
+
],
|
1806
|
+
name: "RegistrationModule_IPAssetNonExistent",
|
1807
|
+
type: "error"
|
1808
|
+
},
|
1809
|
+
{
|
1810
|
+
inputs: [
|
1811
|
+
],
|
1812
|
+
name: "RegistrationModule_IPOrgNotConfigured",
|
1813
|
+
type: "error"
|
1814
|
+
},
|
1815
|
+
{
|
1816
|
+
inputs: [
|
1817
|
+
],
|
1818
|
+
name: "RegistrationModule_InvalidCaller",
|
1819
|
+
type: "error"
|
1820
|
+
},
|
1821
|
+
{
|
1822
|
+
inputs: [
|
1823
|
+
],
|
1824
|
+
name: "RegistrationModule_InvalidConfigOperation",
|
1825
|
+
type: "error"
|
1826
|
+
},
|
1827
|
+
{
|
1828
|
+
inputs: [
|
1829
|
+
],
|
1830
|
+
name: "RegistrationModule_InvalidExecutionOperation",
|
1831
|
+
type: "error"
|
1832
|
+
},
|
1833
|
+
{
|
1834
|
+
inputs: [
|
1835
|
+
],
|
1836
|
+
name: "RegistrationModule_InvalidIPAssetType",
|
1837
|
+
type: "error"
|
1838
|
+
},
|
1839
|
+
{
|
1840
|
+
inputs: [
|
1841
|
+
],
|
1842
|
+
name: "RegistrationModule_TooManyAssetTypes",
|
1843
|
+
type: "error"
|
1844
|
+
},
|
1845
|
+
{
|
1846
|
+
inputs: [
|
1847
|
+
],
|
1848
|
+
name: "RelationshipModule_CallerNotIpOrgOwner",
|
1849
|
+
type: "error"
|
1850
|
+
},
|
1851
|
+
{
|
1852
|
+
inputs: [
|
1853
|
+
],
|
1854
|
+
name: "RelationshipModule_CannotRelateToOtherIPOrg",
|
1855
|
+
type: "error"
|
1856
|
+
},
|
1857
|
+
{
|
1858
|
+
inputs: [
|
1859
|
+
],
|
1860
|
+
name: "RelationshipModule_IntentAlreadyRegistered",
|
1861
|
+
type: "error"
|
1862
|
+
},
|
1863
|
+
{
|
1864
|
+
inputs: [
|
1865
|
+
],
|
1866
|
+
name: "RelationshipModule_InvalidConfigOperation",
|
1867
|
+
type: "error"
|
1868
|
+
},
|
1869
|
+
{
|
1870
|
+
inputs: [
|
1871
|
+
],
|
1872
|
+
name: "RelationshipModule_InvalidDstAddress",
|
1873
|
+
type: "error"
|
1874
|
+
},
|
1875
|
+
{
|
1876
|
+
inputs: [
|
1877
|
+
],
|
1878
|
+
name: "RelationshipModule_InvalidDstId",
|
1879
|
+
type: "error"
|
1880
|
+
},
|
1881
|
+
{
|
1882
|
+
inputs: [
|
1883
|
+
],
|
1884
|
+
name: "RelationshipModule_InvalidEndTimestamp",
|
1885
|
+
type: "error"
|
1886
|
+
},
|
1887
|
+
{
|
1888
|
+
inputs: [
|
1889
|
+
],
|
1890
|
+
name: "RelationshipModule_InvalidRelatable",
|
1891
|
+
type: "error"
|
1892
|
+
},
|
1893
|
+
{
|
1894
|
+
inputs: [
|
1895
|
+
],
|
1896
|
+
name: "RelationshipModule_InvalidSrcAddress",
|
1897
|
+
type: "error"
|
1898
|
+
},
|
1899
|
+
{
|
1900
|
+
inputs: [
|
1901
|
+
],
|
1902
|
+
name: "RelationshipModule_InvalidSrcId",
|
1903
|
+
type: "error"
|
1904
|
+
},
|
1905
|
+
{
|
1906
|
+
inputs: [
|
1907
|
+
],
|
1908
|
+
name: "RelationshipModule_InvalidTTL",
|
1909
|
+
type: "error"
|
1910
|
+
},
|
1911
|
+
{
|
1912
|
+
inputs: [
|
1913
|
+
],
|
1914
|
+
name: "RelationshipModule_IpOrgRelatableCannotBeProtocolLevel",
|
1915
|
+
type: "error"
|
1916
|
+
},
|
1917
|
+
{
|
1918
|
+
inputs: [
|
1919
|
+
],
|
1920
|
+
name: "RelationshipModule_NonExistingRelationship",
|
1921
|
+
type: "error"
|
1922
|
+
},
|
1923
|
+
{
|
1924
|
+
inputs: [
|
1925
|
+
{
|
1926
|
+
internalType: "string",
|
1927
|
+
name: "relType",
|
1928
|
+
type: "string"
|
1929
|
+
}
|
1930
|
+
],
|
1931
|
+
name: "RelationshipModule_RelTypeNotSet",
|
1932
|
+
type: "error"
|
1933
|
+
},
|
1934
|
+
{
|
1935
|
+
inputs: [
|
1936
|
+
],
|
1937
|
+
name: "RelationshipModule_UnsupportedIpOrgIndexType",
|
1938
|
+
type: "error"
|
1939
|
+
},
|
1940
|
+
{
|
1941
|
+
inputs: [
|
1942
|
+
],
|
1943
|
+
name: "RelationshipModule_UnsupportedRelationshipDst",
|
1944
|
+
type: "error"
|
1945
|
+
},
|
1946
|
+
{
|
1947
|
+
inputs: [
|
1948
|
+
],
|
1949
|
+
name: "RelationshipModule_UnsupportedRelationshipSrc",
|
1950
|
+
type: "error"
|
1951
|
+
},
|
1952
|
+
{
|
1953
|
+
inputs: [
|
1954
|
+
{
|
1955
|
+
internalType: "uint256",
|
1956
|
+
name: "accountsLength",
|
1957
|
+
type: "uint256"
|
1958
|
+
},
|
1959
|
+
{
|
1960
|
+
internalType: "uint256",
|
1961
|
+
name: "allocationsLength",
|
1962
|
+
type: "uint256"
|
1963
|
+
}
|
1964
|
+
],
|
1965
|
+
name: "RoyaltyNFT_AccountsAndAllocationsMismatch",
|
1966
|
+
type: "error"
|
1967
|
+
},
|
1968
|
+
{
|
1969
|
+
inputs: [
|
1970
|
+
{
|
1971
|
+
internalType: "uint32",
|
1972
|
+
name: "allocationsSum",
|
1973
|
+
type: "uint32"
|
1974
|
+
}
|
1975
|
+
],
|
1976
|
+
name: "RoyaltyNFT_InvalidAllocationsSum",
|
1977
|
+
type: "error"
|
1978
|
+
},
|
1979
|
+
{
|
1980
|
+
inputs: [
|
1981
|
+
],
|
1982
|
+
name: "TermsRegistry_CommercialStatusUnset",
|
1983
|
+
type: "error"
|
1984
|
+
},
|
1985
|
+
{
|
1986
|
+
inputs: [
|
1987
|
+
],
|
1988
|
+
name: "TermsRegistry_TermAlreadyExists",
|
1989
|
+
type: "error"
|
1990
|
+
},
|
1991
|
+
{
|
1992
|
+
inputs: [
|
1993
|
+
],
|
1994
|
+
name: "TermsRegistry_UnsupportedTerm",
|
1995
|
+
type: "error"
|
1996
|
+
},
|
1997
|
+
{
|
1998
|
+
inputs: [
|
1999
|
+
],
|
2000
|
+
name: "TermsRegistry_UnsupportedTermCategory",
|
2001
|
+
type: "error"
|
2002
|
+
},
|
2003
|
+
{
|
2004
|
+
inputs: [
|
2005
|
+
{
|
2006
|
+
internalType: "address",
|
2007
|
+
name: "tokenAddress",
|
2008
|
+
type: "address"
|
2009
|
+
},
|
2010
|
+
{
|
2011
|
+
internalType: "address",
|
2012
|
+
name: "ownerAddress",
|
2013
|
+
type: "address"
|
2014
|
+
}
|
2015
|
+
],
|
2016
|
+
name: "TokenGatedHook_NotTokenOwner",
|
2017
|
+
type: "error"
|
2018
|
+
},
|
2019
|
+
{
|
2020
|
+
inputs: [
|
2021
|
+
],
|
2022
|
+
name: "Unauthorized",
|
2023
|
+
type: "error"
|
2024
|
+
},
|
2025
|
+
{
|
2026
|
+
inputs: [
|
2027
|
+
{
|
2028
|
+
internalType: "string",
|
2029
|
+
name: "name",
|
2030
|
+
type: "string"
|
2031
|
+
}
|
2032
|
+
],
|
2033
|
+
name: "UnsupportedInterface",
|
2034
|
+
type: "error"
|
2035
|
+
},
|
2036
|
+
{
|
2037
|
+
inputs: [
|
2038
|
+
],
|
2039
|
+
name: "ZeroAddress",
|
2040
|
+
type: "error"
|
2041
|
+
},
|
2042
|
+
{
|
2043
|
+
inputs: [
|
2044
|
+
],
|
2045
|
+
name: "ZeroAmount",
|
2046
|
+
type: "error"
|
1176
2047
|
}
|
1177
2048
|
];
|
1178
2049
|
|
@@ -1748,33 +2619,6 @@ function isIntegerString(s) {
|
|
1748
2619
|
function parseToBigInt(num) {
|
1749
2620
|
return BigInt(num);
|
1750
2621
|
}
|
1751
|
-
function fileToBase64(file) {
|
1752
|
-
return new Promise(function (resolve, reject) {
|
1753
|
-
// convert file to base64
|
1754
|
-
if (file instanceof Buffer) {
|
1755
|
-
resolve(file.toString("base64"));
|
1756
|
-
return;
|
1757
|
-
}
|
1758
|
-
if (file instanceof File) {
|
1759
|
-
var reader = new FileReader();
|
1760
|
-
reader.readAsDataURL(file);
|
1761
|
-
reader.onload = function () {
|
1762
|
-
var _reader$result;
|
1763
|
-
var base64 = (_reader$result = reader.result) === null || _reader$result === void 0 ? void 0 : _reader$result.toString().split(",")[1];
|
1764
|
-
if (base64) {
|
1765
|
-
resolve(base64);
|
1766
|
-
} else {
|
1767
|
-
reject(new Error("Failed to convert file to base64"));
|
1768
|
-
}
|
1769
|
-
};
|
1770
|
-
reader.onerror = function (error) {
|
1771
|
-
return reject(error);
|
1772
|
-
};
|
1773
|
-
return;
|
1774
|
-
}
|
1775
|
-
reject(new Error("Invalid file type"));
|
1776
|
-
});
|
1777
|
-
}
|
1778
2622
|
function waitTxAndFilterLog(_x, _x2, _x3) {
|
1779
2623
|
return _waitTxAndFilterLog.apply(this, arguments);
|
1780
2624
|
}
|
@@ -1837,18 +2681,27 @@ function _waitTxAndFilterLog() {
|
|
1837
2681
|
}));
|
1838
2682
|
return _waitTxAndFilterLog.apply(this, arguments);
|
1839
2683
|
}
|
1840
|
-
|
2684
|
+
function dictToQueryParams(params) {
|
1841
2685
|
var queryParamList = [];
|
1842
2686
|
for (var key in params) {
|
1843
2687
|
var value = params[key];
|
1844
2688
|
queryParamList.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value)));
|
1845
2689
|
}
|
1846
2690
|
return queryParamList.join("&");
|
1847
|
-
}
|
2691
|
+
}
|
2692
|
+
function typedDataArrayToBytesArray(typedDataArray) {
|
2693
|
+
var result = [];
|
2694
|
+
typedDataArray.forEach(function (typedData) {
|
2695
|
+
result.push(typedDataToBytes(typedData));
|
2696
|
+
});
|
2697
|
+
return result;
|
2698
|
+
}
|
2699
|
+
function typedDataToBytes(typedData) {
|
2700
|
+
return encodeAbiParameters(parseAbiParameters(typedData["interface"]), typedData.data);
|
2701
|
+
}
|
1848
2702
|
|
1849
2703
|
/**
|
1850
|
-
* IPOrgClient allows you to create,
|
1851
|
-
* Story Protocol.
|
2704
|
+
* IPOrgClient allows you to create, view, search IPOrgs on Story Protocol.
|
1852
2705
|
*/
|
1853
2706
|
var IPOrgClient = /*#__PURE__*/function (_IPOrgReadOnlyClient) {
|
1854
2707
|
_inherits(IPOrgClient, _IPOrgReadOnlyClient);
|
@@ -1930,7 +2783,7 @@ var IPOrgClient = /*#__PURE__*/function (_IPOrgReadOnlyClient) {
|
|
1930
2783
|
}(IPOrgReadOnlyClient);
|
1931
2784
|
|
1932
2785
|
/**
|
1933
|
-
*
|
2786
|
+
* RelationshipReadOnlyClient allows you to view and search relationships on Story Protocol.
|
1934
2787
|
*/
|
1935
2788
|
var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
1936
2789
|
function RelationshipReadOnlyClient(httpClient, rpcClient) {
|
@@ -1942,8 +2795,8 @@ var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
|
1942
2795
|
/**
|
1943
2796
|
* Get a relationship by its ID.
|
1944
2797
|
*
|
1945
|
-
* @param
|
1946
|
-
* @returns
|
2798
|
+
* @param request - the request object for getting the relationship
|
2799
|
+
* @returns the response object that contains the fetched relationship object
|
1947
2800
|
*/
|
1948
2801
|
_createClass(RelationshipReadOnlyClient, [{
|
1949
2802
|
key: "get",
|
@@ -1981,9 +2834,9 @@ var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
|
1981
2834
|
return get;
|
1982
2835
|
}()
|
1983
2836
|
/**
|
1984
|
-
* List
|
2837
|
+
* List relationships.
|
1985
2838
|
*
|
1986
|
-
* @returns
|
2839
|
+
* @returns the response object that contains a list of relationships.
|
1987
2840
|
*/
|
1988
2841
|
}, {
|
1989
2842
|
key: "list",
|
@@ -1997,8 +2850,8 @@ var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
|
1997
2850
|
_context2.next = 3;
|
1998
2851
|
return this.httpClient.post("/protocol/relationship", request, {
|
1999
2852
|
params: {
|
2000
|
-
contract:
|
2001
|
-
tokenId: request
|
2853
|
+
contract: request.contract,
|
2854
|
+
tokenId: request.tokenId
|
2002
2855
|
}
|
2003
2856
|
});
|
2004
2857
|
case 3:
|
@@ -2024,7 +2877,7 @@ var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
|
2024
2877
|
}();
|
2025
2878
|
|
2026
2879
|
/**
|
2027
|
-
*
|
2880
|
+
* IPAssetReadOnlyClient allows you to view and search IP Assets on Story Protocol.
|
2028
2881
|
*/
|
2029
2882
|
var IPAssetReadOnlyClient = /*#__PURE__*/function () {
|
2030
2883
|
function IPAssetReadOnlyClient(httpClient, rpcClient) {
|
@@ -2075,7 +2928,7 @@ var IPAssetReadOnlyClient = /*#__PURE__*/function () {
|
|
2075
2928
|
return get;
|
2076
2929
|
}()
|
2077
2930
|
/**
|
2078
|
-
* List
|
2931
|
+
* List IP assets.
|
2079
2932
|
*
|
2080
2933
|
* @returns the response object that contains results from listing query.
|
2081
2934
|
*/
|
@@ -3113,7 +3966,7 @@ var registrationModuleConfig = {
|
|
3113
3966
|
};
|
3114
3967
|
|
3115
3968
|
/**
|
3116
|
-
* IpAssetClient allows you to create, view, and
|
3969
|
+
* IpAssetClient allows you to create, view, and search IP Assets on Story Protocol.
|
3117
3970
|
*/
|
3118
3971
|
var IPAssetClient = /*#__PURE__*/function (_IPAssetReadOnlyClien) {
|
3119
3972
|
_inherits(IPAssetClient, _IPAssetReadOnlyClien);
|
@@ -3147,12 +4000,12 @@ var IPAssetClient = /*#__PURE__*/function (_IPAssetReadOnlyClien) {
|
|
3147
4000
|
args: [getAddress(request.ipOrgId), {
|
3148
4001
|
owner: getAddress(request.owner || this.wallet.account.address),
|
3149
4002
|
name: request.name,
|
3150
|
-
ipOrgAssetType: parseToBigInt(request.
|
4003
|
+
ipOrgAssetType: parseToBigInt(request.typeIndex),
|
3151
4004
|
hash: toHex(request.contentHash || "", {
|
3152
4005
|
size: 32
|
3153
4006
|
}),
|
3154
4007
|
mediaUrl: request.mediaUrl || ""
|
3155
|
-
}, [], []],
|
4008
|
+
}, request.preHookData ? typedDataArrayToBytesArray(request.preHookData) : [], request.postHookData ? typedDataArrayToBytesArray(request.postHookData) : []],
|
3156
4009
|
account: this.wallet.account
|
3157
4010
|
}));
|
3158
4011
|
case 3:
|
@@ -3303,8 +4156,7 @@ var LicenseReadOnlyClient = /*#__PURE__*/function () {
|
|
3303
4156
|
}();
|
3304
4157
|
|
3305
4158
|
/**
|
3306
|
-
* TransactionClient allows you to view and monitor transactions on
|
3307
|
-
* Story Protocol.
|
4159
|
+
* TransactionClient allows you to view and monitor transactions on Story Protocol.
|
3308
4160
|
*/
|
3309
4161
|
var TransactionReadOnlyClient = /*#__PURE__*/function () {
|
3310
4162
|
function TransactionReadOnlyClient(httpClient, rpcClient) {
|
@@ -3349,10 +4201,9 @@ var TransactionReadOnlyClient = /*#__PURE__*/function () {
|
|
3349
4201
|
return get;
|
3350
4202
|
}()
|
3351
4203
|
/**
|
3352
|
-
*
|
4204
|
+
* List Transactions.
|
3353
4205
|
*
|
3354
|
-
* @
|
3355
|
-
* @returns the response object that contains the fetched transaction object
|
4206
|
+
* @returns the response object that contains a list of transactions
|
3356
4207
|
*/
|
3357
4208
|
}, {
|
3358
4209
|
key: "list",
|
@@ -3374,7 +4225,7 @@ var TransactionReadOnlyClient = /*#__PURE__*/function () {
|
|
3374
4225
|
case 8:
|
3375
4226
|
_context2.prev = 8;
|
3376
4227
|
_context2.t0 = _context2["catch"](0);
|
3377
|
-
handleError(_context2.t0, "Failed to
|
4228
|
+
handleError(_context2.t0, "Failed to list transactions");
|
3378
4229
|
case 11:
|
3379
4230
|
case "end":
|
3380
4231
|
return _context2.stop();
|
@@ -3391,8 +4242,7 @@ var TransactionReadOnlyClient = /*#__PURE__*/function () {
|
|
3391
4242
|
}();
|
3392
4243
|
|
3393
4244
|
/**
|
3394
|
-
* TransactionClient allows you to view and monitor transactions on
|
3395
|
-
* Story Protocol.
|
4245
|
+
* TransactionClient allows you to view and monitor transactions on Story Protocol.
|
3396
4246
|
*/
|
3397
4247
|
var TransactionClient = /*#__PURE__*/function (_TransactionReadOnlyC) {
|
3398
4248
|
_inherits(TransactionClient, _TransactionReadOnlyC);
|
@@ -3413,8 +4263,7 @@ var TransactionClient = /*#__PURE__*/function (_TransactionReadOnlyC) {
|
|
3413
4263
|
var HTTP_TIMEOUT = 5000;
|
3414
4264
|
|
3415
4265
|
/**
|
3416
|
-
*
|
3417
|
-
* Story Protocol.
|
4266
|
+
* ModuleReadOnlyClient allows you to view and search modules on Story Protocol.
|
3418
4267
|
*/
|
3419
4268
|
var ModuleReadOnlyClient = /*#__PURE__*/function () {
|
3420
4269
|
function ModuleReadOnlyClient(httpClient, rpcClient) {
|
@@ -3459,10 +4308,9 @@ var ModuleReadOnlyClient = /*#__PURE__*/function () {
|
|
3459
4308
|
return get;
|
3460
4309
|
}()
|
3461
4310
|
/**
|
3462
|
-
*
|
4311
|
+
* List Modules.
|
3463
4312
|
*
|
3464
|
-
* @
|
3465
|
-
* @returns the response object that contains the fetched module object
|
4313
|
+
* @returns the response object that contains a list of modules
|
3466
4314
|
*/
|
3467
4315
|
}, {
|
3468
4316
|
key: "list",
|
@@ -3488,7 +4336,7 @@ var ModuleReadOnlyClient = /*#__PURE__*/function () {
|
|
3488
4336
|
case 8:
|
3489
4337
|
_context2.prev = 8;
|
3490
4338
|
_context2.t0 = _context2["catch"](0);
|
3491
|
-
handleError(_context2.t0, "Failed to
|
4339
|
+
handleError(_context2.t0, "Failed to list modules");
|
3492
4340
|
case 11:
|
3493
4341
|
case "end":
|
3494
4342
|
return _context2.stop();
|
@@ -3505,8 +4353,7 @@ var ModuleReadOnlyClient = /*#__PURE__*/function () {
|
|
3505
4353
|
}();
|
3506
4354
|
|
3507
4355
|
/**
|
3508
|
-
* ModuleClient allows you to view and
|
3509
|
-
* Story Protocol.
|
4356
|
+
* ModuleClient allows you to view and search modules on Story Protocol.
|
3510
4357
|
*/
|
3511
4358
|
var ModuleClient = /*#__PURE__*/function (_ModuleReadOnlyClient) {
|
3512
4359
|
_inherits(ModuleClient, _ModuleReadOnlyClient);
|
@@ -3522,8 +4369,7 @@ var ModuleClient = /*#__PURE__*/function (_ModuleReadOnlyClient) {
|
|
3522
4369
|
}(ModuleReadOnlyClient);
|
3523
4370
|
|
3524
4371
|
/**
|
3525
|
-
*
|
3526
|
-
* Story Protocol.
|
4372
|
+
* HookReadOnlyClient allows you to get and search hooks on Story Protocol.
|
3527
4373
|
*/
|
3528
4374
|
var HookReadOnlyClient = /*#__PURE__*/function () {
|
3529
4375
|
function HookReadOnlyClient(httpClient, rpcClient) {
|
@@ -3614,8 +4460,7 @@ var HookReadOnlyClient = /*#__PURE__*/function () {
|
|
3614
4460
|
}();
|
3615
4461
|
|
3616
4462
|
/**
|
3617
|
-
* HookClient allows you to view and
|
3618
|
-
* Story Protocol.
|
4463
|
+
* HookClient allows you to view and search hooks on Story Protocol.
|
3619
4464
|
*/
|
3620
4465
|
var HookClient = /*#__PURE__*/function (_HookReadOnlyClient) {
|
3621
4466
|
_inherits(HookClient, _HookReadOnlyClient);
|
@@ -3647,38 +4492,47 @@ var PlatformClient = /*#__PURE__*/function () {
|
|
3647
4492
|
key: "uploadFile",
|
3648
4493
|
value: function () {
|
3649
4494
|
var _uploadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file, mimeType) {
|
3650
|
-
var
|
4495
|
+
var preSignUrlResp, data, uploadResp, confirmResp;
|
3651
4496
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
3652
4497
|
while (1) switch (_context.prev = _context.next) {
|
3653
4498
|
case 0:
|
3654
4499
|
_context.prev = 0;
|
3655
4500
|
_context.next = 3;
|
3656
|
-
return
|
4501
|
+
return this.httpClient.post("/platform/file-upload/request");
|
3657
4502
|
case 3:
|
3658
|
-
|
3659
|
-
|
3660
|
-
base64: base64,
|
3661
|
-
mimeType: mimeType
|
3662
|
-
};
|
4503
|
+
preSignUrlResp = _context.sent;
|
4504
|
+
data = preSignUrlResp.data; // upload the file to s3
|
3663
4505
|
_context.next = 7;
|
3664
|
-
return this.httpClient.
|
4506
|
+
return this.httpClient.put(data.url, file, {
|
3665
4507
|
timeout: 0,
|
3666
4508
|
headers: {
|
3667
|
-
"Content-Type":
|
4509
|
+
"Content-Type": mimeType
|
3668
4510
|
}
|
3669
4511
|
});
|
3670
4512
|
case 7:
|
3671
|
-
|
3672
|
-
|
3673
|
-
|
3674
|
-
|
4513
|
+
uploadResp = _context.sent;
|
4514
|
+
if (!(uploadResp.status !== 200)) {
|
4515
|
+
_context.next = 10;
|
4516
|
+
break;
|
4517
|
+
}
|
4518
|
+
throw new Error("Failed to upload file to s3. Status: ".concat(uploadResp.status));
|
4519
|
+
case 10:
|
4520
|
+
_context.next = 12;
|
4521
|
+
return this.httpClient.post("/platform/file-upload/confirm", {
|
4522
|
+
key: data.key
|
4523
|
+
});
|
4524
|
+
case 12:
|
4525
|
+
confirmResp = _context.sent;
|
4526
|
+
return _context.abrupt("return", confirmResp.data);
|
4527
|
+
case 16:
|
4528
|
+
_context.prev = 16;
|
3675
4529
|
_context.t0 = _context["catch"](0);
|
3676
|
-
return _context.abrupt("return", handleError(_context.t0, "
|
3677
|
-
case
|
4530
|
+
return _context.abrupt("return", handleError(_context.t0, "Failed to upload file"));
|
4531
|
+
case 19:
|
3678
4532
|
case "end":
|
3679
4533
|
return _context.stop();
|
3680
4534
|
}
|
3681
|
-
}, _callee, this, [[0,
|
4535
|
+
}, _callee, this, [[0, 16]]);
|
3682
4536
|
}));
|
3683
4537
|
function uploadFile(_x, _x2) {
|
3684
4538
|
return _uploadFile.apply(this, arguments);
|
@@ -5645,7 +6499,7 @@ var relationshipModuleConfig = {
|
|
5645
6499
|
};
|
5646
6500
|
|
5647
6501
|
/**
|
5648
|
-
*
|
6502
|
+
* RelationshipClient allows you to create, view and search relationships on Story Protocol.
|
5649
6503
|
*/
|
5650
6504
|
var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
|
5651
6505
|
_inherits(RelationshipClient, _RelationshipReadOnly);
|
@@ -5682,7 +6536,7 @@ var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
|
|
5682
6536
|
srcId: request.srcTokenId,
|
5683
6537
|
dstAddress: request.dstContract,
|
5684
6538
|
dstId: request.dstTokenId
|
5685
|
-
}, [], []],
|
6539
|
+
}, request.preHookData ? typedDataArrayToBytesArray(request.preHookData) : [], request.postHookData ? typedDataArrayToBytesArray(request.postHookData) : []],
|
5686
6540
|
account: this.wallet.account
|
5687
6541
|
}));
|
5688
6542
|
case 3:
|
@@ -5733,7 +6587,7 @@ var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
|
|
5733
6587
|
}(RelationshipReadOnlyClient);
|
5734
6588
|
|
5735
6589
|
/**
|
5736
|
-
*
|
6590
|
+
* RelationshipTypeReadOnlyClient allows you to view and search relationship types on Story Protocol.
|
5737
6591
|
*/
|
5738
6592
|
var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
5739
6593
|
function RelationshipTypeReadOnlyClient(httpClient, rpcClient) {
|
@@ -5745,9 +6599,8 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5745
6599
|
/**
|
5746
6600
|
* Get a RelationshipType by ipOrgId or relType.
|
5747
6601
|
*
|
5748
|
-
* @param
|
5749
|
-
* @
|
5750
|
-
* @returns A Promise that resolves to the GetRelationshipTypeResponse.
|
6602
|
+
* @param request - the request object for getting the relationship type
|
6603
|
+
* @returns the response object that contains the fetched relationship type object
|
5751
6604
|
*/
|
5752
6605
|
_createClass(RelationshipTypeReadOnlyClient, [{
|
5753
6606
|
key: "get",
|
@@ -5767,7 +6620,7 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5767
6620
|
case 8:
|
5768
6621
|
_context.prev = 8;
|
5769
6622
|
_context.t0 = _context["catch"](0);
|
5770
|
-
handleError(_context.t0, "Failed to get
|
6623
|
+
handleError(_context.t0, "Failed to get relationship type");
|
5771
6624
|
case 11:
|
5772
6625
|
case "end":
|
5773
6626
|
return _context.stop();
|
@@ -5780,9 +6633,9 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5780
6633
|
return get;
|
5781
6634
|
}()
|
5782
6635
|
/**
|
5783
|
-
* List
|
6636
|
+
* List RelationshipTypes.
|
5784
6637
|
*
|
5785
|
-
* @returns
|
6638
|
+
* @returns the response object that contains a list of relationship types
|
5786
6639
|
*/
|
5787
6640
|
}, {
|
5788
6641
|
key: "list",
|
@@ -5806,7 +6659,7 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5806
6659
|
case 7:
|
5807
6660
|
_context2.prev = 7;
|
5808
6661
|
_context2.t0 = _context2["catch"](0);
|
5809
|
-
handleError(_context2.t0, "Failed to list
|
6662
|
+
handleError(_context2.t0, "Failed to list relationship types");
|
5810
6663
|
case 10:
|
5811
6664
|
case "end":
|
5812
6665
|
return _context2.stop();
|
@@ -5823,7 +6676,7 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5823
6676
|
}();
|
5824
6677
|
|
5825
6678
|
/**
|
5826
|
-
*
|
6679
|
+
* RelationshipTypeClient allows you to create, view and search relationship types on Story Protocol.
|
5827
6680
|
*/
|
5828
6681
|
var RelationshipTypeClient = /*#__PURE__*/function (_RelationshipTypeRead) {
|
5829
6682
|
_inherits(RelationshipTypeClient, _RelationshipTypeRead);
|
@@ -5860,8 +6713,8 @@ var RelationshipTypeClient = /*#__PURE__*/function (_RelationshipTypeRead) {
|
|
5860
6713
|
src: request.relatedElements.src,
|
5861
6714
|
dst: request.relatedElements.dst
|
5862
6715
|
},
|
5863
|
-
allowedSrcs: request.
|
5864
|
-
allowedDsts: request.
|
6716
|
+
allowedSrcs: request.allowedSrcIpAssetTypes,
|
6717
|
+
allowedDsts: request.allowedDstIpAssetTypes
|
5865
6718
|
}],
|
5866
6719
|
account: this.wallet.account
|
5867
6720
|
}));
|
@@ -5895,7 +6748,7 @@ var RelationshipTypeClient = /*#__PURE__*/function (_RelationshipTypeRead) {
|
|
5895
6748
|
case 17:
|
5896
6749
|
_context.prev = 17;
|
5897
6750
|
_context.t0 = _context["catch"](0);
|
5898
|
-
handleError(_context.t0, "Failed to register relationship");
|
6751
|
+
handleError(_context.t0, "Failed to register relationship type");
|
5899
6752
|
case 20:
|
5900
6753
|
case "end":
|
5901
6754
|
return _context.stop();
|
@@ -6190,31 +7043,19 @@ var StoryClient = /*#__PURE__*/function () {
|
|
6190
7043
|
return StoryClient;
|
6191
7044
|
}();
|
6192
7045
|
|
6193
|
-
/**
|
6194
|
-
* @public
|
6195
|
-
*/
|
6196
|
-
var IPAssetType = /*#__PURE__*/function (IPAssetType) {
|
6197
|
-
IPAssetType[IPAssetType["STORY"] = 1] = "STORY";
|
6198
|
-
IPAssetType[IPAssetType["CHARACTER"] = 2] = "CHARACTER";
|
6199
|
-
IPAssetType[IPAssetType["ART"] = 3] = "ART";
|
6200
|
-
IPAssetType[IPAssetType["LOCATION"] = 5] = "LOCATION";
|
6201
|
-
IPAssetType[IPAssetType["ITEM"] = 6] = "ITEM";
|
6202
|
-
return IPAssetType;
|
6203
|
-
}({});
|
6204
|
-
|
6205
7046
|
/**
|
6206
7047
|
* @public
|
6207
7048
|
*/
|
6208
7049
|
var ResourceType = /*#__PURE__*/function (ResourceType) {
|
6209
|
-
ResourceType[
|
6210
|
-
ResourceType[
|
6211
|
-
ResourceType[
|
6212
|
-
ResourceType[
|
6213
|
-
ResourceType[
|
6214
|
-
ResourceType[
|
6215
|
-
ResourceType[
|
6216
|
-
ResourceType[
|
6217
|
-
ResourceType[
|
7050
|
+
ResourceType["Unspecified"] = "Unspecified";
|
7051
|
+
ResourceType["IPOrg"] = "IPOrg";
|
7052
|
+
ResourceType["IPAsset"] = "IPAsset";
|
7053
|
+
ResourceType["License"] = "License";
|
7054
|
+
ResourceType["Relationship"] = "Relationship";
|
7055
|
+
ResourceType["RelationshipType"] = "RelationshipType";
|
7056
|
+
ResourceType["Module"] = "Module";
|
7057
|
+
ResourceType["Hook"] = "Hook";
|
7058
|
+
ResourceType["Dispute"] = "Dispute";
|
6218
7059
|
return ResourceType;
|
6219
7060
|
}({});
|
6220
7061
|
|
@@ -6222,8 +7063,8 @@ var ResourceType = /*#__PURE__*/function (ResourceType) {
|
|
6222
7063
|
* @public
|
6223
7064
|
*/
|
6224
7065
|
var HookType = /*#__PURE__*/function (HookType) {
|
6225
|
-
HookType[HookType["
|
6226
|
-
HookType[HookType["
|
7066
|
+
HookType[HookType["PreAction"] = 0] = "PreAction";
|
7067
|
+
HookType[HookType["PostAction"] = 1] = "PostAction";
|
6227
7068
|
return HookType;
|
6228
7069
|
}({});
|
6229
7070
|
|
@@ -6231,14 +7072,27 @@ var HookType = /*#__PURE__*/function (HookType) {
|
|
6231
7072
|
* @public
|
6232
7073
|
*/
|
6233
7074
|
var ActionType = /*#__PURE__*/function (ActionType) {
|
6234
|
-
ActionType[
|
6235
|
-
ActionType[
|
6236
|
-
ActionType[
|
6237
|
-
ActionType[
|
6238
|
-
ActionType[
|
7075
|
+
ActionType["Unspecified"] = "Unspecified";
|
7076
|
+
ActionType["Register"] = "Register";
|
7077
|
+
ActionType["Unregister"] = "Unregister";
|
7078
|
+
ActionType["Configure"] = "Configure";
|
7079
|
+
ActionType["Create"] = "Create";
|
6239
7080
|
return ActionType;
|
6240
7081
|
}({});
|
6241
7082
|
|
7083
|
+
/**
|
7084
|
+
* @public
|
7085
|
+
*/
|
7086
|
+
var Relatables = /*#__PURE__*/function (Relatables) {
|
7087
|
+
Relatables[Relatables["Undefined"] = 0] = "Undefined";
|
7088
|
+
Relatables[Relatables["IPA"] = 1] = "IPA";
|
7089
|
+
Relatables[Relatables["IPOrgEntry"] = 2] = "IPOrgEntry";
|
7090
|
+
Relatables[Relatables["License"] = 3] = "License";
|
7091
|
+
Relatables[Relatables["Address"] = 4] = "Address";
|
7092
|
+
Relatables[Relatables["ExternalNFT"] = 5] = "ExternalNFT";
|
7093
|
+
return Relatables;
|
7094
|
+
}({});
|
7095
|
+
|
6242
7096
|
var AddressZero = "0x0000000000000000000000000000000000000000";
|
6243
7097
|
|
6244
|
-
export { ActionType, AddressZero, HookReadOnlyClient, HookType, IPAssetClient, IPAssetReadOnlyClient,
|
7098
|
+
export { ActionType, AddressZero, HookReadOnlyClient, HookType, IPAssetClient, IPAssetReadOnlyClient, IPOrgClient, IPOrgReadOnlyClient, LicenseClient, LicenseReadOnlyClient, ModuleReadOnlyClient, PlatformClient, Relatables, RelationshipClient, ResourceType, StoryClient, TransactionClient };
|