From 1d557b74c7837496c3b9ced7237f671f339bb0ed Mon Sep 17 00:00:00 2001 From: Vojtech Vitek Date: Fri, 19 Sep 2025 16:52:41 +0200 Subject: [PATCH] Document few more breaking changes in v0.60.0 --- CHANGELOG.md | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3bb2cfe..82adf24f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,25 @@ ## API Breaking changes in go-sequence +### `sequence.DecodeExecdata()` + +```diff +-func DecodeExecdata(data []byte) (Transactions, *big.Int, []byte, error) ++func DecodeRawTransactions(data []byte) (Transactions, error) +``` + +```diff +-sequenceTransactions, _, _, err := sequence.DecodeExecdata(data) ++ sequenceTransactions, err := sequence.DecodeRawTransactions(data) +``` + +### `sequence.AddressFromImageHash()` + +```diff +- address, err := sequence.AddressFromImageHash(imageHash.String(), seqContext) ++ address, err := sequence.AddressFromImageHash(imageHash, seqContext) +``` + ### `sequence.Relayer` interface ```diff @@ -52,3 +71,87 @@ // ... } ``` + +### `core` + +```diff + type SignerSignature struct { + Signer common.Address +- Subdigest Subdigest + Type SignerSignatureType + Signature []byte + Error error + Preimage ImageHashable + } + +- // A Subdigest is a hash signed by a Sequence wallet's signers. +- // Used for type safety and preimage recovery. +- type Subdigest struct { +- common.Hash +- +- // Digest is the preimage of the subdigest, nil if unknown. +- Digest *Digest +- +- // Wallet is the target wallet of the subdigest, nil if unknown. +- Wallet *common.Address +- +- // ChainID is the target chain ID of the subdigest, nil if unknown. +- ChainID *big.Int +- +- // EthSignPreimage is the preimage of the eth_sign subdigest, nil if unknown. +- EthSignPreimage *Subdigest +- } + +- type Digest struct { +- common.Hash +- +- // Preimage is the preimage of the digest, nil if unknown. +- Preimage []byte +- } ++type PayloadDigest struct { ++ common.Hash ++ ++ Address_ common.Address ++ ChainID_ *big.Int ++ ++ Payload Payload ++} + ++type Payload interface { ++ Address() common.Address ++ ChainID() *big.Int ++ ++ Digest() PayloadDigest ++} + +-type SignerSignatures map[common.Address]map[common.Hash]SignerSignature ++type SignerSignatures map[common.Address]struct { ++ Signature *SignerSignature ++ SapientSignatures map[common.Hash]SignerSignature ++} +``` + +`core.Digest` & `core.Subdigest` were replaced by `core.DigestPayload`: + +```diff +-subdigest := core.Subdigest{ +- Hash: common.BytesToHash(msgDigest), +- Digest: nil, +- Wallet: nil, +- ChainID: nil, +-} ++subdigest := core.PayloadDigest{Hash: common.BytesToHash(msgDigest)} + +-imageHash, weight, err := decoded.RecoverSubdigest(ctx, subdigest, nil) ++imageHash, weight, err := decoded.Recover(ctx, subdigest, nil) +``` + +```diff +-dig := core.Digest{ ++dig := core.PayloadDigest{ + Hash: digest, +} +-subdig := dig.Subdigest(s.Address, chainID) + +``` +