Model

  • If the user’s public key has been verified on the blockchain, this class encompasses information about the proof.

    See more

    Declaration

    Objective-C

    @interface ZDCBlockchainProof : NSObject <NSSecureCoding, NSCopying>

    Swift

    class ZDCBlockchainProof : NSObject, NSSecureCoding, NSCopying
  • The CloudDataInfo class contains information about the DATA file in the cloud.

    Recall that the DATA file stores the node’s content in the cloud. That is, the data generated by your app via ZeroDarkCloudDelegate. The data is stored in the cloud in an encrypted format.

    See more

    Declaration

    Objective-C

    @interface ZDCCloudDataInfo <NSCoding, NSCopying>

    Swift

    class ZDCCloudDataInfo
  • Represents a local user in the system.

    That is, a user who has logged into their account on the device. This is in contrast to a remote user, which are instances of ZDCUser.

    See more

    Declaration

    Objective-C

    @interface ZDCLocalUser : ZDCUser

    Swift

    class ZDCLocalUser : ZDCUser
  • Encapsulates the information necessary to authenticate the localUser with various systems.

    See more

    Declaration

    Objective-C

    @interface ZDCLocalUserAuth <NSCoding, NSCopying>

    Swift

    class ZDCLocalUserAuth : NSObject, NSCoding, NSCopying
  • ZDCNode encapsulates the metadata for a node. This includes the basic information needed by the framework to sync the node with the cloud.

    Note

    Do NOT subclass ZDCNode. It’s just for storing metadata. You’re free to store your objects however you prefer.

    Every node in the treesystem can be thought of as 2 separate parts:

    Node Metadata:

    The metadata is everything needed by the treesystem to store a node, but excluding the actual content of the node. This includes information such as:

    • what is the name of the node
    • who is the parent of this node
    • who was permission to read / write this node
    • when was the node last modified in the cloud
    • various sync related information, such as eTag(s)
    • various crypto information needed for encrypting & decrypting the content

    Node Data:

    The data is the actual content of the node. In other words, the content that your app generates.

    ZDCNode is responsible for the metadata. And you’re responsible for the data (using whatever objects, files, or formats you prefer).

    During a pull, whenever ZeroDark discovers new nodes in the cloud, it will automatically create ZDCNode instances and then inform the ZeroDarkCloudDelegate about them.

    When you want upload a new node to the cloud, a ZDCNode instance will be created and added to the treesystem. You can do this the easy way, via -[ZDCCloudTransaction createNodeWithPath:error:]. Or you can do it the manual way, via -[ZDCCloudTransaction createNode:error:]. Either way, once the node is created, the framework will queue and perform the upload operation(s) for it.

    See more

    Declaration

    Objective-C

    @interface ZDCNode <NSCoding, NSCopying>

    Swift

    class ZDCNode : NSCoding, NSCopying
  • When a node is located in a different bucket (not the localUser’s bucket), then the ZDCNodeAnchor class is used as a reference point for the foreign node.

    The ZDCNodeAnchor class is immutable.

    See more

    Declaration

    Objective-C

    @interface ZDCNodeAnchor : NSObject <NSCoding, NSCopying>

    Swift

    class ZDCNodeAnchor : NSObject, NSCoding, NSCopying
  • The PublicKey class holds the information necessary to create a public key within the S4Crypto library. It may optionally hold the information for the corresponding private key (if the key is for a local user).

    See more

    Declaration

    Objective-C

    @interface ZDCPublicKey <NSCoding, NSCopying>

    Swift

    class ZDCPublicKey
  • A ShareItem encapsulates the permissions for a particular resource. Typically this means the permissions for another user.

    Recall that ZeroDark.cloud uses cryptography to enforce permissions. In order to read the content of a node, you need to know the node’s encryptionKey. (And every node has a different randomly generated encryptionKey.) Each encryptionKey is wrapped using the publicKey of a resource with read permissions for the node. So each ShareItem includes permissions, and a wrapped key.

    See more

    Declaration

    Objective-C

    @interface ZDCShareItem

    Swift

    class ZDCShareItem
  • ZDCShareList encapsulates the permissions information for a node.

    By default, a node inherits the same permissions as its parent node. For example, a newly created node in the root of the Home container will only include permissions for the localUser (rw).

    To share a node with another user will require you to add permissions for that user here. For information on sharing data with other users:

    • amazing website resource #1
    • amazing website resource #2

    Advanced Options:

    The ZeroDark.cloud server also allows you to share to resources other than users. For example, your application may wish to share information with your custom backend system. Here’s how that works:

    • Sign into the ZeroDark.cloud developer dashboard
    • Create a server instance (you’ll receive a UUID for this instance)
    • Register one or more endpoints so that the ZeroDark.cloud system can notify your server(s)
    • Then, when nodes are created/modified/deleted, which have in their shareList a key of SRV:, the ZeroDark.cloud will notify your server(s) via the current set of registered endpoints.
    See more

    Declaration

    Objective-C

    @interface ZDCShareList

    Swift

    class ZDCShareList
  • The SymmetricKey class holds the information necessary to create a symmetric key within the S4Crypto library.

    See more

    Declaration

    Objective-C

    @interface ZDCSymmetricKey <NSCoding, NSCopying>

    Swift

    class ZDCSymmetricKey
  • The ZeroDark.cloud framework provides a treesystem in the cloud.

    It’s important to understand: Treesystem != Filesystem

    A traditional filesystem has directories & files. This design forces all content to reside in the leaves. That is, if you think about a traditional filesystem as a tree, you can see that all files are leaves, and all non-leaves are directories.

    In contrast, the ZeroDark.cloud treesystem acts as a generic tree, where each item in the tree is simply called a node. A node can be whatever you want it to be - an object, a file, a container, etc. Additionally, ALL nodes are allowed to have children. (e.g. a node representing an object/file can have children).

    For more information about the treesystem, see the docs: https://zerodarkcloud.readthedocs.io/en/latest/advanced/tree/

    Every user gets their own treesystem. And within each treesystem are top-level root nodes called trunks. All user-generated treesystem nodes will be rooted in one of these trunks.

    A ZDCTrunkNode represents one of these top-level trunk nodes. ZDCTrunkNode instances are automatically added to the database when a localUser is created.

    See more

    Declaration

    Objective-C

    @interface ZDCTrunkNode : ZDCNode <NSCoding, NSCopying>

    Swift

    class ZDCTrunkNode : ZDCNode, NSCoding, NSCopying
  • Represents a user in the system.

    Non-local users will be instances of this class (ZDCUser). Local users will be instances of ZDCLocalUser (which extends ZDCUser).

    See more

    Declaration

    Objective-C

    @interface ZDCUser

    Swift

    class ZDCUser
  • Encapsulates an identity that’s attached to the user.

    For example, a user may attach their Facebook or LinkedIn identity. This is done to improve searchability, and to provide proof that a ZDC account is owned by a particular person (and not an imposter, or somebody else with a similar name).

    See more

    Declaration

    Objective-C

    @interface ZDCUserIdentity : NSObject <NSSecureCoding, NSCopying>

    Swift

    class ZDCUserIdentity : NSObject, NSSecureCoding, NSCopying