signify-ts 0.3.0-rc2 → 0.4.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/dist/keri/app/aiding.d.ts +20 -4
- package/dist/keri/app/aiding.js +27 -2
- package/dist/keri/app/clienting.d.ts +2 -0
- package/dist/keri/app/clienting.js +1 -1
- package/dist/keri/app/contacting.d.ts +9 -14
- package/dist/keri/app/contacting.js +2 -2
- package/dist/keri/app/controller.js +2 -2
- package/dist/keri/app/coring.d.ts +119 -25
- package/dist/keri/app/coring.js +40 -13
- package/dist/keri/app/credentialing.d.ts +10 -10
- package/dist/keri/app/didwebing.d.ts +146 -0
- package/dist/keri/app/didwebing.js +359 -0
- package/dist/keri/app/escrowing.d.ts +4 -2
- package/dist/keri/app/escrowing.js +1 -1
- package/dist/keri/app/exchanging.d.ts +238 -7
- package/dist/keri/app/exchanging.js +102 -3
- package/dist/keri/app/grouping.d.ts +10 -8
- package/dist/keri/app/grouping.js +4 -4
- package/dist/keri/app/signaling.d.ts +50 -0
- package/dist/keri/app/signaling.js +52 -0
- package/dist/keri/app/w3cing.d.ts +137 -0
- package/dist/keri/app/w3cing.js +337 -0
- package/dist/keri/core/eventing.d.ts +2 -2
- package/dist/keri/core/eventing.js +7 -18
- package/dist/keri/core/keeping.d.ts +111 -8
- package/dist/keri/core/keeping.js +133 -54
- package/dist/keri/core/keyState.d.ts +84 -70
- package/dist/keri/core/keyState.js +1 -1
- package/dist/keri/core/manager.d.ts +1 -1
- package/dist/keri/core/manager.js +3 -3
- package/dist/keri/core/number.d.ts +1 -1
- package/dist/keri/core/number.js +7 -4
- package/dist/keri/core/salter.d.ts +2 -9
- package/dist/keri/core/salter.js +2 -9
- package/dist/types/keria-api-schema.d.ts +889 -35
- package/dist/types/keria-api-schema.js +34 -2
- package/package.json +3 -5
package/dist/keri/core/number.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { Matter, NumDex } from "./matter.js";
|
|
2
2
|
import { bytesToInt, intToBytes } from "./utils.js";
|
|
3
3
|
export class CesrNumber extends Matter {
|
|
4
|
-
constructor({ raw, code, qb64b, qb64, qb2 }, num
|
|
4
|
+
constructor({ raw, code, qb64b, qb64, qb2 }, num) {
|
|
5
5
|
let _num;
|
|
6
6
|
if (raw == undefined &&
|
|
7
7
|
qb64 == undefined &&
|
|
8
8
|
qb64b == undefined &&
|
|
9
9
|
qb2 == undefined) {
|
|
10
|
-
if (typeof num
|
|
10
|
+
if (typeof num === 'number') {
|
|
11
11
|
_num = num;
|
|
12
12
|
}
|
|
13
|
-
else if (
|
|
14
|
-
_num = parseInt(
|
|
13
|
+
else if (typeof num === 'string') {
|
|
14
|
+
_num = parseInt(num, 16);
|
|
15
|
+
if (Number.isNaN(_num)) {
|
|
16
|
+
throw new Error(`Invalid hex string for num: ${num}`);
|
|
17
|
+
}
|
|
15
18
|
}
|
|
16
19
|
else {
|
|
17
20
|
_num = 0;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { Signer } from './signer.ts';
|
|
2
2
|
import { Matter } from './matter.ts';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
export declare enum Tier {
|
|
7
|
-
low = "low",
|
|
8
|
-
med = "med",
|
|
9
|
-
high = "high"
|
|
10
|
-
}
|
|
3
|
+
import { Tier } from '../../types/keria-api-schema.ts';
|
|
4
|
+
export { Tier } from '../../types/keria-api-schema.ts';
|
|
11
5
|
interface SalterArgs {
|
|
12
6
|
raw?: Uint8Array | undefined;
|
|
13
7
|
code?: string;
|
|
@@ -62,4 +56,3 @@ export declare class Salter extends Matter {
|
|
|
62
56
|
signer(code?: string, transferable?: boolean, path?: string, tier?: Tier | null, temp?: boolean): Signer;
|
|
63
57
|
get tier(): Tier | null;
|
|
64
58
|
}
|
|
65
|
-
export {};
|
package/dist/keri/core/salter.js
CHANGED
|
@@ -2,15 +2,8 @@ import { Signer } from "./signer.js";
|
|
|
2
2
|
import { Matter, MtrDex } from "./matter.js";
|
|
3
3
|
import { EmptyMaterialError } from "./kering.js";
|
|
4
4
|
import libsodium from 'libsodium-wrappers-sumo';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
export var Tier;
|
|
9
|
-
(function (Tier) {
|
|
10
|
-
Tier["low"] = "low";
|
|
11
|
-
Tier["med"] = "med";
|
|
12
|
-
Tier["high"] = "high";
|
|
13
|
-
})(Tier || (Tier = {}));
|
|
5
|
+
import { Tier } from "../../types/keria-api-schema.js";
|
|
6
|
+
export { Tier } from "../../types/keria-api-schema.js";
|
|
14
7
|
/**
|
|
15
8
|
* Maintains a random salt for secrets (private keys).
|
|
16
9
|
* Its .raw is random salt, .code as cipher suite for salt
|