@atproto/aws 0.1.3 → 0.1.4

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atproto/aws
2
2
 
3
+ ## 0.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`84e2d4d2`](https://github.com/bluesky-social/atproto/commit/84e2d4d2b6694f344d80c18672c78b650189d423)]:
8
+ - @atproto/common@0.3.3
9
+ - @atproto/crypto@0.2.3
10
+ - @atproto/repo@0.3.4
11
+
3
12
  ## 0.1.3
4
13
 
5
14
  ### Patch Changes
package/LICENSE.txt ADDED
@@ -0,0 +1,7 @@
1
+ Dual MIT/Apache-2.0 License
2
+
3
+ Copyright (c) 2022-2023 Bluesky PBC, and Contributors
4
+
5
+ Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
6
+
7
+ Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
package/dist/index.js CHANGED
@@ -138552,16 +138552,18 @@ var decompressPubkey2 = (compressed) => {
138552
138552
  };
138553
138553
 
138554
138554
  // ../crypto/src/p256/operations.ts
138555
- var verifyDidSig = async (did2, data, sig) => {
138555
+ var verifyDidSig = async (did2, data, sig, opts) => {
138556
138556
  const { jwtAlg, keyBytes } = parseDidKey(did2);
138557
138557
  if (jwtAlg !== P256_JWT_ALG) {
138558
138558
  throw new Error(`Not a P-256 did:key: ${did2}`);
138559
138559
  }
138560
- return verifySig(keyBytes, data, sig);
138560
+ return verifySig(keyBytes, data, sig, opts);
138561
138561
  };
138562
- var verifySig = async (publicKey, data, sig) => {
138562
+ var verifySig = async (publicKey, data, sig, opts) => {
138563
138563
  const msgHash = await sha256(data);
138564
- return p256.verify(sig, msgHash, publicKey, { lowS: true });
138564
+ return p256.verify(sig, msgHash, publicKey, {
138565
+ lowS: opts?.lowS ?? true
138566
+ });
138565
138567
  };
138566
138568
 
138567
138569
  // ../crypto/src/p256/plugin.ts
@@ -138573,16 +138575,18 @@ var p256Plugin = {
138573
138575
  var plugin_default = p256Plugin;
138574
138576
 
138575
138577
  // ../crypto/src/secp256k1/operations.ts
138576
- var verifyDidSig2 = async (did2, data, sig) => {
138578
+ var verifyDidSig2 = async (did2, data, sig, opts) => {
138577
138579
  const { jwtAlg, keyBytes } = parseDidKey(did2);
138578
138580
  if (jwtAlg !== SECP256K1_JWT_ALG) {
138579
138581
  throw new Error(`Not a secp256k1 did:key: ${did2}`);
138580
138582
  }
138581
- return verifySig2(keyBytes, data, sig);
138583
+ return verifySig2(keyBytes, data, sig, opts);
138582
138584
  };
138583
- var verifySig2 = async (publicKey, data, sig) => {
138585
+ var verifySig2 = async (publicKey, data, sig, opts) => {
138584
138586
  const msgHash = await sha256(data);
138585
- return secp256k1.verify(sig, msgHash, publicKey, { lowS: true });
138587
+ return secp256k1.verify(sig, msgHash, publicKey, {
138588
+ lowS: opts?.lowS ?? true
138589
+ });
138586
138590
  };
138587
138591
 
138588
138592
  // ../crypto/src/secp256k1/plugin.ts