@procivis/one-react-native-components 0.3.102 → 0.3.112

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 (248) hide show
  1. package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
  2. package/lib/commonjs/components/credential/credential.js.map +1 -1
  3. package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
  4. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  5. package/lib/commonjs/components/entity/entity-details-with-buttons.js +2 -2
  6. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  7. package/lib/commonjs/components/entity/entity-details.js +3 -3
  8. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  9. package/lib/commonjs/components/history/history-details-screen.js +10 -10
  10. package/lib/commonjs/components/history/history-details-screen.js.map +1 -1
  11. package/lib/commonjs/components/history/history-list-item-icon.js +15 -8
  12. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
  13. package/lib/commonjs/components/history/history-list-item.js.map +1 -1
  14. package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
  15. package/lib/commonjs/components/history/history-list-section-header.js +1 -1
  16. package/lib/commonjs/components/history/history-list-section-header.js.map +1 -1
  17. package/lib/commonjs/components/history/history-list.js.map +1 -1
  18. package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -1
  19. package/lib/commonjs/components/proof-request/v1/share-credential.js +3 -15
  20. package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
  21. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
  22. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  23. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
  24. package/lib/commonjs/ui-components/control/checkbox.js +1 -1
  25. package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
  26. package/lib/commonjs/ui-components/control/switch.js +2 -2
  27. package/lib/commonjs/ui-components/control/switch.js.map +1 -1
  28. package/lib/commonjs/ui-components/header/foldable-header.js +26 -16
  29. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  30. package/lib/commonjs/ui-components/history/history-section-header.js +1 -1
  31. package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
  32. package/lib/commonjs/ui-components/history/history-section-list-item.js +1 -1
  33. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  34. package/lib/commonjs/ui-components/index.js +11 -0
  35. package/lib/commonjs/ui-components/index.js.map +1 -1
  36. package/lib/commonjs/ui-components/notice/index.js +14 -0
  37. package/lib/commonjs/ui-components/notice/index.js.map +1 -0
  38. package/lib/commonjs/ui-components/notice/wallet-notice.js +80 -0
  39. package/lib/commonjs/ui-components/notice/wallet-notice.js.map +1 -0
  40. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  41. package/lib/commonjs/utils/history.js.map +1 -1
  42. package/lib/commonjs/utils/hooks/core/backup.js +2 -2
  43. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  44. package/lib/commonjs/utils/hooks/core/cache.js +10 -10
  45. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
  46. package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
  47. package/lib/commonjs/utils/hooks/core/credential-schemas.js +1 -1
  48. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  49. package/lib/commonjs/utils/hooks/core/credentials.js +4 -4
  50. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  51. package/lib/commonjs/utils/hooks/core/dids.js +2 -2
  52. package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
  53. package/lib/commonjs/utils/hooks/core/history.js +1 -1
  54. package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
  55. package/lib/commonjs/utils/hooks/core/identifiers.js +2 -2
  56. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
  57. package/lib/commonjs/utils/hooks/core/index.js +11 -0
  58. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  59. package/lib/commonjs/utils/hooks/core/proof-schemas.js +1 -1
  60. package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
  61. package/lib/commonjs/utils/hooks/core/proofs.js +23 -13
  62. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  63. package/lib/commonjs/utils/hooks/core/trust-entity.js +1 -1
  64. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  65. package/lib/commonjs/utils/hooks/core/trust-list.js +32 -0
  66. package/lib/commonjs/utils/hooks/core/trust-list.js.map +1 -0
  67. package/lib/commonjs/utils/hooks/core/wallet-unit.js +30 -2
  68. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
  69. package/lib/commonjs/utils/hooks/revocation/credential-status.js +1 -1
  70. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  71. package/lib/commonjs/utils/parsers/credential-images.js +4 -4
  72. package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
  73. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +1 -1
  74. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
  75. package/lib/commonjs/utils/parsers/credential-sharing.js +4 -10
  76. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  77. package/lib/commonjs/utils/parsers/credential.js +9 -9
  78. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  79. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  80. package/lib/module/components/backup/preview-credentials.js.map +1 -1
  81. package/lib/module/components/credential/credential.js.map +1 -1
  82. package/lib/module/components/entity/EntityButtons.js.map +1 -1
  83. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  84. package/lib/module/components/entity/entity-details-with-buttons.js +3 -3
  85. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  86. package/lib/module/components/entity/entity-details.js +4 -4
  87. package/lib/module/components/entity/entity-details.js.map +1 -1
  88. package/lib/module/components/history/history-details-screen.js +11 -11
  89. package/lib/module/components/history/history-details-screen.js.map +1 -1
  90. package/lib/module/components/history/history-list-item-icon.js +16 -9
  91. package/lib/module/components/history/history-list-item-icon.js.map +1 -1
  92. package/lib/module/components/history/history-list-item.js.map +1 -1
  93. package/lib/module/components/history/history-list-screen.js.map +1 -1
  94. package/lib/module/components/history/history-list-section-header.js +1 -1
  95. package/lib/module/components/history/history-list-section-header.js.map +1 -1
  96. package/lib/module/components/history/history-list.js.map +1 -1
  97. package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
  98. package/lib/module/components/proof-request/v1/share-credential.js +4 -16
  99. package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
  100. package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
  101. package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  102. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
  103. package/lib/module/ui-components/control/checkbox.js +1 -1
  104. package/lib/module/ui-components/control/checkbox.js.map +1 -1
  105. package/lib/module/ui-components/control/switch.js +3 -3
  106. package/lib/module/ui-components/control/switch.js.map +1 -1
  107. package/lib/module/ui-components/header/foldable-header.js +26 -16
  108. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  109. package/lib/module/ui-components/history/history-section-header.js +1 -1
  110. package/lib/module/ui-components/history/history-section-header.js.map +1 -1
  111. package/lib/module/ui-components/history/history-section-list-item.js +1 -1
  112. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  113. package/lib/module/ui-components/index.js +1 -0
  114. package/lib/module/ui-components/index.js.map +1 -1
  115. package/lib/module/ui-components/notice/index.js +3 -0
  116. package/lib/module/ui-components/notice/index.js.map +1 -0
  117. package/lib/module/ui-components/notice/wallet-notice.js +72 -0
  118. package/lib/module/ui-components/notice/wallet-notice.js.map +1 -0
  119. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  120. package/lib/module/utils/history.js.map +1 -1
  121. package/lib/module/utils/hooks/core/backup.js +3 -3
  122. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  123. package/lib/module/utils/hooks/core/cache.js +11 -11
  124. package/lib/module/utils/hooks/core/cache.js.map +1 -1
  125. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  126. package/lib/module/utils/hooks/core/credential-schemas.js +1 -1
  127. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  128. package/lib/module/utils/hooks/core/credentials.js +5 -5
  129. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  130. package/lib/module/utils/hooks/core/dids.js +3 -3
  131. package/lib/module/utils/hooks/core/dids.js.map +1 -1
  132. package/lib/module/utils/hooks/core/history.js +1 -1
  133. package/lib/module/utils/hooks/core/history.js.map +1 -1
  134. package/lib/module/utils/hooks/core/identifiers.js +3 -3
  135. package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
  136. package/lib/module/utils/hooks/core/index.js +1 -0
  137. package/lib/module/utils/hooks/core/index.js.map +1 -1
  138. package/lib/module/utils/hooks/core/proof-schemas.js +1 -1
  139. package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
  140. package/lib/module/utils/hooks/core/proofs.js +24 -14
  141. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  142. package/lib/module/utils/hooks/core/trust-entity.js +2 -2
  143. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  144. package/lib/module/utils/hooks/core/trust-list.js +24 -0
  145. package/lib/module/utils/hooks/core/trust-list.js.map +1 -0
  146. package/lib/module/utils/hooks/core/wallet-unit.js +28 -2
  147. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
  148. package/lib/module/utils/hooks/revocation/credential-status.js +2 -2
  149. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  150. package/lib/module/utils/parsers/credential-images.js +5 -5
  151. package/lib/module/utils/parsers/credential-images.js.map +1 -1
  152. package/lib/module/utils/parsers/credential-sharing-v2.js +1 -1
  153. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
  154. package/lib/module/utils/parsers/credential-sharing.js +4 -10
  155. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  156. package/lib/module/utils/parsers/credential.js +10 -10
  157. package/lib/module/utils/parsers/credential.js.map +1 -1
  158. package/lib/module/utils/parsers/query.js.map +1 -1
  159. package/lib/typescript/components/backup/preview-credentials.d.ts +2 -2
  160. package/lib/typescript/components/credential/credential.d.ts +2 -2
  161. package/lib/typescript/components/entity/EntityButtons.d.ts +2 -2
  162. package/lib/typescript/components/entity/entity-attributes.d.ts +2 -2
  163. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -3
  164. package/lib/typescript/components/entity/entity-details.d.ts +5 -5
  165. package/lib/typescript/components/history/history-details-screen.d.ts +2 -2
  166. package/lib/typescript/components/history/history-list-item-icon.d.ts +3 -3
  167. package/lib/typescript/components/history/history-list-item.d.ts +5 -5
  168. package/lib/typescript/components/history/history-list-screen.d.ts +4 -4
  169. package/lib/typescript/components/history/history-list.d.ts +5 -5
  170. package/lib/typescript/components/proof-request/v1/select-credential.d.ts +2 -2
  171. package/lib/typescript/components/proof-request/v1/share-credential.d.ts +6 -6
  172. package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +3 -3
  173. package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +4 -4
  174. package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +5 -5
  175. package/lib/typescript/ui-components/control/checkbox.d.ts +1 -1
  176. package/lib/typescript/ui-components/index.d.ts +1 -0
  177. package/lib/typescript/ui-components/notice/index.d.ts +2 -0
  178. package/lib/typescript/ui-components/notice/wallet-notice.d.ts +11 -0
  179. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +2 -2
  180. package/lib/typescript/utils/history.d.ts +3 -3
  181. package/lib/typescript/utils/hooks/core/backup.d.ts +3 -3
  182. package/lib/typescript/utils/hooks/core/cache.d.ts +2 -2
  183. package/lib/typescript/utils/hooks/core/core-config.d.ts +4 -4
  184. package/lib/typescript/utils/hooks/core/credential-schemas.d.ts +6 -6
  185. package/lib/typescript/utils/hooks/core/credentials.d.ts +8 -8
  186. package/lib/typescript/utils/hooks/core/dids.d.ts +2 -2
  187. package/lib/typescript/utils/hooks/core/history.d.ts +2 -2
  188. package/lib/typescript/utils/hooks/core/identifiers.d.ts +3 -3
  189. package/lib/typescript/utils/hooks/core/index.d.ts +1 -0
  190. package/lib/typescript/utils/hooks/core/proof-schemas.d.ts +7 -7
  191. package/lib/typescript/utils/hooks/core/proofs.d.ts +14 -12
  192. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +5 -5
  193. package/lib/typescript/utils/hooks/core/trust-list.d.ts +5 -0
  194. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +11 -5
  195. package/lib/typescript/utils/parsers/credential-images.d.ts +2 -2
  196. package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +7 -7
  197. package/lib/typescript/utils/parsers/credential-sharing.d.ts +8 -8
  198. package/lib/typescript/utils/parsers/credential.d.ts +11 -11
  199. package/lib/typescript/utils/parsers/query.d.ts +8 -8
  200. package/package.json +3 -3
  201. package/src/components/backup/preview-credentials.tsx +2 -2
  202. package/src/components/credential/credential.tsx +2 -2
  203. package/src/components/entity/EntityButtons.tsx +2 -2
  204. package/src/components/entity/entity-attributes.tsx +2 -2
  205. package/src/components/entity/entity-details-with-buttons.tsx +6 -11
  206. package/src/components/entity/entity-details.tsx +16 -17
  207. package/src/components/history/history-details-screen.tsx +13 -13
  208. package/src/components/history/history-list-item-icon.tsx +18 -15
  209. package/src/components/history/history-list-item.tsx +5 -9
  210. package/src/components/history/history-list-screen.tsx +4 -4
  211. package/src/components/history/history-list-section-header.tsx +1 -1
  212. package/src/components/history/history-list.tsx +6 -6
  213. package/src/components/proof-request/v1/select-credential.tsx +2 -2
  214. package/src/components/proof-request/v1/share-credential.tsx +12 -31
  215. package/src/components/proof-request/v2/select-credential-v2.tsx +3 -6
  216. package/src/components/proof-request/v2/share-credential-v2-group.tsx +10 -10
  217. package/src/components/proof-request/v2/share-credential-v2.tsx +9 -9
  218. package/src/ui-components/control/checkbox.tsx +12 -10
  219. package/src/ui-components/control/switch.tsx +23 -21
  220. package/src/ui-components/detail/detail.stories.tsx +1 -1
  221. package/src/ui-components/header/foldable-header.tsx +27 -20
  222. package/src/ui-components/history/history-section-header.tsx +1 -1
  223. package/src/ui-components/history/history-section-list-item.tsx +1 -1
  224. package/src/ui-components/index.ts +1 -0
  225. package/src/ui-components/notice/index.ts +3 -0
  226. package/src/ui-components/notice/wallet-notice.tsx +82 -0
  227. package/src/ui-components/screens/nerd-mode-screen.tsx +2 -2
  228. package/src/utils/history.ts +4 -4
  229. package/src/utils/hooks/core/backup.ts +3 -3
  230. package/src/utils/hooks/core/cache.ts +13 -13
  231. package/src/utils/hooks/core/core-config.ts +3 -3
  232. package/src/utils/hooks/core/credential-schemas.ts +5 -8
  233. package/src/utils/hooks/core/credentials.ts +14 -22
  234. package/src/utils/hooks/core/dids.ts +4 -4
  235. package/src/utils/hooks/core/history.ts +3 -3
  236. package/src/utils/hooks/core/identifiers.ts +4 -8
  237. package/src/utils/hooks/core/index.ts +1 -0
  238. package/src/utils/hooks/core/proof-schemas.ts +16 -22
  239. package/src/utils/hooks/core/proofs.ts +43 -36
  240. package/src/utils/hooks/core/trust-entity.ts +8 -10
  241. package/src/utils/hooks/core/trust-list.ts +29 -0
  242. package/src/utils/hooks/core/wallet-unit.ts +38 -12
  243. package/src/utils/hooks/revocation/credential-status.ts +2 -2
  244. package/src/utils/parsers/credential-images.tsx +7 -11
  245. package/src/utils/parsers/credential-sharing-v2.tsx +20 -23
  246. package/src/utils/parsers/credential-sharing.tsx +29 -38
  247. package/src/utils/parsers/credential.ts +43 -43
  248. package/src/utils/parsers/query.ts +14 -16
@@ -1,7 +1,4 @@
1
- import {
2
- CredentialSchemaListQueryBindingDto,
3
- ImportCredentialSchemaRequestSchemaBindingDto,
4
- } from '@procivis/react-native-one-core';
1
+ import { CredentialSchemaListQuery, ImportCredentialSchemaRequestSchema } from '@procivis/react-native-one-core';
5
2
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
6
3
 
7
4
  import { getQueryKeyFromCredentialSchemaListQueryParams } from '../../parsers/query';
@@ -15,14 +12,14 @@ export const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';
15
12
  export const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';
16
13
  export const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';
17
14
 
18
- export const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQueryBindingDto>) => {
15
+ export const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQuery>) => {
19
16
  const { core, organisationId } = useONECore();
20
17
 
21
18
  return useInfiniteQuery(
22
19
  [CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)],
23
20
  ({ pageParam = 0 }) =>
24
21
  core
25
- .getCredentialSchemas({
22
+ .listCredentialSchemas({
26
23
  organisationId,
27
24
  page: pageParam,
28
25
  pageSize: PAGE_SIZE,
@@ -46,7 +43,7 @@ export const useCredentialSchemaPreview = (url: string) => {
46
43
  if (!response.ok) {
47
44
  throw response.originalError;
48
45
  }
49
- return response.data as ImportCredentialSchemaRequestSchemaBindingDto;
46
+ return response.data as ImportCredentialSchemaRequestSchema;
50
47
  }),
51
48
  {
52
49
  keepPreviousData: true,
@@ -59,7 +56,7 @@ export const useCredentialSchemaAccept = () => {
59
56
  const { core, organisationId } = useONECore();
60
57
 
61
58
  return useMutation(
62
- async (schema: ImportCredentialSchemaRequestSchemaBindingDto) =>
59
+ async (schema: ImportCredentialSchemaRequestSchema) =>
63
60
  core.importCredentialSchema({
64
61
  organisationId,
65
62
  schema,
@@ -1,9 +1,9 @@
1
1
  import {
2
- CredentialListQueryBindingDto,
3
- CredentialStateBindingEnum,
4
- HandleInvitationRequestBindingDto,
5
- HandleInvitationResponseBindingEnum,
6
- InitiateIssuanceRequestBindingDto,
2
+ CredentialListQuery,
3
+ CredentialState,
4
+ HandleInvitationRequest,
5
+ HandleInvitationResponse,
6
+ InitiateIssuanceRequest,
7
7
  OneError,
8
8
  } from '@procivis/react-native-one-core';
9
9
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
@@ -20,22 +20,18 @@ export const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
20
20
  export const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
21
21
  export const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
22
22
 
23
- export const useCredentials = (queryParams?: Partial<CredentialListQueryBindingDto>) => {
23
+ export const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {
24
24
  const { core, organisationId } = useONECore();
25
25
 
26
26
  return useQuery(
27
27
  [CREDENTIAL_LIST_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)],
28
28
  async () => {
29
- const { values } = await core.getCredentials({
29
+ const { values } = await core.listCredentials({
30
30
  organisationId,
31
31
  page: 0,
32
32
  // TODO: workaround pagination for now, until it's supported by UI
33
33
  pageSize: 10000,
34
- states: [
35
- CredentialStateBindingEnum.ACCEPTED,
36
- CredentialStateBindingEnum.SUSPENDED,
37
- CredentialStateBindingEnum.REVOKED,
38
- ],
34
+ states: [CredentialState.ACCEPTED, CredentialState.SUSPENDED, CredentialState.REVOKED],
39
35
  ...queryParams,
40
36
  });
41
37
  return values;
@@ -46,7 +42,7 @@ export const useCredentials = (queryParams?: Partial<CredentialListQueryBindingD
46
42
  );
47
43
  };
48
44
 
49
- export const usePagedCredentials = (queryParams?: Partial<CredentialListQueryBindingDto>) => {
45
+ export const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>) => {
50
46
  const { core, organisationId } = useONECore();
51
47
 
52
48
  return useInfiniteQuery(
@@ -56,15 +52,11 @@ export const usePagedCredentials = (queryParams?: Partial<CredentialListQueryBin
56
52
  ...getQueryKeyFromCredentialListQueryParams(queryParams),
57
53
  ],
58
54
  ({ pageParam = 0 }) =>
59
- core.getCredentials({
55
+ core.listCredentials({
60
56
  organisationId,
61
57
  page: pageParam,
62
58
  pageSize: PAGE_SIZE,
63
- states: [
64
- CredentialStateBindingEnum.ACCEPTED,
65
- CredentialStateBindingEnum.SUSPENDED,
66
- CredentialStateBindingEnum.REVOKED,
67
- ],
59
+ states: [CredentialState.ACCEPTED, CredentialState.SUSPENDED, CredentialState.REVOKED],
68
60
  ...queryParams,
69
61
  }),
70
62
  {
@@ -92,10 +84,10 @@ export const useInvitationHandler = () => {
92
84
  const { core, organisationId } = useONECore();
93
85
 
94
86
  return useMutation(
95
- async (request: Omit<HandleInvitationRequestBindingDto, 'organisationId'>) =>
87
+ async (request: Omit<HandleInvitationRequest, 'organisationId'>) =>
96
88
  core.handleInvitation({ organisationId, ...request }),
97
89
  {
98
- onSuccess: async (result: HandleInvitationResponseBindingEnum) => {
90
+ onSuccess: async (result: HandleInvitationResponse) => {
99
91
  if (result.type_ === 'PROOF_REQUEST') {
100
92
  await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);
101
93
  } else {
@@ -197,7 +189,7 @@ export const useInitiateIssuance = () => {
197
189
  const { core, organisationId } = useONECore();
198
190
 
199
191
  return useMutation(
200
- async (request: Omit<InitiateIssuanceRequestBindingDto, 'organisationId'>) =>
192
+ async (request: Omit<InitiateIssuanceRequest, 'organisationId'>) =>
201
193
  core.initiateIssuance({ organisationId, ...request }),
202
194
  {
203
195
  onSuccess: async () => {
@@ -1,4 +1,4 @@
1
- import { DidListQueryBindingDto, DidTypeBindingEnum } from '@procivis/react-native-one-core';
1
+ import { DidListQuery, DidType } from '@procivis/react-native-one-core';
2
2
  import { useQuery } from 'react-query';
3
3
 
4
4
  import { getQueryKeyFromDidListQueryParams } from '../../parsers/query';
@@ -7,18 +7,18 @@ import { useONECore } from './core-context';
7
7
  const PAGE_SIZE = 20;
8
8
  export const DID_LIST_QUERY_KEY = 'did-list';
9
9
 
10
- export const useDids = (queryParams?: Partial<DidListQueryBindingDto>) => {
10
+ export const useDids = (queryParams?: Partial<DidListQuery>) => {
11
11
  const { core, organisationId } = useONECore();
12
12
 
13
13
  return useQuery(
14
14
  [DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)],
15
15
  async ({ pageParam = 0 }) => {
16
- const dids = await core.getDids({
16
+ const dids = await core.listDids({
17
17
  deactivated: false,
18
18
  organisationId,
19
19
  page: pageParam,
20
20
  pageSize: PAGE_SIZE,
21
- type: DidTypeBindingEnum.LOCAL,
21
+ type: DidType.LOCAL,
22
22
  ...queryParams,
23
23
  });
24
24
 
@@ -1,4 +1,4 @@
1
- import { HistoryListQueryBindingDto } from '@procivis/react-native-one-core';
1
+ import { HistoryListQuery } from '@procivis/react-native-one-core';
2
2
  import { useInfiniteQuery } from 'react-query';
3
3
 
4
4
  import { getQueryKeyFromHistoryListQueryParams } from '../../parsers/query';
@@ -7,13 +7,13 @@ import { useONECore } from './core-context';
7
7
  const PAGE_SIZE = 20;
8
8
  export const HISTORY_LIST_QUERY_KEY = 'history-list';
9
9
 
10
- export const useHistory = (queryParams?: Partial<HistoryListQueryBindingDto>) => {
10
+ export const useHistory = (queryParams?: Partial<HistoryListQuery>) => {
11
11
  const { core, organisationId } = useONECore();
12
12
 
13
13
  return useInfiniteQuery(
14
14
  [HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)],
15
15
  async ({ pageParam = 0 }) => {
16
- const historyPage = await core.getHistoryList({
16
+ const historyPage = await core.listHistory({
17
17
  organisationId,
18
18
  page: pageParam,
19
19
  pageSize: PAGE_SIZE,
@@ -1,8 +1,4 @@
1
- import {
2
- IdentifierListQueryBindingDto,
3
- IdentifierStateBindingEnum,
4
- IdentifierTypeBindingEnum,
5
- } from '@procivis/react-native-one-core';
1
+ import { IdentifierListQuery, IdentifierState, IdentifierType } from '@procivis/react-native-one-core';
6
2
  import { useQuery } from 'react-query';
7
3
 
8
4
  import { getQueryKeyFromIdentifierListQueryParams } from '../../parsers';
@@ -25,17 +21,17 @@ export const useIdentifierDetails = (identifierId: string | undefined) => {
25
21
  );
26
22
  };
27
23
 
28
- export const useIdentifiers = (identifierFilter?: Partial<IdentifierListQueryBindingDto>) => {
24
+ export const useIdentifiers = (identifierFilter?: Partial<IdentifierListQuery>) => {
29
25
  const { core, organisationId } = useONECore();
30
26
 
31
27
  return useQuery(
32
28
  [IDENTIFIER_LIST_QUERY_KEY, ...getQueryKeyFromIdentifierListQueryParams(identifierFilter)],
33
29
  ({ pageParam = 0 }) =>
34
30
  core.listIdentifiers({
35
- types: [IdentifierTypeBindingEnum.DID],
31
+ types: [IdentifierType.DID],
36
32
  isRemote: false,
37
33
  page: pageParam,
38
- states: [IdentifierStateBindingEnum.ACTIVE],
34
+ states: [IdentifierState.ACTIVE],
39
35
  organisationId: organisationId,
40
36
  pageSize: PAGE_SIZE,
41
37
  ...identifierFilter,
@@ -12,4 +12,5 @@ export * from './proof-schemas';
12
12
  export * from './proofs';
13
13
  export * from './query';
14
14
  export * from './trust-entity';
15
+ export * from './trust-list';
15
16
  export * from './wallet-unit';
@@ -1,8 +1,8 @@
1
1
  import {
2
- CreateProofSchemaRequestDto,
3
- GetProofSchemaListItemBindingDto,
4
- ImportProofSchemaBindingDto,
5
- ListProofSchemasFiltersBindingDto,
2
+ CreateProofSchemaRequest,
3
+ ImportProofSchema,
4
+ ProofSchemaListItem,
5
+ ProofSchemaListQuery,
6
6
  } from '@procivis/react-native-one-core';
7
7
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
8
8
 
@@ -18,14 +18,14 @@ export const PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY = 'proof-schema-import';
18
18
  export const PROOF_SCHEMA_DETAIL_QUERY_KEY = 'proof-schema-detail';
19
19
  export const PROOF_SCHEMA_SHARE_QUERY_KEY = 'proof-schema-share';
20
20
 
21
- export const useProofSchemas = (queryParams?: Partial<ListProofSchemasFiltersBindingDto>, keepPreviousData = true) => {
21
+ export const useProofSchemas = (queryParams?: Partial<ProofSchemaListQuery>, keepPreviousData = true) => {
22
22
  const { core, organisationId } = useONECore();
23
23
 
24
24
  return useInfiniteQuery(
25
25
  [PROOF_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromProofSchemaListQueryParams(queryParams)],
26
26
  ({ pageParam = 0 }) =>
27
27
  core
28
- .getProofSchemas({
28
+ .listProofSchemas({
29
29
  organisationId,
30
30
  page: pageParam,
31
31
  pageSize: PAGE_SIZE,
@@ -39,10 +39,7 @@ export const useProofSchemas = (queryParams?: Partial<ListProofSchemasFiltersBin
39
39
  );
40
40
  };
41
41
 
42
- export const useProofSchemaDetail = (
43
- proofSchemaId: GetProofSchemaListItemBindingDto['id'] | undefined,
44
- active = true,
45
- ) => {
42
+ export const useProofSchemaDetail = (proofSchemaId: ProofSchemaListItem['id'] | undefined, active = true) => {
46
43
  const { core } = useONECore();
47
44
 
48
45
  return useQuery(
@@ -65,7 +62,7 @@ export const useProofSchemaImportDetail = (url: string) => {
65
62
  if (!response.ok) {
66
63
  throw response.originalError;
67
64
  }
68
- return response.data as ImportProofSchemaBindingDto;
65
+ return response.data as ImportProofSchema;
69
66
  }),
70
67
  {
71
68
  keepPreviousData: true,
@@ -78,7 +75,7 @@ export const useProofSchemaAccept = () => {
78
75
  const { core, organisationId } = useONECore();
79
76
 
80
77
  return useMutation(
81
- async ({ schema }: { schema: ImportProofSchemaBindingDto }) =>
78
+ async ({ schema }: { schema: ImportProofSchema }) =>
82
79
  core.importProofSchema({
83
80
  organisationId,
84
81
  schema,
@@ -97,7 +94,7 @@ export const useProofSchemaCreate = () => {
97
94
  const queryClient = useQueryClient();
98
95
  const { core } = useONECore();
99
96
 
100
- return useMutation(async (proofSchema: CreateProofSchemaRequestDto) => core.createProofSchema(proofSchema), {
97
+ return useMutation(async (proofSchema: CreateProofSchemaRequest) => core.createProofSchema(proofSchema), {
101
98
  onSuccess: async () => {
102
99
  await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);
103
100
  await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
@@ -109,16 +106,13 @@ export const useProofSchemaDelete = () => {
109
106
  const queryClient = useQueryClient();
110
107
  const { core } = useONECore();
111
108
 
112
- return useMutation(
113
- async (proofSchemaId: GetProofSchemaListItemBindingDto['id']) => core.deleteProofSchema(proofSchemaId),
114
- {
115
- onSuccess: async (_, proofSchemaId) => {
116
- await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);
117
- await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
118
- await queryClient.removeQueries([PROOF_SCHEMA_DETAIL_QUERY_KEY, proofSchemaId]);
119
- },
109
+ return useMutation(async (proofSchemaId: ProofSchemaListItem['id']) => core.deleteProofSchema(proofSchemaId), {
110
+ onSuccess: async (_, proofSchemaId) => {
111
+ await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);
112
+ await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
113
+ await queryClient.removeQueries([PROOF_SCHEMA_DETAIL_QUERY_KEY, proofSchemaId]);
120
114
  },
121
- );
115
+ });
122
116
  };
123
117
 
124
118
  export const useShareProofSchema = (schemaId?: string) => {
@@ -1,17 +1,17 @@
1
1
  import {
2
- Config,
3
- CreateProofRequestBindingDto,
4
- GetProofSchemaBindingDto,
5
- HistoryActionBindingEnum,
6
- HistoryEntityTypeBindingEnum,
7
- HistoryErrorMetadataBindingDto,
8
- IdentifierListQueryBindingDto,
2
+ CoreConfig,
3
+ CreateProofRequest,
4
+ HistoryAction,
5
+ HistoryEntityType,
6
+ HistoryErrorMetadata,
7
+ IdentifierListQuery,
9
8
  OneError,
10
- PresentationSubmitCredentialRequestBindingDto,
11
- ProofListQueryBindingDto,
12
- ProofStateBindingEnum,
13
- ProposeProofRequestBindingDto,
14
- ShareProofRequestBindingDto,
9
+ PresentationSubmitCredentialRequest,
10
+ ProofListQuery,
11
+ ProofSchemaDetail,
12
+ ProofState,
13
+ ProposeProofRequest,
14
+ ShareProofRequest,
15
15
  } from '@procivis/react-native-one-core';
16
16
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17
17
  import { useMutation, useQuery, useQueryClient } from 'react-query';
@@ -51,18 +51,18 @@ export const useProofState = (proofId: string | undefined, isPolling: boolean) =
51
51
  }
52
52
 
53
53
  const state = await core.getProof(proofId).then((proof) => proof.state);
54
- let metadata: HistoryErrorMetadataBindingDto | undefined;
55
- if (state === ProofStateBindingEnum.ERROR) {
54
+ let metadata: HistoryErrorMetadata | undefined;
55
+ if (state === ProofState.ERROR) {
56
56
  metadata = await core
57
- .getHistoryList({
57
+ .listHistory({
58
58
  organisationId,
59
59
  page: 0,
60
60
  pageSize: 1,
61
61
  entityIds: [proofId],
62
- entityTypes: [HistoryEntityTypeBindingEnum.PROOF],
63
- actions: [HistoryActionBindingEnum.ERRORED],
62
+ entityTypes: [HistoryEntityType.PROOF],
63
+ actions: [HistoryAction.ERRORED],
64
64
  })
65
- .then((result) => result.values[0]?.metadata?.value as HistoryErrorMetadataBindingDto);
65
+ .then((result) => result.values[0]?.metadata?.value as HistoryErrorMetadata);
66
66
  }
67
67
  return { state, metadata };
68
68
  },
@@ -73,7 +73,7 @@ export const useProofState = (proofId: string | undefined, isPolling: boolean) =
73
73
  );
74
74
  };
75
75
 
76
- type ProofUrlHookParams = { proofId: string; request?: ShareProofRequestBindingDto };
76
+ type ProofUrlHookParams = { proofId: string; request?: ShareProofRequest };
77
77
 
78
78
  export const useProofUrl = () => {
79
79
  const queryClient = useQueryClient();
@@ -101,7 +101,7 @@ export const useProofAccept = () => {
101
101
  interactionId,
102
102
  credentials,
103
103
  }: {
104
- credentials: Record<string, PresentationSubmitCredentialRequestBindingDto[]>;
104
+ credentials: Record<string, PresentationSubmitCredentialRequest[]>;
105
105
  interactionId: string;
106
106
  }) => core.holderSubmitProof(interactionId, credentials),
107
107
  {
@@ -151,7 +151,6 @@ export enum VerificationProtocol {
151
151
  OPENID4VP_DRAFT20 = 'OPENID4VP_DRAFT20',
152
152
  OPENID4VP_DRAFT25 = 'OPENID4VP_DRAFT25',
153
153
  OPENID4VP_PROXIMITY_DRAFT00 = 'OPENID4VP_PROXIMITY_DRAFT00',
154
- SCAN_TO_VERIFY = 'SCAN_TO_VERIFY',
155
154
  }
156
155
 
157
156
  export enum VerificationEngagement {
@@ -164,8 +163,7 @@ export const useProposeProof = () => {
164
163
  const { core, organisationId } = useONECore();
165
164
 
166
165
  return useMutation(
167
- async (request: Omit<ProposeProofRequestBindingDto, 'organisationId'>) =>
168
- core.proposeProof({ organisationId, ...request }),
166
+ async (request: Omit<ProposeProofRequest, 'organisationId'>) => core.proposeProof({ organisationId, ...request }),
169
167
  {
170
168
  onSuccess: async () => {
171
169
  await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);
@@ -199,7 +197,7 @@ export const useProofDelete = () => {
199
197
  );
200
198
  };
201
199
 
202
- export const useProofs = (queryParams?: Partial<ProofListQueryBindingDto>) => {
200
+ export const useProofs = (queryParams?: Partial<ProofListQuery>) => {
203
201
  const { core, organisationId } = useONECore();
204
202
 
205
203
  const queryKey = [PROOF_LIST_QUERY_KEY, ...getQueryKeyFromProofListQueryParams(queryParams)];
@@ -207,7 +205,7 @@ export const useProofs = (queryParams?: Partial<ProofListQueryBindingDto>) => {
207
205
  return useQuery(
208
206
  queryKey,
209
207
  ({ pageParam = 0 }) =>
210
- core.getProofs({
208
+ core.listProofs({
211
209
  organisationId,
212
210
  page: pageParam,
213
211
  pageSize: PAGE_SIZE,
@@ -224,7 +222,7 @@ export const useProofCreate = () => {
224
222
 
225
223
  const { core } = useONECore();
226
224
 
227
- return useMutation(async (data: CreateProofRequestBindingDto) => core.createProof(data), {
225
+ return useMutation(async (data: CreateProofRequest) => core.createProof(data), {
228
226
  onSuccess: async () => {
229
227
  await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);
230
228
  await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
@@ -233,9 +231,9 @@ export const useProofCreate = () => {
233
231
  };
234
232
 
235
233
  const getIdentifierFilterForProofSchema = (
236
- proofSchema: GetProofSchemaBindingDto,
237
- config: Config,
238
- ): Partial<IdentifierListQueryBindingDto> => {
234
+ proofSchema: ProofSchemaDetail,
235
+ config: CoreConfig,
236
+ ): Partial<IdentifierListQuery> => {
239
237
  const requestedFormats = proofSchema.proofInputSchemas.map((schema) => schema.credentialSchema.format);
240
238
  const requestedFormatsCapabilities = requestedFormats
241
239
  .map((format) => config.format[format]?.capabilities)
@@ -284,6 +282,15 @@ export const useProofForSchemaIdWithTransport = (
284
282
  setProofIdState(id);
285
283
  }, []);
286
284
 
285
+ const retract = useCallback(async () => {
286
+ const id = proofIdRef.current;
287
+ if (!id) {
288
+ return;
289
+ }
290
+ setProofId(undefined);
291
+ await deleteProof(id).catch(() => {});
292
+ }, [deleteProof, setProofId]);
293
+
287
294
  useEffect(() => {
288
295
  if (!proofIdRef.current) {
289
296
  return;
@@ -302,7 +309,7 @@ export const useProofForSchemaIdWithTransport = (
302
309
  return;
303
310
  }
304
311
 
305
- if (proofState?.state !== ProofStateBindingEnum.CREATED && proofState?.state !== ProofStateBindingEnum.PENDING) {
312
+ if (proofState?.state !== ProofState.CREATED && proofState?.state !== ProofState.PENDING) {
306
313
  setProofId(undefined);
307
314
  } else {
308
315
  setDeleting(true);
@@ -341,7 +348,7 @@ export const useProofForSchemaIdWithTransport = (
341
348
  .catch(() => {});
342
349
  }, [proofSchemaId, identifiers, identifierFilter, createProof, enabled, transport, proofId, setProofId, deleting]);
343
350
 
344
- return deleting ? undefined : proofId;
351
+ return { proofId: deleting ? undefined : proofId, retract };
345
352
  };
346
353
 
347
354
  export const useCleanupUnusedProofs = () => {
@@ -349,7 +356,7 @@ export const useCleanupUnusedProofs = () => {
349
356
  const { data: proofs } = useProofs({
350
357
  page: 0,
351
358
  pageSize: 100,
352
- proofStates: [ProofStateBindingEnum.CREATED, ProofStateBindingEnum.PENDING],
359
+ proofStates: [ProofState.CREATED, ProofState.PENDING],
353
360
  });
354
361
  const [cleaned, setCleaned] = useState(false);
355
362
 
@@ -374,7 +381,7 @@ export const useShareProof = (proofUrlProps: ProofUrlHookParams | undefined, ena
374
381
 
375
382
  // reset when proofId changes or the proof was retracted
376
383
  useEffect(() => {
377
- if (!proofUrlProps?.proofId || proofState?.state === ProofStateBindingEnum.CREATED) {
384
+ if (!proofUrlProps?.proofId || proofState?.state === ProofState.CREATED) {
378
385
  setSharedProof(undefined);
379
386
  }
380
387
  }, [proofUrlProps?.proofId, proofState]);
@@ -410,7 +417,7 @@ export const useRetainProofCheck = (proofId?: string) => {
410
417
 
411
418
  const { core } = useONECore();
412
419
 
413
- return useMutation(async () => core.runTask('RETAIN_PROOF_CHECK'), {
420
+ return useMutation(async () => core.runTask('RETAIN_PROOF_CHECK', undefined), {
414
421
  onSuccess: async () => {
415
422
  if (proofId) {
416
423
  await queryClient.removeQueries([PROOF_DETAIL_QUERY_KEY, proofId]);
@@ -441,12 +448,12 @@ export const useDeleteAllProofsData = (schemaId: string) => {
441
448
  return useMutation(
442
449
  async () =>
443
450
  core
444
- .getProofs({
451
+ .listProofs({
445
452
  organisationId,
446
453
  page: 0,
447
454
  pageSize: 1000,
448
455
  proofSchemaIds: [schemaId],
449
- proofStates: [ProofStateBindingEnum.ACCEPTED],
456
+ proofStates: [ProofState.ACCEPTED],
450
457
  })
451
458
  .then((result) => Promise.all(result.values.reverse().map((proof) => core.deleteProofClaims(proof.id)))),
452
459
  {
@@ -1,10 +1,10 @@
1
1
  import {
2
- CreateRemoteTrustEntityRequestBindingDto,
3
- GetTrustAnchorResponseBindingDto,
4
- IdentifierTypeBindingEnum,
2
+ CreateRemoteTrustEntityRequest,
3
+ IdentifierType,
5
4
  ONECore,
6
5
  OneError,
7
- UpdateRemoteTrustEntityFromDidRequestBindingDto,
6
+ TrustAnchorDetail,
7
+ UpdateRemoteTrustEntityRequest,
8
8
  } from '@procivis/react-native-one-core';
9
9
  import { useCallback } from 'react';
10
10
  import { useMutation, useQuery, useQueryClient } from 'react-query';
@@ -31,7 +31,7 @@ export const useCreateTrustAnchor = () => {
31
31
  if (trustAnchors.values.length > 0) {
32
32
  return;
33
33
  }
34
- const response = await httpClient.get<GetTrustAnchorResponseBindingDto>(publisherReference);
34
+ const response = await httpClient.get<TrustAnchorDetail>(publisherReference);
35
35
  if (!response.ok || !response.data) {
36
36
  return;
37
37
  }
@@ -66,7 +66,7 @@ export const useTrustEntity = (identifierId: string | undefined) => {
66
66
  identifiers: [
67
67
  {
68
68
  certificateId:
69
- identifierDetail?.type === IdentifierTypeBindingEnum.CERTIFICATE
69
+ identifierDetail?.type === IdentifierType.CERTIFICATE
70
70
  ? identifierDetail.certificates?.[0]?.id
71
71
  : undefined,
72
72
  id: identifierId,
@@ -110,9 +110,7 @@ export const useCreateRemoteTrustEntity = () => {
110
110
  const { core } = useONECore();
111
111
 
112
112
  return useMutation(
113
- async (
114
- request: Omit<CreateRemoteTrustEntityRequestBindingDto, 'didId'> & { identifierId?: string; didId?: string },
115
- ) => {
113
+ async (request: Omit<CreateRemoteTrustEntityRequest, 'didId'> & { identifierId?: string; didId?: string }) => {
116
114
  const { identifierId, didId } = request;
117
115
 
118
116
  let entityDidId = didId;
@@ -142,7 +140,7 @@ export const useUpdateRemoteTrustEntity = () => {
142
140
 
143
141
  return useMutation(
144
142
  async (
145
- request: Omit<UpdateRemoteTrustEntityFromDidRequestBindingDto, 'didId'> & {
143
+ request: Omit<UpdateRemoteTrustEntityRequest, 'didId'> & {
146
144
  identifierId?: string;
147
145
  didId?: string;
148
146
  },
@@ -0,0 +1,29 @@
1
+ import { useMutation } from 'react-query';
2
+
3
+ import { reportException } from '../../reporting';
4
+ import { useONECore } from './core-context';
5
+ import { HolderWalletUnit } from '@procivis/react-native-one-core';
6
+
7
+ export const useTrustCollectionSync = () => {
8
+ const { core } = useONECore();
9
+
10
+ return useMutation(
11
+ async (params: { holderWalletUnitId?: HolderWalletUnit['id']; verifierInstanceId?: string }) =>
12
+ core.runTask('TRUST_COLLECTION_SYNC', JSON.stringify(params)),
13
+ {
14
+ onError: (err) => {
15
+ reportException(err, 'TRUST_COLLECTION_SYNC error');
16
+ },
17
+ },
18
+ );
19
+ };
20
+
21
+ export const useTrustListSubscriptionUpdate = () => {
22
+ const { core } = useONECore();
23
+
24
+ return useMutation(async () => core.runTask('TRUST_LIST_SUBSCRIPTION_UPDATE', undefined), {
25
+ onError: (err) => {
26
+ reportException(err, 'TRUST_LIST_SUBSCRIPTION_UPDATE error');
27
+ },
28
+ });
29
+ };