@atproto/crypto 0.1.1 → 0.2.1
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/const.d.ts +2 -1
- package/dist/did.d.ts +4 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1924 -2556
- package/dist/index.js.map +4 -4
- package/dist/multibase.d.ts +2 -0
- package/dist/p256/keypair.d.ts +9 -9
- package/dist/p256/operations.d.ts +1 -3
- package/dist/random.d.ts +3 -2
- package/dist/secp256k1/operations.d.ts +1 -0
- package/dist/sha.d.ts +0 -2
- package/dist/types.d.ts +1 -0
- package/package.json +10 -7
- package/src/const.ts +2 -1
- package/src/did.ts +27 -10
- package/src/index.ts +0 -1
- package/src/multibase.ts +27 -0
- package/src/p256/encoding.ts +5 -72
- package/src/p256/keypair.ts +25 -41
- package/src/p256/operations.ts +6 -45
- package/src/random.ts +15 -8
- package/src/secp256k1/encoding.ts +3 -5
- package/src/secp256k1/keypair.ts +7 -5
- package/src/secp256k1/operations.ts +12 -3
- package/src/sha.ts +2 -19
- package/src/types.ts +1 -0
- package/tests/did.test.ts +8 -22
- package/tests/key-compression.test.ts +3 -3
- package/tests/keypairs.test.ts +71 -0
- package/tests/random.test.ts +15 -0
- package/tests/signature-fixtures.json +34 -0
- package/tests/signatures.test.ts +161 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/p256/encoding.d.ts +0 -2
- package/dist/p256/plugin.d.ts +0 -3
- package/dist/plugins.d.ts +0 -2
- package/dist/secp256k1/encoding.d.ts +0 -2
- package/dist/secp256k1/keypair.d.ts +0 -20
- package/dist/secp256k1/plugin.d.ts +0 -3
- package/dist/verify.d.ts +0 -2
- package/src/aes.ts +0 -64
- package/tests/export.test.ts +0 -50
package/dist/const.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const P256_DID_PREFIX: Uint8Array;
|
|
2
2
|
export declare const SECP256K1_DID_PREFIX: Uint8Array;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const BASE58_MULTIBASE_PREFIX = "z";
|
|
4
|
+
export declare const DID_KEY_PREFIX = "did:key:";
|
|
4
5
|
export declare const P256_JWT_ALG = "ES256";
|
|
5
6
|
export declare const SECP256K1_JWT_ALG = "ES256K";
|
package/dist/did.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare type ParsedDidKey = {
|
|
1
|
+
export declare type ParsedMultikey = {
|
|
3
2
|
jwtAlg: string;
|
|
4
3
|
keyBytes: Uint8Array;
|
|
5
4
|
};
|
|
6
|
-
export declare const
|
|
5
|
+
export declare const parseMultikey: (multikey: string) => ParsedMultikey;
|
|
6
|
+
export declare const formatMultikey: (jwtAlg: string, keyBytes: Uint8Array) => string;
|
|
7
|
+
export declare const parseDidKey: (did: string) => ParsedMultikey;
|
|
7
8
|
export declare const formatDidKey: (jwtAlg: string, keyBytes: Uint8Array) => string;
|
package/dist/index.d.ts
CHANGED