This guide provides a complete, implementation-agnostic reference for signing and broadcasting LanaCoin (LANA) transactions. It's designed for developers working with JavaScript, Python, Java, or raw binary-level code.
LanaCoin transactions are modeled after Bitcoin's P2PKH structure, with key distinctions:
Public Key: Derived using secp256k1 (0x04 + X + Y) → Uncompressed
Address:
pubKeyHash = RIPEMD160(SHA256(pubkey))
address = Base58Check(0x30 + pubKeyHash)
{
"version": 1,
"nTime": 1711562800,
"inputs": [
{
"txid": "abc123...",
"vout": 0,
"value": 100780000,
"scriptPubKey": "76a914...88ac",
"sequence": 4294967295
}
],
"outputs": [
{
"pubKeyHash": "20-byte hex",
"amount": 300000
},
{
"pubKeyHash": "20-byte hex",
"amount": 100470000
}
],
"locktime": 0
}
Note: Supports multiple UTXO inputs and outputs. nTime is required.
Insert a 4-byte UNIX timestamp immediately after the version.
For each input:
scriptSig = [<length of DER+01>] [DER signature + 0x01] [<length of pubkey>] [pubkey]
Example (for uncompressed pubkey):
[0x48] [DER_SIGNATURE+01] [0x41] [0x04 + X + Y]
Replace placeholder scriptSig with real one
Serialize fields in this order:
Endpoint: tcp://electrum1.lanacoin.com:5097
Request:
{
"id": 0,
"method": "blockchain.transaction.broadcast",
"params": ["<signed_tx_hex>"]
}
electrum --server electrum1.lanacoin.com:5097:t broadcast <hex_tx>
(Coming Soon — will depend on hosted explorer)
| Error Code | Meaning | Likely Cause |
|---|---|---|
| -22 | TX decode failed | Invalid structure or script formatting |
| -22 | TX rejected | Bad signature, missing SIGHASH flag |
| -26 | Non-canonical signature | DER encoding issue, wrong pubkey format |
| No response | nTime missing | LanaCoin requires nTime after version |
| Field | Format / Notes |
|---|---|
| Version | 0x01000000 (4 bytes, LE) |
| nTime | UNIX timestamp (4 bytes, LE) |
| ScriptPubKey | 76a914{20-byte pubKeyHash}88ac |
| ScriptSig | PUSH(DER_SIG+01) + PUSH(uncompressed pubkey) |
| SIGHASH Flag | 0x01 |
| Address Prefix | 0x30 (Base58Check L...) |
| WIF Prefix | 0xB0 (Base58Check starts with 6...) |