@hyperledger/anoncreds-nodejs 0.3.5-alpha-20260107085331 → 0.4.0-alpha-20260212142546

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.
@@ -1,114 +1,59 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.NonRevokedIntervalOverrideListStruct = exports.NonRevokedIntervalOverrideArray = exports.NonRevokedIntervalOverrideStruct = exports.RevocationEntryListStruct = exports.RevocationEntryArray = exports.RevocationEntryStruct = exports.ObjectHandleListStruct = exports.ObjectHandleArray = exports.CredentialProveListStruct = exports.CredentialProveArray = exports.CredentialProveStruct = exports.CredentialEntryListStruct = exports.CredentialEntryArray = exports.CredentialEntryStruct = exports.CredRevInfoStruct = exports.I32ListStruct = exports.I64ListStruct = exports.StringListStructPtr = exports.StringListStruct = exports.ByteBufferStructPtr = exports.ByteBufferStruct = exports.StringArrayPtr = exports.Int32List = exports.Int64List = exports.ByteBufferArrayPtr = exports.ByteBufferArray = exports.StringArray = void 0;
30
- const ref = __importStar(require("@2060.io/ref-napi"));
31
- const ref_array_di_1 = __importDefault(require("ref-array-di"));
32
- const ref_struct_di_1 = __importDefault(require("ref-struct-di"));
6
+ exports.NonrevokedIntervalOverrideStructList = exports.NonrevokedIntervalOverrideStruct = exports.ObjectHandleStructList = exports.CredentialProveStructList = exports.CredentialProveStruct = exports.CredentialEntryStructList = exports.CredentialEntryStruct = exports.CredRevInfoStruct = exports.I32ListStruct = exports.StringListStruct = exports.ByteBufferStruct = void 0;
7
+ const koffi_1 = __importDefault(require("koffi"));
33
8
  const primitives_1 = require("./primitives");
34
- const CStruct = (0, ref_struct_di_1.default)(ref);
35
- const CArray = (0, ref_array_di_1.default)(ref);
36
- exports.StringArray = CArray('string');
37
- const FFI_INT32_ARRAY = CArray('int32');
38
- const FFI_INT64_ARRAY = CArray('int64');
39
- exports.ByteBufferArray = CArray('uint8');
40
- exports.ByteBufferArrayPtr = ref.refType(primitives_1.FFI_STRING);
41
- exports.Int64List = FFI_INT64_ARRAY;
42
- exports.Int32List = FFI_INT32_ARRAY;
43
- exports.StringArrayPtr = ref.refType(exports.StringArray);
44
- exports.ByteBufferStruct = CStruct({
9
+ exports.ByteBufferStruct = koffi_1.default.struct('ByteBufferStruct', {
45
10
  len: primitives_1.FFI_INT64,
46
- data: exports.ByteBufferArrayPtr,
47
- });
48
- exports.ByteBufferStructPtr = ref.refType(exports.ByteBufferStruct);
49
- exports.StringListStruct = CStruct({
50
- count: ref.types.size_t,
51
- data: exports.StringArray,
11
+ data: koffi_1.default.pointer(primitives_1.FFI_UINT8),
52
12
  });
53
- exports.StringListStructPtr = ref.refType(exports.StringListStruct);
54
- exports.I64ListStruct = CStruct({
55
- count: primitives_1.FFI_ISIZE,
56
- data: FFI_INT64_ARRAY,
13
+ exports.StringListStruct = koffi_1.default.struct('StringListStruct', {
14
+ count: primitives_1.FFI_USIZE,
15
+ data: koffi_1.default.pointer(primitives_1.FFI_STRING),
57
16
  });
58
- exports.I32ListStruct = CStruct({
59
- count: primitives_1.FFI_ISIZE,
60
- data: FFI_INT32_ARRAY,
17
+ exports.I32ListStruct = koffi_1.default.struct('I32ListStruct', {
18
+ count: primitives_1.FFI_USIZE,
19
+ data: koffi_1.default.pointer(primitives_1.FFI_INT32),
61
20
  });
62
- exports.CredRevInfoStruct = CStruct({
21
+ exports.CredRevInfoStruct = koffi_1.default.struct('CredRevInfoStruct', {
63
22
  reg_def: primitives_1.FFI_OBJECT_HANDLE,
64
23
  reg_def_private: primitives_1.FFI_OBJECT_HANDLE,
65
24
  status_list: primitives_1.FFI_OBJECT_HANDLE,
66
25
  reg_idx: primitives_1.FFI_INT64,
67
26
  });
68
- exports.CredentialEntryStruct = CStruct({
69
- credential: primitives_1.FFI_ISIZE,
70
- timestamp: primitives_1.FFI_INT64,
71
- rev_state: primitives_1.FFI_ISIZE,
27
+ exports.CredentialEntryStruct = koffi_1.default.struct('CredentialEntryStruct', {
28
+ credential: primitives_1.FFI_OBJECT_HANDLE,
29
+ timestamp: primitives_1.FFI_INT32,
30
+ rev_state: primitives_1.FFI_OBJECT_HANDLE,
72
31
  });
73
- exports.CredentialEntryArray = CArray(exports.CredentialEntryStruct);
74
- exports.CredentialEntryListStruct = CStruct({
75
- count: primitives_1.FFI_ISIZE,
76
- data: exports.CredentialEntryArray,
32
+ exports.CredentialEntryStructList = koffi_1.default.struct('CredentialEntryStructList', {
33
+ count: primitives_1.FFI_USIZE,
34
+ data: koffi_1.default.pointer(exports.CredentialEntryStruct),
77
35
  });
78
- exports.CredentialProveStruct = CStruct({
36
+ exports.CredentialProveStruct = koffi_1.default.struct('CredentialProveStruct', {
79
37
  entry_idx: primitives_1.FFI_INT64,
80
38
  referent: primitives_1.FFI_STRING,
81
39
  is_predicate: primitives_1.FFI_INT8,
82
40
  reveal: primitives_1.FFI_INT8,
83
41
  });
84
- exports.CredentialProveArray = CArray(exports.CredentialProveStruct);
85
- exports.CredentialProveListStruct = CStruct({
86
- count: primitives_1.FFI_ISIZE,
87
- data: exports.CredentialProveArray,
88
- });
89
- exports.ObjectHandleArray = CArray('size_t');
90
- exports.ObjectHandleListStruct = CStruct({
91
- count: primitives_1.FFI_ISIZE,
92
- data: exports.ObjectHandleArray,
93
- });
94
- exports.RevocationEntryStruct = CStruct({
95
- def_entry_idx: primitives_1.FFI_INT64,
96
- entry: primitives_1.FFI_ISIZE,
97
- timestamp: primitives_1.FFI_INT64,
42
+ exports.CredentialProveStructList = koffi_1.default.struct('CredentialProveStructList', {
43
+ count: primitives_1.FFI_USIZE,
44
+ data: koffi_1.default.pointer(exports.CredentialProveStruct),
98
45
  });
99
- exports.RevocationEntryArray = CArray(exports.RevocationEntryStruct);
100
- exports.RevocationEntryListStruct = CStruct({
101
- count: primitives_1.FFI_ISIZE,
102
- data: exports.RevocationEntryArray,
46
+ exports.ObjectHandleStructList = koffi_1.default.struct('ObjectHandleStructList', {
47
+ count: primitives_1.FFI_USIZE,
48
+ data: koffi_1.default.pointer(primitives_1.FFI_OBJECT_HANDLE),
103
49
  });
104
- exports.NonRevokedIntervalOverrideStruct = CStruct({
50
+ exports.NonrevokedIntervalOverrideStruct = koffi_1.default.struct('NonrevokedIntervalOverrideStruct', {
105
51
  rev_reg_def_id: primitives_1.FFI_STRING,
106
52
  requested_from_ts: primitives_1.FFI_INT32,
107
53
  override_rev_status_list_ts: primitives_1.FFI_INT32,
108
54
  });
109
- exports.NonRevokedIntervalOverrideArray = CArray(exports.NonRevokedIntervalOverrideStruct);
110
- exports.NonRevokedIntervalOverrideListStruct = CStruct({
111
- count: primitives_1.FFI_ISIZE,
112
- data: exports.NonRevokedIntervalOverrideArray,
55
+ exports.NonrevokedIntervalOverrideStructList = koffi_1.default.struct('NonrevokedIntervalOverrideStructList', {
56
+ count: primitives_1.FFI_USIZE,
57
+ data: koffi_1.default.pointer(exports.NonrevokedIntervalOverrideStruct),
113
58
  });
114
59
  //# sourceMappingURL=structures.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"structures.js","sourceRoot":"","sources":["../../src/ffi/structures.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwC;AACxC,gEAAmC;AACnC,kEAAqC;AAErC,6CAAuG;AAEvG,MAAM,OAAO,GAAG,IAAA,uBAAS,EAAC,GAAG,CAAC,CAAA;AAC9B,MAAM,MAAM,GAAG,IAAA,sBAAQ,EAAC,GAAG,CAAC,CAAA;AAEf,QAAA,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAE3C,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAEvC,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAE1B,QAAA,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AACjC,QAAA,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAAC,uBAAU,CAAC,CAAA;AAE5C,QAAA,SAAS,GAAG,eAAe,CAAA;AAC3B,QAAA,SAAS,GAAG,eAAe,CAAA;AAE3B,QAAA,cAAc,GAAG,GAAG,CAAC,OAAO,CAAC,mBAAW,CAAC,CAAA;AAEzC,QAAA,gBAAgB,GAAG,OAAO,CAAC;IACtC,GAAG,EAAE,sBAAS;IACd,IAAI,EAAE,0BAAkB;CACzB,CAAC,CAAA;AAEW,QAAA,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAAC,wBAAgB,CAAC,CAAA;AAEnD,QAAA,gBAAgB,GAAG,OAAO,CAAC;IACtC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM;IACvB,IAAI,EAAE,mBAAW;CAClB,CAAC,CAAA;AAEW,QAAA,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAAC,wBAAgB,CAAC,CAAA;AAEnD,QAAA,aAAa,GAAG,OAAO,CAAC;IACnC,KAAK,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D,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oEAA+D;AAE/D,uDAAmD;AAEtC,QAAA,eAAe,GAAG,IAAI,iCAAe,EAAE,CAAA;AACpD,kCAAe,CAAC,QAAQ,CAAC,uBAAe,CAAC,CAAA;AAEzC,gEAA6C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oEAA+D;AAC/D,uDAAmD;AAEtC,QAAA,eAAe,GAAG,IAAI,iCAAe,EAAE,CAAA;AACpD,kCAAe,CAAC,QAAQ,CAAC,uBAAe,CAAC,CAAA;AAEzC,gEAA6C"}
@@ -1,25 +1,2 @@
1
1
  import type { nativeBindings } from './bindings';
2
- interface StringTypeMapping {
3
- pointer: Buffer;
4
- 'char*': Buffer;
5
- string: string;
6
- int64: number;
7
- int32: number;
8
- int8: number;
9
- int: number;
10
- size_t: number;
11
- }
12
- type ShapeOf<T> = {
13
- [Property in keyof T]: T[Property];
14
- };
15
- type StringTypeArrayToTypes<List extends (keyof StringTypeMapping)[]> = {
16
- [Item in keyof List]: List[Item] extends keyof StringTypeMapping ? StringTypeMapping[List[Item]] : Buffer;
17
- };
18
- type TypedMethods<Base extends Record<string | number | symbol, [any, any[]]>> = {
19
- [Property in keyof Base]: (...args: StringTypeArrayToTypes<Base[Property][1]> extends any[] ? StringTypeArrayToTypes<Base[Property][1]> : []) => StringTypeMapping[Base[Property][0]];
20
- };
21
- type Mutable<T> = {
22
- -readonly [K in keyof T]: Mutable<T[K]>;
23
- };
24
- export type NativeMethods = TypedMethods<ShapeOf<Mutable<typeof nativeBindings>>>;
25
- export {};
2
+ export type NativeMethods = Record<keyof typeof nativeBindings, (...args: unknown[]) => any>;
@@ -1,253 +1,2 @@
1
- export declare const nativeBindings: {
2
- readonly anoncreds_buffer_free: readonly [import("@2060.io/ref-napi").Type<void>, readonly [import("ref-struct-di").StructType<{
3
- len: import("ref-napi").Type<string | number>;
4
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
5
- }>]];
6
- readonly anoncreds_create_credential: readonly ["uint", readonly ["size_t", "size_t", "size_t", "size_t", import("ref-struct-di").StructType<{
7
- count: import("ref-napi").Type<string | number>;
8
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
9
- }>, import("ref-struct-di").StructType<{
10
- count: import("ref-napi").Type<string | number>;
11
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
12
- }>, import("ref-struct-di").StructType<{
13
- count: import("ref-napi").Type<string | number>;
14
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
15
- }>, "size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
16
- readonly anoncreds_create_credential_definition: readonly ["uint", readonly ["string", "size_t", "string", "string", "string", "int8", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
17
- readonly anoncreds_create_credential_offer: readonly ["uint", readonly ["string", "string", "size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
18
- readonly anoncreds_create_credential_request: readonly ["uint", readonly ["string", "string", "size_t", "string", "string", "size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
19
- readonly anoncreds_create_link_secret: readonly ["uint", readonly [import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
20
- readonly anoncreds_create_or_update_revocation_state: readonly ["uint", readonly ["size_t", "size_t", "int64", "string", "size_t", "size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
21
- readonly anoncreds_create_presentation: readonly ["uint", readonly ["size_t", import("ref-struct-di").StructType<{
22
- count: import("ref-napi").Type<string | number>;
23
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<import("ref-struct-di").StructObject<{
24
- credential: string | number;
25
- timestamp: string | number;
26
- rev_state: string | number;
27
- }>, number>>;
28
- }>, import("ref-struct-di").StructType<{
29
- count: import("ref-napi").Type<string | number>;
30
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<import("ref-struct-di").StructObject<{
31
- entry_idx: string | number;
32
- referent: string | null;
33
- is_predicate: number;
34
- reveal: number;
35
- }>, number>>;
36
- }>, import("ref-struct-di").StructType<{
37
- count: import("ref-napi").Type<string | number>;
38
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
39
- }>, import("ref-struct-di").StructType<{
40
- count: import("ref-napi").Type<string | number>;
41
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
42
- }>, "string", import("ref-struct-di").StructType<{
43
- count: import("ref-napi").Type<string | number>;
44
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
45
- }>, import("ref-struct-di").StructType<{
46
- count: import("ref-napi").Type<string | number>;
47
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
48
- }>, import("ref-struct-di").StructType<{
49
- count: import("ref-napi").Type<string | number>;
50
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
51
- }>, import("ref-struct-di").StructType<{
52
- count: import("ref-napi").Type<string | number>;
53
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
54
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
55
- readonly anoncreds_create_revocation_registry_def: readonly ["uint", readonly ["size_t", "string", "string", "string", "string", "int64", "string", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
56
- readonly anoncreds_create_schema: readonly ["uint", readonly ["string", "string", "string", import("ref-struct-di").StructType<{
57
- count: import("ref-napi").Type<string | number>;
58
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
59
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
60
- readonly anoncreds_credential_get_attribute: readonly ["uint", readonly ["size_t", "string", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
61
- readonly anoncreds_encode_credential_attributes: readonly ["uint", readonly [import("ref-struct-di").StructType<{
62
- count: import("ref-napi").Type<string | number>;
63
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
64
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
65
- readonly anoncreds_generate_nonce: readonly ["uint", readonly [import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
66
- readonly anoncreds_get_current_error: readonly ["uint", readonly [import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
67
- readonly anoncreds_object_free: readonly [import("@2060.io/ref-napi").Type<void>, readonly ["size_t"]];
68
- readonly anoncreds_string_free: readonly [import("@2060.io/ref-napi").Type<void>, readonly [import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
69
- readonly anoncreds_object_get_json: readonly ["uint", readonly ["size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<import("ref-struct-di").StructObject<{
70
- len: string | number;
71
- data: import("@2060.io/ref-napi").Pointer<string | null>;
72
- }>>>]];
73
- readonly anoncreds_object_get_type_name: readonly ["uint", readonly ["size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
74
- readonly anoncreds_presentation_request_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
75
- len: import("ref-napi").Type<string | number>;
76
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
77
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
78
- readonly anoncreds_process_credential: readonly ["uint", readonly ["size_t", "size_t", "string", "size_t", "size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
79
- readonly anoncreds_revocation_registry_definition_get_attribute: readonly ["uint", readonly ["size_t", "string", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
80
- readonly anoncreds_set_default_logger: readonly ["uint", readonly []];
81
- readonly anoncreds_verify_presentation: readonly ["uint", readonly ["size_t", "size_t", import("ref-struct-di").StructType<{
82
- count: import("ref-napi").Type<string | number>;
83
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
84
- }>, import("ref-struct-di").StructType<{
85
- count: import("ref-napi").Type<string | number>;
86
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
87
- }>, import("ref-struct-di").StructType<{
88
- count: import("ref-napi").Type<string | number>;
89
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
90
- }>, import("ref-struct-di").StructType<{
91
- count: import("ref-napi").Type<string | number>;
92
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
93
- }>, import("ref-struct-di").StructType<{
94
- count: import("ref-napi").Type<string | number>;
95
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
96
- }>, import("ref-struct-di").StructType<{
97
- count: import("ref-napi").Type<string | number>;
98
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
99
- }>, import("ref-struct-di").StructType<{
100
- count: import("ref-napi").Type<string | number>;
101
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
102
- }>, import("ref-struct-di").StructType<{
103
- count: import("ref-napi").Type<string | number>;
104
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<import("ref-struct-di").StructObject<{
105
- rev_reg_def_id: string | null;
106
- requested_from_ts: number;
107
- override_rev_status_list_ts: number;
108
- }>, number>>;
109
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<number>>]];
110
- readonly anoncreds_create_revocation_status_list: readonly ["uint", readonly ["size_t", "string", "size_t", "size_t", "string", "int8", "int64", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
111
- readonly anoncreds_update_revocation_status_list_timestamp_only: readonly ["uint", readonly ["int64", "size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
112
- readonly anoncreds_update_revocation_status_list: readonly ["uint", readonly ["size_t", "size_t", "size_t", "size_t", import("ref-struct-di").StructType<{
113
- count: import("ref-napi").Type<string | number>;
114
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<number, number>>;
115
- }>, import("ref-struct-di").StructType<{
116
- count: import("ref-napi").Type<string | number>;
117
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<number, number>>;
118
- }>, "int64", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
119
- readonly anoncreds_version: readonly ["string", readonly []];
120
- readonly anoncreds_credential_request_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
121
- len: import("ref-napi").Type<string | number>;
122
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
123
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
124
- readonly anoncreds_credential_request_metadata_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
125
- len: import("ref-napi").Type<string | number>;
126
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
127
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
128
- readonly anoncreds_presentation_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
129
- len: import("ref-napi").Type<string | number>;
130
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
131
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
132
- readonly anoncreds_credential_offer_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
133
- len: import("ref-napi").Type<string | number>;
134
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
135
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
136
- readonly anoncreds_revocation_registry_definition_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
137
- len: import("ref-napi").Type<string | number>;
138
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
139
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
140
- readonly anoncreds_revocation_registry_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
141
- len: import("ref-napi").Type<string | number>;
142
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
143
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
144
- readonly anoncreds_revocation_status_list_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
145
- len: import("ref-napi").Type<string | number>;
146
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
147
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
148
- readonly anoncreds_revocation_state_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
149
- len: import("ref-napi").Type<string | number>;
150
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
151
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
152
- readonly anoncreds_credential_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
153
- len: import("ref-napi").Type<string | number>;
154
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
155
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
156
- readonly anoncreds_credential_definition_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
157
- len: import("ref-napi").Type<string | number>;
158
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
159
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
160
- readonly anoncreds_credential_definition_private_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
161
- len: import("ref-napi").Type<string | number>;
162
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
163
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
164
- readonly anoncreds_revocation_registry_definition_private_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
165
- len: import("ref-napi").Type<string | number>;
166
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
167
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
168
- readonly anoncreds_key_correctness_proof_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
169
- len: import("ref-napi").Type<string | number>;
170
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
171
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
172
- readonly anoncreds_schema_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
173
- len: import("ref-napi").Type<string | number>;
174
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
175
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
176
- readonly anoncreds_create_w3c_credential: readonly ["uint", readonly ["size_t", "size_t", "size_t", "size_t", import("ref-struct-di").StructType<{
177
- count: import("ref-napi").Type<string | number>;
178
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
179
- }>, import("ref-struct-di").StructType<{
180
- count: import("ref-napi").Type<string | number>;
181
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
182
- }>, "size_t", "string", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
183
- readonly anoncreds_process_w3c_credential: readonly ["uint", readonly ["size_t", "size_t", "string", "size_t", "size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
184
- readonly anoncreds_create_w3c_presentation: readonly ["uint", readonly ["size_t", import("ref-struct-di").StructType<{
185
- count: import("ref-napi").Type<string | number>;
186
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<import("ref-struct-di").StructObject<{
187
- credential: string | number;
188
- timestamp: string | number;
189
- rev_state: string | number;
190
- }>, number>>;
191
- }>, import("ref-struct-di").StructType<{
192
- count: import("ref-napi").Type<string | number>;
193
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<import("ref-struct-di").StructObject<{
194
- entry_idx: string | number;
195
- referent: string | null;
196
- is_predicate: number;
197
- reveal: number;
198
- }>, number>>;
199
- }>, "string", import("ref-struct-di").StructType<{
200
- count: import("ref-napi").Type<string | number>;
201
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
202
- }>, import("ref-struct-di").StructType<{
203
- count: import("ref-napi").Type<string | number>;
204
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
205
- }>, import("ref-struct-di").StructType<{
206
- count: import("ref-napi").Type<string | number>;
207
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
208
- }>, import("ref-struct-di").StructType<{
209
- count: import("ref-napi").Type<string | number>;
210
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
211
- }>, "string", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
212
- readonly anoncreds_verify_w3c_presentation: readonly ["uint", readonly ["size_t", "size_t", import("ref-struct-di").StructType<{
213
- count: import("ref-napi").Type<string | number>;
214
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
215
- }>, import("ref-struct-di").StructType<{
216
- count: import("ref-napi").Type<string | number>;
217
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
218
- }>, import("ref-struct-di").StructType<{
219
- count: import("ref-napi").Type<string | number>;
220
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
221
- }>, import("ref-struct-di").StructType<{
222
- count: import("ref-napi").Type<string | number>;
223
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
224
- }>, import("ref-struct-di").StructType<{
225
- count: import("ref-napi").Type<string | number>;
226
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
227
- }>, import("ref-struct-di").StructType<{
228
- count: import("ref-napi").Type<string | number>;
229
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | null, number>>;
230
- }>, import("ref-struct-di").StructType<{
231
- count: import("ref-napi").Type<string | number>;
232
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<string | number, number>>;
233
- }>, import("ref-struct-di").StructType<{
234
- count: import("ref-napi").Type<string | number>;
235
- data: import("ref-napi").Type<import("ref-array-di").TypedArray<import("ref-struct-di").StructObject<{
236
- rev_reg_def_id: string | null;
237
- requested_from_ts: number;
238
- override_rev_status_list_ts: number;
239
- }>, number>>;
240
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<number>>]];
241
- readonly anoncreds_credential_to_w3c: readonly ["uint", readonly ["size_t", "string", "string", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
242
- readonly anoncreds_credential_from_w3c: readonly ["uint", readonly ["size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
243
- readonly anoncreds_w3c_credential_get_integrity_proof_details: readonly ["uint", readonly ["size_t", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | number>>]];
244
- readonly anoncreds_w3c_credential_proof_get_attribute: readonly ["uint", readonly ["size_t", "string", import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
245
- readonly anoncreds_w3c_presentation_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
246
- len: import("ref-napi").Type<string | number>;
247
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
248
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
249
- readonly anoncreds_w3c_credential_from_json: readonly ["uint", readonly [import("ref-struct-di").StructType<{
250
- len: import("ref-napi").Type<string | number>;
251
- data: import("ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>;
252
- }>, import("@2060.io/ref-napi").Type<import("@2060.io/ref-napi").Pointer<string | null>>]];
253
- };
1
+ import * as koffi from 'koffi';
2
+ export declare const nativeBindings: Record<string, [koffi.TypeSpec, Array<koffi.TypeSpec>]>;