@atproto/aws 0.1.0 → 0.1.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/CHANGELOG.md +15 -0
- package/LICENSE +21 -0
- package/README.md +1 -1
- package/build.js +0 -8
- package/dist/index.js +13636 -29068
- package/dist/index.js.map +4 -4
- package/package.json +21 -18
- package/tsconfig.build.json +1 -1
- package/tsconfig.json +2 -2
- package/dist/src/aes.d.ts +0 -8
- package/dist/src/const.d.ts +0 -5
- package/dist/src/did.d.ts +0 -7
- package/dist/src/multibase.d.ts +0 -1
- package/dist/src/p256/ecdh.d.ts +0 -11
- package/dist/src/p256/ecdsa.d.ts +0 -19
- package/dist/src/p256/encoding.d.ts +0 -2
- package/dist/src/p256/keypair.d.ts +0 -19
- package/dist/src/p256/operations.d.ts +0 -4
- package/dist/src/p256/plugin.d.ts +0 -3
- package/dist/src/plugins.d.ts +0 -2
- package/dist/src/random.d.ts +0 -2
- package/dist/src/run.d.ts +0 -1
- package/dist/src/secp256k1/encoding.d.ts +0 -2
- package/dist/src/secp256k1/keypair.d.ts +0 -19
- package/dist/src/secp256k1/operations.d.ts +0 -1
- package/dist/src/secp256k1/plugin.d.ts +0 -3
- package/dist/src/sha.d.ts +0 -1
- package/dist/src/verify.d.ts +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- /package/dist/{src/cloudfront.d.ts → cloudfront.d.ts} +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/kms.d.ts → kms.d.ts} +0 -0
- /package/dist/{src/s3.d.ts → s3.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/aws",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"main": "src/index.ts",
|
|
3
|
+
"version": "0.1.2",
|
|
5
4
|
"license": "MIT",
|
|
5
|
+
"description": "Shared AWS cloud API helpers for atproto services",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"atproto",
|
|
8
|
+
"aws"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://atproto.com",
|
|
6
11
|
"repository": {
|
|
7
12
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/bluesky-social/atproto
|
|
13
|
+
"url": "https://github.com/bluesky-social/atproto",
|
|
9
14
|
"directory": "packages/aws"
|
|
10
15
|
},
|
|
11
|
-
"
|
|
12
|
-
"prettier": "prettier --check src/",
|
|
13
|
-
"prettier:fix": "prettier --write src/",
|
|
14
|
-
"lint": "eslint . --ext .ts,.tsx",
|
|
15
|
-
"lint:fix": "yarn lint --fix",
|
|
16
|
-
"verify": "run-p prettier lint",
|
|
17
|
-
"verify:fix": "yarn prettier:fix && yarn lint:fix",
|
|
18
|
-
"build": "node ./build.js",
|
|
19
|
-
"postbuild": "tsc --build tsconfig.build.json"
|
|
20
|
-
},
|
|
16
|
+
"main": "dist/index.js",
|
|
21
17
|
"dependencies": {
|
|
22
|
-
"@atproto/crypto": "*",
|
|
23
18
|
"@aws-sdk/client-cloudfront": "^3.261.0",
|
|
24
19
|
"@aws-sdk/client-kms": "^3.196.0",
|
|
25
20
|
"@aws-sdk/client-s3": "^3.224.0",
|
|
26
21
|
"@aws-sdk/lib-storage": "^3.226.0",
|
|
27
22
|
"@noble/curves": "^1.1.0",
|
|
28
23
|
"key-encoder": "^2.0.3",
|
|
29
|
-
"multiformats": "^9.
|
|
30
|
-
"uint8arrays": "3.0.0"
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
"multiformats": "^9.9.0",
|
|
25
|
+
"uint8arrays": "3.0.0",
|
|
26
|
+
"@atproto/crypto": "^0.2.2",
|
|
27
|
+
"@atproto/repo": "^0.3.2"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "node ./build.js",
|
|
31
|
+
"postbuild": "tsc --build tsconfig.build.json",
|
|
32
|
+
"update-main-to-dist": "node ../../update-main-to-dist.js packages/aws"
|
|
33
|
+
},
|
|
34
|
+
"types": "dist/src/index.d.ts"
|
|
35
|
+
}
|
package/tsconfig.build.json
CHANGED
package/tsconfig.json
CHANGED
package/dist/src/aes.d.ts
DELETED
package/dist/src/const.d.ts
DELETED
package/dist/src/did.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const DID_KEY_BASE58_PREFIX = "did:key:z";
|
|
2
|
-
export declare type ParsedDidKey = {
|
|
3
|
-
jwtAlg: string;
|
|
4
|
-
keyBytes: Uint8Array;
|
|
5
|
-
};
|
|
6
|
-
export declare const parseDidKey: (did: string) => ParsedDidKey;
|
|
7
|
-
export declare const formatDidKey: (jwtAlg: string, keyBytes: Uint8Array) => string;
|
package/dist/src/multibase.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const multibaseToBytes: (mb: string) => Uint8Array;
|
package/dist/src/p256/ecdh.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import AesKey from '../aes';
|
|
2
|
-
export declare class EcdhKeypair {
|
|
3
|
-
private keypair;
|
|
4
|
-
constructor(keypair: CryptoKeyPair);
|
|
5
|
-
static create(): Promise<EcdhKeypair>;
|
|
6
|
-
did(): Promise<string>;
|
|
7
|
-
deriveSharedKey(otherDid: string): Promise<AesKey>;
|
|
8
|
-
encryptForDid(data: string, otherDid: string): Promise<string>;
|
|
9
|
-
decryptFromDid(data: string, otherDid: string): Promise<string>;
|
|
10
|
-
}
|
|
11
|
-
export default EcdhKeypair;
|
package/dist/src/p256/ecdsa.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as ucan from '@ucans/core';
|
|
2
|
-
export declare type EcdsaKeypairOptions = {
|
|
3
|
-
exportable: boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare class EcdsaKeypair implements ucan.DidableKey {
|
|
6
|
-
jwtAlg: string;
|
|
7
|
-
private publicKey;
|
|
8
|
-
private keypair;
|
|
9
|
-
private exportable;
|
|
10
|
-
constructor(keypair: CryptoKeyPair, publicKey: Uint8Array, exportable: boolean);
|
|
11
|
-
static create(opts?: Partial<EcdsaKeypairOptions>): Promise<EcdsaKeypair>;
|
|
12
|
-
static import(jwk: JsonWebKey, opts?: Partial<EcdsaKeypairOptions>): Promise<EcdsaKeypair>;
|
|
13
|
-
publicKeyBytes(): Uint8Array;
|
|
14
|
-
publicKeyStr(encoding?: ucan.Encodings): string;
|
|
15
|
-
did(): string;
|
|
16
|
-
sign(msg: Uint8Array): Promise<Uint8Array>;
|
|
17
|
-
export(): Promise<JsonWebKey>;
|
|
18
|
-
}
|
|
19
|
-
export default EcdsaKeypair;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as ucan from '@ucans/core';
|
|
2
|
-
export declare type EcdsaKeypairOptions = {
|
|
3
|
-
exportable: boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare class EcdsaKeypair implements ucan.DidableKey {
|
|
6
|
-
jwtAlg: string;
|
|
7
|
-
private publicKey;
|
|
8
|
-
private keypair;
|
|
9
|
-
private exportable;
|
|
10
|
-
constructor(keypair: CryptoKeyPair, publicKey: Uint8Array, exportable: boolean);
|
|
11
|
-
static create(opts?: Partial<EcdsaKeypairOptions>): Promise<EcdsaKeypair>;
|
|
12
|
-
static import(jwk: JsonWebKey, opts?: Partial<EcdsaKeypairOptions>): Promise<EcdsaKeypair>;
|
|
13
|
-
publicKeyBytes(): Uint8Array;
|
|
14
|
-
publicKeyStr(encoding?: ucan.Encodings): string;
|
|
15
|
-
did(): string;
|
|
16
|
-
sign(msg: Uint8Array): Promise<Uint8Array>;
|
|
17
|
-
export(): Promise<JsonWebKey>;
|
|
18
|
-
}
|
|
19
|
-
export default EcdsaKeypair;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const importKeypairJwk: (jwk: JsonWebKey, exportable?: boolean) => Promise<CryptoKeyPair>;
|
|
2
|
-
export declare const verifyDidSig: (did: string, data: Uint8Array, sig: Uint8Array) => Promise<boolean>;
|
|
3
|
-
export declare const verify: (publicKey: Uint8Array, data: Uint8Array, sig: Uint8Array) => Promise<boolean>;
|
|
4
|
-
export declare const importEcdsaPublicKey: (keyBytes: Uint8Array) => Promise<CryptoKey>;
|
package/dist/src/plugins.d.ts
DELETED
package/dist/src/random.d.ts
DELETED
package/dist/src/run.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as ucan from '@ucans/core';
|
|
2
|
-
export declare type Secp256k1KeypairOptions = {
|
|
3
|
-
exportable: boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare class Secp256k1Keypair implements ucan.DidableKey {
|
|
6
|
-
private privateKey;
|
|
7
|
-
private exportable;
|
|
8
|
-
jwtAlg: string;
|
|
9
|
-
private publicKey;
|
|
10
|
-
constructor(privateKey: Uint8Array, exportable: boolean);
|
|
11
|
-
static create(opts?: Partial<Secp256k1KeypairOptions>): Promise<Secp256k1Keypair>;
|
|
12
|
-
static import(privKey: Uint8Array | string, opts?: Partial<Secp256k1KeypairOptions>): Promise<Secp256k1Keypair>;
|
|
13
|
-
publicKeyBytes(): Uint8Array;
|
|
14
|
-
publicKeyStr(encoding?: ucan.Encodings): string;
|
|
15
|
-
did(): string;
|
|
16
|
-
sign(msg: Uint8Array): Promise<Uint8Array>;
|
|
17
|
-
export(): Promise<Uint8Array>;
|
|
18
|
-
}
|
|
19
|
-
export default Secp256k1Keypair;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const verifyDidSig: (did: string, data: Uint8Array, sig: Uint8Array) => Promise<boolean>;
|
package/dist/src/sha.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sha256: (input: Uint8Array | string) => Promise<Uint8Array>;
|
package/dist/src/verify.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const verifyDidSig: (did: string, data: Uint8Array, sig: Uint8Array) => Promise<boolean>;
|