A Golang library for the Stratum V2 Protocol
Find a file
2026-06-23 15:31:57 -04:00
binary.go hopefully reduce internal allocs by growing to the struct size 2026-06-22 14:23:38 -04:00
binary_test.go pkg skeleton 2026-06-21 14:57:03 -04:00
constants.go doin some bullshit 2026-06-23 15:31:57 -04:00
core.go doin some bullshit 2026-06-23 15:31:57 -04:00
core_test.go make U24 type 2026-06-22 13:55:06 -04:00
go.mod doin some bullshit 2026-06-23 15:31:57 -04:00
go.sum doin some bullshit 2026-06-23 15:31:57 -04:00
interfaces.go more noise scaffolding 2026-06-22 13:09:23 -04:00
jobdeclaration.go pkg skeleton 2026-06-21 14:57:03 -04:00
jobdeclaration_test.go pkg skeleton 2026-06-21 14:57:03 -04:00
LICENSE bruhurb i forgot the license 2026-06-21 16:27:45 -04:00
mining.go doin some bullshit 2026-06-23 15:31:57 -04:00
mining_test.go fix bugs and work on tests 2026-06-21 13:36:12 -04:00
noise.go doin some bullshit 2026-06-23 15:31:57 -04:00
noise_test.go pkg skeleton 2026-06-21 14:57:03 -04:00
README.MD fix bugs and work on tests 2026-06-21 13:36:12 -04:00
templatedistribution.go pkg skeleton 2026-06-21 14:57:03 -04:00
templatedistribution_test.go pkg skeleton 2026-06-21 14:57:03 -04:00
testutils_test.go Array -> Sequence 2026-06-09 13:34:57 -04:00
types.go make U24 type 2026-06-22 13:55:06 -04:00

A Golang library for the Bitcoin Stratum V2 Protocol

Go Reference

https://stratumprotocol.org/

implemented

  • core messages
  • mining protocol

usage

bytes := hexDec("00801b1f00002d000000060000001f1e2f01a18a144c53f5256a00e00a200600000000000a")
frame := stratumv2.Frame{}
msg := stratumv2.SubmitSharesExtended{}
if err := frame.Decode(bytes); err != nil {
	println(err.Error())
	return
}
if frame.MessageType != stratumv2.MethodSubmitSharesExtended {
	panic("not SubmitSharesExtended message")
}
if err := msg.Decode(frame.Payload); err != nil {
	println(err.Error())
	return
}
fmt.Sprintf("%+v", msg) /// {SubmitSharesStandard:{ChannelID:45 Sequence:6 JobID:19865119 Nonce:1276414625 Time:1780872531 Version:537583616} Extranonce:[0 0 0 0 0 10]}

/// most everything implements the [Codable] interface
enc, err := msg.Encode()
if err != nil {
	println(err.Error())
	return
}

TODO

  • implement all protocols
    • jobs
    • template
  • implement noise
  • doc comments