mirror of
https://github.com/luxfi/utxo.git
synced 2026-07-27 03:39:23 +00:00
Adds four new Fx (feature-extension) packages for X-Chain UTXO signing schemes beyond secp256k1: - ed25519fx — Ed25519 (EdDSA on Curve25519) - schnorrfx — Schnorr (classical) - secp256r1fx — P-256 / NIST - slhdsafx — SLH-DSA (FIPS 205 hash-based PQ) Plus mldsafx updates to match (ML-DSA / FIPS 204 lattice PQ). Each fx package exports Fx, Credential, Keychain, OutputOwners, Input following the existing secp256k1fx pattern. Gitignore .DS_Store.
34 lines
850 B
Go
34 lines
850 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package slhdsafx
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/luxfi/vm/components/verify"
|
|
)
|
|
|
|
var errNilMintOperation = errors.New("nil mint operation")
|
|
|
|
type MintOperation struct {
|
|
MintInput Input `serialize:"true" json:"mintInput"`
|
|
MintOutput MintOutput `serialize:"true" json:"mintOutput"`
|
|
TransferOutput TransferOutput `serialize:"true" json:"transferOutput"`
|
|
}
|
|
|
|
func (op *MintOperation) Cost() (uint64, error) {
|
|
return op.MintInput.Cost()
|
|
}
|
|
|
|
func (op *MintOperation) Outs() []verify.State {
|
|
return []verify.State{&op.MintOutput, &op.TransferOutput}
|
|
}
|
|
|
|
func (op *MintOperation) Verify() error {
|
|
if op == nil {
|
|
return errNilMintOperation
|
|
}
|
|
return verify.All(&op.MintInput, &op.MintOutput, &op.TransferOutput)
|
|
}
|