@procivis/react-native-one-core 1.115411.0 → 1.115964.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/ch/procivis/one/core/ProcivisOneCoreModule.kt +8 -0
- package/core-sdk.json +6 -6
- package/dist/src/core.d.ts +1 -1
- package/dist/src/core.js +1 -0
- package/dist/src/one-core-uniffi-intf.d.ts +71 -1
- package/ios/ProcivisOneCoreModule.m +5 -0
- package/ios/ProcivisOneCoreModule.swift +13 -0
- package/package.json +1 -1
|
@@ -404,6 +404,14 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
@ReactMethod
|
|
408
|
+
fun holderGetTransactionData(proofId: String, transactionDataId: String, promise: Promise) {
|
|
409
|
+
asyncCall(promise, scope) {
|
|
410
|
+
val transactionData = getCore().holderGetTransactionData(proofId, transactionDataId)
|
|
411
|
+
return@asyncCall convertToRN(transactionData)
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
407
415
|
@ReactMethod
|
|
408
416
|
fun listProofs(query: ReadableMap, promise: Promise) {
|
|
409
417
|
asyncCall(promise, scope) {
|
package/core-sdk.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"android": {
|
|
3
3
|
"debug": {
|
|
4
|
-
"url": "https://onesdk.blob.core.windows.net/core-sdk/
|
|
5
|
-
"sha1": "
|
|
4
|
+
"url": "https://onesdk.blob.core.windows.net/core-sdk/115964/android/onecore-debug.aar",
|
|
5
|
+
"sha1": "c31bdc53088d93e4cf00205e3b7b13b6c7adbe30"
|
|
6
6
|
},
|
|
7
7
|
"release": {
|
|
8
|
-
"url": "https://onesdk.blob.core.windows.net/core-sdk/
|
|
9
|
-
"sha1": "
|
|
8
|
+
"url": "https://onesdk.blob.core.windows.net/core-sdk/115964/android/onecore-release.aar",
|
|
9
|
+
"sha1": "7115c6c8fd0715181890a7613a44318800e530e0"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"ios": {
|
|
13
|
-
"url": "https://onesdk.blob.core.windows.net/core-sdk/
|
|
14
|
-
"sha1": "
|
|
13
|
+
"url": "https://onesdk.blob.core.windows.net/core-sdk/115964/ios/deploy.zip",
|
|
14
|
+
"sha1": "c16efa7d89daccfbaf4b0566742dc33e1f0bafd9"
|
|
15
15
|
}
|
|
16
16
|
}
|
package/dist/src/core.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export interface ONECore extends Omit<OneCore, "version" | "getConfig"> {
|
|
|
10
10
|
* @hidden
|
|
11
11
|
* New Architecture bridgeless issue workaround: see https://github.com/facebook/react-native/issues/43221
|
|
12
12
|
*/
|
|
13
|
-
export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "getOrganisation", "generateKey", "createDid", "listDids", "createIdentifier", "getIdentifier", "listIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "holderRefreshCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinitionV2", "holderRejectProof", "holderSubmitProofV2", "listCredentials", "runTask", "deleteProofClaims", "getCredential", "getCredentialTrustInformation", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "createCredentialSchema", "listCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofTrustInformation", "listProofs", "deleteProof", "proposeProof", "qesAuthorize", "qesSign", "createProofSchema", "listProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "listHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "holderRegisterWalletUnit", "holderActivateWalletUnit", "holderWalletUnitStatus", "holderGetWalletUnit", "holderWalletUnitUpdate", "holderGetWalletUnitTrustCollections", "registerVerifierInstance", "updateVerifierInstance", "getVerifierInstanceTrustCollections", "nfcReadIsoMdlEngagement", "nfcStopIsoMdlEngagement", "uninitialize"];
|
|
13
|
+
export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "getOrganisation", "generateKey", "createDid", "listDids", "createIdentifier", "getIdentifier", "listIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "holderRefreshCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinitionV2", "holderRejectProof", "holderSubmitProofV2", "listCredentials", "runTask", "deleteProofClaims", "getCredential", "getCredentialTrustInformation", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "createCredentialSchema", "listCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofTrustInformation", "holderGetTransactionData", "listProofs", "deleteProof", "proposeProof", "qesAuthorize", "qesSign", "createProofSchema", "listProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "listHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "holderRegisterWalletUnit", "holderActivateWalletUnit", "holderWalletUnitStatus", "holderGetWalletUnit", "holderWalletUnitUpdate", "holderGetWalletUnitTrustCollections", "registerVerifierInstance", "updateVerifierInstance", "getVerifierInstanceTrustCollections", "nfcReadIsoMdlEngagement", "nfcStopIsoMdlEngagement", "uninitialize"];
|
package/dist/src/core.js
CHANGED
|
@@ -232,6 +232,8 @@ export interface CreateProofRequest {
|
|
|
232
232
|
profile?: string;
|
|
233
233
|
/** Use for ISO mDL verification over BLE. */
|
|
234
234
|
engagement?: string;
|
|
235
|
+
/** Optional transaction data to request authorization for. */
|
|
236
|
+
transactionData?: Array<ProofRequestTransactionData>;
|
|
235
237
|
}
|
|
236
238
|
export interface CreateProofSchemaInput {
|
|
237
239
|
credentialSchemaId: string;
|
|
@@ -1220,9 +1222,15 @@ export interface PeripheralDiscoveryData {
|
|
|
1220
1222
|
advertisedServices: Array<string>;
|
|
1221
1223
|
advertisedServiceData?: Record<string, number[]>;
|
|
1222
1224
|
}
|
|
1225
|
+
export interface PresentationDefinitionTransactionData {
|
|
1226
|
+
id: string;
|
|
1227
|
+
type: string;
|
|
1228
|
+
credentialQueryIds: Array<string>;
|
|
1229
|
+
}
|
|
1223
1230
|
export interface PresentationDefinitionV2 {
|
|
1224
1231
|
credentialQueries: Record<string, CredentialQuery>;
|
|
1225
1232
|
credentialSets: Array<CredentialSet>;
|
|
1233
|
+
transactionData: Array<PresentationDefinitionTransactionData>;
|
|
1226
1234
|
}
|
|
1227
1235
|
export interface PresentationDefinitionV2Claim {
|
|
1228
1236
|
path: string;
|
|
@@ -1267,7 +1275,14 @@ export interface PresentationSubmitV2CredentialRequest {
|
|
|
1267
1275
|
* holder selects. Omit entirely or use an empty array if withholding all
|
|
1268
1276
|
* optional claims.
|
|
1269
1277
|
*/
|
|
1270
|
-
userSelections
|
|
1278
|
+
userSelections?: Array<string>;
|
|
1279
|
+
/**
|
|
1280
|
+
* Optional ids of transaction-data entries to bind to this credential.
|
|
1281
|
+
* Entries not listed here are auto-assigned. Ids must reference transaction
|
|
1282
|
+
* data applicable to this credential. Omit entirely or use an empty array
|
|
1283
|
+
* to auto-assign all transaction data.
|
|
1284
|
+
*/
|
|
1285
|
+
transactionDataIds?: Array<string>;
|
|
1271
1286
|
}
|
|
1272
1287
|
export interface ProofClaim {
|
|
1273
1288
|
schema: ProofClaimSchema;
|
|
@@ -1322,6 +1337,8 @@ export interface ProofDetail {
|
|
|
1322
1337
|
profile?: string;
|
|
1323
1338
|
/** Trust information of the verifier, if any. */
|
|
1324
1339
|
trustInformation?: TrustInformation;
|
|
1340
|
+
/** Transaction data attached to this proof request. Present only if the proof role is `VERIFIER`. */
|
|
1341
|
+
transactionData?: Array<TransactionDataResponse>;
|
|
1325
1342
|
}
|
|
1326
1343
|
export interface ProofInput {
|
|
1327
1344
|
/** Set of claims asserted by the shared credential. */
|
|
@@ -1437,6 +1454,18 @@ export interface ProofListQuery {
|
|
|
1437
1454
|
*/
|
|
1438
1455
|
completedDateBefore?: string;
|
|
1439
1456
|
}
|
|
1457
|
+
/** Transaction data to include in a proof request. */
|
|
1458
|
+
export interface ProofRequestTransactionData {
|
|
1459
|
+
/** The transaction data provider to use. */
|
|
1460
|
+
type: string;
|
|
1461
|
+
/**
|
|
1462
|
+
* The credential schemas (of the given proof schema) the transaction data
|
|
1463
|
+
* applies to.
|
|
1464
|
+
*/
|
|
1465
|
+
credentialSchemaIds: Array<string>;
|
|
1466
|
+
/** Type-specific transaction data content, encoded as a JSON string. */
|
|
1467
|
+
data?: string;
|
|
1468
|
+
}
|
|
1440
1469
|
export interface ProofSchemaDetail {
|
|
1441
1470
|
id: string;
|
|
1442
1471
|
createdDate: string;
|
|
@@ -1493,6 +1522,21 @@ export interface ProofSchemaListQuery {
|
|
|
1493
1522
|
export interface ProofSchemaShareResponse {
|
|
1494
1523
|
url: string;
|
|
1495
1524
|
}
|
|
1525
|
+
/** Details of a single (holder-side) transaction data entry of a proof request. */
|
|
1526
|
+
export interface ProofTransactionData {
|
|
1527
|
+
id: string;
|
|
1528
|
+
/** The transaction data provider that validated this entry. */
|
|
1529
|
+
type: string;
|
|
1530
|
+
/** Credential query ids the transaction data is bound to. */
|
|
1531
|
+
credentialQueryIds: Array<string>;
|
|
1532
|
+
/** Grouped key-value data for displaying the transaction to the user. */
|
|
1533
|
+
transactionDataDisplay: Array<TransactionDataDisplay>;
|
|
1534
|
+
/**
|
|
1535
|
+
* The raw transaction data received from the verifier, encoded as a JSON
|
|
1536
|
+
* string.
|
|
1537
|
+
*/
|
|
1538
|
+
rawTransactionData?: string;
|
|
1539
|
+
}
|
|
1496
1540
|
export interface ProposeProofRequest {
|
|
1497
1541
|
protocol: string;
|
|
1498
1542
|
organisationId: string;
|
|
@@ -1591,6 +1635,24 @@ export interface ShareProofResponse {
|
|
|
1591
1635
|
url: string;
|
|
1592
1636
|
expiresAt?: string;
|
|
1593
1637
|
}
|
|
1638
|
+
export interface TransactionDataDisplay {
|
|
1639
|
+
title: string;
|
|
1640
|
+
attributes: Array<TransactionDataDisplayAttribute>;
|
|
1641
|
+
}
|
|
1642
|
+
export interface TransactionDataDisplayAttribute {
|
|
1643
|
+
key: string;
|
|
1644
|
+
/** The attribute value, encoded as a JSON string. */
|
|
1645
|
+
value: string;
|
|
1646
|
+
}
|
|
1647
|
+
/** Transaction data attached to a proof request. */
|
|
1648
|
+
export interface TransactionDataResponse {
|
|
1649
|
+
/** The transaction data provider used. */
|
|
1650
|
+
type: string;
|
|
1651
|
+
/** The credential schemas the transaction data applies to. */
|
|
1652
|
+
credentialSchemaIds: Array<string>;
|
|
1653
|
+
/** Type-specific transaction data content, encoded as a JSON string. */
|
|
1654
|
+
data?: string;
|
|
1655
|
+
}
|
|
1594
1656
|
export interface TrustCollectionInfo {
|
|
1595
1657
|
/** When true, the wallet is subscribed to this trust collection. */
|
|
1596
1658
|
selected: boolean;
|
|
@@ -1599,6 +1661,7 @@ export interface TrustCollectionInfo {
|
|
|
1599
1661
|
logo: string;
|
|
1600
1662
|
displayName: Array<DisplayName>;
|
|
1601
1663
|
description: Array<DisplayName>;
|
|
1664
|
+
defaultSelected?: boolean;
|
|
1602
1665
|
}
|
|
1603
1666
|
export interface TrustCollections {
|
|
1604
1667
|
/** Trust collections available from the Wallet Provider. */
|
|
@@ -2411,6 +2474,13 @@ export interface OneCore {
|
|
|
2411
2474
|
holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<string>;
|
|
2412
2475
|
/** Activates the wallet instance with the Wallet Provider after user authentication. */
|
|
2413
2476
|
holderActivateWalletUnit(id: string, request: HolderActivateWalletUnitRequest): Promise<void>;
|
|
2477
|
+
/**
|
|
2478
|
+
* For wallets; returns the details of a single transaction data entry of a
|
|
2479
|
+
* proof request, including human-readable display data and the raw
|
|
2480
|
+
* transaction data received from the verifier. The `transactionDataId` is
|
|
2481
|
+
* obtained from `getPresentationDefinitionv2`.
|
|
2482
|
+
*/
|
|
2483
|
+
holderGetTransactionData(proofId: string, transactionDataId: string): Promise<ProofTransactionData>;
|
|
2414
2484
|
/** Returns wallet registration details from the Wallet Provider. */
|
|
2415
2485
|
holderGetWalletUnit(id: string): Promise<HolderWalletUnit>;
|
|
2416
2486
|
/** Returns trust collections curated by the Wallet Provider. */
|
|
@@ -194,6 +194,11 @@ RCT_EXTERN_METHOD(getProofTrustInformation:(NSString *)proofId
|
|
|
194
194
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
195
195
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
196
196
|
|
|
197
|
+
RCT_EXTERN_METHOD(holderGetTransactionData:(NSString *)proofId
|
|
198
|
+
transactionDataId:(NSString *)transactionDataId
|
|
199
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
200
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
201
|
+
|
|
197
202
|
RCT_EXTERN_METHOD(listProofs:(NSDictionary *)query
|
|
198
203
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
199
204
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -592,6 +592,19 @@ class ProcivisOneCoreModule: RCTEventEmitter {
|
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
+
@objc(holderGetTransactionData:transactionDataId:resolver:rejecter:)
|
|
596
|
+
func holderGetTransactionData(
|
|
597
|
+
proofId: String,
|
|
598
|
+
transactionDataId: String,
|
|
599
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
600
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
601
|
+
) {
|
|
602
|
+
asyncCall(resolve, reject) {
|
|
603
|
+
let result = try await self.getCore().holderGetTransactionData(proofId: proofId, transactionDataId: transactionDataId)
|
|
604
|
+
return try serializeAny(result)
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
|
|
595
608
|
@objc(listProofs:resolver:rejecter:)
|
|
596
609
|
func listProofs(
|
|
597
610
|
query: NSDictionary,
|