sigflint 1.0.0 → 1.0.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/types/v4a.d.ts CHANGED
@@ -1,17 +1,46 @@
1
- export declare const asymmetric: {
2
- algorithm: string;
3
- scope: (date: any, _region: any, service: any) => string;
1
+ /** @type {import('./base.js').Scheme} */
2
+ export declare const asymmetric: import('./base.js').Scheme;
3
+ /**
4
+ * The request with the region set added as a signed header; `regionSet` is 'us-east-1,us-west-2' or '*'.
5
+ * @param {import('./base.js').SignRequest} request
6
+ */
7
+ export declare const withRegionSet: (request: import('./base.js').SignRequest) => {
8
+ method: string;
9
+ url: URL;
10
+ service?: string;
11
+ region?: string;
12
+ body?: string;
13
+ unsignedPayload?: boolean;
14
+ now?: number;
15
+ expires?: number;
16
+ regionSet?: string;
17
+ signHeaders: {
18
+ 'x-amz-region-set': string;
19
+ };
4
20
  };
5
- /** The request with the region set added as a signed header; `regionSet` is 'us-east-1,us-west-2' or '*'. */
6
- export declare const withRegionSet: (request: any) => any;
7
- export declare const regionSetQuery: (request: any) => string;
8
- export declare const kdfInput: (accessKeyId: any, counter: any) => string;
9
- /** The private scalar (HMAC output + 1) when the HMAC output is at most the curve order minus 2, else undefined. */
10
- export declare function scalarFrom(k: any): Uint8Array<ArrayBuffer> | undefined;
11
- /** The SigV4a private key: the P-256 scalar derived from the secret key by the counter-mode HMAC construction in the AWS documentation (32 bytes, big-endian). */
12
- export declare function deriveP256(hmac: any, accessKeyId: any, secretAccessKey: any): Uint8Array<ArrayBuffer>;
13
- /** A signer from the string to sign to a hex DER ECDSA signature, with a cache of the keys built from credentials. Asking again for the same `ecdsa` returns the same signer. */
14
- export declare function createAsymmetric(hmac: any, ecdsa: any): any;
21
+ /** @param {import('./base.js').SignRequest} request */
22
+ export declare const regionSetQuery: (request: import('./base.js').SignRequest) => string;
23
+ /**
24
+ * @param {string} accessKeyId
25
+ * @param {number} counter
26
+ */
27
+ export declare const kdfInput: (accessKeyId: string, counter: number) => string;
28
+ /**
29
+ * The private scalar (HMAC output + 1) when the HMAC output is at most the curve order minus 2, else undefined.
30
+ * @param {Uint8Array} k
31
+ */
32
+ export declare function scalarFrom(k: Uint8Array): Uint8Array<ArrayBuffer> | undefined;
33
+ /** The SigV4a private key: the P-256 scalar derived from the secret key by the counter-mode HMAC construction in the AWS documentation (32 bytes, big-endian).
34
+ * @param {AsymmetricPrimitives['hmac']} hmac
35
+ * @param {string} accessKeyId
36
+ * @param {string} secretAccessKey
37
+ */
38
+ export declare function deriveP256(hmac: AsymmetricPrimitives['hmac'], accessKeyId: string, secretAccessKey: string): Uint8Array<ArrayBuffer>;
39
+ /** A signer from the string to sign to a hex DER ECDSA signature, with a cache of the keys built from credentials. Asking again for the same `ecdsa` returns the same signer.
40
+ * @param {AsymmetricPrimitives['hmac']} hmac
41
+ * @param {AsymmetricPrimitives['ecdsa']} ecdsa
42
+ */
43
+ export declare function createAsymmetric(hmac: AsymmetricPrimitives['hmac'], ecdsa: AsymmetricPrimitives['ecdsa']): (credentials: import('./base.js').Credentials, text: string) => string;
15
44
  export type AsymmetricPrimitives = {
16
45
  /**
17
46
  * - SHA-256 as lowercase hex