-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #330 from cheqd/DEV-1281-resource-module
feat: Add resource module (DEV-1281)
- Loading branch information
Showing
81 changed files
with
7,209 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
syntax = "proto3"; | ||
package cheqdid.cheqdnode.resource.v1; | ||
|
||
option go_package = "github.com/cheqd/cheqd-node/x/resource/types"; | ||
|
||
import "resource/v1/resource.proto"; | ||
|
||
// GenesisState defines the cheqd module's genesis state. | ||
message GenesisState { | ||
repeated Resource resourceList = 1; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
syntax = "proto3"; | ||
package cheqdid.cheqdnode.resource.v1; | ||
|
||
option go_package = "github.com/cheqd/cheqd-node/x/resource/types"; | ||
|
||
import "google/api/annotations.proto"; | ||
import "resource/v1/resource.proto"; | ||
|
||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
rpc Resource(QueryGetResourceRequest) returns (QueryGetResourceResponse) { | ||
option (google.api.http).get = "/1.0/identifiers/{collection_id}/resources/{id}"; | ||
} | ||
rpc CollectionResources(QueryGetCollectionResourcesRequest) returns (QueryGetCollectionResourcesResponse) { | ||
option (google.api.http).get = "/1.0/identifiers/{collection_id}/resources/all"; | ||
} | ||
rpc AllResourceVersions(QueryGetAllResourceVersionsRequest) returns (QueryGetAllResourceVersionsResponse) { | ||
option (google.api.http).get = "/1.0/identifiers/{collection_id}/resources/versions/{name}"; | ||
} | ||
} | ||
|
||
message QueryGetResourceRequest { | ||
string collection_id = 1; | ||
string id = 2; | ||
} | ||
|
||
message QueryGetResourceResponse { | ||
Resource resource = 1; | ||
} | ||
|
||
message QueryGetCollectionResourcesRequest { | ||
string collection_id = 1; | ||
} | ||
|
||
message QueryGetCollectionResourcesResponse { | ||
repeated ResourceHeader resources = 1; | ||
} | ||
|
||
message QueryGetAllResourceVersionsRequest { | ||
string collection_id = 1; | ||
string name = 2; | ||
} | ||
|
||
message QueryGetAllResourceVersionsResponse { | ||
repeated ResourceHeader resources = 1; | ||
} |
Oops, something went wrong.