@cheqd/sdk 1.5.0-develop.1 → 1.5.0-develop.2

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/build/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CheqdSDK } from ".";
2
2
  import { Coin } from "@cosmjs/proto-signing";
3
3
  import { Signer } from "did-jwt";
4
- import { MsgDeactivateDidDocPayload, VerificationMethod } from "@cheqd/ts-proto/cheqd/did/v2";
4
+ import { MsgCreateDidDocPayload, MsgDeactivateDidDocPayload, MsgUpdateDidDocPayload, VerificationMethod } from "@cheqd/ts-proto/cheqd/did/v2";
5
5
  export declare enum CheqdNetwork {
6
6
  Mainnet = "mainnet",
7
7
  Testnet = "testnet"
@@ -15,7 +15,8 @@ export interface IContext {
15
15
  sdk: CheqdSDK;
16
16
  }
17
17
  export declare enum VerificationMethods {
18
- Base58 = "Ed25519VerificationKey2020",
18
+ Ed255192020 = "Ed25519VerificationKey2020",
19
+ Ed255192018 = "Ed25519VerificationKey2018",
19
20
  JWK = "JsonWebKey2020"
20
21
  }
21
22
  export declare enum MethodSpecificIdAlgo {
@@ -30,6 +31,9 @@ export interface ISignInputs {
30
31
  keyType?: 'Ed25519' | 'Secp256k1' | 'P256';
31
32
  privateKeyHex: string;
32
33
  }
34
+ export declare const ISignInputs: {
35
+ isSignInput(object: Object[]): object is ISignInputs[];
36
+ };
33
37
  export interface IKeyPair {
34
38
  publicKey: string;
35
39
  privateKey: string;
@@ -55,6 +59,236 @@ export interface DidStdFee {
55
59
  granter?: string;
56
60
  }
57
61
  export interface MsgDeactivateDidPayload extends MsgDeactivateDidDocPayload {
58
- verificationMethod: VerificationMethod[];
62
+ verificationMethod: VerificationMethodPayload[];
63
+ }
64
+ export interface MsgCreateDidPayload extends Omit<MsgCreateDidDocPayload, 'verificationMethod' | 'service'> {
65
+ verificationMethod: VerificationMethodPayload[];
66
+ service: ServicePayload[];
67
+ }
68
+ export declare const MsgCreateDidPayload: {
69
+ transformPayload<I extends {
70
+ verificationMethod?: {
71
+ id?: string | undefined;
72
+ type?: string | undefined;
73
+ controller?: string | undefined;
74
+ publicKeyBase58?: string | undefined;
75
+ publicKeyMultibase?: string | undefined;
76
+ publicKeyJWK?: any;
77
+ }[] | undefined;
78
+ service?: {
79
+ id?: string | undefined;
80
+ type?: string | undefined;
81
+ serviceEndpoint?: string[] | undefined;
82
+ }[] | undefined;
83
+ context?: string[] | undefined;
84
+ id?: string | undefined;
85
+ controller?: string[] | undefined;
86
+ authentication?: string[] | undefined;
87
+ assertionMethod?: string[] | undefined;
88
+ capabilityInvocation?: string[] | undefined;
89
+ capabilityDelegation?: string[] | undefined;
90
+ keyAgreement?: string[] | undefined;
91
+ alsoKnownAs?: string[] | undefined;
92
+ versionId?: string | undefined;
93
+ } & {
94
+ verificationMethod?: ({
95
+ id?: string | undefined;
96
+ type?: string | undefined;
97
+ controller?: string | undefined;
98
+ publicKeyBase58?: string | undefined;
99
+ publicKeyMultibase?: string | undefined;
100
+ publicKeyJWK?: any;
101
+ }[] & ({
102
+ id?: string | undefined;
103
+ type?: string | undefined;
104
+ controller?: string | undefined;
105
+ publicKeyBase58?: string | undefined;
106
+ publicKeyMultibase?: string | undefined;
107
+ publicKeyJWK?: any;
108
+ } & {
109
+ id?: string | undefined;
110
+ type?: string | undefined;
111
+ controller?: string | undefined;
112
+ publicKeyBase58?: string | undefined;
113
+ publicKeyMultibase?: string | undefined;
114
+ publicKeyJWK?: any;
115
+ } & { [K in Exclude<keyof I["verificationMethod"][number], keyof VerificationMethodPayload>]: never; })[] & { [K_1 in Exclude<keyof I["verificationMethod"], keyof {
116
+ id?: string | undefined;
117
+ type?: string | undefined;
118
+ controller?: string | undefined;
119
+ publicKeyBase58?: string | undefined;
120
+ publicKeyMultibase?: string | undefined;
121
+ publicKeyJWK?: any;
122
+ }[]>]: never; }) | undefined;
123
+ service?: ({
124
+ id?: string | undefined;
125
+ type?: string | undefined;
126
+ serviceEndpoint?: string[] | undefined;
127
+ }[] & ({
128
+ id?: string | undefined;
129
+ type?: string | undefined;
130
+ serviceEndpoint?: string[] | undefined;
131
+ } & {
132
+ id?: string | undefined;
133
+ type?: string | undefined;
134
+ serviceEndpoint?: (string[] & string[] & { [K_2 in Exclude<keyof I["service"][number]["serviceEndpoint"], keyof string[]>]: never; }) | undefined;
135
+ } & { [K_3 in Exclude<keyof I["service"][number], keyof ServicePayload>]: never; })[] & { [K_4 in Exclude<keyof I["service"], keyof {
136
+ id?: string | undefined;
137
+ type?: string | undefined;
138
+ serviceEndpoint?: string[] | undefined;
139
+ }[]>]: never; }) | undefined;
140
+ context?: (string[] & string[] & { [K_5 in Exclude<keyof I["context"], keyof string[]>]: never; }) | undefined;
141
+ id?: string | undefined;
142
+ controller?: (string[] & string[] & { [K_6 in Exclude<keyof I["controller"], keyof string[]>]: never; }) | undefined;
143
+ authentication?: (string[] & string[] & { [K_7 in Exclude<keyof I["authentication"], keyof string[]>]: never; }) | undefined;
144
+ assertionMethod?: (string[] & string[] & { [K_8 in Exclude<keyof I["assertionMethod"], keyof string[]>]: never; }) | undefined;
145
+ capabilityInvocation?: (string[] & string[] & { [K_9 in Exclude<keyof I["capabilityInvocation"], keyof string[]>]: never; }) | undefined;
146
+ capabilityDelegation?: (string[] & string[] & { [K_10 in Exclude<keyof I["capabilityDelegation"], keyof string[]>]: never; }) | undefined;
147
+ keyAgreement?: (string[] & string[] & { [K_11 in Exclude<keyof I["keyAgreement"], keyof string[]>]: never; }) | undefined;
148
+ alsoKnownAs?: (string[] & string[] & { [K_12 in Exclude<keyof I["alsoKnownAs"], keyof string[]>]: never; }) | undefined;
149
+ versionId?: string | undefined;
150
+ } & { [K_13 in Exclude<keyof I, keyof MsgCreateDidPayload>]: never; }>(message: I): MsgCreateDidDocPayload;
151
+ fromPartial<I_1 extends {
152
+ verificationMethod?: {
153
+ id?: string | undefined;
154
+ type?: string | undefined;
155
+ controller?: string | undefined;
156
+ publicKeyBase58?: string | undefined;
157
+ publicKeyMultibase?: string | undefined;
158
+ publicKeyJWK?: any;
159
+ }[] | undefined;
160
+ service?: {
161
+ id?: string | undefined;
162
+ type?: string | undefined;
163
+ serviceEndpoint?: string[] | undefined;
164
+ }[] | undefined;
165
+ context?: string[] | undefined;
166
+ id?: string | undefined;
167
+ controller?: string[] | undefined;
168
+ authentication?: string[] | undefined;
169
+ assertionMethod?: string[] | undefined;
170
+ capabilityInvocation?: string[] | undefined;
171
+ capabilityDelegation?: string[] | undefined;
172
+ keyAgreement?: string[] | undefined;
173
+ alsoKnownAs?: string[] | undefined;
174
+ versionId?: string | undefined;
175
+ } & {
176
+ verificationMethod?: ({
177
+ id?: string | undefined;
178
+ type?: string | undefined;
179
+ controller?: string | undefined;
180
+ publicKeyBase58?: string | undefined;
181
+ publicKeyMultibase?: string | undefined;
182
+ publicKeyJWK?: any;
183
+ }[] & ({
184
+ id?: string | undefined;
185
+ type?: string | undefined;
186
+ controller?: string | undefined;
187
+ publicKeyBase58?: string | undefined;
188
+ publicKeyMultibase?: string | undefined;
189
+ publicKeyJWK?: any;
190
+ } & {
191
+ id?: string | undefined;
192
+ type?: string | undefined;
193
+ controller?: string | undefined;
194
+ publicKeyBase58?: string | undefined;
195
+ publicKeyMultibase?: string | undefined;
196
+ publicKeyJWK?: any;
197
+ } & { [K_14 in Exclude<keyof I_1["verificationMethod"][number], keyof VerificationMethodPayload>]: never; })[] & { [K_15 in Exclude<keyof I_1["verificationMethod"], keyof {
198
+ id?: string | undefined;
199
+ type?: string | undefined;
200
+ controller?: string | undefined;
201
+ publicKeyBase58?: string | undefined;
202
+ publicKeyMultibase?: string | undefined;
203
+ publicKeyJWK?: any;
204
+ }[]>]: never; }) | undefined;
205
+ service?: ({
206
+ id?: string | undefined;
207
+ type?: string | undefined;
208
+ serviceEndpoint?: string[] | undefined;
209
+ }[] & ({
210
+ id?: string | undefined;
211
+ type?: string | undefined;
212
+ serviceEndpoint?: string[] | undefined;
213
+ } & {
214
+ id?: string | undefined;
215
+ type?: string | undefined;
216
+ serviceEndpoint?: (string[] & string[] & { [K_16 in Exclude<keyof I_1["service"][number]["serviceEndpoint"], keyof string[]>]: never; }) | undefined;
217
+ } & { [K_17 in Exclude<keyof I_1["service"][number], keyof ServicePayload>]: never; })[] & { [K_18 in Exclude<keyof I_1["service"], keyof {
218
+ id?: string | undefined;
219
+ type?: string | undefined;
220
+ serviceEndpoint?: string[] | undefined;
221
+ }[]>]: never; }) | undefined;
222
+ context?: (string[] & string[] & { [K_19 in Exclude<keyof I_1["context"], keyof string[]>]: never; }) | undefined;
223
+ id?: string | undefined;
224
+ controller?: (string[] & string[] & { [K_20 in Exclude<keyof I_1["controller"], keyof string[]>]: never; }) | undefined;
225
+ authentication?: (string[] & string[] & { [K_21 in Exclude<keyof I_1["authentication"], keyof string[]>]: never; }) | undefined;
226
+ assertionMethod?: (string[] & string[] & { [K_22 in Exclude<keyof I_1["assertionMethod"], keyof string[]>]: never; }) | undefined;
227
+ capabilityInvocation?: (string[] & string[] & { [K_23 in Exclude<keyof I_1["capabilityInvocation"], keyof string[]>]: never; }) | undefined;
228
+ capabilityDelegation?: (string[] & string[] & { [K_24 in Exclude<keyof I_1["capabilityDelegation"], keyof string[]>]: never; }) | undefined;
229
+ keyAgreement?: (string[] & string[] & { [K_25 in Exclude<keyof I_1["keyAgreement"], keyof string[]>]: never; }) | undefined;
230
+ alsoKnownAs?: (string[] & string[] & { [K_26 in Exclude<keyof I_1["alsoKnownAs"], keyof string[]>]: never; }) | undefined;
231
+ versionId?: string | undefined;
232
+ } & { [K_27 in Exclude<keyof I_1, keyof MsgCreateDidPayload>]: never; }>(object: I_1): MsgCreateDidPayload;
233
+ };
234
+ export interface VerificationMethodPayload {
235
+ id: string;
236
+ type: string;
237
+ controller: string;
238
+ publicKeyBase58?: string;
239
+ publicKeyMultibase?: string;
240
+ publicKeyJWK?: any;
241
+ }
242
+ export declare const VerificationMethodPayload: {
243
+ fromPartial<I extends {
244
+ id?: string | undefined;
245
+ type?: string | undefined;
246
+ controller?: string | undefined;
247
+ publicKeyBase58?: string | undefined;
248
+ publicKeyMultibase?: string | undefined;
249
+ publicKeyJWK?: any;
250
+ } & {
251
+ id?: string | undefined;
252
+ type?: string | undefined;
253
+ controller?: string | undefined;
254
+ publicKeyBase58?: string | undefined;
255
+ publicKeyMultibase?: string | undefined;
256
+ publicKeyJWK?: any;
257
+ } & { [K in Exclude<keyof I, keyof VerificationMethodPayload>]: never; }>(object: I): VerificationMethodPayload;
258
+ transformPayload<I_1 extends {
259
+ id?: string | undefined;
260
+ type?: string | undefined;
261
+ controller?: string | undefined;
262
+ publicKeyBase58?: string | undefined;
263
+ publicKeyMultibase?: string | undefined;
264
+ publicKeyJWK?: any;
265
+ } & {
266
+ id?: string | undefined;
267
+ type?: string | undefined;
268
+ controller?: string | undefined;
269
+ publicKeyBase58?: string | undefined;
270
+ publicKeyMultibase?: string | undefined;
271
+ publicKeyJWK?: any;
272
+ } & { [K_1 in Exclude<keyof I_1, keyof VerificationMethodPayload>]: never; }>(payload: I_1): VerificationMethod;
273
+ };
274
+ export interface ServicePayload {
275
+ id: string;
276
+ type: string;
277
+ serviceEndpoint: string[];
278
+ }
279
+ export declare const ServicePayload: {
280
+ fromPartial<I extends {
281
+ id?: string | undefined;
282
+ type?: string | undefined;
283
+ serviceEndpoint?: string[] | undefined;
284
+ } & {
285
+ id?: string | undefined;
286
+ type?: string | undefined;
287
+ serviceEndpoint?: (string[] & string[] & { [K in Exclude<keyof I["serviceEndpoint"], keyof string[]>]: never; }) | undefined;
288
+ } & { [K_1 in Exclude<keyof I, keyof ServicePayload>]: never; }>(object: I): ServicePayload;
289
+ };
290
+ export interface MsgUpdateDidPayload extends Omit<MsgUpdateDidDocPayload, 'verificationMethod' | 'service'> {
291
+ verificationMethod: VerificationMethodPayload[];
292
+ service: ServicePayload[];
59
293
  }
60
294
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../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AC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,GAAG,CAAC;CACtB;AAED,eAAO,MAAM,yBAAyB;;;;;;;uBAHnB,GAAG;;;;;;;uBAAH,GAAG;0FAIkE,yBAAyB;;;;;;;uBAJ9F,GAAG;;;;;;;uBAAH,GAAG;iGAmBwE,kBAAkB;CAQ/G,CAAA;AAMD,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc;;;;;;;;;iFACkD,cAAc;CAO1F,CAAA;AAMD,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,sBAAsB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACvG,kBAAkB,EAAE,yBAAyB,EAAE,CAAA;IAC/C,OAAO,EAAE,cAAc,EAAE,CAAA;CAC5B"}
package/build/types.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MethodSpecificIdAlgo = exports.VerificationMethods = exports.CheqdNetwork = void 0;
3
+ exports.ServicePayload = exports.VerificationMethodPayload = exports.MsgCreateDidPayload = exports.ISignInputs = exports.MethodSpecificIdAlgo = exports.VerificationMethods = exports.CheqdNetwork = void 0;
4
+ const v2_1 = require("@cheqd/ts-proto/cheqd/did/v2");
4
5
  var CheqdNetwork;
5
6
  (function (CheqdNetwork) {
6
7
  CheqdNetwork["Mainnet"] = "mainnet";
@@ -8,7 +9,8 @@ var CheqdNetwork;
8
9
  })(CheqdNetwork = exports.CheqdNetwork || (exports.CheqdNetwork = {}));
9
10
  var VerificationMethods;
10
11
  (function (VerificationMethods) {
11
- VerificationMethods["Base58"] = "Ed25519VerificationKey2020";
12
+ VerificationMethods["Ed255192020"] = "Ed25519VerificationKey2020";
13
+ VerificationMethods["Ed255192018"] = "Ed25519VerificationKey2018";
12
14
  VerificationMethods["JWK"] = "JsonWebKey2020";
13
15
  })(VerificationMethods = exports.VerificationMethods || (exports.VerificationMethods = {}));
14
16
  var MethodSpecificIdAlgo;
@@ -16,4 +18,127 @@ var MethodSpecificIdAlgo;
16
18
  MethodSpecificIdAlgo["Base58"] = "base58btc";
17
19
  MethodSpecificIdAlgo["Uuid"] = "uuid";
18
20
  })(MethodSpecificIdAlgo = exports.MethodSpecificIdAlgo || (exports.MethodSpecificIdAlgo = {}));
21
+ exports.ISignInputs = {
22
+ isSignInput(object) {
23
+ return object.some((x) => 'privateKeyHex' in x);
24
+ }
25
+ };
26
+ exports.MsgCreateDidPayload = {
27
+ transformPayload(message) {
28
+ const obj = {};
29
+ if (message.context) {
30
+ obj.context = message.context;
31
+ }
32
+ else {
33
+ obj.context = [];
34
+ }
35
+ message.id !== undefined && (obj.id = message.id);
36
+ if (message.controller) {
37
+ obj.controller = message.controller;
38
+ }
39
+ if (message.verificationMethod) {
40
+ obj.verificationMethod = message.verificationMethod.map((e) => e ? exports.VerificationMethodPayload.transformPayload(e) : undefined);
41
+ }
42
+ if (message.authentication) {
43
+ obj.authentication = message.authentication;
44
+ }
45
+ if (message.assertionMethod) {
46
+ obj.assertionMethod = message.assertionMethod;
47
+ }
48
+ if (message.capabilityInvocation) {
49
+ obj.capabilityInvocation = message.capabilityInvocation;
50
+ }
51
+ if (message.capabilityDelegation) {
52
+ obj.capabilityDelegation = message.capabilityDelegation;
53
+ }
54
+ if (message.keyAgreement) {
55
+ obj.keyAgreement = message.keyAgreement;
56
+ }
57
+ if (message.alsoKnownAs) {
58
+ obj.alsoKnownAs = message.alsoKnownAs;
59
+ }
60
+ if (message.service) {
61
+ obj.service = message.service.map((e) => e ? { id: e.id, serviceEndpoint: e.serviceEndpoint, serviceType: e.type } : undefined);
62
+ }
63
+ message.versionId !== undefined && (obj.versionId = message.versionId);
64
+ return v2_1.MsgCreateDidDocPayload.fromPartial(obj);
65
+ },
66
+ fromPartial(object) {
67
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
68
+ const message = createBaseMsgCreateDidPayload();
69
+ message.context = ((_a = object.context) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
70
+ message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
71
+ message.controller = ((_c = object.controller) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
72
+ message.verificationMethod = ((_d = object.verificationMethod) === null || _d === void 0 ? void 0 : _d.map((e) => exports.VerificationMethodPayload.fromPartial(e))) || [];
73
+ message.authentication = ((_e = object.authentication) === null || _e === void 0 ? void 0 : _e.map((e) => e)) || [];
74
+ message.assertionMethod = ((_f = object.assertionMethod) === null || _f === void 0 ? void 0 : _f.map((e) => e)) || [];
75
+ message.capabilityInvocation = ((_g = object.capabilityInvocation) === null || _g === void 0 ? void 0 : _g.map((e) => e)) || [];
76
+ message.capabilityDelegation = ((_h = object.capabilityDelegation) === null || _h === void 0 ? void 0 : _h.map((e) => e)) || [];
77
+ message.keyAgreement = ((_j = object.keyAgreement) === null || _j === void 0 ? void 0 : _j.map((e) => e)) || [];
78
+ message.alsoKnownAs = ((_k = object.alsoKnownAs) === null || _k === void 0 ? void 0 : _k.map((e) => e)) || [];
79
+ message.service = ((_l = object.service) === null || _l === void 0 ? void 0 : _l.map((e) => exports.ServicePayload.fromPartial(e))) || [];
80
+ message.versionId = (_m = object.versionId) !== null && _m !== void 0 ? _m : "";
81
+ return message;
82
+ },
83
+ };
84
+ function createBaseMsgCreateDidPayload() {
85
+ return {
86
+ context: [],
87
+ id: "",
88
+ controller: [],
89
+ verificationMethod: [],
90
+ authentication: [],
91
+ assertionMethod: [],
92
+ capabilityInvocation: [],
93
+ capabilityDelegation: [],
94
+ keyAgreement: [],
95
+ alsoKnownAs: [],
96
+ service: [],
97
+ versionId: "",
98
+ };
99
+ }
100
+ exports.VerificationMethodPayload = {
101
+ fromPartial(object) {
102
+ var _a, _b, _c;
103
+ const message = createBaseVerificationMethod();
104
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
105
+ message.type = (_b = object.type) !== null && _b !== void 0 ? _b : "";
106
+ message.controller = (_c = object.controller) !== null && _c !== void 0 ? _c : "";
107
+ if (object.publicKeyMultibase) {
108
+ message.publicKeyMultibase = object.publicKeyMultibase;
109
+ }
110
+ else if (object.publicKeyBase58) {
111
+ message.publicKeyBase58 = object.publicKeyBase58;
112
+ }
113
+ else if (object.publicKeyJWK) {
114
+ message.publicKeyJWK = object.publicKeyJWK;
115
+ }
116
+ return message;
117
+ },
118
+ transformPayload(payload) {
119
+ var _a, _b, _c;
120
+ return {
121
+ id: (_a = payload.id) !== null && _a !== void 0 ? _a : "",
122
+ controller: (_b = payload.controller) !== null && _b !== void 0 ? _b : "",
123
+ verificationMethodType: (_c = payload.type) !== null && _c !== void 0 ? _c : "",
124
+ verificationMaterial: payload.publicKeyBase58 || payload.publicKeyMultibase || JSON.stringify(payload.publicKeyJWK) || ""
125
+ };
126
+ }
127
+ };
128
+ function createBaseVerificationMethod() {
129
+ return { id: "", type: "", controller: "" };
130
+ }
131
+ exports.ServicePayload = {
132
+ fromPartial(object) {
133
+ var _a, _b, _c;
134
+ const message = createBaseService();
135
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
136
+ message.type = (_b = object.type) !== null && _b !== void 0 ? _b : "";
137
+ message.serviceEndpoint = ((_c = object.serviceEndpoint) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
138
+ return message;
139
+ },
140
+ };
141
+ function createBaseService() {
142
+ return { id: "", type: "", serviceEndpoint: [] };
143
+ }
19
144
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAKA,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,mCAAmB,C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E,CAAC;QACpC,OAAO,CAAC,EAAE,GAAG,MAAA,MAAM,CAAC,EAAE,mCAAI,EAAE,CAAC;QAC7B,OAAO,CAAC,IAAI,GAAG,MAAA,MAAM,CAAC,IAAI,mCAAI,EAAE,CAAC;QACjC,OAAO,CAAC,eAAe,GAAG,CAAA,MAAA,MAAM,CAAC,eAAe,0CAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAI,EAAE,CAAC;QACtE,OAAO,OAAO,CAAC;IACjB,CAAC;CACN,CAAA;AAED,SAAS,iBAAiB;IACtB,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC;AACrD,CAAC"}
package/build/utils.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { MsgCreateDidDocPayload, MsgUpdateDidDocPayload, VerificationMethod } from "@cheqd/ts-proto/cheqd/did/v2";
2
- import { IKeyPair, IKeyValuePair, ISignInputs, VerificationMethods, MethodSpecificIdAlgo, TVerificationKey, TVerificationKeyPrefix, CheqdNetwork, IVerificationKeys } from "./types";
1
+ import { IKeyPair, IKeyValuePair, ISignInputs, VerificationMethods, MethodSpecificIdAlgo, TVerificationKey, TVerificationKeyPrefix, CheqdNetwork, IVerificationKeys, MsgCreateDidPayload, VerificationMethodPayload, MsgUpdateDidPayload } from "./types";
3
2
  import { KeyPair } from '@stablelib/ed25519';
4
3
  export type TImportableEd25519Key = {
5
4
  publicKeyHex: string;
@@ -7,20 +6,13 @@ export type TImportableEd25519Key = {
7
6
  kid: string;
8
7
  type: "Ed25519";
9
8
  };
10
- export type IdentifierPayload = Partial<MsgCreateDidDocPayload> | Partial<MsgUpdateDidDocPayload>;
9
+ export type IdentifierPayload = Partial<MsgCreateDidPayload> | Partial<MsgUpdateDidPayload>;
11
10
  export declare function isEqualKeyValuePair(kv1: IKeyValuePair[], kv2: IKeyValuePair[]): boolean;
12
- export declare function createSignInputsFromImportableEd25519Key(key: TImportableEd25519Key, verificationMethod: VerificationMethod[]): ISignInputs;
11
+ export declare function createSignInputsFromImportableEd25519Key(key: TImportableEd25519Key, verificationMethod: VerificationMethodPayload[]): ISignInputs;
13
12
  export declare function createKeyPairRaw(seed?: string): KeyPair;
14
13
  export declare function createKeyPairBase64(seed?: string): IKeyPair;
15
14
  export declare function createKeyPairHex(seed?: string): IKeyPair;
16
- export declare function createVerificationKeys(keyPair: IKeyPair, algo: MethodSpecificIdAlgo, key: TVerificationKey<TVerificationKeyPrefix, number>, length?: number, network?: CheqdNetwork): IVerificationKeys;
17
- export declare function createDidVerificationMethod(verificationMethodTypes: VerificationMethods[], verificationKeys: IVerificationKeys[]): VerificationMethod[];
18
- export declare function createDidPayload(verificationMethods: VerificationMethod[], verificationKeys: IVerificationKeys[]): MsgCreateDidDocPayload;
19
- export declare function createDidPayloadWithSignInputs(seed?: string, keys?: IKeyPair[]): {
20
- didPayload: MsgCreateDidDocPayload;
21
- keys: IKeyPair[];
22
- signInputs: ISignInputs[];
23
- };
24
- export declare function convertKeyPairtoTImportableEd25519Key(keyPair: IKeyPair): TImportableEd25519Key;
25
- export declare function createSignInputsFromKeyPair(didDocument: IdentifierPayload, keys: IKeyPair[]): ISignInputs[];
15
+ export declare function createVerificationKeys(publicKey: string, algo: MethodSpecificIdAlgo, key: TVerificationKey<TVerificationKeyPrefix, number>, network?: CheqdNetwork): IVerificationKeys;
16
+ export declare function createDidVerificationMethod(verificationMethodTypes: VerificationMethods[], verificationKeys: IVerificationKeys[]): VerificationMethodPayload[];
17
+ export declare function createDidPayload(verificationMethods: VerificationMethodPayload[], verificationKeys: IVerificationKeys[]): MsgCreateDidPayload;
26
18
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EACrB,MAAM,8BAA8B,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