diff --git a/.github/MIGRATION.md b/.github/MIGRATION.md index 23da130ff..8a41ce4e0 100644 --- a/.github/MIGRATION.md +++ b/.github/MIGRATION.md @@ -229,6 +229,10 @@ Namely, the node/API it is sent to will "broadcast" the transaction to the mempo ### `serialize` methods +Most users shouldn't need to use `serializeXyz` methods. +Concepts in Stacks.js have helpers like `postConditionToHex` instead. +Serialization is meant for internal representations in transactions, mostly not for user-facing data. + Existing methods now take or return **hex-encoded strings** _instead_ of `Uint8Array`s. > If you were already converting returned bytes to hex-strings in your code, you can now skip the conversion step — hex-strings are the new default. diff --git a/packages/transactions/src/wire/serialization.ts b/packages/transactions/src/wire/serialization.ts index 5f6555844..28460d01e 100644 --- a/packages/transactions/src/wire/serialization.ts +++ b/packages/transactions/src/wire/serialization.ts @@ -673,6 +673,7 @@ export function serializeTransactionAuthFieldBytes(field: TransactionAuthFieldWi export function serializePublicKey(key: PublicKeyWire): string { return bytesToHex(serializePublicKeyBytes(key)); } + /** @ignore */ export function serializePublicKeyBytes(key: PublicKeyWire): Uint8Array { return key.data.slice();