nada_dsl.circuit_io

Program Input Output utilities.

Define the types used for inputs and outputs in Nada programs.

class Input(name, party, doc='')[source]

Bases: NadaType

Represents an input to the computation.

name

The name of the input.

Type:

str

party

The party providing the input.

Type:

Party

doc

Documentation for the input (default “”).

Type:

str

name: str
party: Party
doc: str
source_ref: SourceRef
store_in_ast(ty: object)[source]

Store object in AST

class Literal(value, source_ref)[source]

Bases: NadaType

Represents a literal value.

value

The value of the literal.

Type:

Any

value: Any
source_ref: SourceRef
store_in_ast(ty: object)[source]

Store object in AST

class Output(inner, name, party)[source]

Bases: object

Represents an output from the computation.

inner

The type of the output.

Type:

AllTypes

party

The party receiving the output.

Type:

Party

name

The name of the output.

Type:

str

__eq__(other)

Return self==value.

source_ref: SourceRef
inner: Integer | UnsignedInteger | Boolean | PublicInteger | PublicUnsignedInteger | PublicBoolean | SecretInteger | SecretUnsignedInteger | SecretBoolean | Array | Vector | Tuple | NTuple | Object | EcdsaPrivateKey | EcdsaDigestMessage | EcdsaSignature
name: str
party: Party