Skip to content

🔨 The missing lightweight Bitcoin TX builder written in Go

License

Notifications You must be signed in to change notification settings

aureleoules/TXCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


TXCore

TXCore

The missing lightweight Bitcoin TX builder written in Go


Usage

    tx := txcore.NewTX()

    tx.AddInput("TxId", "Base58Address", outputIndex, isCompressed)
    tx.AddInput("TxId2", "AnotherBase58Address", output2Index, isCompressed)
    ...

    tx.AddOutput("abc", 100_000_000) // send one bitcoin to abc
    tx.AddOutput("xyz", 300_000_000) // send three bitcoins to xyz
    ...

    // Build raw tx
    tx.Build()

    // Sign with the corresponding private keys
    tx.Sign([]string{"privateKey1", "privateKey2", ...})

    // Print signed tx
    fmt.Println(tx.SignedTXHex)

License

MIT

About

🔨 The missing lightweight Bitcoin TX builder written in Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published