koi_net.protocol.envelope

Classes

SignedEnvelope(**data)

SignedEnvelope[BundlesPayload](**data)

SignedEnvelope[EventsPayload](**data)

SignedEnvelope[FetchBundles](**data)

SignedEnvelope[FetchManifests](**data)

SignedEnvelope[FetchRids](**data)

SignedEnvelope[ManifestsPayload](**data)

SignedEnvelope[PollEvents](**data)

SignedEnvelope[RidsPayload](**data)

UnsignedEnvelope(**data)

class koi_net.protocol.envelope.SignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

  • signature (str)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
signature: str
source_node: KoiNetNode
target_node: KoiNetNode
verify_with(pub_key)[source]

Verifies signed envelope with public key.

Raises cryptography.exceptions.InvalidSignature on failure.

Parameters:

pub_key (PublicKey)

class koi_net.protocol.envelope.SignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

  • signature (str)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
signature: str
source_node: KoiNetNode
target_node: KoiNetNode
verify_with(pub_key)[source]

Verifies signed envelope with public key.

Raises cryptography.exceptions.InvalidSignature on failure.

Parameters:

pub_key (PublicKey)

class koi_net.protocol.envelope.SignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

  • signature (str)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
signature: str
source_node: KoiNetNode
target_node: KoiNetNode
verify_with(pub_key)[source]

Verifies signed envelope with public key.

Raises cryptography.exceptions.InvalidSignature on failure.

Parameters:

pub_key (PublicKey)

class koi_net.protocol.envelope.SignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

  • signature (str)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
signature: str
source_node: KoiNetNode
target_node: KoiNetNode
verify_with(pub_key)[source]

Verifies signed envelope with public key.

Raises cryptography.exceptions.InvalidSignature on failure.

Parameters:

pub_key (PublicKey)

class koi_net.protocol.envelope.SignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

  • signature (str)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
signature: str
source_node: KoiNetNode
target_node: KoiNetNode
verify_with(pub_key)[source]

Verifies signed envelope with public key.

Raises cryptography.exceptions.InvalidSignature on failure.

Parameters:

pub_key (PublicKey)

class koi_net.protocol.envelope.SignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

  • signature (str)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
signature: str
source_node: KoiNetNode
target_node: KoiNetNode
verify_with(pub_key)[source]

Verifies signed envelope with public key.

Raises cryptography.exceptions.InvalidSignature on failure.

Parameters:

pub_key (PublicKey)

class koi_net.protocol.envelope.SignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

  • signature (str)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
signature: str
source_node: KoiNetNode
target_node: KoiNetNode
verify_with(pub_key)[source]

Verifies signed envelope with public key.

Raises cryptography.exceptions.InvalidSignature on failure.

Parameters:

pub_key (PublicKey)

class koi_net.protocol.envelope.SignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

  • signature (str)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
signature: str
source_node: KoiNetNode
target_node: KoiNetNode
verify_with(pub_key)[source]

Verifies signed envelope with public key.

Raises cryptography.exceptions.InvalidSignature on failure.

Parameters:

pub_key (PublicKey)

class koi_net.protocol.envelope.SignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

  • signature (str)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
signature: str
source_node: KoiNetNode
target_node: KoiNetNode
verify_with(pub_key)[source]

Verifies signed envelope with public key.

Raises cryptography.exceptions.InvalidSignature on failure.

Parameters:

pub_key (PublicKey)

class koi_net.protocol.envelope.UnsignedEnvelope(**data)[source]

Bases: BaseModel, Generic[T]

Parameters:
  • payload (T)

  • source_node (KoiNetNode)

  • target_node (KoiNetNode)

model_config: ClassVar[ConfigDict] = {'exclude_none': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

payload: T
sign_with(priv_key)[source]

Signs with private key and returns SignedEnvelope.

Return type:

SignedEnvelope

Parameters:

priv_key (PrivateKey)

source_node: KoiNetNode
target_node: KoiNetNode