diff --git a/proto/identity/api/v1/identity.proto b/proto/identity/api/v1/identity.proto index 09113b5..8c95fd1 100644 --- a/proto/identity/api/v1/identity.proto +++ b/proto/identity/api/v1/identity.proto @@ -52,6 +52,14 @@ service IdentityApi { body: "*" }; } + + // Subscribe to a stream of addresses associated and revoked from all inboxes on the network + rpc SubscribeAssociationChanges(SubscribeAssociationChangesRequest) returns (stream SubscribeAssociationChangesResponse) { + option (google.api.http) = { + post: "/identity/v1/subscribe-association-changes" + body: "*" + }; + } } message VerifySmartContractWalletSignaturesRequest { @@ -137,3 +145,27 @@ message GetInboxIdsResponse { repeated Response responses = 1; } + +// Request to subscribe to association changes, triggered by Identity Updates +message SubscribeAssociationChangesRequest {} + +message SubscribeAssociationChangesResponse { + // A change in account_address -> inbox_id association + message AccountAddressAssociation { + string account_address = 1; + string inbox_id = 2; + } + + // A revocation of an account_address -> inbox_id association + message AccountAddressRevocation { + string account_address = 1; + string inbox_id = 2; + } + + uint64 timestamp_ns = 1; + + oneof change { + AccountAddressAssociation account_address_association = 2; + AccountAddressRevocation account_address_revocation = 3; + } +}