Crate sn_data_types

Source
Expand description

SAFE network data types.

Re-exports§

pub use register::Address as RegisterAddress;

Modules§

register
Register data type

Structs§

AccumulatingReward
ActorHistory
The history of a transfer Actor.
BlsKeypairShare
BLS keypair share.
Credit
A debit of tokens at a key.
CreditAgreementProof
The aggregated Replica signatures of the Actor debit cmd.
CreditNotification
Notification of a credit sent to a recipient.
Debit
A debit of tokens at a key.
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.
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.
PrivateChunk
Private Chunk: an immutable chunk of data which can be deleted. Can only be fetched by the listed owner.
PublicChunk
Public Chunk: an immutable chunk of data which cannot be deleted.
RewardAccumulation
Accumulation of proof for the churn credits.
RewardProposal
Proposed credits resulting from a churn.
SectionElders
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.
Sequence
Object storing the Sequence
SequencePrivatePermissions
Set of private permissions for a user.
SequencePrivatePolicy
Private permissions.
SequencePublicPermissions
Set of public permissions for a user.
SequencePublicPolicy
Public permissions.
SignatureShare
A signature share, with its index in the combined collection.
SignedCredit
An Actor cmd.
SignedCreditShare
An Actor cmd.
SignedDebit
An Actor cmd.
SignedDebitShare
An Actor cmd.
SignedTransfer
An Actor cmd.
SignedTransferShare
An Actor cmd.
Token
Structure representing a Token amount.
Transfer
A cmd to transfer of tokens between two keys.
TransferAgreementProof
The aggregated Replica signatures of the Actor debit cmd.
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.
TransferValidationProposed
The debiting Replica event raised when ProposeTransferValidation 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.
WalletHistory
Contains info on who the replicas of this wallet are, and the wallet history at them.

Enums§

Chunk
Object storing an Chunk variant.
ChunkAddress
Address of an Chunk.
ChunkKind
Kind of an Chunk.
Data
Object storing a data variant.
DataAddress
Object storing an address of data on the network
Error
Main error type for the crate.
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.
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.
OwnerType
Entity that owns the data or tokens.
PublicKey
Wrapper for different public key types.
ReplicaEvent
Events raised by the Replica.
SecretKey
Wrapper for different secret key types.
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.
SequenceUser
User that can access Sequence.
Signature
Wrapper for different signature types.

Constants§

MAX_CHUNK_SIZE_IN_BYTES
Maximum allowed size for a serialised Chunk to grow to.

Traits§

Signing
Ability to sign and validate data/tokens, as well as specify the type of ownership of that data

Type Aliases§

CreditId
Credit ID is the hash of the DebitId.
DebitId
Debit ID.
MapSeqEntries
Sequenced entries (key-value pairs, with versioned values).
MapUnseqEntries
Unsequenced entries (key-value pairs, without versioned values).
Msg
Msg, containing any data to the recipient.
NodeAge
Node age, the number of times it has been relocated between sections.
PrivateSeqData
Private Sequence.
PublicSeqData
Public Sequence.
ReplicaPublicKeySet
Public Key Set for a group of transfer replicas.
Result
A specialised Result type for safecoin.
SequenceEntries
List of entries.
SequenceEntry
An entry in a Sequence.
SequenceOp
Data mutation operation to apply to Sequence.