Crate safe_nd

Source
Expand description

SAFE network data types.

Structs§

Account
Use this only while we don’t have Authenticator as its own app. Containing arbitrary user’s account information.
AppPermissions
Permissions for an app stored by the Client Handlers.
BlsKeypair
BLS keypair.
BlsKeypairShare
BLS keypair share.
BlsProof
Proof that a quorum of the section elders has agreed on something.
BlsProofShare
Single share of Proof.
ClientFullId
A struct holding a keypair variant and the corresponding public ID for a network Client.
ClientPublicId
A struct representing the public identity of a network Client.
DebitAgreementProof
The aggregated Replica signatures of the Actor debit cmd.
Ed25519Digest
SHA-3-512 hash function.
Ed25519Proof
KnownGroupAdded
The Replica event raised when we learn of a new group PK set.
MapPermissionSet
Set of user permissions.
MapSeqEntryActions
Sequenced Entry Actions for given entry keys.
MapSeqValue
A value in sequenced Map.
MapUnseqEntryActions
Unsequenced Entry Actions for given entry keys.
MessageId
Unique ID for messages.
Money
Structure representing a safeMoney amount.
MsgEnvelope
NodeFullId
A struct holding an Ed25519 keypair, an optional BLS keypair share, and the corresponding public ID for a network Node.
NodeKeypairs
This is used at a network node for holding the obligatory Ed25519 keypair needed as Adult, and then a BLS keypair share when being promoted to Elder. (Also the corresponding public keys). The Ed25519 is kept as Elder, in case it is demoted.
NodePublicId
A struct representing the public identity of a network Node.
PrivateBlob
Private Blob: an immutable chunk of data which can be deleted. Can only be fetched by the listed owner.
Proven
A value together with the proof that it was agreed on by the quorum of the section elders.
PublicBlob
Public Blob: an immutable chunk of data which cannot be deleted.
RewardCounter
SeqMap
Map that is unpublished on the network. This data can only be fetched by the owner or those in the permissions fields with Permission::Read access.
SequencePrivatePermissions
Set of private permissions for a user.
SequencePrivatePolicy
Private permissions.
SequencePublicPermissions
Set of public permissions for a user.
SequencePublicPolicy
Public permissions.
SequenceWriteOp
Write operation to apply to Sequence. This is used for all kind of CRDT operations made on the Sequence, i.e. not only on the data but also on the permissions and owner info.
SignatureShare
A signature share, with its index in the combined collection.
SignedTransfer
An Actor cmd.
Transfer
A transfer of money between two keys.
TransferNotification
Notification of a Transfer sent to a recipient.
TransferPropagated
The crediting Replica event raised when PropagateTransfer cmd has been successful.
TransferRegistered
The debiting Replica event raised when RegisterTransfer cmd has been successful.
TransferValidated
The debiting Replica event raised when ValidateTransfer cmd has been successful.
UnseqMap
Map that is unpublished on the network. This data can only be fetched by the owner or those in the permissions fields with Permission::Read access.

Enums§

AccountRead
Use this only while we don’t have Authenticator as its own app.
AccountWrite
Use this only while we don’t have Authenticator as its own app.
Address
AdultDuties
Duties of an Adult.
AuthCmd
To be removed. Use this only while we don’t have Authenticator as its own app.
AuthQuery
Former ClientAuth To be removed. Use this only while we don’t have Authenticator as its own app.
AuthorisationKind
The kind of authorisation needed for a request.
Blob
Object storing an Blob variant.
BlobAddress
Address of an Blob.
BlobKind
Kind of an Blob.
BlobRead
TODO: docs
BlobWrite
TODO: docs
Cmd
TODO: docs
CmdError
Data
Object storing a data variant.
DataAuthKind
Authorisation for data requests.
DataCmd
TODO: docs
DataQuery
TODO: docs
Duty
ElderDuties
Duties of an Elder.
EntryError
Entry error for Error::InvalidEntryActions.
Error
Main error type for the crate.
Event
Events from the network that are pushed to the client.
HandshakeRequest
Handshake requests sent from clients to vaults to establish new connections and verify a client’s key (to prevent replay attacks).
HandshakeResponse
Handshake responses sent from vaults to clients.
Keypair
Wrapper for different keypair types.
Map
Object storing a Map variant.
MapAction
Set of Actions that can be performed on the Map.
MapAddress
Address of an Map.
MapEntries
Wrapper type for entries, which can be sequenced or unsequenced.
MapEntryActions
Wrapper type for entry actions, which can be sequenced or unsequenced.
MapKind
Kind of a Map.
MapRead
TODO: docs
MapSeqEntryAction
Action for a sequenced Entry.
MapUnseqEntryAction
Action for an unsequenced Entry.
MapValue
Wrapper type for values, which can be sequenced or unsequenced.
MapValues
Wrapper type for lists of sequenced or unsequenced values.
MapWrite
TODO: docs
Message
MiscAuthKind
Miscellaneous authorisation kinds. NB: Not very well categorized yet
MoneyAuthKind
Authorisation for money requests.
MsgSender
NodeCmd
NodeCmdError
NodeDataCmd
NodeDataError
NodeDataQuery
NodeDataQueryResponse
NodeDuties
Duties of a Node.
NodeEvent
NodeQuery
NodeQueryResponse
NodeRewardError
NodeRewardQuery
Reward query that is sent between sections.
NodeRewardQueryResponse
NodeSystemCmd
Cmds related to the running of a node.
NodeTransferCmd
NodeTransferError
NodeTransferQuery
NodeTransferQueryResponse
Proof
PublicId
An enum representing the identity of a network Node or Client.
PublicKey
Wrapper for different public key types.
Query
TODO: docs
QueryResponse
Query responses from the network.
ReplicaEvent
Events raised by the Replica.
Sequence
Object storing a Sequence variant.
SequenceAction
An action on Sequence data type.
SequenceAddress
Address of a Sequence.
SequenceIndex
Index of some data.
SequenceKind
Kind of a Sequence.
SequencePermissions
Wrapper type for permissions set, which can be public or private.
SequencePolicy
Wrapper type for permissions, which can be public or private.
SequenceRead
TODO: docs
SequenceUser
User that can access Sequence.
SequenceWrite
TODO: docs
Signature
Wrapper for different signature types.
TransferCmd
Money cmd that is sent to network.
TransferError
TransferQuery
Money query that is sent to network.
TryFromError
Error type for an attempted conversion from QueryResponse to a type implementing TryFrom<Response>.

Constants§

MAX_BLOB_SIZE_IN_BYTES
Maximum allowed size for a serialised Blob to grow to.
MAX_LOGIN_PACKET_BYTES
Login packet size is limited .

Functions§

verify_signature
Verify that a signature is valid for a given Request + MessageId combination.

Type Aliases§

AccountId
Actor id
MapSeqEntries
Sequenced entries (key-value pairs, with versioned values).
MapUnseqEntries
Unsequenced entries (key-value pairs, without versioned values).
PrivateSeqData
Private Sequence.
PublicSeqData
Public Sequence.
ReplicaPublicKeySet
Public Key Set for a group of transfer replicas.
Result
A specialised Result type.
SequenceDataWriteOp
Data mutation operation to apply to Sequence.
SequenceEntries
List of entries.
SequenceEntry
An entry in a Sequence.
TransferId
Transfer ID.
Work
The representation of the smallest unit of work. This is strictly incrementing (i.e. accumulated) during the network lifetime of the worker.