diff --git a/src/lib.rs b/src/lib.rs index 7b65eed8..970193c4 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,6 +31,8 @@ pub mod services { pub use admin_server::{Admin, AdminServer}; pub use authorization_client::AuthorizationClient; pub use authorization_server::{Authorization, AuthorizationServer}; + pub use carrier_service_client::CarrierServiceClient; + pub use carrier_service_server::{CarrierService, CarrierServiceServer}; pub use entity_client::EntityClient; pub use entity_server::{Entity, EntityServer}; pub use gateway_client::GatewayClient; diff --git a/src/service/mobile_config.proto b/src/service/mobile_config.proto index 8ad69e2e..b5b6d44b 100644 --- a/src/service/mobile_config.proto +++ b/src/service/mobile_config.proto @@ -93,6 +93,24 @@ message entity_verify_res_v1 { bytes signature = 4; } +message carrier_key_to_entity_req_v1 { + // string representation of the helium pubkey of the carrier + string pubkey = 1; + // pubkey binary of the requestor signing keypair + bytes signer = 2; + bytes signature = 3; +} + +message carrier_key_to_entity_res_v1 { + // unix epoch timestamp in seconds + uint64 timestamp = 1; + // string representing the entity key + string entity_key = 2; + // pubkey binary of the requestor signing keypair + bytes signer = 3; + bytes signature = 4; +} + enum admin_key_role { // administrative operator key administrator = 0; @@ -212,6 +230,12 @@ service entity { rpc verify(entity_verify_req_v1) returns (entity_verify_res_v1); } +service carrier_service { + // Retrieve an entity key for the specified helium pubkey + rpc key_to_entity(carrier_key_to_entity_req_v1) + returns (carrier_key_to_entity_res_v1); +} + service authorization { // Submit a pubkey binary and network key role for an authorized entity on the // mobile network to verify if it is registered with the given role. diff --git a/src/service/poc_mobile.proto b/src/service/poc_mobile.proto index 4db94514..3e446204 100644 --- a/src/service/poc_mobile.proto +++ b/src/service/poc_mobile.proto @@ -337,6 +337,35 @@ message subscriber_reward { uint64 discovery_location_amount = 2; } +enum service_provider { + helium_mobile = 0; +} + +message service_provider_reward { + // rewardable entity id of the service provider to which the reward will be + // credited + service_provider service_provider_id = 1; + /// Amount in bones rewarded + uint64 amount = 2; +} + +enum unallocated_reward_type { + unallocated_reward_type_poc = 0; + unallocated_reward_type_discovery_location = 1; + unallocated_reward_type_mapper = 2; + unallocated_reward_type_service_provider = 3; + unallocated_reward_type_oracle = 4; + unallocated_reward_type_data = 5; +} + +message unallocated_reward { + // the reward type representing a reward category to which an unallocated + // amount exists + unallocated_reward_type reward_type = 1; + /// Amount in bones unallocated + uint64 amount = 2; +} + message mobile_reward_share { /// Unix timestamp in seconds of the start of the reward period uint64 start_period = 1; @@ -347,6 +376,8 @@ message mobile_reward_share { radio_reward radio_reward = 3; gateway_reward gateway_reward = 4; subscriber_reward subscriber_reward = 5; + service_provider_reward service_provider_reward = 6; + unallocated_reward unallocated_reward = 7; } }