Giter Site home page Giter Site logo

Comments (4)

SebastienGllmt avatar SebastienGllmt commented on July 17, 2024

Thank you for your interest in our project. The error message isn't helpful and so this is partially a guess, but cardano-node has historically deviated from the specification for its transaction signing algortihm. It could very well be a bug in our library, or it could be an issue with cardano-node

from cardano-serialization-lib.

islishude avatar islishude commented on July 17, 2024

Has the codes been tested for integration?

describe('Transactions', () => {
it('create transaction', () => {
const txInputs = CardanoWasm.TransactionInputs.new();
{
txInputs.add(
CardanoWasm.TransactionInput.new(
CardanoWasm.TransactionHash.from_bytes(
Buffer.from('3b40265111d8bb3c3c608d95b3a0bf83461ace32d79336579a1939b3aad1c0b7', 'hex'),
),
0, // index
)
);
}
const txOutputs = CardanoWasm.TransactionOutputs.new();
{
txOutputs.add(
CardanoWasm.TransactionOutput.new(
CardanoWasm.Address.from_bytes(
Buffer.from('61a6274badf4c9ca583df893a73139625ff4dc73aaa3082e67d6d5d08e', 'hex'),
),
// we can construct Coin from both BigInt (here) or from a string (below in fee)
CardanoWasm.Coin.new(BigInt(1)),
)
);
}
const txBody = CardanoWasm.TransactionBody.new(
txInputs,
txOutputs,
CardanoWasm.Coin.from_str("42"), // fee
10, // ttl
);
const witnesses = CardanoWasm.TransactionWitnessSet.new();
{
const vkeyWitnesses = CardanoWasm.Vkeywitnesses.new();
const prvKey = CardanoWasm.PrivateKey.from_normal_bytes(
Buffer.from('f7955ca7a24889e892a74851712975c924d536d503eeb1c900a7431900633fb8', 'hex')
);
vkeyWitnesses.add(
txBody.sign(prvKey)
);
witnesses.set_vkeys(vkeyWitnesses);
}
CardanoWasm.Transaction.new(
txBody,
witnesses,
);
})

from cardano-serialization-lib.

islishude avatar islishude commented on July 17, 2024

fixed it,with prefix '18b1'

from cardano-serialization-lib.

SebastienGllmt avatar SebastienGllmt commented on July 17, 2024

@islishude Try upgrading to Cardano-cli 1.15.0 or higher and maybe it will work (without the magic prefix)

from cardano-serialization-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.