@audius/sdk 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/.eslintrc +38 -0
  2. package/.prettierrc.js +1 -0
  3. package/.python-version +1 -0
  4. package/Dockerfile +15 -0
  5. package/README.md +3 -0
  6. package/babel.config.js +3 -0
  7. package/data-contracts/ABIs/AdminUpgradeabilityProxy.json +132 -0
  8. package/data-contracts/ABIs/BaseAdminUpgradeabilityProxy.json +113 -0
  9. package/data-contracts/ABIs/BaseUpgradeabilityProxy.json +22 -0
  10. package/data-contracts/ABIs/DiscoveryProviderFactory.json +189 -0
  11. package/data-contracts/ABIs/DiscoveryProviderFactoryInterface.json +61 -0
  12. package/data-contracts/ABIs/DiscoveryProviderStorage.json +205 -0
  13. package/data-contracts/ABIs/DiscoveryProviderStorageInterface.json +65 -0
  14. package/data-contracts/ABIs/ECDSA.json +4 -0
  15. package/data-contracts/ABIs/IPLDBlacklistFactory.json +168 -0
  16. package/data-contracts/ABIs/Initializable.json +4 -0
  17. package/data-contracts/ABIs/Migrations.json +67 -0
  18. package/data-contracts/ABIs/OpenZeppelinUpgradesAddress.json +4 -0
  19. package/data-contracts/ABIs/Ownable.json +79 -0
  20. package/data-contracts/ABIs/PlaylistFactory.json +669 -0
  21. package/data-contracts/ABIs/PlaylistFactoryInterface.json +42 -0
  22. package/data-contracts/ABIs/PlaylistStorage.json +250 -0
  23. package/data-contracts/ABIs/PlaylistStorageInterface.json +129 -0
  24. package/data-contracts/ABIs/Proxy.json +10 -0
  25. package/data-contracts/ABIs/Registry.json +240 -0
  26. package/data-contracts/ABIs/RegistryContract.json +102 -0
  27. package/data-contracts/ABIs/RegistryContractInterface.json +28 -0
  28. package/data-contracts/ABIs/RegistryInterface.json +66 -0
  29. package/data-contracts/ABIs/SigningLogic.json +43 -0
  30. package/data-contracts/ABIs/SigningLogicInitializable.json +46 -0
  31. package/data-contracts/ABIs/SocialFeatureFactory.json +460 -0
  32. package/data-contracts/ABIs/SocialFeatureStorage.json +225 -0
  33. package/data-contracts/ABIs/SocialFeatureStorageInterface.json +123 -0
  34. package/data-contracts/ABIs/TestContract.json +135 -0
  35. package/data-contracts/ABIs/TestContractInterface.json +19 -0
  36. package/data-contracts/ABIs/TestContractWithStorage.json +165 -0
  37. package/data-contracts/ABIs/TestContractWithStorageInterface.json +24 -0
  38. package/data-contracts/ABIs/TestStorage.json +144 -0
  39. package/data-contracts/ABIs/TestStorageInterface.json +42 -0
  40. package/data-contracts/ABIs/TestUserReplicaSetManager.json +432 -0
  41. package/data-contracts/ABIs/TrackFactory.json +391 -0
  42. package/data-contracts/ABIs/TrackFactoryInterface.json +73 -0
  43. package/data-contracts/ABIs/TrackStorage.json +223 -0
  44. package/data-contracts/ABIs/TrackStorageInterface.json +121 -0
  45. package/data-contracts/ABIs/UpgradeabilityProxy.json +37 -0
  46. package/data-contracts/ABIs/UserFactory.json +657 -0
  47. package/data-contracts/ABIs/UserFactoryInterface.json +65 -0
  48. package/data-contracts/ABIs/UserLibraryFactory.json +334 -0
  49. package/data-contracts/ABIs/UserReplicaSetManager.json +418 -0
  50. package/data-contracts/ABIs/UserStorage.json +233 -0
  51. package/data-contracts/ABIs/UserStorageInterface.json +93 -0
  52. package/data-contracts/signatureSchemas.ts +1236 -0
  53. package/dist/core.d.ts +446 -0
  54. package/dist/core.js +769 -0
  55. package/dist/core.js.map +1 -0
  56. package/dist/index.d.ts +689 -0
  57. package/dist/index.js +72850 -0
  58. package/dist/index.js.map +1 -0
  59. package/eth-contracts/ABIs/Address.json +4 -0
  60. package/eth-contracts/ABIs/AudiusAdminUpgradeabilityProxy.json +105 -0
  61. package/eth-contracts/ABIs/AudiusClaimDistributor.json +4968 -0
  62. package/eth-contracts/ABIs/AudiusToken.json +724 -0
  63. package/eth-contracts/ABIs/BaseUpgradeabilityProxy.json +23 -0
  64. package/eth-contracts/ABIs/Checkpointing.json +4 -0
  65. package/eth-contracts/ABIs/ClaimsManager.json +539 -0
  66. package/eth-contracts/ABIs/Context.json +11 -0
  67. package/eth-contracts/ABIs/DelegateManager.json +989 -0
  68. package/eth-contracts/ABIs/DelegateManagerV2.json +1049 -0
  69. package/eth-contracts/ABIs/DelegateManagerV2Bad.json +1049 -0
  70. package/eth-contracts/ABIs/ERC20.json +252 -0
  71. package/eth-contracts/ABIs/ERC20Burnable.json +287 -0
  72. package/eth-contracts/ABIs/ERC20Detailed.json +270 -0
  73. package/eth-contracts/ABIs/ERC20Mintable.json +364 -0
  74. package/eth-contracts/ABIs/ERC20Pausable.json +397 -0
  75. package/eth-contracts/ABIs/EthRewardsManager.json +174 -0
  76. package/eth-contracts/ABIs/Governance.json +938 -0
  77. package/eth-contracts/ABIs/GovernanceUpgraded.json +953 -0
  78. package/eth-contracts/ABIs/GovernanceV2.json +938 -0
  79. package/eth-contracts/ABIs/IERC20.json +200 -0
  80. package/eth-contracts/ABIs/Initializable.json +4 -0
  81. package/eth-contracts/ABIs/InitializableV2.json +14 -0
  82. package/eth-contracts/ABIs/Migrations.json +71 -0
  83. package/eth-contracts/ABIs/MinterRole.json +91 -0
  84. package/eth-contracts/ABIs/MockAccount.json +62 -0
  85. package/eth-contracts/ABIs/MockDelegateManager.json +55 -0
  86. package/eth-contracts/ABIs/MockStakingCaller.json +259 -0
  87. package/eth-contracts/ABIs/MockWormhole.json +106 -0
  88. package/eth-contracts/ABIs/OpenZeppelinUpgradesAddress.json +4 -0
  89. package/eth-contracts/ABIs/Ownable.json +93 -0
  90. package/eth-contracts/ABIs/Pausable.json +150 -0
  91. package/eth-contracts/ABIs/PauserRole.json +91 -0
  92. package/eth-contracts/ABIs/Proxy.json +10 -0
  93. package/eth-contracts/ABIs/Registry.json +288 -0
  94. package/eth-contracts/ABIs/Roles.json +4 -0
  95. package/eth-contracts/ABIs/SafeERC20.json +4 -0
  96. package/eth-contracts/ABIs/SafeMath.json +4 -0
  97. package/eth-contracts/ABIs/ServiceProviderFactory.json +1153 -0
  98. package/eth-contracts/ABIs/ServiceTypeManager.json +337 -0
  99. package/eth-contracts/ABIs/Staking.json +555 -0
  100. package/eth-contracts/ABIs/StakingUpgraded.json +570 -0
  101. package/eth-contracts/ABIs/TestContract.json +44 -0
  102. package/eth-contracts/ABIs/TrustedNotifierManager.json +265 -0
  103. package/eth-contracts/ABIs/Uint256Helpers.json +4 -0
  104. package/eth-contracts/ABIs/UpgradeabilityProxy.json +40 -0
  105. package/eth-contracts/ABIs/Wormhole.json +45 -0
  106. package/eth-contracts/ABIs/WormholeClient.json +155 -0
  107. package/examples/file.mp3 +0 -0
  108. package/examples/initAudiusLibs.js +86 -0
  109. package/examples/initializeVersions.js +95 -0
  110. package/examples/pic.jpg +0 -0
  111. package/initScripts/configureLocalDiscProv.js +167 -0
  112. package/initScripts/helpers/claim.js +43 -0
  113. package/initScripts/helpers/distributeTokens.js +24 -0
  114. package/initScripts/helpers/spRegistration.js +138 -0
  115. package/initScripts/helpers/utils.js +34 -0
  116. package/initScripts/helpers/version.js +93 -0
  117. package/initScripts/local.js +617 -0
  118. package/initScripts/mainnet.js +131 -0
  119. package/initScripts/manageProdRelayerWallets.js +191 -0
  120. package/package.json +125 -0
  121. package/rollup.config.js +164 -0
  122. package/scripts/AudiusClaimDistributor.json +4968 -0
  123. package/scripts/Wormhole.json +155 -0
  124. package/scripts/addCIDToIpldBlacklist.js +124 -0
  125. package/scripts/circleci-test.sh +53 -0
  126. package/scripts/communityRewards/transferCommunityRewardsToSolana.js +222 -0
  127. package/scripts/ipfs.sh +58 -0
  128. package/scripts/migrate_contracts.sh +25 -0
  129. package/scripts/reset.sh +65 -0
  130. package/scripts/test.sh +77 -0
  131. package/src/api/account.js +670 -0
  132. package/src/api/base.js +122 -0
  133. package/src/api/file.js +168 -0
  134. package/src/api/playlist.js +328 -0
  135. package/src/api/rewards.d.ts +4 -0
  136. package/src/api/rewards.js +682 -0
  137. package/src/api/serviceProvider.js +154 -0
  138. package/src/api/track.js +604 -0
  139. package/src/api/user.js +888 -0
  140. package/src/api/user.test.js +172 -0
  141. package/src/constants.ts +7 -0
  142. package/src/core.ts +3 -0
  143. package/src/index.js +6 -0
  144. package/src/libs.d.ts +3 -0
  145. package/src/libs.js +619 -0
  146. package/src/sanityChecks/addSecondaries.js +40 -0
  147. package/src/sanityChecks/assignReplicaSetIfNecessary.js +10 -0
  148. package/src/sanityChecks/index.d.ts +9 -0
  149. package/src/sanityChecks/index.js +31 -0
  150. package/src/sanityChecks/isCreator.js +73 -0
  151. package/src/sanityChecks/needsRecoveryEmail.js +20 -0
  152. package/src/sanityChecks/rolloverNodes.js +74 -0
  153. package/src/sanityChecks/sanitizeNodes.js +24 -0
  154. package/src/sanityChecks/syncNodes.js +28 -0
  155. package/src/sdk/constants.ts +10 -0
  156. package/src/sdk/index.ts +1 -0
  157. package/src/sdk/oauth/Oauth.ts +265 -0
  158. package/src/sdk/oauth/index.ts +1 -0
  159. package/src/sdk/sdk.ts +102 -0
  160. package/src/service-selection/ServiceSelection.test.ts +320 -0
  161. package/src/service-selection/ServiceSelection.ts +460 -0
  162. package/src/service-selection/constants.ts +14 -0
  163. package/src/service-selection/index.ts +1 -0
  164. package/src/services/ABIDecoder/AudiusABIDecoder.ts +71 -0
  165. package/src/services/ABIDecoder/index.ts +1 -0
  166. package/src/services/comstock/Comstock.ts +39 -0
  167. package/src/services/comstock/index.ts +1 -0
  168. package/src/services/contracts/ContractClient.ts +227 -0
  169. package/src/services/contracts/GovernedContractClient.ts +53 -0
  170. package/src/services/contracts/ProviderSelection.ts +42 -0
  171. package/src/services/creatorNode/CreatorNode.ts +1065 -0
  172. package/src/services/creatorNode/CreatorNodeSelection.test.ts +997 -0
  173. package/src/services/creatorNode/CreatorNodeSelection.ts +488 -0
  174. package/src/services/creatorNode/constants.ts +10 -0
  175. package/src/services/creatorNode/index.ts +2 -0
  176. package/src/services/dataContracts/AudiusContracts.ts +234 -0
  177. package/src/services/dataContracts/IPLDBlacklistFactoryClient.ts +73 -0
  178. package/src/services/dataContracts/PlaylistFactoryClient.ts +370 -0
  179. package/src/services/dataContracts/RegistryClient.ts +95 -0
  180. package/src/services/dataContracts/SocialFeatureFactoryClient.ts +196 -0
  181. package/src/services/dataContracts/TrackFactoryClient.ts +131 -0
  182. package/src/services/dataContracts/UserFactoryClient.ts +351 -0
  183. package/src/services/dataContracts/UserLibraryFactoryClient.ts +115 -0
  184. package/src/services/dataContracts/UserReplicaSetManagerClient.ts +206 -0
  185. package/src/services/dataContracts/index.ts +1 -0
  186. package/src/services/discoveryProvider/DiscoveryProvider.ts +1168 -0
  187. package/src/services/discoveryProvider/DiscoveryProviderSelection.test.ts +536 -0
  188. package/src/services/discoveryProvider/DiscoveryProviderSelection.ts +383 -0
  189. package/src/services/discoveryProvider/constants.ts +13 -0
  190. package/src/services/discoveryProvider/index.ts +1 -0
  191. package/src/services/discoveryProvider/requests.ts +629 -0
  192. package/src/services/ethContracts/AudiusTokenClient.ts +163 -0
  193. package/src/services/ethContracts/ClaimDistributionClient.ts +45 -0
  194. package/src/services/ethContracts/ClaimsManagerClient.ts +102 -0
  195. package/src/services/ethContracts/DelegateManagerClient.ts +480 -0
  196. package/src/services/ethContracts/EthContracts.ts +359 -0
  197. package/src/services/ethContracts/EthRewardsManagerClient.ts +33 -0
  198. package/src/services/ethContracts/GovernanceClient.ts +451 -0
  199. package/src/services/ethContracts/RegistryClient.ts +33 -0
  200. package/src/services/ethContracts/ServiceProviderFactoryClient.ts +691 -0
  201. package/src/services/ethContracts/ServiceTypeManagerClient.ts +112 -0
  202. package/src/services/ethContracts/StakingProxyClient.ts +97 -0
  203. package/src/services/ethContracts/TrustedNotifierManagerClient.ts +101 -0
  204. package/src/services/ethContracts/WormholeClient.ts +97 -0
  205. package/src/services/ethContracts/index.ts +1 -0
  206. package/src/services/ethWeb3Manager/EthWeb3Manager.ts +239 -0
  207. package/src/services/ethWeb3Manager/index.ts +1 -0
  208. package/src/services/hedgehog/Hedgehog.ts +96 -0
  209. package/src/services/hedgehog/index.ts +1 -0
  210. package/src/services/identity/IdentityService.ts +551 -0
  211. package/src/services/identity/index.ts +1 -0
  212. package/src/services/identity/requests.ts +65 -0
  213. package/src/services/schemaValidator/SchemaValidator.ts +105 -0
  214. package/src/services/schemaValidator/index.ts +1 -0
  215. package/src/services/schemaValidator/schemas/trackSchema.json +267 -0
  216. package/src/services/schemaValidator/schemas/userSchema.json +230 -0
  217. package/src/services/solanaAudiusData/errors.ts +20 -0
  218. package/src/services/solanaAudiusData/index.ts +1189 -0
  219. package/src/services/solanaWeb3Manager/errors.js +101 -0
  220. package/src/services/solanaWeb3Manager/index.d.ts +46 -0
  221. package/src/services/solanaWeb3Manager/index.js +655 -0
  222. package/src/services/solanaWeb3Manager/padBNToUint8Array.ts +7 -0
  223. package/src/services/solanaWeb3Manager/rewards.js +941 -0
  224. package/src/services/solanaWeb3Manager/rewardsAttester.ts +1093 -0
  225. package/src/services/solanaWeb3Manager/tokenAccount.js +149 -0
  226. package/src/services/solanaWeb3Manager/transactionHandler.js +345 -0
  227. package/src/services/solanaWeb3Manager/transfer.js +272 -0
  228. package/src/services/solanaWeb3Manager/userBank.js +160 -0
  229. package/src/services/solanaWeb3Manager/utils.d.ts +31 -0
  230. package/src/services/solanaWeb3Manager/utils.js +163 -0
  231. package/src/services/solanaWeb3Manager/wAudio.js +28 -0
  232. package/src/services/solanaWeb3Manager/wAudio.test.js +30 -0
  233. package/src/services/web3Manager/Web3Config.ts +14 -0
  234. package/src/services/web3Manager/Web3Manager.ts +360 -0
  235. package/src/services/web3Manager/XMLHttpRequest.ts +11 -0
  236. package/src/services/web3Manager/index.ts +2 -0
  237. package/src/services/wormhole/index.js +424 -0
  238. package/src/types.ts +8 -0
  239. package/src/userStateManager.ts +53 -0
  240. package/src/utils/apiSigning.ts +51 -0
  241. package/src/utils/captcha.ts +97 -0
  242. package/src/utils/estimateGas.ts +64 -0
  243. package/src/utils/fileHasher.ts +278 -0
  244. package/src/utils/importContractABI.d.ts +9 -0
  245. package/src/utils/importContractABI.js +19 -0
  246. package/src/utils/index.ts +11 -0
  247. package/src/utils/multiProvider.ts +72 -0
  248. package/src/utils/network.test.ts +127 -0
  249. package/src/utils/network.ts +308 -0
  250. package/src/utils/promiseFight.test.ts +87 -0
  251. package/src/utils/promiseFight.ts +36 -0
  252. package/src/utils/signatures.ts +139 -0
  253. package/src/utils/types.ts +34 -0
  254. package/src/utils/utils.test.ts +36 -0
  255. package/src/utils/utils.ts +235 -0
  256. package/src/utils/uuid.ts +14 -0
  257. package/src/web3.d.ts +9 -0
  258. package/src/web3.js +8 -0
  259. package/tests/assets/static_image.png +0 -0
  260. package/tests/assets/static_text.txt +1 -0
  261. package/tests/audiusTokenClientTest.js +37 -0
  262. package/tests/creatorNodeTest.js +19 -0
  263. package/tests/fileHasherTest.js +125 -0
  264. package/tests/governanceTest.js +382 -0
  265. package/tests/helpers.js +105 -0
  266. package/tests/index.js +14 -0
  267. package/tests/playlistClientTest.js +157 -0
  268. package/tests/providerSelectionTest.js +241 -0
  269. package/tests/registryClientTest.js +19 -0
  270. package/tests/rewardsAttesterTest.js +373 -0
  271. package/tests/serviceTypeManagerClientTest.js +33 -0
  272. package/tests/socialFeatureClientTest.js +79 -0
  273. package/tests/stakingTest.js +302 -0
  274. package/tests/trackClientTest.js +86 -0
  275. package/tests/userClientTest.js +121 -0
  276. package/tsconfig.json +10 -0
  277. package/types/@audius-hedgehog/index.d.ts +39 -0
  278. package/types/abi-decoder/index.d.ts +41 -0
@@ -0,0 +1,391 @@
1
+ {
2
+ "contractName": "TrackFactory",
3
+ "abi": [
4
+ {
5
+ "constant": false,
6
+ "inputs": [],
7
+ "name": "kill",
8
+ "outputs": [],
9
+ "payable": false,
10
+ "stateMutability": "nonpayable",
11
+ "type": "function"
12
+ },
13
+ {
14
+ "constant": false,
15
+ "inputs": [],
16
+ "name": "renounceOwnership",
17
+ "outputs": [],
18
+ "payable": false,
19
+ "stateMutability": "nonpayable",
20
+ "type": "function"
21
+ },
22
+ {
23
+ "constant": true,
24
+ "inputs": [],
25
+ "name": "owner",
26
+ "outputs": [
27
+ {
28
+ "name": "",
29
+ "type": "address"
30
+ }
31
+ ],
32
+ "payable": false,
33
+ "stateMutability": "view",
34
+ "type": "function"
35
+ },
36
+ {
37
+ "constant": true,
38
+ "inputs": [],
39
+ "name": "isOwner",
40
+ "outputs": [
41
+ {
42
+ "name": "",
43
+ "type": "bool"
44
+ }
45
+ ],
46
+ "payable": false,
47
+ "stateMutability": "view",
48
+ "type": "function"
49
+ },
50
+ {
51
+ "constant": false,
52
+ "inputs": [
53
+ {
54
+ "name": "_registryAddress",
55
+ "type": "address"
56
+ }
57
+ ],
58
+ "name": "setRegistry",
59
+ "outputs": [],
60
+ "payable": false,
61
+ "stateMutability": "nonpayable",
62
+ "type": "function"
63
+ },
64
+ {
65
+ "constant": false,
66
+ "inputs": [
67
+ {
68
+ "name": "newOwner",
69
+ "type": "address"
70
+ }
71
+ ],
72
+ "name": "transferOwnership",
73
+ "outputs": [],
74
+ "payable": false,
75
+ "stateMutability": "nonpayable",
76
+ "type": "function"
77
+ },
78
+ {
79
+ "constant": true,
80
+ "inputs": [
81
+ {
82
+ "name": "",
83
+ "type": "bytes32"
84
+ }
85
+ ],
86
+ "name": "usedSignatures",
87
+ "outputs": [
88
+ {
89
+ "name": "",
90
+ "type": "bool"
91
+ }
92
+ ],
93
+ "payable": false,
94
+ "stateMutability": "view",
95
+ "type": "function"
96
+ },
97
+ {
98
+ "inputs": [
99
+ {
100
+ "name": "_registryAddress",
101
+ "type": "address"
102
+ },
103
+ {
104
+ "name": "_trackStorageRegistryKey",
105
+ "type": "bytes32"
106
+ },
107
+ {
108
+ "name": "_userFactoryRegistryKey",
109
+ "type": "bytes32"
110
+ },
111
+ {
112
+ "name": "_networkId",
113
+ "type": "uint256"
114
+ }
115
+ ],
116
+ "payable": false,
117
+ "stateMutability": "nonpayable",
118
+ "type": "constructor"
119
+ },
120
+ {
121
+ "anonymous": false,
122
+ "inputs": [
123
+ {
124
+ "indexed": false,
125
+ "name": "_id",
126
+ "type": "uint256"
127
+ },
128
+ {
129
+ "indexed": false,
130
+ "name": "_trackOwnerId",
131
+ "type": "uint256"
132
+ },
133
+ {
134
+ "indexed": false,
135
+ "name": "_multihashDigest",
136
+ "type": "bytes32"
137
+ },
138
+ {
139
+ "indexed": false,
140
+ "name": "_multihashHashFn",
141
+ "type": "uint8"
142
+ },
143
+ {
144
+ "indexed": false,
145
+ "name": "_multihashSize",
146
+ "type": "uint8"
147
+ }
148
+ ],
149
+ "name": "NewTrack",
150
+ "type": "event"
151
+ },
152
+ {
153
+ "anonymous": false,
154
+ "inputs": [
155
+ {
156
+ "indexed": false,
157
+ "name": "_trackId",
158
+ "type": "uint256"
159
+ },
160
+ {
161
+ "indexed": false,
162
+ "name": "_trackOwnerId",
163
+ "type": "uint256"
164
+ },
165
+ {
166
+ "indexed": false,
167
+ "name": "_multihashDigest",
168
+ "type": "bytes32"
169
+ },
170
+ {
171
+ "indexed": false,
172
+ "name": "_multihashHashFn",
173
+ "type": "uint8"
174
+ },
175
+ {
176
+ "indexed": false,
177
+ "name": "_multihashSize",
178
+ "type": "uint8"
179
+ }
180
+ ],
181
+ "name": "UpdateTrack",
182
+ "type": "event"
183
+ },
184
+ {
185
+ "anonymous": false,
186
+ "inputs": [
187
+ {
188
+ "indexed": false,
189
+ "name": "_trackId",
190
+ "type": "uint256"
191
+ }
192
+ ],
193
+ "name": "TrackDeleted",
194
+ "type": "event"
195
+ },
196
+ {
197
+ "anonymous": false,
198
+ "inputs": [
199
+ {
200
+ "indexed": true,
201
+ "name": "previousOwner",
202
+ "type": "address"
203
+ },
204
+ {
205
+ "indexed": true,
206
+ "name": "newOwner",
207
+ "type": "address"
208
+ }
209
+ ],
210
+ "name": "OwnershipTransferred",
211
+ "type": "event"
212
+ },
213
+ {
214
+ "constant": true,
215
+ "inputs": [
216
+ {
217
+ "name": "_id",
218
+ "type": "uint256"
219
+ }
220
+ ],
221
+ "name": "trackExists",
222
+ "outputs": [
223
+ {
224
+ "name": "exists",
225
+ "type": "bool"
226
+ }
227
+ ],
228
+ "payable": false,
229
+ "stateMutability": "view",
230
+ "type": "function"
231
+ },
232
+ {
233
+ "constant": false,
234
+ "inputs": [
235
+ {
236
+ "name": "_trackOwnerId",
237
+ "type": "uint256"
238
+ },
239
+ {
240
+ "name": "_multihashDigest",
241
+ "type": "bytes32"
242
+ },
243
+ {
244
+ "name": "_multihashHashFn",
245
+ "type": "uint8"
246
+ },
247
+ {
248
+ "name": "_multihashSize",
249
+ "type": "uint8"
250
+ },
251
+ {
252
+ "name": "_nonce",
253
+ "type": "bytes32"
254
+ },
255
+ {
256
+ "name": "_subjectSig",
257
+ "type": "bytes"
258
+ }
259
+ ],
260
+ "name": "addTrack",
261
+ "outputs": [
262
+ {
263
+ "name": "",
264
+ "type": "uint256"
265
+ }
266
+ ],
267
+ "payable": false,
268
+ "stateMutability": "nonpayable",
269
+ "type": "function"
270
+ },
271
+ {
272
+ "constant": false,
273
+ "inputs": [
274
+ {
275
+ "name": "_trackId",
276
+ "type": "uint256"
277
+ },
278
+ {
279
+ "name": "_trackOwnerId",
280
+ "type": "uint256"
281
+ },
282
+ {
283
+ "name": "_multihashDigest",
284
+ "type": "bytes32"
285
+ },
286
+ {
287
+ "name": "_multihashHashFn",
288
+ "type": "uint8"
289
+ },
290
+ {
291
+ "name": "_multihashSize",
292
+ "type": "uint8"
293
+ },
294
+ {
295
+ "name": "_nonce",
296
+ "type": "bytes32"
297
+ },
298
+ {
299
+ "name": "_subjectSig",
300
+ "type": "bytes"
301
+ }
302
+ ],
303
+ "name": "updateTrack",
304
+ "outputs": [
305
+ {
306
+ "name": "",
307
+ "type": "bool"
308
+ }
309
+ ],
310
+ "payable": false,
311
+ "stateMutability": "nonpayable",
312
+ "type": "function"
313
+ },
314
+ {
315
+ "constant": false,
316
+ "inputs": [
317
+ {
318
+ "name": "_trackId",
319
+ "type": "uint256"
320
+ },
321
+ {
322
+ "name": "_nonce",
323
+ "type": "bytes32"
324
+ },
325
+ {
326
+ "name": "_subjectSig",
327
+ "type": "bytes"
328
+ }
329
+ ],
330
+ "name": "deleteTrack",
331
+ "outputs": [
332
+ {
333
+ "name": "status",
334
+ "type": "bool"
335
+ }
336
+ ],
337
+ "payable": false,
338
+ "stateMutability": "nonpayable",
339
+ "type": "function"
340
+ },
341
+ {
342
+ "constant": true,
343
+ "inputs": [
344
+ {
345
+ "name": "_caller",
346
+ "type": "address"
347
+ },
348
+ {
349
+ "name": "_trackId",
350
+ "type": "uint256"
351
+ }
352
+ ],
353
+ "name": "callerOwnsTrack",
354
+ "outputs": [],
355
+ "payable": false,
356
+ "stateMutability": "view",
357
+ "type": "function"
358
+ },
359
+ {
360
+ "constant": true,
361
+ "inputs": [
362
+ {
363
+ "name": "_id",
364
+ "type": "uint256"
365
+ }
366
+ ],
367
+ "name": "getTrack",
368
+ "outputs": [
369
+ {
370
+ "name": "trackOwnerId",
371
+ "type": "uint256"
372
+ },
373
+ {
374
+ "name": "multihashDigest",
375
+ "type": "bytes32"
376
+ },
377
+ {
378
+ "name": "multihashHashFn",
379
+ "type": "uint8"
380
+ },
381
+ {
382
+ "name": "multihashSize",
383
+ "type": "uint8"
384
+ }
385
+ ],
386
+ "payable": false,
387
+ "stateMutability": "view",
388
+ "type": "function"
389
+ }
390
+ ]
391
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "contractName": "TrackFactoryInterface",
3
+ "abi": [
4
+ {
5
+ "constant": true,
6
+ "inputs": [
7
+ {
8
+ "name": "_caller",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "name": "_trackId",
13
+ "type": "uint256"
14
+ }
15
+ ],
16
+ "name": "callerOwnsTrack",
17
+ "outputs": [],
18
+ "payable": false,
19
+ "stateMutability": "view",
20
+ "type": "function"
21
+ },
22
+ {
23
+ "constant": true,
24
+ "inputs": [
25
+ {
26
+ "name": "_id",
27
+ "type": "uint256"
28
+ }
29
+ ],
30
+ "name": "getTrack",
31
+ "outputs": [
32
+ {
33
+ "name": "trackOwnerId",
34
+ "type": "uint256"
35
+ },
36
+ {
37
+ "name": "multihashDigest",
38
+ "type": "bytes32"
39
+ },
40
+ {
41
+ "name": "multihashHashFn",
42
+ "type": "uint8"
43
+ },
44
+ {
45
+ "name": "multihashSize",
46
+ "type": "uint8"
47
+ }
48
+ ],
49
+ "payable": false,
50
+ "stateMutability": "view",
51
+ "type": "function"
52
+ },
53
+ {
54
+ "constant": true,
55
+ "inputs": [
56
+ {
57
+ "name": "_id",
58
+ "type": "uint256"
59
+ }
60
+ ],
61
+ "name": "trackExists",
62
+ "outputs": [
63
+ {
64
+ "name": "exists",
65
+ "type": "bool"
66
+ }
67
+ ],
68
+ "payable": false,
69
+ "stateMutability": "view",
70
+ "type": "function"
71
+ }
72
+ ]
73
+ }
@@ -0,0 +1,223 @@
1
+ {
2
+ "contractName": "TrackStorage",
3
+ "abi": [
4
+ {
5
+ "constant": false,
6
+ "inputs": [],
7
+ "name": "kill",
8
+ "outputs": [],
9
+ "payable": false,
10
+ "stateMutability": "nonpayable",
11
+ "type": "function"
12
+ },
13
+ {
14
+ "constant": false,
15
+ "inputs": [],
16
+ "name": "renounceOwnership",
17
+ "outputs": [],
18
+ "payable": false,
19
+ "stateMutability": "nonpayable",
20
+ "type": "function"
21
+ },
22
+ {
23
+ "constant": true,
24
+ "inputs": [],
25
+ "name": "owner",
26
+ "outputs": [
27
+ {
28
+ "name": "",
29
+ "type": "address"
30
+ }
31
+ ],
32
+ "payable": false,
33
+ "stateMutability": "view",
34
+ "type": "function"
35
+ },
36
+ {
37
+ "constant": true,
38
+ "inputs": [],
39
+ "name": "isOwner",
40
+ "outputs": [
41
+ {
42
+ "name": "",
43
+ "type": "bool"
44
+ }
45
+ ],
46
+ "payable": false,
47
+ "stateMutability": "view",
48
+ "type": "function"
49
+ },
50
+ {
51
+ "constant": false,
52
+ "inputs": [
53
+ {
54
+ "name": "_registryAddress",
55
+ "type": "address"
56
+ }
57
+ ],
58
+ "name": "setRegistry",
59
+ "outputs": [],
60
+ "payable": false,
61
+ "stateMutability": "nonpayable",
62
+ "type": "function"
63
+ },
64
+ {
65
+ "constant": false,
66
+ "inputs": [
67
+ {
68
+ "name": "newOwner",
69
+ "type": "address"
70
+ }
71
+ ],
72
+ "name": "transferOwnership",
73
+ "outputs": [],
74
+ "payable": false,
75
+ "stateMutability": "nonpayable",
76
+ "type": "function"
77
+ },
78
+ {
79
+ "inputs": [
80
+ {
81
+ "name": "_registryAddress",
82
+ "type": "address"
83
+ }
84
+ ],
85
+ "payable": false,
86
+ "stateMutability": "nonpayable",
87
+ "type": "constructor"
88
+ },
89
+ {
90
+ "anonymous": false,
91
+ "inputs": [
92
+ {
93
+ "indexed": true,
94
+ "name": "previousOwner",
95
+ "type": "address"
96
+ },
97
+ {
98
+ "indexed": true,
99
+ "name": "newOwner",
100
+ "type": "address"
101
+ }
102
+ ],
103
+ "name": "OwnershipTransferred",
104
+ "type": "event"
105
+ },
106
+ {
107
+ "constant": true,
108
+ "inputs": [
109
+ {
110
+ "name": "_trackId",
111
+ "type": "uint256"
112
+ }
113
+ ],
114
+ "name": "getTrack",
115
+ "outputs": [
116
+ {
117
+ "name": "trackOwnerId",
118
+ "type": "uint256"
119
+ },
120
+ {
121
+ "name": "multihashDigest",
122
+ "type": "bytes32"
123
+ },
124
+ {
125
+ "name": "multihashHashFn",
126
+ "type": "uint8"
127
+ },
128
+ {
129
+ "name": "multihashSize",
130
+ "type": "uint8"
131
+ }
132
+ ],
133
+ "payable": false,
134
+ "stateMutability": "view",
135
+ "type": "function"
136
+ },
137
+ {
138
+ "constant": false,
139
+ "inputs": [
140
+ {
141
+ "name": "_trackOwnerId",
142
+ "type": "uint256"
143
+ },
144
+ {
145
+ "name": "_multihashDigest",
146
+ "type": "bytes32"
147
+ },
148
+ {
149
+ "name": "_multihashHashFn",
150
+ "type": "uint8"
151
+ },
152
+ {
153
+ "name": "_multihashSize",
154
+ "type": "uint8"
155
+ }
156
+ ],
157
+ "name": "addTrack",
158
+ "outputs": [
159
+ {
160
+ "name": "newTrackId",
161
+ "type": "uint256"
162
+ }
163
+ ],
164
+ "payable": false,
165
+ "stateMutability": "nonpayable",
166
+ "type": "function"
167
+ },
168
+ {
169
+ "constant": false,
170
+ "inputs": [
171
+ {
172
+ "name": "_trackId",
173
+ "type": "uint256"
174
+ },
175
+ {
176
+ "name": "_trackOwnerId",
177
+ "type": "uint256"
178
+ },
179
+ {
180
+ "name": "_multihashDigest",
181
+ "type": "bytes32"
182
+ },
183
+ {
184
+ "name": "_multihashHashFn",
185
+ "type": "uint8"
186
+ },
187
+ {
188
+ "name": "_multihashSize",
189
+ "type": "uint8"
190
+ }
191
+ ],
192
+ "name": "updateTrack",
193
+ "outputs": [
194
+ {
195
+ "name": "updatePerformed",
196
+ "type": "bool"
197
+ }
198
+ ],
199
+ "payable": false,
200
+ "stateMutability": "nonpayable",
201
+ "type": "function"
202
+ },
203
+ {
204
+ "constant": true,
205
+ "inputs": [
206
+ {
207
+ "name": "_id",
208
+ "type": "uint256"
209
+ }
210
+ ],
211
+ "name": "trackExists",
212
+ "outputs": [
213
+ {
214
+ "name": "exists",
215
+ "type": "bool"
216
+ }
217
+ ],
218
+ "payable": false,
219
+ "stateMutability": "view",
220
+ "type": "function"
221
+ }
222
+ ]
223
+ }