@atproto/crypto 0.5.0-next.0 → 0.5.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/CHANGELOG.md CHANGED
@@ -1,18 +1,22 @@
1
1
  # @atproto/crypto
2
2
 
3
- ## 0.5.0-next.0
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4967](https://github.com/bluesky-social/atproto/pull/4967) [`9fc720c`](https://github.com/bluesky-social/atproto/commit/9fc720ce75f3ee88a5e48a9be919b07c7647f6f5) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Use TypeScript 7 to build package
8
+
9
+ ## 0.5.0
4
10
 
5
11
  ### Minor Changes
6
12
 
7
- - [#4929](https://github.com/bluesky-social/atproto/pull/4929) [`bb7491c`](https://github.com/bluesky-social/atproto/commit/bb7491c29e06181e1d2f8cf6eb454f9bb8ab961b) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Drop support for Node.js 18 and 20. Node.js 22 is now the minimum supported version. Docker images now use Node.js 24.
13
+ - [#4929](https://github.com/bluesky-social/atproto/pull/4929) [`f01c59f`](https://github.com/bluesky-social/atproto/commit/f01c59f5bd3f75fb8b47a9eecd4858b84033fb7c) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Drop support for Node.js 18 and 20. Node.js 22 is now the minimum supported version. Docker images now use Node.js 24.
8
14
 
9
- - [#4943](https://github.com/bluesky-social/atproto/pull/4943) [`07ae5d4`](https://github.com/bluesky-social/atproto/commit/07ae5d4452df51e045e0239da7a04cf0bc154028) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Convert to pure ESM. All packages now ship `"type": "module"` with ES module output and Node16 module resolution.
15
+ - [#4943](https://github.com/bluesky-social/atproto/pull/4943) [`c459153`](https://github.com/bluesky-social/atproto/commit/c459153395a30ce89e050892c8fab7dc98e019b9) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Convert to pure ESM. All packages now ship `"type": "module"` with ES module output and Node16 module resolution.
10
16
 
11
17
  Node.js 22's `require()` compatibility layer can still load these packages in CommonJS code.
12
18
 
13
- - [#4930](https://github.com/bluesky-social/atproto/pull/4930) [`042df15`](https://github.com/bluesky-social/atproto/commit/042df15087c0e62cd1e715fcbf58852fab875af9) Thanks [@devinivy](https://github.com/devinivy)! - Build with TypeScript 6.0. Emitted `.d.ts` files now use TypeScript 6's stricter `Uint8Array<ArrayBuffer>` typing in places where Web/Node APIs require buffer-backed (not shared-memory) byte arrays. Consumers compiling against these types on older TypeScript should see no runtime impact, but may need to widen or cast in spots that previously relied on `Uint8Array` defaulting to `<ArrayBufferLike>`.
14
-
15
- Internal: tsconfig `moduleResolution: "node"` is silenced via `ignoreDeprecations: "6.0"` for now; the proper migration to `node16`/`bundler` resolution is deferred.
19
+ - [#4930](https://github.com/bluesky-social/atproto/pull/4930) [`908bece`](https://github.com/bluesky-social/atproto/commit/908bece169258bff5ad121e5eec157d6ded6f705) Thanks [@devinivy](https://github.com/devinivy)! - Build with TypeScript 6.0.
16
20
 
17
21
  ## 0.4.5
18
22
 
package/dist/did.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"did.d.ts","sourceRoot":"","sources":["../src/did.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,UAAU,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,KAAG,cAahD,CAAA;AAED,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,EACd,UAAU,UAAU,KACnB,MAYF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,cAGzC,CAAA;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,UAAU,GACnB,WAAW,MAAM,EAAE,CAErB"}
1
+ {"version":3,"file":"did.d.ts","sourceRoot":"","sources":["../src/did.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,UAAU,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,aAAa,aAAc,MAAM,KAAG,cAahD,CAAA;AAED,eAAO,MAAM,cAAc,WACjB,MAAM,YACJ,UAAU,KACnB,MAYF,CAAA;AAED,eAAO,MAAM,WAAW,QAAS,MAAM,KAAG,cAGzC,CAAA;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,UAAU,GACnB,WAAW,MAAM,EAAE,CAErB"}
@@ -1 +1 @@
1
- {"version":3,"file":"multibase.d.ts","sourceRoot":"","sources":["../src/multibase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE1D,eAAO,MAAM,gBAAgB,GAAI,IAAI,MAAM,KAAG,UAuB7C,CAAA;AAED,eAAO,MAAM,gBAAgB,GAC3B,IAAI,UAAU,EACd,UAAU,kBAAkB,KAC3B,MAqBF,CAAA"}
1
+ {"version":3,"file":"multibase.d.ts","sourceRoot":"","sources":["../src/multibase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE1D,eAAO,MAAM,gBAAgB,OAAQ,MAAM,KAAG,UAuB7C,CAAA;AAED,eAAO,MAAM,gBAAgB,OACvB,UAAU,YACJ,kBAAkB,KAC3B,MAqBF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../src/p256/encoding.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAI,aAAa,UAAU,KAAG,UAGxD,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,YAAY,UAAU,KAAG,UAMzD,CAAA"}
1
+ {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../src/p256/encoding.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,gBAAiB,UAAU,KAAG,UAGxD,CAAA;AAED,eAAO,MAAM,gBAAgB,eAAgB,UAAU,KAAG,UAMzD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../../src/p256/keypair.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAG1D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,qBAAa,WAAY,YAAW,OAAO;IAKvC,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,UAAU;IALpB,MAAM,SAAe;IACrB,OAAO,CAAC,SAAS,CAAY;gBAGnB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,OAAO;WAKhB,MAAM,CACjB,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACjC,OAAO,CAAC,WAAW,CAAC;WAMV,MAAM,CACjB,OAAO,EAAE,UAAU,GAAG,MAAM,EAC5B,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACjC,OAAO,CAAC,WAAW,CAAC;IAOvB,cAAc,IAAI,UAAU;IAI5B,YAAY,CAAC,QAAQ,GAAE,kBAAgC,GAAG,MAAM;IAIhE,GAAG,IAAI,MAAM;IAIP,IAAI,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAO1C,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC;CAMpC"}
1
+ {"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../../src/p256/keypair.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAG1D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,OAA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E,CAAA;IAChC,CAAC;IAED,KAAK,CAAC,MAAM;QACV,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;QAClD,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;CACF","sourcesContent":["import { p256 } from '@noble/curves/p256'\nimport { sha256 } from '@noble/hashes/sha256'\nimport {\n fromString as ui8FromString,\n toString as ui8ToString,\n} from 'uint8arrays'\nimport { SupportedEncodings } from 'uint8arrays/to-string'\nimport { P256_JWT_ALG } from '../const.js'\nimport * as did from '../did.js'\nimport { Keypair } from '../types.js'\n\nexport type P256KeypairOptions = {\n exportable: boolean\n}\n\nexport class P256Keypair implements Keypair {\n jwtAlg = P256_JWT_ALG\n private publicKey: Uint8Array\n\n constructor(\n private privateKey: Uint8Array,\n private exportable: boolean,\n ) {\n this.publicKey = p256.getPublicKey(privateKey)\n }\n\n static async create(\n opts?: Partial<P256KeypairOptions>,\n ): Promise<P256Keypair> {\n const { exportable = false } = opts || {}\n const privKey = p256.utils.randomPrivateKey()\n return new P256Keypair(privKey, exportable)\n }\n\n static async import(\n privKey: Uint8Array | string,\n opts?: Partial<P256KeypairOptions>,\n ): Promise<P256Keypair> {\n const { exportable = false } = opts || {}\n const privKeyBytes =\n typeof privKey === 'string' ? ui8FromString(privKey, 'hex') : privKey\n return new P256Keypair(privKeyBytes, exportable)\n }\n\n publicKeyBytes(): Uint8Array {\n return this.publicKey\n }\n\n publicKeyStr(encoding: SupportedEncodings = 'base64pad'): string {\n return ui8ToString(this.publicKey, encoding)\n }\n\n did(): string {\n return did.formatDidKey(this.jwtAlg, this.publicKey)\n }\n\n async sign(msg: Uint8Array): Promise<Uint8Array> {\n const msgHash = await sha256(msg)\n // return raw 64 byte sig not DER-encoded\n const sig = await p256.sign(msgHash, this.privateKey, { lowS: true })\n return sig.toCompactRawBytes()\n }\n\n async export(): Promise<Uint8Array> {\n if (!this.exportable) {\n throw new Error('Private key is not exportable')\n }\n return this.privateKey\n }\n}\n"]}
1
+ {"version":3,"file":"keypair.js","sourceRoot":"","sources":["../../src/p256/keypair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EACL,UAAU,IAAI,aAAa,EAC3B,QAAQ,IAAI,WAAW,GACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,GAAG,MAAM,WAAW,CAAA;AAOhC,MAAM,OAAO,WAAW;IAItB,YACU,UAAsB,EACtB,UAAmB;QADnB,eAAU,GAAV,UAAU,CAAY;QACtB,eAAU,GAAV,UAAU,CAAS;QAL7B,WAAM,GAAG,YAAY,CAAA;QAOnB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;IAChD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,MAAM,CACjB,IAAkC;QAElC,MAAM,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,IAAI,IAAI,EAAE,CAAA;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAA;QAC7C,OAAO,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAC7C,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,MAAM,CACjB,OAA4B,EAC5B,IAAkC;QAElC,MAAM,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,IAAI,IAAI,EAAE,CAAA;QACzC,MAAM,YAAY,GAChB,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;QACvE,OAAO,IAAI,WAAW,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAClD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAED,YAAY,CAAC,QAAQ,GAAuB,WAAW;QACrD,OAAO,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IAC9C,CAAC;IAED,GAAG;QACD,OAAO,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IACtD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAe;QACxB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,CAAA;QACjC,yCAAyC;QACzC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;QACrE,OAAO,GAAG,CAAC,iBAAiB,EAAE,CAAA;IAChC,CAAC;IAED,KAAK,CAAC,MAAM;QACV,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;QAClD,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;CACF","sourcesContent":["import { p256 } from '@noble/curves/p256'\nimport { sha256 } from '@noble/hashes/sha256'\nimport {\n fromString as ui8FromString,\n toString as ui8ToString,\n} from 'uint8arrays'\nimport { SupportedEncodings } from 'uint8arrays/to-string'\nimport { P256_JWT_ALG } from '../const.js'\nimport * as did from '../did.js'\nimport { Keypair } from '../types.js'\n\nexport type P256KeypairOptions = {\n exportable: boolean\n}\n\nexport class P256Keypair implements Keypair {\n jwtAlg = P256_JWT_ALG\n private publicKey: Uint8Array\n\n constructor(\n private privateKey: Uint8Array,\n private exportable: boolean,\n ) {\n this.publicKey = p256.getPublicKey(privateKey)\n }\n\n static async create(\n opts?: Partial<P256KeypairOptions>,\n ): Promise<P256Keypair> {\n const { exportable = false } = opts || {}\n const privKey = p256.utils.randomPrivateKey()\n return new P256Keypair(privKey, exportable)\n }\n\n static async import(\n privKey: Uint8Array | string,\n opts?: Partial<P256KeypairOptions>,\n ): Promise<P256Keypair> {\n const { exportable = false } = opts || {}\n const privKeyBytes =\n typeof privKey === 'string' ? ui8FromString(privKey, 'hex') : privKey\n return new P256Keypair(privKeyBytes, exportable)\n }\n\n publicKeyBytes(): Uint8Array {\n return this.publicKey\n }\n\n publicKeyStr(encoding: SupportedEncodings = 'base64pad'): string {\n return ui8ToString(this.publicKey, encoding)\n }\n\n did(): string {\n return did.formatDidKey(this.jwtAlg, this.publicKey)\n }\n\n async sign(msg: Uint8Array): Promise<Uint8Array> {\n const msgHash = await sha256(msg)\n // return raw 64 byte sig not DER-encoded\n const sig = await p256.sign(msgHash, this.privateKey, { lowS: true })\n return sig.toCompactRawBytes()\n }\n\n async export(): Promise<Uint8Array> {\n if (!this.exportable) {\n throw new Error('Private key is not exportable')\n }\n return this.privateKey\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/p256/operations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,eAAO,MAAM,YAAY,GACvB,KAAK,MAAM,EACX,MAAM,UAAU,EAChB,KAAK,UAAU,EACf,OAAO,aAAa,KACnB,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,SAAS,GACpB,WAAW,UAAU,EACrB,MAAM,UAAU,EAChB,KAAK,UAAU,EACf,OAAO,aAAa,KACnB,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,KAAK,UAAU,YAO9C,CAAA"}
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/p256/operations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,eAAO,MAAM,YAAY,QAClB,MAAM,QACL,UAAU,OACX,UAAU,SACR,aAAa,KACnB,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,SAAS,cACT,UAAU,QACf,UAAU,OACX,UAAU,SACR,aAAa,KACnB,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,eAAe,QAAS,UAAU,YAO9C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../src/random.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAG1D,eAAO,MAAM,WAAW,EAAwB,CAC9C,WAAW,CAAC,EAAE,MAAM,KACjB,UAAU,CAAC,WAAW,CAAC,CAAA;AAE5B,eAAO,MAAM,SAAS,GACpB,YAAY,MAAM,EAClB,UAAU,kBAAkB,KAC3B,MAGF,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,YAAO,KACN,OAAO,CAAC,MAAM,CAMhB,CAAA"}
1
+ {"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../src/random.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAG1D,eAAO,MAAM,WAAW,EAAwB,CAC9C,WAAW,CAAC,EAAE,MAAM,KACjB,UAAU,CAAC,WAAW,CAAC,CAAA;AAE5B,eAAO,MAAM,SAAS,eACR,MAAM,YACR,kBAAkB,KAC3B,MAGF,CAAA;AAED,eAAO,MAAM,iBAAiB,SACtB,MAAM,QACN,MAAM,mBAEX,OAAO,CAAC,MAAM,CAMhB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../src/secp256k1/encoding.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAI,aAAa,UAAU,KAAG,UAGxD,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,YAAY,UAAU,KAAG,UAMzD,CAAA"}
1
+ {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../src/secp256k1/encoding.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,gBAAiB,UAAU,KAAG,UAGxD,CAAA;AAED,eAAO,MAAM,gBAAgB,eAAgB,UAAU,KAAG,UAMzD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../../src/secp256k1/keypair.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAG1D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,qBAAa,gBAAiB,YAAW,OAAO;IAK5C,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,UAAU;IALpB,MAAM,SAAoB;IAC1B,OAAO,CAAC,SAAS,CAAY;gBAGnB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,OAAO;WAKhB,MAAM,CACjB,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,GACtC,OAAO,CAAC,gBAAgB,CAAC;WAMf,MAAM,CACjB,OAAO,EAAE,UAAU,GAAG,MAAM,EAC5B,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,GACtC,OAAO,CAAC,gBAAgB,CAAC;IAO5B,cAAc,IAAI,UAAU;IAI5B,YAAY,CAAC,QAAQ,GAAE,kBAAgC,GAAG,MAAM;IAIhE,GAAG,IAAI,MAAM;IAIP,IAAI,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAO1C,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC;CAMpC"}
1
+ {"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../../src/secp256k1/keypair.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,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zC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;QACrE,OAAO,GAAG,CAAC,iBAAiB,EAAE,CAAA;IAChC,CAAC;IAED,KAAK,CAAC,MAAM;QACV,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;QAClD,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;CACF","sourcesContent":["import { secp256k1 as k256 } from '@noble/curves/secp256k1'\nimport { sha256 } from '@noble/hashes/sha256'\nimport {\n fromString as ui8FromString,\n toString as ui8ToString,\n} from 'uint8arrays'\nimport { SupportedEncodings } from 'uint8arrays/to-string'\nimport { SECP256K1_JWT_ALG } from '../const.js'\nimport * as did from '../did.js'\nimport { Keypair } from '../types.js'\n\nexport type Secp256k1KeypairOptions = {\n exportable: boolean\n}\n\nexport class Secp256k1Keypair implements Keypair {\n jwtAlg = SECP256K1_JWT_ALG\n private publicKey: Uint8Array\n\n constructor(\n private privateKey: Uint8Array,\n private exportable: boolean,\n ) {\n this.publicKey = k256.getPublicKey(privateKey)\n }\n\n static async create(\n opts?: Partial<Secp256k1KeypairOptions>,\n ): Promise<Secp256k1Keypair> {\n const { exportable = false } = opts || {}\n const privKey = k256.utils.randomPrivateKey()\n return new Secp256k1Keypair(privKey, exportable)\n }\n\n static async import(\n privKey: Uint8Array | string,\n opts?: Partial<Secp256k1KeypairOptions>,\n ): Promise<Secp256k1Keypair> {\n const { exportable = false } = opts || {}\n const privKeyBytes =\n typeof privKey === 'string' ? ui8FromString(privKey, 'hex') : privKey\n return new Secp256k1Keypair(privKeyBytes, exportable)\n }\n\n publicKeyBytes(): Uint8Array {\n return this.publicKey\n }\n\n publicKeyStr(encoding: SupportedEncodings = 'base64pad'): string {\n return ui8ToString(this.publicKey, encoding)\n }\n\n did(): string {\n return did.formatDidKey(this.jwtAlg, this.publicKey)\n }\n\n async sign(msg: Uint8Array): Promise<Uint8Array> {\n const msgHash = await sha256(msg)\n // return raw 64 byte sig not DER-encoded\n const sig = await k256.sign(msgHash, this.privateKey, { lowS: true })\n return sig.toCompactRawBytes()\n }\n\n async export(): Promise<Uint8Array> {\n if (!this.exportable) {\n throw new Error('Private key is not exportable')\n }\n return this.privateKey\n }\n}\n"]}
1
+ {"version":3,"file":"keypair.js","sourceRoot":"","sources":["../../src/secp256k1/keypair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EACL,UAAU,IAAI,aAAa,EAC3B,QAAQ,IAAI,WAAW,GACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,GAAG,MAAM,WAAW,CAAA;AAOhC,MAAM,OAAO,gBAAgB;IAI3B,YACU,UAAsB,EACtB,UAAmB;QADnB,eAAU,GAAV,UAAU,CAAY;QACtB,eAAU,GAAV,UAAU,CAAS;QAL7B,WAAM,GAAG,iBAAiB,CAAA;QAOxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;IAChD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,MAAM,CACjB,IAAuC;QAEvC,MAAM,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,IAAI,IAAI,EAAE,CAAA;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAA;QAC7C,OAAO,IAAI,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAClD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,MAAM,CACjB,OAA4B,EAC5B,IAAuC;QAEvC,MAAM,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,IAAI,IAAI,EAAE,CAAA;QACzC,MAAM,YAAY,GAChB,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;QACvE,OAAO,IAAI,gBAAgB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IACvD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAED,YAAY,CAAC,QAAQ,GAAuB,WAAW;QACrD,OAAO,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;IAC9C,CAAC;IAED,GAAG;QACD,OAAO,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IACtD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAe;QACxB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,CAAA;QACjC,yCAAyC;QACzC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;QACrE,OAAO,GAAG,CAAC,iBAAiB,EAAE,CAAA;IAChC,CAAC;IAED,KAAK,CAAC,MAAM;QACV,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;QAClD,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;CACF","sourcesContent":["import { secp256k1 as k256 } from '@noble/curves/secp256k1'\nimport { sha256 } from '@noble/hashes/sha256'\nimport {\n fromString as ui8FromString,\n toString as ui8ToString,\n} from 'uint8arrays'\nimport { SupportedEncodings } from 'uint8arrays/to-string'\nimport { SECP256K1_JWT_ALG } from '../const.js'\nimport * as did from '../did.js'\nimport { Keypair } from '../types.js'\n\nexport type Secp256k1KeypairOptions = {\n exportable: boolean\n}\n\nexport class Secp256k1Keypair implements Keypair {\n jwtAlg = SECP256K1_JWT_ALG\n private publicKey: Uint8Array\n\n constructor(\n private privateKey: Uint8Array,\n private exportable: boolean,\n ) {\n this.publicKey = k256.getPublicKey(privateKey)\n }\n\n static async create(\n opts?: Partial<Secp256k1KeypairOptions>,\n ): Promise<Secp256k1Keypair> {\n const { exportable = false } = opts || {}\n const privKey = k256.utils.randomPrivateKey()\n return new Secp256k1Keypair(privKey, exportable)\n }\n\n static async import(\n privKey: Uint8Array | string,\n opts?: Partial<Secp256k1KeypairOptions>,\n ): Promise<Secp256k1Keypair> {\n const { exportable = false } = opts || {}\n const privKeyBytes =\n typeof privKey === 'string' ? ui8FromString(privKey, 'hex') : privKey\n return new Secp256k1Keypair(privKeyBytes, exportable)\n }\n\n publicKeyBytes(): Uint8Array {\n return this.publicKey\n }\n\n publicKeyStr(encoding: SupportedEncodings = 'base64pad'): string {\n return ui8ToString(this.publicKey, encoding)\n }\n\n did(): string {\n return did.formatDidKey(this.jwtAlg, this.publicKey)\n }\n\n async sign(msg: Uint8Array): Promise<Uint8Array> {\n const msgHash = await sha256(msg)\n // return raw 64 byte sig not DER-encoded\n const sig = await k256.sign(msgHash, this.privateKey, { lowS: true })\n return sig.toCompactRawBytes()\n }\n\n async export(): Promise<Uint8Array> {\n if (!this.exportable) {\n throw new Error('Private key is not exportable')\n }\n return this.privateKey\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/secp256k1/operations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,eAAO,MAAM,YAAY,GACvB,KAAK,MAAM,EACX,MAAM,UAAU,EAChB,KAAK,UAAU,EACf,OAAO,aAAa,KACnB,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,SAAS,GACpB,WAAW,UAAU,EACrB,MAAM,UAAU,EAChB,KAAK,UAAU,EACf,OAAO,aAAa,KACnB,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,KAAK,UAAU,YAO9C,CAAA"}
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/secp256k1/operations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,eAAO,MAAM,YAAY,QAClB,MAAM,QACL,UAAU,OACX,UAAU,SACR,aAAa,KACnB,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,SAAS,cACT,UAAU,QACf,UAAU,OACX,UAAU,SACR,aAAa,KACnB,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,eAAO,MAAM,eAAe,QAAS,UAAU,YAO9C,CAAA"}
package/dist/sha.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sha.d.ts","sourceRoot":"","sources":["../src/sha.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,GACjB,OAAO,UAAU,GAAG,MAAM,KACzB,OAAO,CAAC,UAAU,CAIpB,CAAA;AAGD,eAAO,MAAM,SAAS,GACpB,OAAO,UAAU,GAAG,MAAM,KACzB,OAAO,CAAC,MAAM,CAGhB,CAAA"}
1
+ {"version":3,"file":"sha.d.ts","sourceRoot":"","sources":["../src/sha.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,UACV,UAAU,GAAG,MAAM,KACzB,OAAO,CAAC,UAAU,CAIpB,CAAA;AAGD,eAAO,MAAM,SAAS,UACb,UAAU,GAAG,MAAM,KACzB,OAAO,CAAC,MAAM,CAGhB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,MAK7C,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,KAAG,UAQvD,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,OAAO,UAAU,EAAE,QAAQ,UAAU,KAAG,OAEjE,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,QAAS,MAAM,KAAG,MAK7C,CAAA;AAED,eAAO,MAAM,oBAAoB,aAAc,MAAM,KAAG,UAQvD,CAAA;AAED,eAAO,MAAM,SAAS,UAAW,UAAU,UAAU,UAAU,KAAG,OAEjE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,eAAO,MAAM,eAAe,GAC1B,QAAQ,MAAM,EACd,MAAM,UAAU,EAChB,KAAK,UAAU,EACf,OAAO,aAAa,GAAG;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,KACA,OAAO,CAAC,OAAO,CAUjB,CAAA;AAED,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,MAAM,EACd,MAAM,MAAM,EACZ,KAAK,MAAM,EACX,OAAO,aAAa,KACnB,OAAO,CAAC,OAAO,CAIjB,CAAA"}
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../src/verify.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,eAAO,MAAM,eAAe,WAClB,MAAM,QACR,UAAU,OACX,UAAU,SACR,aAAa,GAAG;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,KACA,OAAO,CAAC,OAAO,CAUjB,CAAA;AAED,eAAO,MAAM,mBAAmB,WACtB,MAAM,QACR,MAAM,OACP,MAAM,SACJ,aAAa,KACnB,OAAO,CAAC,OAAO,CAIjB,CAAA"}
package/jest.config.cjs CHANGED
@@ -4,11 +4,18 @@ module.exports = {
4
4
  transform: {
5
5
  '^.+\\.(t|j)s$': [
6
6
  '@swc/jest',
7
- { jsc: { transform: {} }, module: { type: 'es6' } },
7
+ {
8
+ jsc: {
9
+ parser: { syntax: 'typescript', importAttributes: true },
10
+ experimental: { keepImportAttributes: true },
11
+ transform: {},
12
+ },
13
+ module: { type: 'es6' },
14
+ },
8
15
  ],
9
16
  },
10
17
  extensionsToTreatAsEsm: ['.ts'],
11
18
  transformIgnorePatterns: [],
12
- setupFiles: ['<rootDir>/../../jest.setup.ts'],
19
+ setupFiles: ['<rootDir>/../../test.setup.ts'],
13
20
  moduleNameMapper: { '^(\\.\\.?\\/.+)\\.js$': ['$1.ts', '$1.js'] },
14
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/crypto",
3
- "version": "0.5.0-next.0",
3
+ "version": "0.5.1",
4
4
  "license": "MIT",
5
5
  "description": "Library for cryptographic keys and signing in atproto",
6
6
  "keywords": [
@@ -23,8 +23,7 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "jest": "^30.0.0",
26
- "typescript": "^6.0.3",
27
- "@atproto/common": "^0.6.0-next.0"
26
+ "@atproto/common": "^0.6.3"
28
27
  },
29
28
  "type": "module",
30
29
  "exports": {
@@ -35,6 +34,6 @@
35
34
  },
36
35
  "scripts": {
37
36
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
38
- "build": "tsc --build tsconfig.build.json"
37
+ "build": "tsgo --build tsconfig.build.json"
39
38
  }
40
39
  }
@@ -2,7 +2,7 @@
2
2
  "extends": "../../tsconfig/isomorphic.json",
3
3
  "compilerOptions": {
4
4
  "rootDir": "./src",
5
- "outDir": "./dist"
5
+ "outDir": "./dist",
6
6
  },
7
- "include": ["./src"]
7
+ "include": ["./src"],
8
8
  }
@@ -1 +1 @@
1
- {"root":["./src/const.ts","./src/did.ts","./src/index.ts","./src/multibase.ts","./src/plugins.ts","./src/random.ts","./src/sha.ts","./src/types.ts","./src/utils.ts","./src/verify.ts","./src/p256/encoding.ts","./src/p256/keypair.ts","./src/p256/operations.ts","./src/p256/plugin.ts","./src/secp256k1/encoding.ts","./src/secp256k1/keypair.ts","./src/secp256k1/operations.ts","./src/secp256k1/plugin.ts"],"version":"6.0.3"}
1
+ {"version":"7.0.0-dev.20260614.1","root":["./src/const.ts","./src/did.ts","./src/index.ts","./src/multibase.ts","./src/plugins.ts","./src/random.ts","./src/sha.ts","./src/types.ts","./src/utils.ts","./src/verify.ts","./src/p256/encoding.ts","./src/p256/keypair.ts","./src/p256/operations.ts","./src/p256/plugin.ts","./src/secp256k1/encoding.ts","./src/secp256k1/keypair.ts","./src/secp256k1/operations.ts","./src/secp256k1/plugin.ts"]}
package/tsconfig.json CHANGED
@@ -2,6 +2,6 @@
2
2
  "include": [],
3
3
  "references": [
4
4
  { "path": "./tsconfig.build.json" },
5
- { "path": "./tsconfig.tests.json" }
6
- ]
5
+ { "path": "./tsconfig.tests.json" },
6
+ ],
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "extends": "../../tsconfig/tests.json",
3
3
  "compilerOptions": {
4
- "rootDir": "."
4
+ "rootDir": ".",
5
5
  },
6
- "include": ["./tests"]
6
+ "include": ["./tests"],
7
7
  }