@cheqd/studio 3.0.0-develop.1

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 (654) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +246 -0
  3. package/dist/app.d.ts +4 -0
  4. package/dist/app.d.ts.map +1 -0
  5. package/dist/app.js +180 -0
  6. package/dist/app.js.map +1 -0
  7. package/dist/controllers/admin/api-key.d.ts +153 -0
  8. package/dist/controllers/admin/api-key.d.ts.map +1 -0
  9. package/dist/controllers/admin/api-key.js +389 -0
  10. package/dist/controllers/admin/api-key.js.map +1 -0
  11. package/dist/controllers/admin/organisation.d.ts +72 -0
  12. package/dist/controllers/admin/organisation.d.ts.map +1 -0
  13. package/dist/controllers/admin/organisation.js +139 -0
  14. package/dist/controllers/admin/organisation.js.map +1 -0
  15. package/dist/controllers/admin/prices.d.ts +37 -0
  16. package/dist/controllers/admin/prices.d.ts.map +1 -0
  17. package/dist/controllers/admin/prices.js +75 -0
  18. package/dist/controllers/admin/prices.js.map +1 -0
  19. package/dist/controllers/admin/product.d.ts +90 -0
  20. package/dist/controllers/admin/product.d.ts.map +1 -0
  21. package/dist/controllers/admin/product.js +187 -0
  22. package/dist/controllers/admin/product.js.map +1 -0
  23. package/dist/controllers/admin/subscriptions.d.ts +183 -0
  24. package/dist/controllers/admin/subscriptions.d.ts.map +1 -0
  25. package/dist/controllers/admin/subscriptions.js +512 -0
  26. package/dist/controllers/admin/subscriptions.js.map +1 -0
  27. package/dist/controllers/admin/webhook.d.ts +5 -0
  28. package/dist/controllers/admin/webhook.d.ts.map +1 -0
  29. package/dist/controllers/admin/webhook.js +90 -0
  30. package/dist/controllers/admin/webhook.js.map +1 -0
  31. package/dist/controllers/api/account.d.ts +84 -0
  32. package/dist/controllers/api/account.d.ts.map +1 -0
  33. package/dist/controllers/api/account.js +442 -0
  34. package/dist/controllers/api/account.js.map +1 -0
  35. package/dist/controllers/api/credential-status.d.ts +257 -0
  36. package/dist/controllers/api/credential-status.d.ts.map +1 -0
  37. package/dist/controllers/api/credential-status.js +1080 -0
  38. package/dist/controllers/api/credential-status.js.map +1 -0
  39. package/dist/controllers/api/credential.d.ts +207 -0
  40. package/dist/controllers/api/credential.d.ts.map +1 -0
  41. package/dist/controllers/api/credential.js +527 -0
  42. package/dist/controllers/api/credential.js.map +1 -0
  43. package/dist/controllers/api/did.d.ts +259 -0
  44. package/dist/controllers/api/did.d.ts.map +1 -0
  45. package/dist/controllers/api/did.js +673 -0
  46. package/dist/controllers/api/did.js.map +1 -0
  47. package/dist/controllers/api/key.d.ts +136 -0
  48. package/dist/controllers/api/key.d.ts.map +1 -0
  49. package/dist/controllers/api/key.js +268 -0
  50. package/dist/controllers/api/key.js.map +1 -0
  51. package/dist/controllers/api/presentation.d.ts +87 -0
  52. package/dist/controllers/api/presentation.d.ts.map +1 -0
  53. package/dist/controllers/api/presentation.js +264 -0
  54. package/dist/controllers/api/presentation.js.map +1 -0
  55. package/dist/controllers/api/resource.d.ts +118 -0
  56. package/dist/controllers/api/resource.d.ts.map +1 -0
  57. package/dist/controllers/api/resource.js +312 -0
  58. package/dist/controllers/api/resource.js.map +1 -0
  59. package/dist/controllers/validator/controller.d.ts +7 -0
  60. package/dist/controllers/validator/controller.d.ts.map +1 -0
  61. package/dist/controllers/validator/controller.js +31 -0
  62. package/dist/controllers/validator/controller.js.map +1 -0
  63. package/dist/controllers/validator/credential-status.d.ts +6 -0
  64. package/dist/controllers/validator/credential-status.d.ts.map +1 -0
  65. package/dist/controllers/validator/credential-status.js +36 -0
  66. package/dist/controllers/validator/credential-status.js.map +1 -0
  67. package/dist/controllers/validator/credential.d.ts +9 -0
  68. package/dist/controllers/validator/credential.d.ts.map +1 -0
  69. package/dist/controllers/validator/credential.js +103 -0
  70. package/dist/controllers/validator/credential.js.map +1 -0
  71. package/dist/controllers/validator/decorator.d.ts +2 -0
  72. package/dist/controllers/validator/decorator.d.ts.map +1 -0
  73. package/dist/controllers/validator/decorator.js +25 -0
  74. package/dist/controllers/validator/decorator.js.map +1 -0
  75. package/dist/controllers/validator/did-also-known-as.d.ts +8 -0
  76. package/dist/controllers/validator/did-also-known-as.d.ts.map +1 -0
  77. package/dist/controllers/validator/did-also-known-as.js +31 -0
  78. package/dist/controllers/validator/did-also-known-as.js.map +1 -0
  79. package/dist/controllers/validator/did-array.d.ts +7 -0
  80. package/dist/controllers/validator/did-array.d.ts.map +1 -0
  81. package/dist/controllers/validator/did-array.js +27 -0
  82. package/dist/controllers/validator/did-array.js.map +1 -0
  83. package/dist/controllers/validator/did-document-section-id.d.ts +7 -0
  84. package/dist/controllers/validator/did-document-section-id.d.ts.map +1 -0
  85. package/dist/controllers/validator/did-document-section-id.js +43 -0
  86. package/dist/controllers/validator/did-document-section-id.js.map +1 -0
  87. package/dist/controllers/validator/did-document.d.ts +11 -0
  88. package/dist/controllers/validator/did-document.d.ts.map +1 -0
  89. package/dist/controllers/validator/did-document.js +96 -0
  90. package/dist/controllers/validator/did-document.js.map +1 -0
  91. package/dist/controllers/validator/did-uri.d.ts +5 -0
  92. package/dist/controllers/validator/did-uri.d.ts.map +1 -0
  93. package/dist/controllers/validator/did-uri.js +14 -0
  94. package/dist/controllers/validator/did-uri.js.map +1 -0
  95. package/dist/controllers/validator/did.d.ts +35 -0
  96. package/dist/controllers/validator/did.d.ts.map +1 -0
  97. package/dist/controllers/validator/did.js +233 -0
  98. package/dist/controllers/validator/did.js.map +1 -0
  99. package/dist/controllers/validator/helpers.d.ts +7 -0
  100. package/dist/controllers/validator/helpers.d.ts.map +1 -0
  101. package/dist/controllers/validator/helpers.js +6 -0
  102. package/dist/controllers/validator/helpers.js.map +1 -0
  103. package/dist/controllers/validator/identifier.d.ts +20 -0
  104. package/dist/controllers/validator/identifier.d.ts.map +1 -0
  105. package/dist/controllers/validator/identifier.js +100 -0
  106. package/dist/controllers/validator/identifier.js.map +1 -0
  107. package/dist/controllers/validator/index.d.ts +42 -0
  108. package/dist/controllers/validator/index.d.ts.map +1 -0
  109. package/dist/controllers/validator/index.js +90 -0
  110. package/dist/controllers/validator/index.js.map +1 -0
  111. package/dist/controllers/validator/jsonld-proof.d.ts +5 -0
  112. package/dist/controllers/validator/jsonld-proof.d.ts.map +1 -0
  113. package/dist/controllers/validator/jsonld-proof.js +50 -0
  114. package/dist/controllers/validator/jsonld-proof.js.map +1 -0
  115. package/dist/controllers/validator/jwt-proof.d.ts +5 -0
  116. package/dist/controllers/validator/jwt-proof.d.ts.map +1 -0
  117. package/dist/controllers/validator/jwt-proof.js +45 -0
  118. package/dist/controllers/validator/jwt-proof.js.map +1 -0
  119. package/dist/controllers/validator/presentation.d.ts +9 -0
  120. package/dist/controllers/validator/presentation.d.ts.map +1 -0
  121. package/dist/controllers/validator/presentation.js +96 -0
  122. package/dist/controllers/validator/presentation.js.map +1 -0
  123. package/dist/controllers/validator/resource-also-known-as.d.ts +7 -0
  124. package/dist/controllers/validator/resource-also-known-as.d.ts.map +1 -0
  125. package/dist/controllers/validator/resource-also-known-as.js +47 -0
  126. package/dist/controllers/validator/resource-also-known-as.js.map +1 -0
  127. package/dist/controllers/validator/service-create-request.d.ts +10 -0
  128. package/dist/controllers/validator/service-create-request.d.ts.map +1 -0
  129. package/dist/controllers/validator/service-create-request.js +63 -0
  130. package/dist/controllers/validator/service-create-request.js.map +1 -0
  131. package/dist/controllers/validator/service.d.ts +11 -0
  132. package/dist/controllers/validator/service.d.ts.map +1 -0
  133. package/dist/controllers/validator/service.js +76 -0
  134. package/dist/controllers/validator/service.js.map +1 -0
  135. package/dist/controllers/validator/utils.d.ts +3 -0
  136. package/dist/controllers/validator/utils.d.ts.map +1 -0
  137. package/dist/controllers/validator/utils.js +21 -0
  138. package/dist/controllers/validator/utils.js.map +1 -0
  139. package/dist/controllers/validator/validator.d.ts +20 -0
  140. package/dist/controllers/validator/validator.d.ts.map +1 -0
  141. package/dist/controllers/validator/validator.js +2 -0
  142. package/dist/controllers/validator/validator.js.map +1 -0
  143. package/dist/controllers/validator/verification-method.d.ts +30 -0
  144. package/dist/controllers/validator/verification-method.d.ts.map +1 -0
  145. package/dist/controllers/validator/verification-method.js +211 -0
  146. package/dist/controllers/validator/verification-method.js.map +1 -0
  147. package/dist/database/connection/connection.d.ts +9 -0
  148. package/dist/database/connection/connection.d.ts.map +1 -0
  149. package/dist/database/connection/connection.js +27 -0
  150. package/dist/database/connection/connection.js.map +1 -0
  151. package/dist/database/entities/api.key.entity.d.ts +18 -0
  152. package/dist/database/entities/api.key.entity.d.ts.map +1 -0
  153. package/dist/database/entities/api.key.entity.js +102 -0
  154. package/dist/database/entities/api.key.entity.js.map +1 -0
  155. package/dist/database/entities/coin.entity.d.ts +11 -0
  156. package/dist/database/entities/coin.entity.d.ts.map +1 -0
  157. package/dist/database/entities/coin.entity.js +66 -0
  158. package/dist/database/entities/coin.entity.js.map +1 -0
  159. package/dist/database/entities/customer.entity.d.ts +14 -0
  160. package/dist/database/entities/customer.entity.d.ts.map +1 -0
  161. package/dist/database/entities/customer.entity.js +87 -0
  162. package/dist/database/entities/customer.entity.js.map +1 -0
  163. package/dist/database/entities/identifier.entity.d.ts +7 -0
  164. package/dist/database/entities/identifier.entity.d.ts.map +1 -0
  165. package/dist/database/entities/identifier.entity.js +26 -0
  166. package/dist/database/entities/identifier.entity.js.map +1 -0
  167. package/dist/database/entities/key.entity.d.ts +13 -0
  168. package/dist/database/entities/key.entity.d.ts.map +1 -0
  169. package/dist/database/entities/key.entity.js +63 -0
  170. package/dist/database/entities/key.entity.js.map +1 -0
  171. package/dist/database/entities/operation.entity.d.ts +17 -0
  172. package/dist/database/entities/operation.entity.d.ts.map +1 -0
  173. package/dist/database/entities/operation.entity.js +98 -0
  174. package/dist/database/entities/operation.entity.js.map +1 -0
  175. package/dist/database/entities/payment.account.entity.d.ts +16 -0
  176. package/dist/database/entities/payment.account.entity.d.ts.map +1 -0
  177. package/dist/database/entities/payment.account.entity.js +86 -0
  178. package/dist/database/entities/payment.account.entity.js.map +1 -0
  179. package/dist/database/entities/payment.entity.d.ts +20 -0
  180. package/dist/database/entities/payment.entity.d.ts.map +1 -0
  181. package/dist/database/entities/payment.entity.js +103 -0
  182. package/dist/database/entities/payment.entity.js.map +1 -0
  183. package/dist/database/entities/resource.entity.d.ts +21 -0
  184. package/dist/database/entities/resource.entity.d.ts.map +1 -0
  185. package/dist/database/entities/resource.entity.js +117 -0
  186. package/dist/database/entities/resource.entity.js.map +1 -0
  187. package/dist/database/entities/role.entity.d.ts +7 -0
  188. package/dist/database/entities/role.entity.d.ts.map +1 -0
  189. package/dist/database/entities/role.entity.js +60 -0
  190. package/dist/database/entities/role.entity.js.map +1 -0
  191. package/dist/database/entities/subscription.entity.d.ts +16 -0
  192. package/dist/database/entities/subscription.entity.d.ts.map +1 -0
  193. package/dist/database/entities/subscription.entity.js +102 -0
  194. package/dist/database/entities/subscription.entity.js.map +1 -0
  195. package/dist/database/entities/user.entity.d.ts +13 -0
  196. package/dist/database/entities/user.entity.d.ts.map +1 -0
  197. package/dist/database/entities/user.entity.js +67 -0
  198. package/dist/database/entities/user.entity.js.map +1 -0
  199. package/dist/database/migrations/AlterAPIKeyTable.d.ts +6 -0
  200. package/dist/database/migrations/AlterAPIKeyTable.d.ts.map +1 -0
  201. package/dist/database/migrations/AlterAPIKeyTable.js +51 -0
  202. package/dist/database/migrations/AlterAPIKeyTable.js.map +1 -0
  203. package/dist/database/migrations/AlterCustomerTable.d.ts +6 -0
  204. package/dist/database/migrations/AlterCustomerTable.d.ts.map +1 -0
  205. package/dist/database/migrations/AlterCustomerTable.js +15 -0
  206. package/dist/database/migrations/AlterCustomerTable.js.map +1 -0
  207. package/dist/database/migrations/AlterCustomerTableAddEmail.d.ts +6 -0
  208. package/dist/database/migrations/AlterCustomerTableAddEmail.d.ts.map +1 -0
  209. package/dist/database/migrations/AlterCustomerTableAddEmail.js +20 -0
  210. package/dist/database/migrations/AlterCustomerTableAddEmail.js.map +1 -0
  211. package/dist/database/migrations/AlterOperationTable.d.ts +6 -0
  212. package/dist/database/migrations/AlterOperationTable.d.ts.map +1 -0
  213. package/dist/database/migrations/AlterOperationTable.js +38 -0
  214. package/dist/database/migrations/AlterOperationTable.js.map +1 -0
  215. package/dist/database/migrations/AlterOperationTableAddCustomer.d.ts +6 -0
  216. package/dist/database/migrations/AlterOperationTableAddCustomer.d.ts.map +1 -0
  217. package/dist/database/migrations/AlterOperationTableAddCustomer.js +22 -0
  218. package/dist/database/migrations/AlterOperationTableAddCustomer.js.map +1 -0
  219. package/dist/database/migrations/AlterOperationTableNewCategory.d.ts +6 -0
  220. package/dist/database/migrations/AlterOperationTableNewCategory.d.ts.map +1 -0
  221. package/dist/database/migrations/AlterOperationTableNewCategory.js +17 -0
  222. package/dist/database/migrations/AlterOperationTableNewCategory.js.map +1 -0
  223. package/dist/database/migrations/AlterPaymentTable.d.ts +6 -0
  224. package/dist/database/migrations/AlterPaymentTable.d.ts.map +1 -0
  225. package/dist/database/migrations/AlterPaymentTable.js +61 -0
  226. package/dist/database/migrations/AlterPaymentTable.js.map +1 -0
  227. package/dist/database/migrations/AlterTableClaim.d.ts +6 -0
  228. package/dist/database/migrations/AlterTableClaim.d.ts.map +1 -0
  229. package/dist/database/migrations/AlterTableClaim.js +21 -0
  230. package/dist/database/migrations/AlterTableClaim.js.map +1 -0
  231. package/dist/database/migrations/AlterTableIdentifier.d.ts +6 -0
  232. package/dist/database/migrations/AlterTableIdentifier.d.ts.map +1 -0
  233. package/dist/database/migrations/AlterTableIdentifier.js +21 -0
  234. package/dist/database/migrations/AlterTableIdentifier.js.map +1 -0
  235. package/dist/database/migrations/AlterTableKey.d.ts +6 -0
  236. package/dist/database/migrations/AlterTableKey.d.ts.map +1 -0
  237. package/dist/database/migrations/AlterTableKey.js +36 -0
  238. package/dist/database/migrations/AlterTableKey.js.map +1 -0
  239. package/dist/database/migrations/CreateApiKeyMigration.d.ts +6 -0
  240. package/dist/database/migrations/CreateApiKeyMigration.d.ts.map +1 -0
  241. package/dist/database/migrations/CreateApiKeyMigration.js +40 -0
  242. package/dist/database/migrations/CreateApiKeyMigration.js.map +1 -0
  243. package/dist/database/migrations/CreateCoinTable.d.ts +6 -0
  244. package/dist/database/migrations/CreateCoinTable.d.ts.map +1 -0
  245. package/dist/database/migrations/CreateCoinTable.js +20 -0
  246. package/dist/database/migrations/CreateCoinTable.js.map +1 -0
  247. package/dist/database/migrations/CreateCustomerTable.d.ts +6 -0
  248. package/dist/database/migrations/CreateCustomerTable.d.ts.map +1 -0
  249. package/dist/database/migrations/CreateCustomerTable.js +24 -0
  250. package/dist/database/migrations/CreateCustomerTable.js.map +1 -0
  251. package/dist/database/migrations/CreateCustomersTable.d.ts +6 -0
  252. package/dist/database/migrations/CreateCustomersTable.d.ts.map +1 -0
  253. package/dist/database/migrations/CreateCustomersTable.js +21 -0
  254. package/dist/database/migrations/CreateCustomersTable.js.map +1 -0
  255. package/dist/database/migrations/CreateOperationTable.d.ts +6 -0
  256. package/dist/database/migrations/CreateOperationTable.d.ts.map +1 -0
  257. package/dist/database/migrations/CreateOperationTable.js +28 -0
  258. package/dist/database/migrations/CreateOperationTable.js.map +1 -0
  259. package/dist/database/migrations/CreatePaymentAccountTable.d.ts +6 -0
  260. package/dist/database/migrations/CreatePaymentAccountTable.d.ts.map +1 -0
  261. package/dist/database/migrations/CreatePaymentAccountTable.js +35 -0
  262. package/dist/database/migrations/CreatePaymentAccountTable.js.map +1 -0
  263. package/dist/database/migrations/CreatePaymentTable.d.ts +6 -0
  264. package/dist/database/migrations/CreatePaymentTable.d.ts.map +1 -0
  265. package/dist/database/migrations/CreatePaymentTable.js +55 -0
  266. package/dist/database/migrations/CreatePaymentTable.js.map +1 -0
  267. package/dist/database/migrations/CreateResourceTable.d.ts +6 -0
  268. package/dist/database/migrations/CreateResourceTable.d.ts.map +1 -0
  269. package/dist/database/migrations/CreateResourceTable.js +46 -0
  270. package/dist/database/migrations/CreateResourceTable.js.map +1 -0
  271. package/dist/database/migrations/CreateRoleTable.d.ts +6 -0
  272. package/dist/database/migrations/CreateRoleTable.d.ts.map +1 -0
  273. package/dist/database/migrations/CreateRoleTable.js +25 -0
  274. package/dist/database/migrations/CreateRoleTable.js.map +1 -0
  275. package/dist/database/migrations/CreateSubscriptionTable.d.ts +6 -0
  276. package/dist/database/migrations/CreateSubscriptionTable.d.ts.map +1 -0
  277. package/dist/database/migrations/CreateSubscriptionTable.js +30 -0
  278. package/dist/database/migrations/CreateSubscriptionTable.js.map +1 -0
  279. package/dist/database/migrations/CreateUserTable.d.ts +6 -0
  280. package/dist/database/migrations/CreateUserTable.d.ts.map +1 -0
  281. package/dist/database/migrations/CreateUserTable.js +32 -0
  282. package/dist/database/migrations/CreateUserTable.js.map +1 -0
  283. package/dist/database/migrations/MigrateData.d.ts +7 -0
  284. package/dist/database/migrations/MigrateData.d.ts.map +1 -0
  285. package/dist/database/migrations/MigrateData.js +138 -0
  286. package/dist/database/migrations/MigrateData.js.map +1 -0
  287. package/dist/database/ormconfig.d.ts +2 -0
  288. package/dist/database/ormconfig.d.ts.map +1 -0
  289. package/dist/database/ormconfig.js +3 -0
  290. package/dist/database/ormconfig.js.map +1 -0
  291. package/dist/database/types/enum.d.ts +21 -0
  292. package/dist/database/types/enum.d.ts.map +1 -0
  293. package/dist/database/types/enum.js +35 -0
  294. package/dist/database/types/enum.js.map +1 -0
  295. package/dist/database/types/types.d.ts +11 -0
  296. package/dist/database/types/types.d.ts.map +1 -0
  297. package/dist/database/types/types.js +127 -0
  298. package/dist/database/types/types.js.map +1 -0
  299. package/dist/helpers/faucet.d.ts +5 -0
  300. package/dist/helpers/faucet.d.ts.map +1 -0
  301. package/dist/helpers/faucet.js +24 -0
  302. package/dist/helpers/faucet.js.map +1 -0
  303. package/dist/helpers/fee-analyzer.d.ts +8 -0
  304. package/dist/helpers/fee-analyzer.d.ts.map +1 -0
  305. package/dist/helpers/fee-analyzer.js +73 -0
  306. package/dist/helpers/fee-analyzer.js.map +1 -0
  307. package/dist/helpers/helpers.d.ts +28 -0
  308. package/dist/helpers/helpers.d.ts.map +1 -0
  309. package/dist/helpers/helpers.js +167 -0
  310. package/dist/helpers/helpers.js.map +1 -0
  311. package/dist/index.d.ts +2 -0
  312. package/dist/index.d.ts.map +1 -0
  313. package/dist/index.js +28 -0
  314. package/dist/index.js.map +1 -0
  315. package/dist/middleware/auth/auth-gaurd.d.ts +51 -0
  316. package/dist/middleware/auth/auth-gaurd.d.ts.map +1 -0
  317. package/dist/middleware/auth/auth-gaurd.js +117 -0
  318. package/dist/middleware/auth/auth-gaurd.js.map +1 -0
  319. package/dist/middleware/auth/logto-helper.d.ts +44 -0
  320. package/dist/middleware/auth/logto-helper.d.ts.map +1 -0
  321. package/dist/middleware/auth/logto-helper.js +438 -0
  322. package/dist/middleware/auth/logto-helper.js.map +1 -0
  323. package/dist/middleware/auth/oauth/abstract.d.ts +22 -0
  324. package/dist/middleware/auth/oauth/abstract.d.ts.map +1 -0
  325. package/dist/middleware/auth/oauth/abstract.js +24 -0
  326. package/dist/middleware/auth/oauth/abstract.js.map +1 -0
  327. package/dist/middleware/auth/oauth/logto-provider.d.ts +15 -0
  328. package/dist/middleware/auth/oauth/logto-provider.d.ts.map +1 -0
  329. package/dist/middleware/auth/oauth/logto-provider.js +42 -0
  330. package/dist/middleware/auth/oauth/logto-provider.js.map +1 -0
  331. package/dist/middleware/auth/routes/admin/admin-auth.d.ts +8 -0
  332. package/dist/middleware/auth/routes/admin/admin-auth.d.ts.map +1 -0
  333. package/dist/middleware/auth/routes/admin/admin-auth.js +44 -0
  334. package/dist/middleware/auth/routes/admin/admin-auth.js.map +1 -0
  335. package/dist/middleware/auth/routes/api/account-auth.d.ts +5 -0
  336. package/dist/middleware/auth/routes/api/account-auth.d.ts.map +1 -0
  337. package/dist/middleware/auth/routes/api/account-auth.js +9 -0
  338. package/dist/middleware/auth/routes/api/account-auth.js.map +1 -0
  339. package/dist/middleware/auth/routes/api/auth-user-info.d.ts +5 -0
  340. package/dist/middleware/auth/routes/api/auth-user-info.d.ts.map +1 -0
  341. package/dist/middleware/auth/routes/api/auth-user-info.js +8 -0
  342. package/dist/middleware/auth/routes/api/auth-user-info.js.map +1 -0
  343. package/dist/middleware/auth/routes/api/credential-auth.d.ts +5 -0
  344. package/dist/middleware/auth/routes/api/credential-auth.d.ts.map +1 -0
  345. package/dist/middleware/auth/routes/api/credential-auth.js +17 -0
  346. package/dist/middleware/auth/routes/api/credential-auth.js.map +1 -0
  347. package/dist/middleware/auth/routes/api/credential-status-auth.d.ts +5 -0
  348. package/dist/middleware/auth/routes/api/credential-status-auth.d.ts.map +1 -0
  349. package/dist/middleware/auth/routes/api/credential-status-auth.js +20 -0
  350. package/dist/middleware/auth/routes/api/credential-status-auth.js.map +1 -0
  351. package/dist/middleware/auth/routes/api/did-auth.d.ts +5 -0
  352. package/dist/middleware/auth/routes/api/did-auth.d.ts.map +1 -0
  353. package/dist/middleware/auth/routes/api/did-auth.js +19 -0
  354. package/dist/middleware/auth/routes/api/did-auth.js.map +1 -0
  355. package/dist/middleware/auth/routes/api/key-auth.d.ts +5 -0
  356. package/dist/middleware/auth/routes/api/key-auth.d.ts.map +1 -0
  357. package/dist/middleware/auth/routes/api/key-auth.js +11 -0
  358. package/dist/middleware/auth/routes/api/key-auth.js.map +1 -0
  359. package/dist/middleware/auth/routes/api/presentation-auth.d.ts +5 -0
  360. package/dist/middleware/auth/routes/api/presentation-auth.d.ts.map +1 -0
  361. package/dist/middleware/auth/routes/api/presentation-auth.js +10 -0
  362. package/dist/middleware/auth/routes/api/presentation-auth.js.map +1 -0
  363. package/dist/middleware/auth/routes/api/resource-auth.d.ts +5 -0
  364. package/dist/middleware/auth/routes/api/resource-auth.d.ts.map +1 -0
  365. package/dist/middleware/auth/routes/api/resource-auth.js +11 -0
  366. package/dist/middleware/auth/routes/api/resource-auth.js.map +1 -0
  367. package/dist/middleware/auth/routes/auth-rule-provider.d.ts +33 -0
  368. package/dist/middleware/auth/routes/auth-rule-provider.d.ts.map +1 -0
  369. package/dist/middleware/auth/routes/auth-rule-provider.js +39 -0
  370. package/dist/middleware/auth/routes/auth-rule-provider.js.map +1 -0
  371. package/dist/middleware/auth/routes/auth-rule-repository.d.ts +21 -0
  372. package/dist/middleware/auth/routes/auth-rule-repository.d.ts.map +1 -0
  373. package/dist/middleware/auth/routes/auth-rule-repository.js +28 -0
  374. package/dist/middleware/auth/routes/auth-rule-repository.js.map +1 -0
  375. package/dist/middleware/auth/user-info-fetcher/api-token.d.ts +17 -0
  376. package/dist/middleware/auth/user-info-fetcher/api-token.d.ts.map +1 -0
  377. package/dist/middleware/auth/user-info-fetcher/api-token.js +60 -0
  378. package/dist/middleware/auth/user-info-fetcher/api-token.js.map +1 -0
  379. package/dist/middleware/auth/user-info-fetcher/base.d.ts +14 -0
  380. package/dist/middleware/auth/user-info-fetcher/base.d.ts.map +1 -0
  381. package/dist/middleware/auth/user-info-fetcher/base.js +38 -0
  382. package/dist/middleware/auth/user-info-fetcher/base.js.map +1 -0
  383. package/dist/middleware/auth/user-info-fetcher/idtoken.d.ts +18 -0
  384. package/dist/middleware/auth/user-info-fetcher/idtoken.d.ts.map +1 -0
  385. package/dist/middleware/auth/user-info-fetcher/idtoken.js +56 -0
  386. package/dist/middleware/auth/user-info-fetcher/idtoken.js.map +1 -0
  387. package/dist/middleware/auth/user-info-fetcher/m2m-creds-token.d.ts +18 -0
  388. package/dist/middleware/auth/user-info-fetcher/m2m-creds-token.d.ts.map +1 -0
  389. package/dist/middleware/auth/user-info-fetcher/m2m-creds-token.js +52 -0
  390. package/dist/middleware/auth/user-info-fetcher/m2m-creds-token.js.map +1 -0
  391. package/dist/middleware/auth/user-info-fetcher/portal-token.d.ts +20 -0
  392. package/dist/middleware/auth/user-info-fetcher/portal-token.d.ts.map +1 -0
  393. package/dist/middleware/auth/user-info-fetcher/portal-token.js +79 -0
  394. package/dist/middleware/auth/user-info-fetcher/portal-token.js.map +1 -0
  395. package/dist/middleware/auth/user-info-fetcher/swagger-ui.d.ts +16 -0
  396. package/dist/middleware/auth/user-info-fetcher/swagger-ui.d.ts.map +1 -0
  397. package/dist/middleware/auth/user-info-fetcher/swagger-ui.js +48 -0
  398. package/dist/middleware/auth/user-info-fetcher/swagger-ui.js.map +1 -0
  399. package/dist/middleware/authentication.d.ts +15 -0
  400. package/dist/middleware/authentication.d.ts.map +1 -0
  401. package/dist/middleware/authentication.js +110 -0
  402. package/dist/middleware/authentication.js.map +1 -0
  403. package/dist/middleware/event-tracker.d.ts +5 -0
  404. package/dist/middleware/event-tracker.d.ts.map +1 -0
  405. package/dist/middleware/event-tracker.js +34 -0
  406. package/dist/middleware/event-tracker.js.map +1 -0
  407. package/dist/middleware/hook.d.ts +9 -0
  408. package/dist/middleware/hook.d.ts.map +1 -0
  409. package/dist/middleware/hook.js +24 -0
  410. package/dist/middleware/hook.js.map +1 -0
  411. package/dist/middleware/middleware.d.ts +6 -0
  412. package/dist/middleware/middleware.d.ts.map +1 -0
  413. package/dist/middleware/middleware.js +36 -0
  414. package/dist/middleware/middleware.js.map +1 -0
  415. package/dist/services/admin/api-key.d.ts +30 -0
  416. package/dist/services/admin/api-key.d.ts.map +1 -0
  417. package/dist/services/admin/api-key.js +135 -0
  418. package/dist/services/admin/api-key.js.map +1 -0
  419. package/dist/services/admin/stripe.d.ts +18 -0
  420. package/dist/services/admin/stripe.d.ts.map +1 -0
  421. package/dist/services/admin/stripe.js +125 -0
  422. package/dist/services/admin/stripe.js.map +1 -0
  423. package/dist/services/admin/subscription.d.ts +16 -0
  424. package/dist/services/admin/subscription.d.ts.map +1 -0
  425. package/dist/services/admin/subscription.js +75 -0
  426. package/dist/services/admin/subscription.js.map +1 -0
  427. package/dist/services/api/coin.d.ts +13 -0
  428. package/dist/services/api/coin.d.ts.map +1 -0
  429. package/dist/services/api/coin.js +49 -0
  430. package/dist/services/api/coin.js.map +1 -0
  431. package/dist/services/api/credentials.d.ts +8 -0
  432. package/dist/services/api/credentials.d.ts.map +1 -0
  433. package/dist/services/api/credentials.js +38 -0
  434. package/dist/services/api/credentials.js.map +1 -0
  435. package/dist/services/api/customer.d.ts +19 -0
  436. package/dist/services/api/customer.d.ts.map +1 -0
  437. package/dist/services/api/customer.js +88 -0
  438. package/dist/services/api/customer.js.map +1 -0
  439. package/dist/services/api/identifier.d.ts +12 -0
  440. package/dist/services/api/identifier.d.ts.map +1 -0
  441. package/dist/services/api/identifier.js +38 -0
  442. package/dist/services/api/identifier.js.map +1 -0
  443. package/dist/services/api/key.d.ts +14 -0
  444. package/dist/services/api/key.d.ts.map +1 -0
  445. package/dist/services/api/key.js +49 -0
  446. package/dist/services/api/key.js.map +1 -0
  447. package/dist/services/api/operation.d.ts +14 -0
  448. package/dist/services/api/operation.d.ts.map +1 -0
  449. package/dist/services/api/operation.js +61 -0
  450. package/dist/services/api/operation.js.map +1 -0
  451. package/dist/services/api/payment-account.d.ts +14 -0
  452. package/dist/services/api/payment-account.d.ts.map +1 -0
  453. package/dist/services/api/payment-account.js +68 -0
  454. package/dist/services/api/payment-account.js.map +1 -0
  455. package/dist/services/api/payment.d.ts +17 -0
  456. package/dist/services/api/payment.d.ts.map +1 -0
  457. package/dist/services/api/payment.js +68 -0
  458. package/dist/services/api/payment.js.map +1 -0
  459. package/dist/services/api/resource.d.ts +17 -0
  460. package/dist/services/api/resource.d.ts.map +1 -0
  461. package/dist/services/api/resource.js +65 -0
  462. package/dist/services/api/resource.js.map +1 -0
  463. package/dist/services/api/role.d.ts +14 -0
  464. package/dist/services/api/role.d.ts.map +1 -0
  465. package/dist/services/api/role.js +53 -0
  466. package/dist/services/api/role.js.map +1 -0
  467. package/dist/services/api/store.d.ts +8 -0
  468. package/dist/services/api/store.d.ts.map +1 -0
  469. package/dist/services/api/store.js +18 -0
  470. package/dist/services/api/store.js.map +1 -0
  471. package/dist/services/api/user.d.ts +15 -0
  472. package/dist/services/api/user.d.ts.map +1 -0
  473. package/dist/services/api/user.js +54 -0
  474. package/dist/services/api/user.js.map +1 -0
  475. package/dist/services/connectors/verida.d.ts +40 -0
  476. package/dist/services/connectors/verida.d.ts.map +1 -0
  477. package/dist/services/connectors/verida.js +110 -0
  478. package/dist/services/connectors/verida.js.map +1 -0
  479. package/dist/services/helpers.d.ts +10 -0
  480. package/dist/services/helpers.d.ts.map +1 -0
  481. package/dist/services/helpers.js +44 -0
  482. package/dist/services/helpers.js.map +1 -0
  483. package/dist/services/identity/abstract.d.ts +51 -0
  484. package/dist/services/identity/abstract.d.ts.map +1 -0
  485. package/dist/services/identity/abstract.js +101 -0
  486. package/dist/services/identity/abstract.js.map +1 -0
  487. package/dist/services/identity/agent.d.ts +43 -0
  488. package/dist/services/identity/agent.d.ts.map +1 -0
  489. package/dist/services/identity/agent.js +625 -0
  490. package/dist/services/identity/agent.js.map +1 -0
  491. package/dist/services/identity/default.d.ts +19 -0
  492. package/dist/services/identity/default.d.ts.map +1 -0
  493. package/dist/services/identity/default.js +26 -0
  494. package/dist/services/identity/default.js.map +1 -0
  495. package/dist/services/identity/index.d.ts +59 -0
  496. package/dist/services/identity/index.d.ts.map +1 -0
  497. package/dist/services/identity/index.js +31 -0
  498. package/dist/services/identity/index.js.map +1 -0
  499. package/dist/services/identity/local.d.ts +33 -0
  500. package/dist/services/identity/local.d.ts.map +1 -0
  501. package/dist/services/identity/local.js +156 -0
  502. package/dist/services/identity/local.js.map +1 -0
  503. package/dist/services/identity/postgres.d.ts +59 -0
  504. package/dist/services/identity/postgres.d.ts.map +1 -0
  505. package/dist/services/identity/postgres.js +388 -0
  506. package/dist/services/identity/postgres.js.map +1 -0
  507. package/dist/services/identity/unauthorized.d.ts +6 -0
  508. package/dist/services/identity/unauthorized.d.ts.map +1 -0
  509. package/dist/services/identity/unauthorized.js +49 -0
  510. package/dist/services/identity/unauthorized.js.map +1 -0
  511. package/dist/services/track/admin/account-submitter.d.ts +11 -0
  512. package/dist/services/track/admin/account-submitter.d.ts.map +1 -0
  513. package/dist/services/track/admin/account-submitter.js +54 -0
  514. package/dist/services/track/admin/account-submitter.js.map +1 -0
  515. package/dist/services/track/admin/subscription-submitter.d.ts +13 -0
  516. package/dist/services/track/admin/subscription-submitter.d.ts.map +1 -0
  517. package/dist/services/track/admin/subscription-submitter.js +106 -0
  518. package/dist/services/track/admin/subscription-submitter.js.map +1 -0
  519. package/dist/services/track/api/credential-status-subscriber.d.ts +10 -0
  520. package/dist/services/track/api/credential-status-subscriber.d.ts.map +1 -0
  521. package/dist/services/track/api/credential-status-subscriber.js +35 -0
  522. package/dist/services/track/api/credential-status-subscriber.js.map +1 -0
  523. package/dist/services/track/api/credential-subscriber.d.ts +10 -0
  524. package/dist/services/track/api/credential-subscriber.d.ts.map +1 -0
  525. package/dist/services/track/api/credential-subscriber.js +35 -0
  526. package/dist/services/track/api/credential-subscriber.js.map +1 -0
  527. package/dist/services/track/api/did-subscriber.d.ts +10 -0
  528. package/dist/services/track/api/did-subscriber.d.ts.map +1 -0
  529. package/dist/services/track/api/did-subscriber.js +33 -0
  530. package/dist/services/track/api/did-subscriber.js.map +1 -0
  531. package/dist/services/track/api/key-subscriber.d.ts +10 -0
  532. package/dist/services/track/api/key-subscriber.d.ts.map +1 -0
  533. package/dist/services/track/api/key-subscriber.js +35 -0
  534. package/dist/services/track/api/key-subscriber.js.map +1 -0
  535. package/dist/services/track/api/presentation-subscriber.d.ts +10 -0
  536. package/dist/services/track/api/presentation-subscriber.d.ts.map +1 -0
  537. package/dist/services/track/api/presentation-subscriber.js +35 -0
  538. package/dist/services/track/api/presentation-subscriber.js.map +1 -0
  539. package/dist/services/track/api/resource-subscriber.d.ts +11 -0
  540. package/dist/services/track/api/resource-subscriber.d.ts.map +1 -0
  541. package/dist/services/track/api/resource-subscriber.js +107 -0
  542. package/dist/services/track/api/resource-subscriber.js.map +1 -0
  543. package/dist/services/track/base.d.ts +10 -0
  544. package/dist/services/track/base.d.ts.map +1 -0
  545. package/dist/services/track/base.js +26 -0
  546. package/dist/services/track/base.js.map +1 -0
  547. package/dist/services/track/helpers.d.ts +23 -0
  548. package/dist/services/track/helpers.d.ts.map +1 -0
  549. package/dist/services/track/helpers.js +35 -0
  550. package/dist/services/track/helpers.js.map +1 -0
  551. package/dist/services/track/notifiers.d.ts +12 -0
  552. package/dist/services/track/notifiers.d.ts.map +1 -0
  553. package/dist/services/track/notifiers.js +39 -0
  554. package/dist/services/track/notifiers.js.map +1 -0
  555. package/dist/services/track/observer.d.ts +14 -0
  556. package/dist/services/track/observer.d.ts.map +1 -0
  557. package/dist/services/track/observer.js +43 -0
  558. package/dist/services/track/observer.js.map +1 -0
  559. package/dist/services/track/operation-subscriber.d.ts +14 -0
  560. package/dist/services/track/operation-subscriber.d.ts.map +1 -0
  561. package/dist/services/track/operation-subscriber.js +112 -0
  562. package/dist/services/track/operation-subscriber.js.map +1 -0
  563. package/dist/services/track/submitter.d.ts +22 -0
  564. package/dist/services/track/submitter.d.ts.map +1 -0
  565. package/dist/services/track/submitter.js +2 -0
  566. package/dist/services/track/submitter.js.map +1 -0
  567. package/dist/services/track/tracker.d.ts +24 -0
  568. package/dist/services/track/tracker.d.ts.map +1 -0
  569. package/dist/services/track/tracker.js +79 -0
  570. package/dist/services/track/tracker.js.map +1 -0
  571. package/dist/services/track/types.d.ts +16 -0
  572. package/dist/services/track/types.d.ts.map +1 -0
  573. package/dist/services/track/types.js +2 -0
  574. package/dist/services/track/types.js.map +1 -0
  575. package/dist/services/w3c-credential.d.ts +32 -0
  576. package/dist/services/w3c-credential.d.ts.map +1 -0
  577. package/dist/services/w3c-credential.js +120 -0
  578. package/dist/services/w3c-credential.js.map +1 -0
  579. package/dist/services/w3c-presentation.d.ts +30 -0
  580. package/dist/services/w3c-presentation.d.ts.map +1 -0
  581. package/dist/services/w3c-presentation.js +95 -0
  582. package/dist/services/w3c-presentation.js.map +1 -0
  583. package/dist/static/custom-button.d.ts +2 -0
  584. package/dist/static/custom-button.d.ts.map +1 -0
  585. package/dist/static/custom-button.js +35 -0
  586. package/dist/static/custom-button.js.map +1 -0
  587. package/dist/static/swagger-admin.json +1191 -0
  588. package/dist/static/swagger-api.json +3564 -0
  589. package/dist/types/admin.d.ts +122 -0
  590. package/dist/types/admin.d.ts.map +1 -0
  591. package/dist/types/admin.js +2 -0
  592. package/dist/types/admin.js.map +1 -0
  593. package/dist/types/authentication.d.ts +30 -0
  594. package/dist/types/authentication.d.ts.map +1 -0
  595. package/dist/types/authentication.js +131 -0
  596. package/dist/types/authentication.js.map +1 -0
  597. package/dist/types/constants.d.ts +98 -0
  598. package/dist/types/constants.d.ts.map +1 -0
  599. package/dist/types/constants.js +138 -0
  600. package/dist/types/constants.js.map +1 -0
  601. package/dist/types/credential-status.d.ts +168 -0
  602. package/dist/types/credential-status.d.ts.map +1 -0
  603. package/dist/types/credential-status.js +12 -0
  604. package/dist/types/credential-status.js.map +1 -0
  605. package/dist/types/credential.d.ts +55 -0
  606. package/dist/types/credential.d.ts.map +1 -0
  607. package/dist/types/credential.js +2 -0
  608. package/dist/types/credential.js.map +1 -0
  609. package/dist/types/customer.d.ts +18 -0
  610. package/dist/types/customer.d.ts.map +1 -0
  611. package/dist/types/customer.js +2 -0
  612. package/dist/types/customer.js.map +1 -0
  613. package/dist/types/did.d.ts +56 -0
  614. package/dist/types/did.d.ts.map +1 -0
  615. package/dist/types/did.js +2 -0
  616. package/dist/types/did.js.map +1 -0
  617. package/dist/types/key.d.ts +23 -0
  618. package/dist/types/key.d.ts.map +1 -0
  619. package/dist/types/key.js +2 -0
  620. package/dist/types/key.js.map +1 -0
  621. package/dist/types/presentation.d.ts +19 -0
  622. package/dist/types/presentation.d.ts.map +1 -0
  623. package/dist/types/presentation.js +2 -0
  624. package/dist/types/presentation.js.map +1 -0
  625. package/dist/types/resource.d.ts +26 -0
  626. package/dist/types/resource.d.ts.map +1 -0
  627. package/dist/types/resource.js +2 -0
  628. package/dist/types/resource.js.map +1 -0
  629. package/dist/types/shared.d.ts +51 -0
  630. package/dist/types/shared.d.ts.map +1 -0
  631. package/dist/types/shared.js +24 -0
  632. package/dist/types/shared.js.map +1 -0
  633. package/dist/types/swagger-admin-types.d.ts +352 -0
  634. package/dist/types/swagger-admin-types.d.ts.map +1 -0
  635. package/dist/types/swagger-admin-types.js +353 -0
  636. package/dist/types/swagger-admin-types.js.map +1 -0
  637. package/dist/types/swagger-api-types.d.ts +1312 -0
  638. package/dist/types/swagger-api-types.d.ts.map +1 -0
  639. package/dist/types/swagger-api-types.js +1313 -0
  640. package/dist/types/swagger-api-types.js.map +1 -0
  641. package/dist/types/track.d.ts +72 -0
  642. package/dist/types/track.d.ts.map +1 -0
  643. package/dist/types/track.js +37 -0
  644. package/dist/types/track.js.map +1 -0
  645. package/dist/types/validation.d.ts +23 -0
  646. package/dist/types/validation.d.ts.map +1 -0
  647. package/dist/types/validation.js +2 -0
  648. package/dist/types/validation.js.map +1 -0
  649. package/dist/types/verida.d.ts +23 -0
  650. package/dist/types/verida.d.ts.map +1 -0
  651. package/dist/types/verida.js +2 -0
  652. package/dist/types/verida.js.map +1 -0
  653. package/example.env +43 -0
  654. package/package.json +156 -0
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2021 Cheqd Foundation Limited (doing business as "cheqd")
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,246 @@
1
+ # cheqd Studio
2
+
3
+ [![GitHub release (latest by date)](https://img.shields.io/github/v/release/cheqd/studio?color=green&label=stable%20release&style=flat-square)](https://github.com/cheqd/studio/releases/latest)
4
+ ![GitHub Release Date](https://img.shields.io/github/release-date/cheqd/studio?color=green&style=flat-square)
5
+ [![GitHub license](https://img.shields.io/github/license/cheqd/studio?color=blue&style=flat-square)](https://github.com/cheqd/studio/blob/main/LICENSE)
6
+
7
+ [![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/cheqd/studio?include_prereleases&label=dev%20release&style=flat-square)](https://github.com/cheqd/studio/releases/)
8
+ ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/cheqd/studio/latest?style=flat-square)
9
+ [![GitHub contributors](https://img.shields.io/github/contributors/cheqd/studio?label=contributors%20%E2%9D%A4%EF%B8%8F&style=flat-square)](https://github.com/cheqd/studio/graphs/contributors)
10
+
11
+ [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/cheqd/studio/dispatch.yml?label=workflows&style=flat-square)](https://github.com/cheqd/studio/actions/workflows/dispatch.yml)
12
+ [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/cheqd/studio/codeql.yml?label=CodeQL&style=flat-square)](https://github.com/cheqd/studio/actions/workflows/codeql.yml)
13
+ ![GitHub repo size](https://img.shields.io/github/repo-size/cheqd/studio?style=flat-square)
14
+
15
+ ## ℹ️ Overview
16
+
17
+ cheqd Studio (formerly Credential Service) enables users to consume cheqd's identity functionality, such as DIDs, Trust Registries, Status Lists, Credential Payments and DID-Linked Resources over REST API. This enables users to integrate cheqd's functionality into existing applications or create a full end-to-end trusted ecosystem from the ground up.
18
+
19
+ ## 📖 Usage
20
+
21
+ We run hosted endpoints for this package (in case you don't want to run it yourself) which have Swagger / OpenAPI
22
+ definition endpoints that list all of the APIs and how they work.
23
+
24
+ The Swagger API definition pages are:
25
+
26
+ - [Production / Stable Release APIs](https://studio-api.cheqd.net/swagger/)
27
+ - [Staging / Development Release APIs](https://studio-api-staging.cheqd.net/swagger/)
28
+
29
+ ## 🔧 Configuration
30
+
31
+ The application allows configuring the following parameters using environment variables.
32
+
33
+ ### Core configuration
34
+
35
+ #### Events tracking
36
+
37
+ 1. `LOG_LEVEL`: specifies log level, like 'trace', 'debug', 'info', 'warn' or 'error';
38
+
39
+ #### Network API endpoints
40
+
41
+ 1. `MAINNET_RPC_URL`: RPC endpoint for cheqd mainnet (Default: `https://rpc.cheqd.net:443`).
42
+ 2. `TESTNET_RPC_URL`: RPC endpoint for cheqd testnet (Default: `https://rpc.cheqd.network:443`).
43
+ 3. `RESOLVER_URL`: API endpoint for a [DID Resolver](https://github.com/cheqd/did-resolver) endpoint that supports
44
+ `did:cheqd` (Default: `https://resolver.cheqd.net/1.0/identifiers/`).
45
+ 4. `APPLICATION_BASE_URL`: URL of the application (external domain name).
46
+ 5. `CORS_ALLOWED_ORIGINS`: CORS allowed origins used in the app (optional). (Default: `APPLICATION_BASE_URL`).
47
+
48
+ #### Veramo KMS Database
49
+
50
+ The application supports two modes in which keys are managed: either just storing them in-memory while a container is
51
+ running, or persisting them in a PostgresSQL database with Veramo SDK. Using an external Postgres database allows for
52
+ "custodian" mode where identity and cheqd/Cosmos keys can be offloaded by client applications to be stored in the
53
+ database.
54
+
55
+ By default, `ENABLE_EXTERNAL_DB` is set to off/`false`. To enable external Veramo KMS database, set `ENABLE_EXTERNAL_DB`
56
+ to `true`, then define below environment variables in `.env` file:
57
+
58
+ 1. `EXTERNAL_DB_CONNECTION_URL`: PostgreSQL database connection URL, e.g.
59
+ `postgres://<user>:<password>@<host>:<port>/<database>`.
60
+ 2. `EXTERNAL_DB_ENCRYPTION_KEY`: Secret key used to encrypt the Veramo key-specific database tables. This adds a layer
61
+ of protection by not storing the database in plaintext.
62
+ 3. `EXTERNAL_DB_CERTIFICATE`: Custom CA certificate required to connect to the database (optional).
63
+
64
+ #### API Authentication using LogTo
65
+
66
+ By default, the application has API authentication disabled (which can be changed in configuration). If, however, you'd
67
+ like to run the app with API authentication features, the following variables need to be configured.
68
+
69
+ We use a self-hosted version of [LogTo](https://logto.io/), which supports OpenID Connect. Theoretically, these values
70
+ could also be replaced with [LogTo Cloud](http://cloud.logto.io/) or any other OpenID Connect identity provider.
71
+
72
+ By default, `ENABLE_AUTHENTICATION` is set to off/`false`. To enable external Veramo KMS database, set
73
+ `ENABLE_AUTHENTICATION` to `true`, then define below environment variables in `.env` file:
74
+
75
+ 1. **Endpoints**
76
+ 1. `LOGTO_ENDPOINT`: API endpoint for LogTo server
77
+ 2. `LOGTO_DEFAULT_RESOURCE_URL`: Root of API resources in this application to be guarded. (Default:
78
+ `http://localhost:3000/` on localhost.)
79
+ 3. `LOGTO_MANAGEMENT_API`: URL of management API for LogTo. This is typically static within self-hosted LogTo applications and is not meant to be a resolvable URL. (Default: `https://default.logto.app/api`)
80
+ 2. **User-facing APIs**
81
+ 1. `LOGTO_APP_ID`: Application ID for the cheqd Studio application in LogTo. This can be set up as type
82
+ "Traditional Web"
83
+ 2. `LOGTO_APP_SECRET`: Application secret associated with App ID above.
84
+ 3. **Machine-to-machine backend APIs**
85
+ 1. `LOGTO_M2M_APP_ID`: Application ID for machine-to-machine application in LogTo. This is used for elevated
86
+ management APIs within LogTo.
87
+ 2. `LOGTO_M2M_APP_SECRET`: Application secret
88
+ 4. **Default role update using [LogTo webhooks](https://docs.logto.io/docs/recipes/webhooks/)**: LogTo supports
89
+ webhooks to fire of requests to an API when it detects certain actions/changes. If you want to automatically assign a
90
+ role to users, a webhook is recommended to be setup for firing off whenever there's a new account created, or a new
91
+ sign-in.
92
+ 1. `LOGTO_DEFAULT_ROLE_ID`: LogTo Role ID for the default role to put new users into.
93
+ 2. `LOGTO_WEBHOOK_SECRET`: Webhook secret to authenticate incoming webhook requests from LogTo.
94
+ 5. **Miscellaneous**
95
+ 1. `COOKIE_SECRET`: Secret for cookie encryption.
96
+ 2. `API_KEY_EXPIRATION` (optional): Expiration time for API keys in days. (Default 30 days)
97
+
98
+ #### Faucet settings
99
+
100
+ This section describes bootstrapping things for newcomers accounts. If it's enabled the CredentialService auto-populates
101
+ some tokens on the testnet for making the process simpler.
102
+
103
+ 1. `ENABLE_ACCOUNT_TOPUP`: Enable/disable such functionality (`false` by default)
104
+ 2. `FAUCET_URI`: Faucet service API endpoint (Default: `https://faucet-api.cheqd.network/credit`)
105
+ 3. `TESTNET_MINIMUM_BALANCE`: Minimum balance on account before it is automatically topped up from the faucet. This value should be expressed as an integer in `CHEQ` tokens, which will then be converted in the background to `ncheq` denomination. Account balance check is carried out on every account creation/login. (Default: 10,000 CHEQ testnet tokens)
106
+
107
+ #### Stripe integration
108
+
109
+ The application supports Stripe integration for payment processing.
110
+
111
+ 1. `STRIPE_ENABLED` - Enable/disable Stripe integration (`false` by default)
112
+ 2. `STRIPE_SECRET_KEY` - Secret key for Stripe API. Please, keep it secret on deploying
113
+ 3. `STRIPE_PUBLISHABLE_KEY` - Publishable key for Stripe API.
114
+ 4. `STRIPE_WEBHOOK_SECRET` - Secret for Stripe Webhook.
115
+
116
+ ### 3rd Party Connectors
117
+
118
+ The app supports 3rd party connectors for credential storage and delivery.
119
+
120
+ #### Verida
121
+
122
+ The app's [Verida Network](https://www.verida.network/) connector can be enabled to deliver generated credentials to
123
+ Verida Wallet.
124
+
125
+ By default, `ENABLE_VERIDA_CONNECTOR` is set to off/`false`. To enable external Veramo KMS database, set
126
+ `ENABLE_VERIDA_CONNECTOR` to `true`, then define below environment variables in `.env` file:
127
+
128
+ 1. `VERIDA_PRIVATE_KEY`: Secret key for Verida Network API.
129
+ 2. `POLYGON_PRIVATE_KEY`: Secret key for Polygon Network.
130
+
131
+ ## 🧑‍💻🛠 Developer Guide
132
+
133
+ ### Run as standalone application using Docker Compose
134
+
135
+ If you want to run the application without any external databases or dependent services, we provide
136
+ [a Docker Compose file](docker/no-external-db/docker-compose-no-db.yml) to spin up a standalone service.
137
+
138
+ ```bash
139
+ docker compose -f docker/no-external-db/docker-compose-no-db.yml up --detach
140
+ ```
141
+
142
+ This standalone service uses an in-memory database with no persistence, and therefore is recommended only if you're
143
+ managing key/secret storage separately.
144
+
145
+ The [`no-db.env` file](docker/no-external-db/no-db.env) in the same folder contains all the environment variables
146
+ necessary to configure the service. (See section _Configuration_ above.)
147
+
148
+ ### Run with external Key Management System (KMS) and/or authentication service using Docker Compose
149
+
150
+ Construct the postgres URL and configure the env variables mentioned above.
151
+
152
+ Spinning up a Docker container from the
153
+ [pre-built studio Docker image on Github](https://github.com/cheqd/studio/pkgs/container/studio)
154
+ is as simple as the command below:
155
+
156
+ #### Configure PostgreSQL database
157
+
158
+ Configure the environment variables in the [`postgres.env` file](docker/with-external-db/postgres.env):
159
+
160
+ 1. `POSTGRES_USER`: Username for Postgres database
161
+ 2. `POSTGRES_PASSWORD`: Password for Postgres database
162
+ 3. `POSTGRES_MULTIPLE_DATABASES`: Database names for multiple databases in the same cluster, e.g.: `"app,logto"`. This
163
+ sets up multiple databases in the same cluster, which can be used independently for External Veramo KMS or LogTo
164
+ service.
165
+
166
+ Then, make the Postgres initialisation scripts executable:
167
+
168
+ ```bash
169
+ chmod +x docker/with-external-db/pg-init-scripts/create-multiple-postgresql-databases.sh
170
+ ```
171
+
172
+ #### Start LogTo service
173
+
174
+ Configure the environment variables in the [`logto.env` file](docker/with-external-db/logto.env) with the settings
175
+ described in section above.
176
+
177
+ Then, run the LogTo service to configure the LogTo application API resources, applications, sign-in experiences, roles
178
+ etc using Docker Compose:
179
+
180
+ ```bash
181
+ docker compose -f docker/with-external-db/docker-compose-with-db.yml --profile logto up --detach
182
+ ```
183
+
184
+ Configuring LogTo is outside the scope of this guide, and we recommend reading
185
+ [LogTo documentation](https://docs.logto.io/) to familiarise yourself.
186
+
187
+ #### Start studio app
188
+
189
+ Configure the environment variables in the [`with-db.env` file](docker/with-external-db/with-db.env) with the settings
190
+ described in section above. Depending on whether you are using external Veramo KMS only, LogTo only, or both you will
191
+ need to have previously provisioned these services as there are environment variables in this file that originate from
192
+ Postgres/LogTo.
193
+
194
+ Then, start the service using Docker Compose:
195
+
196
+ ```bash
197
+ docker compose -f docker/with-external-db/docker-compose-with-db.yml up --detach
198
+ ```
199
+
200
+ #### Running app or LogTo migrations
201
+
202
+ When upgrading either the external Veramo KMS or LogTo, you might need to run migrations for the underlying databases.
203
+
204
+ You can run _just_ the migration scripts using [Docker Compose profiles](https://docs.docker.com/compose/profiles/)
205
+ defined in the Compose file.
206
+
207
+ For example, to run cheqd Studio app migrations on an existing Postgres database (for external Veramo KMS):
208
+
209
+ ```bash
210
+ docker compose -f docker/with-external-db/docker-compose-with-db.yml --profile app-setup up --detach
211
+ ```
212
+
213
+ Or to run LogTo migrations on an existing Postgres database:
214
+
215
+ ```bash
216
+ docker compose -f docker/with-external-db/docker-compose-with-db.yml --profile logto-setup up --detach
217
+ ```
218
+
219
+ ### Build using Docker
220
+
221
+ To build your own image using Docker, use the [Dockerfile](docker/Dockerfile) provided.
222
+
223
+ ```bash
224
+ docker build --file docker/Dockerfile --target runner . --tag studio:local
225
+ ```
226
+
227
+ ## 🐞 Bug reports & 🤔 feature requests
228
+
229
+ If you notice anything not behaving how you expected, or would like to make a suggestion / request for a new feature,
230
+ please create a [**new issue**](https://github.com/cheqd/studio/issues/new/choose) and let us know.
231
+
232
+ ## 💬 Community
233
+
234
+ Our [**Discord server**](http://cheqd.link/discord-github) is our primary chat channel for the open-source
235
+ community, software developers, and node operators.
236
+
237
+ Please reach out to us there for discussions, help, and feedback on the project.
238
+
239
+ ## 🙋 Find us elsewhere
240
+
241
+ [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/cheqd)
242
+ [![Discord](https://img.shields.io/badge/Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](http://cheqd.link/discord-github)
243
+ [![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/intent/follow?screen_name=cheqd_io)
244
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](http://cheqd.link/linkedin)
245
+ [![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://blog.cheqd.io)
246
+ [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/channel/UCBUGvvH6t3BAYo5u41hJPzw/)
package/dist/app.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import express from 'express';
2
+ declare const _default: express.Application;
3
+ export default _default;
4
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;;AA4S9B,wBAAiC"}
package/dist/app.js ADDED
@@ -0,0 +1,180 @@
1
+ import express from 'express';
2
+ import Helmet from 'helmet';
3
+ import cors from 'cors';
4
+ import session from 'express-session';
5
+ import cookieParser from 'cookie-parser';
6
+ import path from 'path';
7
+ import swaggerUi from 'swagger-ui-express';
8
+ import { StatusCodes } from 'http-status-codes';
9
+ import { CredentialController } from './controllers/api/credential.js';
10
+ import { AccountController } from './controllers/api/account.js';
11
+ import { Authentication } from './middleware/authentication.js';
12
+ import { Connection } from './database/connection/connection.js';
13
+ import { CredentialStatusController } from './controllers/api/credential-status.js';
14
+ import { CORS_ALLOWED_ORIGINS, CORS_ERROR_MSG } from './types/constants.js';
15
+ import { LogToWebHook } from './middleware/hook.js';
16
+ import { Middleware } from './middleware/middleware.js';
17
+ import * as dotenv from 'dotenv';
18
+ dotenv.config();
19
+ // Define Swagger file
20
+ import swaggerAPIDocument from './static/swagger-api.json' assert { type: 'json' };
21
+ import swaggerAdminDocument from './static/swagger-admin.json' assert { type: 'json' };
22
+ import { PresentationController } from './controllers/api/presentation.js';
23
+ import { KeyController } from './controllers/api/key.js';
24
+ import { DIDController } from './controllers/api/did.js';
25
+ import { ResourceController } from './controllers/api/resource.js';
26
+ import { ResponseTracker } from './middleware/event-tracker.js';
27
+ import { ProductController } from './controllers/admin/product.js';
28
+ import { SubscriptionController } from './controllers/admin/subscriptions.js';
29
+ import { PriceController } from './controllers/admin/prices.js';
30
+ import { WebhookController } from './controllers/admin/webhook.js';
31
+ import { APIKeyController } from './controllers/admin/api-key.js';
32
+ import { OrganisationController } from './controllers/admin/organisation.js';
33
+ let swaggerOptions = {};
34
+ if (process.env.ENABLE_AUTHENTICATION === 'true') {
35
+ swaggerOptions = {
36
+ customJs: '/static/custom-button.js',
37
+ };
38
+ }
39
+ class App {
40
+ express;
41
+ constructor() {
42
+ this.express = express();
43
+ this.middleware();
44
+ this.routes();
45
+ Connection.instance.connect();
46
+ }
47
+ middleware() {
48
+ this.express.use(express.json({
49
+ limit: '50mb',
50
+ verify: (req, _res, buf) => {
51
+ req.rawBody = buf;
52
+ },
53
+ }));
54
+ this.express.use(express.raw({ type: 'application/octet-stream' }));
55
+ this.express.use(express.urlencoded({ extended: true }));
56
+ this.express.use(Middleware.parseUrlEncodedJson);
57
+ this.express.use(Helmet());
58
+ this.express.use(cors({
59
+ origin: function (origin, callback) {
60
+ if (!origin)
61
+ return callback(null, true);
62
+ const allowedList = CORS_ALLOWED_ORIGINS.split(',');
63
+ for (const allowed of allowedList) {
64
+ if (allowed.indexOf(origin) !== -1) {
65
+ return callback(null, true);
66
+ }
67
+ }
68
+ return callback(new Error(CORS_ERROR_MSG), false);
69
+ },
70
+ }));
71
+ this.express.use(cookieParser());
72
+ const auth = new Authentication();
73
+ // EventTracking
74
+ this.express.use(new ResponseTracker().trackJson);
75
+ // Authentication
76
+ if (process.env.ENABLE_AUTHENTICATION === 'true') {
77
+ this.express.use(session({
78
+ secret: process.env.COOKIE_SECRET ||
79
+ (function () {
80
+ throw new Error('COOKIE_SECRET is not defined');
81
+ })(),
82
+ cookie: { maxAge: 24 * 60 * 60 * 1000 }, // 24 hours
83
+ resave: false,
84
+ saveUninitialized: false,
85
+ }));
86
+ // Authentication functions/methods
87
+ this.express.use(async (_req, _res, next) => await auth.setup(next));
88
+ this.express.use(async (_req, _res, next) => await auth.wrapperHandleAuthRoutes(_req, _res, next));
89
+ this.express.use(async (_req, _res, next) => await auth.withLogtoWrapper(_req, _res, next));
90
+ if (process.env.ENABLE_EXTERNAL_DB === 'true') {
91
+ this.express.use(async (req, res, next) => await auth.guard(req, res, next));
92
+ }
93
+ }
94
+ this.express.use(express.text());
95
+ this.express.use(auth.handleError);
96
+ this.express.use(async (req, res, next) => await auth.accessControl(req, res, next));
97
+ this.express.use('/swagger', swaggerUi.serveFiles(swaggerAPIDocument, swaggerOptions), swaggerUi.setup(swaggerAPIDocument, swaggerOptions));
98
+ if (process.env.STRIPE_ENABLED === 'true') {
99
+ this.express.use('/admin/swagger', swaggerUi.serveFiles(swaggerAdminDocument), swaggerUi.setup(swaggerAdminDocument));
100
+ this.express.use(Middleware.setStripeClient);
101
+ }
102
+ }
103
+ routes() {
104
+ const app = this.express;
105
+ // Top-level routes
106
+ app.get('/', (_req, res) => res.redirect('swagger'));
107
+ // Credential API
108
+ app.post(`/credential/issue`, CredentialController.issueValidator, new CredentialController().issue);
109
+ app.post(`/credential/verify`, CredentialController.verifyValidator, new CredentialController().verify);
110
+ app.post(`/credential/revoke`, CredentialController.revokeValidator, new CredentialController().revoke);
111
+ app.post('/credential/suspend', CredentialController.suspendValidator, new CredentialController().suspend);
112
+ app.post('/credential/reinstate', CredentialController.reinstateValidator, new CredentialController().reinstate);
113
+ // Presentation API
114
+ app.post(`/presentation/verify`, PresentationController.presentationVerifyValidator, new PresentationController().verifyPresentation);
115
+ app.post(`/presentation/create`, PresentationController.presentationCreateValidator, new PresentationController().createPresentation);
116
+ // Credential status API
117
+ app.post('/credential-status/create/unencrypted', CredentialStatusController.createUnencryptedValidator, new CredentialStatusController().createUnencryptedStatusList);
118
+ app.post('/credential-status/create/encrypted', CredentialStatusController.createEncryptedValidator, new CredentialStatusController().createEncryptedStatusList);
119
+ app.post('/credential-status/update/unencrypted', CredentialStatusController.updateUnencryptedValidator, new CredentialStatusController().updateUnencryptedStatusList);
120
+ app.post('/credential-status/update/encrypted', CredentialStatusController.updateEncryptedValidator, new CredentialStatusController().updateEncryptedStatusList);
121
+ app.post('/credential-status/check', CredentialStatusController.checkValidator, new CredentialStatusController().checkStatusList);
122
+ app.get('/credential-status/search', CredentialStatusController.searchValidator, new CredentialStatusController().searchStatusList);
123
+ // Keys API
124
+ app.post('/key/create', new KeyController().createKey);
125
+ app.post('/key/import', KeyController.keyImportValidator, new KeyController().importKey);
126
+ app.get('/key/read/:kid', KeyController.keyGetValidator, new KeyController().getKey);
127
+ // DIDs API
128
+ app.post('/did/create', DIDController.createDIDValidator, new DIDController().createDid);
129
+ app.post('/did/update', DIDController.updateDIDValidator, new DIDController().updateDid);
130
+ app.post('/did/import', DIDController.importDIDValidator, new DIDController().importDid);
131
+ app.post('/did/deactivate/:did', DIDController.deactivateDIDValidator, new DIDController().deactivateDid);
132
+ app.get('/did/list', new DIDController().getDids);
133
+ app.get('/did/search/:did', new DIDController().resolveDidUrl);
134
+ // Resource API
135
+ app.post('/resource/create/:did', ResourceController.createResourceValidator, new ResourceController().createResource);
136
+ app.get('/resource/search/:did', ResourceController.searchResourceValidator, new ResourceController().searchResource);
137
+ // Account API
138
+ app.post('/account/create', AccountController.createValidator, new AccountController().create);
139
+ app.get('/account', new AccountController().get);
140
+ app.get('/account/idtoken', new AccountController().getIdToken);
141
+ // LogTo webhooks
142
+ app.post('/account/bootstrap', LogToWebHook.verifyHookSignature, new AccountController().bootstrap);
143
+ // LogTo user info
144
+ app.get('/auth/user-info', async (req, res) => {
145
+ return res.json(req.user);
146
+ });
147
+ // static files
148
+ app.get('/static/custom-button.js', express.static(path.join(process.cwd(), '/dist'), { extensions: ['js'], index: false }));
149
+ // Portal
150
+ // Product
151
+ if (process.env.STRIPE_ENABLED === 'true') {
152
+ app.get('/admin/product/list', ProductController.productListValidator, new ProductController().listProducts);
153
+ app.get('/admin/product/get/:productId', ProductController.productGetValidator, new ProductController().getProduct);
154
+ // Prices
155
+ app.get('/admin/price/list', PriceController.priceListValidator, new PriceController().getListPrices);
156
+ // Subscription
157
+ app.post('/admin/subscription/create', SubscriptionController.subscriptionCreateValidator, new SubscriptionController().create);
158
+ app.post('/admin/subscription/update', SubscriptionController.subscriptionUpdateValidator, new SubscriptionController().update);
159
+ app.get('/admin/subscription/get', new SubscriptionController().get);
160
+ app.get('/admin/subscription/list', SubscriptionController.subscriptionListValidator, new SubscriptionController().list);
161
+ app.delete('/admin/subscription/cancel', SubscriptionController.subscriptionCancelValidator, new SubscriptionController().cancel);
162
+ app.post('/admin/subscription/resume', SubscriptionController.subscriptionResumeValidator, new SubscriptionController().resume);
163
+ // API key
164
+ app.post('/admin/api-key/create', APIKeyController.apiKeyCreateValidator, new APIKeyController().create);
165
+ app.post('/admin/api-key/update', APIKeyController.apiKeyUpdateValidator, new APIKeyController().update);
166
+ app.get('/admin/api-key/get', APIKeyController.apiKeyGetValidator, new APIKeyController().get);
167
+ app.get('/admin/api-key/list', APIKeyController.apiKeyListValidator, new APIKeyController().list);
168
+ app.delete('/admin/api-key/revoke', APIKeyController.apiKeyRevokeValidator, new APIKeyController().revoke);
169
+ // Webhook
170
+ app.post('/admin/webhook', new WebhookController().handleWebhook);
171
+ // Customer
172
+ app.post('/admin/organisation/update', OrganisationController.organisationUpdatevalidator, new OrganisationController().update);
173
+ app.get('/admin/organisation/get', new OrganisationController().get);
174
+ }
175
+ // 404 for all other requests
176
+ app.all('*', (_req, res) => res.status(StatusCodes.BAD_REQUEST).send('Bad request'));
177
+ }
178
+ }
179
+ export default new App().express;
180
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,sBAAs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