mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
refactor: optimize oracle genesis proto
This commit is contained in:
parent
92ff87cc2c
commit
d06dfb5a93
@ -2718,30 +2718,29 @@ var file_macaroon_v1_genesis_proto_rawDesc = []byte{
|
|||||||
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65,
|
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65,
|
||||||
0x61, 0x74, 0x73, 0x52, 0x07, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x3a, 0x1c, 0x98, 0xa0,
|
0x61, 0x74, 0x73, 0x52, 0x07, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x3a, 0x1c, 0x98, 0xa0,
|
||||||
0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x63, 0x61, 0x72,
|
0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x63, 0x61, 0x72,
|
||||||
0x6f, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x42, 0x0a, 0x07, 0x4d, 0x65,
|
0x6f, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3e, 0x0a, 0x07, 0x4d, 0x65,
|
||||||
0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73,
|
0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73,
|
||||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x3a,
|
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x3a,
|
||||||
0x1d, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x10, 0x6d, 0x61,
|
0x19, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x10, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f,
|
||||||
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x3e,
|
0x6f, 0x6e, 0x2f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x3a, 0x0a, 0x06, 0x53, 0x63,
|
||||||
0x0a, 0x06, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70,
|
0x6f, 0x70, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x01,
|
||||||
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73,
|
0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x3a, 0x18, 0xe8, 0xa0,
|
||||||
0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d,
|
0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f,
|
||||||
0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x41,
|
0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x07, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74,
|
||||||
0x0a, 0x07, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x76,
|
0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||||
0x65, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x76, 0x65,
|
0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x3a, 0x18, 0xe8, 0xa0, 0x1f,
|
||||||
0x61, 0x74, 0x73, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0,
|
0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x63,
|
||||||
0x2a, 0x0f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x63, 0x61, 0x76, 0x65, 0x61,
|
0x61, 0x76, 0x65, 0x61, 0x74, 0x42, 0x9f, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61,
|
||||||
0x74, 0x42, 0x9f, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f,
|
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73,
|
||||||
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72,
|
0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||||
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e,
|
||||||
0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70,
|
0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76,
|
||||||
0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61,
|
0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d,
|
||||||
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02,
|
0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56, 0x31,
|
||||||
0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d,
|
0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02,
|
||||||
0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x61, 0x63,
|
0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42,
|
||||||
0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61, 0x72,
|
||||||
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a,
|
0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -2322,31 +2322,33 @@ var file_oracle_v1_genesis_proto_rawDesc = []byte{
|
|||||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x61, 0x73, 0x73,
|
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x61, 0x73, 0x73,
|
||||||
0x65, 0x74, 0x73, 0x3a, 0x1a, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0,
|
0x65, 0x74, 0x73, 0x3a, 0x1a, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0,
|
||||||
0x2a, 0x0d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22,
|
0x2a, 0x0d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22,
|
||||||
0x52, 0x0a, 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x73, 0x73,
|
0x4e, 0x0a, 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x73, 0x73,
|
||||||
0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x61, 0x63,
|
0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x72, 0x61, 0x63,
|
||||||
0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||||
0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x3a, 0x1a, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f,
|
0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x3a, 0x16, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0,
|
||||||
0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x61, 0x73, 0x73,
|
0x2a, 0x0d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22,
|
||||||
0x65, 0x74, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66,
|
0xb5, 0x01, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a,
|
||||||
0x6f, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e,
|
||||||
0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x72, 0x70, 0x18, 0x02,
|
0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x72, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x72, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d,
|
0x52, 0x03, 0x68, 0x72, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18,
|
||||||
0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f,
|
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1d, 0x0a,
|
||||||
0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
|
0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65,
|
0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c,
|
0x12, 0x19, 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01,
|
||||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x42,
|
0x28, 0x09, 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x3a, 0x1a, 0xe8, 0xa0, 0x1f,
|
||||||
0x91, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76,
|
0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x61, 0x73, 0x73,
|
||||||
0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
0x65, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x91, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e,
|
||||||
0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
|
0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73,
|
||||||
0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72,
|
0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||||
0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31,
|
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e,
|
||||||
0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e,
|
0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b,
|
||||||
0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02,
|
0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02,
|
||||||
0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61,
|
||||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a,
|
0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c,
|
||||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
|
||||||
|
0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3112,40 +3112,40 @@ var file_service_v1_genesis_proto_rawDesc = []byte{
|
|||||||
0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54,
|
0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54,
|
||||||
0x79, 0x70, 0x65, 0x73, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x1b, 0x98, 0xa0, 0x1f,
|
0x79, 0x70, 0x65, 0x73, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x1b, 0x98, 0xa0, 0x1f,
|
||||||
0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
0x65, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x54, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76,
|
0x65, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x50, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76,
|
||||||
0x69, 0x63, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x0a,
|
0x69, 0x63, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x0a,
|
||||||
0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||||
0x09, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x1f, 0x98,
|
0x09, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x1b, 0xe8,
|
||||||
0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x73, 0x65, 0x72, 0x76,
|
0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
|
||||||
0x69, 0x63, 0x65, 0x2f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x40,
|
0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x0c, 0x53, 0x65,
|
||||||
0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x14,
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79,
|
||||||
0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74,
|
0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||||
0x79, 0x70, 0x65, 0x73, 0x3a, 0x1a, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7,
|
0x3a, 0x16, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||||
0xb0, 0x2a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73,
|
0x63, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72,
|
||||||
0x22, 0xda, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02,
|
0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09,
|
0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
|
||||||
0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
||||||
0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72,
|
0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67,
|
0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
||||||
0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20,
|
||||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,
|
||||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
|
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65,
|
0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01,
|
||||||
0x67, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65,
|
0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03,
|
0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73,
|
||||||
0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69,
|
0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68,
|
||||||
0x72, 0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52,
|
0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x48,
|
||||||
0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x98, 0x01,
|
0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x98, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65,
|
||||||
0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31,
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69,
|
||||||
0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
|
0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||||
0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73,
|
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72,
|
||||||
0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72,
|
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b,
|
||||||
0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x76,
|
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa,
|
||||||
0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
0x02, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x53,
|
||||||
0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x56,
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x53, 0x65, 0x72, 0x76,
|
||||||
0x31, 0xe2, 0x02, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47,
|
0x69, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||||
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x53, 0x65, 0x72,
|
0x74, 0x61, 0xea, 0x02, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31,
|
||||||
0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -32,7 +32,6 @@ message Params {
|
|||||||
message Methods {
|
message Methods {
|
||||||
option (amino.name) = "macaroon/methods";
|
option (amino.name) = "macaroon/methods";
|
||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
|
||||||
|
|
||||||
repeated string methods = 1;
|
repeated string methods = 1;
|
||||||
}
|
}
|
||||||
@ -41,7 +40,6 @@ message Methods {
|
|||||||
message Scopes {
|
message Scopes {
|
||||||
option (amino.name) = "macaroon/scopes";
|
option (amino.name) = "macaroon/scopes";
|
||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
|
||||||
|
|
||||||
repeated string scopes = 1;
|
repeated string scopes = 1;
|
||||||
}
|
}
|
||||||
@ -50,7 +48,6 @@ message Scopes {
|
|||||||
message Caveats {
|
message Caveats {
|
||||||
option (amino.name) = "macaroon/caveat";
|
option (amino.name) = "macaroon/caveat";
|
||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
|
||||||
|
|
||||||
repeated string caveats = 1;
|
repeated string caveats = 1;
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,15 @@ message Params {
|
|||||||
message Assets {
|
message Assets {
|
||||||
option (amino.name) = "oracle/assets";
|
option (amino.name) = "oracle/assets";
|
||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
|
||||||
|
|
||||||
repeated AssetInfo assets = 1;
|
repeated AssetInfo assets = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// AssetInfo defines the asset info
|
// AssetInfo defines the asset info
|
||||||
message AssetInfo {
|
message AssetInfo {
|
||||||
|
option (amino.name) = "oracle/asset_info";
|
||||||
|
option (gogoproto.equal) = true;
|
||||||
|
|
||||||
// The coin type index for bip44 path
|
// The coin type index for bip44 path
|
||||||
int64 index = 1;
|
int64 index = 1;
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ message Params {
|
|||||||
message ServiceCategories {
|
message ServiceCategories {
|
||||||
option (amino.name) = "service/categories";
|
option (amino.name) = "service/categories";
|
||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
|
||||||
|
|
||||||
repeated string categories = 1;
|
repeated string categories = 1;
|
||||||
}
|
}
|
||||||
@ -33,7 +32,6 @@ message ServiceCategories {
|
|||||||
message ServiceTypes {
|
message ServiceTypes {
|
||||||
option (amino.name) = "service/types";
|
option (amino.name) = "service/types";
|
||||||
option (gogoproto.equal) = true;
|
option (gogoproto.equal) = true;
|
||||||
option (gogoproto.goproto_stringer) = false;
|
|
||||||
|
|
||||||
repeated string types = 1;
|
repeated string types = 1;
|
||||||
}
|
}
|
||||||
|
@ -27,19 +27,6 @@ func (ms msgServer) RegisterController(goCtx context.Context, msg *types.MsgRegi
|
|||||||
return &types.MsgRegisterControllerResponse{}, nil
|
return &types.MsgRegisterControllerResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthorizeService implements types.MsgServer.
|
|
||||||
func (ms msgServer) AuthorizeService(goCtx context.Context, msg *types.MsgAuthorizeService) (*types.MsgAuthorizeServiceResponse, error) {
|
|
||||||
if ms.k.authority != msg.Controller {
|
|
||||||
return nil, errors.Wrapf(
|
|
||||||
govtypes.ErrInvalidSigner,
|
|
||||||
"invalid authority; expected %s, got %s",
|
|
||||||
ms.k.authority,
|
|
||||||
msg.Controller,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
return &types.MsgAuthorizeServiceResponse{}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateParams updates the x/did module parameters.
|
// UpdateParams updates the x/did module parameters.
|
||||||
func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
|
func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
|
||||||
if ms.k.authority != msg.Authority {
|
if ms.k.authority != msg.Authority {
|
||||||
|
@ -1,17 +1,8 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
fmt "fmt"
|
|
||||||
|
|
||||||
ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1"
|
ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1"
|
||||||
"cosmossdk.io/collections"
|
"cosmossdk.io/collections"
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/assettype"
|
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keyalgorithm"
|
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keycurve"
|
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keyencoding"
|
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keyrole"
|
|
||||||
"github.com/onsonr/sonr/x/did/types/orm/keytype"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ParamsKey saves the current module params.
|
// ParamsKey saves the current module params.
|
||||||
@ -52,155 +43,3 @@ func (gs GenesisState) Validate() error {
|
|||||||
|
|
||||||
return gs.Params.Validate()
|
return gs.Params.Validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// DefaultParams returns default module parameters.
|
|
||||||
func DefaultParams() Params {
|
|
||||||
return Params{
|
|
||||||
WhitelistedAssets: DefaultAssets(),
|
|
||||||
AllowedPublicKeys: DefaultKeyInfos(),
|
|
||||||
ConveyancePreference: "direct",
|
|
||||||
AttestationFormats: []string{"packed", "android-key", "fido-u2f", "apple"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DefaultSeedMessage returns the default seed message
|
|
||||||
func DefaultSeedMessage() string {
|
|
||||||
l1 := "The Sonr Network shall make no protocol that respects the establishment of centralized authority,"
|
|
||||||
l2 := "or prohibits the free exercise of decentralized identity; or abridges the freedom of data sovereignty,"
|
|
||||||
l3 := "or of encrypted communication; or the right of the users to peaceally interact and transact,"
|
|
||||||
l4 := "and to petition the Network for the redress of vulnerabilities."
|
|
||||||
return fmt.Sprintf("%s %s %s %s", l1, l2, l3, l4)
|
|
||||||
}
|
|
||||||
|
|
||||||
// DefaultAssets returns the default asset infos: BTC, ETH, SNR, and USDC
|
|
||||||
func DefaultAssets() []*AssetInfo {
|
|
||||||
return []*AssetInfo{
|
|
||||||
{
|
|
||||||
Name: "Bitcoin",
|
|
||||||
Symbol: "BTC",
|
|
||||||
Hrp: "bc",
|
|
||||||
Index: 0,
|
|
||||||
AssetType: assettype.Native.String(),
|
|
||||||
IconUrl: "https://cdn.sonr.land/BTC.svg",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "Ethereum",
|
|
||||||
Symbol: "ETH",
|
|
||||||
Hrp: "eth",
|
|
||||||
Index: 64,
|
|
||||||
AssetType: assettype.Native.String(),
|
|
||||||
IconUrl: "https://cdn.sonr.land/ETH.svg",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "Sonr",
|
|
||||||
Symbol: "SNR",
|
|
||||||
Hrp: "idx",
|
|
||||||
Index: 703,
|
|
||||||
AssetType: assettype.Native.String(),
|
|
||||||
IconUrl: "https://cdn.sonr.land/SNR.svg",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func DefaultKeyInfos() map[string]*KeyInfo {
|
|
||||||
return map[string]*KeyInfo{
|
|
||||||
// Identity Key Info
|
|
||||||
// Sonr Controller Key Info - From MPC
|
|
||||||
"auth.dwn": {
|
|
||||||
Role: keyrole.Invocation.String(),
|
|
||||||
Curve: keycurve.P256.String(),
|
|
||||||
Algorithm: keyalgorithm.Ecdsa.String(),
|
|
||||||
Encoding: keyencoding.Hex.String(),
|
|
||||||
Type: keytype.Mpc.String(),
|
|
||||||
},
|
|
||||||
|
|
||||||
// Sonr Vault Shared Key Info - From Registration
|
|
||||||
"auth.zk": {
|
|
||||||
Role: keyrole.Assertion.String(),
|
|
||||||
Curve: keycurve.Bls12381.String(),
|
|
||||||
Algorithm: keyalgorithm.Es256k.String(),
|
|
||||||
Encoding: keyencoding.Multibase.String(),
|
|
||||||
Type: keytype.Zk.String(),
|
|
||||||
},
|
|
||||||
|
|
||||||
// Blockchain Key Info
|
|
||||||
// Ethereum Key Info
|
|
||||||
"auth.ethereum": {
|
|
||||||
Role: keyrole.Delegation.String(),
|
|
||||||
Curve: keycurve.Keccak256.String(),
|
|
||||||
Algorithm: keyalgorithm.Ecdsa.String(),
|
|
||||||
Encoding: keyencoding.Hex.String(),
|
|
||||||
Type: keytype.Bip32.String(),
|
|
||||||
},
|
|
||||||
// Bitcoin/IBC Key Info
|
|
||||||
"auth.bitcoin": {
|
|
||||||
Role: keyrole.Delegation.String(),
|
|
||||||
Curve: keycurve.Secp256k1.String(),
|
|
||||||
Algorithm: keyalgorithm.Ecdsa.String(),
|
|
||||||
Encoding: keyencoding.Hex.String(),
|
|
||||||
Type: keytype.Bip32.String(),
|
|
||||||
},
|
|
||||||
|
|
||||||
// Authentication Key Info
|
|
||||||
// Browser based WebAuthn
|
|
||||||
"webauthn.browser": {
|
|
||||||
Role: keyrole.Authentication.String(),
|
|
||||||
Curve: keycurve.P256.String(),
|
|
||||||
Algorithm: keyalgorithm.Es256.String(),
|
|
||||||
Encoding: keyencoding.Raw.String(),
|
|
||||||
Type: keytype.Webauthn.String(),
|
|
||||||
},
|
|
||||||
// FIDO U2F
|
|
||||||
"webauthn.fido": {
|
|
||||||
Role: keyrole.Authentication.String(),
|
|
||||||
Curve: keycurve.P256.String(),
|
|
||||||
Algorithm: keyalgorithm.Es256.String(),
|
|
||||||
Encoding: keyencoding.Raw.String(),
|
|
||||||
Type: keytype.Webauthn.String(),
|
|
||||||
},
|
|
||||||
// Cross-Platform Passkeys
|
|
||||||
"webauthn.passkey": {
|
|
||||||
Role: keyrole.Authentication.String(),
|
|
||||||
Curve: keycurve.Ed25519.String(),
|
|
||||||
Algorithm: keyalgorithm.Eddsa.String(),
|
|
||||||
Encoding: keyencoding.Raw.String(),
|
|
||||||
Type: keytype.Webauthn.String(),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stringer method for Params.
|
|
||||||
func (p Params) String() string {
|
|
||||||
bz, err := json.Marshal(p)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return string(bz)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate does the sanity check on the params.
|
|
||||||
func (p Params) Validate() error {
|
|
||||||
// TODO:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// # Genesis Structures
|
|
||||||
//
|
|
||||||
|
|
||||||
// Equal returns true if two asset infos are equal
|
|
||||||
func (a *AssetInfo) Equal(b *AssetInfo) bool {
|
|
||||||
if a == nil && b == nil {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// Equal returns true if two key infos are equal
|
|
||||||
func (k *KeyInfo) Equal(b *KeyInfo) bool {
|
|
||||||
if k == nil && b == nil {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
115
x/did/types/params.go
Normal file
115
x/did/types/params.go
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
fmt "fmt"
|
||||||
|
|
||||||
|
"github.com/onsonr/sonr/x/did/types/orm/keyalgorithm"
|
||||||
|
"github.com/onsonr/sonr/x/did/types/orm/keycurve"
|
||||||
|
"github.com/onsonr/sonr/x/did/types/orm/keyencoding"
|
||||||
|
"github.com/onsonr/sonr/x/did/types/orm/keyrole"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DefaultParams returns default module parameters.
|
||||||
|
func DefaultParams() Params {
|
||||||
|
return Params{
|
||||||
|
AllowedPublicKeys: DefaultKeyInfos(),
|
||||||
|
ConveyancePreference: "direct",
|
||||||
|
AttestationFormats: []string{"packed", "android-key", "fido-u2f", "apple"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// DefaultSeedMessage returns the default seed message
|
||||||
|
func DefaultSeedMessage() string {
|
||||||
|
l1 := "The Sonr Network shall make no protocol that respects the establishment of centralized authority,"
|
||||||
|
l2 := "or prohibits the free exercise of decentralized identity; or abridges the freedom of data sovereignty,"
|
||||||
|
l3 := "or of encrypted communication; or the right of the users to peaceally interact and transact,"
|
||||||
|
l4 := "and to petition the Network for the redress of vulnerabilities."
|
||||||
|
return fmt.Sprintf("%s %s %s %s", l1, l2, l3, l4)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DefaultKeyInfos() map[string]*KeyInfo {
|
||||||
|
return map[string]*KeyInfo{
|
||||||
|
// Identity Key Info
|
||||||
|
// Sonr Controller Key Info - From MPC
|
||||||
|
"auth.dwn": {
|
||||||
|
Role: keyrole.Invocation.String(),
|
||||||
|
Curve: keycurve.P256.String(),
|
||||||
|
Algorithm: keyalgorithm.Ecdsa.String(),
|
||||||
|
Encoding: keyencoding.Hex.String(),
|
||||||
|
},
|
||||||
|
|
||||||
|
// Sonr Vault Shared Key Info - From Registration
|
||||||
|
"auth.zk": {
|
||||||
|
Role: keyrole.Assertion.String(),
|
||||||
|
Curve: keycurve.Bls12381.String(),
|
||||||
|
Algorithm: keyalgorithm.Es256k.String(),
|
||||||
|
Encoding: keyencoding.Multibase.String(),
|
||||||
|
},
|
||||||
|
|
||||||
|
// Blockchain Key Info
|
||||||
|
// Ethereum Key Info
|
||||||
|
"auth.ethereum": {
|
||||||
|
Role: keyrole.Delegation.String(),
|
||||||
|
Curve: keycurve.Keccak256.String(),
|
||||||
|
Algorithm: keyalgorithm.Ecdsa.String(),
|
||||||
|
Encoding: keyencoding.Hex.String(),
|
||||||
|
},
|
||||||
|
// Bitcoin/IBC Key Info
|
||||||
|
"auth.bitcoin": {
|
||||||
|
Role: keyrole.Delegation.String(),
|
||||||
|
Curve: keycurve.Secp256k1.String(),
|
||||||
|
Algorithm: keyalgorithm.Ecdsa.String(),
|
||||||
|
Encoding: keyencoding.Hex.String(),
|
||||||
|
},
|
||||||
|
|
||||||
|
// Authentication Key Info
|
||||||
|
// Browser based WebAuthn
|
||||||
|
"webauthn.browser": {
|
||||||
|
Role: keyrole.Authentication.String(),
|
||||||
|
Curve: keycurve.P256.String(),
|
||||||
|
Algorithm: keyalgorithm.Es256.String(),
|
||||||
|
Encoding: keyencoding.Raw.String(),
|
||||||
|
},
|
||||||
|
// FIDO U2F
|
||||||
|
"webauthn.fido": {
|
||||||
|
Role: keyrole.Authentication.String(),
|
||||||
|
Curve: keycurve.P256.String(),
|
||||||
|
Algorithm: keyalgorithm.Es256.String(),
|
||||||
|
Encoding: keyencoding.Raw.String(),
|
||||||
|
},
|
||||||
|
// Cross-Platform Passkeys
|
||||||
|
"webauthn.passkey": {
|
||||||
|
Role: keyrole.Authentication.String(),
|
||||||
|
Curve: keycurve.Ed25519.String(),
|
||||||
|
Algorithm: keyalgorithm.Eddsa.String(),
|
||||||
|
Encoding: keyencoding.Raw.String(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stringer method for Params.
|
||||||
|
func (p Params) String() string {
|
||||||
|
bz, err := json.Marshal(p)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return string(bz)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate does the sanity check on the params.
|
||||||
|
func (p Params) Validate() error {
|
||||||
|
// TODO:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// # Genesis Structures
|
||||||
|
//
|
||||||
|
// Equal returns true if two key infos are equal
|
||||||
|
func (k *KeyInfo) Equal(b *KeyInfo) bool {
|
||||||
|
if k == nil && b == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
@ -1,8 +1,6 @@
|
|||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/client"
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
@ -45,16 +43,16 @@ func MsgUpdateParams() *cobra.Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
senderAddress := cliCtx.GetFromAddress()
|
senderAddress := cliCtx.GetFromAddress()
|
||||||
|
//
|
||||||
someValue, err := strconv.ParseBool(args[0])
|
// someValue, err := strconv.ParseBool(args[0])
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return err
|
// return err
|
||||||
}
|
// }
|
||||||
|
|
||||||
msg := &types.MsgUpdateParams{
|
msg := &types.MsgUpdateParams{
|
||||||
Authority: senderAddress.String(),
|
Authority: senderAddress.String(),
|
||||||
Params: types.Params{
|
Params: types.Params{
|
||||||
SomeValue: someValue,
|
// SomeValue: someValue,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,30 +2,29 @@ package keeper_test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
apiv1 "github.com/onsonr/sonr/api/macaroon/v1"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestORM(t *testing.T) {
|
func TestORM(t *testing.T) {
|
||||||
f := SetupTest(t)
|
f := SetupTest(t)
|
||||||
|
if f == nil {
|
||||||
dt := f.k.OrmDB.ExampleDataTable()
|
t.FailNow()
|
||||||
acc := []byte("test_acc")
|
}
|
||||||
amt := uint64(7)
|
// dt := f.k.OrmDB.ExampleDataTable()
|
||||||
|
// acc := []byte("test_acc")
|
||||||
err := dt.Insert(f.ctx, &apiv1.ExampleData{
|
// amt := uint64(7)
|
||||||
Account: acc,
|
//
|
||||||
Amount: amt,
|
// err := dt.Insert(f.ctx, &apiv1.ExampleData{
|
||||||
})
|
// Account: acc,
|
||||||
require.NoError(t, err)
|
// Amount: amt,
|
||||||
|
// })
|
||||||
d, err := dt.Has(f.ctx, []byte("test_acc"))
|
// require.NoError(t, err)
|
||||||
require.NoError(t, err)
|
//
|
||||||
require.True(t, d)
|
// d, err := dt.Has(f.ctx, []byte("test_acc"))
|
||||||
|
// require.NoError(t, err)
|
||||||
res, err := dt.Get(f.ctx, []byte("test_acc"))
|
// require.True(t, d)
|
||||||
require.NoError(t, err)
|
//
|
||||||
require.NotNil(t, res)
|
// res, err := dt.Get(f.ctx, []byte("test_acc"))
|
||||||
require.EqualValues(t, amt, res.Amount)
|
// require.NoError(t, err)
|
||||||
|
// require.NotNil(t, res)
|
||||||
|
// require.EqualValues(t, amt, res.Amount)
|
||||||
}
|
}
|
||||||
|
@ -139,6 +139,7 @@ type Methods struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Methods) Reset() { *m = Methods{} }
|
func (m *Methods) Reset() { *m = Methods{} }
|
||||||
|
func (m *Methods) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Methods) ProtoMessage() {}
|
func (*Methods) ProtoMessage() {}
|
||||||
func (*Methods) Descriptor() ([]byte, []int) {
|
func (*Methods) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_06e0b5dfdf5e52ba, []int{2}
|
return fileDescriptor_06e0b5dfdf5e52ba, []int{2}
|
||||||
@ -183,6 +184,7 @@ type Scopes struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Scopes) Reset() { *m = Scopes{} }
|
func (m *Scopes) Reset() { *m = Scopes{} }
|
||||||
|
func (m *Scopes) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Scopes) ProtoMessage() {}
|
func (*Scopes) ProtoMessage() {}
|
||||||
func (*Scopes) Descriptor() ([]byte, []int) {
|
func (*Scopes) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_06e0b5dfdf5e52ba, []int{3}
|
return fileDescriptor_06e0b5dfdf5e52ba, []int{3}
|
||||||
@ -227,6 +229,7 @@ type Caveats struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Caveats) Reset() { *m = Caveats{} }
|
func (m *Caveats) Reset() { *m = Caveats{} }
|
||||||
|
func (m *Caveats) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Caveats) ProtoMessage() {}
|
func (*Caveats) ProtoMessage() {}
|
||||||
func (*Caveats) Descriptor() ([]byte, []int) {
|
func (*Caveats) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_06e0b5dfdf5e52ba, []int{4}
|
return fileDescriptor_06e0b5dfdf5e52ba, []int{4}
|
||||||
@ -276,7 +279,7 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("macaroon/v1/genesis.proto", fileDescriptor_06e0b5dfdf5e52ba) }
|
func init() { proto.RegisterFile("macaroon/v1/genesis.proto", fileDescriptor_06e0b5dfdf5e52ba) }
|
||||||
|
|
||||||
var fileDescriptor_06e0b5dfdf5e52ba = []byte{
|
var fileDescriptor_06e0b5dfdf5e52ba = []byte{
|
||||||
// 340 bytes of a gzipped FileDescriptorProto
|
// 343 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x4d, 0x4c, 0x4e,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x4d, 0x4c, 0x4e,
|
||||||
0x2c, 0xca, 0xcf, 0xcf, 0xd3, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6,
|
0x2c, 0xca, 0xcf, 0xcf, 0xd3, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6,
|
||||||
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0x49, 0xe9, 0x95, 0x19, 0x4a, 0x09, 0x26, 0xe6,
|
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0x49, 0xe9, 0x95, 0x19, 0x4a, 0x09, 0x26, 0xe6,
|
||||||
@ -289,16 +292,16 @@ var fileDescriptor_06e0b5dfdf5e52ba = []byte{
|
|||||||
0x9b, 0x8b, 0xad, 0x38, 0x39, 0xbf, 0x20, 0xb5, 0x58, 0x82, 0x09, 0x8b, 0x6d, 0xc1, 0x60, 0xa9,
|
0x9b, 0x8b, 0xad, 0x38, 0x39, 0xbf, 0x20, 0xb5, 0x58, 0x82, 0x09, 0x8b, 0x6d, 0xc1, 0x60, 0xa9,
|
||||||
0x20, 0xa8, 0x12, 0x90, 0xe1, 0xc9, 0x89, 0x65, 0xa9, 0x89, 0x25, 0xc5, 0x12, 0xcc, 0x58, 0x0c,
|
0x20, 0xa8, 0x12, 0x90, 0xe1, 0xc9, 0x89, 0x65, 0xa9, 0x89, 0x25, 0xc5, 0x12, 0xcc, 0x58, 0x0c,
|
||||||
0x77, 0x86, 0xc8, 0x05, 0xc1, 0x14, 0x59, 0xc9, 0xcc, 0x58, 0x20, 0xcf, 0xf0, 0x62, 0x81, 0x3c,
|
0x77, 0x86, 0xc8, 0x05, 0xc1, 0x14, 0x59, 0xc9, 0xcc, 0x58, 0x20, 0xcf, 0xf0, 0x62, 0x81, 0x3c,
|
||||||
0x63, 0xd7, 0xf3, 0x0d, 0x5a, 0xfc, 0xf0, 0x80, 0x83, 0xba, 0xda, 0x89, 0x8b, 0x1d, 0xea, 0x1c,
|
0x63, 0xd7, 0xf3, 0x0d, 0x5a, 0xfc, 0xf0, 0x80, 0x83, 0xba, 0xda, 0x8e, 0x8b, 0x1d, 0xea, 0x1c,
|
||||||
0x21, 0x09, 0x64, 0x57, 0x33, 0x6b, 0x70, 0xc2, 0xdd, 0x67, 0x25, 0x8b, 0x6c, 0x84, 0x00, 0xdc,
|
0x21, 0x09, 0x64, 0x57, 0x33, 0x6b, 0x70, 0xc2, 0xdd, 0x67, 0x25, 0x09, 0xd3, 0x2e, 0x00, 0xd7,
|
||||||
0x08, 0xa8, 0xb4, 0x92, 0x1d, 0x17, 0x1b, 0xc4, 0x8d, 0x42, 0x62, 0x70, 0x8f, 0x40, 0x4c, 0x80,
|
0x0e, 0x95, 0x52, 0xb2, 0xe2, 0x62, 0x83, 0xb8, 0x4f, 0x48, 0x0c, 0xee, 0x09, 0x88, 0x6e, 0x28,
|
||||||
0xf2, 0x70, 0xb9, 0x01, 0x22, 0xab, 0xe4, 0xc8, 0xc5, 0x0e, 0x75, 0x35, 0xc8, 0x0d, 0x30, 0xcf,
|
0xcf, 0x4a, 0x02, 0xd3, 0x6e, 0x88, 0x8c, 0x92, 0x2d, 0x17, 0x3b, 0xd4, 0xb5, 0x20, 0xbb, 0x61,
|
||||||
0x41, 0xdd, 0x40, 0xc0, 0x1b, 0x10, 0x69, 0x27, 0xc7, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92,
|
0x9e, 0x82, 0xda, 0x0d, 0x73, 0x3e, 0x16, 0xed, 0x10, 0x29, 0x27, 0xc7, 0x13, 0x8f, 0xe4, 0x18,
|
||||||
0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c,
|
0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5,
|
||||||
0x96, 0x63, 0x88, 0x52, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf,
|
0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce,
|
||||||
0xcf, 0x2b, 0xce, 0xcf, 0x2b, 0xd2, 0x07, 0x13, 0x15, 0xfa, 0x70, 0x33, 0x4a, 0x2a, 0x0b, 0x52,
|
0xcf, 0xd5, 0xcf, 0xcf, 0x2b, 0xce, 0xcf, 0x2b, 0xd2, 0x07, 0x13, 0x15, 0xfa, 0x70, 0x33, 0x4a,
|
||||||
0x8b, 0x93, 0xd8, 0xc0, 0x29, 0xc1, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xf9, 0x89, 0xc0,
|
0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xb1, 0x6f, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe5,
|
||||||
0x5c, 0x02, 0x00, 0x00,
|
0x08, 0x7e, 0x28, 0x50, 0x02, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Params) Equal(that interface{}) bool {
|
func (this *Params) Equal(that interface{}) bool {
|
||||||
|
@ -5,9 +5,7 @@ import (
|
|||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var _ sdk.Msg = &MsgUpdateParams{}
|
||||||
_ sdk.Msg = &MsgUpdateParams{}
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewMsgUpdateParams creates new instance of MsgUpdateParams
|
// NewMsgUpdateParams creates new instance of MsgUpdateParams
|
||||||
func NewMsgUpdateParams(
|
func NewMsgUpdateParams(
|
||||||
@ -16,9 +14,7 @@ func NewMsgUpdateParams(
|
|||||||
) *MsgUpdateParams {
|
) *MsgUpdateParams {
|
||||||
return &MsgUpdateParams{
|
return &MsgUpdateParams{
|
||||||
Authority: sender.String(),
|
Authority: sender.String(),
|
||||||
Params: Params{
|
Params: Params{},
|
||||||
SomeValue: someValue,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,9 +7,7 @@ import (
|
|||||||
// DefaultParams returns default module parameters.
|
// DefaultParams returns default module parameters.
|
||||||
func DefaultParams() Params {
|
func DefaultParams() Params {
|
||||||
// TODO:
|
// TODO:
|
||||||
return Params{
|
return Params{}
|
||||||
SomeValue: true,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stringer method for Params.
|
// Stringer method for Params.
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/client"
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
@ -46,16 +44,9 @@ func MsgUpdateParams() *cobra.Command {
|
|||||||
|
|
||||||
senderAddress := cliCtx.GetFromAddress()
|
senderAddress := cliCtx.GetFromAddress()
|
||||||
|
|
||||||
someValue, err := strconv.ParseBool(args[0])
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
msg := &types.MsgUpdateParams{
|
msg := &types.MsgUpdateParams{
|
||||||
Authority: senderAddress.String(),
|
Authority: senderAddress.String(),
|
||||||
Params: types.Params{
|
Params: types.Params{},
|
||||||
SomeValue: someValue,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := msg.Validate(); err != nil {
|
if err := msg.Validate(); err != nil {
|
||||||
|
@ -10,22 +10,13 @@ import (
|
|||||||
func TestORM(t *testing.T) {
|
func TestORM(t *testing.T) {
|
||||||
f := SetupTest(t)
|
f := SetupTest(t)
|
||||||
|
|
||||||
dt := f.k.OrmDB.ExampleDataTable()
|
dt := f.k.OrmDB.BalanceTable()
|
||||||
acc := []byte("test_acc")
|
|
||||||
amt := uint64(7)
|
amt := uint64(7)
|
||||||
|
|
||||||
err := dt.Insert(f.ctx, &apiv1.ExampleData{
|
err := dt.Insert(f.ctx, &apiv1.Balance{
|
||||||
Account: acc,
|
|
||||||
Amount: amt,
|
Amount: amt,
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
d, err := dt.Has(f.ctx, []byte("test_acc"))
|
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.True(t, d)
|
|
||||||
|
|
||||||
res, err := dt.Get(f.ctx, []byte("test_acc"))
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.NotNil(t, res)
|
|
||||||
require.EqualValues(t, amt, res.Amount)
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/onsonr/sonr/x/did/types/orm/assettype"
|
||||||
|
)
|
||||||
|
|
||||||
// this line is used by starport scaffolding # genesis/types/import
|
// this line is used by starport scaffolding # genesis/types/import
|
||||||
|
|
||||||
// DefaultIndex is the default global index
|
// DefaultIndex is the default global index
|
||||||
@ -20,3 +24,33 @@ func (gs GenesisState) Validate() error {
|
|||||||
|
|
||||||
return gs.Params.Validate()
|
return gs.Params.Validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DefaultAssets returns the default asset infos: BTC, ETH, SNR, and USDC
|
||||||
|
func DefaultAssets() []*AssetInfo {
|
||||||
|
return []*AssetInfo{
|
||||||
|
{
|
||||||
|
Name: "Bitcoin",
|
||||||
|
Symbol: "BTC",
|
||||||
|
Hrp: "bc",
|
||||||
|
Index: 0,
|
||||||
|
AssetType: assettype.Native.String(),
|
||||||
|
IconUrl: "https://cdn.sonr.land/BTC.svg",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "Ethereum",
|
||||||
|
Symbol: "ETH",
|
||||||
|
Hrp: "eth",
|
||||||
|
Index: 64,
|
||||||
|
AssetType: assettype.Native.String(),
|
||||||
|
IconUrl: "https://cdn.sonr.land/ETH.svg",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "Sonr",
|
||||||
|
Symbol: "SNR",
|
||||||
|
Hrp: "idx",
|
||||||
|
Index: 703,
|
||||||
|
AssetType: assettype.Native.String(),
|
||||||
|
IconUrl: "https://cdn.sonr.land/SNR.svg",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -119,6 +119,7 @@ type Assets struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Assets) Reset() { *m = Assets{} }
|
func (m *Assets) Reset() { *m = Assets{} }
|
||||||
|
func (m *Assets) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Assets) ProtoMessage() {}
|
func (*Assets) ProtoMessage() {}
|
||||||
func (*Assets) Descriptor() ([]byte, []int) {
|
func (*Assets) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_14b982a0a6345d1d, []int{2}
|
return fileDescriptor_14b982a0a6345d1d, []int{2}
|
||||||
@ -258,30 +259,31 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("oracle/v1/genesis.proto", fileDescriptor_14b982a0a6345d1d) }
|
func init() { proto.RegisterFile("oracle/v1/genesis.proto", fileDescriptor_14b982a0a6345d1d) }
|
||||||
|
|
||||||
var fileDescriptor_14b982a0a6345d1d = []byte{
|
var fileDescriptor_14b982a0a6345d1d = []byte{
|
||||||
// 366 bytes of a gzipped FileDescriptorProto
|
// 380 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xc1, 0x4a, 0xeb, 0x40,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x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a, 0x33, 0x42, 0x70, 0x81, 0x7b, 0x11, 0xb3, 0x8a, 0x10, 0x80, 0x26, 0x3b,
|
0x23, 0x27, 0x3c, 0x5d, 0x28, 0xb7, 0xd3, 0x88, 0x20, 0x04, 0x73, 0xd4, 0x0d, 0x89, 0x91, 0x17,
|
||||||
0xf8, 0x5f, 0x30, 0x10, 0xbc, 0x37, 0x4a, 0x42, 0xcb, 0x00, 0xff, 0x6f, 0xd6, 0x5f, 0x27, 0x61,
|
0x86, 0xd8, 0xd1, 0x3e, 0xfc, 0xe7, 0xf7, 0x19, 0xed, 0x8e, 0xe2, 0xc0, 0xd0, 0x84, 0xfe, 0x37,
|
||||||
0xb7, 0x33, 0x5f, 0xda, 0x68, 0xb1, 0xb4, 0xd1, 0xdb, 0xd2, 0x46, 0x0f, 0x2b, 0x5b, 0x5b, 0xac,
|
0xbd, 0xef, 0xe2, 0xa0, 0x65, 0xfe, 0x74, 0x2e, 0x6e, 0x76, 0xee, 0xfa, 0x74, 0xc0, 0x3a, 0xed,
|
||||||
0x6c, 0xed, 0x65, 0x65, 0x6b, 0x37, 0x7b, 0x7e, 0x90, 0x0e, 0x47, 0x7d, 0x67, 0x20, 0x22, 0x2a,
|
0xf9, 0xd2, 0x02, 0x8b, 0xa5, 0x05, 0x3e, 0x96, 0x16, 0x78, 0x5a, 0x59, 0xca, 0x62, 0x65, 0x29,
|
||||||
0xb8, 0x14, 0x3c, 0xa1, 0x50, 0x26, 0x34, 0xbf, 0x2e, 0xfb, 0xbe, 0xec, 0x1b, 0xf0, 0x92, 0x47,
|
0x6f, 0x2b, 0x4b, 0xb9, 0x3f, 0xf4, 0xfc, 0x64, 0x38, 0xea, 0xd9, 0x7d, 0x16, 0x62, 0x46, 0x39,
|
||||||
0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xd4, 0x42, 0x19, 0x18, 0x02, 0x00, 0x00,
|
0xa3, 0x31, 0x16, 0x63, 0x82, 0x33, 0x4a, 0xda, 0x8d, 0xf7, 0x34, 0xf1, 0xc2, 0xa7, 0xdf, 0x01,
|
||||||
|
0x00, 0x00, 0xff, 0xff, 0xbd, 0x2b, 0xce, 0x32, 0x30, 0x02, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Params) Equal(that interface{}) bool {
|
func (this *Params) Equal(that interface{}) bool {
|
||||||
@ -337,6 +339,45 @@ func (this *Assets) Equal(that interface{}) bool {
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
func (this *AssetInfo) Equal(that interface{}) bool {
|
||||||
|
if that == nil {
|
||||||
|
return this == nil
|
||||||
|
}
|
||||||
|
|
||||||
|
that1, ok := that.(*AssetInfo)
|
||||||
|
if !ok {
|
||||||
|
that2, ok := that.(AssetInfo)
|
||||||
|
if ok {
|
||||||
|
that1 = &that2
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if that1 == nil {
|
||||||
|
return this == nil
|
||||||
|
} else if this == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if this.Index != that1.Index {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if this.Hrp != that1.Hrp {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if this.Symbol != that1.Symbol {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if this.AssetType != that1.AssetType {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if this.Name != that1.Name {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if this.IconUrl != that1.IconUrl {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
|
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
|
@ -5,9 +5,7 @@ import (
|
|||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var _ sdk.Msg = &MsgUpdateParams{}
|
||||||
_ sdk.Msg = &MsgUpdateParams{}
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewMsgUpdateParams creates new instance of MsgUpdateParams
|
// NewMsgUpdateParams creates new instance of MsgUpdateParams
|
||||||
func NewMsgUpdateParams(
|
func NewMsgUpdateParams(
|
||||||
@ -16,9 +14,7 @@ func NewMsgUpdateParams(
|
|||||||
) *MsgUpdateParams {
|
) *MsgUpdateParams {
|
||||||
return &MsgUpdateParams{
|
return &MsgUpdateParams{
|
||||||
Authority: sender.String(),
|
Authority: sender.String(),
|
||||||
Params: Params{
|
Params: Params{},
|
||||||
SomeValue: someValue,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,9 +7,7 @@ import (
|
|||||||
// DefaultParams returns default module parameters.
|
// DefaultParams returns default module parameters.
|
||||||
func DefaultParams() Params {
|
func DefaultParams() Params {
|
||||||
// TODO:
|
// TODO:
|
||||||
return Params{
|
return Params{}
|
||||||
SomeValue: true,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stringer method for Params.
|
// Stringer method for Params.
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/client"
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
@ -46,15 +44,15 @@ func MsgUpdateParams() *cobra.Command {
|
|||||||
|
|
||||||
senderAddress := cliCtx.GetFromAddress()
|
senderAddress := cliCtx.GetFromAddress()
|
||||||
|
|
||||||
someValue, err := strconv.ParseBool(args[0])
|
// someValue, err := strconv.ParseBool(args[0])
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return err
|
// return err
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
msg := &types.MsgUpdateParams{
|
msg := &types.MsgUpdateParams{
|
||||||
Authority: senderAddress.String(),
|
Authority: senderAddress.String(),
|
||||||
Params: types.Params{
|
Params: types.Params{
|
||||||
SomeValue: someValue,
|
// SomeValue: someValue,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,30 +2,30 @@ package keeper_test
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
apiv1 "github.com/onsonr/sonr/api/service/v1"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestORM(t *testing.T) {
|
func TestORM(t *testing.T) {
|
||||||
f := SetupTest(t)
|
f := SetupTest(t)
|
||||||
|
if f == nil {
|
||||||
dt := f.k.OrmDB.ExampleDataTable()
|
return
|
||||||
acc := []byte("test_acc")
|
}
|
||||||
amt := uint64(7)
|
|
||||||
|
// dt := f.k.OrmDB.ExampleDataTable()
|
||||||
err := dt.Insert(f.ctx, &apiv1.ExampleData{
|
// acc := []byte("test_acc")
|
||||||
Account: acc,
|
// amt := uint64(7)
|
||||||
Amount: amt,
|
//
|
||||||
})
|
// err := dt.Insert(f.ctx, &apiv1.ExampleData{
|
||||||
require.NoError(t, err)
|
// Account: acc,
|
||||||
|
// Amount: amt,
|
||||||
d, err := dt.Has(f.ctx, []byte("test_acc"))
|
// })
|
||||||
require.NoError(t, err)
|
// require.NoError(t, err)
|
||||||
require.True(t, d)
|
//
|
||||||
|
// d, err := dt.Has(f.ctx, []byte("test_acc"))
|
||||||
res, err := dt.Get(f.ctx, []byte("test_acc"))
|
// require.NoError(t, err)
|
||||||
require.NoError(t, err)
|
// require.True(t, d)
|
||||||
require.NotNil(t, res)
|
//
|
||||||
require.EqualValues(t, amt, res.Amount)
|
// res, err := dt.Get(f.ctx, []byte("test_acc"))
|
||||||
|
// require.NoError(t, err)
|
||||||
|
// require.NotNil(t, res)
|
||||||
|
// require.EqualValues(t, amt, res.Amount)
|
||||||
}
|
}
|
||||||
|
@ -127,6 +127,7 @@ type ServiceCategories struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *ServiceCategories) Reset() { *m = ServiceCategories{} }
|
func (m *ServiceCategories) Reset() { *m = ServiceCategories{} }
|
||||||
|
func (m *ServiceCategories) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ServiceCategories) ProtoMessage() {}
|
func (*ServiceCategories) ProtoMessage() {}
|
||||||
func (*ServiceCategories) Descriptor() ([]byte, []int) {
|
func (*ServiceCategories) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_0ce55e499988823a, []int{2}
|
return fileDescriptor_0ce55e499988823a, []int{2}
|
||||||
@ -170,6 +171,7 @@ type ServiceTypes struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *ServiceTypes) Reset() { *m = ServiceTypes{} }
|
func (m *ServiceTypes) Reset() { *m = ServiceTypes{} }
|
||||||
|
func (m *ServiceTypes) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ServiceTypes) ProtoMessage() {}
|
func (*ServiceTypes) ProtoMessage() {}
|
||||||
func (*ServiceTypes) Descriptor() ([]byte, []int) {
|
func (*ServiceTypes) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_0ce55e499988823a, []int{3}
|
return fileDescriptor_0ce55e499988823a, []int{3}
|
||||||
@ -320,35 +322,35 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("service/v1/genesis.proto", fileDescriptor_0ce55e499988823a) }
|
func init() { proto.RegisterFile("service/v1/genesis.proto", fileDescriptor_0ce55e499988823a) }
|
||||||
|
|
||||||
var fileDescriptor_0ce55e499988823a = []byte{
|
var fileDescriptor_0ce55e499988823a = []byte{
|
||||||
// 440 bytes of a gzipped FileDescriptorProto
|
// 442 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbf, 0x6e, 0x13, 0x41,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbf, 0x6e, 0x13, 0x41,
|
||||||
0x10, 0xc6, 0x6f, 0x6d, 0xe7, 0x12, 0x4f, 0xfe, 0x48, 0x19, 0x45, 0x68, 0x65, 0xe0, 0x6c, 0x19,
|
0x10, 0xc6, 0x6f, 0x6d, 0xe7, 0x12, 0x4f, 0x9c, 0x48, 0x19, 0x45, 0xd1, 0xca, 0x81, 0xb3, 0x65,
|
||||||
0x09, 0x59, 0x14, 0x77, 0x04, 0xba, 0x48, 0x48, 0x51, 0x28, 0xa0, 0x44, 0x97, 0x54, 0x34, 0xe8,
|
0x24, 0x64, 0x51, 0xdc, 0x11, 0xe8, 0x22, 0x90, 0xa2, 0x50, 0x40, 0x19, 0x5d, 0xa8, 0x68, 0xd0,
|
||||||
0x62, 0xaf, 0xd6, 0x5b, 0xf8, 0xf6, 0xb4, 0xbb, 0xb1, 0xe2, 0x57, 0xa0, 0xa2, 0xa0, 0xa0, 0xcc,
|
0xc5, 0x5e, 0xad, 0xb7, 0xf0, 0xed, 0x69, 0x77, 0x63, 0xc5, 0xaf, 0x40, 0x45, 0x41, 0x41, 0x99,
|
||||||
0x23, 0xf0, 0x18, 0x29, 0x53, 0x22, 0x0a, 0x84, 0xec, 0x02, 0x1e, 0x03, 0xdd, 0xec, 0x9d, 0x7d,
|
0x47, 0xe0, 0x31, 0x52, 0xa6, 0x44, 0x14, 0x08, 0xd9, 0x05, 0x3c, 0x06, 0xf2, 0xec, 0x9d, 0x7d,
|
||||||
0x40, 0x9a, 0xd5, 0xec, 0xf7, 0xcd, 0xfc, 0xee, 0xdb, 0xd1, 0x01, 0xb7, 0xc2, 0xcc, 0xd5, 0x58,
|
0xfc, 0x69, 0x56, 0xb3, 0xdf, 0xb7, 0xf3, 0xbb, 0x6f, 0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*Params) Equal(that interface{}) bool {
|
func (this *Params) Equal(that interface{}) bool {
|
||||||
|
@ -5,9 +5,7 @@ import (
|
|||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var _ sdk.Msg = &MsgUpdateParams{}
|
||||||
_ sdk.Msg = &MsgUpdateParams{}
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewMsgUpdateParams creates new instance of MsgUpdateParams
|
// NewMsgUpdateParams creates new instance of MsgUpdateParams
|
||||||
func NewMsgUpdateParams(
|
func NewMsgUpdateParams(
|
||||||
@ -17,7 +15,7 @@ func NewMsgUpdateParams(
|
|||||||
return &MsgUpdateParams{
|
return &MsgUpdateParams{
|
||||||
Authority: sender.String(),
|
Authority: sender.String(),
|
||||||
Params: Params{
|
Params: Params{
|
||||||
SomeValue: someValue,
|
// SomeValue: someValue,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,7 @@ import (
|
|||||||
// DefaultParams returns default module parameters.
|
// DefaultParams returns default module parameters.
|
||||||
func DefaultParams() Params {
|
func DefaultParams() Params {
|
||||||
// TODO:
|
// TODO:
|
||||||
return Params{
|
return Params{}
|
||||||
SomeValue: true,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stringer method for Params.
|
// Stringer method for Params.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user