INNER CODE UNIT · Go

toJSON

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

func toJSON(tx proto.Transaction, cfg config) error {
	js, err := json.Marshal(tx)
	if err != nil {
		return err
	}
	if _, wErr := cfg.out.Write(js); wErr != nil {
		return fmt.Errorf("failed to write transaction: %w", wErr)
	}
	return nil
}

func toBinary(tx proto.Transaction, cfg config) error {
	bts, err := proto.MarshalTx(cfg.scheme, tx)
	if err != nil {
		return fmt.Errorf("failed to serialize transaction: %w", err)
	}
	var w = cfg.out
	if cfg.base64 {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…