Skip to content

Commit

Permalink
wip(daemon): new trusted endpoint definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
juligasa committed Jul 26, 2023
1 parent 85f5aa7 commit 2912683
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
16 changes: 16 additions & 0 deletions proto/accounts/v1alpha/accounts.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ service Accounts {
// interacting with the network, or users can ask to discover specific accounts using
// the Networking API.
rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse);

// Set or unset the trustness of an account. An account is untrusted by default except for our own.
// Returns the modified account.
rpc SetAccountTrust(SetAccountTrustRequest) returns (Account);

}

message GetAccountRequest {
Expand Down Expand Up @@ -45,6 +50,9 @@ message Account {

// List of known devices of this Account.
map<string, Device> devices = 3;

// Defining if the account is trusted or not.
bool is_trusted = 4;
}

message Profile {
Expand All @@ -59,3 +67,11 @@ message Device {
// CID-encoded Peer ID of this device.
string device_id = 1;
}

message SetAccountTrustRequest {
// ID of the Account to trust/untrust.
string id = 1;

//Whether to trust or not the account.
bool is_trusted = 2;
}
9 changes: 9 additions & 0 deletions proto/documents/v1alpha/documents.proto
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ message GetPublicationRequest {

// Optional. If true, only local publications will be found. False by default.
bool local_only = 3;

// Optional. If true, the returned publication version will be the last change made by a
// trusted contact. If false (default) then the returned version will be de latest available.
bool trusted_only = 4;
}

// Request for deleting a publication.
Expand All @@ -168,6 +172,11 @@ message ListPublicationsRequest {

// Optional. Value from next_page_token obtains from a previous response.
string page_token = 2;

// Optional. Whether to return trusted publications only
// or including all publications regardless of the trusted state
// By default, it returns all publications (trusted_publications_only = false)
bool trusted_publications_only = 3;
}

// Response with list of publications.
Expand Down

0 comments on commit 2912683

Please sign in to comment.