[][src]Crate safe_nd

SAFE network data types.

Structs

AppFullId

A struct holding a keypair variant and the corresponding public ID for a network App.

AppPermissions

Permissions for an app stored by the Client Handlers.

AppPublicId

A struct representing the public identity of a network App.

BlsKeypair

BLS keypair.

BlsKeypairShare

BLS keypair share.

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.

Coins

Structure representing a safecoin amount.

Ed25519Digest

SHA-3-512 hash function.

LoginPacket

Login packet containing arbitrary user's login information.

MDataPermissionSet

Set of user permissions.

MDataSeqEntryActions

Sequenced Entry Actions for given entry keys.

MDataSeqValue

A value in sequenced MutableData.

MDataUnseqEntryActions

Unsequenced Entry Actions for given entry keys.

MessageId

Unique ID for messages.

NodeFullId

A struct holding an Ed25519 keypair, an optional BLS keypair share, and the corresponding public ID for a network Node.

NodePublicId

A struct representing the public identity of a network Node.

Notification

Notification of a transaction.

PubImmutableData

Published ImmutableData: an immutable chunk of data which cannot be deleted.

SDataIndices

Set of data, owners, permissions indices.

SDataMutationOperation

Mutation operation to apply to Sequence. This is used for all kind of CRDT operationsmade on the Sequence, i.e. not only on the data but also on the permissions and owner info.

SDataOwner

An owner could represent an individual user, or a group of users, depending on the public_key type.

SDataPrivPermissions

Private permissions.

SDataPrivUserPermissions

Set of private permissions for a user.

SDataPubPermissions

Published permissions.

SDataPubUserPermissions

Set of public permissions for a user.

SeqMutableData

MutableData 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.

Transaction

Coin transaction.

UnpubImmutableData

Unpublished ImmutableData: an immutable chunk of data which can be deleted. Can only be fetched by the listed owner.

UnseqMutableData

MutableData 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.

XorName

A XOR_NAME_BITS-bit number, viewed as a point in XOR space.

Enums

ClientRequest

Client (Owner) request that is sent to vaults.

CoinsRequest

Coins request that is sent to vaults.

Data

Object storing a data variant.

EntryError

Entry error for Error::InvalidEntryActions.

Error

Main error type for the crate.

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.

IData

Object storing an ImmutableData variant.

IDataAddress

Address of an ImmutableData.

IDataKind

Kind of an ImmutableData.

IDataRequest

ImmutableData request that is sent to vaults.

Keypair

Wrapper for different keypair types.

LoginPacketRequest

LoginPacket request that is sent to vaults.

MData

Object storing a MutableData variant.

MDataAction

Set of Actions that can be performed on the MutableData.

MDataAddress

Address of an MutableData.

MDataEntries

Wrapper type for entries, which can be sequenced or unsequenced.

MDataEntryActions

Wrapper type for entry actions, which can be sequenced or unsequenced.

MDataKind

Kind of a MutableData.

MDataRequest

MutableData request that is sent to vaults.

MDataSeqEntryAction

Action for a sequenced Entry.

MDataUnseqEntryAction

Action for an unsequenced Entry.

MDataValue

Wrapper type for values, which can be sequenced or unsequenced.

MDataValues

Wrapper type for lists of sequenced or unsequenced values.

Message

Wrapper message that contains a message ID and the requester ID along the request or response. It should also contain a valid signature if it's sent by the owner(s).

PublicId

An enum representing the identity of a network Node or Client.

PublicKey

Wrapper for different public key types.

Request

RPC Request that is sent to vaults.

RequestAuthKind

The kind of authorisation needed for a request.

RequestType

The type of a Request.

Response

RPC responses from vaults.

SData

Object storing a Sequence variant.

SDataAction

An action on Sequence data type.

SDataAddress

Address of a Sequence.

SDataIndex

Index of some data.

SDataKind

Kind of a Sequence.

SDataPermissions

Wrapper type for permissions, which can be public or private.

SDataRequest

Sequence request that is sent to vaults.

SDataUser

User that can access Sequence.

SDataUserPermissions

Wrapper type for permissions set, which can be public or private.

Signature

Wrapper for different signature types.

TryFromError

Error type for an attempted conversion from Response to a type implementing TryFrom<Response>.

Constants

MAX_IMMUTABLE_DATA_SIZE_IN_BYTES

Maximum allowed size for a serialised ImmutableData to grow to.

MAX_LOGIN_PACKET_BYTES

Login packet size is limited .

XOR_NAME_LEN

Constant byte length of XorName.

Functions

verify_signature

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

Type Definitions

MDataSeqEntries

Sequenced entries (key-value pairs, with versioned values).

MDataUnseqEntries

Unsequenced entries (key-value pairs, without versioned values).

PrivSeqData

Private Sequence.

PubSeqData

Public Sequence.

Result

A specialised Result type for safecoin.

SDataEntries

List of entries.

SDataEntry

An entry in a Sequence.

TransactionId

Transaction ID.