INNER CODE UNIT · Go

handleBinary

wavesplatform/gowaves · cmd/convert/main.go:68

func handleBinary(data []byte, cfg config) error {
	tx, rErr := fromBinary(data, cfg)
	if rErr != nil {
		return rErr
	}
	tx, sErr := sign(tx, cfg)
	if sErr != nil {
		return sErr
	}
	if cfg.toBinary {
		return toBinary(tx, cfg)
	}
	return toJSON(tx, cfg)
}

func sign(tx proto.Transaction, cfg config) (proto.Transaction, error) {
	if cfg.sk != nil {
		if err := tx.Sign(cfg.scheme, *cfg.sk); err != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…