Skip to content

Commit 67a4355

Browse files
committed
Fix Bytes API compatibility after merge
1 parent c71f04f commit 67a4355

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

packages/evolution/src/core/message-signing/CoseSign1.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export const COSESign1FromCBORBytes = (options: CBOR.CodecOptions = CBOR.CML_DEF
258258
* @category Schemas
259259
*/
260260
export const COSESign1FromCBORHex = (options: CBOR.CodecOptions = CBOR.CML_DEFAULT_OPTIONS) =>
261-
Schema.compose(Bytes.FromHex, COSESign1FromCBORBytes(options)).annotations({
261+
Schema.compose(Schema.Uint8ArrayFromHex, COSESign1FromCBORBytes(options)).annotations({
262262
identifier: "COSESign1.FromCBORHex",
263263
description: "Transforms CBOR hex string to COSESign1"
264264
})
@@ -302,11 +302,11 @@ export class COSESign1Builder extends Schema.Class<COSESign1Builder>("COSESign1B
302302
[Equal.symbol](that: unknown): boolean {
303303
return (
304304
that instanceof COSESign1Builder &&
305-
Bytes.bytesEquals(this.externalAad, that.externalAad) &&
305+
Bytes.equals(this.externalAad, that.externalAad) &&
306306
this.hashPayload === that.hashPayload &&
307307
Equal.equals(this.headers, that.headers) &&
308308
this.isPayloadExternal === that.isPayloadExternal &&
309-
Bytes.bytesEquals(this.payload, that.payload)
309+
Bytes.equals(this.payload, that.payload)
310310
)
311311
}
312312

packages/evolution/src/core/message-signing/Header.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import { Equal, Hash, Inspectable, ParseResult, Schema } from "effect"
99

10-
import * as Bytes from "../Bytes.js"
1110
import * as CBOR from "../CBOR.js"
1211
import type { AlgorithmId } from "./Label.js"
1312
import {
@@ -333,7 +332,7 @@ export const HeaderMapFromCBORBytes = (options: CBOR.CodecOptions = CBOR.CML_DEF
333332
* @category Schemas
334333
*/
335334
export const HeaderMapFromCBORHex = (options: CBOR.CodecOptions = CBOR.CML_DEFAULT_OPTIONS) =>
336-
Schema.compose(Bytes.FromHex, HeaderMapFromCBORBytes(options)).annotations({
335+
Schema.compose(Schema.Uint8ArrayFromHex, HeaderMapFromCBORBytes(options)).annotations({
337336
identifier: "HeaderMap.FromCBORHex",
338337
description: "Transforms CBOR hex string to HeaderMap"
339338
})

packages/evolution/src/core/message-signing/SignData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export const verifyData = (
118118

119119
// Verify payload matches (allow empty payloads)
120120
if (coseSign1.payload === undefined) return false
121-
if (!Bytes.bytesEquals(coseSign1.payload, payload)) return false
121+
if (!Bytes.equals(coseSign1.payload, payload)) return false
122122

123123
// Get protected headers
124124
const addressLabel = labelFromText("address")

0 commit comments

Comments
 (0)