INNER CODE UNIT · Go

sign

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

func sign(tx proto.Transaction, cfg config) (proto.Transaction, error) {
	if cfg.sk != nil {
		if err := tx.Sign(cfg.scheme, *cfg.sk); err != nil {
			return nil, fmt.Errorf("failed to sign transaction: %w", err)
		}
	}
	return tx, nil
}

func fromJSON(data []byte, cfg config) (proto.Transaction, error) {
	tt := proto.TransactionTypeVersion{}
	if err := json.Unmarshal(data, &tt); err != nil {
		return nil, fmt.Errorf("failed read transaction from JSON: %w", err)
	}
	tx, err := proto.GuessTransactionType(&tt)
	if err != nil {
		return nil, fmt.Errorf("failed read transaction from JSON: %w", err)
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…