@procivis/one-react-native-components 0.3.95 → 0.3.102
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.
- package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
- package/lib/commonjs/components/credential/credential.js.map +1 -1
- package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +2 -2
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details.js +3 -3
- package/lib/commonjs/components/entity/entity-details.js.map +1 -1
- package/lib/commonjs/components/history/history-details-screen.js +10 -10
- package/lib/commonjs/components/history/history-details-screen.js.map +1 -1
- package/lib/commonjs/components/history/history-list-item-icon.js +10 -8
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
- package/lib/commonjs/components/history/history-list-item.js.map +1 -1
- package/lib/commonjs/components/history/history-list-screen.js +1 -0
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
- package/lib/commonjs/components/history/history-list-section-header.js +1 -1
- package/lib/commonjs/components/history/history-list-section-header.js.map +1 -1
- package/lib/commonjs/components/history/history-list.js.map +1 -1
- package/lib/commonjs/components/proof-request/share-credential-card-notice.js.map +1 -1
- package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/v1/share-credential.js +1 -1
- package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +3 -2
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +3 -2
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale/fi.json +1 -1
- package/lib/commonjs/ui-components/buttons/connectivity-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/filter-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/ghost-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/hold-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/scan-button.js +3 -0
- package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/share-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/share-button.js.map +1 -1
- package/lib/commonjs/ui-components/control/checkbox.js +1 -0
- package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-card.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-header.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +2 -0
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +1 -0
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js +2 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector.js +1 -0
- package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
- package/lib/commonjs/ui-components/entity/avatar.js +1 -0
- package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
- package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/header/navigation-header.js +1 -0
- package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-details.js +3 -1
- package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-header.js +1 -1
- package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/history.js +1 -0
- package/lib/commonjs/ui-components/icons/history.js.map +1 -1
- package/lib/commonjs/ui-components/pin/keypad.js +1 -0
- package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pins.js +1 -0
- package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/commonjs/ui-components/settings/button-setting.js +3 -1
- package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item.js +5 -2
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/settings-button.js +1 -0
- package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
- package/lib/commonjs/ui-components/settings/switch-setting.js +4 -2
- package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/backup.js +3 -3
- package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/cache.js +10 -10
- package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-context.js +5 -5
- package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credentials.js +3 -3
- package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/history.js +1 -1
- package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/identifiers.js +3 -3
- package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proofs.js +9 -9
- package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/trust-entity.js +5 -5
- package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/wallet-unit.js +1 -1
- package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js +11 -10
- package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js +11 -8
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +2 -2
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +29 -16
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/commonjs/utils/parsers/query.js.map +1 -1
- package/lib/commonjs/utils/url.js.map +1 -1
- package/lib/module/components/backup/preview-credentials.js.map +1 -1
- package/lib/module/components/credential/credential.js.map +1 -1
- package/lib/module/components/entity/EntityButtons.js.map +1 -1
- package/lib/module/components/entity/entity-attributes.js.map +1 -1
- package/lib/module/components/entity/entity-details-with-buttons.js +3 -3
- package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/module/components/entity/entity-details.js +4 -4
- package/lib/module/components/entity/entity-details.js.map +1 -1
- package/lib/module/components/history/history-details-screen.js +11 -11
- package/lib/module/components/history/history-details-screen.js.map +1 -1
- package/lib/module/components/history/history-list-item-icon.js +11 -9
- package/lib/module/components/history/history-list-item-icon.js.map +1 -1
- package/lib/module/components/history/history-list-item.js.map +1 -1
- package/lib/module/components/history/history-list-screen.js +1 -0
- package/lib/module/components/history/history-list-screen.js.map +1 -1
- package/lib/module/components/history/history-list-section-header.js +1 -1
- package/lib/module/components/history/history-list-section-header.js.map +1 -1
- package/lib/module/components/history/history-list.js.map +1 -1
- package/lib/module/components/proof-request/share-credential-card-notice.js.map +1 -1
- package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
- package/lib/module/components/proof-request/v1/share-credential.js +2 -2
- package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js +3 -2
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2.js +3 -2
- package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale/fi.json +1 -1
- package/lib/module/ui-components/buttons/connectivity-button.js +1 -0
- package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/module/ui-components/buttons/filter-button.js +1 -0
- package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/module/ui-components/buttons/ghost-button.js +1 -0
- package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/module/ui-components/buttons/hold-button.js +1 -0
- package/lib/module/ui-components/buttons/hold-button.js.map +1 -1
- package/lib/module/ui-components/buttons/scan-button.js +3 -0
- package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/module/ui-components/buttons/share-button.js +1 -0
- package/lib/module/ui-components/buttons/share-button.js.map +1 -1
- package/lib/module/ui-components/control/checkbox.js +1 -0
- package/lib/module/ui-components/control/checkbox.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-card.js +1 -0
- package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-list-item.js +1 -0
- package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-header.js +1 -0
- package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-image-carousel.js +2 -0
- package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/module/ui-components/credential/credential-attribute-item.js +1 -0
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js +2 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/module/ui-components/credential/selector.js +1 -0
- package/lib/module/ui-components/credential/selector.js.map +1 -1
- package/lib/module/ui-components/entity/avatar.js +1 -0
- package/lib/module/ui-components/entity/avatar.js.map +1 -1
- package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/header/navigation-header.js +1 -0
- package/lib/module/ui-components/header/navigation-header.js.map +1 -1
- package/lib/module/ui-components/history/history-details.js +3 -1
- package/lib/module/ui-components/history/history-details.js.map +1 -1
- package/lib/module/ui-components/history/history-section-header.js +1 -1
- package/lib/module/ui-components/history/history-section-header.js.map +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/module/ui-components/icons/entity.js.map +1 -1
- package/lib/module/ui-components/icons/history.js +1 -0
- package/lib/module/ui-components/icons/history.js.map +1 -1
- package/lib/module/ui-components/pin/keypad.js +1 -0
- package/lib/module/ui-components/pin/keypad.js.map +1 -1
- package/lib/module/ui-components/pin/pins.js +1 -0
- package/lib/module/ui-components/pin/pins.js.map +1 -1
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/module/ui-components/settings/button-setting.js +3 -1
- package/lib/module/ui-components/settings/button-setting.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item.js +5 -2
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/settings-button.js +1 -0
- package/lib/module/ui-components/settings/settings-button.js.map +1 -1
- package/lib/module/ui-components/settings/switch-setting.js +4 -2
- package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/history.js.map +1 -1
- package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/module/utils/hooks/core/backup.js +4 -4
- package/lib/module/utils/hooks/core/backup.js.map +1 -1
- package/lib/module/utils/hooks/core/cache.js +11 -11
- package/lib/module/utils/hooks/core/cache.js.map +1 -1
- package/lib/module/utils/hooks/core/core-context.js +5 -5
- package/lib/module/utils/hooks/core/core-context.js.map +1 -1
- package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/credentials.js +4 -4
- package/lib/module/utils/hooks/core/credentials.js.map +1 -1
- package/lib/module/utils/hooks/core/dids.js +2 -2
- package/lib/module/utils/hooks/core/dids.js.map +1 -1
- package/lib/module/utils/hooks/core/history.js +1 -1
- package/lib/module/utils/hooks/core/history.js.map +1 -1
- package/lib/module/utils/hooks/core/identifiers.js +4 -4
- package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
- package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/proofs.js +10 -10
- package/lib/module/utils/hooks/core/proofs.js.map +1 -1
- package/lib/module/utils/hooks/core/trust-entity.js +6 -6
- package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/module/utils/hooks/core/wallet-unit.js +2 -2
- package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/module/utils/hooks/revocation/credential-status.js +2 -2
- package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/module/utils/parsers/credential-images.js +12 -11
- package/lib/module/utils/parsers/credential-images.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing-v2.js +11 -8
- package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +2 -2
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +30 -17
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/module/utils/parsers/query.js.map +1 -1
- package/lib/module/utils/url.js.map +1 -1
- package/lib/typescript/components/backup/preview-credentials.d.ts +2 -2
- package/lib/typescript/components/credential/credential.d.ts +2 -2
- package/lib/typescript/components/entity/EntityButtons.d.ts +2 -2
- package/lib/typescript/components/entity/entity-attributes.d.ts +2 -2
- package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -3
- package/lib/typescript/components/entity/entity-details.d.ts +5 -5
- package/lib/typescript/components/history/history-details-screen.d.ts +2 -2
- package/lib/typescript/components/history/history-list-item-icon.d.ts +3 -3
- package/lib/typescript/components/history/history-list-item.d.ts +5 -5
- package/lib/typescript/components/history/history-list-screen.d.ts +4 -4
- package/lib/typescript/components/history/history-list.d.ts +5 -5
- package/lib/typescript/components/proof-request/v1/select-credential.d.ts +2 -2
- package/lib/typescript/components/proof-request/v1/share-credential.d.ts +6 -6
- package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +3 -3
- package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +4 -4
- package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +5 -5
- package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +2 -2
- package/lib/typescript/ui-components/settings/setting-item.d.ts +1 -0
- package/lib/typescript/utils/history.d.ts +3 -3
- package/lib/typescript/utils/hooks/core/backup.d.ts +3 -3
- package/lib/typescript/utils/hooks/core/cache.d.ts +2 -2
- package/lib/typescript/utils/hooks/core/core-context.d.ts +1 -1
- package/lib/typescript/utils/hooks/core/credential-schemas.d.ts +6 -6
- package/lib/typescript/utils/hooks/core/credentials.d.ts +8 -8
- package/lib/typescript/utils/hooks/core/dids.d.ts +2 -2
- package/lib/typescript/utils/hooks/core/history.d.ts +2 -2
- package/lib/typescript/utils/hooks/core/identifiers.d.ts +3 -3
- package/lib/typescript/utils/hooks/core/proof-schemas.d.ts +7 -7
- package/lib/typescript/utils/hooks/core/proofs.d.ts +9 -9
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -6
- package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +5 -5
- package/lib/typescript/utils/parsers/credential-images.d.ts +2 -2
- package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +7 -7
- package/lib/typescript/utils/parsers/credential-sharing.d.ts +8 -8
- package/lib/typescript/utils/parsers/credential.d.ts +11 -37
- package/lib/typescript/utils/parsers/query.d.ts +8 -8
- package/package.json +6 -4
- package/src/components/backup/preview-credentials.tsx +2 -2
- package/src/components/credential/credential.tsx +2 -2
- package/src/components/entity/EntityButtons.tsx +2 -2
- package/src/components/entity/entity-attributes.tsx +4 -4
- package/src/components/entity/entity-details-with-buttons.tsx +11 -6
- package/src/components/entity/entity-details.tsx +17 -16
- package/src/components/history/history-details-screen.tsx +13 -16
- package/src/components/history/history-list-item-icon.tsx +17 -11
- package/src/components/history/history-list-item.tsx +9 -5
- package/src/components/history/history-list-screen.tsx +5 -4
- package/src/components/history/history-list-section-header.tsx +1 -1
- package/src/components/history/history-list.tsx +6 -6
- package/src/components/proof-request/share-credential-card-notice.tsx +1 -1
- package/src/components/proof-request/v1/select-credential.tsx +2 -2
- package/src/components/proof-request/v1/share-credential.tsx +13 -11
- package/src/components/proof-request/v2/select-credential-v2.tsx +6 -3
- package/src/components/proof-request/v2/share-credential-v2-group.tsx +13 -12
- package/src/components/proof-request/v2/share-credential-v2.tsx +12 -11
- package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +4 -1
- package/src/ui-components/accessibility/locale/fi.json +1 -1
- package/src/ui-components/buttons/connectivity-button.tsx +1 -0
- package/src/ui-components/buttons/filter-button.tsx +1 -0
- package/src/ui-components/buttons/ghost-button.stories.tsx +0 -1
- package/src/ui-components/buttons/ghost-button.tsx +1 -0
- package/src/ui-components/buttons/hold-button.tsx +1 -0
- package/src/ui-components/buttons/scan-button.tsx +3 -0
- package/src/ui-components/buttons/share-button.tsx +1 -0
- package/src/ui-components/control/checkbox.stories.tsx +1 -1
- package/src/ui-components/control/checkbox.tsx +1 -0
- package/src/ui-components/control/switch.stories.tsx +1 -1
- package/src/ui-components/credential/card/credential-card.tsx +1 -0
- package/src/ui-components/credential/card/credential-details-card.tsx +2 -0
- package/src/ui-components/credential/card/credential-details-list-item.tsx +1 -0
- package/src/ui-components/credential/card/credential-header.stories.tsx +0 -1
- package/src/ui-components/credential/card/credential-header.tsx +1 -0
- package/src/ui-components/credential/card/credential-image-carousel.tsx +2 -2
- package/src/ui-components/credential/credential-attribute-item.tsx +1 -0
- package/src/ui-components/credential/credential-carousel-images.tsx +1 -0
- package/src/ui-components/credential/selector.tsx +1 -0
- package/src/ui-components/entity/avatar.tsx +1 -0
- package/src/ui-components/entity/entity-cluster.tsx +7 -6
- package/src/ui-components/header/foldable-header.tsx +8 -11
- package/src/ui-components/header/navigation-header.tsx +1 -0
- package/src/ui-components/history/history-details.tsx +2 -0
- package/src/ui-components/history/history-section-header.tsx +1 -1
- package/src/ui-components/history/history-section-list-item.tsx +1 -1
- package/src/ui-components/icons/entity.tsx +2 -2
- package/src/ui-components/icons/history.tsx +1 -0
- package/src/ui-components/pin/keypad.tsx +1 -0
- package/src/ui-components/pin/pin-code-screen.stories.tsx +1 -1
- package/src/ui-components/pin/pins.tsx +1 -0
- package/src/ui-components/screens/image-preview-screen.stories.tsx +1 -1
- package/src/ui-components/screens/nerd-mode-screen.tsx +2 -2
- package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +1 -1
- package/src/ui-components/screens/section-list-screen.tsx +10 -1
- package/src/ui-components/searchbar/search-bar.stories.tsx +0 -1
- package/src/ui-components/settings/button-setting.tsx +2 -1
- package/src/ui-components/settings/setting-item.tsx +10 -2
- package/src/ui-components/settings/settings-button.tsx +1 -0
- package/src/ui-components/settings/switch-setting.tsx +9 -2
- package/src/ui-components/text/typography.stories.tsx +2 -2
- package/src/utils/date.ts +2 -2
- package/src/utils/history.ts +4 -4
- package/src/utils/hooks/connectivity/connectivity.test.ts +2 -2
- package/src/utils/hooks/core/backup.ts +4 -4
- package/src/utils/hooks/core/cache.ts +13 -13
- package/src/utils/hooks/core/core-context.tsx +6 -6
- package/src/utils/hooks/core/credential-schemas.ts +7 -4
- package/src/utils/hooks/core/credentials.ts +21 -13
- package/src/utils/hooks/core/dids.ts +3 -3
- package/src/utils/hooks/core/history.ts +3 -3
- package/src/utils/hooks/core/identifiers.ts +9 -5
- package/src/utils/hooks/core/proof-schemas.ts +21 -16
- package/src/utils/hooks/core/proofs.ts +31 -27
- package/src/utils/hooks/core/trust-entity.ts +19 -12
- package/src/utils/hooks/core/wallet-unit.ts +21 -11
- package/src/utils/hooks/navigation/open-settings.ts +1 -1
- package/src/utils/hooks/revocation/credential-status.ts +2 -2
- package/src/utils/parsers/credential-images.tsx +19 -13
- package/src/utils/parsers/credential-sharing-v2.tsx +29 -24
- package/src/utils/parsers/credential-sharing.tsx +24 -24
- package/src/utils/parsers/credential.ts +63 -40
- package/src/utils/parsers/query.ts +16 -14
- package/src/utils/url.ts +1 -1
|
@@ -29,19 +29,19 @@ const defaultContextValue: ContextValue = {
|
|
|
29
29
|
export type ONECoreContextProviderProps = {
|
|
30
30
|
config?: Record<string, unknown>;
|
|
31
31
|
organisationId?: string;
|
|
32
|
-
publisherReference
|
|
32
|
+
publisherReference?: string;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const ONECoreContext = createContext<ContextValue>(defaultContextValue);
|
|
36
36
|
|
|
37
37
|
export const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProviderProps>> = ({
|
|
38
38
|
children,
|
|
39
|
-
organisationId =
|
|
39
|
+
organisationId = defaultContextValue.organisationId,
|
|
40
40
|
publisherReference,
|
|
41
41
|
config,
|
|
42
42
|
}) => {
|
|
43
43
|
const [core, setCore] = useState<ONECore>();
|
|
44
|
-
const createTrustAnchor = useCreateTrustAnchor(
|
|
44
|
+
const createTrustAnchor = useCreateTrustAnchor();
|
|
45
45
|
|
|
46
46
|
const initialize = useCallback(
|
|
47
47
|
async (force?: boolean) => {
|
|
@@ -77,7 +77,7 @@ export const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProvider
|
|
|
77
77
|
);
|
|
78
78
|
|
|
79
79
|
useEffect(() => {
|
|
80
|
-
if (!core) {
|
|
80
|
+
if (!core || !publisherReference) {
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -89,11 +89,11 @@ export const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProvider
|
|
|
89
89
|
);
|
|
90
90
|
|
|
91
91
|
if (trustManagementEnabled) {
|
|
92
|
-
createTrustAnchor(core).catch(() => {});
|
|
92
|
+
createTrustAnchor(core, publisherReference).catch(() => {});
|
|
93
93
|
}
|
|
94
94
|
})
|
|
95
95
|
.catch(() => {});
|
|
96
|
-
}, [core, createTrustAnchor]);
|
|
96
|
+
}, [core, createTrustAnchor, publisherReference]);
|
|
97
97
|
|
|
98
98
|
const contextValue = useMemo(
|
|
99
99
|
() => ({
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
CredentialSchemaListQueryBindingDto,
|
|
3
|
+
ImportCredentialSchemaRequestSchemaBindingDto,
|
|
4
|
+
} from '@procivis/react-native-one-core';
|
|
2
5
|
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
|
|
3
6
|
|
|
4
7
|
import { getQueryKeyFromCredentialSchemaListQueryParams } from '../../parsers/query';
|
|
@@ -12,7 +15,7 @@ export const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';
|
|
|
12
15
|
export const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';
|
|
13
16
|
export const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';
|
|
14
17
|
|
|
15
|
-
export const useCredentialSchemas = (queryParams?: Partial<
|
|
18
|
+
export const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQueryBindingDto>) => {
|
|
16
19
|
const { core, organisationId } = useONECore();
|
|
17
20
|
|
|
18
21
|
return useInfiniteQuery(
|
|
@@ -43,7 +46,7 @@ export const useCredentialSchemaPreview = (url: string) => {
|
|
|
43
46
|
if (!response.ok) {
|
|
44
47
|
throw response.originalError;
|
|
45
48
|
}
|
|
46
|
-
return response.data as
|
|
49
|
+
return response.data as ImportCredentialSchemaRequestSchemaBindingDto;
|
|
47
50
|
}),
|
|
48
51
|
{
|
|
49
52
|
keepPreviousData: true,
|
|
@@ -56,7 +59,7 @@ export const useCredentialSchemaAccept = () => {
|
|
|
56
59
|
const { core, organisationId } = useONECore();
|
|
57
60
|
|
|
58
61
|
return useMutation(
|
|
59
|
-
async (schema:
|
|
62
|
+
async (schema: ImportCredentialSchemaRequestSchemaBindingDto) =>
|
|
60
63
|
core.importCredentialSchema({
|
|
61
64
|
organisationId,
|
|
62
65
|
schema,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
CredentialListQueryBindingDto,
|
|
3
|
+
CredentialStateBindingEnum,
|
|
4
|
+
HandleInvitationRequestBindingDto,
|
|
5
|
+
HandleInvitationResponseBindingEnum,
|
|
6
|
+
InitiateIssuanceRequestBindingDto,
|
|
7
7
|
OneError,
|
|
8
8
|
} from '@procivis/react-native-one-core';
|
|
9
9
|
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
|
|
@@ -20,7 +20,7 @@ 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<
|
|
23
|
+
export const useCredentials = (queryParams?: Partial<CredentialListQueryBindingDto>) => {
|
|
24
24
|
const { core, organisationId } = useONECore();
|
|
25
25
|
|
|
26
26
|
return useQuery(
|
|
@@ -31,7 +31,11 @@ export const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {
|
|
|
31
31
|
page: 0,
|
|
32
32
|
// TODO: workaround pagination for now, until it's supported by UI
|
|
33
33
|
pageSize: 10000,
|
|
34
|
-
states: [
|
|
34
|
+
states: [
|
|
35
|
+
CredentialStateBindingEnum.ACCEPTED,
|
|
36
|
+
CredentialStateBindingEnum.SUSPENDED,
|
|
37
|
+
CredentialStateBindingEnum.REVOKED,
|
|
38
|
+
],
|
|
35
39
|
...queryParams,
|
|
36
40
|
});
|
|
37
41
|
return values;
|
|
@@ -42,7 +46,7 @@ export const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {
|
|
|
42
46
|
);
|
|
43
47
|
};
|
|
44
48
|
|
|
45
|
-
export const usePagedCredentials = (queryParams?: Partial<
|
|
49
|
+
export const usePagedCredentials = (queryParams?: Partial<CredentialListQueryBindingDto>) => {
|
|
46
50
|
const { core, organisationId } = useONECore();
|
|
47
51
|
|
|
48
52
|
return useInfiniteQuery(
|
|
@@ -56,7 +60,11 @@ export const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>)
|
|
|
56
60
|
organisationId,
|
|
57
61
|
page: pageParam,
|
|
58
62
|
pageSize: PAGE_SIZE,
|
|
59
|
-
states: [
|
|
63
|
+
states: [
|
|
64
|
+
CredentialStateBindingEnum.ACCEPTED,
|
|
65
|
+
CredentialStateBindingEnum.SUSPENDED,
|
|
66
|
+
CredentialStateBindingEnum.REVOKED,
|
|
67
|
+
],
|
|
60
68
|
...queryParams,
|
|
61
69
|
}),
|
|
62
70
|
{
|
|
@@ -84,11 +92,11 @@ export const useInvitationHandler = () => {
|
|
|
84
92
|
const { core, organisationId } = useONECore();
|
|
85
93
|
|
|
86
94
|
return useMutation(
|
|
87
|
-
async (request: Omit<
|
|
95
|
+
async (request: Omit<HandleInvitationRequestBindingDto, 'organisationId'>) =>
|
|
88
96
|
core.handleInvitation({ organisationId, ...request }),
|
|
89
97
|
{
|
|
90
|
-
onSuccess: async (result:
|
|
91
|
-
if ('
|
|
98
|
+
onSuccess: async (result: HandleInvitationResponseBindingEnum) => {
|
|
99
|
+
if (result.type_ === 'PROOF_REQUEST') {
|
|
92
100
|
await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);
|
|
93
101
|
} else {
|
|
94
102
|
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
@@ -189,7 +197,7 @@ export const useInitiateIssuance = () => {
|
|
|
189
197
|
const { core, organisationId } = useONECore();
|
|
190
198
|
|
|
191
199
|
return useMutation(
|
|
192
|
-
async (request: Omit<
|
|
200
|
+
async (request: Omit<InitiateIssuanceRequestBindingDto, 'organisationId'>) =>
|
|
193
201
|
core.initiateIssuance({ organisationId, ...request }),
|
|
194
202
|
{
|
|
195
203
|
onSuccess: async () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DidListQueryBindingDto, DidTypeBindingEnum } from '@procivis/react-native-one-core';
|
|
2
2
|
import { useQuery } from 'react-query';
|
|
3
3
|
|
|
4
4
|
import { getQueryKeyFromDidListQueryParams } from '../../parsers/query';
|
|
@@ -7,7 +7,7 @@ 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<
|
|
10
|
+
export const useDids = (queryParams?: Partial<DidListQueryBindingDto>) => {
|
|
11
11
|
const { core, organisationId } = useONECore();
|
|
12
12
|
|
|
13
13
|
return useQuery(
|
|
@@ -18,7 +18,7 @@ export const useDids = (queryParams?: Partial<DidListQuery>) => {
|
|
|
18
18
|
organisationId,
|
|
19
19
|
page: pageParam,
|
|
20
20
|
pageSize: PAGE_SIZE,
|
|
21
|
-
type:
|
|
21
|
+
type: DidTypeBindingEnum.LOCAL,
|
|
22
22
|
...queryParams,
|
|
23
23
|
});
|
|
24
24
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HistoryListQueryBindingDto } 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<
|
|
10
|
+
export const useHistory = (queryParams?: Partial<HistoryListQueryBindingDto>) => {
|
|
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.
|
|
16
|
+
const historyPage = await core.getHistoryList({
|
|
17
17
|
organisationId,
|
|
18
18
|
page: pageParam,
|
|
19
19
|
pageSize: PAGE_SIZE,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IdentifierListQueryBindingDto,
|
|
3
|
+
IdentifierStateBindingEnum,
|
|
4
|
+
IdentifierTypeBindingEnum,
|
|
5
|
+
} from '@procivis/react-native-one-core';
|
|
2
6
|
import { useQuery } from 'react-query';
|
|
3
7
|
|
|
4
8
|
import { getQueryKeyFromIdentifierListQueryParams } from '../../parsers';
|
|
@@ -21,17 +25,17 @@ export const useIdentifierDetails = (identifierId: string | undefined) => {
|
|
|
21
25
|
);
|
|
22
26
|
};
|
|
23
27
|
|
|
24
|
-
export const useIdentifiers = (identifierFilter?: Partial<
|
|
28
|
+
export const useIdentifiers = (identifierFilter?: Partial<IdentifierListQueryBindingDto>) => {
|
|
25
29
|
const { core, organisationId } = useONECore();
|
|
26
30
|
|
|
27
31
|
return useQuery(
|
|
28
32
|
[IDENTIFIER_LIST_QUERY_KEY, ...getQueryKeyFromIdentifierListQueryParams(identifierFilter)],
|
|
29
33
|
({ pageParam = 0 }) =>
|
|
30
|
-
core.
|
|
31
|
-
types: [
|
|
34
|
+
core.listIdentifiers({
|
|
35
|
+
types: [IdentifierTypeBindingEnum.DID],
|
|
32
36
|
isRemote: false,
|
|
33
37
|
page: pageParam,
|
|
34
|
-
states: [
|
|
38
|
+
states: [IdentifierStateBindingEnum.ACTIVE],
|
|
35
39
|
organisationId: organisationId,
|
|
36
40
|
pageSize: PAGE_SIZE,
|
|
37
41
|
...identifierFilter,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
ProofSchemaListQuery,
|
|
2
|
+
CreateProofSchemaRequestDto,
|
|
3
|
+
GetProofSchemaListItemBindingDto,
|
|
4
|
+
ImportProofSchemaBindingDto,
|
|
5
|
+
ListProofSchemasFiltersBindingDto,
|
|
7
6
|
} from '@procivis/react-native-one-core';
|
|
8
7
|
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
|
|
9
8
|
|
|
@@ -19,7 +18,7 @@ export const PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY = 'proof-schema-import';
|
|
|
19
18
|
export const PROOF_SCHEMA_DETAIL_QUERY_KEY = 'proof-schema-detail';
|
|
20
19
|
export const PROOF_SCHEMA_SHARE_QUERY_KEY = 'proof-schema-share';
|
|
21
20
|
|
|
22
|
-
export const useProofSchemas = (queryParams?: Partial<
|
|
21
|
+
export const useProofSchemas = (queryParams?: Partial<ListProofSchemasFiltersBindingDto>, keepPreviousData = true) => {
|
|
23
22
|
const { core, organisationId } = useONECore();
|
|
24
23
|
|
|
25
24
|
return useInfiniteQuery(
|
|
@@ -40,7 +39,10 @@ export const useProofSchemas = (queryParams?: Partial<ProofSchemaListQuery>, kee
|
|
|
40
39
|
);
|
|
41
40
|
};
|
|
42
41
|
|
|
43
|
-
export const useProofSchemaDetail = (
|
|
42
|
+
export const useProofSchemaDetail = (
|
|
43
|
+
proofSchemaId: GetProofSchemaListItemBindingDto['id'] | undefined,
|
|
44
|
+
active = true,
|
|
45
|
+
) => {
|
|
44
46
|
const { core } = useONECore();
|
|
45
47
|
|
|
46
48
|
return useQuery(
|
|
@@ -63,7 +65,7 @@ export const useProofSchemaImportDetail = (url: string) => {
|
|
|
63
65
|
if (!response.ok) {
|
|
64
66
|
throw response.originalError;
|
|
65
67
|
}
|
|
66
|
-
return response.data as
|
|
68
|
+
return response.data as ImportProofSchemaBindingDto;
|
|
67
69
|
}),
|
|
68
70
|
{
|
|
69
71
|
keepPreviousData: true,
|
|
@@ -76,7 +78,7 @@ export const useProofSchemaAccept = () => {
|
|
|
76
78
|
const { core, organisationId } = useONECore();
|
|
77
79
|
|
|
78
80
|
return useMutation(
|
|
79
|
-
async ({ schema }: { schema:
|
|
81
|
+
async ({ schema }: { schema: ImportProofSchemaBindingDto }) =>
|
|
80
82
|
core.importProofSchema({
|
|
81
83
|
organisationId,
|
|
82
84
|
schema,
|
|
@@ -95,7 +97,7 @@ export const useProofSchemaCreate = () => {
|
|
|
95
97
|
const queryClient = useQueryClient();
|
|
96
98
|
const { core } = useONECore();
|
|
97
99
|
|
|
98
|
-
return useMutation(async (proofSchema:
|
|
100
|
+
return useMutation(async (proofSchema: CreateProofSchemaRequestDto) => core.createProofSchema(proofSchema), {
|
|
99
101
|
onSuccess: async () => {
|
|
100
102
|
await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);
|
|
101
103
|
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
@@ -107,13 +109,16 @@ export const useProofSchemaDelete = () => {
|
|
|
107
109
|
const queryClient = useQueryClient();
|
|
108
110
|
const { core } = useONECore();
|
|
109
111
|
|
|
110
|
-
return useMutation(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
+
},
|
|
115
120
|
},
|
|
116
|
-
|
|
121
|
+
);
|
|
117
122
|
};
|
|
118
123
|
|
|
119
124
|
export const useShareProofSchema = (schemaId?: string) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Config,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
CreateProofRequestBindingDto,
|
|
4
|
+
GetProofSchemaBindingDto,
|
|
5
|
+
HistoryActionBindingEnum,
|
|
6
|
+
HistoryEntityTypeBindingEnum,
|
|
7
|
+
HistoryErrorMetadataBindingDto,
|
|
8
|
+
IdentifierListQueryBindingDto,
|
|
8
9
|
OneError,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ShareProofRequest,
|
|
10
|
+
PresentationSubmitCredentialRequestBindingDto,
|
|
11
|
+
ProofListQueryBindingDto,
|
|
12
|
+
ProofStateBindingEnum,
|
|
13
|
+
ProposeProofRequestBindingDto,
|
|
14
|
+
ShareProofRequestBindingDto,
|
|
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:
|
|
55
|
-
if (state ===
|
|
54
|
+
let metadata: HistoryErrorMetadataBindingDto | undefined;
|
|
55
|
+
if (state === ProofStateBindingEnum.ERROR) {
|
|
56
56
|
metadata = await core
|
|
57
|
-
.
|
|
57
|
+
.getHistoryList({
|
|
58
58
|
organisationId,
|
|
59
59
|
page: 0,
|
|
60
60
|
pageSize: 1,
|
|
61
61
|
entityIds: [proofId],
|
|
62
|
-
entityTypes: [
|
|
63
|
-
actions: [
|
|
62
|
+
entityTypes: [HistoryEntityTypeBindingEnum.PROOF],
|
|
63
|
+
actions: [HistoryActionBindingEnum.ERRORED],
|
|
64
64
|
})
|
|
65
|
-
.then((result) => result.values[0]?.metadata as
|
|
65
|
+
.then((result) => result.values[0]?.metadata?.value as HistoryErrorMetadataBindingDto);
|
|
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?:
|
|
76
|
+
type ProofUrlHookParams = { proofId: string; request?: ShareProofRequestBindingDto };
|
|
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,
|
|
104
|
+
credentials: Record<string, PresentationSubmitCredentialRequestBindingDto[]>;
|
|
105
105
|
interactionId: string;
|
|
106
106
|
}) => core.holderSubmitProof(interactionId, credentials),
|
|
107
107
|
{
|
|
@@ -164,7 +164,8 @@ export const useProposeProof = () => {
|
|
|
164
164
|
const { core, organisationId } = useONECore();
|
|
165
165
|
|
|
166
166
|
return useMutation(
|
|
167
|
-
async (request: Omit<
|
|
167
|
+
async (request: Omit<ProposeProofRequestBindingDto, 'organisationId'>) =>
|
|
168
|
+
core.proposeProof({ organisationId, ...request }),
|
|
168
169
|
{
|
|
169
170
|
onSuccess: async () => {
|
|
170
171
|
await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);
|
|
@@ -198,7 +199,7 @@ export const useProofDelete = () => {
|
|
|
198
199
|
);
|
|
199
200
|
};
|
|
200
201
|
|
|
201
|
-
export const useProofs = (queryParams?: Partial<
|
|
202
|
+
export const useProofs = (queryParams?: Partial<ProofListQueryBindingDto>) => {
|
|
202
203
|
const { core, organisationId } = useONECore();
|
|
203
204
|
|
|
204
205
|
const queryKey = [PROOF_LIST_QUERY_KEY, ...getQueryKeyFromProofListQueryParams(queryParams)];
|
|
@@ -223,7 +224,7 @@ export const useProofCreate = () => {
|
|
|
223
224
|
|
|
224
225
|
const { core } = useONECore();
|
|
225
226
|
|
|
226
|
-
return useMutation(async (data:
|
|
227
|
+
return useMutation(async (data: CreateProofRequestBindingDto) => core.createProof(data), {
|
|
227
228
|
onSuccess: async () => {
|
|
228
229
|
await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);
|
|
229
230
|
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
@@ -231,7 +232,10 @@ export const useProofCreate = () => {
|
|
|
231
232
|
});
|
|
232
233
|
};
|
|
233
234
|
|
|
234
|
-
const getIdentifierFilterForProofSchema = (
|
|
235
|
+
const getIdentifierFilterForProofSchema = (
|
|
236
|
+
proofSchema: GetProofSchemaBindingDto,
|
|
237
|
+
config: Config,
|
|
238
|
+
): Partial<IdentifierListQueryBindingDto> => {
|
|
235
239
|
const requestedFormats = proofSchema.proofInputSchemas.map((schema) => schema.credentialSchema.format);
|
|
236
240
|
const requestedFormatsCapabilities = requestedFormats
|
|
237
241
|
.map((format) => config.format[format]?.capabilities)
|
|
@@ -298,7 +302,7 @@ export const useProofForSchemaIdWithTransport = (
|
|
|
298
302
|
return;
|
|
299
303
|
}
|
|
300
304
|
|
|
301
|
-
if (proofState?.state !==
|
|
305
|
+
if (proofState?.state !== ProofStateBindingEnum.CREATED && proofState?.state !== ProofStateBindingEnum.PENDING) {
|
|
302
306
|
setProofId(undefined);
|
|
303
307
|
} else {
|
|
304
308
|
setDeleting(true);
|
|
@@ -345,7 +349,7 @@ export const useCleanupUnusedProofs = () => {
|
|
|
345
349
|
const { data: proofs } = useProofs({
|
|
346
350
|
page: 0,
|
|
347
351
|
pageSize: 100,
|
|
348
|
-
proofStates: [
|
|
352
|
+
proofStates: [ProofStateBindingEnum.CREATED, ProofStateBindingEnum.PENDING],
|
|
349
353
|
});
|
|
350
354
|
const [cleaned, setCleaned] = useState(false);
|
|
351
355
|
|
|
@@ -370,7 +374,7 @@ export const useShareProof = (proofUrlProps: ProofUrlHookParams | undefined, ena
|
|
|
370
374
|
|
|
371
375
|
// reset when proofId changes or the proof was retracted
|
|
372
376
|
useEffect(() => {
|
|
373
|
-
if (!proofUrlProps?.proofId || proofState?.state ===
|
|
377
|
+
if (!proofUrlProps?.proofId || proofState?.state === ProofStateBindingEnum.CREATED) {
|
|
374
378
|
setSharedProof(undefined);
|
|
375
379
|
}
|
|
376
380
|
}, [proofUrlProps?.proofId, proofState]);
|
|
@@ -442,7 +446,7 @@ export const useDeleteAllProofsData = (schemaId: string) => {
|
|
|
442
446
|
page: 0,
|
|
443
447
|
pageSize: 1000,
|
|
444
448
|
proofSchemaIds: [schemaId],
|
|
445
|
-
proofStates: [
|
|
449
|
+
proofStates: [ProofStateBindingEnum.ACCEPTED],
|
|
446
450
|
})
|
|
447
451
|
.then((result) => Promise.all(result.values.reverse().map((proof) => core.deleteProofClaims(proof.id)))),
|
|
448
452
|
{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
CreateRemoteTrustEntityRequestBindingDto,
|
|
3
|
+
GetTrustAnchorResponseBindingDto,
|
|
4
|
+
IdentifierTypeBindingEnum,
|
|
4
5
|
ONECore,
|
|
5
6
|
OneError,
|
|
6
|
-
|
|
7
|
-
UpdateRemoteTrustEntityRequest,
|
|
7
|
+
UpdateRemoteTrustEntityFromDidRequestBindingDto,
|
|
8
8
|
} from '@procivis/react-native-one-core';
|
|
9
9
|
import { useCallback } from 'react';
|
|
10
10
|
import { useMutation, useQuery, useQueryClient } from 'react-query';
|
|
@@ -19,19 +19,19 @@ import { useIdentifierDetails } from './identifiers';
|
|
|
19
19
|
export const TRUST_ENTITY_DETAIL_QUERY_KEY = 'trust-entity-detail';
|
|
20
20
|
export const REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY = 'remote-trust-entity-detail';
|
|
21
21
|
|
|
22
|
-
export const useCreateTrustAnchor = (
|
|
22
|
+
export const useCreateTrustAnchor = () => {
|
|
23
23
|
const httpClient = useHTTPClient();
|
|
24
24
|
|
|
25
25
|
return useCallback(
|
|
26
|
-
async (core: ONECore) => {
|
|
27
|
-
const trustAnchors = await core.
|
|
26
|
+
async (core: ONECore, publisherReference: string) => {
|
|
27
|
+
const trustAnchors = await core.listTrustAnchors({
|
|
28
28
|
page: 0,
|
|
29
29
|
pageSize: 1,
|
|
30
30
|
});
|
|
31
31
|
if (trustAnchors.values.length > 0) {
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
const response = await httpClient.get<
|
|
34
|
+
const response = await httpClient.get<GetTrustAnchorResponseBindingDto>(publisherReference);
|
|
35
35
|
if (!response.ok || !response.data) {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
@@ -48,7 +48,7 @@ export const useCreateTrustAnchor = (publisherReference: string) => {
|
|
|
48
48
|
throw err;
|
|
49
49
|
});
|
|
50
50
|
},
|
|
51
|
-
[
|
|
51
|
+
[httpClient],
|
|
52
52
|
);
|
|
53
53
|
};
|
|
54
54
|
|
|
@@ -66,7 +66,7 @@ export const useTrustEntity = (identifierId: string | undefined) => {
|
|
|
66
66
|
identifiers: [
|
|
67
67
|
{
|
|
68
68
|
certificateId:
|
|
69
|
-
identifierDetail?.type ===
|
|
69
|
+
identifierDetail?.type === IdentifierTypeBindingEnum.CERTIFICATE
|
|
70
70
|
? identifierDetail.certificates?.[0]?.id
|
|
71
71
|
: undefined,
|
|
72
72
|
id: identifierId,
|
|
@@ -110,7 +110,9 @@ export const useCreateRemoteTrustEntity = () => {
|
|
|
110
110
|
const { core } = useONECore();
|
|
111
111
|
|
|
112
112
|
return useMutation(
|
|
113
|
-
async (
|
|
113
|
+
async (
|
|
114
|
+
request: Omit<CreateRemoteTrustEntityRequestBindingDto, 'didId'> & { identifierId?: string; didId?: string },
|
|
115
|
+
) => {
|
|
114
116
|
const { identifierId, didId } = request;
|
|
115
117
|
|
|
116
118
|
let entityDidId = didId;
|
|
@@ -139,7 +141,12 @@ export const useUpdateRemoteTrustEntity = () => {
|
|
|
139
141
|
const { core } = useONECore();
|
|
140
142
|
|
|
141
143
|
return useMutation(
|
|
142
|
-
async (
|
|
144
|
+
async (
|
|
145
|
+
request: Omit<UpdateRemoteTrustEntityFromDidRequestBindingDto, 'didId'> & {
|
|
146
|
+
identifierId?: string;
|
|
147
|
+
didId?: string;
|
|
148
|
+
},
|
|
149
|
+
) => {
|
|
143
150
|
const { identifierId, didId } = request;
|
|
144
151
|
|
|
145
152
|
let entityDidId = didId;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
HolderWalletUnitResponseBindingDto,
|
|
3
|
+
WalletProviderBindingDto,
|
|
4
|
+
WalletUnitStatusBindingEnum,
|
|
5
|
+
} from '@procivis/react-native-one-core';
|
|
2
6
|
import { useEffect } from 'react';
|
|
3
7
|
import { useMutation, useQuery, useQueryClient } from 'react-query';
|
|
4
8
|
|
|
@@ -7,7 +11,10 @@ import { useONECore } from './core-context';
|
|
|
7
11
|
|
|
8
12
|
export const WALLET_UNIT_QUERY_KEY = 'wallet-unit';
|
|
9
13
|
|
|
10
|
-
export const useWalletUnitDetail = (
|
|
14
|
+
export const useWalletUnitDetail = (
|
|
15
|
+
walletUnitId: HolderWalletUnitResponseBindingDto['id'] | undefined,
|
|
16
|
+
active = true,
|
|
17
|
+
) => {
|
|
11
18
|
const { core } = useONECore();
|
|
12
19
|
|
|
13
20
|
return useQuery(
|
|
@@ -25,7 +32,7 @@ export const useRegisterWalletUnit = () => {
|
|
|
25
32
|
const { core, organisationId } = useONECore();
|
|
26
33
|
|
|
27
34
|
return useMutation(
|
|
28
|
-
async (walletProvider:
|
|
35
|
+
async (walletProvider: WalletProviderBindingDto) =>
|
|
29
36
|
core.holderRegisterWalletUnit({
|
|
30
37
|
keyType: 'ECDSA',
|
|
31
38
|
organisationId,
|
|
@@ -42,16 +49,19 @@ export const useWalletUnitStatus = () => {
|
|
|
42
49
|
const queryClient = useQueryClient();
|
|
43
50
|
const { core } = useONECore();
|
|
44
51
|
|
|
45
|
-
return useMutation(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
return useMutation(
|
|
53
|
+
async (walletUnitId: HolderWalletUnitResponseBindingDto['id']) => core.holderWalletUnitStatus(walletUnitId),
|
|
54
|
+
{
|
|
55
|
+
onError: async (err) => {
|
|
56
|
+
reportException(err, 'Refresh wallet unit failure');
|
|
57
|
+
await queryClient.invalidateQueries(WALLET_UNIT_QUERY_KEY);
|
|
58
|
+
},
|
|
59
|
+
onSuccess: () => queryClient.invalidateQueries(WALLET_UNIT_QUERY_KEY),
|
|
49
60
|
},
|
|
50
|
-
|
|
51
|
-
});
|
|
61
|
+
);
|
|
52
62
|
};
|
|
53
63
|
|
|
54
|
-
export const useWalletUnitCheck = (walletUnitId:
|
|
64
|
+
export const useWalletUnitCheck = (walletUnitId: HolderWalletUnitResponseBindingDto['id'] | undefined) => {
|
|
55
65
|
const { data: walletUnitDetail, isLoading } = useWalletUnitDetail(walletUnitId);
|
|
56
66
|
const { mutateAsync: refreshWalletUnit, isLoading: isRefreshing, status: refreshStatus } = useWalletUnitStatus();
|
|
57
67
|
|
|
@@ -59,7 +69,7 @@ export const useWalletUnitCheck = (walletUnitId: HolderWalletUnitDetail['id'] |
|
|
|
59
69
|
if (isLoading || refreshStatus !== 'idle') {
|
|
60
70
|
return;
|
|
61
71
|
}
|
|
62
|
-
if (walletUnitId && walletUnitDetail?.status ===
|
|
72
|
+
if (walletUnitId && walletUnitDetail?.status === WalletUnitStatusBindingEnum.ACTIVE) {
|
|
63
73
|
void refreshWalletUnit(walletUnitId);
|
|
64
74
|
}
|
|
65
75
|
}, [isLoading, refreshStatus, walletUnitDetail, refreshWalletUnit, walletUnitId]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CredentialStateBindingEnum } from '@procivis/react-native-one-core';
|
|
2
2
|
import { useIsFocused } from '@react-navigation/native';
|
|
3
3
|
import { useCallback, useRef } from 'react';
|
|
4
4
|
|
|
@@ -18,7 +18,7 @@ export const useCredentialStatusCheck = (credentialIds?: string[], forceRefresh
|
|
|
18
18
|
const { mutateAsync: check } = useCredentialRevocationCheck(forceRefresh);
|
|
19
19
|
const { data: credentials } = useCredentials({
|
|
20
20
|
ids: credentialIds,
|
|
21
|
-
states: [
|
|
21
|
+
states: [CredentialStateBindingEnum.ACCEPTED, CredentialStateBindingEnum.SUSPENDED],
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
const checkCredentialsStatus = useCallback(async () => {
|