common

package
v0.6.25-beta.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthInfo        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowInfo          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupInfo = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	// This field represents the unique account address associated with the user. It is typically a hash or an encoded public key, depending on the underlying blockchain or network.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// This field contains the human-readable name associated with the account. It is used for easier identification and management of the account by the user.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// This field stores the Decentralized Identifier (DID) of the user, which is a unique, resolvable, and cryptographically verifiable identifier. DIDs are used to enable secure and decentralized identity management.
	Did string `protobuf:"bytes,3,opt,name=did,proto3" json:"did,omitempty"`
	// This field specifies the type of the cryptocurrency or token associated with the account. It is used to differentiate between various cryptocurrencies or tokens that the user may hold in their wallet.
	CoinType string `protobuf:"bytes,4,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"`
	// This field represents the identifier of the blockchain or network that the account is associated with. Chain IDs are used to distinguish between different blockchains or networks, such as Ethereum, Cosmos, or Filecoin.
	ChainId string `protobuf:"bytes,5,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// This field stores the base64 encoded public key of the account, which is used for cryptographic operations such as signing and verifying transactions. The public key is derived from the user's private key and is an essential part of the account's security.
	PublicKey string `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// This field stores the type of the public key. It is used to differentiate between various public key types, such as secp256k1, ed25519, and sr25519.
	Type string `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"`
}

Account represents a user's account on a blockchain or network. It contains the user's address, name, DID, and other information that is used to identify and manage the account.

func (*AccountInfo) Descriptor

func (*AccountInfo) Descriptor() ([]byte, []int)

func (*AccountInfo) GetAddress

func (m *AccountInfo) GetAddress() string

func (*AccountInfo) GetChainId added in v0.6.16

func (m *AccountInfo) GetChainId() string

func (*AccountInfo) GetCoinType added in v0.6.16

func (m *AccountInfo) GetCoinType() string

func (*AccountInfo) GetDid added in v0.6.16

func (m *AccountInfo) GetDid() string

func (*AccountInfo) GetName added in v0.6.16

func (m *AccountInfo) GetName() string

func (*AccountInfo) GetPublicKey added in v0.6.16

func (m *AccountInfo) GetPublicKey() string

func (*AccountInfo) GetType added in v0.6.16

func (m *AccountInfo) GetType() string

func (*AccountInfo) Marshal

func (m *AccountInfo) Marshal() (dAtA []byte, err error)

func (*AccountInfo) MarshalTo

func (m *AccountInfo) MarshalTo(dAtA []byte) (int, error)

func (*AccountInfo) MarshalToSizedBuffer

func (m *AccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccountInfo) ProtoMessage

func (*AccountInfo) ProtoMessage()

func (*AccountInfo) Reset

func (m *AccountInfo) Reset()

func (*AccountInfo) Size

func (m *AccountInfo) Size() (n int)

func (*AccountInfo) String

func (m *AccountInfo) String() string

func (*AccountInfo) Unmarshal

func (m *AccountInfo) Unmarshal(dAtA []byte) error

func (*AccountInfo) XXX_DiscardUnknown

func (m *AccountInfo) XXX_DiscardUnknown()

func (*AccountInfo) XXX_Marshal

func (m *AccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountInfo) XXX_Merge

func (m *AccountInfo) XXX_Merge(src proto.Message)

func (*AccountInfo) XXX_Size

func (m *AccountInfo) XXX_Size() int

func (*AccountInfo) XXX_Unmarshal

func (m *AccountInfo) XXX_Unmarshal(b []byte) error

type PeerInfo

type PeerInfo struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	PeerId    string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	Multiaddr string `protobuf:"bytes,4,opt,name=multiaddr,proto3" json:"multiaddr,omitempty"`
}

Basic Info Sent to Peers to Establish Connections

func (*PeerInfo) Descriptor

func (*PeerInfo) Descriptor() ([]byte, []int)

func (*PeerInfo) GetId

func (m *PeerInfo) GetId() string

func (*PeerInfo) GetMultiaddr

func (m *PeerInfo) GetMultiaddr() string

func (*PeerInfo) GetName

func (m *PeerInfo) GetName() string

func (*PeerInfo) GetPeerId

func (m *PeerInfo) GetPeerId() string

func (*PeerInfo) Marshal

func (m *PeerInfo) Marshal() (dAtA []byte, err error)

func (*PeerInfo) MarshalTo

func (m *PeerInfo) MarshalTo(dAtA []byte) (int, error)

func (*PeerInfo) MarshalToSizedBuffer

func (m *PeerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) Reset

func (m *PeerInfo) Reset()

func (*PeerInfo) Size

func (m *PeerInfo) Size() (n int)

func (*PeerInfo) String

func (m *PeerInfo) String() string

func (*PeerInfo) Unmarshal

func (m *PeerInfo) Unmarshal(dAtA []byte) error

func (*PeerInfo) XXX_DiscardUnknown

func (m *PeerInfo) XXX_DiscardUnknown()

func (*PeerInfo) XXX_Marshal

func (m *PeerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerInfo) XXX_Merge

func (m *PeerInfo) XXX_Merge(src proto.Message)

func (*PeerInfo) XXX_Size

func (m *PeerInfo) XXX_Size() int

func (*PeerInfo) XXX_Unmarshal

func (m *PeerInfo) XXX_Unmarshal(b []byte) error

type WalletInfo

type WalletInfo struct {
	// Controller is the associated Sonr address.
	Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"`
	// DiscoverPaths is a list of all known hardened coin type paths.
	DiscoveredPaths []int32 `protobuf:"varint,2,rep,packed,name=discovered_paths,json=discoveredPaths,proto3" json:"discovered_paths,omitempty"`
	// Algorithm is the algorithm of the wallet. CMP is the default.
	Algorithm string `protobuf:"bytes,3,opt,name=algorithm,proto3" json:"algorithm,omitempty"`
	// CreatedAt is the time the wallet was created.
	CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// LastUpdated is the last time the wallet was updated.
	LastUpdated int64 `protobuf:"varint,5,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
}

func (*WalletInfo) Descriptor

func (*WalletInfo) Descriptor() ([]byte, []int)

func (*WalletInfo) GetAlgorithm

func (m *WalletInfo) GetAlgorithm() string

func (*WalletInfo) GetController

func (m *WalletInfo) GetController() string

func (*WalletInfo) GetCreatedAt

func (m *WalletInfo) GetCreatedAt() int64

func (*WalletInfo) GetDiscoveredPaths

func (m *WalletInfo) GetDiscoveredPaths() []int32

func (*WalletInfo) GetLastUpdated

func (m *WalletInfo) GetLastUpdated() int64

func (*WalletInfo) Marshal

func (m *WalletInfo) Marshal() (dAtA []byte, err error)

func (*WalletInfo) MarshalTo

func (m *WalletInfo) MarshalTo(dAtA []byte) (int, error)

func (*WalletInfo) MarshalToSizedBuffer

func (m *WalletInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WalletInfo) ProtoMessage

func (*WalletInfo) ProtoMessage()

func (*WalletInfo) Reset

func (m *WalletInfo) Reset()

func (*WalletInfo) Size

func (m *WalletInfo) Size() (n int)

func (*WalletInfo) String

func (m *WalletInfo) String() string

func (*WalletInfo) Unmarshal

func (m *WalletInfo) Unmarshal(dAtA []byte) error

func (*WalletInfo) XXX_DiscardUnknown

func (m *WalletInfo) XXX_DiscardUnknown()

func (*WalletInfo) XXX_Marshal

func (m *WalletInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WalletInfo) XXX_Merge

func (m *WalletInfo) XXX_Merge(src proto.Message)

func (*WalletInfo) XXX_Size

func (m *WalletInfo) XXX_Size() int

func (*WalletInfo) XXX_Unmarshal

func (m *WalletInfo) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL