@story-protocol/core-sdk 0.1.0-alpha-rc.3 → 0.1.0-alpha-rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. package/dist/declarations/src/enums/ActionType.d.ts +5 -5
  2. package/dist/declarations/src/enums/ActionType.d.ts.map +1 -1
  3. package/dist/declarations/src/enums/HookType.d.ts +2 -2
  4. package/dist/declarations/src/enums/HookType.d.ts.map +1 -1
  5. package/dist/declarations/src/enums/Relatables.d.ts +9 -0
  6. package/dist/declarations/src/enums/Relatables.d.ts.map +1 -0
  7. package/dist/declarations/src/enums/ResourceType.d.ts +9 -9
  8. package/dist/declarations/src/enums/ResourceType.d.ts.map +1 -1
  9. package/dist/declarations/src/index.d.ts +3 -2
  10. package/dist/declarations/src/index.d.ts.map +1 -1
  11. package/dist/declarations/src/resources/relationshipReadOnly.d.ts.map +1 -1
  12. package/dist/declarations/src/types/common.d.ts +6 -0
  13. package/dist/declarations/src/types/common.d.ts.map +1 -0
  14. package/dist/declarations/src/types/resources/IPOrg.d.ts +1 -1
  15. package/dist/declarations/src/types/resources/IPOrg.d.ts.map +1 -1
  16. package/dist/declarations/src/types/resources/hook.d.ts +2 -1
  17. package/dist/declarations/src/types/resources/hook.d.ts.map +1 -1
  18. package/dist/declarations/src/types/resources/ipAsset.d.ts +9 -4
  19. package/dist/declarations/src/types/resources/ipAsset.d.ts.map +1 -1
  20. package/dist/declarations/src/types/resources/relationship.d.ts +4 -100
  21. package/dist/declarations/src/types/resources/relationship.d.ts.map +1 -1
  22. package/dist/declarations/src/types/resources/relationshipType.d.ts +10 -5
  23. package/dist/declarations/src/types/resources/relationshipType.d.ts.map +1 -1
  24. package/dist/declarations/src/utils/platform.d.ts.map +1 -1
  25. package/dist/story-protocol-core-sdk.cjs.dev.js +943 -81
  26. package/dist/story-protocol-core-sdk.cjs.prod.js +943 -81
  27. package/dist/story-protocol-core-sdk.esm.js +944 -82
  28. package/package.json +1 -1
  29. package/dist/declarations/src/enums/IPAssetType.d.ts +0 -11
  30. package/dist/declarations/src/enums/IPAssetType.d.ts.map +0 -1
@@ -1200,6 +1200,878 @@ var storyProtocolJson = [
1200
1200
  ],
1201
1201
  stateMutability: "nonpayable",
1202
1202
  type: "function"
1203
+ },
1204
+ {
1205
+ inputs: [
1206
+ {
1207
+ internalType: "uint8",
1208
+ name: "hookType",
1209
+ type: "uint8"
1210
+ }
1211
+ ],
1212
+ name: "BaseModule_HooksParamsLengthMismatch",
1213
+ type: "error"
1214
+ },
1215
+ {
1216
+ inputs: [
1217
+ ],
1218
+ name: "BaseModule_OnlyModuleRegistry",
1219
+ type: "error"
1220
+ },
1221
+ {
1222
+ inputs: [
1223
+ ],
1224
+ name: "BaseModule_ZeroIpaRegistry",
1225
+ type: "error"
1226
+ },
1227
+ {
1228
+ inputs: [
1229
+ ],
1230
+ name: "BaseModule_ZeroLicenseRegistry",
1231
+ type: "error"
1232
+ },
1233
+ {
1234
+ inputs: [
1235
+ ],
1236
+ name: "BaseModule_ZeroModuleRegistry",
1237
+ type: "error"
1238
+ },
1239
+ {
1240
+ inputs: [
1241
+ ],
1242
+ name: "BaseRelationshipProcessor_OnlyRelationshipModule",
1243
+ type: "error"
1244
+ },
1245
+ {
1246
+ inputs: [
1247
+ ],
1248
+ name: "CollectModule_CallerUnauthorized",
1249
+ type: "error"
1250
+ },
1251
+ {
1252
+ inputs: [
1253
+ ],
1254
+ name: "CollectModule_CollectNotYetInitialized",
1255
+ type: "error"
1256
+ },
1257
+ {
1258
+ inputs: [
1259
+ ],
1260
+ name: "CollectModule_CollectUnauthorized",
1261
+ type: "error"
1262
+ },
1263
+ {
1264
+ inputs: [
1265
+ ],
1266
+ name: "CollectModule_IPAssetAlreadyInitialized",
1267
+ type: "error"
1268
+ },
1269
+ {
1270
+ inputs: [
1271
+ ],
1272
+ name: "CollectModule_IPAssetNonExistent",
1273
+ type: "error"
1274
+ },
1275
+ {
1276
+ inputs: [
1277
+ ],
1278
+ name: "CollectModule_IPOrgNonExistent",
1279
+ type: "error"
1280
+ },
1281
+ {
1282
+ inputs: [
1283
+ ],
1284
+ name: "CollectNFT_AlreadyInitialized",
1285
+ type: "error"
1286
+ },
1287
+ {
1288
+ inputs: [
1289
+ ],
1290
+ name: "CollectNFT_CallerUnauthorized",
1291
+ type: "error"
1292
+ },
1293
+ {
1294
+ inputs: [
1295
+ ],
1296
+ name: "CollectNFT_CollectorInvalid",
1297
+ type: "error"
1298
+ },
1299
+ {
1300
+ inputs: [
1301
+ ],
1302
+ name: "CollectNFT_IPAssetNonExistent",
1303
+ type: "error"
1304
+ },
1305
+ {
1306
+ inputs: [
1307
+ ],
1308
+ name: "CollectPaymentModule_AmountInvalid",
1309
+ type: "error"
1310
+ },
1311
+ {
1312
+ inputs: [
1313
+ ],
1314
+ name: "CollectPaymentModule_ERC20TransferFailed",
1315
+ type: "error"
1316
+ },
1317
+ {
1318
+ inputs: [
1319
+ ],
1320
+ name: "CollectPaymentModule_ERC20TransferInvalidABIEncoding",
1321
+ type: "error"
1322
+ },
1323
+ {
1324
+ inputs: [
1325
+ ],
1326
+ name: "CollectPaymentModule_ERC20TransferInvalidReturnValue",
1327
+ type: "error"
1328
+ },
1329
+ {
1330
+ inputs: [
1331
+ ],
1332
+ name: "CollectPaymentModule_InvalidSettings",
1333
+ type: "error"
1334
+ },
1335
+ {
1336
+ inputs: [
1337
+ ],
1338
+ name: "CollectPaymentModule_NativeTokenNotAllowed",
1339
+ type: "error"
1340
+ },
1341
+ {
1342
+ inputs: [
1343
+ ],
1344
+ name: "CollectPaymentModule_NativeTransferFailed",
1345
+ type: "error"
1346
+ },
1347
+ {
1348
+ inputs: [
1349
+ ],
1350
+ name: "CollectPaymentModule_PaymentInsufficient",
1351
+ type: "error"
1352
+ },
1353
+ {
1354
+ inputs: [
1355
+ ],
1356
+ name: "CollectPaymentModule_PaymentParamsInvalid",
1357
+ type: "error"
1358
+ },
1359
+ {
1360
+ inputs: [
1361
+ ],
1362
+ name: "CollectPaymentModule_TokenInvalid",
1363
+ type: "error"
1364
+ },
1365
+ {
1366
+ inputs: [
1367
+ ],
1368
+ name: "ERC721_OwnerInvalid",
1369
+ type: "error"
1370
+ },
1371
+ {
1372
+ inputs: [
1373
+ ],
1374
+ name: "ERC721_ReceiverInvalid",
1375
+ type: "error"
1376
+ },
1377
+ {
1378
+ inputs: [
1379
+ ],
1380
+ name: "ERC721_SafeTransferUnsupported",
1381
+ type: "error"
1382
+ },
1383
+ {
1384
+ inputs: [
1385
+ ],
1386
+ name: "ERC721_SenderUnauthorized",
1387
+ type: "error"
1388
+ },
1389
+ {
1390
+ inputs: [
1391
+ ],
1392
+ name: "ERC721_TokenAlreadyMinted",
1393
+ type: "error"
1394
+ },
1395
+ {
1396
+ inputs: [
1397
+ ],
1398
+ name: "ERC721_TokenNonExistent",
1399
+ type: "error"
1400
+ },
1401
+ {
1402
+ inputs: [
1403
+ ],
1404
+ name: "EmptyArray",
1405
+ type: "error"
1406
+ },
1407
+ {
1408
+ inputs: [
1409
+ ],
1410
+ name: "HookRegistry_CallerNotIPOrgOwner",
1411
+ type: "error"
1412
+ },
1413
+ {
1414
+ inputs: [
1415
+ ],
1416
+ name: "HookRegistry_HooksConfigLengthMismatch",
1417
+ type: "error"
1418
+ },
1419
+ {
1420
+ inputs: [
1421
+ {
1422
+ internalType: "uint256",
1423
+ name: "hooksIndex",
1424
+ type: "uint256"
1425
+ }
1426
+ ],
1427
+ name: "HookRegistry_IndexOutOfBounds",
1428
+ type: "error"
1429
+ },
1430
+ {
1431
+ inputs: [
1432
+ ],
1433
+ name: "HookRegistry_MaxHooksExceeded",
1434
+ type: "error"
1435
+ },
1436
+ {
1437
+ inputs: [
1438
+ ],
1439
+ name: "HookRegistry_RegisteringDuplicatedHook",
1440
+ type: "error"
1441
+ },
1442
+ {
1443
+ inputs: [
1444
+ ],
1445
+ name: "HookRegistry_RegisteringZeroAddressHook",
1446
+ type: "error"
1447
+ },
1448
+ {
1449
+ inputs: [
1450
+ {
1451
+ internalType: "bytes32",
1452
+ name: "invalidRequestId",
1453
+ type: "bytes32"
1454
+ }
1455
+ ],
1456
+ name: "Hook_InvalidAsyncRequestId",
1457
+ type: "error"
1458
+ },
1459
+ {
1460
+ inputs: [
1461
+ {
1462
+ internalType: "address",
1463
+ name: "current",
1464
+ type: "address"
1465
+ },
1466
+ {
1467
+ internalType: "address",
1468
+ name: "expected",
1469
+ type: "address"
1470
+ }
1471
+ ],
1472
+ name: "Hook_OnlyCallbackCallerCanCallback",
1473
+ type: "error"
1474
+ },
1475
+ {
1476
+ inputs: [
1477
+ ],
1478
+ name: "Hook_UnsupportedAsyncOperation",
1479
+ type: "error"
1480
+ },
1481
+ {
1482
+ inputs: [
1483
+ ],
1484
+ name: "Hook_UnsupportedSyncOperation",
1485
+ type: "error"
1486
+ },
1487
+ {
1488
+ inputs: [
1489
+ ],
1490
+ name: "IPAccountImpl_CallerNotOwner",
1491
+ type: "error"
1492
+ },
1493
+ {
1494
+ inputs: [
1495
+ ],
1496
+ name: "IPAccountRegistry_InitializationFailed",
1497
+ type: "error"
1498
+ },
1499
+ {
1500
+ inputs: [
1501
+ ],
1502
+ name: "IPAccountRegistry_NonExistentIpAccountImpl",
1503
+ type: "error"
1504
+ },
1505
+ {
1506
+ inputs: [
1507
+ ],
1508
+ name: "IPOrgController_IPOrgNonExistent",
1509
+ type: "error"
1510
+ },
1511
+ {
1512
+ inputs: [
1513
+ ],
1514
+ name: "IPOrgController_InvalidIPOrgOwner",
1515
+ type: "error"
1516
+ },
1517
+ {
1518
+ inputs: [
1519
+ ],
1520
+ name: "IPOrgController_InvalidNewIPOrgOwner",
1521
+ type: "error"
1522
+ },
1523
+ {
1524
+ inputs: [
1525
+ ],
1526
+ name: "IPOrgController_InvalidOwner",
1527
+ type: "error"
1528
+ },
1529
+ {
1530
+ inputs: [
1531
+ ],
1532
+ name: "IPOrgController_OwnerTransferUninitialized",
1533
+ type: "error"
1534
+ },
1535
+ {
1536
+ inputs: [
1537
+ ],
1538
+ name: "IPOrg_IdDoesNotExist",
1539
+ type: "error"
1540
+ },
1541
+ {
1542
+ inputs: [
1543
+ ],
1544
+ name: "IPOrg_IdOverBounds",
1545
+ type: "error"
1546
+ },
1547
+ {
1548
+ inputs: [
1549
+ ],
1550
+ name: "IPOrg_LicensingNotConfigured",
1551
+ type: "error"
1552
+ },
1553
+ {
1554
+ inputs: [
1555
+ ],
1556
+ name: "LengthMismatch",
1557
+ type: "error"
1558
+ },
1559
+ {
1560
+ inputs: [
1561
+ ],
1562
+ name: "LibDuration_CallerNotRenewer",
1563
+ type: "error"
1564
+ },
1565
+ {
1566
+ inputs: [
1567
+ ],
1568
+ name: "LibDuration_InvalidStartTime",
1569
+ type: "error"
1570
+ },
1571
+ {
1572
+ inputs: [
1573
+ ],
1574
+ name: "LibDuration_NotRenewable",
1575
+ type: "error"
1576
+ },
1577
+ {
1578
+ inputs: [
1579
+ ],
1580
+ name: "LibDuration_ZeroTTL",
1581
+ type: "error"
1582
+ },
1583
+ {
1584
+ inputs: [
1585
+ ],
1586
+ name: "LibUintArrayMask_EmptyArray",
1587
+ type: "error"
1588
+ },
1589
+ {
1590
+ inputs: [
1591
+ ],
1592
+ name: "LicenseRegistry_CallerNotLicensingModule",
1593
+ type: "error"
1594
+ },
1595
+ {
1596
+ inputs: [
1597
+ ],
1598
+ name: "LicenseRegistry_CallerNotRevoker",
1599
+ type: "error"
1600
+ },
1601
+ {
1602
+ inputs: [
1603
+ ],
1604
+ name: "LicenseRegistry_InvalidIpa",
1605
+ type: "error"
1606
+ },
1607
+ {
1608
+ inputs: [
1609
+ ],
1610
+ name: "LicenseRegistry_InvalidLicenseStatus",
1611
+ type: "error"
1612
+ },
1613
+ {
1614
+ inputs: [
1615
+ ],
1616
+ name: "LicenseRegistry_LicenseNotPending",
1617
+ type: "error"
1618
+ },
1619
+ {
1620
+ inputs: [
1621
+ ],
1622
+ name: "LicenseRegistry_NotLicenseNFT",
1623
+ type: "error"
1624
+ },
1625
+ {
1626
+ inputs: [
1627
+ ],
1628
+ name: "LicenseRegistry_UnknownLicenseId",
1629
+ type: "error"
1630
+ },
1631
+ {
1632
+ inputs: [
1633
+ ],
1634
+ name: "LicenseRegistry_ZeroIpaRegistryAddress",
1635
+ type: "error"
1636
+ },
1637
+ {
1638
+ inputs: [
1639
+ ],
1640
+ name: "LicenseRegistry_ZeroModuleRegistryAddress",
1641
+ type: "error"
1642
+ },
1643
+ {
1644
+ inputs: [
1645
+ ],
1646
+ name: "LicensingModule_CallerNotIpOrgOwner",
1647
+ type: "error"
1648
+ },
1649
+ {
1650
+ inputs: [
1651
+ ],
1652
+ name: "LicensingModule_CallerNotLicenseOwner",
1653
+ type: "error"
1654
+ },
1655
+ {
1656
+ inputs: [
1657
+ ],
1658
+ name: "LicensingModule_CallerNotLicensor",
1659
+ type: "error"
1660
+ },
1661
+ {
1662
+ inputs: [
1663
+ ],
1664
+ name: "LicensingModule_CantFindParentLicenseOrRelatedIpa",
1665
+ type: "error"
1666
+ },
1667
+ {
1668
+ inputs: [
1669
+ ],
1670
+ name: "LicensingModule_CommercialLicenseNotAllowed",
1671
+ type: "error"
1672
+ },
1673
+ {
1674
+ inputs: [
1675
+ ],
1676
+ name: "LicensingModule_DuplicateTermId",
1677
+ type: "error"
1678
+ },
1679
+ {
1680
+ inputs: [
1681
+ ],
1682
+ name: "LicensingModule_InvalidAction",
1683
+ type: "error"
1684
+ },
1685
+ {
1686
+ inputs: [
1687
+ ],
1688
+ name: "LicensingModule_InvalidConfigType",
1689
+ type: "error"
1690
+ },
1691
+ {
1692
+ inputs: [
1693
+ ],
1694
+ name: "LicensingModule_InvalidIpa",
1695
+ type: "error"
1696
+ },
1697
+ {
1698
+ inputs: [
1699
+ ],
1700
+ name: "LicensingModule_InvalidLicenseeType",
1701
+ type: "error"
1702
+ },
1703
+ {
1704
+ inputs: [
1705
+ ],
1706
+ name: "LicensingModule_InvalidLicensorType",
1707
+ type: "error"
1708
+ },
1709
+ {
1710
+ inputs: [
1711
+ ],
1712
+ name: "LicensingModule_InvalidTermCommercialStatus",
1713
+ type: "error"
1714
+ },
1715
+ {
1716
+ inputs: [
1717
+ ],
1718
+ name: "LicensingModule_IpOrgFrameworkAlreadySet",
1719
+ type: "error"
1720
+ },
1721
+ {
1722
+ inputs: [
1723
+ ],
1724
+ name: "LicensingModule_IpOrgNotConfigured",
1725
+ type: "error"
1726
+ },
1727
+ {
1728
+ inputs: [
1729
+ ],
1730
+ name: "LicensingModule_NonCommercialTermsRequired",
1731
+ type: "error"
1732
+ },
1733
+ {
1734
+ inputs: [
1735
+ ],
1736
+ name: "LicensingModule_ParentLicenseNotActive",
1737
+ type: "error"
1738
+ },
1739
+ {
1740
+ inputs: [
1741
+ ],
1742
+ name: "LicensingModule_ShareAlikeDisabled",
1743
+ type: "error"
1744
+ },
1745
+ {
1746
+ inputs: [
1747
+ ],
1748
+ name: "LicensingModule_ipOrgTermNotFound",
1749
+ type: "error"
1750
+ },
1751
+ {
1752
+ inputs: [
1753
+ ],
1754
+ name: "LicensorApprovalHook_ApprovalAlreadyRequested",
1755
+ type: "error"
1756
+ },
1757
+ {
1758
+ inputs: [
1759
+ ],
1760
+ name: "LicensorApprovalHook_InvalidLicenseId",
1761
+ type: "error"
1762
+ },
1763
+ {
1764
+ inputs: [
1765
+ ],
1766
+ name: "LicensorApprovalHook_InvalidLicensor",
1767
+ type: "error"
1768
+ },
1769
+ {
1770
+ inputs: [
1771
+ ],
1772
+ name: "LicensorApprovalHook_InvalidResponseStatus",
1773
+ type: "error"
1774
+ },
1775
+ {
1776
+ inputs: [
1777
+ ],
1778
+ name: "LicensorApprovalHook_NoApprovalRequested",
1779
+ type: "error"
1780
+ },
1781
+ {
1782
+ inputs: [
1783
+ {
1784
+ internalType: "bytes32",
1785
+ name: "role",
1786
+ type: "bytes32"
1787
+ },
1788
+ {
1789
+ internalType: "address",
1790
+ name: "account",
1791
+ type: "address"
1792
+ }
1793
+ ],
1794
+ name: "MissingRole",
1795
+ type: "error"
1796
+ },
1797
+ {
1798
+ inputs: [
1799
+ ],
1800
+ name: "ModuleRegistry_CallerNotOrgOwner",
1801
+ type: "error"
1802
+ },
1803
+ {
1804
+ inputs: [
1805
+ {
1806
+ internalType: "string",
1807
+ name: "moduleName",
1808
+ type: "string"
1809
+ }
1810
+ ],
1811
+ name: "ModuleRegistry_ModuleNotRegistered",
1812
+ type: "error"
1813
+ },
1814
+ {
1815
+ inputs: [
1816
+ {
1817
+ internalType: "uint256",
1818
+ name: "id",
1819
+ type: "uint256"
1820
+ }
1821
+ ],
1822
+ name: "NonExistentID",
1823
+ type: "error"
1824
+ },
1825
+ {
1826
+ inputs: [
1827
+ ],
1828
+ name: "RegistrationModule_CallerNotAuthorized",
1829
+ type: "error"
1830
+ },
1831
+ {
1832
+ inputs: [
1833
+ ],
1834
+ name: "RegistrationModule_IPAssetNonExistent",
1835
+ type: "error"
1836
+ },
1837
+ {
1838
+ inputs: [
1839
+ ],
1840
+ name: "RegistrationModule_IPOrgNotConfigured",
1841
+ type: "error"
1842
+ },
1843
+ {
1844
+ inputs: [
1845
+ ],
1846
+ name: "RegistrationModule_InvalidCaller",
1847
+ type: "error"
1848
+ },
1849
+ {
1850
+ inputs: [
1851
+ ],
1852
+ name: "RegistrationModule_InvalidConfigOperation",
1853
+ type: "error"
1854
+ },
1855
+ {
1856
+ inputs: [
1857
+ ],
1858
+ name: "RegistrationModule_InvalidExecutionOperation",
1859
+ type: "error"
1860
+ },
1861
+ {
1862
+ inputs: [
1863
+ ],
1864
+ name: "RegistrationModule_InvalidIPAssetType",
1865
+ type: "error"
1866
+ },
1867
+ {
1868
+ inputs: [
1869
+ ],
1870
+ name: "RegistrationModule_TooManyAssetTypes",
1871
+ type: "error"
1872
+ },
1873
+ {
1874
+ inputs: [
1875
+ ],
1876
+ name: "RelationshipModule_CallerNotIpOrgOwner",
1877
+ type: "error"
1878
+ },
1879
+ {
1880
+ inputs: [
1881
+ ],
1882
+ name: "RelationshipModule_CannotRelateToOtherIPOrg",
1883
+ type: "error"
1884
+ },
1885
+ {
1886
+ inputs: [
1887
+ ],
1888
+ name: "RelationshipModule_IntentAlreadyRegistered",
1889
+ type: "error"
1890
+ },
1891
+ {
1892
+ inputs: [
1893
+ ],
1894
+ name: "RelationshipModule_InvalidConfigOperation",
1895
+ type: "error"
1896
+ },
1897
+ {
1898
+ inputs: [
1899
+ ],
1900
+ name: "RelationshipModule_InvalidDstAddress",
1901
+ type: "error"
1902
+ },
1903
+ {
1904
+ inputs: [
1905
+ ],
1906
+ name: "RelationshipModule_InvalidDstId",
1907
+ type: "error"
1908
+ },
1909
+ {
1910
+ inputs: [
1911
+ ],
1912
+ name: "RelationshipModule_InvalidEndTimestamp",
1913
+ type: "error"
1914
+ },
1915
+ {
1916
+ inputs: [
1917
+ ],
1918
+ name: "RelationshipModule_InvalidRelatable",
1919
+ type: "error"
1920
+ },
1921
+ {
1922
+ inputs: [
1923
+ ],
1924
+ name: "RelationshipModule_InvalidSrcAddress",
1925
+ type: "error"
1926
+ },
1927
+ {
1928
+ inputs: [
1929
+ ],
1930
+ name: "RelationshipModule_InvalidSrcId",
1931
+ type: "error"
1932
+ },
1933
+ {
1934
+ inputs: [
1935
+ ],
1936
+ name: "RelationshipModule_InvalidTTL",
1937
+ type: "error"
1938
+ },
1939
+ {
1940
+ inputs: [
1941
+ ],
1942
+ name: "RelationshipModule_IpOrgRelatableCannotBeProtocolLevel",
1943
+ type: "error"
1944
+ },
1945
+ {
1946
+ inputs: [
1947
+ ],
1948
+ name: "RelationshipModule_NonExistingRelationship",
1949
+ type: "error"
1950
+ },
1951
+ {
1952
+ inputs: [
1953
+ {
1954
+ internalType: "string",
1955
+ name: "relType",
1956
+ type: "string"
1957
+ }
1958
+ ],
1959
+ name: "RelationshipModule_RelTypeNotSet",
1960
+ type: "error"
1961
+ },
1962
+ {
1963
+ inputs: [
1964
+ ],
1965
+ name: "RelationshipModule_UnsupportedIpOrgIndexType",
1966
+ type: "error"
1967
+ },
1968
+ {
1969
+ inputs: [
1970
+ ],
1971
+ name: "RelationshipModule_UnsupportedRelationshipDst",
1972
+ type: "error"
1973
+ },
1974
+ {
1975
+ inputs: [
1976
+ ],
1977
+ name: "RelationshipModule_UnsupportedRelationshipSrc",
1978
+ type: "error"
1979
+ },
1980
+ {
1981
+ inputs: [
1982
+ {
1983
+ internalType: "uint256",
1984
+ name: "accountsLength",
1985
+ type: "uint256"
1986
+ },
1987
+ {
1988
+ internalType: "uint256",
1989
+ name: "allocationsLength",
1990
+ type: "uint256"
1991
+ }
1992
+ ],
1993
+ name: "RoyaltyNFT_AccountsAndAllocationsMismatch",
1994
+ type: "error"
1995
+ },
1996
+ {
1997
+ inputs: [
1998
+ {
1999
+ internalType: "uint32",
2000
+ name: "allocationsSum",
2001
+ type: "uint32"
2002
+ }
2003
+ ],
2004
+ name: "RoyaltyNFT_InvalidAllocationsSum",
2005
+ type: "error"
2006
+ },
2007
+ {
2008
+ inputs: [
2009
+ ],
2010
+ name: "TermsRegistry_CommercialStatusUnset",
2011
+ type: "error"
2012
+ },
2013
+ {
2014
+ inputs: [
2015
+ ],
2016
+ name: "TermsRegistry_TermAlreadyExists",
2017
+ type: "error"
2018
+ },
2019
+ {
2020
+ inputs: [
2021
+ ],
2022
+ name: "TermsRegistry_UnsupportedTerm",
2023
+ type: "error"
2024
+ },
2025
+ {
2026
+ inputs: [
2027
+ ],
2028
+ name: "TermsRegistry_UnsupportedTermCategory",
2029
+ type: "error"
2030
+ },
2031
+ {
2032
+ inputs: [
2033
+ {
2034
+ internalType: "address",
2035
+ name: "tokenAddress",
2036
+ type: "address"
2037
+ },
2038
+ {
2039
+ internalType: "address",
2040
+ name: "ownerAddress",
2041
+ type: "address"
2042
+ }
2043
+ ],
2044
+ name: "TokenGatedHook_NotTokenOwner",
2045
+ type: "error"
2046
+ },
2047
+ {
2048
+ inputs: [
2049
+ ],
2050
+ name: "Unauthorized",
2051
+ type: "error"
2052
+ },
2053
+ {
2054
+ inputs: [
2055
+ {
2056
+ internalType: "string",
2057
+ name: "name",
2058
+ type: "string"
2059
+ }
2060
+ ],
2061
+ name: "UnsupportedInterface",
2062
+ type: "error"
2063
+ },
2064
+ {
2065
+ inputs: [
2066
+ ],
2067
+ name: "ZeroAddress",
2068
+ type: "error"
2069
+ },
2070
+ {
2071
+ inputs: [
2072
+ ],
2073
+ name: "ZeroAmount",
2074
+ type: "error"
1203
2075
  }
1204
2076
  ];
1205
2077
 
@@ -1775,33 +2647,6 @@ function isIntegerString(s) {
1775
2647
  function parseToBigInt(num) {
1776
2648
  return BigInt(num);
1777
2649
  }
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
2650
  function waitTxAndFilterLog(_x, _x2, _x3) {
1806
2651
  return _waitTxAndFilterLog.apply(this, arguments);
1807
2652
  }
@@ -1864,14 +2709,24 @@ function _waitTxAndFilterLog() {
1864
2709
  }));
1865
2710
  return _waitTxAndFilterLog.apply(this, arguments);
1866
2711
  }
1867
- var dictToQueryParams = function dictToQueryParams(params) {
2712
+ function dictToQueryParams(params) {
1868
2713
  var queryParamList = [];
1869
2714
  for (var key in params) {
1870
2715
  var value = params[key];
1871
2716
  queryParamList.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value)));
1872
2717
  }
1873
2718
  return queryParamList.join("&");
1874
- };
2719
+ }
2720
+ function typedDataArrayToBytesArray(typedDataArray) {
2721
+ var result = [];
2722
+ typedDataArray.forEach(function (typedData) {
2723
+ result.push(typedDataToBytes(typedData));
2724
+ });
2725
+ return result;
2726
+ }
2727
+ function typedDataToBytes(typedData) {
2728
+ return viem.encodeAbiParameters(viem.parseAbiParameters(typedData["interface"]), typedData.data);
2729
+ }
1875
2730
 
1876
2731
  /**
1877
2732
  * IPOrgClient allows you to create, update, view, search IPOrgs on
@@ -2024,8 +2879,8 @@ var RelationshipReadOnlyClient = /*#__PURE__*/function () {
2024
2879
  _context2.next = 3;
2025
2880
  return this.httpClient.post("/protocol/relationship", request, {
2026
2881
  params: {
2027
- contract: (request === null || request === void 0 ? void 0 : request.contract) || process.env.IP_ASSET_REGISTRY_CONTRACT || process.env.NEXT_PUBLIC_IP_ASSET_REGISTRY_CONTRACT,
2028
- tokenId: request === null || request === void 0 ? void 0 : request.tokenId
2882
+ contract: request.contract,
2883
+ tokenId: request.tokenId
2029
2884
  }
2030
2885
  });
2031
2886
  case 3:
@@ -3174,12 +4029,12 @@ var IPAssetClient = /*#__PURE__*/function (_IPAssetReadOnlyClien) {
3174
4029
  args: [viem.getAddress(request.ipOrgId), {
3175
4030
  owner: viem.getAddress(request.owner || this.wallet.account.address),
3176
4031
  name: request.name,
3177
- ipOrgAssetType: parseToBigInt(request.type),
4032
+ ipOrgAssetType: parseToBigInt(request.typeIndex),
3178
4033
  hash: viem.toHex(request.contentHash || "", {
3179
4034
  size: 32
3180
4035
  }),
3181
4036
  mediaUrl: request.mediaUrl || ""
3182
- }, [], []],
4037
+ }, request.preHookData ? typedDataArrayToBytesArray(request.preHookData) : [], request.postHookData ? typedDataArrayToBytesArray(request.postHookData) : []],
3183
4038
  account: this.wallet.account
3184
4039
  }));
3185
4040
  case 3:
@@ -3674,38 +4529,47 @@ var PlatformClient = /*#__PURE__*/function () {
3674
4529
  key: "uploadFile",
3675
4530
  value: function () {
3676
4531
  var _uploadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file, mimeType) {
3677
- var base64, paylod, response;
4532
+ var preSignUrlResp, data, uploadResp, confirmResp;
3678
4533
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3679
4534
  while (1) switch (_context.prev = _context.next) {
3680
4535
  case 0:
3681
4536
  _context.prev = 0;
3682
4537
  _context.next = 3;
3683
- return fileToBase64(file);
4538
+ return this.httpClient.post("/platform/file-upload/request");
3684
4539
  case 3:
3685
- base64 = _context.sent;
3686
- paylod = {
3687
- base64: base64,
3688
- mimeType: mimeType
3689
- };
4540
+ preSignUrlResp = _context.sent;
4541
+ data = preSignUrlResp.data; // upload the file to s3
3690
4542
  _context.next = 7;
3691
- return this.httpClient.post("/protocol/v2/files/upload", paylod, {
4543
+ return this.httpClient.put(data.url, file, {
3692
4544
  timeout: 0,
3693
4545
  headers: {
3694
- "Content-Type": "application/json"
4546
+ "Content-Type": mimeType
3695
4547
  }
3696
4548
  });
3697
4549
  case 7:
3698
- response = _context.sent;
3699
- return _context.abrupt("return", response.data);
3700
- case 11:
3701
- _context.prev = 11;
4550
+ uploadResp = _context.sent;
4551
+ if (!(uploadResp.status !== 200)) {
4552
+ _context.next = 10;
4553
+ break;
4554
+ }
4555
+ throw new Error("Failed to upload file to s3. Status: ".concat(uploadResp.status));
4556
+ case 10:
4557
+ _context.next = 12;
4558
+ return this.httpClient.post("/platform/file-upload/confirm", {
4559
+ key: data.key
4560
+ });
4561
+ case 12:
4562
+ confirmResp = _context.sent;
4563
+ return _context.abrupt("return", confirmResp.data);
4564
+ case 16:
4565
+ _context.prev = 16;
3702
4566
  _context.t0 = _context["catch"](0);
3703
- return _context.abrupt("return", handleError(_context.t0, ">>> Failed to upload file"));
3704
- case 14:
4567
+ return _context.abrupt("return", handleError(_context.t0, "Failed to upload file"));
4568
+ case 19:
3705
4569
  case "end":
3706
4570
  return _context.stop();
3707
4571
  }
3708
- }, _callee, this, [[0, 11]]);
4572
+ }, _callee, this, [[0, 16]]);
3709
4573
  }));
3710
4574
  function uploadFile(_x, _x2) {
3711
4575
  return _uploadFile.apply(this, arguments);
@@ -5709,7 +6573,7 @@ var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
5709
6573
  srcId: request.srcTokenId,
5710
6574
  dstAddress: request.dstContract,
5711
6575
  dstId: request.dstTokenId
5712
- }, [], []],
6576
+ }, request.preHookData ? typedDataArrayToBytesArray(request.preHookData) : [], request.postHookData ? typedDataArrayToBytesArray(request.postHookData) : []],
5713
6577
  account: this.wallet.account
5714
6578
  }));
5715
6579
  case 3:
@@ -5887,8 +6751,8 @@ var RelationshipTypeClient = /*#__PURE__*/function (_RelationshipTypeRead) {
5887
6751
  src: request.relatedElements.src,
5888
6752
  dst: request.relatedElements.dst
5889
6753
  },
5890
- allowedSrcs: request.allowedSrcs,
5891
- allowedDsts: request.allowedDsts
6754
+ allowedSrcs: request.allowedSrcIpAssetTypes,
6755
+ allowedDsts: request.allowedDstIpAssetTypes
5892
6756
  }],
5893
6757
  account: this.wallet.account
5894
6758
  }));
@@ -6217,31 +7081,19 @@ var StoryClient = /*#__PURE__*/function () {
6217
7081
  return StoryClient;
6218
7082
  }();
6219
7083
 
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
7084
  /**
6233
7085
  * @public
6234
7086
  */
6235
7087
  var ResourceType = /*#__PURE__*/function (ResourceType) {
6236
- ResourceType[ResourceType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6237
- ResourceType[ResourceType["IP_ORG"] = 1] = "IP_ORG";
6238
- ResourceType[ResourceType["IP_ASSET"] = 2] = "IP_ASSET";
6239
- ResourceType[ResourceType["LICENSE"] = 3] = "LICENSE";
6240
- ResourceType[ResourceType["RELATIONSHIP"] = 4] = "RELATIONSHIP";
6241
- ResourceType[ResourceType["RELATIONSHIPTYPE"] = 5] = "RELATIONSHIPTYPE";
6242
- ResourceType[ResourceType["MODULE"] = 6] = "MODULE";
6243
- ResourceType[ResourceType["HOOK"] = 7] = "HOOK";
6244
- ResourceType[ResourceType["DISPUTE"] = 8] = "DISPUTE";
7088
+ ResourceType["Unspecified"] = "Unspecified";
7089
+ ResourceType["IPOrg"] = "IPOrg";
7090
+ ResourceType["IPAsset"] = "IPAsset";
7091
+ ResourceType["License"] = "License";
7092
+ ResourceType["Relationship"] = "Relationship";
7093
+ ResourceType["RelationshipType"] = "RelationshipType";
7094
+ ResourceType["Module"] = "Module";
7095
+ ResourceType["Hook"] = "Hook";
7096
+ ResourceType["Dispute"] = "Dispute";
6245
7097
  return ResourceType;
6246
7098
  }({});
6247
7099
 
@@ -6249,8 +7101,8 @@ var ResourceType = /*#__PURE__*/function (ResourceType) {
6249
7101
  * @public
6250
7102
  */
6251
7103
  var HookType = /*#__PURE__*/function (HookType) {
6252
- HookType[HookType["PRE_ACTION"] = 0] = "PRE_ACTION";
6253
- HookType[HookType["POST_ACTION"] = 1] = "POST_ACTION";
7104
+ HookType[HookType["PreAction"] = 0] = "PreAction";
7105
+ HookType[HookType["PostAction"] = 1] = "PostAction";
6254
7106
  return HookType;
6255
7107
  }({});
6256
7108
 
@@ -6258,14 +7110,24 @@ var HookType = /*#__PURE__*/function (HookType) {
6258
7110
  * @public
6259
7111
  */
6260
7112
  var ActionType = /*#__PURE__*/function (ActionType) {
6261
- ActionType[ActionType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
6262
- ActionType[ActionType["REGISTER"] = 1] = "REGISTER";
6263
- ActionType[ActionType["UNREGISTER"] = 2] = "UNREGISTER";
6264
- ActionType[ActionType["CONFIGURE"] = 3] = "CONFIGURE";
6265
- ActionType[ActionType["CREATE"] = 4] = "CREATE";
7113
+ ActionType["Unspecified"] = "Unspecified";
7114
+ ActionType["Register"] = "Register";
7115
+ ActionType["Unregister"] = "Unregister";
7116
+ ActionType["Configure"] = "Configure";
7117
+ ActionType["Create"] = "Create";
6266
7118
  return ActionType;
6267
7119
  }({});
6268
7120
 
7121
+ var Relatables = /*#__PURE__*/function (Relatables) {
7122
+ Relatables[Relatables["Undefined"] = 0] = "Undefined";
7123
+ Relatables[Relatables["IPA"] = 1] = "IPA";
7124
+ Relatables[Relatables["IPOrgEntry"] = 2] = "IPOrgEntry";
7125
+ Relatables[Relatables["License"] = 3] = "License";
7126
+ Relatables[Relatables["Address"] = 4] = "Address";
7127
+ Relatables[Relatables["ExternalNFT"] = 5] = "ExternalNFT";
7128
+ return Relatables;
7129
+ }({});
7130
+
6269
7131
  var AddressZero = "0x0000000000000000000000000000000000000000";
6270
7132
 
6271
7133
  exports.ActionType = ActionType;
@@ -6274,13 +7136,13 @@ exports.HookReadOnlyClient = HookReadOnlyClient;
6274
7136
  exports.HookType = HookType;
6275
7137
  exports.IPAssetClient = IPAssetClient;
6276
7138
  exports.IPAssetReadOnlyClient = IPAssetReadOnlyClient;
6277
- exports.IPAssetType = IPAssetType;
6278
7139
  exports.IPOrgClient = IPOrgClient;
6279
7140
  exports.IPOrgReadOnlyClient = IPOrgReadOnlyClient;
6280
7141
  exports.LicenseClient = LicenseClient;
6281
7142
  exports.LicenseReadOnlyClient = LicenseReadOnlyClient;
6282
7143
  exports.ModuleReadOnlyClient = ModuleReadOnlyClient;
6283
7144
  exports.PlatformClient = PlatformClient;
7145
+ exports.Relatables = Relatables;
6284
7146
  exports.RelationshipClient = RelationshipClient;
6285
7147
  exports.ResourceType = ResourceType;
6286
7148
  exports.StoryClient = StoryClient;