Files
moon-i2p/i2np/pkg.generated.mbti
T
nandi ae72b00323
check / check (windows-latest) (push) Failing after 27s
check / check (ubuntu-latest) (push) Failing after 29s
check / check (macos-latest) (push) Failing after 27s
feat: add ratchet, streaming, SU3 reseed, and router floodfill
- Add ratchet/ with ECIES-X25519-AEAD-Ratchet (Proposal 144), Garlic cloves, and ECIES DatabaseLookup replies
- Add streaming/ with Ed25519-signed I2P Streaming (SYN/ACK/NACK/CLOSE/RESET, retransmit, window) and Repliable/Raw Datagrams
- Add common/su3.mbt to parse and verify reseed .su3 bundles
- Add Elligator2 encoding in crypto/ and OfflineSignature support in LeaseSet2 (flags bit 0)
- Router: NTCP2 peer pool, floodfill NetDB crawl, transit tunnel relay, and Garlic/Streaming bridge
- cmd/router: add --peer-dir, --su3, --reseed, --floodfill, --no-clock-skew
- cmd/client: add --dest for persistent destination keys
- Mark Phase 6 complete in README and document the transport scope (NTCP2 only, no SSU2)
2026-11-27 22:23:46 -08:00

93 lines
2.8 KiB
Plaintext

// Generated using `moon info`, DON'T EDIT IT
package "experiments/moon_i2p/i2np"
import {
"experiments/moon_i2p/common",
"experiments/moon_i2p/encoding",
"moonbitlang/core/debug",
}
// Values
pub fn decode_short_message(@encoding.Reader) -> (ShortHeader, I2npPayload) raise I2npError
pub fn decode_standard_message(@encoding.Reader) -> (StandardHeader, I2npPayload) raise I2npError
pub fn encode_short_message(UInt32, UInt32, I2npPayload) -> Bytes raise I2npError
pub fn encode_standard_message(UInt32, UInt64, I2npPayload) -> Bytes raise I2npError
pub fn payload_checksum(Bytes) -> Byte
// Errors
#derive(Eq, @debug.Debug)
pub suberror I2npError {
Encoding(@encoding.EncodingError)
Common(@common.CommonError)
ChecksumMismatch(Byte, Byte)
InvalidLength(String)
}
// Types and methods
#derive(Eq, @debug.Debug)
pub(all) enum I2npMessageType {
DatabaseStore
DatabaseLookup
DatabaseSearchReply
DeliveryStatus
Garlic
TunnelData
TunnelGateway
Data
TunnelBuild
TunnelBuildReply
VariableTunnelBuild
VariableTunnelBuildReply
ShortTunnelBuild
ShortTunnelBuildReply
Unknown(Byte)
}
pub fn I2npMessageType::from_byte(Byte) -> Self
pub fn I2npMessageType::to_byte(Self) -> Byte
#derive(Eq, @debug.Debug)
pub(all) enum I2npPayload {
DatabaseStore(key~ : @common.Hash, store_type~ : Byte, reply_token~ : UInt32, reply_tunnel_id~ : UInt32, reply_gateway~ : @common.Hash?, data~ : Bytes)
DatabaseLookup(key~ : @common.Hash, from~ : @common.Hash, flags~ : Byte, reply_tunnel_id~ : UInt32?, excluded_peers~ : Array[@common.Hash], reply_key~ : Bytes?, reply_tags~ : Array[Bytes])
DatabaseSearchReply(key~ : @common.Hash, peer_hashes~ : Array[@common.Hash], from~ : @common.Hash)
DeliveryStatus(msg_id~ : UInt32, timestamp_ms~ : UInt64)
Garlic(data~ : Bytes)
TunnelData(tunnel_id~ : UInt32, data~ : Bytes)
TunnelGateway(tunnel_id~ : UInt32, data~ : Bytes)
Data(data~ : Bytes)
ShortTunnelBuild(records~ : Array[Bytes])
ShortTunnelBuildReply(records~ : Array[Bytes])
Raw(msg_type~ : I2npMessageType, data~ : Bytes)
}
pub fn I2npPayload::decode_body(I2npMessageType, Bytes) -> Self raise I2npError
pub fn I2npPayload::encode_body(Self) -> Bytes raise I2npError
pub fn I2npPayload::msg_type(Self) -> I2npMessageType
#derive(Eq, @debug.Debug)
pub(all) struct ShortHeader {
msg_type : I2npMessageType
msg_id : UInt32
expiration_sec : UInt32
}
pub fn ShortHeader::decode(@encoding.Reader) -> Self raise I2npError
pub fn ShortHeader::encode(Self, @encoding.Writer) -> Unit
#derive(Eq, @debug.Debug)
pub(all) struct StandardHeader {
msg_type : I2npMessageType
msg_id : UInt32
expiration_ms : UInt64
size : UInt32
checksum : Byte
}
pub fn StandardHeader::decode(@encoding.Reader) -> Self raise I2npError
pub fn StandardHeader::encode(Self, @encoding.Writer) -> Unit
// Type aliases
// Traits