@hyperledger/anoncreds-shared 0.1.0-dev.7 → 0.1.0-dev.9

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 (63) hide show
  1. package/build/Anoncreds.d.ts +10 -2
  2. package/build/AnoncredsObject.d.ts +2 -1
  3. package/build/AnoncredsObject.js +1 -1
  4. package/build/AnoncredsObject.js.map +1 -1
  5. package/build/api/Credential.d.ts +20 -19
  6. package/build/api/Credential.js +81 -23
  7. package/build/api/Credential.js.map +1 -1
  8. package/build/api/CredentialDefinition.d.ts +4 -3
  9. package/build/api/CredentialDefinition.js +26 -13
  10. package/build/api/CredentialDefinition.js.map +1 -1
  11. package/build/api/CredentialDefinitionPrivate.d.ts +2 -1
  12. package/build/api/CredentialDefinitionPrivate.js +2 -2
  13. package/build/api/CredentialDefinitionPrivate.js.map +1 -1
  14. package/build/api/CredentialOffer.d.ts +4 -3
  15. package/build/api/CredentialOffer.js +21 -7
  16. package/build/api/CredentialOffer.js.map +1 -1
  17. package/build/api/CredentialRequest.d.ts +9 -7
  18. package/build/api/CredentialRequest.js +33 -11
  19. package/build/api/CredentialRequest.js.map +1 -1
  20. package/build/api/CredentialRequestMetadata.d.ts +2 -1
  21. package/build/api/CredentialRequestMetadata.js +2 -2
  22. package/build/api/CredentialRequestMetadata.js.map +1 -1
  23. package/build/api/CredentialRevocationConfig.d.ts +1 -0
  24. package/build/api/CredentialRevocationConfig.js +4 -0
  25. package/build/api/CredentialRevocationConfig.js.map +1 -1
  26. package/build/api/CredentialRevocationState.d.ts +4 -3
  27. package/build/api/CredentialRevocationState.js +28 -10
  28. package/build/api/CredentialRevocationState.js.map +1 -1
  29. package/build/api/KeyCorrectnessProof.d.ts +2 -1
  30. package/build/api/KeyCorrectnessProof.js +2 -2
  31. package/build/api/KeyCorrectnessProof.js.map +1 -1
  32. package/build/api/MasterSecret.d.ts +2 -1
  33. package/build/api/MasterSecret.js +2 -2
  34. package/build/api/MasterSecret.js.map +1 -1
  35. package/build/api/Presentation.d.ts +25 -18
  36. package/build/api/Presentation.js +80 -34
  37. package/build/api/Presentation.js.map +1 -1
  38. package/build/api/PresentationRequest.d.ts +2 -1
  39. package/build/api/PresentationRequest.js +2 -2
  40. package/build/api/PresentationRequest.js.map +1 -1
  41. package/build/api/RevocationRegistry.d.ts +2 -1
  42. package/build/api/RevocationRegistry.js +2 -2
  43. package/build/api/RevocationRegistry.js.map +1 -1
  44. package/build/api/RevocationRegistryDefinition.d.ts +4 -3
  45. package/build/api/RevocationRegistryDefinition.js +18 -5
  46. package/build/api/RevocationRegistryDefinition.js.map +1 -1
  47. package/build/api/RevocationRegistryDefinitionPrivate.d.ts +2 -1
  48. package/build/api/RevocationRegistryDefinitionPrivate.js +2 -2
  49. package/build/api/RevocationRegistryDefinitionPrivate.js.map +1 -1
  50. package/build/api/RevocationRegistryDelta.d.ts +2 -1
  51. package/build/api/RevocationRegistryDelta.js +2 -2
  52. package/build/api/RevocationRegistryDelta.js.map +1 -1
  53. package/build/api/RevocationStatusList.d.ts +6 -3
  54. package/build/api/RevocationStatusList.js +31 -3
  55. package/build/api/RevocationStatusList.js.map +1 -1
  56. package/build/api/Schema.d.ts +2 -1
  57. package/build/api/Schema.js +2 -2
  58. package/build/api/Schema.js.map +1 -1
  59. package/build/api/utils.d.ts +1 -0
  60. package/build/api/utils.js +6 -0
  61. package/build/api/utils.js.map +1 -0
  62. package/build/types.d.ts +1 -0
  63. package/package.json +2 -2
@@ -1,3 +1,4 @@
1
+ import type { JsonObject } from '../types';
1
2
  import { AnoncredsObject } from '../AnoncredsObject';
2
3
  export declare type CreateSchemaOptions = {
3
4
  name: string;
@@ -7,5 +8,5 @@ export declare type CreateSchemaOptions = {
7
8
  };
8
9
  export declare class Schema extends AnoncredsObject {
9
10
  static create(options: CreateSchemaOptions): Schema;
10
- static load(json: string): Schema;
11
+ static fromJson(json: JsonObject): Schema;
11
12
  }
@@ -7,8 +7,8 @@ class Schema extends AnoncredsObject_1.AnoncredsObject {
7
7
  static create(options) {
8
8
  return new Schema(register_1.anoncreds.createSchema(options).handle);
9
9
  }
10
- static load(json) {
11
- return new Schema(register_1.anoncreds.schemaFromJson({ json }).handle);
10
+ static fromJson(json) {
11
+ return new Schema(register_1.anoncreds.schemaFromJson({ json: JSON.stringify(json) }).handle);
12
12
  }
13
13
  }
14
14
  exports.Schema = Schema;
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../src/api/Schema.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AACpD,0CAAuC;AASvC,MAAa,MAAO,SAAQ,iCAAe;IAClC,MAAM,CAAC,MAAM,CAAC,OAA4B;QAC/C,OAAO,IAAI,MAAM,CAAC,oBAAS,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;IAC3D,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,IAAY;QAC7B,OAAO,IAAI,MAAM,CAAC,oBAAS,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;IAC9D,CAAC;CACF;AARD,wBAQC"}
1
+ {"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../src/api/Schema.ts"],"names":[],"mappings":";;;AAEA,wDAAoD;AACpD,0CAAuC;AASvC,MAAa,MAAO,SAAQ,iCAAe;IAClC,MAAM,CAAC,MAAM,CAAC,OAA4B;QAC/C,OAAO,IAAI,MAAM,CAAC,oBAAS,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;IAC3D,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAAgB;QACrC,OAAO,IAAI,MAAM,CAAC,oBAAS,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;IACpF,CAAC;CACF;AARD,wBAQC"}
@@ -0,0 +1 @@
1
+ export declare const pushToArray: <T>(obj: T, arr: T[]) => T;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pushToArray = void 0;
4
+ const pushToArray = (obj, arr) => arr[arr.push(obj) - 1];
5
+ exports.pushToArray = pushToArray;
6
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/api/utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,WAAW,GAAG,CAAI,GAAM,EAAE,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;AAA7D,QAAA,WAAW,eAAkD"}
package/build/types.d.ts CHANGED
@@ -8,4 +8,5 @@ export declare class ByteBuffer {
8
8
  constructor({ data, len }: ByteBufferOptions);
9
9
  static fromUint8Array(data: Uint8Array): ByteBuffer;
10
10
  }
11
+ export declare type JsonObject = Record<string, unknown>;
11
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperledger/anoncreds-shared",
3
- "version": "0.1.0-dev.7",
3
+ "version": "0.1.0-dev.9",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Anoncreds wrapper library with NodeJS and React Native",
6
6
  "main": "build/index",
@@ -30,5 +30,5 @@
30
30
  "rimraf": "3.0.2",
31
31
  "typescript": "4.5.5"
32
32
  },
33
- "gitHead": "a1729a3667f62561cab4f5398cedacc68beb053c"
33
+ "gitHead": "49efccccc0cf932038a872fc13b907c459d58f66"
34
34
  }