Skip to content

Commit

Permalink
Merge pull request #206 from AssetMantle/mukund/protocopyids
Browse files Browse the repository at this point in the history
adding proto files for ids
  • Loading branch information
deepanshutr authored Dec 20, 2022
2 parents f804851 + 72f9fc0 commit 5571484
Show file tree
Hide file tree
Showing 22 changed files with 217 additions and 0 deletions.
15 changes: 15 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: v1
managed:
enabled: true
go_package_prefix:
default: github.com/AssetMantle/modules
except:
- buf.build/googleapis/googleapis
- buf.build/cosmos/gogo-proto
plugins:
- name: gocosmos
out: .
opt: plugins=grpc,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mcosmos/orm/v1alpha1/orm.proto=github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1,paths=source_relative
- name: grpc-gateway
out: .
opt: logtostderr=true,allow_colon_final_segments=true,paths=source_relative
14 changes: 14 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: v1
name: buf.build/assetmantle/schema
deps:
- buf.build/cosmos/cosmos-sdk
- buf.build/cosmos/cosmos-proto
- buf.build/cosmos/gogo-proto
- buf.build/googleapis/googleapis
breaking:
use:
- FILE
lint:
use:
- DEFAULT

6 changes: 6 additions & 0 deletions schema/data/base/accAddressData.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
syntax = "proto3";
package data;

message AccAddressData{
bytes value = 1;
}
6 changes: 6 additions & 0 deletions schema/data/base/booleanData.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
syntax = "proto3";
package data;

message BooleanData{
bool value = 1;
}
20 changes: 20 additions & 0 deletions schema/data/base/data.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
syntax = "proto3";
package data;
import "schema/data/base/accAddressData.v1.proto";
import "schema/data/base/booleanData.v1.proto";
import "schema/data/base/decData.v1.proto";
import "schema/data/base/heightData.v1.proto";
import "schema/data/base/idData.v1.proto";
import "schema/data/base/stringData.v1.proto";


message Data{
oneof impl{
AccAddressData accAddressData = 1;
BooleanData booleanData = 2;
DecData decData = 3;
HeightData heightData = 4;
IDData idData = 5;
StringData stringData = 6;
}
}
7 changes: 7 additions & 0 deletions schema/data/base/decData.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax = "proto3";
package data;
import "gogoproto/gogo.proto";

message DecData{
string value = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
}
8 changes: 8 additions & 0 deletions schema/data/base/heightData.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";
package data;

import "schema/types/base/height.v1.proto";

message HeightData{
types.Height value = 1;
}
8 changes: 8 additions & 0 deletions schema/data/base/idData.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";
package data;

import "schema/ids/base/id.v1.proto";

message IDData {
ids.ID value = 1;
}
6 changes: 6 additions & 0 deletions schema/data/base/stringData.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
syntax = "proto3";
package data;

message StringData{
string value = 1;
}
7 changes: 7 additions & 0 deletions schema/ids/base/assetID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax = "proto3";
package ids;

import "schema/ids/base/hashID.v1.proto";
message AssetID{
HashID hash_i_d = 1;
}
8 changes: 8 additions & 0 deletions schema/ids/base/classificationID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";
package ids;

import "schema/ids/base/hashID.v1.proto";

message ClassificationID {
HashID hash_i_d = 1;
}
10 changes: 10 additions & 0 deletions schema/ids/base/dataID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax = "proto3";
package ids;

import "schema/ids/base/hashID.v1.proto";
import "schema/ids/base/stringID.v1.proto";

message DataID {
StringID type_i_d = 1;
HashID hash_i_d = 2;
}
8 changes: 8 additions & 0 deletions schema/ids/base/hashID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";
package ids;


message HashID {
bytes id_bytes = 1;
}

30 changes: 30 additions & 0 deletions schema/ids/base/id.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";
package ids;

import "schema/ids/base/assetID.v1.proto";
import "schema/ids/base/classificationID.v1.proto";
import "schema/ids/base/dataID.v1.proto";
import "schema/ids/base/hashID.v1.proto";
import "schema/ids/base/identityID.v1.proto";
import "schema/ids/base/maintainerID.v1.proto";
import "schema/ids/base/orderID.v1.proto";
import "schema/ids/base/ownableID.v1.proto";
import "schema/ids/base/propertyID.v1.proto";
import "schema/ids/base/splitID.v1.proto";
import "schema/ids/base/stringID.v1.proto";

message ID {
oneof impl {
AssetID AssetID = 1;
ClassificationID ClassificationID = 2;
DataID DataID = 3;
HashID HashID = 4;
IdentityID IdentityID = 5;
MaintainerID MaintainerID = 6;
OrderID OrderID = 7;
OwnableID OwnableID = 8;
PropertyID PropertyID = 9;
SplitID SplitID = 10;
StringID StringID = 11;
}
}
8 changes: 8 additions & 0 deletions schema/ids/base/identityID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";
package ids;

import "schema/ids/base/hashID.v1.proto";

message IdentityID{
HashID hash_i_d = 1;
}
8 changes: 8 additions & 0 deletions schema/ids/base/maintainerID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";
package ids;

import "schema/ids/base/hashID.v1.proto";

message MaintainerID {
HashID hash_i_d = 1;
}
8 changes: 8 additions & 0 deletions schema/ids/base/orderID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";
package ids;

import "schema/ids/base/hashID.v1.proto";

message OrderID {
HashID order_i_d = 1;
}
8 changes: 8 additions & 0 deletions schema/ids/base/ownableID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
syntax = "proto3";
package ids;

import "schema/ids/base/stringID.v1.proto";

message OwnableID{
StringID string_i_d = 1;
}
9 changes: 9 additions & 0 deletions schema/ids/base/propertyID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";
package ids;

import "schema/ids/base/stringID.v1.proto";

message PropertyID{
StringID key_i_d = 1;
StringID type_i_d = 2;
}
10 changes: 10 additions & 0 deletions schema/ids/base/splitID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax = "proto3";
package ids;

import "schema/ids/base/identityID.v1.proto";
import "schema/ids/base/ownableID.v1.proto";

message SplitID {
IdentityID owner_i_d = 1;
OwnableID ownable_i_d = 2;
}
7 changes: 7 additions & 0 deletions schema/ids/base/stringID.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax="proto3";
package ids;


message StringID {
string id_string = 1;
}
6 changes: 6 additions & 0 deletions schema/types/base/height.v1.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
syntax = "proto3";
package types;

message Height {
int64 value = 1;
}

0 comments on commit 5571484

Please sign in to comment.