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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. package/dist/declarations/src/client.d.ts +11 -0
  2. package/dist/declarations/src/client.d.ts.map +1 -1
  3. package/dist/declarations/src/constants/addresses.d.ts +2 -0
  4. package/dist/declarations/src/constants/addresses.d.ts.map +1 -0
  5. package/dist/declarations/src/enums/HookType.d.ts +8 -0
  6. package/dist/declarations/src/enums/HookType.d.ts.map +1 -0
  7. package/dist/declarations/src/index.d.ts +17 -1
  8. package/dist/declarations/src/index.d.ts.map +1 -1
  9. package/dist/declarations/src/resources/relationship.d.ts +1 -8
  10. package/dist/declarations/src/resources/relationship.d.ts.map +1 -1
  11. package/dist/declarations/src/resources/relationshipType.d.ts +19 -0
  12. package/dist/declarations/src/resources/relationshipType.d.ts.map +1 -0
  13. package/dist/declarations/src/resources/relationshipTypeReadOnly.d.ts +26 -0
  14. package/dist/declarations/src/resources/relationshipTypeReadOnly.d.ts.map +1 -0
  15. package/dist/declarations/src/types/client.d.ts +4 -0
  16. package/dist/declarations/src/types/client.d.ts.map +1 -1
  17. package/dist/declarations/src/types/resources/relationship.d.ts +0 -15
  18. package/dist/declarations/src/types/resources/relationship.d.ts.map +1 -1
  19. package/dist/declarations/src/types/resources/relationshipType.d.ts +44 -0
  20. package/dist/declarations/src/types/resources/relationshipType.d.ts.map +1 -0
  21. package/dist/declarations/src/utils/platform.d.ts.map +1 -1
  22. package/dist/story-protocol-core-sdk.cjs.dev.js +4102 -464
  23. package/dist/story-protocol-core-sdk.cjs.prod.js +4102 -464
  24. package/dist/story-protocol-core-sdk.esm.js +4089 -465
  25. package/package.json +1 -1
@@ -616,306 +616,1085 @@ var IPOrgReadOnlyClient = /*#__PURE__*/function () {
616
616
  return IPOrgReadOnlyClient;
617
617
  }();
618
618
 
619
+ var storyProtocolJson = [
620
+ {
621
+ inputs: [
622
+ {
623
+ internalType: "contract IIPOrgController",
624
+ name: "ipOrgController_",
625
+ type: "address"
626
+ },
627
+ {
628
+ internalType: "contract ModuleRegistry",
629
+ name: "moduleRegistry_",
630
+ type: "address"
631
+ }
632
+ ],
633
+ stateMutability: "nonpayable",
634
+ type: "constructor"
635
+ },
636
+ {
637
+ inputs: [
638
+ ],
639
+ name: "ZeroAddress",
640
+ type: "error"
641
+ },
642
+ {
643
+ inputs: [
644
+ ],
645
+ name: "IP_ORG_CONTROLLER",
646
+ outputs: [
647
+ {
648
+ internalType: "contract IIPOrgController",
649
+ name: "",
650
+ type: "address"
651
+ }
652
+ ],
653
+ stateMutability: "view",
654
+ type: "function"
655
+ },
656
+ {
657
+ inputs: [
658
+ ],
659
+ name: "MODULE_REGISTRY",
660
+ outputs: [
661
+ {
662
+ internalType: "contract ModuleRegistry",
663
+ name: "",
664
+ type: "address"
665
+ }
666
+ ],
667
+ stateMutability: "view",
668
+ type: "function"
669
+ },
670
+ {
671
+ inputs: [
672
+ {
673
+ internalType: "address",
674
+ name: "ipOrg_",
675
+ type: "address"
676
+ },
677
+ {
678
+ internalType: "uint256",
679
+ name: "licenseId_",
680
+ type: "uint256"
681
+ }
682
+ ],
683
+ name: "activateLicense",
684
+ outputs: [
685
+ ],
686
+ stateMutability: "nonpayable",
687
+ type: "function"
688
+ },
689
+ {
690
+ inputs: [
691
+ {
692
+ internalType: "address",
693
+ name: "ipOrg_",
694
+ type: "address"
695
+ },
696
+ {
697
+ internalType: "string[]",
698
+ name: "ipAssetTypes_",
699
+ type: "string[]"
700
+ }
701
+ ],
702
+ name: "addIPAssetTypes",
703
+ outputs: [
704
+ ],
705
+ stateMutability: "nonpayable",
706
+ type: "function"
707
+ },
708
+ {
709
+ inputs: [
710
+ {
711
+ components: [
712
+ {
713
+ internalType: "string",
714
+ name: "relType",
715
+ type: "string"
716
+ },
717
+ {
718
+ internalType: "address",
719
+ name: "ipOrg",
720
+ type: "address"
721
+ },
722
+ {
723
+ components: [
724
+ {
725
+ internalType: "enum LibRelationship.Relatables",
726
+ name: "src",
727
+ type: "uint8"
728
+ },
729
+ {
730
+ internalType: "enum LibRelationship.Relatables",
731
+ name: "dst",
732
+ type: "uint8"
733
+ }
734
+ ],
735
+ internalType: "struct LibRelationship.RelatedElements",
736
+ name: "allowedElements",
737
+ type: "tuple"
738
+ },
739
+ {
740
+ internalType: "uint8[]",
741
+ name: "allowedSrcs",
742
+ type: "uint8[]"
743
+ },
744
+ {
745
+ internalType: "uint8[]",
746
+ name: "allowedDsts",
747
+ type: "uint8[]"
748
+ }
749
+ ],
750
+ internalType: "struct LibRelationship.AddRelationshipTypeParams",
751
+ name: "params_",
752
+ type: "tuple"
753
+ }
754
+ ],
755
+ name: "addRelationshipType",
756
+ outputs: [
757
+ ],
758
+ stateMutability: "nonpayable",
759
+ type: "function"
760
+ },
761
+ {
762
+ inputs: [
763
+ {
764
+ internalType: "address",
765
+ name: "ipOrg_",
766
+ type: "address"
767
+ },
768
+ {
769
+ internalType: "uint256",
770
+ name: "licenseId_",
771
+ type: "uint256"
772
+ },
773
+ {
774
+ internalType: "uint256",
775
+ name: "ipaId_",
776
+ type: "uint256"
777
+ }
778
+ ],
779
+ name: "bindLnftToIpa",
780
+ outputs: [
781
+ ],
782
+ stateMutability: "nonpayable",
783
+ type: "function"
784
+ },
785
+ {
786
+ inputs: [
787
+ {
788
+ internalType: "address",
789
+ name: "ipOrg_",
790
+ type: "address"
791
+ },
792
+ {
793
+ components: [
794
+ {
795
+ components: [
796
+ {
797
+ internalType: "ShortString[]",
798
+ name: "termIds",
799
+ type: "bytes32[]"
800
+ },
801
+ {
802
+ internalType: "bytes[]",
803
+ name: "termData",
804
+ type: "bytes[]"
805
+ }
806
+ ],
807
+ internalType: "struct Licensing.TermsConfig",
808
+ name: "comTermsConfig",
809
+ type: "tuple"
810
+ },
811
+ {
812
+ components: [
813
+ {
814
+ internalType: "ShortString[]",
815
+ name: "termIds",
816
+ type: "bytes32[]"
817
+ },
818
+ {
819
+ internalType: "bytes[]",
820
+ name: "termData",
821
+ type: "bytes[]"
822
+ }
823
+ ],
824
+ internalType: "struct Licensing.TermsConfig",
825
+ name: "nonComTermsConfig",
826
+ type: "tuple"
827
+ }
828
+ ],
829
+ internalType: "struct Licensing.FrameworkConfig",
830
+ name: "framework_",
831
+ type: "tuple"
832
+ }
833
+ ],
834
+ name: "configureIpOrgLicensing",
835
+ outputs: [
836
+ ],
837
+ stateMutability: "nonpayable",
838
+ type: "function"
839
+ },
840
+ {
841
+ inputs: [
842
+ {
843
+ internalType: "address",
844
+ name: "ipOrg_",
845
+ type: "address"
846
+ },
847
+ {
848
+ components: [
849
+ {
850
+ internalType: "bool",
851
+ name: "isCommercial",
852
+ type: "bool"
853
+ },
854
+ {
855
+ internalType: "uint256",
856
+ name: "parentLicenseId",
857
+ type: "uint256"
858
+ }
859
+ ],
860
+ internalType: "struct Licensing.LicenseCreation",
861
+ name: "params_",
862
+ type: "tuple"
863
+ },
864
+ {
865
+ internalType: "uint256",
866
+ name: "ipaId_",
867
+ type: "uint256"
868
+ },
869
+ {
870
+ internalType: "bytes[]",
871
+ name: "preHooksData_",
872
+ type: "bytes[]"
873
+ },
874
+ {
875
+ internalType: "bytes[]",
876
+ name: "postHooksData_",
877
+ type: "bytes[]"
878
+ }
879
+ ],
880
+ name: "createIpaBoundLicense",
881
+ outputs: [
882
+ {
883
+ internalType: "uint256",
884
+ name: "",
885
+ type: "uint256"
886
+ }
887
+ ],
888
+ stateMutability: "nonpayable",
889
+ type: "function"
890
+ },
891
+ {
892
+ inputs: [
893
+ {
894
+ internalType: "address",
895
+ name: "ipOrg_",
896
+ type: "address"
897
+ },
898
+ {
899
+ components: [
900
+ {
901
+ internalType: "bool",
902
+ name: "isCommercial",
903
+ type: "bool"
904
+ },
905
+ {
906
+ internalType: "uint256",
907
+ name: "parentLicenseId",
908
+ type: "uint256"
909
+ }
910
+ ],
911
+ internalType: "struct Licensing.LicenseCreation",
912
+ name: "params_",
913
+ type: "tuple"
914
+ },
915
+ {
916
+ internalType: "address",
917
+ name: "licensee_",
918
+ type: "address"
919
+ },
920
+ {
921
+ internalType: "bytes[]",
922
+ name: "preHooksData_",
923
+ type: "bytes[]"
924
+ },
925
+ {
926
+ internalType: "bytes[]",
927
+ name: "postHooksData_",
928
+ type: "bytes[]"
929
+ }
930
+ ],
931
+ name: "createLicenseNft",
932
+ outputs: [
933
+ {
934
+ internalType: "uint256",
935
+ name: "",
936
+ type: "uint256"
937
+ }
938
+ ],
939
+ stateMutability: "nonpayable",
940
+ type: "function"
941
+ },
942
+ {
943
+ inputs: [
944
+ {
945
+ internalType: "address",
946
+ name: "ipOrg_",
947
+ type: "address"
948
+ },
949
+ {
950
+ components: [
951
+ {
952
+ internalType: "string",
953
+ name: "relType",
954
+ type: "string"
955
+ },
956
+ {
957
+ internalType: "address",
958
+ name: "srcAddress",
959
+ type: "address"
960
+ },
961
+ {
962
+ internalType: "uint256",
963
+ name: "srcId",
964
+ type: "uint256"
965
+ },
966
+ {
967
+ internalType: "address",
968
+ name: "dstAddress",
969
+ type: "address"
970
+ },
971
+ {
972
+ internalType: "uint256",
973
+ name: "dstId",
974
+ type: "uint256"
975
+ }
976
+ ],
977
+ internalType: "struct LibRelationship.CreateRelationshipParams",
978
+ name: "params_",
979
+ type: "tuple"
980
+ },
981
+ {
982
+ internalType: "bytes[]",
983
+ name: "preHooksData_",
984
+ type: "bytes[]"
985
+ },
986
+ {
987
+ internalType: "bytes[]",
988
+ name: "postHooksData_",
989
+ type: "bytes[]"
990
+ }
991
+ ],
992
+ name: "createRelationship",
993
+ outputs: [
994
+ {
995
+ internalType: "uint256",
996
+ name: "relId",
997
+ type: "uint256"
998
+ }
999
+ ],
1000
+ stateMutability: "nonpayable",
1001
+ type: "function"
1002
+ },
1003
+ {
1004
+ inputs: [
1005
+ {
1006
+ internalType: "bytes[]",
1007
+ name: "data",
1008
+ type: "bytes[]"
1009
+ }
1010
+ ],
1011
+ name: "multicall",
1012
+ outputs: [
1013
+ {
1014
+ internalType: "bytes[]",
1015
+ name: "results",
1016
+ type: "bytes[]"
1017
+ }
1018
+ ],
1019
+ stateMutability: "nonpayable",
1020
+ type: "function"
1021
+ },
1022
+ {
1023
+ inputs: [
1024
+ {
1025
+ internalType: "address",
1026
+ name: "ipOrg_",
1027
+ type: "address"
1028
+ },
1029
+ {
1030
+ components: [
1031
+ {
1032
+ internalType: "address",
1033
+ name: "owner",
1034
+ type: "address"
1035
+ },
1036
+ {
1037
+ internalType: "uint8",
1038
+ name: "ipOrgAssetType",
1039
+ type: "uint8"
1040
+ },
1041
+ {
1042
+ internalType: "string",
1043
+ name: "name",
1044
+ type: "string"
1045
+ },
1046
+ {
1047
+ internalType: "bytes32",
1048
+ name: "hash",
1049
+ type: "bytes32"
1050
+ },
1051
+ {
1052
+ internalType: "string",
1053
+ name: "mediaUrl",
1054
+ type: "string"
1055
+ }
1056
+ ],
1057
+ internalType: "struct Registration.RegisterIPAssetParams",
1058
+ name: "params_",
1059
+ type: "tuple"
1060
+ },
1061
+ {
1062
+ internalType: "bytes[]",
1063
+ name: "preHooksData_",
1064
+ type: "bytes[]"
1065
+ },
1066
+ {
1067
+ internalType: "bytes[]",
1068
+ name: "postHooksData_",
1069
+ type: "bytes[]"
1070
+ }
1071
+ ],
1072
+ name: "registerIPAsset",
1073
+ outputs: [
1074
+ {
1075
+ internalType: "uint256",
1076
+ name: "",
1077
+ type: "uint256"
1078
+ },
1079
+ {
1080
+ internalType: "uint256",
1081
+ name: "",
1082
+ type: "uint256"
1083
+ }
1084
+ ],
1085
+ stateMutability: "nonpayable",
1086
+ type: "function"
1087
+ },
1088
+ {
1089
+ inputs: [
1090
+ {
1091
+ internalType: "address",
1092
+ name: "owner_",
1093
+ type: "address"
1094
+ },
1095
+ {
1096
+ internalType: "string",
1097
+ name: "name_",
1098
+ type: "string"
1099
+ },
1100
+ {
1101
+ internalType: "string",
1102
+ name: "symbol_",
1103
+ type: "string"
1104
+ },
1105
+ {
1106
+ internalType: "string[]",
1107
+ name: "ipAssetTypes_",
1108
+ type: "string[]"
1109
+ }
1110
+ ],
1111
+ name: "registerIpOrg",
1112
+ outputs: [
1113
+ {
1114
+ internalType: "address",
1115
+ name: "ipOrg_",
1116
+ type: "address"
1117
+ }
1118
+ ],
1119
+ stateMutability: "nonpayable",
1120
+ type: "function"
1121
+ },
1122
+ {
1123
+ inputs: [
1124
+ {
1125
+ internalType: "address",
1126
+ name: "ipOrg_",
1127
+ type: "address"
1128
+ },
1129
+ {
1130
+ internalType: "string",
1131
+ name: "relType",
1132
+ type: "string"
1133
+ }
1134
+ ],
1135
+ name: "removeRelationshipType",
1136
+ outputs: [
1137
+ ],
1138
+ stateMutability: "nonpayable",
1139
+ type: "function"
1140
+ },
1141
+ {
1142
+ inputs: [
1143
+ {
1144
+ internalType: "address",
1145
+ name: "ipOrg_",
1146
+ type: "address"
1147
+ },
1148
+ {
1149
+ internalType: "string",
1150
+ name: "baseURI_",
1151
+ type: "string"
1152
+ },
1153
+ {
1154
+ internalType: "string",
1155
+ name: "contractURI_",
1156
+ type: "string"
1157
+ }
1158
+ ],
1159
+ name: "setMetadata",
1160
+ outputs: [
1161
+ ],
1162
+ stateMutability: "nonpayable",
1163
+ type: "function"
1164
+ },
1165
+ {
1166
+ inputs: [
1167
+ {
1168
+ internalType: "address",
1169
+ name: "ipOrg_",
1170
+ type: "address"
1171
+ },
1172
+ {
1173
+ internalType: "address",
1174
+ name: "from_",
1175
+ type: "address"
1176
+ },
1177
+ {
1178
+ internalType: "address",
1179
+ name: "to_",
1180
+ type: "address"
1181
+ },
1182
+ {
1183
+ internalType: "uint256",
1184
+ name: "ipAssetId_",
1185
+ type: "uint256"
1186
+ },
1187
+ {
1188
+ internalType: "bytes[]",
1189
+ name: "preHooksData_",
1190
+ type: "bytes[]"
1191
+ },
1192
+ {
1193
+ internalType: "bytes[]",
1194
+ name: "postHooksData_",
1195
+ type: "bytes[]"
1196
+ }
1197
+ ],
1198
+ name: "transferIPAsset",
1199
+ outputs: [
1200
+ ],
1201
+ stateMutability: "nonpayable",
1202
+ type: "function"
1203
+ }
1204
+ ];
1205
+
619
1206
  if (typeof process !== "undefined") {
620
1207
  dotenv__namespace.config();
621
1208
  }
622
- var storyProtocolAbi = [{
623
- inputs: [{
624
- internalType: "address",
625
- name: "owner_",
626
- type: "address"
627
- }, {
628
- internalType: "string",
629
- name: "name_",
630
- type: "string"
631
- }, {
632
- internalType: "string",
633
- name: "symbol_",
634
- type: "string"
635
- }, {
636
- internalType: "string[]",
637
- name: "ipAssetTypes_",
638
- type: "string[]"
639
- }],
640
- name: "registerIpOrg",
641
- outputs: [{
642
- internalType: "address",
643
- name: "ipOrg_",
644
- type: "address"
645
- }],
646
- stateMutability: "nonpayable",
647
- type: "function"
648
- }, {
649
- inputs: [{
650
- internalType: "address",
651
- name: "ipOrg_",
652
- type: "address"
653
- }, {
654
- components: [{
655
- internalType: "bool",
656
- name: "isCommercial",
657
- type: "bool"
658
- }, {
659
- internalType: "uint256",
660
- name: "parentLicenseId",
661
- type: "uint256"
662
- }],
663
- internalType: "struct Licensing.LicenseCreation",
664
- name: "params_",
665
- type: "tuple"
666
- }, {
667
- internalType: "address",
668
- name: "licensee_",
669
- type: "address"
670
- }, {
671
- internalType: "bytes[]",
672
- name: "preHooksData_",
673
- type: "bytes[]"
674
- }, {
675
- internalType: "bytes[]",
676
- name: "postHooksData_",
677
- type: "bytes[]"
678
- }],
679
- name: "createLicenseNft",
680
- outputs: [{
681
- internalType: "uint256",
682
- name: "",
683
- type: "uint256"
684
- }],
685
- stateMutability: "nonpayable",
686
- type: "function"
687
- }, {
688
- inputs: [{
689
- internalType: "address",
690
- name: "ipOrg_",
691
- type: "address"
692
- }, {
693
- components: [{
694
- internalType: "bool",
695
- name: "isCommercial",
696
- type: "bool"
697
- }, {
698
- internalType: "uint256",
699
- name: "parentLicenseId",
700
- type: "uint256"
701
- }],
702
- internalType: "struct Licensing.LicenseCreation",
703
- name: "params_",
704
- type: "tuple"
705
- }, {
706
- internalType: "uint256",
707
- name: "ipaId_",
708
- type: "uint256"
709
- }, {
710
- internalType: "bytes[]",
711
- name: "preHooksData_",
712
- type: "bytes[]"
713
- }, {
714
- internalType: "bytes[]",
715
- name: "postHooksData_",
716
- type: "bytes[]"
717
- }],
718
- name: "createIpaBoundLicense",
719
- outputs: [{
720
- internalType: "uint256",
721
- name: "",
722
- type: "uint256"
723
- }],
724
- stateMutability: "nonpayable",
725
- type: "function"
726
- }, {
727
- inputs: [{
728
- internalType: "address",
729
- name: "ipOrg_",
730
- type: "address"
731
- }, {
732
- components: [{
733
- internalType: "address",
734
- name: "owner",
735
- type: "address"
736
- }, {
737
- internalType: "uint8",
738
- name: "ipOrgAssetType",
739
- type: "uint8"
740
- }, {
741
- internalType: "string",
742
- name: "name",
743
- type: "string"
744
- }, {
745
- internalType: "bytes32",
746
- name: "hash",
747
- type: "bytes32"
748
- }, {
749
- internalType: "string",
750
- name: "mediaUrl",
751
- type: "string"
752
- }],
753
- internalType: "struct Registration.RegisterIPAssetParams",
754
- name: "params_",
755
- type: "tuple"
756
- }, {
757
- internalType: "bytes[]",
758
- name: "preHooksData_",
759
- type: "bytes[]"
760
- }, {
761
- internalType: "bytes[]",
762
- name: "postHooksData_",
763
- type: "bytes[]"
764
- }],
765
- name: "registerIPAsset",
766
- outputs: [{
767
- internalType: "uint256",
768
- name: "",
769
- type: "uint256"
770
- }, {
771
- internalType: "uint256",
772
- name: "",
773
- type: "uint256"
774
- }],
775
- stateMutability: "nonpayable",
776
- type: "function"
777
- }, {
778
- inputs: [{
779
- components: [{
780
- internalType: "string",
781
- name: "relType",
782
- type: "string"
783
- }, {
784
- internalType: "address",
785
- name: "ipOrg",
786
- type: "address"
787
- }, {
788
- components: [{
789
- internalType: "enum LibRelationship.Relatables",
790
- name: "src",
791
- type: "uint8"
792
- }, {
793
- internalType: "enum LibRelationship.Relatables",
794
- name: "dst",
795
- type: "uint8"
796
- }],
797
- internalType: "struct LibRelationship.RelatedElements",
798
- name: "allowedElements",
799
- type: "tuple"
800
- }, {
801
- internalType: "uint8[]",
802
- name: "allowedSrcs",
803
- type: "uint8[]"
804
- }, {
805
- internalType: "uint8[]",
806
- name: "allowedDsts",
807
- type: "uint8[]"
808
- }],
809
- internalType: "struct LibRelationship.AddRelationshipTypeParams",
810
- name: "params_",
811
- type: "tuple"
812
- }],
813
- name: "addRelationshipType",
814
- outputs: [],
815
- stateMutability: "nonpayable",
816
- type: "function"
817
- }, {
818
- inputs: [{
819
- internalType: "address",
820
- name: "ipOrg_",
821
- type: "address"
822
- }, {
823
- components: [{
824
- internalType: "string",
825
- name: "relType",
826
- type: "string"
827
- }, {
828
- internalType: "address",
829
- name: "srcAddress",
830
- type: "address"
831
- }, {
832
- internalType: "uint256",
833
- name: "srcId",
834
- type: "uint256"
835
- }, {
836
- internalType: "address",
837
- name: "dstAddress",
838
- type: "address"
839
- }, {
840
- internalType: "uint256",
841
- name: "dstId",
842
- type: "uint256"
843
- }],
844
- internalType: "struct LibRelationship.CreateRelationshipParams",
845
- name: "params_",
846
- type: "tuple"
847
- }, {
848
- internalType: "bytes[]",
849
- name: "preHooksData_",
850
- type: "bytes[]"
851
- }, {
852
- internalType: "bytes[]",
853
- name: "postHooksData_",
854
- type: "bytes[]"
855
- }],
856
- name: "createRelationship",
857
- outputs: [{
858
- internalType: "uint256",
859
- name: "relId",
860
- type: "uint256"
861
- }],
862
- stateMutability: "nonpayable",
863
- type: "function"
864
- }, {
865
- inputs: [{
866
- internalType: "address",
867
- name: "ipOrg_",
868
- type: "address"
869
- }, {
870
- internalType: "string",
871
- name: "relType",
872
- type: "string"
873
- }],
874
- name: "removeRelationshipType",
875
- outputs: [],
876
- stateMutability: "nonpayable",
877
- type: "function"
878
- }];
1209
+ var storyProtocolAbi = storyProtocolJson;
879
1210
  var storyProtocolReadable = abitype.formatAbi(storyProtocolAbi);
880
1211
  var storyProtocolConfig = {
881
1212
  abi: viem.parseAbi(storyProtocolReadable),
882
1213
  address: viem.getAddress(process.env.STORY_PROTOCOL_CONTRACT || process.env.NEXT_PUBLIC_STORY_PROTOCOL_CONTRACT || "")
883
1214
  };
884
1215
 
1216
+ var ipOrgControllerRawAbi = [
1217
+ {
1218
+ inputs: [
1219
+ {
1220
+ internalType: "address",
1221
+ name: "moduleRegistry_",
1222
+ type: "address"
1223
+ }
1224
+ ],
1225
+ stateMutability: "nonpayable",
1226
+ type: "constructor"
1227
+ },
1228
+ {
1229
+ inputs: [
1230
+ ],
1231
+ name: "IPOrgController_IPOrgNonExistent",
1232
+ type: "error"
1233
+ },
1234
+ {
1235
+ inputs: [
1236
+ ],
1237
+ name: "IPOrgController_InvalidIPOrgOwner",
1238
+ type: "error"
1239
+ },
1240
+ {
1241
+ inputs: [
1242
+ ],
1243
+ name: "IPOrgController_InvalidNewIPOrgOwner",
1244
+ type: "error"
1245
+ },
1246
+ {
1247
+ inputs: [
1248
+ ],
1249
+ name: "IPOrgController_OwnerTransferUninitialized",
1250
+ type: "error"
1251
+ },
1252
+ {
1253
+ inputs: [
1254
+ {
1255
+ internalType: "bytes32",
1256
+ name: "role",
1257
+ type: "bytes32"
1258
+ },
1259
+ {
1260
+ internalType: "address",
1261
+ name: "account",
1262
+ type: "address"
1263
+ }
1264
+ ],
1265
+ name: "MissingRole",
1266
+ type: "error"
1267
+ },
1268
+ {
1269
+ inputs: [
1270
+ {
1271
+ internalType: "string",
1272
+ name: "name",
1273
+ type: "string"
1274
+ }
1275
+ ],
1276
+ name: "UnsupportedInterface",
1277
+ type: "error"
1278
+ },
1279
+ {
1280
+ inputs: [
1281
+ ],
1282
+ name: "ZeroAddress",
1283
+ type: "error"
1284
+ },
1285
+ {
1286
+ anonymous: false,
1287
+ inputs: [
1288
+ {
1289
+ indexed: true,
1290
+ internalType: "address",
1291
+ name: "accessControl",
1292
+ type: "address"
1293
+ }
1294
+ ],
1295
+ name: "AccessControlUpdated",
1296
+ type: "event"
1297
+ },
1298
+ {
1299
+ anonymous: false,
1300
+ inputs: [
1301
+ {
1302
+ indexed: false,
1303
+ internalType: "address",
1304
+ name: "previousAdmin",
1305
+ type: "address"
1306
+ },
1307
+ {
1308
+ indexed: false,
1309
+ internalType: "address",
1310
+ name: "newAdmin",
1311
+ type: "address"
1312
+ }
1313
+ ],
1314
+ name: "AdminChanged",
1315
+ type: "event"
1316
+ },
1317
+ {
1318
+ anonymous: false,
1319
+ inputs: [
1320
+ {
1321
+ indexed: true,
1322
+ internalType: "address",
1323
+ name: "beacon",
1324
+ type: "address"
1325
+ }
1326
+ ],
1327
+ name: "BeaconUpgraded",
1328
+ type: "event"
1329
+ },
1330
+ {
1331
+ anonymous: false,
1332
+ inputs: [
1333
+ {
1334
+ indexed: false,
1335
+ internalType: "address",
1336
+ name: "ipOrg",
1337
+ type: "address"
1338
+ },
1339
+ {
1340
+ indexed: false,
1341
+ internalType: "address",
1342
+ name: "pendingOwner",
1343
+ type: "address"
1344
+ }
1345
+ ],
1346
+ name: "IPOrgPendingOwnerSet",
1347
+ type: "event"
1348
+ },
1349
+ {
1350
+ anonymous: false,
1351
+ inputs: [
1352
+ {
1353
+ indexed: false,
1354
+ internalType: "address",
1355
+ name: "owner",
1356
+ type: "address"
1357
+ },
1358
+ {
1359
+ indexed: false,
1360
+ internalType: "address",
1361
+ name: "ipAssetOrg",
1362
+ type: "address"
1363
+ },
1364
+ {
1365
+ indexed: false,
1366
+ internalType: "string",
1367
+ name: "name",
1368
+ type: "string"
1369
+ },
1370
+ {
1371
+ indexed: false,
1372
+ internalType: "string",
1373
+ name: "symbol",
1374
+ type: "string"
1375
+ },
1376
+ {
1377
+ indexed: false,
1378
+ internalType: "string[]",
1379
+ name: "ipAssetTypes",
1380
+ type: "string[]"
1381
+ }
1382
+ ],
1383
+ name: "IPOrgRegistered",
1384
+ type: "event"
1385
+ },
1386
+ {
1387
+ anonymous: false,
1388
+ inputs: [
1389
+ {
1390
+ indexed: false,
1391
+ internalType: "address",
1392
+ name: "ipOrg",
1393
+ type: "address"
1394
+ },
1395
+ {
1396
+ indexed: false,
1397
+ internalType: "address",
1398
+ name: "prevOwner",
1399
+ type: "address"
1400
+ },
1401
+ {
1402
+ indexed: false,
1403
+ internalType: "address",
1404
+ name: "newOwner",
1405
+ type: "address"
1406
+ }
1407
+ ],
1408
+ name: "IPOrgTransferred",
1409
+ type: "event"
1410
+ },
1411
+ {
1412
+ anonymous: false,
1413
+ inputs: [
1414
+ {
1415
+ indexed: false,
1416
+ internalType: "uint8",
1417
+ name: "version",
1418
+ type: "uint8"
1419
+ }
1420
+ ],
1421
+ name: "Initialized",
1422
+ type: "event"
1423
+ },
1424
+ {
1425
+ anonymous: false,
1426
+ inputs: [
1427
+ {
1428
+ indexed: true,
1429
+ internalType: "address",
1430
+ name: "implementation",
1431
+ type: "address"
1432
+ }
1433
+ ],
1434
+ name: "Upgraded",
1435
+ type: "event"
1436
+ },
1437
+ {
1438
+ inputs: [
1439
+ ],
1440
+ name: "IP_ORG_IMPL",
1441
+ outputs: [
1442
+ {
1443
+ internalType: "address",
1444
+ name: "",
1445
+ type: "address"
1446
+ }
1447
+ ],
1448
+ stateMutability: "view",
1449
+ type: "function"
1450
+ },
1451
+ {
1452
+ inputs: [
1453
+ ],
1454
+ name: "MODULE_REGISTRY",
1455
+ outputs: [
1456
+ {
1457
+ internalType: "address",
1458
+ name: "",
1459
+ type: "address"
1460
+ }
1461
+ ],
1462
+ stateMutability: "view",
1463
+ type: "function"
1464
+ },
1465
+ {
1466
+ inputs: [
1467
+ {
1468
+ internalType: "address",
1469
+ name: "ipOrg_",
1470
+ type: "address"
1471
+ }
1472
+ ],
1473
+ name: "acceptOwnerTransfer",
1474
+ outputs: [
1475
+ ],
1476
+ stateMutability: "nonpayable",
1477
+ type: "function"
1478
+ },
1479
+ {
1480
+ inputs: [
1481
+ {
1482
+ internalType: "address",
1483
+ name: "ipOrg_",
1484
+ type: "address"
1485
+ }
1486
+ ],
1487
+ name: "cancelOwnerTransfer",
1488
+ outputs: [
1489
+ ],
1490
+ stateMutability: "nonpayable",
1491
+ type: "function"
1492
+ },
1493
+ {
1494
+ inputs: [
1495
+ ],
1496
+ name: "getAccessControl",
1497
+ outputs: [
1498
+ {
1499
+ internalType: "address",
1500
+ name: "",
1501
+ type: "address"
1502
+ }
1503
+ ],
1504
+ stateMutability: "view",
1505
+ type: "function"
1506
+ },
1507
+ {
1508
+ inputs: [
1509
+ {
1510
+ internalType: "address",
1511
+ name: "accessControl_",
1512
+ type: "address"
1513
+ }
1514
+ ],
1515
+ name: "initialize",
1516
+ outputs: [
1517
+ ],
1518
+ stateMutability: "nonpayable",
1519
+ type: "function"
1520
+ },
1521
+ {
1522
+ inputs: [
1523
+ {
1524
+ internalType: "address",
1525
+ name: "ipOrg_",
1526
+ type: "address"
1527
+ }
1528
+ ],
1529
+ name: "isIpOrg",
1530
+ outputs: [
1531
+ {
1532
+ internalType: "bool",
1533
+ name: "",
1534
+ type: "bool"
1535
+ }
1536
+ ],
1537
+ stateMutability: "view",
1538
+ type: "function"
1539
+ },
1540
+ {
1541
+ inputs: [
1542
+ {
1543
+ internalType: "address",
1544
+ name: "ipOrg_",
1545
+ type: "address"
1546
+ }
1547
+ ],
1548
+ name: "ownerOf",
1549
+ outputs: [
1550
+ {
1551
+ internalType: "address",
1552
+ name: "",
1553
+ type: "address"
1554
+ }
1555
+ ],
1556
+ stateMutability: "view",
1557
+ type: "function"
1558
+ },
1559
+ {
1560
+ inputs: [
1561
+ {
1562
+ internalType: "address",
1563
+ name: "ipOrg_",
1564
+ type: "address"
1565
+ }
1566
+ ],
1567
+ name: "pendingOwnerOf",
1568
+ outputs: [
1569
+ {
1570
+ internalType: "address",
1571
+ name: "pendingOwner",
1572
+ type: "address"
1573
+ }
1574
+ ],
1575
+ stateMutability: "view",
1576
+ type: "function"
1577
+ },
1578
+ {
1579
+ inputs: [
1580
+ ],
1581
+ name: "proxiableUUID",
1582
+ outputs: [
1583
+ {
1584
+ internalType: "bytes32",
1585
+ name: "",
1586
+ type: "bytes32"
1587
+ }
1588
+ ],
1589
+ stateMutability: "view",
1590
+ type: "function"
1591
+ },
1592
+ {
1593
+ inputs: [
1594
+ {
1595
+ internalType: "address",
1596
+ name: "owner_",
1597
+ type: "address"
1598
+ },
1599
+ {
1600
+ internalType: "string",
1601
+ name: "name_",
1602
+ type: "string"
1603
+ },
1604
+ {
1605
+ internalType: "string",
1606
+ name: "symbol_",
1607
+ type: "string"
1608
+ },
1609
+ {
1610
+ internalType: "string[]",
1611
+ name: "ipAssetTypes_",
1612
+ type: "string[]"
1613
+ }
1614
+ ],
1615
+ name: "registerIpOrg",
1616
+ outputs: [
1617
+ {
1618
+ internalType: "address",
1619
+ name: "ipOrg_",
1620
+ type: "address"
1621
+ }
1622
+ ],
1623
+ stateMutability: "nonpayable",
1624
+ type: "function"
1625
+ },
1626
+ {
1627
+ inputs: [
1628
+ {
1629
+ internalType: "address",
1630
+ name: "accessControl_",
1631
+ type: "address"
1632
+ }
1633
+ ],
1634
+ name: "setAccessControl",
1635
+ outputs: [
1636
+ ],
1637
+ stateMutability: "nonpayable",
1638
+ type: "function"
1639
+ },
1640
+ {
1641
+ inputs: [
1642
+ {
1643
+ internalType: "address",
1644
+ name: "ipOrg_",
1645
+ type: "address"
1646
+ },
1647
+ {
1648
+ internalType: "address",
1649
+ name: "newOwner_",
1650
+ type: "address"
1651
+ }
1652
+ ],
1653
+ name: "transferOwner",
1654
+ outputs: [
1655
+ ],
1656
+ stateMutability: "nonpayable",
1657
+ type: "function"
1658
+ },
1659
+ {
1660
+ inputs: [
1661
+ {
1662
+ internalType: "address",
1663
+ name: "newImplementation",
1664
+ type: "address"
1665
+ }
1666
+ ],
1667
+ name: "upgradeTo",
1668
+ outputs: [
1669
+ ],
1670
+ stateMutability: "nonpayable",
1671
+ type: "function"
1672
+ },
1673
+ {
1674
+ inputs: [
1675
+ {
1676
+ internalType: "address",
1677
+ name: "newImplementation",
1678
+ type: "address"
1679
+ },
1680
+ {
1681
+ internalType: "bytes",
1682
+ name: "data",
1683
+ type: "bytes"
1684
+ }
1685
+ ],
1686
+ name: "upgradeToAndCall",
1687
+ outputs: [
1688
+ ],
1689
+ stateMutability: "payable",
1690
+ type: "function"
1691
+ }
1692
+ ];
1693
+
885
1694
  if (typeof process !== "undefined") {
886
1695
  dotenv__namespace.config();
887
1696
  }
888
- var ipOrgControllerAbi = [{
889
- anonymous: false,
890
- inputs: [{
891
- indexed: false,
892
- internalType: "address",
893
- name: "owner",
894
- type: "address"
895
- }, {
896
- indexed: false,
897
- internalType: "address",
898
- name: "ipAssetOrg",
899
- type: "address"
900
- }, {
901
- indexed: false,
902
- internalType: "string",
903
- name: "name",
904
- type: "string"
905
- }, {
906
- indexed: false,
907
- internalType: "string",
908
- name: "symbol",
909
- type: "string"
910
- }, {
911
- indexed: false,
912
- internalType: "string[]",
913
- name: "ipAssetTypes",
914
- type: "string[]"
915
- }],
916
- name: "IPOrgRegistered",
917
- type: "event"
918
- }];
1697
+ var ipOrgControllerAbi = ipOrgControllerRawAbi;
919
1698
  var ipOrgControllerReadable = abitype.formatAbi(ipOrgControllerAbi);
920
1699
  var ipOrgControllerConfig = {
921
1700
  abi: viem.parseAbi(ipOrgControllerReadable),
@@ -1085,6 +1864,14 @@ function _waitTxAndFilterLog() {
1085
1864
  }));
1086
1865
  return _waitTxAndFilterLog.apply(this, arguments);
1087
1866
  }
1867
+ var dictToQueryParams = function dictToQueryParams(params) {
1868
+ var queryParamList = [];
1869
+ for (var key in params) {
1870
+ var value = params[key];
1871
+ queryParamList.push("".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value)));
1872
+ }
1873
+ return queryParamList.join("&");
1874
+ };
1088
1875
 
1089
1876
  /**
1090
1877
  * IPOrgClient allows you to create, update, view, search IPOrgs on
@@ -1141,7 +1928,7 @@ var IPOrgClient = /*#__PURE__*/function (_IPOrgReadOnlyClient) {
1141
1928
  targetLog = _context.sent;
1142
1929
  return _context.abrupt("return", {
1143
1930
  txHash: txHash,
1144
- ipOrgId: targetLog.args.ipAssetOrg
1931
+ ipOrgId: String(targetLog === null || targetLog === void 0 ? void 0 : targetLog.args["ipAssetOrg"])
1145
1932
  });
1146
1933
  case 15:
1147
1934
  return _context.abrupt("return", {
@@ -1355,55 +2142,997 @@ var IPAssetReadOnlyClient = /*#__PURE__*/function () {
1355
2142
  return IPAssetReadOnlyClient;
1356
2143
  }();
1357
2144
 
2145
+ var registrationModuleJson = [
2146
+ {
2147
+ inputs: [
2148
+ {
2149
+ components: [
2150
+ {
2151
+ internalType: "contract IPAssetRegistry",
2152
+ name: "ipaRegistry",
2153
+ type: "address"
2154
+ },
2155
+ {
2156
+ internalType: "contract ModuleRegistry",
2157
+ name: "moduleRegistry",
2158
+ type: "address"
2159
+ },
2160
+ {
2161
+ internalType: "contract LicenseRegistry",
2162
+ name: "licenseRegistry",
2163
+ type: "address"
2164
+ },
2165
+ {
2166
+ internalType: "contract IPOrgController",
2167
+ name: "ipOrgController",
2168
+ type: "address"
2169
+ }
2170
+ ],
2171
+ internalType: "struct BaseModule.ModuleConstruction",
2172
+ name: "params_",
2173
+ type: "tuple"
2174
+ },
2175
+ {
2176
+ internalType: "address",
2177
+ name: "accessControl_",
2178
+ type: "address"
2179
+ }
2180
+ ],
2181
+ stateMutability: "nonpayable",
2182
+ type: "constructor"
2183
+ },
2184
+ {
2185
+ inputs: [
2186
+ {
2187
+ internalType: "uint8",
2188
+ name: "hookType",
2189
+ type: "uint8"
2190
+ }
2191
+ ],
2192
+ name: "BaseModule_HooksParamsLengthMismatch",
2193
+ type: "error"
2194
+ },
2195
+ {
2196
+ inputs: [
2197
+ ],
2198
+ name: "BaseModule_OnlyModuleRegistry",
2199
+ type: "error"
2200
+ },
2201
+ {
2202
+ inputs: [
2203
+ ],
2204
+ name: "BaseModule_ZeroIpaRegistry",
2205
+ type: "error"
2206
+ },
2207
+ {
2208
+ inputs: [
2209
+ ],
2210
+ name: "BaseModule_ZeroLicenseRegistry",
2211
+ type: "error"
2212
+ },
2213
+ {
2214
+ inputs: [
2215
+ ],
2216
+ name: "BaseModule_ZeroModuleRegistry",
2217
+ type: "error"
2218
+ },
2219
+ {
2220
+ inputs: [
2221
+ ],
2222
+ name: "HookRegistry_CallerNotIPOrgOwner",
2223
+ type: "error"
2224
+ },
2225
+ {
2226
+ inputs: [
2227
+ ],
2228
+ name: "HookRegistry_HooksConfigLengthMismatch",
2229
+ type: "error"
2230
+ },
2231
+ {
2232
+ inputs: [
2233
+ {
2234
+ internalType: "uint256",
2235
+ name: "hooksIndex",
2236
+ type: "uint256"
2237
+ }
2238
+ ],
2239
+ name: "HookRegistry_IndexOutOfBounds",
2240
+ type: "error"
2241
+ },
2242
+ {
2243
+ inputs: [
2244
+ ],
2245
+ name: "HookRegistry_MaxHooksExceeded",
2246
+ type: "error"
2247
+ },
2248
+ {
2249
+ inputs: [
2250
+ ],
2251
+ name: "HookRegistry_RegisteringDuplicatedHook",
2252
+ type: "error"
2253
+ },
2254
+ {
2255
+ inputs: [
2256
+ ],
2257
+ name: "HookRegistry_RegisteringZeroAddressHook",
2258
+ type: "error"
2259
+ },
2260
+ {
2261
+ inputs: [
2262
+ {
2263
+ internalType: "bytes32",
2264
+ name: "role",
2265
+ type: "bytes32"
2266
+ },
2267
+ {
2268
+ internalType: "address",
2269
+ name: "account",
2270
+ type: "address"
2271
+ }
2272
+ ],
2273
+ name: "MissingRole",
2274
+ type: "error"
2275
+ },
2276
+ {
2277
+ inputs: [
2278
+ ],
2279
+ name: "RegistrationModule_IPAssetNonExistent",
2280
+ type: "error"
2281
+ },
2282
+ {
2283
+ inputs: [
2284
+ ],
2285
+ name: "RegistrationModule_IPOrgNotConfigured",
2286
+ type: "error"
2287
+ },
2288
+ {
2289
+ inputs: [
2290
+ ],
2291
+ name: "RegistrationModule_InvalidCaller",
2292
+ type: "error"
2293
+ },
2294
+ {
2295
+ inputs: [
2296
+ ],
2297
+ name: "RegistrationModule_InvalidConfigOperation",
2298
+ type: "error"
2299
+ },
2300
+ {
2301
+ inputs: [
2302
+ ],
2303
+ name: "RegistrationModule_InvalidExecutionOperation",
2304
+ type: "error"
2305
+ },
2306
+ {
2307
+ inputs: [
2308
+ ],
2309
+ name: "RegistrationModule_InvalidIPAssetType",
2310
+ type: "error"
2311
+ },
2312
+ {
2313
+ inputs: [
2314
+ ],
2315
+ name: "RegistrationModule_TooManyAssetTypes",
2316
+ type: "error"
2317
+ },
2318
+ {
2319
+ inputs: [
2320
+ ],
2321
+ name: "Unauthorized",
2322
+ type: "error"
2323
+ },
2324
+ {
2325
+ inputs: [
2326
+ {
2327
+ internalType: "string",
2328
+ name: "name",
2329
+ type: "string"
2330
+ }
2331
+ ],
2332
+ name: "UnsupportedInterface",
2333
+ type: "error"
2334
+ },
2335
+ {
2336
+ inputs: [
2337
+ ],
2338
+ name: "ZeroAddress",
2339
+ type: "error"
2340
+ },
2341
+ {
2342
+ anonymous: false,
2343
+ inputs: [
2344
+ {
2345
+ indexed: true,
2346
+ internalType: "address",
2347
+ name: "accessControl",
2348
+ type: "address"
2349
+ }
2350
+ ],
2351
+ name: "AccessControlUpdated",
2352
+ type: "event"
2353
+ },
2354
+ {
2355
+ anonymous: false,
2356
+ inputs: [
2357
+ {
2358
+ indexed: true,
2359
+ internalType: "enum HookRegistry.HookType",
2360
+ name: "hType",
2361
+ type: "uint8"
2362
+ },
2363
+ {
2364
+ indexed: true,
2365
+ internalType: "bytes32",
2366
+ name: "registryKey",
2367
+ type: "bytes32"
2368
+ }
2369
+ ],
2370
+ name: "HooksCleared",
2371
+ type: "event"
2372
+ },
2373
+ {
2374
+ anonymous: false,
2375
+ inputs: [
2376
+ {
2377
+ indexed: true,
2378
+ internalType: "enum HookRegistry.HookType",
2379
+ name: "hType",
2380
+ type: "uint8"
2381
+ },
2382
+ {
2383
+ indexed: true,
2384
+ internalType: "bytes32",
2385
+ name: "registryKey",
2386
+ type: "bytes32"
2387
+ },
2388
+ {
2389
+ indexed: false,
2390
+ internalType: "address[]",
2391
+ name: "hooks",
2392
+ type: "address[]"
2393
+ }
2394
+ ],
2395
+ name: "HooksRegistered",
2396
+ type: "event"
2397
+ },
2398
+ {
2399
+ anonymous: false,
2400
+ inputs: [
2401
+ {
2402
+ indexed: false,
2403
+ internalType: "uint256",
2404
+ name: "ipAssetId_",
2405
+ type: "uint256"
2406
+ },
2407
+ {
2408
+ indexed: true,
2409
+ internalType: "address",
2410
+ name: "ipOrg_",
2411
+ type: "address"
2412
+ },
2413
+ {
2414
+ indexed: false,
2415
+ internalType: "uint256",
2416
+ name: "ipOrgAssetId_",
2417
+ type: "uint256"
2418
+ },
2419
+ {
2420
+ indexed: true,
2421
+ internalType: "address",
2422
+ name: "owner_",
2423
+ type: "address"
2424
+ },
2425
+ {
2426
+ indexed: false,
2427
+ internalType: "string",
2428
+ name: "name_",
2429
+ type: "string"
2430
+ },
2431
+ {
2432
+ indexed: true,
2433
+ internalType: "uint8",
2434
+ name: "ipOrgAssetType_",
2435
+ type: "uint8"
2436
+ },
2437
+ {
2438
+ indexed: false,
2439
+ internalType: "bytes32",
2440
+ name: "hash_",
2441
+ type: "bytes32"
2442
+ },
2443
+ {
2444
+ indexed: false,
2445
+ internalType: "string",
2446
+ name: "mediaUrl_",
2447
+ type: "string"
2448
+ }
2449
+ ],
2450
+ name: "IPAssetRegistered",
2451
+ type: "event"
2452
+ },
2453
+ {
2454
+ anonymous: false,
2455
+ inputs: [
2456
+ {
2457
+ indexed: true,
2458
+ internalType: "uint256",
2459
+ name: "ipAssetId_",
2460
+ type: "uint256"
2461
+ },
2462
+ {
2463
+ indexed: true,
2464
+ internalType: "address",
2465
+ name: "ipOrg_",
2466
+ type: "address"
2467
+ },
2468
+ {
2469
+ indexed: false,
2470
+ internalType: "uint256",
2471
+ name: "ipOrgAssetId_",
2472
+ type: "uint256"
2473
+ },
2474
+ {
2475
+ indexed: false,
2476
+ internalType: "address",
2477
+ name: "prevOwner_",
2478
+ type: "address"
2479
+ },
2480
+ {
2481
+ indexed: false,
2482
+ internalType: "address",
2483
+ name: "newOwner_",
2484
+ type: "address"
2485
+ }
2486
+ ],
2487
+ name: "IPAssetTransferred",
2488
+ type: "event"
2489
+ },
2490
+ {
2491
+ anonymous: false,
2492
+ inputs: [
2493
+ {
2494
+ indexed: true,
2495
+ internalType: "address",
2496
+ name: "ipOrg_",
2497
+ type: "address"
2498
+ },
2499
+ {
2500
+ indexed: false,
2501
+ internalType: "string",
2502
+ name: "baseURI_",
2503
+ type: "string"
2504
+ },
2505
+ {
2506
+ indexed: false,
2507
+ internalType: "string",
2508
+ name: "contractURI_",
2509
+ type: "string"
2510
+ }
2511
+ ],
2512
+ name: "MetadataUpdated",
2513
+ type: "event"
2514
+ },
2515
+ {
2516
+ anonymous: false,
2517
+ inputs: [
2518
+ {
2519
+ indexed: true,
2520
+ internalType: "address",
2521
+ name: "sender",
2522
+ type: "address"
2523
+ }
2524
+ ],
2525
+ name: "RequestCompleted",
2526
+ type: "event"
2527
+ },
2528
+ {
2529
+ anonymous: false,
2530
+ inputs: [
2531
+ {
2532
+ indexed: true,
2533
+ internalType: "address",
2534
+ name: "sender",
2535
+ type: "address"
2536
+ }
2537
+ ],
2538
+ name: "RequestPending",
2539
+ type: "event"
2540
+ },
2541
+ {
2542
+ inputs: [
2543
+ ],
2544
+ name: "INDEX_NOT_FOUND",
2545
+ outputs: [
2546
+ {
2547
+ internalType: "uint256",
2548
+ name: "",
2549
+ type: "uint256"
2550
+ }
2551
+ ],
2552
+ stateMutability: "view",
2553
+ type: "function"
2554
+ },
2555
+ {
2556
+ inputs: [
2557
+ ],
2558
+ name: "IPA_REGISTRY",
2559
+ outputs: [
2560
+ {
2561
+ internalType: "contract IPAssetRegistry",
2562
+ name: "",
2563
+ type: "address"
2564
+ }
2565
+ ],
2566
+ stateMutability: "view",
2567
+ type: "function"
2568
+ },
2569
+ {
2570
+ inputs: [
2571
+ ],
2572
+ name: "IP_ORG_CONTROLLER",
2573
+ outputs: [
2574
+ {
2575
+ internalType: "contract IPOrgController",
2576
+ name: "",
2577
+ type: "address"
2578
+ }
2579
+ ],
2580
+ stateMutability: "view",
2581
+ type: "function"
2582
+ },
2583
+ {
2584
+ inputs: [
2585
+ ],
2586
+ name: "LICENSE_REGISTRY",
2587
+ outputs: [
2588
+ {
2589
+ internalType: "contract LicenseRegistry",
2590
+ name: "",
2591
+ type: "address"
2592
+ }
2593
+ ],
2594
+ stateMutability: "view",
2595
+ type: "function"
2596
+ },
2597
+ {
2598
+ inputs: [
2599
+ ],
2600
+ name: "MAX_HOOKS",
2601
+ outputs: [
2602
+ {
2603
+ internalType: "uint256",
2604
+ name: "",
2605
+ type: "uint256"
2606
+ }
2607
+ ],
2608
+ stateMutability: "view",
2609
+ type: "function"
2610
+ },
2611
+ {
2612
+ inputs: [
2613
+ ],
2614
+ name: "MAX_IP_ORG_ASSET_TYPES",
2615
+ outputs: [
2616
+ {
2617
+ internalType: "uint256",
2618
+ name: "",
2619
+ type: "uint256"
2620
+ }
2621
+ ],
2622
+ stateMutability: "view",
2623
+ type: "function"
2624
+ },
2625
+ {
2626
+ inputs: [
2627
+ ],
2628
+ name: "MODULE_REGISTRY",
2629
+ outputs: [
2630
+ {
2631
+ internalType: "contract ModuleRegistry",
2632
+ name: "",
2633
+ type: "address"
2634
+ }
2635
+ ],
2636
+ stateMutability: "view",
2637
+ type: "function"
2638
+ },
2639
+ {
2640
+ inputs: [
2641
+ {
2642
+ internalType: "enum HookRegistry.HookType",
2643
+ name: "hookType_",
2644
+ type: "uint8"
2645
+ },
2646
+ {
2647
+ internalType: "contract IIPOrg",
2648
+ name: "ipOrg_",
2649
+ type: "address"
2650
+ },
2651
+ {
2652
+ internalType: "bytes32",
2653
+ name: "registryKey_",
2654
+ type: "bytes32"
2655
+ }
2656
+ ],
2657
+ name: "clearHooks",
2658
+ outputs: [
2659
+ ],
2660
+ stateMutability: "nonpayable",
2661
+ type: "function"
2662
+ },
2663
+ {
2664
+ inputs: [
2665
+ {
2666
+ internalType: "contract IIPOrg",
2667
+ name: "ipOrg_",
2668
+ type: "address"
2669
+ },
2670
+ {
2671
+ internalType: "address",
2672
+ name: "caller_",
2673
+ type: "address"
2674
+ },
2675
+ {
2676
+ internalType: "bytes",
2677
+ name: "params_",
2678
+ type: "bytes"
2679
+ }
2680
+ ],
2681
+ name: "configure",
2682
+ outputs: [
2683
+ {
2684
+ internalType: "bytes",
2685
+ name: "",
2686
+ type: "bytes"
2687
+ }
2688
+ ],
2689
+ stateMutability: "nonpayable",
2690
+ type: "function"
2691
+ },
2692
+ {
2693
+ inputs: [
2694
+ {
2695
+ internalType: "address",
2696
+ name: "ipOrg_",
2697
+ type: "address"
2698
+ }
2699
+ ],
2700
+ name: "contractURI",
2701
+ outputs: [
2702
+ {
2703
+ internalType: "string",
2704
+ name: "",
2705
+ type: "string"
2706
+ }
2707
+ ],
2708
+ stateMutability: "view",
2709
+ type: "function"
2710
+ },
2711
+ {
2712
+ inputs: [
2713
+ {
2714
+ internalType: "contract IIPOrg",
2715
+ name: "ipOrg_",
2716
+ type: "address"
2717
+ },
2718
+ {
2719
+ internalType: "address",
2720
+ name: "caller_",
2721
+ type: "address"
2722
+ },
2723
+ {
2724
+ internalType: "bytes",
2725
+ name: "moduleParams_",
2726
+ type: "bytes"
2727
+ },
2728
+ {
2729
+ internalType: "bytes[]",
2730
+ name: "preHookParams_",
2731
+ type: "bytes[]"
2732
+ },
2733
+ {
2734
+ internalType: "bytes[]",
2735
+ name: "postHookParams_",
2736
+ type: "bytes[]"
2737
+ }
2738
+ ],
2739
+ name: "execute",
2740
+ outputs: [
2741
+ {
2742
+ internalType: "bytes",
2743
+ name: "result",
2744
+ type: "bytes"
2745
+ }
2746
+ ],
2747
+ stateMutability: "nonpayable",
2748
+ type: "function"
2749
+ },
2750
+ {
2751
+ inputs: [
2752
+ {
2753
+ internalType: "address",
2754
+ name: "ipOrg_",
2755
+ type: "address"
2756
+ }
2757
+ ],
2758
+ name: "getIpOrgAssetTypes",
2759
+ outputs: [
2760
+ {
2761
+ internalType: "string[]",
2762
+ name: "",
2763
+ type: "string[]"
2764
+ }
2765
+ ],
2766
+ stateMutability: "view",
2767
+ type: "function"
2768
+ },
2769
+ {
2770
+ inputs: [
2771
+ {
2772
+ internalType: "enum HookRegistry.HookType",
2773
+ name: "hookType_",
2774
+ type: "uint8"
2775
+ },
2776
+ {
2777
+ internalType: "bytes32",
2778
+ name: "registryKey_",
2779
+ type: "bytes32"
2780
+ },
2781
+ {
2782
+ internalType: "uint256",
2783
+ name: "index_",
2784
+ type: "uint256"
2785
+ }
2786
+ ],
2787
+ name: "hookAt",
2788
+ outputs: [
2789
+ {
2790
+ internalType: "address",
2791
+ name: "",
2792
+ type: "address"
2793
+ }
2794
+ ],
2795
+ stateMutability: "view",
2796
+ type: "function"
2797
+ },
2798
+ {
2799
+ inputs: [
2800
+ {
2801
+ internalType: "enum HookRegistry.HookType",
2802
+ name: "hookType_",
2803
+ type: "uint8"
2804
+ },
2805
+ {
2806
+ internalType: "bytes32",
2807
+ name: "registryKey_",
2808
+ type: "bytes32"
2809
+ },
2810
+ {
2811
+ internalType: "uint256",
2812
+ name: "index_",
2813
+ type: "uint256"
2814
+ }
2815
+ ],
2816
+ name: "hookConfigAt",
2817
+ outputs: [
2818
+ {
2819
+ internalType: "bytes",
2820
+ name: "",
2821
+ type: "bytes"
2822
+ }
2823
+ ],
2824
+ stateMutability: "view",
2825
+ type: "function"
2826
+ },
2827
+ {
2828
+ inputs: [
2829
+ {
2830
+ internalType: "enum HookRegistry.HookType",
2831
+ name: "hookType_",
2832
+ type: "uint8"
2833
+ },
2834
+ {
2835
+ internalType: "bytes32",
2836
+ name: "registryKey_",
2837
+ type: "bytes32"
2838
+ },
2839
+ {
2840
+ internalType: "address",
2841
+ name: "hook_",
2842
+ type: "address"
2843
+ }
2844
+ ],
2845
+ name: "hookIndex",
2846
+ outputs: [
2847
+ {
2848
+ internalType: "uint256",
2849
+ name: "",
2850
+ type: "uint256"
2851
+ }
2852
+ ],
2853
+ stateMutability: "view",
2854
+ type: "function"
2855
+ },
2856
+ {
2857
+ inputs: [
2858
+ {
2859
+ internalType: "address",
2860
+ name: "",
2861
+ type: "address"
2862
+ },
2863
+ {
2864
+ internalType: "uint256",
2865
+ name: "",
2866
+ type: "uint256"
2867
+ }
2868
+ ],
2869
+ name: "ipAssetId",
2870
+ outputs: [
2871
+ {
2872
+ internalType: "uint256",
2873
+ name: "",
2874
+ type: "uint256"
2875
+ }
2876
+ ],
2877
+ stateMutability: "view",
2878
+ type: "function"
2879
+ },
2880
+ {
2881
+ inputs: [
2882
+ {
2883
+ internalType: "enum HookRegistry.HookType",
2884
+ name: "hookType_",
2885
+ type: "uint8"
2886
+ },
2887
+ {
2888
+ internalType: "bytes32",
2889
+ name: "registryKey_",
2890
+ type: "bytes32"
2891
+ },
2892
+ {
2893
+ internalType: "address",
2894
+ name: "hook_",
2895
+ type: "address"
2896
+ }
2897
+ ],
2898
+ name: "isRegistered",
2899
+ outputs: [
2900
+ {
2901
+ internalType: "bool",
2902
+ name: "",
2903
+ type: "bool"
2904
+ }
2905
+ ],
2906
+ stateMutability: "view",
2907
+ type: "function"
2908
+ },
2909
+ {
2910
+ inputs: [
2911
+ {
2912
+ internalType: "address",
2913
+ name: "ipOrg_",
2914
+ type: "address"
2915
+ },
2916
+ {
2917
+ internalType: "uint8",
2918
+ name: "assetTypeIndex_",
2919
+ type: "uint8"
2920
+ }
2921
+ ],
2922
+ name: "isValidIpOrgAssetType",
2923
+ outputs: [
2924
+ {
2925
+ internalType: "bool",
2926
+ name: "",
2927
+ type: "bool"
2928
+ }
2929
+ ],
2930
+ stateMutability: "view",
2931
+ type: "function"
2932
+ },
2933
+ {
2934
+ inputs: [
2935
+ {
2936
+ internalType: "uint256",
2937
+ name: "ipAssetId_",
2938
+ type: "uint256"
2939
+ }
2940
+ ],
2941
+ name: "ownerOf",
2942
+ outputs: [
2943
+ {
2944
+ internalType: "address",
2945
+ name: "",
2946
+ type: "address"
2947
+ }
2948
+ ],
2949
+ stateMutability: "view",
2950
+ type: "function"
2951
+ },
2952
+ {
2953
+ inputs: [
2954
+ {
2955
+ internalType: "enum HookRegistry.HookType",
2956
+ name: "hType_",
2957
+ type: "uint8"
2958
+ },
2959
+ {
2960
+ internalType: "contract IIPOrg",
2961
+ name: "ipOrg_",
2962
+ type: "address"
2963
+ },
2964
+ {
2965
+ internalType: "address[]",
2966
+ name: "hooks_",
2967
+ type: "address[]"
2968
+ },
2969
+ {
2970
+ internalType: "bytes[]",
2971
+ name: "hooksConfig_",
2972
+ type: "bytes[]"
2973
+ }
2974
+ ],
2975
+ name: "registerHooks",
2976
+ outputs: [
2977
+ ],
2978
+ stateMutability: "nonpayable",
2979
+ type: "function"
2980
+ },
2981
+ {
2982
+ inputs: [
2983
+ {
2984
+ internalType: "enum HookRegistry.HookType",
2985
+ name: "hookType_",
2986
+ type: "uint8"
2987
+ },
2988
+ {
2989
+ internalType: "contract IIPOrg",
2990
+ name: "ipOrg_",
2991
+ type: "address"
2992
+ },
2993
+ {
2994
+ internalType: "bytes32",
2995
+ name: "registryKey_",
2996
+ type: "bytes32"
2997
+ },
2998
+ {
2999
+ internalType: "address[]",
3000
+ name: "hooks_",
3001
+ type: "address[]"
3002
+ },
3003
+ {
3004
+ internalType: "bytes[]",
3005
+ name: "hooksConfig_",
3006
+ type: "bytes[]"
3007
+ }
3008
+ ],
3009
+ name: "registerHooks",
3010
+ outputs: [
3011
+ ],
3012
+ stateMutability: "nonpayable",
3013
+ type: "function"
3014
+ },
3015
+ {
3016
+ inputs: [
3017
+ {
3018
+ internalType: "address",
3019
+ name: "accessControl_",
3020
+ type: "address"
3021
+ }
3022
+ ],
3023
+ name: "setAccessControl",
3024
+ outputs: [
3025
+ ],
3026
+ stateMutability: "nonpayable",
3027
+ type: "function"
3028
+ },
3029
+ {
3030
+ inputs: [
3031
+ {
3032
+ internalType: "address",
3033
+ name: "ipOrg_",
3034
+ type: "address"
3035
+ },
3036
+ {
3037
+ internalType: "uint256",
3038
+ name: "ipOrgAssetId_",
3039
+ type: "uint256"
3040
+ },
3041
+ {
3042
+ internalType: "uint8",
3043
+ name: "ipOrgAssetType_",
3044
+ type: "uint8"
3045
+ }
3046
+ ],
3047
+ name: "tokenURI",
3048
+ outputs: [
3049
+ {
3050
+ internalType: "string",
3051
+ name: "",
3052
+ type: "string"
3053
+ }
3054
+ ],
3055
+ stateMutability: "view",
3056
+ type: "function"
3057
+ },
3058
+ {
3059
+ inputs: [
3060
+ {
3061
+ internalType: "address",
3062
+ name: "",
3063
+ type: "address"
3064
+ },
3065
+ {
3066
+ internalType: "uint256",
3067
+ name: "",
3068
+ type: "uint256"
3069
+ }
3070
+ ],
3071
+ name: "tokenUris",
3072
+ outputs: [
3073
+ {
3074
+ internalType: "string",
3075
+ name: "",
3076
+ type: "string"
3077
+ }
3078
+ ],
3079
+ stateMutability: "view",
3080
+ type: "function"
3081
+ },
3082
+ {
3083
+ inputs: [
3084
+ {
3085
+ internalType: "enum HookRegistry.HookType",
3086
+ name: "hookType_",
3087
+ type: "uint8"
3088
+ },
3089
+ {
3090
+ internalType: "bytes32",
3091
+ name: "registryKey_",
3092
+ type: "bytes32"
3093
+ }
3094
+ ],
3095
+ name: "totalHooks",
3096
+ outputs: [
3097
+ {
3098
+ internalType: "uint256",
3099
+ name: "",
3100
+ type: "uint256"
3101
+ }
3102
+ ],
3103
+ stateMutability: "view",
3104
+ type: "function"
3105
+ },
3106
+ {
3107
+ inputs: [
3108
+ {
3109
+ internalType: "enum HookRegistry.HookType",
3110
+ name: "hookType_",
3111
+ type: "uint8"
3112
+ },
3113
+ {
3114
+ internalType: "bytes32",
3115
+ name: "registryKey_",
3116
+ type: "bytes32"
3117
+ }
3118
+ ],
3119
+ name: "totalHooksConfig",
3120
+ outputs: [
3121
+ {
3122
+ internalType: "uint256",
3123
+ name: "",
3124
+ type: "uint256"
3125
+ }
3126
+ ],
3127
+ stateMutability: "view",
3128
+ type: "function"
3129
+ }
3130
+ ];
3131
+
1358
3132
  if (typeof process !== "undefined") {
1359
3133
  dotenv__namespace.config();
1360
3134
  }
1361
- var registrationModuleAbi = [{
1362
- anonymous: false,
1363
- inputs: [{
1364
- indexed: false,
1365
- internalType: "uint256",
1366
- name: "ipAssetId_",
1367
- type: "uint256"
1368
- }, {
1369
- indexed: true,
1370
- internalType: "address",
1371
- name: "ipOrg_",
1372
- type: "address"
1373
- }, {
1374
- indexed: false,
1375
- internalType: "uint256",
1376
- name: "ipOrgAssetId_",
1377
- type: "uint256"
1378
- }, {
1379
- indexed: true,
1380
- internalType: "address",
1381
- name: "owner_",
1382
- type: "address"
1383
- }, {
1384
- indexed: false,
1385
- internalType: "string",
1386
- name: "name_",
1387
- type: "string"
1388
- }, {
1389
- indexed: true,
1390
- internalType: "uint8",
1391
- name: "ipOrgAssetType_",
1392
- type: "uint8"
1393
- }, {
1394
- indexed: false,
1395
- internalType: "bytes32",
1396
- name: "hash_",
1397
- type: "bytes32"
1398
- }, {
1399
- indexed: false,
1400
- internalType: "string",
1401
- name: "mediaUrl_",
1402
- type: "string"
1403
- }],
1404
- name: "IPAssetRegistered",
1405
- type: "event"
1406
- }];
3135
+ var registrationModuleAbi = registrationModuleJson;
1407
3136
  var registrationModuleReadable = abitype.formatAbi(registrationModuleAbi);
1408
3137
  var registrationModuleConfig = {
1409
3138
  abi: viem.parseAbi(registrationModuleReadable),
@@ -1472,7 +3201,7 @@ var IPAssetClient = /*#__PURE__*/function (_IPAssetReadOnlyClien) {
1472
3201
  targetLog = _context.sent;
1473
3202
  return _context.abrupt("return", {
1474
3203
  txHash: txHash,
1475
- ipAssetId: targetLog.args.ipAssetId_.toString()
3204
+ ipAssetId: String(targetLog === null || targetLog === void 0 ? void 0 : targetLog.args["ipAssetId_"])
1476
3205
  });
1477
3206
  case 15:
1478
3207
  return _context.abrupt("return", {
@@ -1960,6 +3689,7 @@ var PlatformClient = /*#__PURE__*/function () {
1960
3689
  };
1961
3690
  _context.next = 7;
1962
3691
  return this.httpClient.post("/protocol/v2/files/upload", paylod, {
3692
+ timeout: 0,
1963
3693
  headers: {
1964
3694
  "Content-Type": "application/json"
1965
3695
  }
@@ -1970,7 +3700,7 @@ var PlatformClient = /*#__PURE__*/function () {
1970
3700
  case 11:
1971
3701
  _context.prev = 11;
1972
3702
  _context.t0 = _context["catch"](0);
1973
- return _context.abrupt("return", handleError(_context.t0, "Failed to upload file"));
3703
+ return _context.abrupt("return", handleError(_context.t0, ">>> Failed to upload file"));
1974
3704
  case 14:
1975
3705
  case "end":
1976
3706
  return _context.stop();
@@ -1986,20 +3716,813 @@ var PlatformClient = /*#__PURE__*/function () {
1986
3716
  return PlatformClient;
1987
3717
  }();
1988
3718
 
1989
- var licenseRegistryAbi = [{
1990
- anonymous: false,
1991
- inputs: [{
1992
- indexed: true,
1993
- internalType: "uint256",
1994
- name: "id",
1995
- type: "uint256"
1996
- }],
1997
- name: "LicenseRegistered",
1998
- type: "event"
1999
- }];
2000
- abitype.formatAbi(licenseRegistryAbi);
3719
+ var licenseRegistryJson = [
3720
+ {
3721
+ inputs: [
3722
+ {
3723
+ internalType: "address",
3724
+ name: "ipaRegistry_",
3725
+ type: "address"
3726
+ },
3727
+ {
3728
+ internalType: "address",
3729
+ name: "moduleRegistry_",
3730
+ type: "address"
3731
+ }
3732
+ ],
3733
+ stateMutability: "nonpayable",
3734
+ type: "constructor"
3735
+ },
3736
+ {
3737
+ inputs: [
3738
+ ],
3739
+ name: "LicenseRegistry_CallerNotLicensingModule",
3740
+ type: "error"
3741
+ },
3742
+ {
3743
+ inputs: [
3744
+ ],
3745
+ name: "LicenseRegistry_CallerNotRevoker",
3746
+ type: "error"
3747
+ },
3748
+ {
3749
+ inputs: [
3750
+ ],
3751
+ name: "LicenseRegistry_InvalidIpa",
3752
+ type: "error"
3753
+ },
3754
+ {
3755
+ inputs: [
3756
+ ],
3757
+ name: "LicenseRegistry_InvalidLicenseStatus",
3758
+ type: "error"
3759
+ },
3760
+ {
3761
+ inputs: [
3762
+ ],
3763
+ name: "LicenseRegistry_LicenseNotPending",
3764
+ type: "error"
3765
+ },
3766
+ {
3767
+ inputs: [
3768
+ ],
3769
+ name: "LicenseRegistry_NotLicenseNFT",
3770
+ type: "error"
3771
+ },
3772
+ {
3773
+ inputs: [
3774
+ ],
3775
+ name: "LicenseRegistry_UnknownLicenseId",
3776
+ type: "error"
3777
+ },
3778
+ {
3779
+ inputs: [
3780
+ ],
3781
+ name: "LicenseRegistry_ZeroIpaRegistryAddress",
3782
+ type: "error"
3783
+ },
3784
+ {
3785
+ inputs: [
3786
+ ],
3787
+ name: "LicenseRegistry_ZeroModuleRegistryAddress",
3788
+ type: "error"
3789
+ },
3790
+ {
3791
+ anonymous: false,
3792
+ inputs: [
3793
+ {
3794
+ indexed: true,
3795
+ internalType: "address",
3796
+ name: "owner",
3797
+ type: "address"
3798
+ },
3799
+ {
3800
+ indexed: true,
3801
+ internalType: "address",
3802
+ name: "approved",
3803
+ type: "address"
3804
+ },
3805
+ {
3806
+ indexed: true,
3807
+ internalType: "uint256",
3808
+ name: "tokenId",
3809
+ type: "uint256"
3810
+ }
3811
+ ],
3812
+ name: "Approval",
3813
+ type: "event"
3814
+ },
3815
+ {
3816
+ anonymous: false,
3817
+ inputs: [
3818
+ {
3819
+ indexed: true,
3820
+ internalType: "address",
3821
+ name: "owner",
3822
+ type: "address"
3823
+ },
3824
+ {
3825
+ indexed: true,
3826
+ internalType: "address",
3827
+ name: "operator",
3828
+ type: "address"
3829
+ },
3830
+ {
3831
+ indexed: false,
3832
+ internalType: "bool",
3833
+ name: "approved",
3834
+ type: "bool"
3835
+ }
3836
+ ],
3837
+ name: "ApprovalForAll",
3838
+ type: "event"
3839
+ },
3840
+ {
3841
+ anonymous: false,
3842
+ inputs: [
3843
+ {
3844
+ indexed: true,
3845
+ internalType: "uint256",
3846
+ name: "licenseId",
3847
+ type: "uint256"
3848
+ }
3849
+ ],
3850
+ name: "LicenseActivated",
3851
+ type: "event"
3852
+ },
3853
+ {
3854
+ anonymous: false,
3855
+ inputs: [
3856
+ {
3857
+ indexed: true,
3858
+ internalType: "uint256",
3859
+ name: "licenseId",
3860
+ type: "uint256"
3861
+ },
3862
+ {
3863
+ indexed: true,
3864
+ internalType: "uint256",
3865
+ name: "ipAssetId",
3866
+ type: "uint256"
3867
+ }
3868
+ ],
3869
+ name: "LicenseNftBoundedToIpa",
3870
+ type: "event"
3871
+ },
3872
+ {
3873
+ anonymous: false,
3874
+ inputs: [
3875
+ {
3876
+ indexed: true,
3877
+ internalType: "uint256",
3878
+ name: "id",
3879
+ type: "uint256"
3880
+ }
3881
+ ],
3882
+ name: "LicenseRegistered",
3883
+ type: "event"
3884
+ },
3885
+ {
3886
+ anonymous: false,
3887
+ inputs: [
3888
+ {
3889
+ indexed: true,
3890
+ internalType: "uint256",
3891
+ name: "licenseId",
3892
+ type: "uint256"
3893
+ }
3894
+ ],
3895
+ name: "LicenseRevoked",
3896
+ type: "event"
3897
+ },
3898
+ {
3899
+ anonymous: false,
3900
+ inputs: [
3901
+ {
3902
+ indexed: true,
3903
+ internalType: "address",
3904
+ name: "from",
3905
+ type: "address"
3906
+ },
3907
+ {
3908
+ indexed: true,
3909
+ internalType: "address",
3910
+ name: "to",
3911
+ type: "address"
3912
+ },
3913
+ {
3914
+ indexed: true,
3915
+ internalType: "uint256",
3916
+ name: "tokenId",
3917
+ type: "uint256"
3918
+ }
3919
+ ],
3920
+ name: "Transfer",
3921
+ type: "event"
3922
+ },
3923
+ {
3924
+ inputs: [
3925
+ ],
3926
+ name: "IPA_REGISTRY",
3927
+ outputs: [
3928
+ {
3929
+ internalType: "contract IPAssetRegistry",
3930
+ name: "",
3931
+ type: "address"
3932
+ }
3933
+ ],
3934
+ stateMutability: "view",
3935
+ type: "function"
3936
+ },
3937
+ {
3938
+ inputs: [
3939
+ ],
3940
+ name: "MODULE_REGISTRY",
3941
+ outputs: [
3942
+ {
3943
+ internalType: "contract ModuleRegistry",
3944
+ name: "",
3945
+ type: "address"
3946
+ }
3947
+ ],
3948
+ stateMutability: "view",
3949
+ type: "function"
3950
+ },
3951
+ {
3952
+ inputs: [
3953
+ {
3954
+ internalType: "uint256",
3955
+ name: "licenseId_",
3956
+ type: "uint256"
3957
+ }
3958
+ ],
3959
+ name: "activateLicense",
3960
+ outputs: [
3961
+ ],
3962
+ stateMutability: "nonpayable",
3963
+ type: "function"
3964
+ },
3965
+ {
3966
+ inputs: [
3967
+ {
3968
+ components: [
3969
+ {
3970
+ internalType: "bool",
3971
+ name: "isCommercial",
3972
+ type: "bool"
3973
+ },
3974
+ {
3975
+ internalType: "enum Licensing.LicenseStatus",
3976
+ name: "status",
3977
+ type: "uint8"
3978
+ },
3979
+ {
3980
+ internalType: "address",
3981
+ name: "licensor",
3982
+ type: "address"
3983
+ },
3984
+ {
3985
+ internalType: "address",
3986
+ name: "revoker",
3987
+ type: "address"
3988
+ },
3989
+ {
3990
+ internalType: "address",
3991
+ name: "ipOrg",
3992
+ type: "address"
3993
+ },
3994
+ {
3995
+ internalType: "uint256",
3996
+ name: "parentLicenseId",
3997
+ type: "uint256"
3998
+ },
3999
+ {
4000
+ internalType: "ShortString[]",
4001
+ name: "termIds",
4002
+ type: "bytes32[]"
4003
+ },
4004
+ {
4005
+ internalType: "bytes[]",
4006
+ name: "termsData",
4007
+ type: "bytes[]"
4008
+ }
4009
+ ],
4010
+ internalType: "struct Licensing.RegistryAddition",
4011
+ name: "params_",
4012
+ type: "tuple"
4013
+ },
4014
+ {
4015
+ internalType: "uint256",
4016
+ name: "ipaId_",
4017
+ type: "uint256"
4018
+ }
4019
+ ],
4020
+ name: "addBoundToIpaLicense",
4021
+ outputs: [
4022
+ {
4023
+ internalType: "uint256",
4024
+ name: "",
4025
+ type: "uint256"
4026
+ }
4027
+ ],
4028
+ stateMutability: "nonpayable",
4029
+ type: "function"
4030
+ },
4031
+ {
4032
+ inputs: [
4033
+ {
4034
+ components: [
4035
+ {
4036
+ internalType: "bool",
4037
+ name: "isCommercial",
4038
+ type: "bool"
4039
+ },
4040
+ {
4041
+ internalType: "enum Licensing.LicenseStatus",
4042
+ name: "status",
4043
+ type: "uint8"
4044
+ },
4045
+ {
4046
+ internalType: "address",
4047
+ name: "licensor",
4048
+ type: "address"
4049
+ },
4050
+ {
4051
+ internalType: "address",
4052
+ name: "revoker",
4053
+ type: "address"
4054
+ },
4055
+ {
4056
+ internalType: "address",
4057
+ name: "ipOrg",
4058
+ type: "address"
4059
+ },
4060
+ {
4061
+ internalType: "uint256",
4062
+ name: "parentLicenseId",
4063
+ type: "uint256"
4064
+ },
4065
+ {
4066
+ internalType: "ShortString[]",
4067
+ name: "termIds",
4068
+ type: "bytes32[]"
4069
+ },
4070
+ {
4071
+ internalType: "bytes[]",
4072
+ name: "termsData",
4073
+ type: "bytes[]"
4074
+ }
4075
+ ],
4076
+ internalType: "struct Licensing.RegistryAddition",
4077
+ name: "params_",
4078
+ type: "tuple"
4079
+ },
4080
+ {
4081
+ internalType: "address",
4082
+ name: "licensee_",
4083
+ type: "address"
4084
+ }
4085
+ ],
4086
+ name: "addTradeableLicense",
4087
+ outputs: [
4088
+ {
4089
+ internalType: "uint256",
4090
+ name: "",
4091
+ type: "uint256"
4092
+ }
4093
+ ],
4094
+ stateMutability: "nonpayable",
4095
+ type: "function"
4096
+ },
4097
+ {
4098
+ inputs: [
4099
+ {
4100
+ internalType: "address",
4101
+ name: "to",
4102
+ type: "address"
4103
+ },
4104
+ {
4105
+ internalType: "uint256",
4106
+ name: "tokenId",
4107
+ type: "uint256"
4108
+ }
4109
+ ],
4110
+ name: "approve",
4111
+ outputs: [
4112
+ ],
4113
+ stateMutability: "nonpayable",
4114
+ type: "function"
4115
+ },
4116
+ {
4117
+ inputs: [
4118
+ {
4119
+ internalType: "address",
4120
+ name: "owner",
4121
+ type: "address"
4122
+ }
4123
+ ],
4124
+ name: "balanceOf",
4125
+ outputs: [
4126
+ {
4127
+ internalType: "uint256",
4128
+ name: "",
4129
+ type: "uint256"
4130
+ }
4131
+ ],
4132
+ stateMutability: "view",
4133
+ type: "function"
4134
+ },
4135
+ {
4136
+ inputs: [
4137
+ {
4138
+ internalType: "uint256",
4139
+ name: "licenseId_",
4140
+ type: "uint256"
4141
+ },
4142
+ {
4143
+ internalType: "uint256",
4144
+ name: "ipaId_",
4145
+ type: "uint256"
4146
+ }
4147
+ ],
4148
+ name: "bindLnftToIpa",
4149
+ outputs: [
4150
+ ],
4151
+ stateMutability: "nonpayable",
4152
+ type: "function"
4153
+ },
4154
+ {
4155
+ inputs: [
4156
+ {
4157
+ internalType: "uint256",
4158
+ name: "tokenId",
4159
+ type: "uint256"
4160
+ }
4161
+ ],
4162
+ name: "getApproved",
4163
+ outputs: [
4164
+ {
4165
+ internalType: "address",
4166
+ name: "",
4167
+ type: "address"
4168
+ }
4169
+ ],
4170
+ stateMutability: "view",
4171
+ type: "function"
4172
+ },
4173
+ {
4174
+ inputs: [
4175
+ {
4176
+ internalType: "uint256",
4177
+ name: "id_",
4178
+ type: "uint256"
4179
+ }
4180
+ ],
4181
+ name: "getLicense",
4182
+ outputs: [
4183
+ {
4184
+ components: [
4185
+ {
4186
+ internalType: "bool",
4187
+ name: "isCommercial",
4188
+ type: "bool"
4189
+ },
4190
+ {
4191
+ internalType: "enum Licensing.LicenseStatus",
4192
+ name: "status",
4193
+ type: "uint8"
4194
+ },
4195
+ {
4196
+ internalType: "address",
4197
+ name: "licensor",
4198
+ type: "address"
4199
+ },
4200
+ {
4201
+ internalType: "address",
4202
+ name: "revoker",
4203
+ type: "address"
4204
+ },
4205
+ {
4206
+ internalType: "address",
4207
+ name: "ipOrg",
4208
+ type: "address"
4209
+ },
4210
+ {
4211
+ internalType: "enum Licensing.LicenseeType",
4212
+ name: "licenseeType",
4213
+ type: "uint8"
4214
+ },
4215
+ {
4216
+ internalType: "uint256",
4217
+ name: "ipaId",
4218
+ type: "uint256"
4219
+ },
4220
+ {
4221
+ internalType: "uint256",
4222
+ name: "parentLicenseId",
4223
+ type: "uint256"
4224
+ },
4225
+ {
4226
+ internalType: "ShortString[]",
4227
+ name: "termIds",
4228
+ type: "bytes32[]"
4229
+ },
4230
+ {
4231
+ internalType: "bytes[]",
4232
+ name: "termsData",
4233
+ type: "bytes[]"
4234
+ }
4235
+ ],
4236
+ internalType: "struct Licensing.License",
4237
+ name: "",
4238
+ type: "tuple"
4239
+ }
4240
+ ],
4241
+ stateMutability: "view",
4242
+ type: "function"
4243
+ },
4244
+ {
4245
+ inputs: [
4246
+ {
4247
+ internalType: "uint256",
4248
+ name: "id_",
4249
+ type: "uint256"
4250
+ }
4251
+ ],
4252
+ name: "getLicensee",
4253
+ outputs: [
4254
+ {
4255
+ internalType: "address",
4256
+ name: "",
4257
+ type: "address"
4258
+ }
4259
+ ],
4260
+ stateMutability: "view",
4261
+ type: "function"
4262
+ },
4263
+ {
4264
+ inputs: [
4265
+ {
4266
+ internalType: "uint256",
4267
+ name: "id_",
4268
+ type: "uint256"
4269
+ }
4270
+ ],
4271
+ name: "getLicensor",
4272
+ outputs: [
4273
+ {
4274
+ internalType: "address",
4275
+ name: "",
4276
+ type: "address"
4277
+ }
4278
+ ],
4279
+ stateMutability: "view",
4280
+ type: "function"
4281
+ },
4282
+ {
4283
+ inputs: [
4284
+ {
4285
+ internalType: "address",
4286
+ name: "owner",
4287
+ type: "address"
4288
+ },
4289
+ {
4290
+ internalType: "address",
4291
+ name: "operator",
4292
+ type: "address"
4293
+ }
4294
+ ],
4295
+ name: "isApprovedForAll",
4296
+ outputs: [
4297
+ {
4298
+ internalType: "bool",
4299
+ name: "",
4300
+ type: "bool"
4301
+ }
4302
+ ],
4303
+ stateMutability: "view",
4304
+ type: "function"
4305
+ },
4306
+ {
4307
+ inputs: [
4308
+ {
4309
+ internalType: "uint256",
4310
+ name: "licenseId_",
4311
+ type: "uint256"
4312
+ }
4313
+ ],
4314
+ name: "isLicenseActive",
4315
+ outputs: [
4316
+ {
4317
+ internalType: "bool",
4318
+ name: "",
4319
+ type: "bool"
4320
+ }
4321
+ ],
4322
+ stateMutability: "view",
4323
+ type: "function"
4324
+ },
4325
+ {
4326
+ inputs: [
4327
+ ],
4328
+ name: "name",
4329
+ outputs: [
4330
+ {
4331
+ internalType: "string",
4332
+ name: "",
4333
+ type: "string"
4334
+ }
4335
+ ],
4336
+ stateMutability: "view",
4337
+ type: "function"
4338
+ },
4339
+ {
4340
+ inputs: [
4341
+ {
4342
+ internalType: "uint256",
4343
+ name: "tokenId",
4344
+ type: "uint256"
4345
+ }
4346
+ ],
4347
+ name: "ownerOf",
4348
+ outputs: [
4349
+ {
4350
+ internalType: "address",
4351
+ name: "",
4352
+ type: "address"
4353
+ }
4354
+ ],
4355
+ stateMutability: "view",
4356
+ type: "function"
4357
+ },
4358
+ {
4359
+ inputs: [
4360
+ {
4361
+ internalType: "uint256",
4362
+ name: "licenseId_",
4363
+ type: "uint256"
4364
+ }
4365
+ ],
4366
+ name: "revokeLicense",
4367
+ outputs: [
4368
+ ],
4369
+ stateMutability: "nonpayable",
4370
+ type: "function"
4371
+ },
4372
+ {
4373
+ inputs: [
4374
+ {
4375
+ internalType: "address",
4376
+ name: "from",
4377
+ type: "address"
4378
+ },
4379
+ {
4380
+ internalType: "address",
4381
+ name: "to",
4382
+ type: "address"
4383
+ },
4384
+ {
4385
+ internalType: "uint256",
4386
+ name: "tokenId",
4387
+ type: "uint256"
4388
+ }
4389
+ ],
4390
+ name: "safeTransferFrom",
4391
+ outputs: [
4392
+ ],
4393
+ stateMutability: "nonpayable",
4394
+ type: "function"
4395
+ },
4396
+ {
4397
+ inputs: [
4398
+ {
4399
+ internalType: "address",
4400
+ name: "from",
4401
+ type: "address"
4402
+ },
4403
+ {
4404
+ internalType: "address",
4405
+ name: "to",
4406
+ type: "address"
4407
+ },
4408
+ {
4409
+ internalType: "uint256",
4410
+ name: "tokenId",
4411
+ type: "uint256"
4412
+ },
4413
+ {
4414
+ internalType: "bytes",
4415
+ name: "data",
4416
+ type: "bytes"
4417
+ }
4418
+ ],
4419
+ name: "safeTransferFrom",
4420
+ outputs: [
4421
+ ],
4422
+ stateMutability: "nonpayable",
4423
+ type: "function"
4424
+ },
4425
+ {
4426
+ inputs: [
4427
+ {
4428
+ internalType: "address",
4429
+ name: "operator",
4430
+ type: "address"
4431
+ },
4432
+ {
4433
+ internalType: "bool",
4434
+ name: "approved",
4435
+ type: "bool"
4436
+ }
4437
+ ],
4438
+ name: "setApprovalForAll",
4439
+ outputs: [
4440
+ ],
4441
+ stateMutability: "nonpayable",
4442
+ type: "function"
4443
+ },
4444
+ {
4445
+ inputs: [
4446
+ {
4447
+ internalType: "bytes4",
4448
+ name: "interfaceId",
4449
+ type: "bytes4"
4450
+ }
4451
+ ],
4452
+ name: "supportsInterface",
4453
+ outputs: [
4454
+ {
4455
+ internalType: "bool",
4456
+ name: "",
4457
+ type: "bool"
4458
+ }
4459
+ ],
4460
+ stateMutability: "view",
4461
+ type: "function"
4462
+ },
4463
+ {
4464
+ inputs: [
4465
+ ],
4466
+ name: "symbol",
4467
+ outputs: [
4468
+ {
4469
+ internalType: "string",
4470
+ name: "",
4471
+ type: "string"
4472
+ }
4473
+ ],
4474
+ stateMutability: "view",
4475
+ type: "function"
4476
+ },
4477
+ {
4478
+ inputs: [
4479
+ {
4480
+ internalType: "uint256",
4481
+ name: "tokenId",
4482
+ type: "uint256"
4483
+ }
4484
+ ],
4485
+ name: "tokenURI",
4486
+ outputs: [
4487
+ {
4488
+ internalType: "string",
4489
+ name: "",
4490
+ type: "string"
4491
+ }
4492
+ ],
4493
+ stateMutability: "view",
4494
+ type: "function"
4495
+ },
4496
+ {
4497
+ inputs: [
4498
+ {
4499
+ internalType: "address",
4500
+ name: "from",
4501
+ type: "address"
4502
+ },
4503
+ {
4504
+ internalType: "address",
4505
+ name: "to",
4506
+ type: "address"
4507
+ },
4508
+ {
4509
+ internalType: "uint256",
4510
+ name: "tokenId",
4511
+ type: "uint256"
4512
+ }
4513
+ ],
4514
+ name: "transferFrom",
4515
+ outputs: [
4516
+ ],
4517
+ stateMutability: "nonpayable",
4518
+ type: "function"
4519
+ }
4520
+ ];
4521
+
4522
+ var licenseRegistryAbi = licenseRegistryJson;
4523
+ var licenseRegistryReadable = abitype.formatAbi(licenseRegistryAbi);
2001
4524
  var licenseRegistryConfig = {
2002
- abi: licenseRegistryAbi,
4525
+ abi: viem.parseAbi(licenseRegistryReadable),
2003
4526
  address: viem.getAddress(process.env.LICENSE_REGISTRY_CONTRACT || process.env.NEXT_PUBLIC_LICENSE_REGISTRY_CONTRACT || "")
2004
4527
  };
2005
4528
 
@@ -2020,7 +4543,7 @@ var LicenseClient = /*#__PURE__*/function (_LicenseReadOnlyClien) {
2020
4543
  key: "create",
2021
4544
  value: function () {
2022
4545
  var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
2023
- var functionName, args, _request$txOptions, _yield$this$rpcClient, call, txHash, _targetLog$args, targetLog;
4546
+ var functionName, args, _request$txOptions, _yield$this$rpcClient, call, txHash, targetLog;
2024
4547
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2025
4548
  while (1) switch (_context.prev = _context.next) {
2026
4549
  case 0:
@@ -2076,7 +4599,7 @@ var LicenseClient = /*#__PURE__*/function (_LicenseReadOnlyClien) {
2076
4599
  targetLog = _context.sent;
2077
4600
  return _context.abrupt("return", {
2078
4601
  txHash: txHash,
2079
- licenseId: targetLog === null || targetLog === void 0 || (_targetLog$args = targetLog.args) === null || _targetLog$args === void 0 ? void 0 : _targetLog$args.id.toString()
4602
+ licenseId: String(targetLog === null || targetLog === void 0 ? void 0 : targetLog.args["id"])
2080
4603
  });
2081
4604
  case 26:
2082
4605
  return _context.abrupt("return", {
@@ -2114,91 +4637,1037 @@ var LicenseClient = /*#__PURE__*/function (_LicenseReadOnlyClien) {
2114
4637
  return LicenseClient;
2115
4638
  }(LicenseReadOnlyClient);
2116
4639
 
2117
- var relationshipModuleAbi = [
2118
- // EVENTS
2119
- {
2120
- anonymous: false,
2121
- inputs: [{
2122
- indexed: true,
2123
- internalType: "uint256",
2124
- name: "relationshipId",
2125
- type: "uint256"
2126
- }, {
2127
- indexed: true,
2128
- internalType: "string",
2129
- name: "relType",
2130
- type: "string"
2131
- }, {
2132
- indexed: false,
2133
- internalType: "address",
2134
- name: "srcAddress",
2135
- type: "address"
2136
- }, {
2137
- indexed: false,
2138
- internalType: "uint256",
2139
- name: "srcId",
2140
- type: "uint256"
2141
- }, {
2142
- indexed: false,
2143
- internalType: "address",
2144
- name: "dstAddress",
2145
- type: "address"
2146
- }, {
2147
- indexed: false,
2148
- internalType: "uint256",
2149
- name: "dstId",
2150
- type: "uint256"
2151
- }],
2152
- name: "RelationshipCreated",
2153
- type: "event"
2154
- }, {
2155
- anonymous: false,
2156
- inputs: [{
2157
- indexed: true,
2158
- internalType: "string",
2159
- name: "relType",
2160
- type: "string"
2161
- }, {
2162
- indexed: true,
2163
- internalType: "address",
2164
- name: "ipOrg",
2165
- type: "address"
2166
- }, {
2167
- indexed: false,
2168
- internalType: "address",
2169
- name: "src",
2170
- type: "address"
2171
- }, {
2172
- indexed: false,
2173
- internalType: "enum LibRelationship.Relatables",
2174
- name: "srcRelatable",
2175
- type: "uint8"
2176
- }, {
2177
- indexed: false,
2178
- internalType: "uint256",
2179
- name: "srcSubtypesMask",
2180
- type: "uint256"
2181
- }, {
2182
- indexed: false,
2183
- internalType: "address",
2184
- name: "dst",
2185
- type: "address"
2186
- }, {
2187
- indexed: false,
2188
- internalType: "enum LibRelationship.Relatables",
2189
- name: "dstRelatable",
2190
- type: "uint8"
2191
- }, {
2192
- indexed: false,
2193
- internalType: "uint256",
2194
- name: "dstSubtypesMask",
2195
- type: "uint256"
2196
- }],
2197
- name: "RelationshipTypeSet",
2198
- type: "event"
2199
- }];
4640
+ var relationshipModuleJson = [
4641
+ {
4642
+ inputs: [
4643
+ {
4644
+ components: [
4645
+ {
4646
+ internalType: "contract IPAssetRegistry",
4647
+ name: "ipaRegistry",
4648
+ type: "address"
4649
+ },
4650
+ {
4651
+ internalType: "contract ModuleRegistry",
4652
+ name: "moduleRegistry",
4653
+ type: "address"
4654
+ },
4655
+ {
4656
+ internalType: "contract LicenseRegistry",
4657
+ name: "licenseRegistry",
4658
+ type: "address"
4659
+ },
4660
+ {
4661
+ internalType: "contract IPOrgController",
4662
+ name: "ipOrgController",
4663
+ type: "address"
4664
+ }
4665
+ ],
4666
+ internalType: "struct BaseModule.ModuleConstruction",
4667
+ name: "params_",
4668
+ type: "tuple"
4669
+ },
4670
+ {
4671
+ internalType: "address",
4672
+ name: "accessControl_",
4673
+ type: "address"
4674
+ }
4675
+ ],
4676
+ stateMutability: "nonpayable",
4677
+ type: "constructor"
4678
+ },
4679
+ {
4680
+ inputs: [
4681
+ {
4682
+ internalType: "uint8",
4683
+ name: "hookType",
4684
+ type: "uint8"
4685
+ }
4686
+ ],
4687
+ name: "BaseModule_HooksParamsLengthMismatch",
4688
+ type: "error"
4689
+ },
4690
+ {
4691
+ inputs: [
4692
+ ],
4693
+ name: "BaseModule_OnlyModuleRegistry",
4694
+ type: "error"
4695
+ },
4696
+ {
4697
+ inputs: [
4698
+ ],
4699
+ name: "BaseModule_ZeroIpaRegistry",
4700
+ type: "error"
4701
+ },
4702
+ {
4703
+ inputs: [
4704
+ ],
4705
+ name: "BaseModule_ZeroLicenseRegistry",
4706
+ type: "error"
4707
+ },
4708
+ {
4709
+ inputs: [
4710
+ ],
4711
+ name: "BaseModule_ZeroModuleRegistry",
4712
+ type: "error"
4713
+ },
4714
+ {
4715
+ inputs: [
4716
+ ],
4717
+ name: "HookRegistry_CallerNotIPOrgOwner",
4718
+ type: "error"
4719
+ },
4720
+ {
4721
+ inputs: [
4722
+ ],
4723
+ name: "HookRegistry_HooksConfigLengthMismatch",
4724
+ type: "error"
4725
+ },
4726
+ {
4727
+ inputs: [
4728
+ {
4729
+ internalType: "uint256",
4730
+ name: "hooksIndex",
4731
+ type: "uint256"
4732
+ }
4733
+ ],
4734
+ name: "HookRegistry_IndexOutOfBounds",
4735
+ type: "error"
4736
+ },
4737
+ {
4738
+ inputs: [
4739
+ ],
4740
+ name: "HookRegistry_MaxHooksExceeded",
4741
+ type: "error"
4742
+ },
4743
+ {
4744
+ inputs: [
4745
+ ],
4746
+ name: "HookRegistry_RegisteringDuplicatedHook",
4747
+ type: "error"
4748
+ },
4749
+ {
4750
+ inputs: [
4751
+ ],
4752
+ name: "HookRegistry_RegisteringZeroAddressHook",
4753
+ type: "error"
4754
+ },
4755
+ {
4756
+ inputs: [
4757
+ ],
4758
+ name: "LibUintArrayMask_EmptyArray",
4759
+ type: "error"
4760
+ },
4761
+ {
4762
+ inputs: [
4763
+ {
4764
+ internalType: "bytes32",
4765
+ name: "role",
4766
+ type: "bytes32"
4767
+ },
4768
+ {
4769
+ internalType: "address",
4770
+ name: "account",
4771
+ type: "address"
4772
+ }
4773
+ ],
4774
+ name: "MissingRole",
4775
+ type: "error"
4776
+ },
4777
+ {
4778
+ inputs: [
4779
+ ],
4780
+ name: "RelationshipModule_CallerNotIpOrgOwner",
4781
+ type: "error"
4782
+ },
4783
+ {
4784
+ inputs: [
4785
+ ],
4786
+ name: "RelationshipModule_InvalidConfigOperation",
4787
+ type: "error"
4788
+ },
4789
+ {
4790
+ inputs: [
4791
+ ],
4792
+ name: "RelationshipModule_InvalidDstAddress",
4793
+ type: "error"
4794
+ },
4795
+ {
4796
+ inputs: [
4797
+ ],
4798
+ name: "RelationshipModule_InvalidDstId",
4799
+ type: "error"
4800
+ },
4801
+ {
4802
+ inputs: [
4803
+ ],
4804
+ name: "RelationshipModule_InvalidRelatable",
4805
+ type: "error"
4806
+ },
4807
+ {
4808
+ inputs: [
4809
+ ],
4810
+ name: "RelationshipModule_InvalidSrcAddress",
4811
+ type: "error"
4812
+ },
4813
+ {
4814
+ inputs: [
4815
+ ],
4816
+ name: "RelationshipModule_InvalidSrcId",
4817
+ type: "error"
4818
+ },
4819
+ {
4820
+ inputs: [
4821
+ ],
4822
+ name: "RelationshipModule_IpOrgRelatableCannotBeProtocolLevel",
4823
+ type: "error"
4824
+ },
4825
+ {
4826
+ inputs: [
4827
+ {
4828
+ internalType: "string",
4829
+ name: "relType",
4830
+ type: "string"
4831
+ }
4832
+ ],
4833
+ name: "RelationshipModule_RelTypeNotSet",
4834
+ type: "error"
4835
+ },
4836
+ {
4837
+ inputs: [
4838
+ ],
4839
+ name: "RelationshipModule_UnsupportedIpOrgIndexType",
4840
+ type: "error"
4841
+ },
4842
+ {
4843
+ inputs: [
4844
+ {
4845
+ internalType: "string",
4846
+ name: "name",
4847
+ type: "string"
4848
+ }
4849
+ ],
4850
+ name: "UnsupportedInterface",
4851
+ type: "error"
4852
+ },
4853
+ {
4854
+ inputs: [
4855
+ ],
4856
+ name: "ZeroAddress",
4857
+ type: "error"
4858
+ },
4859
+ {
4860
+ anonymous: false,
4861
+ inputs: [
4862
+ {
4863
+ indexed: true,
4864
+ internalType: "address",
4865
+ name: "accessControl",
4866
+ type: "address"
4867
+ }
4868
+ ],
4869
+ name: "AccessControlUpdated",
4870
+ type: "event"
4871
+ },
4872
+ {
4873
+ anonymous: false,
4874
+ inputs: [
4875
+ {
4876
+ indexed: true,
4877
+ internalType: "enum HookRegistry.HookType",
4878
+ name: "hType",
4879
+ type: "uint8"
4880
+ },
4881
+ {
4882
+ indexed: true,
4883
+ internalType: "bytes32",
4884
+ name: "registryKey",
4885
+ type: "bytes32"
4886
+ }
4887
+ ],
4888
+ name: "HooksCleared",
4889
+ type: "event"
4890
+ },
4891
+ {
4892
+ anonymous: false,
4893
+ inputs: [
4894
+ {
4895
+ indexed: true,
4896
+ internalType: "enum HookRegistry.HookType",
4897
+ name: "hType",
4898
+ type: "uint8"
4899
+ },
4900
+ {
4901
+ indexed: true,
4902
+ internalType: "bytes32",
4903
+ name: "registryKey",
4904
+ type: "bytes32"
4905
+ },
4906
+ {
4907
+ indexed: false,
4908
+ internalType: "address[]",
4909
+ name: "hooks",
4910
+ type: "address[]"
4911
+ }
4912
+ ],
4913
+ name: "HooksRegistered",
4914
+ type: "event"
4915
+ },
4916
+ {
4917
+ anonymous: false,
4918
+ inputs: [
4919
+ {
4920
+ indexed: true,
4921
+ internalType: "uint256",
4922
+ name: "relationshipId",
4923
+ type: "uint256"
4924
+ },
4925
+ {
4926
+ indexed: true,
4927
+ internalType: "string",
4928
+ name: "relType",
4929
+ type: "string"
4930
+ },
4931
+ {
4932
+ indexed: false,
4933
+ internalType: "address",
4934
+ name: "srcAddress",
4935
+ type: "address"
4936
+ },
4937
+ {
4938
+ indexed: false,
4939
+ internalType: "uint256",
4940
+ name: "srcId",
4941
+ type: "uint256"
4942
+ },
4943
+ {
4944
+ indexed: false,
4945
+ internalType: "address",
4946
+ name: "dstAddress",
4947
+ type: "address"
4948
+ },
4949
+ {
4950
+ indexed: false,
4951
+ internalType: "uint256",
4952
+ name: "dstId",
4953
+ type: "uint256"
4954
+ }
4955
+ ],
4956
+ name: "RelationshipCreated",
4957
+ type: "event"
4958
+ },
4959
+ {
4960
+ anonymous: false,
4961
+ inputs: [
4962
+ {
4963
+ indexed: true,
4964
+ internalType: "string",
4965
+ name: "relType",
4966
+ type: "string"
4967
+ },
4968
+ {
4969
+ indexed: true,
4970
+ internalType: "address",
4971
+ name: "ipOrg",
4972
+ type: "address"
4973
+ },
4974
+ {
4975
+ indexed: false,
4976
+ internalType: "address",
4977
+ name: "src",
4978
+ type: "address"
4979
+ },
4980
+ {
4981
+ indexed: false,
4982
+ internalType: "enum LibRelationship.Relatables",
4983
+ name: "srcRelatable",
4984
+ type: "uint8"
4985
+ },
4986
+ {
4987
+ indexed: false,
4988
+ internalType: "uint256",
4989
+ name: "srcSubtypesMask",
4990
+ type: "uint256"
4991
+ },
4992
+ {
4993
+ indexed: false,
4994
+ internalType: "address",
4995
+ name: "dst",
4996
+ type: "address"
4997
+ },
4998
+ {
4999
+ indexed: false,
5000
+ internalType: "enum LibRelationship.Relatables",
5001
+ name: "dstRelatable",
5002
+ type: "uint8"
5003
+ },
5004
+ {
5005
+ indexed: false,
5006
+ internalType: "uint256",
5007
+ name: "dstSubtypesMask",
5008
+ type: "uint256"
5009
+ }
5010
+ ],
5011
+ name: "RelationshipTypeSet",
5012
+ type: "event"
5013
+ },
5014
+ {
5015
+ anonymous: false,
5016
+ inputs: [
5017
+ {
5018
+ indexed: true,
5019
+ internalType: "string",
5020
+ name: "relType",
5021
+ type: "string"
5022
+ },
5023
+ {
5024
+ indexed: false,
5025
+ internalType: "address",
5026
+ name: "ipOrg",
5027
+ type: "address"
5028
+ }
5029
+ ],
5030
+ name: "RelationshipTypeUnset",
5031
+ type: "event"
5032
+ },
5033
+ {
5034
+ anonymous: false,
5035
+ inputs: [
5036
+ {
5037
+ indexed: true,
5038
+ internalType: "address",
5039
+ name: "sender",
5040
+ type: "address"
5041
+ }
5042
+ ],
5043
+ name: "RequestCompleted",
5044
+ type: "event"
5045
+ },
5046
+ {
5047
+ anonymous: false,
5048
+ inputs: [
5049
+ {
5050
+ indexed: true,
5051
+ internalType: "address",
5052
+ name: "sender",
5053
+ type: "address"
5054
+ }
5055
+ ],
5056
+ name: "RequestPending",
5057
+ type: "event"
5058
+ },
5059
+ {
5060
+ inputs: [
5061
+ ],
5062
+ name: "INDEX_NOT_FOUND",
5063
+ outputs: [
5064
+ {
5065
+ internalType: "uint256",
5066
+ name: "",
5067
+ type: "uint256"
5068
+ }
5069
+ ],
5070
+ stateMutability: "view",
5071
+ type: "function"
5072
+ },
5073
+ {
5074
+ inputs: [
5075
+ ],
5076
+ name: "IPA_REGISTRY",
5077
+ outputs: [
5078
+ {
5079
+ internalType: "contract IPAssetRegistry",
5080
+ name: "",
5081
+ type: "address"
5082
+ }
5083
+ ],
5084
+ stateMutability: "view",
5085
+ type: "function"
5086
+ },
5087
+ {
5088
+ inputs: [
5089
+ ],
5090
+ name: "IP_ORG_CONTROLLER",
5091
+ outputs: [
5092
+ {
5093
+ internalType: "contract IPOrgController",
5094
+ name: "",
5095
+ type: "address"
5096
+ }
5097
+ ],
5098
+ stateMutability: "view",
5099
+ type: "function"
5100
+ },
5101
+ {
5102
+ inputs: [
5103
+ ],
5104
+ name: "LICENSE_REGISTRY",
5105
+ outputs: [
5106
+ {
5107
+ internalType: "contract LicenseRegistry",
5108
+ name: "",
5109
+ type: "address"
5110
+ }
5111
+ ],
5112
+ stateMutability: "view",
5113
+ type: "function"
5114
+ },
5115
+ {
5116
+ inputs: [
5117
+ ],
5118
+ name: "MAX_HOOKS",
5119
+ outputs: [
5120
+ {
5121
+ internalType: "uint256",
5122
+ name: "",
5123
+ type: "uint256"
5124
+ }
5125
+ ],
5126
+ stateMutability: "view",
5127
+ type: "function"
5128
+ },
5129
+ {
5130
+ inputs: [
5131
+ ],
5132
+ name: "MODULE_REGISTRY",
5133
+ outputs: [
5134
+ {
5135
+ internalType: "contract ModuleRegistry",
5136
+ name: "",
5137
+ type: "address"
5138
+ }
5139
+ ],
5140
+ stateMutability: "view",
5141
+ type: "function"
5142
+ },
5143
+ {
5144
+ inputs: [
5145
+ {
5146
+ internalType: "enum HookRegistry.HookType",
5147
+ name: "hookType_",
5148
+ type: "uint8"
5149
+ },
5150
+ {
5151
+ internalType: "contract IIPOrg",
5152
+ name: "ipOrg_",
5153
+ type: "address"
5154
+ },
5155
+ {
5156
+ internalType: "bytes32",
5157
+ name: "registryKey_",
5158
+ type: "bytes32"
5159
+ }
5160
+ ],
5161
+ name: "clearHooks",
5162
+ outputs: [
5163
+ ],
5164
+ stateMutability: "nonpayable",
5165
+ type: "function"
5166
+ },
5167
+ {
5168
+ inputs: [
5169
+ {
5170
+ internalType: "contract IIPOrg",
5171
+ name: "ipOrg_",
5172
+ type: "address"
5173
+ },
5174
+ {
5175
+ internalType: "address",
5176
+ name: "caller_",
5177
+ type: "address"
5178
+ },
5179
+ {
5180
+ internalType: "bytes",
5181
+ name: "params_",
5182
+ type: "bytes"
5183
+ }
5184
+ ],
5185
+ name: "configure",
5186
+ outputs: [
5187
+ {
5188
+ internalType: "bytes",
5189
+ name: "",
5190
+ type: "bytes"
5191
+ }
5192
+ ],
5193
+ stateMutability: "nonpayable",
5194
+ type: "function"
5195
+ },
5196
+ {
5197
+ inputs: [
5198
+ {
5199
+ internalType: "contract IIPOrg",
5200
+ name: "ipOrg_",
5201
+ type: "address"
5202
+ },
5203
+ {
5204
+ internalType: "address",
5205
+ name: "caller_",
5206
+ type: "address"
5207
+ },
5208
+ {
5209
+ internalType: "bytes",
5210
+ name: "moduleParams_",
5211
+ type: "bytes"
5212
+ },
5213
+ {
5214
+ internalType: "bytes[]",
5215
+ name: "preHookParams_",
5216
+ type: "bytes[]"
5217
+ },
5218
+ {
5219
+ internalType: "bytes[]",
5220
+ name: "postHookParams_",
5221
+ type: "bytes[]"
5222
+ }
5223
+ ],
5224
+ name: "execute",
5225
+ outputs: [
5226
+ {
5227
+ internalType: "bytes",
5228
+ name: "result",
5229
+ type: "bytes"
5230
+ }
5231
+ ],
5232
+ stateMutability: "nonpayable",
5233
+ type: "function"
5234
+ },
5235
+ {
5236
+ inputs: [
5237
+ {
5238
+ internalType: "uint256",
5239
+ name: "relationshipId_",
5240
+ type: "uint256"
5241
+ }
5242
+ ],
5243
+ name: "getRelationship",
5244
+ outputs: [
5245
+ {
5246
+ components: [
5247
+ {
5248
+ internalType: "string",
5249
+ name: "relType",
5250
+ type: "string"
5251
+ },
5252
+ {
5253
+ internalType: "address",
5254
+ name: "srcAddress",
5255
+ type: "address"
5256
+ },
5257
+ {
5258
+ internalType: "address",
5259
+ name: "dstAddress",
5260
+ type: "address"
5261
+ },
5262
+ {
5263
+ internalType: "uint256",
5264
+ name: "srcId",
5265
+ type: "uint256"
5266
+ },
5267
+ {
5268
+ internalType: "uint256",
5269
+ name: "dstId",
5270
+ type: "uint256"
5271
+ }
5272
+ ],
5273
+ internalType: "struct LibRelationship.Relationship",
5274
+ name: "",
5275
+ type: "tuple"
5276
+ }
5277
+ ],
5278
+ stateMutability: "view",
5279
+ type: "function"
5280
+ },
5281
+ {
5282
+ inputs: [
5283
+ {
5284
+ components: [
5285
+ {
5286
+ internalType: "string",
5287
+ name: "relType",
5288
+ type: "string"
5289
+ },
5290
+ {
5291
+ internalType: "address",
5292
+ name: "srcAddress",
5293
+ type: "address"
5294
+ },
5295
+ {
5296
+ internalType: "address",
5297
+ name: "dstAddress",
5298
+ type: "address"
5299
+ },
5300
+ {
5301
+ internalType: "uint256",
5302
+ name: "srcId",
5303
+ type: "uint256"
5304
+ },
5305
+ {
5306
+ internalType: "uint256",
5307
+ name: "dstId",
5308
+ type: "uint256"
5309
+ }
5310
+ ],
5311
+ internalType: "struct LibRelationship.Relationship",
5312
+ name: "rel_",
5313
+ type: "tuple"
5314
+ }
5315
+ ],
5316
+ name: "getRelationshipId",
5317
+ outputs: [
5318
+ {
5319
+ internalType: "uint256",
5320
+ name: "",
5321
+ type: "uint256"
5322
+ }
5323
+ ],
5324
+ stateMutability: "view",
5325
+ type: "function"
5326
+ },
5327
+ {
5328
+ inputs: [
5329
+ {
5330
+ internalType: "address",
5331
+ name: "ipOrg_",
5332
+ type: "address"
5333
+ },
5334
+ {
5335
+ internalType: "string",
5336
+ name: "relType_",
5337
+ type: "string"
5338
+ }
5339
+ ],
5340
+ name: "getRelationshipType",
5341
+ outputs: [
5342
+ {
5343
+ components: [
5344
+ {
5345
+ internalType: "address",
5346
+ name: "src",
5347
+ type: "address"
5348
+ },
5349
+ {
5350
+ internalType: "uint256",
5351
+ name: "srcSubtypesMask",
5352
+ type: "uint256"
5353
+ },
5354
+ {
5355
+ internalType: "address",
5356
+ name: "dst",
5357
+ type: "address"
5358
+ },
5359
+ {
5360
+ internalType: "uint256",
5361
+ name: "dstSubtypesMask",
5362
+ type: "uint256"
5363
+ }
5364
+ ],
5365
+ internalType: "struct LibRelationship.RelationshipType",
5366
+ name: "result",
5367
+ type: "tuple"
5368
+ }
5369
+ ],
5370
+ stateMutability: "view",
5371
+ type: "function"
5372
+ },
5373
+ {
5374
+ inputs: [
5375
+ {
5376
+ internalType: "enum HookRegistry.HookType",
5377
+ name: "hookType_",
5378
+ type: "uint8"
5379
+ },
5380
+ {
5381
+ internalType: "bytes32",
5382
+ name: "registryKey_",
5383
+ type: "bytes32"
5384
+ },
5385
+ {
5386
+ internalType: "uint256",
5387
+ name: "index_",
5388
+ type: "uint256"
5389
+ }
5390
+ ],
5391
+ name: "hookAt",
5392
+ outputs: [
5393
+ {
5394
+ internalType: "address",
5395
+ name: "",
5396
+ type: "address"
5397
+ }
5398
+ ],
5399
+ stateMutability: "view",
5400
+ type: "function"
5401
+ },
5402
+ {
5403
+ inputs: [
5404
+ {
5405
+ internalType: "enum HookRegistry.HookType",
5406
+ name: "hookType_",
5407
+ type: "uint8"
5408
+ },
5409
+ {
5410
+ internalType: "bytes32",
5411
+ name: "registryKey_",
5412
+ type: "bytes32"
5413
+ },
5414
+ {
5415
+ internalType: "uint256",
5416
+ name: "index_",
5417
+ type: "uint256"
5418
+ }
5419
+ ],
5420
+ name: "hookConfigAt",
5421
+ outputs: [
5422
+ {
5423
+ internalType: "bytes",
5424
+ name: "",
5425
+ type: "bytes"
5426
+ }
5427
+ ],
5428
+ stateMutability: "view",
5429
+ type: "function"
5430
+ },
5431
+ {
5432
+ inputs: [
5433
+ {
5434
+ internalType: "enum HookRegistry.HookType",
5435
+ name: "hookType_",
5436
+ type: "uint8"
5437
+ },
5438
+ {
5439
+ internalType: "bytes32",
5440
+ name: "registryKey_",
5441
+ type: "bytes32"
5442
+ },
5443
+ {
5444
+ internalType: "address",
5445
+ name: "hook_",
5446
+ type: "address"
5447
+ }
5448
+ ],
5449
+ name: "hookIndex",
5450
+ outputs: [
5451
+ {
5452
+ internalType: "uint256",
5453
+ name: "",
5454
+ type: "uint256"
5455
+ }
5456
+ ],
5457
+ stateMutability: "view",
5458
+ type: "function"
5459
+ },
5460
+ {
5461
+ inputs: [
5462
+ {
5463
+ internalType: "enum HookRegistry.HookType",
5464
+ name: "hookType_",
5465
+ type: "uint8"
5466
+ },
5467
+ {
5468
+ internalType: "bytes32",
5469
+ name: "registryKey_",
5470
+ type: "bytes32"
5471
+ },
5472
+ {
5473
+ internalType: "address",
5474
+ name: "hook_",
5475
+ type: "address"
5476
+ }
5477
+ ],
5478
+ name: "isRegistered",
5479
+ outputs: [
5480
+ {
5481
+ internalType: "bool",
5482
+ name: "",
5483
+ type: "bool"
5484
+ }
5485
+ ],
5486
+ stateMutability: "view",
5487
+ type: "function"
5488
+ },
5489
+ {
5490
+ inputs: [
5491
+ {
5492
+ internalType: "enum HookRegistry.HookType",
5493
+ name: "hType_",
5494
+ type: "uint8"
5495
+ },
5496
+ {
5497
+ internalType: "contract IIPOrg",
5498
+ name: "ipOrg_",
5499
+ type: "address"
5500
+ },
5501
+ {
5502
+ internalType: "string",
5503
+ name: "relType_",
5504
+ type: "string"
5505
+ },
5506
+ {
5507
+ internalType: "address[]",
5508
+ name: "hooks_",
5509
+ type: "address[]"
5510
+ },
5511
+ {
5512
+ internalType: "bytes[]",
5513
+ name: "hooksConfig_",
5514
+ type: "bytes[]"
5515
+ }
5516
+ ],
5517
+ name: "registerHooks",
5518
+ outputs: [
5519
+ ],
5520
+ stateMutability: "nonpayable",
5521
+ type: "function"
5522
+ },
5523
+ {
5524
+ inputs: [
5525
+ {
5526
+ internalType: "enum HookRegistry.HookType",
5527
+ name: "hookType_",
5528
+ type: "uint8"
5529
+ },
5530
+ {
5531
+ internalType: "contract IIPOrg",
5532
+ name: "ipOrg_",
5533
+ type: "address"
5534
+ },
5535
+ {
5536
+ internalType: "bytes32",
5537
+ name: "registryKey_",
5538
+ type: "bytes32"
5539
+ },
5540
+ {
5541
+ internalType: "address[]",
5542
+ name: "hooks_",
5543
+ type: "address[]"
5544
+ },
5545
+ {
5546
+ internalType: "bytes[]",
5547
+ name: "hooksConfig_",
5548
+ type: "bytes[]"
5549
+ }
5550
+ ],
5551
+ name: "registerHooks",
5552
+ outputs: [
5553
+ ],
5554
+ stateMutability: "nonpayable",
5555
+ type: "function"
5556
+ },
5557
+ {
5558
+ inputs: [
5559
+ {
5560
+ components: [
5561
+ {
5562
+ internalType: "string",
5563
+ name: "relType",
5564
+ type: "string"
5565
+ },
5566
+ {
5567
+ internalType: "address",
5568
+ name: "srcAddress",
5569
+ type: "address"
5570
+ },
5571
+ {
5572
+ internalType: "address",
5573
+ name: "dstAddress",
5574
+ type: "address"
5575
+ },
5576
+ {
5577
+ internalType: "uint256",
5578
+ name: "srcId",
5579
+ type: "uint256"
5580
+ },
5581
+ {
5582
+ internalType: "uint256",
5583
+ name: "dstId",
5584
+ type: "uint256"
5585
+ }
5586
+ ],
5587
+ internalType: "struct LibRelationship.Relationship",
5588
+ name: "rel_",
5589
+ type: "tuple"
5590
+ }
5591
+ ],
5592
+ name: "relationshipExists",
5593
+ outputs: [
5594
+ {
5595
+ internalType: "bool",
5596
+ name: "",
5597
+ type: "bool"
5598
+ }
5599
+ ],
5600
+ stateMutability: "view",
5601
+ type: "function"
5602
+ },
5603
+ {
5604
+ inputs: [
5605
+ {
5606
+ internalType: "address",
5607
+ name: "accessControl_",
5608
+ type: "address"
5609
+ }
5610
+ ],
5611
+ name: "setAccessControl",
5612
+ outputs: [
5613
+ ],
5614
+ stateMutability: "nonpayable",
5615
+ type: "function"
5616
+ },
5617
+ {
5618
+ inputs: [
5619
+ {
5620
+ internalType: "enum HookRegistry.HookType",
5621
+ name: "hookType_",
5622
+ type: "uint8"
5623
+ },
5624
+ {
5625
+ internalType: "bytes32",
5626
+ name: "registryKey_",
5627
+ type: "bytes32"
5628
+ }
5629
+ ],
5630
+ name: "totalHooks",
5631
+ outputs: [
5632
+ {
5633
+ internalType: "uint256",
5634
+ name: "",
5635
+ type: "uint256"
5636
+ }
5637
+ ],
5638
+ stateMutability: "view",
5639
+ type: "function"
5640
+ },
5641
+ {
5642
+ inputs: [
5643
+ {
5644
+ internalType: "enum HookRegistry.HookType",
5645
+ name: "hookType_",
5646
+ type: "uint8"
5647
+ },
5648
+ {
5649
+ internalType: "bytes32",
5650
+ name: "registryKey_",
5651
+ type: "bytes32"
5652
+ }
5653
+ ],
5654
+ name: "totalHooksConfig",
5655
+ outputs: [
5656
+ {
5657
+ internalType: "uint256",
5658
+ name: "",
5659
+ type: "uint256"
5660
+ }
5661
+ ],
5662
+ stateMutability: "view",
5663
+ type: "function"
5664
+ }
5665
+ ];
5666
+
5667
+ var relationshipModuleAbi = relationshipModuleJson;
5668
+ var relationshipModuleReadable = abitype.formatAbi(relationshipModuleAbi);
2200
5669
  var relationshipModuleConfig = {
2201
- abi: relationshipModuleAbi,
5670
+ abi: viem.parseAbi(relationshipModuleReadable),
2202
5671
  address: viem.getAddress(process.env.RELATIONSHIP_MODULE_CONTRACT || process.env.NEXT_PUBLIC_RELATIONSHIP_MODULE_CONTRACT || "")
2203
5672
  };
2204
5673
 
@@ -2226,7 +5695,7 @@ var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
2226
5695
  key: "register",
2227
5696
  value: function () {
2228
5697
  var _register = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
2229
- var _request$txOptions, _yield$this$rpcClient, call, txHash, _targetLog$args, targetLog;
5698
+ var _request$txOptions, _yield$this$rpcClient, call, txHash, targetLog;
2230
5699
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2231
5700
  while (1) switch (_context.prev = _context.next) {
2232
5701
  case 0:
@@ -2262,7 +5731,7 @@ var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
2262
5731
  targetLog = _context.sent;
2263
5732
  return _context.abrupt("return", {
2264
5733
  txHash: txHash,
2265
- relationshipId: targetLog === null || targetLog === void 0 || (_targetLog$args = targetLog.args) === null || _targetLog$args === void 0 || (_targetLog$args = _targetLog$args.relationshipId) === null || _targetLog$args === void 0 ? void 0 : _targetLog$args.toString()
5734
+ relationshipId: targetLog === null || targetLog === void 0 ? void 0 : targetLog.args["relationshipId"]
2266
5735
  });
2267
5736
  case 15:
2268
5737
  return _context.abrupt("return", {
@@ -2286,22 +5755,129 @@ var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
2286
5755
  }
2287
5756
  return register;
2288
5757
  }()
5758
+ }]);
5759
+ return RelationshipClient;
5760
+ }(RelationshipReadOnlyClient);
5761
+
5762
+ /**
5763
+ * Client for managing RelationshipTypes.
5764
+ */
5765
+ var RelationshipTypeReadOnlyClient = /*#__PURE__*/function () {
5766
+ function RelationshipTypeReadOnlyClient(httpClient, rpcClient) {
5767
+ _classCallCheck(this, RelationshipTypeReadOnlyClient);
5768
+ this.httpClient = httpClient;
5769
+ this.rpcClient = rpcClient;
5770
+ }
5771
+
5772
+ /**
5773
+ * Get a RelationshipType by ipOrgId or relType.
5774
+ *
5775
+ * @param ipOrgId - The ID of the IP Org.
5776
+ * @param relType - Relationship Type.
5777
+ * @returns A Promise that resolves to the GetRelationshipTypeResponse.
5778
+ */
5779
+ _createClass(RelationshipTypeReadOnlyClient, [{
5780
+ key: "get",
5781
+ value: function () {
5782
+ var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
5783
+ var params, response;
5784
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5785
+ while (1) switch (_context.prev = _context.next) {
5786
+ case 0:
5787
+ _context.prev = 0;
5788
+ params = dictToQueryParams(request);
5789
+ _context.next = 4;
5790
+ return this.httpClient.get("/protocol/relationship-type?".concat(params));
5791
+ case 4:
5792
+ response = _context.sent;
5793
+ return _context.abrupt("return", response.data);
5794
+ case 8:
5795
+ _context.prev = 8;
5796
+ _context.t0 = _context["catch"](0);
5797
+ handleError(_context.t0, "Failed to get RelationshipType");
5798
+ case 11:
5799
+ case "end":
5800
+ return _context.stop();
5801
+ }
5802
+ }, _callee, this, [[0, 8]]);
5803
+ }));
5804
+ function get(_x) {
5805
+ return _get.apply(this, arguments);
5806
+ }
5807
+ return get;
5808
+ }()
2289
5809
  /**
2290
- * Register a relationship type on Story Protocol based on the specified input data.
5810
+ * List all RelationshipTypes.
2291
5811
  *
2292
- * @param request - the request object that contains all data needed to register a relationship type
2293
- * @returns the response object that contains results from the register relationship type action
5812
+ * @returns A Promise that resolves to the ListRelationshipTypesResponse.
2294
5813
  */
2295
5814
  }, {
2296
- key: "registerRelationshipType",
5815
+ key: "list",
2297
5816
  value: function () {
2298
- var _registerRelationshipType = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
2299
- var _request$txOptions2, _yield$this$rpcClient2, call, txHash;
5817
+ var _list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request) {
5818
+ var response;
2300
5819
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2301
5820
  while (1) switch (_context2.prev = _context2.next) {
2302
5821
  case 0:
2303
5822
  _context2.prev = 0;
2304
5823
  _context2.next = 3;
5824
+ return this.httpClient.post("/protocol/relationship-type", request, {
5825
+ params: {
5826
+ ipOrgId: request === null || request === void 0 ? void 0 : request.ipOrgId,
5827
+ options: request === null || request === void 0 ? void 0 : request.options
5828
+ }
5829
+ });
5830
+ case 3:
5831
+ response = _context2.sent;
5832
+ return _context2.abrupt("return", response.data);
5833
+ case 7:
5834
+ _context2.prev = 7;
5835
+ _context2.t0 = _context2["catch"](0);
5836
+ handleError(_context2.t0, "Failed to list RelationshipTypes");
5837
+ case 10:
5838
+ case "end":
5839
+ return _context2.stop();
5840
+ }
5841
+ }, _callee2, this, [[0, 7]]);
5842
+ }));
5843
+ function list(_x2) {
5844
+ return _list.apply(this, arguments);
5845
+ }
5846
+ return list;
5847
+ }()
5848
+ }]);
5849
+ return RelationshipTypeReadOnlyClient;
5850
+ }();
5851
+
5852
+ /**
5853
+ * Client for managing relationships.
5854
+ */
5855
+ var RelationshipTypeClient = /*#__PURE__*/function (_RelationshipTypeRead) {
5856
+ _inherits(RelationshipTypeClient, _RelationshipTypeRead);
5857
+ var _super = _createSuper(RelationshipTypeClient);
5858
+ function RelationshipTypeClient(httpClient, rpcClient, wallet) {
5859
+ var _this;
5860
+ _classCallCheck(this, RelationshipTypeClient);
5861
+ _this = _super.call(this, httpClient, rpcClient);
5862
+ _this.wallet = wallet;
5863
+ return _this;
5864
+ }
5865
+ /**
5866
+ * Register a relationship type on Story Protocol based on the specified input data.
5867
+ *
5868
+ * @param request - the request object that contains all data needed to register a relationship type
5869
+ * @returns the response object that contains results from the register relationship type action
5870
+ */
5871
+ _createClass(RelationshipTypeClient, [{
5872
+ key: "register",
5873
+ value: function () {
5874
+ var _register = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
5875
+ var _request$txOptions, _yield$this$rpcClient, call, txHash;
5876
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5877
+ while (1) switch (_context.prev = _context.next) {
5878
+ case 0:
5879
+ _context.prev = 0;
5880
+ _context.next = 3;
2305
5881
  return this.rpcClient.simulateContract(_objectSpread2(_objectSpread2({}, storyProtocolConfig), {}, {
2306
5882
  functionName: "addRelationshipType",
2307
5883
  args: [{
@@ -2317,50 +5893,50 @@ var RelationshipClient = /*#__PURE__*/function (_RelationshipReadOnly) {
2317
5893
  account: this.wallet.account
2318
5894
  }));
2319
5895
  case 3:
2320
- _yield$this$rpcClient2 = _context2.sent;
2321
- call = _yield$this$rpcClient2.request;
2322
- _context2.next = 7;
5896
+ _yield$this$rpcClient = _context.sent;
5897
+ call = _yield$this$rpcClient.request;
5898
+ _context.next = 7;
2323
5899
  return this.wallet.writeContract(call);
2324
5900
  case 7:
2325
- txHash = _context2.sent;
2326
- if (!((_request$txOptions2 = request.txOptions) !== null && _request$txOptions2 !== void 0 && _request$txOptions2.waitForTransaction)) {
2327
- _context2.next = 14;
5901
+ txHash = _context.sent;
5902
+ if (!((_request$txOptions = request.txOptions) !== null && _request$txOptions !== void 0 && _request$txOptions.waitForTransaction)) {
5903
+ _context.next = 14;
2328
5904
  break;
2329
5905
  }
2330
- _context2.next = 11;
5906
+ _context.next = 11;
2331
5907
  return waitTxAndFilterLog(this.rpcClient, txHash, _objectSpread2(_objectSpread2({}, relationshipModuleConfig), {}, {
2332
5908
  eventName: "RelationshipTypeSet"
2333
5909
  }));
2334
5910
  case 11:
2335
- return _context2.abrupt("return", {
5911
+ return _context.abrupt("return", {
2336
5912
  txHash: txHash,
2337
5913
  success: true
2338
5914
  });
2339
5915
  case 14:
2340
- return _context2.abrupt("return", {
5916
+ return _context.abrupt("return", {
2341
5917
  txHash: txHash
2342
5918
  });
2343
5919
  case 15:
2344
- _context2.next = 20;
5920
+ _context.next = 20;
2345
5921
  break;
2346
5922
  case 17:
2347
- _context2.prev = 17;
2348
- _context2.t0 = _context2["catch"](0);
2349
- handleError(_context2.t0, "Failed to register relationship");
5923
+ _context.prev = 17;
5924
+ _context.t0 = _context["catch"](0);
5925
+ handleError(_context.t0, "Failed to register relationship");
2350
5926
  case 20:
2351
5927
  case "end":
2352
- return _context2.stop();
5928
+ return _context.stop();
2353
5929
  }
2354
- }, _callee2, this, [[0, 17]]);
5930
+ }, _callee, this, [[0, 17]]);
2355
5931
  }));
2356
- function registerRelationshipType(_x2) {
2357
- return _registerRelationshipType.apply(this, arguments);
5932
+ function register(_x) {
5933
+ return _register.apply(this, arguments);
2358
5934
  }
2359
- return registerRelationshipType;
5935
+ return register;
2360
5936
  }()
2361
5937
  }]);
2362
- return RelationshipClient;
2363
- }(RelationshipReadOnlyClient);
5938
+ return RelationshipTypeClient;
5939
+ }(RelationshipTypeReadOnlyClient);
2364
5940
 
2365
5941
  if (typeof process !== "undefined") {
2366
5942
  dotenv__namespace.config();
@@ -2382,6 +5958,7 @@ var StoryClient = /*#__PURE__*/function () {
2382
5958
  _defineProperty(this, "_transaction", null);
2383
5959
  _defineProperty(this, "_ipAsset", null);
2384
5960
  _defineProperty(this, "_relationship", null);
5961
+ _defineProperty(this, "_relationshipType", null);
2385
5962
  _defineProperty(this, "_module", null);
2386
5963
  _defineProperty(this, "_hook", null);
2387
5964
  _defineProperty(this, "_platform", null);
@@ -2433,6 +6010,15 @@ var StoryClient = /*#__PURE__*/function () {
2433
6010
  this._relationship = new RelationshipClient(this.httpClient, this.rpcClient, this.wallet);
2434
6011
  }
2435
6012
  }
6013
+ }, {
6014
+ key: "initRelationshipType",
6015
+ value: function initRelationshipType() {
6016
+ if (this.isReadOnly) {
6017
+ this._relationshipType = new RelationshipTypeReadOnlyClient(this.httpClient, this.rpcClient);
6018
+ } else {
6019
+ this._relationshipType = new RelationshipTypeClient(this.httpClient, this.rpcClient, this.wallet);
6020
+ }
6021
+ }
2436
6022
  }, {
2437
6023
  key: "initIpAsset",
2438
6024
  value: function initIpAsset() {
@@ -2514,6 +6100,21 @@ var StoryClient = /*#__PURE__*/function () {
2514
6100
  return this._relationship;
2515
6101
  }
2516
6102
 
6103
+ /**
6104
+ * Getter for the relationship type client. The client is lazily created when
6105
+ * this method is called.
6106
+ *
6107
+ * @returns the RelationshipTypeClient instance
6108
+ */
6109
+ }, {
6110
+ key: "relationshipType",
6111
+ get: function get() {
6112
+ if (this._relationshipType === null) {
6113
+ this.initRelationshipType();
6114
+ }
6115
+ return this._relationshipType;
6116
+ }
6117
+
2517
6118
  /**
2518
6119
  * Getter for the IP Asset client. The client is lazily created when
2519
6120
  * this method is called.
@@ -2644,6 +6245,43 @@ var ResourceType = /*#__PURE__*/function (ResourceType) {
2644
6245
  return ResourceType;
2645
6246
  }({});
2646
6247
 
6248
+ /**
6249
+ * @public
6250
+ */
6251
+ var HookType = /*#__PURE__*/function (HookType) {
6252
+ HookType[HookType["PRE_ACTION"] = 0] = "PRE_ACTION";
6253
+ HookType[HookType["POST_ACTION"] = 1] = "POST_ACTION";
6254
+ return HookType;
6255
+ }({});
6256
+
6257
+ /**
6258
+ * @public
6259
+ */
6260
+ 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";
6266
+ return ActionType;
6267
+ }({});
6268
+
6269
+ var AddressZero = "0x0000000000000000000000000000000000000000";
6270
+
6271
+ exports.ActionType = ActionType;
6272
+ exports.AddressZero = AddressZero;
6273
+ exports.HookReadOnlyClient = HookReadOnlyClient;
6274
+ exports.HookType = HookType;
6275
+ exports.IPAssetClient = IPAssetClient;
6276
+ exports.IPAssetReadOnlyClient = IPAssetReadOnlyClient;
2647
6277
  exports.IPAssetType = IPAssetType;
6278
+ exports.IPOrgClient = IPOrgClient;
6279
+ exports.IPOrgReadOnlyClient = IPOrgReadOnlyClient;
6280
+ exports.LicenseClient = LicenseClient;
6281
+ exports.LicenseReadOnlyClient = LicenseReadOnlyClient;
6282
+ exports.ModuleReadOnlyClient = ModuleReadOnlyClient;
6283
+ exports.PlatformClient = PlatformClient;
6284
+ exports.RelationshipClient = RelationshipClient;
2648
6285
  exports.ResourceType = ResourceType;
2649
6286
  exports.StoryClient = StoryClient;
6287
+ exports.TransactionClient = TransactionClient;