@story-protocol/core-sdk 0.1.0-alpha-rc.3 → 0.1.0-alpha-rc.5
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/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
@@ -524,8 +524,7 @@ function handleError(error, msg) {
|
|
524
524
|
}
|
525
525
|
|
526
526
|
/**
|
527
|
-
* IPOrgReadOnlyClient allows you to view
|
528
|
-
* Story Protocol.
|
527
|
+
* IPOrgReadOnlyClient allows you to view and search IPOrgs on Story Protocol.
|
529
528
|
*/
|
530
529
|
var IPOrgReadOnlyClient = /*#__PURE__*/function () {
|
531
530
|
function IPOrgReadOnlyClient(httpClient, rpcClient) {
|
@@ -576,7 +575,7 @@ var IPOrgReadOnlyClient = /*#__PURE__*/function () {
|
|
576
575
|
return get;
|
577
576
|
}()
|
578
577
|
/**
|
579
|
-
* List
|
578
|
+
* List IPOrgs.
|
580
579
|
*
|
581
580
|
* @returns the response object that contains a list of IPOrgs
|
582
581
|
*/
|
@@ -1200,6 +1199,878 @@ var storyProtocolJson = [
|
|
1200
1199
|
],
|
1201
1200
|
stateMutability: "nonpayable",
|
1202
1201
|
type: "function"
|
1202
|
+
},
|
1203
|
+
{
|
1204
|
+
inputs: [
|
1205
|
+
{
|
1206
|
+
internalType: "uint8",
|
1207
|
+
name: "hookType",
|
1208
|
+
type: "uint8"
|
1209
|
+
}
|
1210
|
+
],
|
1211
|
+
name: "BaseModule_HooksParamsLengthMismatch",
|
1212
|
+
type: "error"
|
1213
|
+
},
|
1214
|
+
{
|
1215
|
+
inputs: [
|
1216
|
+
],
|
1217
|
+
name: "BaseModule_OnlyModuleRegistry",
|
1218
|
+
type: "error"
|
1219
|
+
},
|
1220
|
+
{
|
1221
|
+
inputs: [
|
1222
|
+
],
|
1223
|
+
name: "BaseModule_ZeroIpaRegistry",
|
1224
|
+
type: "error"
|
1225
|
+
},
|
1226
|
+
{
|
1227
|
+
inputs: [
|
1228
|
+
],
|
1229
|
+
name: "BaseModule_ZeroLicenseRegistry",
|
1230
|
+
type: "error"
|
1231
|
+
},
|
1232
|
+
{
|
1233
|
+
inputs: [
|
1234
|
+
],
|
1235
|
+
name: "BaseModule_ZeroModuleRegistry",
|
1236
|
+
type: "error"
|
1237
|
+
},
|
1238
|
+
{
|
1239
|
+
inputs: [
|
1240
|
+
],
|
1241
|
+
name: "BaseRelationshipProcessor_OnlyRelationshipModule",
|
1242
|
+
type: "error"
|
1243
|
+
},
|
1244
|
+
{
|
1245
|
+
inputs: [
|
1246
|
+
],
|
1247
|
+
name: "CollectModule_CallerUnauthorized",
|
1248
|
+
type: "error"
|
1249
|
+
},
|
1250
|
+
{
|
1251
|
+
inputs: [
|
1252
|
+
],
|
1253
|
+
name: "CollectModule_CollectNotYetInitialized",
|
1254
|
+
type: "error"
|
1255
|
+
},
|
1256
|
+
{
|
1257
|
+
inputs: [
|
1258
|
+
],
|
1259
|
+
name: "CollectModule_CollectUnauthorized",
|
1260
|
+
type: "error"
|
1261
|
+
},
|
1262
|
+
{
|
1263
|
+
inputs: [
|
1264
|
+
],
|
1265
|
+
name: "CollectModule_IPAssetAlreadyInitialized",
|
1266
|
+
type: "error"
|
1267
|
+
},
|
1268
|
+
{
|
1269
|
+
inputs: [
|
1270
|
+
],
|
1271
|
+
name: "CollectModule_IPAssetNonExistent",
|
1272
|
+
type: "error"
|
1273
|
+
},
|
1274
|
+
{
|
1275
|
+
inputs: [
|
1276
|
+
],
|
1277
|
+
name: "CollectModule_IPOrgNonExistent",
|
1278
|
+
type: "error"
|
1279
|
+
},
|
1280
|
+
{
|
1281
|
+
inputs: [
|
1282
|
+
],
|
1283
|
+
name: "CollectNFT_AlreadyInitialized",
|
1284
|
+
type: "error"
|
1285
|
+
},
|
1286
|
+
{
|
1287
|
+
inputs: [
|
1288
|
+
],
|
1289
|
+
name: "CollectNFT_CallerUnauthorized",
|
1290
|
+
type: "error"
|
1291
|
+
},
|
1292
|
+
{
|
1293
|
+
inputs: [
|
1294
|
+
],
|
1295
|
+
name: "CollectNFT_CollectorInvalid",
|
1296
|
+
type: "error"
|
1297
|
+
},
|
1298
|
+
{
|
1299
|
+
inputs: [
|
1300
|
+
],
|
1301
|
+
name: "CollectNFT_IPAssetNonExistent",
|
1302
|
+
type: "error"
|
1303
|
+
},
|
1304
|
+
{
|
1305
|
+
inputs: [
|
1306
|
+
],
|
1307
|
+
name: "CollectPaymentModule_AmountInvalid",
|
1308
|
+
type: "error"
|
1309
|
+
},
|
1310
|
+
{
|
1311
|
+
inputs: [
|
1312
|
+
],
|
1313
|
+
name: "CollectPaymentModule_ERC20TransferFailed",
|
1314
|
+
type: "error"
|
1315
|
+
},
|
1316
|
+
{
|
1317
|
+
inputs: [
|
1318
|
+
],
|
1319
|
+
name: "CollectPaymentModule_ERC20TransferInvalidABIEncoding",
|
1320
|
+
type: "error"
|
1321
|
+
},
|
1322
|
+
{
|
1323
|
+
inputs: [
|
1324
|
+
],
|
1325
|
+
name: "CollectPaymentModule_ERC20TransferInvalidReturnValue",
|
1326
|
+
type: "error"
|
1327
|
+
},
|
1328
|
+
{
|
1329
|
+
inputs: [
|
1330
|
+
],
|
1331
|
+
name: "CollectPaymentModule_InvalidSettings",
|
1332
|
+
type: "error"
|
1333
|
+
},
|
1334
|
+
{
|
1335
|
+
inputs: [
|
1336
|
+
],
|
1337
|
+
name: "CollectPaymentModule_NativeTokenNotAllowed",
|
1338
|
+
type: "error"
|
1339
|
+
},
|
1340
|
+
{
|
1341
|
+
inputs: [
|
1342
|
+
],
|
1343
|
+
name: "CollectPaymentModule_NativeTransferFailed",
|
1344
|
+
type: "error"
|
1345
|
+
},
|
1346
|
+
{
|
1347
|
+
inputs: [
|
1348
|
+
],
|
1349
|
+
name: "CollectPaymentModule_PaymentInsufficient",
|
1350
|
+
type: "error"
|
1351
|
+
},
|
1352
|
+
{
|
1353
|
+
inputs: [
|
1354
|
+
],
|
1355
|
+
name: "CollectPaymentModule_PaymentParamsInvalid",
|
1356
|
+
type: "error"
|
1357
|
+
},
|
1358
|
+
{
|
1359
|
+
inputs: [
|
1360
|
+
],
|
1361
|
+
name: "CollectPaymentModule_TokenInvalid",
|
1362
|
+
type: "error"
|
1363
|
+
},
|
1364
|
+
{
|
1365
|
+
inputs: [
|
1366
|
+
],
|
1367
|
+
name: "ERC721_OwnerInvalid",
|
1368
|
+
type: "error"
|
1369
|
+
},
|
1370
|
+
{
|
1371
|
+
inputs: [
|
1372
|
+
],
|
1373
|
+
name: "ERC721_ReceiverInvalid",
|
1374
|
+
type: "error"
|
1375
|
+
},
|
1376
|
+
{
|
1377
|
+
inputs: [
|
1378
|
+
],
|
1379
|
+
name: "ERC721_SafeTransferUnsupported",
|
1380
|
+
type: "error"
|
1381
|
+
},
|
1382
|
+
{
|
1383
|
+
inputs: [
|
1384
|
+
],
|
1385
|
+
name: "ERC721_SenderUnauthorized",
|
1386
|
+
type: "error"
|
1387
|
+
},
|
1388
|
+
{
|
1389
|
+
inputs: [
|
1390
|
+
],
|
1391
|
+
name: "ERC721_TokenAlreadyMinted",
|
1392
|
+
type: "error"
|
1393
|
+
},
|
1394
|
+
{
|
1395
|
+
inputs: [
|
1396
|
+
],
|
1397
|
+
name: "ERC721_TokenNonExistent",
|
1398
|
+
type: "error"
|
1399
|
+
},
|
1400
|
+
{
|
1401
|
+
inputs: [
|
1402
|
+
],
|
1403
|
+
name: "EmptyArray",
|
1404
|
+
type: "error"
|
1405
|
+
},
|
1406
|
+
{
|
1407
|
+
inputs: [
|
1408
|
+
],
|
1409
|
+
name: "HookRegistry_CallerNotIPOrgOwner",
|
1410
|
+
type: "error"
|
1411
|
+
},
|
1412
|
+
{
|
1413
|
+
inputs: [
|
1414
|
+
],
|
1415
|
+
name: "HookRegistry_HooksConfigLengthMismatch",
|
1416
|
+
type: "error"
|
1417
|
+
},
|
1418
|
+
{
|
1419
|
+
inputs: [
|
1420
|
+
{
|
1421
|
+
internalType: "uint256",
|
1422
|
+
name: "hooksIndex",
|
1423
|
+
type: "uint256"
|
1424
|
+
}
|
1425
|
+
],
|
1426
|
+
name: "HookRegistry_IndexOutOfBounds",
|
1427
|
+
type: "error"
|
1428
|
+
},
|
1429
|
+
{
|
1430
|
+
inputs: [
|
1431
|
+
],
|
1432
|
+
name: "HookRegistry_MaxHooksExceeded",
|
1433
|
+
type: "error"
|
1434
|
+
},
|
1435
|
+
{
|
1436
|
+
inputs: [
|
1437
|
+
],
|
1438
|
+
name: "HookRegistry_RegisteringDuplicatedHook",
|
1439
|
+
type: "error"
|
1440
|
+
},
|
1441
|
+
{
|
1442
|
+
inputs: [
|
1443
|
+
],
|
1444
|
+
name: "HookRegistry_RegisteringZeroAddressHook",
|
1445
|
+
type: "error"
|
1446
|
+
},
|
1447
|
+
{
|
1448
|
+
inputs: [
|
1449
|
+
{
|
1450
|
+
internalType: "bytes32",
|
1451
|
+
name: "invalidRequestId",
|
1452
|
+
type: "bytes32"
|
1453
|
+
}
|
1454
|
+
],
|
1455
|
+
name: "Hook_InvalidAsyncRequestId",
|
1456
|
+
type: "error"
|
1457
|
+
},
|
1458
|
+
{
|
1459
|
+
inputs: [
|
1460
|
+
{
|
1461
|
+
internalType: "address",
|
1462
|
+
name: "current",
|
1463
|
+
type: "address"
|
1464
|
+
},
|
1465
|
+
{
|
1466
|
+
internalType: "address",
|
1467
|
+
name: "expected",
|
1468
|
+
type: "address"
|
1469
|
+
}
|
1470
|
+
],
|
1471
|
+
name: "Hook_OnlyCallbackCallerCanCallback",
|
1472
|
+
type: "error"
|
1473
|
+
},
|
1474
|
+
{
|
1475
|
+
inputs: [
|
1476
|
+
],
|
1477
|
+
name: "Hook_UnsupportedAsyncOperation",
|
1478
|
+
type: "error"
|
1479
|
+
},
|
1480
|
+
{
|
1481
|
+
inputs: [
|
1482
|
+
],
|
1483
|
+
name: "Hook_UnsupportedSyncOperation",
|
1484
|
+
type: "error"
|
1485
|
+
},
|
1486
|
+
{
|
1487
|
+
inputs: [
|
1488
|
+
],
|
1489
|
+
name: "IPAccountImpl_CallerNotOwner",
|
1490
|
+
type: "error"
|
1491
|
+
},
|
1492
|
+
{
|
1493
|
+
inputs: [
|
1494
|
+
],
|
1495
|
+
name: "IPAccountRegistry_InitializationFailed",
|
1496
|
+
type: "error"
|
1497
|
+
},
|
1498
|
+
{
|
1499
|
+
inputs: [
|
1500
|
+
],
|
1501
|
+
name: "IPAccountRegistry_NonExistentIpAccountImpl",
|
1502
|
+
type: "error"
|
1503
|
+
},
|
1504
|
+
{
|
1505
|
+
inputs: [
|
1506
|
+
],
|
1507
|
+
name: "IPOrgController_IPOrgNonExistent",
|
1508
|
+
type: "error"
|
1509
|
+
},
|
1510
|
+
{
|
1511
|
+
inputs: [
|
1512
|
+
],
|
1513
|
+
name: "IPOrgController_InvalidIPOrgOwner",
|
1514
|
+
type: "error"
|
1515
|
+
},
|
1516
|
+
{
|
1517
|
+
inputs: [
|
1518
|
+
],
|
1519
|
+
name: "IPOrgController_InvalidNewIPOrgOwner",
|
1520
|
+
type: "error"
|
1521
|
+
},
|
1522
|
+
{
|
1523
|
+
inputs: [
|
1524
|
+
],
|
1525
|
+
name: "IPOrgController_InvalidOwner",
|
1526
|
+
type: "error"
|
1527
|
+
},
|
1528
|
+
{
|
1529
|
+
inputs: [
|
1530
|
+
],
|
1531
|
+
name: "IPOrgController_OwnerTransferUninitialized",
|
1532
|
+
type: "error"
|
1533
|
+
},
|
1534
|
+
{
|
1535
|
+
inputs: [
|
1536
|
+
],
|
1537
|
+
name: "IPOrg_IdDoesNotExist",
|
1538
|
+
type: "error"
|
1539
|
+
},
|
1540
|
+
{
|
1541
|
+
inputs: [
|
1542
|
+
],
|
1543
|
+
name: "IPOrg_IdOverBounds",
|
1544
|
+
type: "error"
|
1545
|
+
},
|
1546
|
+
{
|
1547
|
+
inputs: [
|
1548
|
+
],
|
1549
|
+
name: "IPOrg_LicensingNotConfigured",
|
1550
|
+
type: "error"
|
1551
|
+
},
|
1552
|
+
{
|
1553
|
+
inputs: [
|
1554
|
+
],
|
1555
|
+
name: "LengthMismatch",
|
1556
|
+
type: "error"
|
1557
|
+
},
|
1558
|
+
{
|
1559
|
+
inputs: [
|
1560
|
+
],
|
1561
|
+
name: "LibDuration_CallerNotRenewer",
|
1562
|
+
type: "error"
|
1563
|
+
},
|
1564
|
+
{
|
1565
|
+
inputs: [
|
1566
|
+
],
|
1567
|
+
name: "LibDuration_InvalidStartTime",
|
1568
|
+
type: "error"
|
1569
|
+
},
|
1570
|
+
{
|
1571
|
+
inputs: [
|
1572
|
+
],
|
1573
|
+
name: "LibDuration_NotRenewable",
|
1574
|
+
type: "error"
|
1575
|
+
},
|
1576
|
+
{
|
1577
|
+
inputs: [
|
1578
|
+
],
|
1579
|
+
name: "LibDuration_ZeroTTL",
|
1580
|
+
type: "error"
|
1581
|
+
},
|
1582
|
+
{
|
1583
|
+
inputs: [
|
1584
|
+
],
|
1585
|
+
name: "LibUintArrayMask_EmptyArray",
|
1586
|
+
type: "error"
|
1587
|
+
},
|
1588
|
+
{
|
1589
|
+
inputs: [
|
1590
|
+
],
|
1591
|
+
name: "LicenseRegistry_CallerNotLicensingModule",
|
1592
|
+
type: "error"
|
1593
|
+
},
|
1594
|
+
{
|
1595
|
+
inputs: [
|
1596
|
+
],
|
1597
|
+
name: "LicenseRegistry_CallerNotRevoker",
|
1598
|
+
type: "error"
|
1599
|
+
},
|
1600
|
+
{
|
1601
|
+
inputs: [
|
1602
|
+
],
|
1603
|
+
name: "LicenseRegistry_InvalidIpa",
|
1604
|
+
type: "error"
|
1605
|
+
},
|
1606
|
+
{
|
1607
|
+
inputs: [
|
1608
|
+
],
|
1609
|
+
name: "LicenseRegistry_InvalidLicenseStatus",
|
1610
|
+
type: "error"
|
1611
|
+
},
|
1612
|
+
{
|
1613
|
+
inputs: [
|
1614
|
+
],
|
1615
|
+
name: "LicenseRegistry_LicenseNotPending",
|
1616
|
+
type: "error"
|
1617
|
+
},
|
1618
|
+
{
|
1619
|
+
inputs: [
|
1620
|
+
],
|
1621
|
+
name: "LicenseRegistry_NotLicenseNFT",
|
1622
|
+
type: "error"
|
1623
|
+
},
|
1624
|
+
{
|
1625
|
+
inputs: [
|
1626
|
+
],
|
1627
|
+
name: "LicenseRegistry_UnknownLicenseId",
|
1628
|
+
type: "error"
|
1629
|
+
},
|
1630
|
+
{
|
1631
|
+
inputs: [
|
1632
|
+
],
|
1633
|
+
name: "LicenseRegistry_ZeroIpaRegistryAddress",
|
1634
|
+
type: "error"
|
1635
|
+
},
|
1636
|
+
{
|
1637
|
+
inputs: [
|
1638
|
+
],
|
1639
|
+
name: "LicenseRegistry_ZeroModuleRegistryAddress",
|
1640
|
+
type: "error"
|
1641
|
+
},
|
1642
|
+
{
|
1643
|
+
inputs: [
|
1644
|
+
],
|
1645
|
+
name: "LicensingModule_CallerNotIpOrgOwner",
|
1646
|
+
type: "error"
|
1647
|
+
},
|
1648
|
+
{
|
1649
|
+
inputs: [
|
1650
|
+
],
|
1651
|
+
name: "LicensingModule_CallerNotLicenseOwner",
|
1652
|
+
type: "error"
|
1653
|
+
},
|
1654
|
+
{
|
1655
|
+
inputs: [
|
1656
|
+
],
|
1657
|
+
name: "LicensingModule_CallerNotLicensor",
|
1658
|
+
type: "error"
|
1659
|
+
},
|
1660
|
+
{
|
1661
|
+
inputs: [
|
1662
|
+
],
|
1663
|
+
name: "LicensingModule_CantFindParentLicenseOrRelatedIpa",
|
1664
|
+
type: "error"
|
1665
|
+
},
|
1666
|
+
{
|
1667
|
+
inputs: [
|
1668
|
+
],
|
1669
|
+
name: "LicensingModule_CommercialLicenseNotAllowed",
|
1670
|
+
type: "error"
|
1671
|
+
},
|
1672
|
+
{
|
1673
|
+
inputs: [
|
1674
|
+
],
|
1675
|
+
name: "LicensingModule_DuplicateTermId",
|
1676
|
+
type: "error"
|
1677
|
+
},
|
1678
|
+
{
|
1679
|
+
inputs: [
|
1680
|
+
],
|
1681
|
+
name: "LicensingModule_InvalidAction",
|
1682
|
+
type: "error"
|
1683
|
+
},
|
1684
|
+
{
|
1685
|
+
inputs: [
|
1686
|
+
],
|
1687
|
+
name: "LicensingModule_InvalidConfigType",
|
1688
|
+
type: "error"
|
1689
|
+
},
|
1690
|
+
{
|
1691
|
+
inputs: [
|
1692
|
+
],
|
1693
|
+
name: "LicensingModule_InvalidIpa",
|
1694
|
+
type: "error"
|
1695
|
+
},
|
1696
|
+
{
|
1697
|
+
inputs: [
|
1698
|
+
],
|
1699
|
+
name: "LicensingModule_InvalidLicenseeType",
|
1700
|
+
type: "error"
|
1701
|
+
},
|
1702
|
+
{
|
1703
|
+
inputs: [
|
1704
|
+
],
|
1705
|
+
name: "LicensingModule_InvalidLicensorType",
|
1706
|
+
type: "error"
|
1707
|
+
},
|
1708
|
+
{
|
1709
|
+
inputs: [
|
1710
|
+
],
|
1711
|
+
name: "LicensingModule_InvalidTermCommercialStatus",
|
1712
|
+
type: "error"
|
1713
|
+
},
|
1714
|
+
{
|
1715
|
+
inputs: [
|
1716
|
+
],
|
1717
|
+
name: "LicensingModule_IpOrgFrameworkAlreadySet",
|
1718
|
+
type: "error"
|
1719
|
+
},
|
1720
|
+
{
|
1721
|
+
inputs: [
|
1722
|
+
],
|
1723
|
+
name: "LicensingModule_IpOrgNotConfigured",
|
1724
|
+
type: "error"
|
1725
|
+
},
|
1726
|
+
{
|
1727
|
+
inputs: [
|
1728
|
+
],
|
1729
|
+
name: "LicensingModule_NonCommercialTermsRequired",
|
1730
|
+
type: "error"
|
1731
|
+
},
|
1732
|
+
{
|
1733
|
+
inputs: [
|
1734
|
+
],
|
1735
|
+
name: "LicensingModule_ParentLicenseNotActive",
|
1736
|
+
type: "error"
|
1737
|
+
},
|
1738
|
+
{
|
1739
|
+
inputs: [
|
1740
|
+
],
|
1741
|
+
name: "LicensingModule_ShareAlikeDisabled",
|
1742
|
+
type: "error"
|
1743
|
+
},
|
1744
|
+
{
|
1745
|
+
inputs: [
|
1746
|
+
],
|
1747
|
+
name: "LicensingModule_ipOrgTermNotFound",
|
1748
|
+
type: "error"
|
1749
|
+
},
|
1750
|
+
{
|
1751
|
+
inputs: [
|
1752
|
+
],
|
1753
|
+
name: "LicensorApprovalHook_ApprovalAlreadyRequested",
|
1754
|
+
type: "error"
|
1755
|
+
},
|
1756
|
+
{
|
1757
|
+
inputs: [
|
1758
|
+
],
|
1759
|
+
name: "LicensorApprovalHook_InvalidLicenseId",
|
1760
|
+
type: "error"
|
1761
|
+
},
|
1762
|
+
{
|
1763
|
+
inputs: [
|
1764
|
+
],
|
1765
|
+
name: "LicensorApprovalHook_InvalidLicensor",
|
1766
|
+
type: "error"
|
1767
|
+
},
|
1768
|
+
{
|
1769
|
+
inputs: [
|
1770
|
+
],
|
1771
|
+
name: "LicensorApprovalHook_InvalidResponseStatus",
|
1772
|
+
type: "error"
|
1773
|
+
},
|
1774
|
+
{
|
1775
|
+
inputs: [
|
1776
|
+
],
|
1777
|
+
name: "LicensorApprovalHook_NoApprovalRequested",
|
1778
|
+
type: "error"
|
1779
|
+
},
|
1780
|
+
{
|
1781
|
+
inputs: [
|
1782
|
+
{
|
1783
|
+
internalType: "bytes32",
|
1784
|
+
name: "role",
|
1785
|
+
type: "bytes32"
|
1786
|
+
},
|
1787
|
+
{
|
1788
|
+
internalType: "address",
|
1789
|
+
name: "account",
|
1790
|
+
type: "address"
|
1791
|
+
}
|
1792
|
+
],
|
1793
|
+
name: "MissingRole",
|
1794
|
+
type: "error"
|
1795
|
+
},
|
1796
|
+
{
|
1797
|
+
inputs: [
|
1798
|
+
],
|
1799
|
+
name: "ModuleRegistry_CallerNotOrgOwner",
|
1800
|
+
type: "error"
|
1801
|
+
},
|
1802
|
+
{
|
1803
|
+
inputs: [
|
1804
|
+
{
|
1805
|
+
internalType: "string",
|
1806
|
+
name: "moduleName",
|
1807
|
+
type: "string"
|
1808
|
+
}
|
1809
|
+
],
|
1810
|
+
name: "ModuleRegistry_ModuleNotRegistered",
|
1811
|
+
type: "error"
|
1812
|
+
},
|
1813
|
+
{
|
1814
|
+
inputs: [
|
1815
|
+
{
|
1816
|
+
internalType: "uint256",
|
1817
|
+
name: "id",
|
1818
|
+
type: "uint256"
|
1819
|
+
}
|
1820
|
+
],
|
1821
|
+
name: "NonExistentID",
|
1822
|
+
type: "error"
|
1823
|
+
},
|
1824
|
+
{
|
1825
|
+
inputs: [
|
1826
|
+
],
|
1827
|
+
name: "RegistrationModule_CallerNotAuthorized",
|
1828
|
+
type: "error"
|
1829
|
+
},
|
1830
|
+
{
|
1831
|
+
inputs: [
|
1832
|
+
],
|
1833
|
+
name: "RegistrationModule_IPAssetNonExistent",
|
1834
|
+
type: "error"
|
1835
|
+
},
|
1836
|
+
{
|
1837
|
+
inputs: [
|
1838
|
+
],
|
1839
|
+
name: "RegistrationModule_IPOrgNotConfigured",
|
1840
|
+
type: "error"
|
1841
|
+
},
|
1842
|
+
{
|
1843
|
+
inputs: [
|
1844
|
+
],
|
1845
|
+
name: "RegistrationModule_InvalidCaller",
|
1846
|
+
type: "error"
|
1847
|
+
},
|
1848
|
+
{
|
1849
|
+
inputs: [
|
1850
|
+
],
|
1851
|
+
name: "RegistrationModule_InvalidConfigOperation",
|
1852
|
+
type: "error"
|
1853
|
+
},
|
1854
|
+
{
|
1855
|
+
inputs: [
|
1856
|
+
],
|
1857
|
+
name: "RegistrationModule_InvalidExecutionOperation",
|
1858
|
+
type: "error"
|
1859
|
+
},
|
1860
|
+
{
|
1861
|
+
inputs: [
|
1862
|
+
],
|
1863
|
+
name: "RegistrationModule_InvalidIPAssetType",
|
1864
|
+
type: "error"
|
1865
|
+
},
|
1866
|
+
{
|
1867
|
+
inputs: [
|
1868
|
+
],
|
1869
|
+
name: "RegistrationModule_TooManyAssetTypes",
|
1870
|
+
type: "error"
|
1871
|
+
},
|
1872
|
+
{
|
1873
|
+
inputs: [
|
1874
|
+
],
|
1875
|
+
name: "RelationshipModule_CallerNotIpOrgOwner",
|
1876
|
+
type: "error"
|
1877
|
+
},
|
1878
|
+
{
|
1879
|
+
inputs: [
|
1880
|
+
],
|
1881
|
+
name: "RelationshipModule_CannotRelateToOtherIPOrg",
|
1882
|
+
type: "error"
|
1883
|
+
},
|
1884
|
+
{
|
1885
|
+
inputs: [
|
1886
|
+
],
|
1887
|
+
name: "RelationshipModule_IntentAlreadyRegistered",
|
1888
|
+
type: "error"
|
1889
|
+
},
|
1890
|
+
{
|
1891
|
+
inputs: [
|
1892
|
+
],
|
1893
|
+
name: "RelationshipModule_InvalidConfigOperation",
|
1894
|
+
type: "error"
|
1895
|
+
},
|
1896
|
+
{
|
1897
|
+
inputs: [
|
1898
|
+
],
|
1899
|
+
name: "RelationshipModule_InvalidDstAddress",
|
1900
|
+
type: "error"
|
1901
|
+
},
|
1902
|
+
{
|
1903
|
+
inputs: [
|
1904
|
+
],
|
1905
|
+
name: "RelationshipModule_InvalidDstId",
|
1906
|
+
type: "error"
|
1907
|
+
},
|
1908
|
+
{
|
1909
|
+
inputs: [
|
1910
|
+
],
|
1911
|
+
name: "RelationshipModule_InvalidEndTimestamp",
|
1912
|
+
type: "error"
|
1913
|
+
},
|
1914
|
+
{
|
1915
|
+
inputs: [
|
1916
|
+
],
|
1917
|
+
name: "RelationshipModule_InvalidRelatable",
|
1918
|
+
type: "error"
|
1919
|
+
},
|
1920
|
+
{
|
1921
|
+
inputs: [
|
1922
|
+
],
|
1923
|
+
name: "RelationshipModule_InvalidSrcAddress",
|
1924
|
+
type: "error"
|
1925
|
+
},
|
1926
|
+
{
|
1927
|
+
inputs: [
|
1928
|
+
],
|
1929
|
+
name: "RelationshipModule_InvalidSrcId",
|
1930
|
+
type: "error"
|
1931
|
+
},
|
1932
|
+
{
|
1933
|
+
inputs: [
|
1934
|
+
],
|
1935
|
+
name: "RelationshipModule_InvalidTTL",
|
1936
|
+
type: "error"
|
1937
|
+
},
|
1938
|
+
{
|
1939
|
+
inputs: [
|
1940
|
+
],
|
1941
|
+
name: "RelationshipModule_IpOrgRelatableCannotBeProtocolLevel",
|
1942
|
+
type: "error"
|
1943
|
+
},
|
1944
|
+
{
|
1945
|
+
inputs: [
|
1946
|
+
],
|
1947
|
+
name: "RelationshipModule_NonExistingRelationship",
|
1948
|
+
type: "error"
|
1949
|
+
},
|
1950
|
+
{
|
1951
|
+
inputs: [
|
1952
|
+
{
|
1953
|
+
internalType: "string",
|
1954
|
+
name: "relType",
|
1955
|
+
type: "string"
|
1956
|
+
}
|
1957
|
+
],
|
1958
|
+
name: "RelationshipModule_RelTypeNotSet",
|
1959
|
+
type: "error"
|
1960
|
+
},
|
1961
|
+
{
|
1962
|
+
inputs: [
|
1963
|
+
],
|
1964
|
+
name: "RelationshipModule_UnsupportedIpOrgIndexType",
|
1965
|
+
type: "error"
|
1966
|
+
},
|
1967
|
+
{
|
1968
|
+
inputs: [
|
1969
|
+
],
|
1970
|
+
name: "RelationshipModule_UnsupportedRelationshipDst",
|
1971
|
+
type: "error"
|
1972
|
+
},
|
1973
|
+
{
|
1974
|
+
inputs: [
|
1975
|
+
],
|
1976
|
+
name: "RelationshipModule_UnsupportedRelationshipSrc",
|
1977
|
+
type: "error"
|
1978
|
+
},
|
1979
|
+
{
|
1980
|
+
inputs: [
|
1981
|
+
{
|
1982
|
+
internalType: "uint256",
|
1983
|
+
name: "accountsLength",
|
1984
|
+
type: "uint256"
|
1985
|
+
},
|
1986
|
+
{
|
1987
|
+
internalType: "uint256",
|
1988
|
+
name: "allocationsLength",
|
1989
|
+
type: "uint256"
|
1990
|
+
}
|
1991
|
+
],
|
1992
|
+
name: "RoyaltyNFT_AccountsAndAllocationsMismatch",
|
1993
|
+
type: "error"
|
1994
|
+
},
|
1995
|
+
{
|
1996
|
+
inputs: [
|
1997
|
+
{
|
1998
|
+
internalType: "uint32",
|
1999
|
+
name: "allocationsSum",
|
2000
|
+
type: "uint32"
|
2001
|
+
}
|
2002
|
+
],
|
2003
|
+
name: "RoyaltyNFT_InvalidAllocationsSum",
|
2004
|
+
type: "error"
|
2005
|
+
},
|
2006
|
+
{
|
2007
|
+
inputs: [
|
2008
|
+
],
|
2009
|
+
name: "TermsRegistry_CommercialStatusUnset",
|
2010
|
+
type: "error"
|
2011
|
+
},
|
2012
|
+
{
|
2013
|
+
inputs: [
|
2014
|
+
],
|
2015
|
+
name: "TermsRegistry_TermAlreadyExists",
|
2016
|
+
type: "error"
|
2017
|
+
},
|
2018
|
+
{
|
2019
|
+
inputs: [
|
2020
|
+
],
|
2021
|
+
name: "TermsRegistry_UnsupportedTerm",
|
2022
|
+
type: "error"
|
2023
|
+
},
|
2024
|
+
{
|
2025
|
+
inputs: [
|
2026
|
+
],
|
2027
|
+
name: "TermsRegistry_UnsupportedTermCategory",
|
2028
|
+
type: "error"
|
2029
|
+
},
|
2030
|
+
{
|
2031
|
+
inputs: [
|
2032
|
+
{
|
2033
|
+
internalType: "address",
|
2034
|
+
name: "tokenAddress",
|
2035
|
+
type: "address"
|
2036
|
+
},
|
2037
|
+
{
|
2038
|
+
internalType: "address",
|
2039
|
+
name: "ownerAddress",
|
2040
|
+
type: "address"
|
2041
|
+
}
|
2042
|
+
],
|
2043
|
+
name: "TokenGatedHook_NotTokenOwner",
|
2044
|
+
type: "error"
|
2045
|
+
},
|
2046
|
+
{
|
2047
|
+
inputs: [
|
2048
|
+
],
|
2049
|
+
name: "Unauthorized",
|
2050
|
+
type: "error"
|
2051
|
+
},
|
2052
|
+
{
|
2053
|
+
inputs: [
|
2054
|
+
{
|
2055
|
+
internalType: "string",
|
2056
|
+
name: "name",
|
2057
|
+
type: "string"
|
2058
|
+
}
|
2059
|
+
],
|
2060
|
+
name: "UnsupportedInterface",
|
2061
|
+
type: "error"
|
2062
|
+
},
|
2063
|
+
{
|
2064
|
+
inputs: [
|
2065
|
+
],
|
2066
|
+
name: "ZeroAddress",
|
2067
|
+
type: "error"
|
2068
|
+
},
|
2069
|
+
{
|
2070
|
+
inputs: [
|
2071
|
+
],
|
2072
|
+
name: "ZeroAmount",
|
2073
|
+
type: "error"
|
1203
2074
|
}
|
1204
2075
|
];
|
1205
2076
|
|
@@ -1775,33 +2646,6 @@ function isIntegerString(s) {
|
|
1775
2646
|
function parseToBigInt(num) {
|
1776
2647
|
return BigInt(num);
|
1777
2648
|
}
|
1778
|
-
function fileToBase64(file) {
|
1779
|
-
return new Promise(function (resolve, reject) {
|
1780
|
-
// convert file to base64
|
1781
|
-
if (file instanceof Buffer) {
|
1782
|
-
resolve(file.toString("base64"));
|
1783
|
-
return;
|
1784
|
-
}
|
1785
|
-
if (file instanceof File) {
|
1786
|
-
var reader = new FileReader();
|
1787
|
-
reader.readAsDataURL(file);
|
1788
|
-
reader.onload = function () {
|
1789
|
-
var _reader$result;
|
1790
|
-
var base64 = (_reader$result = reader.result) === null || _reader$result === void 0 ? void 0 : _reader$result.toString().split(",")[1];
|
1791
|
-
if (base64) {
|
1792
|
-
resolve(base64);
|
1793
|
-
} else {
|
1794
|
-
reject(new Error("Failed to convert file to base64"));
|
1795
|
-
}
|
1796
|
-
};
|
1797
|
-
reader.onerror = function (error) {
|
1798
|
-
return reject(error);
|
1799
|
-
};
|
1800
|
-
return;
|
1801
|
-
}
|
1802
|
-
reject(new Error("Invalid file type"));
|
1803
|
-
});
|
1804
|
-
}
|
1805
2649
|
function waitTxAndFilterLog(_x, _x2, _x3) {
|
1806
2650
|
return _waitTxAndFilterLog.apply(this, arguments);
|
1807
2651
|
}
|
@@ -1864,18 +2708,27 @@ function _waitTxAndFilterLog() {
|
|
1864
2708
|
}));
|
1865
2709
|
return _waitTxAndFilterLog.apply(this, arguments);
|
1866
2710
|
}
|
1867
|
-
|
2711
|
+
function dictToQueryParams(params) {
|
1868
2712
|
var queryParamList = [];
|
1869
2713
|
for (var key in params) {
|
1870
2714
|
var value = params[key];
|
1871
2715
|
queryParamList.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value)));
|
1872
2716
|
}
|
1873
2717
|
return queryParamList.join("&");
|
1874
|
-
}
|
2718
|
+
}
|
2719
|
+
function typedDataArrayToBytesArray(typedDataArray) {
|
2720
|
+
var result = [];
|
2721
|
+
typedDataArray.forEach(function (typedData) {
|
2722
|
+
result.push(typedDataToBytes(typedData));
|
2723
|
+
});
|
2724
|
+
return result;
|
2725
|
+
}
|
2726
|
+
function typedDataToBytes(typedData) {
|
2727
|
+
return viem.encodeAbiParameters(viem.parseAbiParameters(typedData["interface"]), typedData.data);
|
2728
|
+
}
|
1875
2729
|
|
1876
2730
|
/**
|
1877
|
-
* IPOrgClient allows you to create,
|
1878
|
-
* Story Protocol.
|
2731
|
+
* IPOrgClient allows you to create, view, search IPOrgs on Story Protocol.
|
1879
2732
|
*/
|
1880
2733
|
var IPOrgClient = /*#__PURE__*/function (_IPOrgReadOnlyClient) {
|
1881
2734
|
_inherits(IPOrgClient, _IPOrgReadOnlyClient);
|
@@ -1957,7 +2810,7 @@ var IPOrgClient = /*#__PURE__*/function (_IPOrgReadOnlyClient) {
|
|
1957
2810
|
}(IPOrgReadOnlyClient);
|
1958
2811
|
|
1959
2812
|
/**
|
1960
|
-
*
|
2813
|
+
* RelationshipReadOnlyClient allows you to view and search relationships on Story Protocol.
|
1961
2814
|
*/
|
1962
2815
|
var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
1963
2816
|
function RelationshipReadOnlyClient(httpClient, rpcClient) {
|
@@ -1969,8 +2822,8 @@ var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
|
1969
2822
|
/**
|
1970
2823
|
* Get a relationship by its ID.
|
1971
2824
|
*
|
1972
|
-
* @param
|
1973
|
-
* @returns
|
2825
|
+
* @param request - the request object for getting the relationship
|
2826
|
+
* @returns the response object that contains the fetched relationship object
|
1974
2827
|
*/
|
1975
2828
|
_createClass(RelationshipReadOnlyClient, [{
|
1976
2829
|
key: "get",
|
@@ -2008,9 +2861,9 @@ var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
|
2008
2861
|
return get;
|
2009
2862
|
}()
|
2010
2863
|
/**
|
2011
|
-
* List
|
2864
|
+
* List relationships.
|
2012
2865
|
*
|
2013
|
-
* @returns
|
2866
|
+
* @returns the response object that contains a list of relationships.
|
2014
2867
|
*/
|
2015
2868
|
}, {
|
2016
2869
|
key: "list",
|
@@ -2024,8 +2877,8 @@ var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
|
2024
2877
|
_context2.next = 3;
|
2025
2878
|
return this.httpClient.post("/protocol/relationship", request, {
|
2026
2879
|
params: {
|
2027
|
-
contract:
|
2028
|
-
tokenId: request
|
2880
|
+
contract: request.contract,
|
2881
|
+
tokenId: request.tokenId
|
2029
2882
|
}
|
2030
2883
|
});
|
2031
2884
|
case 3:
|
@@ -2051,7 +2904,7 @@ var RelationshipReadOnlyClient = /*#__PURE__*/function () {
|
|
2051
2904
|
}();
|
2052
2905
|
|
2053
2906
|
/**
|
2054
|
-
*
|
2907
|
+
* IPAssetReadOnlyClient allows you to view and search IP Assets on Story Protocol.
|
2055
2908
|
*/
|
2056
2909
|
var IPAssetReadOnlyClient = /*#__PURE__*/function () {
|
2057
2910
|
function IPAssetReadOnlyClient(httpClient, rpcClient) {
|
@@ -2102,7 +2955,7 @@ var IPAssetReadOnlyClient = /*#__PURE__*/function () {
|
|
2102
2955
|
return get;
|
2103
2956
|
}()
|
2104
2957
|
/**
|
2105
|
-
* List
|
2958
|
+
* List IP assets.
|
2106
2959
|
*
|
2107
2960
|
* @returns the response object that contains results from listing query.
|
2108
2961
|
*/
|
@@ -3140,7 +3993,7 @@ var registrationModuleConfig = {
|
|
3140
3993
|
};
|
3141
3994
|
|
3142
3995
|
/**
|
3143
|
-
* IpAssetClient allows you to create, view, and
|
3996
|
+
* IpAssetClient allows you to create, view, and search IP Assets on Story Protocol.
|
3144
3997
|
*/
|
3145
3998
|
var IPAssetClient = /*#__PURE__*/function (_IPAssetReadOnlyClien) {
|
3146
3999
|
_inherits(IPAssetClient, _IPAssetReadOnlyClien);
|
@@ -3174,12 +4027,12 @@ var IPAssetClient = /*#__PURE__*/function (_IPAssetReadOnlyClien) {
|
|
3174
4027
|
args: [viem.getAddress(request.ipOrgId), {
|
3175
4028
|
owner: viem.getAddress(request.owner || this.wallet.account.address),
|
3176
4029
|
name: request.name,
|
3177
|
-
ipOrgAssetType: parseToBigInt(request.
|
4030
|
+
ipOrgAssetType: parseToBigInt(request.typeIndex),
|
3178
4031
|
hash: viem.toHex(request.contentHash || "", {
|
3179
4032
|
size: 32
|
3180
4033
|
}),
|
3181
4034
|
mediaUrl: request.mediaUrl || ""
|
3182
|
-
}, [], []],
|
4035
|
+
}, request.preHookData ? typedDataArrayToBytesArray(request.preHookData) : [], request.postHookData ? typedDataArrayToBytesArray(request.postHookData) : []],
|
3183
4036
|
account: this.wallet.account
|
3184
4037
|
}));
|
3185
4038
|
case 3:
|
@@ -3330,8 +4183,7 @@ var LicenseReadOnlyClient = /*#__PURE__*/function () {
|
|
3330
4183
|
}();
|
3331
4184
|
|
3332
4185
|
/**
|
3333
|
-
* TransactionClient allows you to view and monitor transactions on
|
3334
|
-
* Story Protocol.
|
4186
|
+
* TransactionClient allows you to view and monitor transactions on Story Protocol.
|
3335
4187
|
*/
|
3336
4188
|
var TransactionReadOnlyClient = /*#__PURE__*/function () {
|
3337
4189
|
function TransactionReadOnlyClient(httpClient, rpcClient) {
|
@@ -3376,10 +4228,9 @@ var TransactionReadOnlyClient = /*#__PURE__*/function () {
|
|
3376
4228
|
return get;
|
3377
4229
|
}()
|
3378
4230
|
/**
|
3379
|
-
*
|
4231
|
+
* List Transactions.
|
3380
4232
|
*
|
3381
|
-
* @
|
3382
|
-
* @returns the response object that contains the fetched transaction object
|
4233
|
+
* @returns the response object that contains a list of transactions
|
3383
4234
|
*/
|
3384
4235
|
}, {
|
3385
4236
|
key: "list",
|
@@ -3401,7 +4252,7 @@ var TransactionReadOnlyClient = /*#__PURE__*/function () {
|
|
3401
4252
|
case 8:
|
3402
4253
|
_context2.prev = 8;
|
3403
4254
|
_context2.t0 = _context2["catch"](0);
|
3404
|
-
handleError(_context2.t0, "Failed to
|
4255
|
+
handleError(_context2.t0, "Failed to list transactions");
|
3405
4256
|
case 11:
|
3406
4257
|
case "end":
|
3407
4258
|
return _context2.stop();
|
@@ -3418,8 +4269,7 @@ var TransactionReadOnlyClient = /*#__PURE__*/function () {
|
|
3418
4269
|
}();
|
3419
4270
|
|
3420
4271
|
/**
|
3421
|
-
* TransactionClient allows you to view and monitor transactions on
|
3422
|
-
* Story Protocol.
|
4272
|
+
* TransactionClient allows you to view and monitor transactions on Story Protocol.
|
3423
4273
|
*/
|
3424
4274
|
var TransactionClient = /*#__PURE__*/function (_TransactionReadOnlyC) {
|
3425
4275
|
_inherits(TransactionClient, _TransactionReadOnlyC);
|
@@ -3440,8 +4290,7 @@ var TransactionClient = /*#__PURE__*/function (_TransactionReadOnlyC) {
|
|
3440
4290
|
var HTTP_TIMEOUT = 5000;
|
3441
4291
|
|
3442
4292
|
/**
|
3443
|
-
*
|
3444
|
-
* Story Protocol.
|
4293
|
+
* ModuleReadOnlyClient allows you to view and search modules on Story Protocol.
|
3445
4294
|
*/
|
3446
4295
|
var ModuleReadOnlyClient = /*#__PURE__*/function () {
|
3447
4296
|
function ModuleReadOnlyClient(httpClient, rpcClient) {
|
@@ -3486,10 +4335,9 @@ var ModuleReadOnlyClient = /*#__PURE__*/function () {
|
|
3486
4335
|
return get;
|
3487
4336
|
}()
|
3488
4337
|
/**
|
3489
|
-
*
|
4338
|
+
* List Modules.
|
3490
4339
|
*
|
3491
|
-
* @
|
3492
|
-
* @returns the response object that contains the fetched module object
|
4340
|
+
* @returns the response object that contains a list of modules
|
3493
4341
|
*/
|
3494
4342
|
}, {
|
3495
4343
|
key: "list",
|
@@ -3515,7 +4363,7 @@ var ModuleReadOnlyClient = /*#__PURE__*/function () {
|
|
3515
4363
|
case 8:
|
3516
4364
|
_context2.prev = 8;
|
3517
4365
|
_context2.t0 = _context2["catch"](0);
|
3518
|
-
handleError(_context2.t0, "Failed to
|
4366
|
+
handleError(_context2.t0, "Failed to list modules");
|
3519
4367
|
case 11:
|
3520
4368
|
case "end":
|
3521
4369
|
return _context2.stop();
|
@@ -3532,8 +4380,7 @@ var ModuleReadOnlyClient = /*#__PURE__*/function () {
|
|
3532
4380
|
}();
|
3533
4381
|
|
3534
4382
|
/**
|
3535
|
-
* ModuleClient allows you to view and
|
3536
|
-
* Story Protocol.
|
4383
|
+
* ModuleClient allows you to view and search modules on Story Protocol.
|
3537
4384
|
*/
|
3538
4385
|
var ModuleClient = /*#__PURE__*/function (_ModuleReadOnlyClient) {
|
3539
4386
|
_inherits(ModuleClient, _ModuleReadOnlyClient);
|
@@ -3549,8 +4396,7 @@ var ModuleClient = /*#__PURE__*/function (_ModuleReadOnlyClient) {
|
|
3549
4396
|
}(ModuleReadOnlyClient);
|
3550
4397
|
|
3551
4398
|
/**
|
3552
|
-
*
|
3553
|
-
* Story Protocol.
|
4399
|
+
* HookReadOnlyClient allows you to get and search hooks on Story Protocol.
|
3554
4400
|
*/
|
3555
4401
|
var HookReadOnlyClient = /*#__PURE__*/function () {
|
3556
4402
|
function HookReadOnlyClient(httpClient, rpcClient) {
|
@@ -3641,8 +4487,7 @@ var HookReadOnlyClient = /*#__PURE__*/function () {
|
|
3641
4487
|
}();
|
3642
4488
|
|
3643
4489
|
/**
|
3644
|
-
* HookClient allows you to view and
|
3645
|
-
* Story Protocol.
|
4490
|
+
* HookClient allows you to view and search hooks on Story Protocol.
|
3646
4491
|
*/
|
3647
4492
|
var HookClient = /*#__PURE__*/function (_HookReadOnlyClient) {
|
3648
4493
|
_inherits(HookClient, _HookReadOnlyClient);
|
@@ -3674,38 +4519,47 @@ var PlatformClient = /*#__PURE__*/function () {
|
|
3674
4519
|
key: "uploadFile",
|
3675
4520
|
value: function () {
|
3676
4521
|
var _uploadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file, mimeType) {
|
3677
|
-
var
|
4522
|
+
var preSignUrlResp, data, uploadResp, confirmResp;
|
3678
4523
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
3679
4524
|
while (1) switch (_context.prev = _context.next) {
|
3680
4525
|
case 0:
|
3681
4526
|
_context.prev = 0;
|
3682
4527
|
_context.next = 3;
|
3683
|
-
return
|
4528
|
+
return this.httpClient.post("/platform/file-upload/request");
|
3684
4529
|
case 3:
|
3685
|
-
|
3686
|
-
|
3687
|
-
base64: base64,
|
3688
|
-
mimeType: mimeType
|
3689
|
-
};
|
4530
|
+
preSignUrlResp = _context.sent;
|
4531
|
+
data = preSignUrlResp.data; // upload the file to s3
|
3690
4532
|
_context.next = 7;
|
3691
|
-
return this.httpClient.
|
4533
|
+
return this.httpClient.put(data.url, file, {
|
3692
4534
|
timeout: 0,
|
3693
4535
|
headers: {
|
3694
|
-
"Content-Type":
|
4536
|
+
"Content-Type": mimeType
|
3695
4537
|
}
|
3696
4538
|
});
|
3697
4539
|
case 7:
|
3698
|
-
|
3699
|
-
|
3700
|
-
|
3701
|
-
|
4540
|
+
uploadResp = _context.sent;
|
4541
|
+
if (!(uploadResp.status !== 200)) {
|
4542
|
+
_context.next = 10;
|
4543
|
+
break;
|
4544
|
+
}
|
4545
|
+
throw new Error("Failed to upload file to s3. Status: ".concat(uploadResp.status));
|
4546
|
+
case 10:
|
4547
|
+
_context.next = 12;
|
4548
|
+
return this.httpClient.post("/platform/file-upload/confirm", {
|
4549
|
+
key: data.key
|
4550
|
+
});
|
4551
|
+
case 12:
|
4552
|
+
confirmResp = _context.sent;
|
4553
|
+
return _context.abrupt("return", confirmResp.data);
|
4554
|
+
case 16:
|
4555
|
+
_context.prev = 16;
|
3702
4556
|
_context.t0 = _context["catch"](0);
|
3703
|
-
return _context.abrupt("return", handleError(_context.t0, "
|
3704
|
-
case
|
4557
|
+
return _context.abrupt("return", handleError(_context.t0, "Failed to upload file"));
|
4558
|
+
case 19:
|
3705
4559
|
case "end":
|
3706
4560
|
return _context.stop();
|
3707
4561
|
}
|
3708
|
-
}, _callee, this, [[0,
|
4562
|
+
}, _callee, this, [[0, 16]]);
|
3709
4563
|
}));
|
3710
4564
|
function uploadFile(_x, _x2) {
|
3711
4565
|
return _uploadFile.apply(this, arguments);
|
@@ -5672,7 +6526,7 @@ var relationshipModuleConfig = {
|
|
5672
6526
|
};
|
5673
6527
|
|
5674
6528
|
/**
|
5675
|
-
*
|
6529
|
+
* RelationshipClient allows you to create, view and search relationships on Story Protocol.
|
5676
6530
|
*/
|
5677
6531
|
var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
|
5678
6532
|
_inherits(RelationshipClient, _RelationshipReadOnly);
|
@@ -5709,7 +6563,7 @@ var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
|
|
5709
6563
|
srcId: request.srcTokenId,
|
5710
6564
|
dstAddress: request.dstContract,
|
5711
6565
|
dstId: request.dstTokenId
|
5712
|
-
}, [], []],
|
6566
|
+
}, request.preHookData ? typedDataArrayToBytesArray(request.preHookData) : [], request.postHookData ? typedDataArrayToBytesArray(request.postHookData) : []],
|
5713
6567
|
account: this.wallet.account
|
5714
6568
|
}));
|
5715
6569
|
case 3:
|
@@ -5760,7 +6614,7 @@ var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
|
|
5760
6614
|
}(RelationshipReadOnlyClient);
|
5761
6615
|
|
5762
6616
|
/**
|
5763
|
-
*
|
6617
|
+
* RelationshipTypeReadOnlyClient allows you to view and search relationship types on Story Protocol.
|
5764
6618
|
*/
|
5765
6619
|
var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
5766
6620
|
function RelationshipTypeReadOnlyClient(httpClient, rpcClient) {
|
@@ -5772,9 +6626,8 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5772
6626
|
/**
|
5773
6627
|
* Get a RelationshipType by ipOrgId or relType.
|
5774
6628
|
*
|
5775
|
-
* @param
|
5776
|
-
* @
|
5777
|
-
* @returns A Promise that resolves to the GetRelationshipTypeResponse.
|
6629
|
+
* @param request - the request object for getting the relationship type
|
6630
|
+
* @returns the response object that contains the fetched relationship type object
|
5778
6631
|
*/
|
5779
6632
|
_createClass(RelationshipTypeReadOnlyClient, [{
|
5780
6633
|
key: "get",
|
@@ -5794,7 +6647,7 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5794
6647
|
case 8:
|
5795
6648
|
_context.prev = 8;
|
5796
6649
|
_context.t0 = _context["catch"](0);
|
5797
|
-
handleError(_context.t0, "Failed to get
|
6650
|
+
handleError(_context.t0, "Failed to get relationship type");
|
5798
6651
|
case 11:
|
5799
6652
|
case "end":
|
5800
6653
|
return _context.stop();
|
@@ -5807,9 +6660,9 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5807
6660
|
return get;
|
5808
6661
|
}()
|
5809
6662
|
/**
|
5810
|
-
* List
|
6663
|
+
* List RelationshipTypes.
|
5811
6664
|
*
|
5812
|
-
* @returns
|
6665
|
+
* @returns the response object that contains a list of relationship types
|
5813
6666
|
*/
|
5814
6667
|
}, {
|
5815
6668
|
key: "list",
|
@@ -5833,7 +6686,7 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5833
6686
|
case 7:
|
5834
6687
|
_context2.prev = 7;
|
5835
6688
|
_context2.t0 = _context2["catch"](0);
|
5836
|
-
handleError(_context2.t0, "Failed to list
|
6689
|
+
handleError(_context2.t0, "Failed to list relationship types");
|
5837
6690
|
case 10:
|
5838
6691
|
case "end":
|
5839
6692
|
return _context2.stop();
|
@@ -5850,7 +6703,7 @@ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
|
|
5850
6703
|
}();
|
5851
6704
|
|
5852
6705
|
/**
|
5853
|
-
*
|
6706
|
+
* RelationshipTypeClient allows you to create, view and search relationship types on Story Protocol.
|
5854
6707
|
*/
|
5855
6708
|
var RelationshipTypeClient = /*#__PURE__*/function (_RelationshipTypeRead) {
|
5856
6709
|
_inherits(RelationshipTypeClient, _RelationshipTypeRead);
|
@@ -5887,8 +6740,8 @@ var RelationshipTypeClient = /*#__PURE__*/function (_RelationshipTypeRead) {
|
|
5887
6740
|
src: request.relatedElements.src,
|
5888
6741
|
dst: request.relatedElements.dst
|
5889
6742
|
},
|
5890
|
-
allowedSrcs: request.
|
5891
|
-
allowedDsts: request.
|
6743
|
+
allowedSrcs: request.allowedSrcIpAssetTypes,
|
6744
|
+
allowedDsts: request.allowedDstIpAssetTypes
|
5892
6745
|
}],
|
5893
6746
|
account: this.wallet.account
|
5894
6747
|
}));
|
@@ -5922,7 +6775,7 @@ var RelationshipTypeClient = /*#__PURE__*/function (_RelationshipTypeRead) {
|
|
5922
6775
|
case 17:
|
5923
6776
|
_context.prev = 17;
|
5924
6777
|
_context.t0 = _context["catch"](0);
|
5925
|
-
handleError(_context.t0, "Failed to register relationship");
|
6778
|
+
handleError(_context.t0, "Failed to register relationship type");
|
5926
6779
|
case 20:
|
5927
6780
|
case "end":
|
5928
6781
|
return _context.stop();
|
@@ -6217,31 +7070,19 @@ var StoryClient = /*#__PURE__*/function () {
|
|
6217
7070
|
return StoryClient;
|
6218
7071
|
}();
|
6219
7072
|
|
6220
|
-
/**
|
6221
|
-
* @public
|
6222
|
-
*/
|
6223
|
-
var IPAssetType = /*#__PURE__*/function (IPAssetType) {
|
6224
|
-
IPAssetType[IPAssetType["STORY"] = 1] = "STORY";
|
6225
|
-
IPAssetType[IPAssetType["CHARACTER"] = 2] = "CHARACTER";
|
6226
|
-
IPAssetType[IPAssetType["ART"] = 3] = "ART";
|
6227
|
-
IPAssetType[IPAssetType["LOCATION"] = 5] = "LOCATION";
|
6228
|
-
IPAssetType[IPAssetType["ITEM"] = 6] = "ITEM";
|
6229
|
-
return IPAssetType;
|
6230
|
-
}({});
|
6231
|
-
|
6232
7073
|
/**
|
6233
7074
|
* @public
|
6234
7075
|
*/
|
6235
7076
|
var ResourceType = /*#__PURE__*/function (ResourceType) {
|
6236
|
-
ResourceType[
|
6237
|
-
ResourceType[
|
6238
|
-
ResourceType[
|
6239
|
-
ResourceType[
|
6240
|
-
ResourceType[
|
6241
|
-
ResourceType[
|
6242
|
-
ResourceType[
|
6243
|
-
ResourceType[
|
6244
|
-
ResourceType[
|
7077
|
+
ResourceType["Unspecified"] = "Unspecified";
|
7078
|
+
ResourceType["IPOrg"] = "IPOrg";
|
7079
|
+
ResourceType["IPAsset"] = "IPAsset";
|
7080
|
+
ResourceType["License"] = "License";
|
7081
|
+
ResourceType["Relationship"] = "Relationship";
|
7082
|
+
ResourceType["RelationshipType"] = "RelationshipType";
|
7083
|
+
ResourceType["Module"] = "Module";
|
7084
|
+
ResourceType["Hook"] = "Hook";
|
7085
|
+
ResourceType["Dispute"] = "Dispute";
|
6245
7086
|
return ResourceType;
|
6246
7087
|
}({});
|
6247
7088
|
|
@@ -6249,8 +7090,8 @@ var ResourceType = /*#__PURE__*/function (ResourceType) {
|
|
6249
7090
|
* @public
|
6250
7091
|
*/
|
6251
7092
|
var HookType = /*#__PURE__*/function (HookType) {
|
6252
|
-
HookType[HookType["
|
6253
|
-
HookType[HookType["
|
7093
|
+
HookType[HookType["PreAction"] = 0] = "PreAction";
|
7094
|
+
HookType[HookType["PostAction"] = 1] = "PostAction";
|
6254
7095
|
return HookType;
|
6255
7096
|
}({});
|
6256
7097
|
|
@@ -6258,14 +7099,27 @@ var HookType = /*#__PURE__*/function (HookType) {
|
|
6258
7099
|
* @public
|
6259
7100
|
*/
|
6260
7101
|
var ActionType = /*#__PURE__*/function (ActionType) {
|
6261
|
-
ActionType[
|
6262
|
-
ActionType[
|
6263
|
-
ActionType[
|
6264
|
-
ActionType[
|
6265
|
-
ActionType[
|
7102
|
+
ActionType["Unspecified"] = "Unspecified";
|
7103
|
+
ActionType["Register"] = "Register";
|
7104
|
+
ActionType["Unregister"] = "Unregister";
|
7105
|
+
ActionType["Configure"] = "Configure";
|
7106
|
+
ActionType["Create"] = "Create";
|
6266
7107
|
return ActionType;
|
6267
7108
|
}({});
|
6268
7109
|
|
7110
|
+
/**
|
7111
|
+
* @public
|
7112
|
+
*/
|
7113
|
+
var Relatables = /*#__PURE__*/function (Relatables) {
|
7114
|
+
Relatables[Relatables["Undefined"] = 0] = "Undefined";
|
7115
|
+
Relatables[Relatables["IPA"] = 1] = "IPA";
|
7116
|
+
Relatables[Relatables["IPOrgEntry"] = 2] = "IPOrgEntry";
|
7117
|
+
Relatables[Relatables["License"] = 3] = "License";
|
7118
|
+
Relatables[Relatables["Address"] = 4] = "Address";
|
7119
|
+
Relatables[Relatables["ExternalNFT"] = 5] = "ExternalNFT";
|
7120
|
+
return Relatables;
|
7121
|
+
}({});
|
7122
|
+
|
6269
7123
|
var AddressZero = "0x0000000000000000000000000000000000000000";
|
6270
7124
|
|
6271
7125
|
exports.ActionType = ActionType;
|
@@ -6274,13 +7128,13 @@ exports.HookReadOnlyClient = HookReadOnlyClient;
|
|
6274
7128
|
exports.HookType = HookType;
|
6275
7129
|
exports.IPAssetClient = IPAssetClient;
|
6276
7130
|
exports.IPAssetReadOnlyClient = IPAssetReadOnlyClient;
|
6277
|
-
exports.IPAssetType = IPAssetType;
|
6278
7131
|
exports.IPOrgClient = IPOrgClient;
|
6279
7132
|
exports.IPOrgReadOnlyClient = IPOrgReadOnlyClient;
|
6280
7133
|
exports.LicenseClient = LicenseClient;
|
6281
7134
|
exports.LicenseReadOnlyClient = LicenseReadOnlyClient;
|
6282
7135
|
exports.ModuleReadOnlyClient = ModuleReadOnlyClient;
|
6283
7136
|
exports.PlatformClient = PlatformClient;
|
7137
|
+
exports.Relatables = Relatables;
|
6284
7138
|
exports.RelationshipClient = RelationshipClient;
|
6285
7139
|
exports.ResourceType = ResourceType;
|
6286
7140
|
exports.StoryClient = StoryClient;
|