mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
feature/refactor types (#1101)
- **docs: remove discord badge from README** - **fix: ensure go version is up-to-date** - **<no value>** - **refactor: update import paths for blocks to components** - **feat: add Hero component template** - **fix: update footer logo to svg** - **feat: add Query/Sign and Query/Verify RPC methods** - **refactor: rename Keyshares to KsVal in did/v1/state.proto**
This commit is contained in:
Binary file not shown.
@@ -8,7 +8,8 @@ import (
|
||||
|
||||
"github.com/a-h/templ"
|
||||
"github.com/ipfs/boxo/files"
|
||||
"github.com/onsonr/sonr/app/config/dwn"
|
||||
|
||||
"github.com/onsonr/sonr/pkg/dwn"
|
||||
)
|
||||
|
||||
//go:embed app.wasm
|
||||
|
||||
+98
-48
@@ -24,8 +24,9 @@ var _ = math.Inf
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type DWN struct {
|
||||
Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
||||
Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"`
|
||||
Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DWN) Reset() { *m = DWN{} }
|
||||
@@ -61,20 +62,27 @@ func (m *DWN) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_DWN proto.InternalMessageInfo
|
||||
|
||||
func (m *DWN) GetAccount() []byte {
|
||||
func (m *DWN) GetId() uint64 {
|
||||
if m != nil {
|
||||
return m.Account
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DWN) GetAmount() uint64 {
|
||||
if m != nil {
|
||||
return m.Amount
|
||||
return m.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *DWN) GetAlias() string {
|
||||
if m != nil {
|
||||
return m.Alias
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DWN) GetCid() string {
|
||||
if m != nil {
|
||||
return m.Cid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*DWN)(nil), "vault.v1.DWN")
|
||||
}
|
||||
@@ -82,20 +90,21 @@ func init() {
|
||||
func init() { proto.RegisterFile("vault/v1/state.proto", fileDescriptor_2ad3e71ba384142e) }
|
||||
|
||||
var fileDescriptor_2ad3e71ba384142e = []byte{
|
||||
// 198 bytes of a gzipped FileDescriptorProto
|
||||
// 221 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x4b, 0x2c, 0xcd,
|
||||
0x29, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0x2e, 0x49, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9,
|
||||
0x17, 0xe2, 0x00, 0x8b, 0xea, 0x95, 0x19, 0x4a, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb,
|
||||
0xe7, 0x17, 0xe5, 0x82, 0x14, 0xe5, 0x17, 0xe5, 0x42, 0x94, 0x28, 0x45, 0x70, 0x31, 0xbb, 0x84,
|
||||
0xfb, 0x09, 0x49, 0x70, 0xb1, 0x27, 0x26, 0x27, 0xe7, 0x97, 0xe6, 0x95, 0x48, 0x30, 0x2a, 0x30,
|
||||
0x6a, 0xf0, 0x04, 0xc1, 0xb8, 0x42, 0x62, 0x5c, 0x6c, 0x89, 0xb9, 0x60, 0x09, 0x26, 0x05, 0x46,
|
||||
0x0d, 0x96, 0x20, 0x28, 0xcf, 0x4a, 0xfe, 0xd3, 0xbc, 0xcb, 0x7d, 0xcc, 0x92, 0x5c, 0x9c, 0x70,
|
||||
0x9d, 0x42, 0x5c, 0x30, 0xa5, 0x02, 0x8c, 0x12, 0x8c, 0x4e, 0x76, 0x27, 0x1e, 0xc9, 0x31, 0x5e,
|
||||
0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31,
|
||||
0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f,
|
||||
0xab, 0x9f, 0x9f, 0x57, 0x9c, 0x9f, 0x57, 0xa4, 0x0f, 0x26, 0x2a, 0xf4, 0x21, 0xbe, 0x28, 0xa9,
|
||||
0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x3b, 0xd0, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xab, 0xea,
|
||||
0x40, 0xd9, 0xdb, 0x00, 0x00, 0x00,
|
||||
0xe7, 0x17, 0xe5, 0x82, 0x14, 0xe5, 0x17, 0xe5, 0x42, 0x94, 0x28, 0xa5, 0x73, 0x31, 0xbb, 0x84,
|
||||
0xfb, 0x09, 0xf1, 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x04, 0x31, 0x65,
|
||||
0xa6, 0x08, 0x89, 0x70, 0xb1, 0x26, 0xe6, 0x64, 0x26, 0x16, 0x4b, 0x30, 0x29, 0x30, 0x6a, 0x70,
|
||||
0x06, 0x41, 0x38, 0x42, 0x02, 0x5c, 0xcc, 0xc9, 0x99, 0x29, 0x12, 0xcc, 0x60, 0x31, 0x10, 0xd3,
|
||||
0x4a, 0xe3, 0xd3, 0xbc, 0xcb, 0x7d, 0xcc, 0x4a, 0x5c, 0x6c, 0x20, 0xfd, 0x02, 0x8c, 0x42, 0xdc,
|
||||
0x50, 0x7d, 0x02, 0x8c, 0x12, 0x8c, 0x42, 0x9c, 0x60, 0xe5, 0x02, 0x4c, 0x12, 0x8c, 0x12, 0x8c,
|
||||
0x4e, 0x76, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84,
|
||||
0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x92, 0x9e, 0x59,
|
||||
0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9f, 0x57, 0x9c, 0x9f, 0x57, 0xa4, 0x0f,
|
||||
0x26, 0x2a, 0xf4, 0x21, 0x9e, 0x2a, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xbb, 0xd7, 0x18,
|
||||
0x10, 0x00, 0x00, 0xff, 0xff, 0xf5, 0xfb, 0x2a, 0xb2, 0xea, 0x00, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *DWN) Marshal() (dAtA []byte, err error) {
|
||||
@@ -118,17 +127,24 @@ func (m *DWN) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Amount != 0 {
|
||||
i = encodeVarintState(dAtA, i, uint64(m.Amount))
|
||||
if len(m.Cid) > 0 {
|
||||
i -= len(m.Cid)
|
||||
copy(dAtA[i:], m.Cid)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Cid)))
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Account) > 0 {
|
||||
i -= len(m.Account)
|
||||
copy(dAtA[i:], m.Account)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Account)))
|
||||
if len(m.Alias) > 0 {
|
||||
i -= len(m.Alias)
|
||||
copy(dAtA[i:], m.Alias)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Alias)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.Id != 0 {
|
||||
i = encodeVarintState(dAtA, i, uint64(m.Id))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
@@ -150,12 +166,16 @@ func (m *DWN) Size() (n int) {
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Account)
|
||||
if m.Id != 0 {
|
||||
n += 1 + sovState(uint64(m.Id))
|
||||
}
|
||||
l = len(m.Alias)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
if m.Amount != 0 {
|
||||
n += 1 + sovState(uint64(m.Amount))
|
||||
l = len(m.Cid)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
@@ -196,10 +216,10 @@ func (m *DWN) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType)
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
m.Id = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
@@ -209,31 +229,48 @@ func (m *DWN) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
m.Id |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Account = append(m.Account[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Account == nil {
|
||||
m.Account = []byte{}
|
||||
}
|
||||
m.Alias = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType)
|
||||
}
|
||||
m.Amount = 0
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
@@ -243,11 +280,24 @@ func (m *DWN) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Amount |= uint64(b&0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Cid = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipState(dAtA[iNdEx:])
|
||||
|
||||
@@ -3,7 +3,7 @@ package types
|
||||
import (
|
||||
"github.com/ipfs/boxo/files"
|
||||
|
||||
"github.com/onsonr/sonr/app/config/dwn"
|
||||
"github.com/onsonr/sonr/pkg/dwn"
|
||||
vault "github.com/onsonr/sonr/x/vault/types/internal"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user