mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
Wave 2D codec-rip extension for chains repo: - bridgevm/codec.go: codec.Manager + linearcodec.NewDefault → pcodecs - zkvm/codec.go: same pattern - thresholdvm/codec.go: same pattern - Bump luxfi/warp v1.18.6 → v1.19.3 (closes warp→ids→codec/wrappers transitive) - Bump luxfi/ids v1.2.14 → v1.2.15 (drops codec/wrappers from Prefix/Append) luxfi/codec remains as // indirect via proto/zap_codec → codec/zapcodec (the actual ZAP wire impl — physical relocation to luxfi/zap/codec queued separately). Tests pass for all three VMs.
35 lines
812 B
Go
35 lines
812 B
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package thresholdvm
|
|
|
|
import (
|
|
"github.com/luxfi/node/vms/pcodecs"
|
|
)
|
|
|
|
const codecVersion = 0
|
|
|
|
// Codec is the codec for the threshold VM
|
|
var Codec pcodecs.Manager
|
|
|
|
func init() {
|
|
c := pcodecs.NewLinearCodec()
|
|
|
|
c.RegisterType(&Block{})
|
|
c.RegisterType(&Operation{})
|
|
c.RegisterType(&Genesis{})
|
|
c.RegisterType(&ManagedKey{})
|
|
c.RegisterType(&KeygenSession{})
|
|
c.RegisterType(&SigningSession{})
|
|
c.RegisterType(&ecdsaSignature{})
|
|
c.RegisterType(&ThresholdConfig{})
|
|
c.RegisterType(&ChainPermissions{})
|
|
c.RegisterType(&ProtocolOptions{})
|
|
c.RegisterType(&CrossChainMPCRequest{})
|
|
|
|
Codec = pcodecs.NewDefaultManager()
|
|
if err := Codec.RegisterCodec(codecVersion, c); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|