// Copyright 2018 Cargill Incorporated // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; // A namespace registry is stored using the namespace, prefixed with zero // padding: // // 00ec00 + hash(substr(namespace, 6)) // // The stored contents are a serialized NamespaceRegistryList message to handle // hash collisions. // // Creating a namespace registry requires being in the setting for // 'sawtooth.swa.administrators' (a list of public keys). // // Once created, only an owner or a member of the sawtooth.swa.administrators // can modify the registry entry. message NamespaceRegistry { message Permission { string contract_name = 1; bool read = 2; bool write = 3; } string namespace = 1; repeated string owners = 2; repeated Permission permissions = 3; } message NamespaceRegistryList { repeated NamespaceRegistry registries = 1; }