Documentation ¶
Index ¶
- type Client
- func (c *Client) Broadcast(key *keyring.Record, msgs []sdk.Msg, gasAdjust float64) (*sdk.TxResponse, error)
- func (c *Client) BroadcastAndConfirm(logger *logger.Logger, key *keyring.Record, msgs []sdk.Msg) (res *sdk.TxResponse, err error)
- func (c *Client) GetTxFromTxHash(txHash string) (txRes *sdk.TxResponse, err error)
- func (c *Client) QueryAccount(key *keyring.Record) (client.Account, error)
- func (c *Client) QueryDE(address string, offset uint64, limit uint64) (*DEResponse, error)
- func (c *Client) QueryGroup(groupID tss.GroupID) (*GroupResult, error)
- func (c *Client) QueryMember(address string) (*bandtsstypes.QueryMemberResponse, error)
- func (c *Client) QueryPendingGroups(address string) (*tsstypes.QueryPendingGroupsResponse, error)
- func (c *Client) QueryPendingSignings(address string) (*tsstypes.QueryPendingSigningsResponse, error)
- func (c *Client) QuerySigning(signingID tss.SigningID) (*SigningResponse, error)
- func (c *Client) Stop() error
- func (c *Client) Subscribe(subscriber, query string, outCapacity ...int) (out <-chan ctypes.ResultEvent, err error)
- type DEResponse
- type GroupResult
- func (gr GroupResult) GetEncryptedSecretShare(senderID, receiverID tss.MemberID) (tss.EncSecretShare, error)
- func (gr GroupResult) GetMemberID(address string) (tss.MemberID, error)
- func (gr GroupResult) GetRound1Info(mid tss.MemberID) (types.Round1Info, error)
- func (gr GroupResult) GetRound2Info(mid tss.MemberID) (types.Round2Info, error)
- func (gr GroupResult) IsMember(address string) bool
- type SigningResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(cylinderCtx *cylinderctx.Context) (*Client, error)
New creates a new instance of the Client. It returns the created Client instance and an error if the initialization fails.
func (*Client) Broadcast ¶
func (c *Client) Broadcast(key *keyring.Record, msgs []sdk.Msg, gasAdjust float64) (*sdk.TxResponse, error)
Broadcast signs and broadcasts the provided messages using the given key. It adjusts the gas according to the gasAdjust parameter and returns the transaction response or an error.
func (*Client) BroadcastAndConfirm ¶
func (c *Client) BroadcastAndConfirm( logger *logger.Logger, key *keyring.Record, msgs []sdk.Msg, ) (res *sdk.TxResponse, err error)
BroadcastAndConfirm broadcasts and confirms the messages by signing and submitting them using the provided key. It returns the transaction response or an error. It retries broadcasting and confirming up to maxTry times.
func (*Client) GetTxFromTxHash ¶
func (c *Client) GetTxFromTxHash(txHash string) (txRes *sdk.TxResponse, err error)
GetTxFromTxHash retrieves the transaction response for the given transaction hash. It waits for the transaction to be committed and returns the transaction response or an error if it exceeds timeout.
func (*Client) QueryAccount ¶
QueryAccount queries the account information associated with the given key. It returns the account or an error if the account retrieval fails.
func (*Client) QueryDE ¶
QueryDE queries the DE information with the given address. It returns the de response or an error.
func (*Client) QueryGroup ¶
func (c *Client) QueryGroup(groupID tss.GroupID) (*GroupResult, error)
QueryGroup queries the group information with the given group ID. It returns the group response or an error.
func (*Client) QueryMember ¶
func (c *Client) QueryMember(address string) (*bandtsstypes.QueryMemberResponse, error)
QueryMember queries the member information of the given address. It returns the member information on current and incoming group or an error.
func (*Client) QueryPendingGroups ¶
func (c *Client) QueryPendingGroups(address string) (*tsstypes.QueryPendingGroupsResponse, error)
QueryPendingGroups queries the all pending groups with the given address. It returns the QueryPendingSignsResponse or an error.
func (*Client) QueryPendingSignings ¶
func (c *Client) QueryPendingSignings(address string) (*tsstypes.QueryPendingSigningsResponse, error)
QueryPendingSignings queries the all pending signings with the given address. It returns the QueryPendingSignsResponse or an error.
func (*Client) QuerySigning ¶
func (c *Client) QuerySigning(signingID tss.SigningID) (*SigningResponse, error)
QuerySigning queries the signing information with the given signing ID. It returns the signing response or an error.
func (*Client) Stop ¶
Stop stops the client by terminating the underlying RPC client connection. It returns an error if the client cannot be stopped.
func (*Client) Subscribe ¶
func (c *Client) Subscribe(subscriber, query string, outCapacity ...int) (out <-chan ctypes.ResultEvent, err error)
Subscribe subscribes to an event query with the provided subscriber and query string. It returns a channel of ResultEvent to receive the subscribed events and an error if any.
type DEResponse ¶
type DEResponse struct {
types.QueryDEResponse
}
DEResponse wraps the types.QueryDEResponse to provide additional helper methods.
func NewDEResponse ¶
func NewDEResponse(der *types.QueryDEResponse) *DEResponse
NewDEResponse creates a new instance of DEResponse.
func (DEResponse) GetRemaining ¶
func (der DEResponse) GetRemaining() uint64
GetRemaining retrieves the remaining DE in the blockchain for the address.
type GroupResult ¶
type GroupResult struct {
types.GroupResult
}
GroupResult wraps the types.GroupResult to provide additional helper methods.
func NewGroupResult ¶
func NewGroupResult(gr *types.QueryGroupResponse) *GroupResult
NewGroupResult creates a new instance of GroupResponse.
func (GroupResult) GetEncryptedSecretShare ¶
func (gr GroupResult) GetEncryptedSecretShare(senderID, receiverID tss.MemberID) (tss.EncSecretShare, error)
GetEncryptedSecretShare retrieves the encrypted secret share from member (Sender) to member (Receiver).
func (GroupResult) GetMemberID ¶
func (gr GroupResult) GetMemberID(address string) (tss.MemberID, error)
GetMemberID returns member's id of the address in the group.
func (GroupResult) GetRound1Info ¶
func (gr GroupResult) GetRound1Info(mid tss.MemberID) (types.Round1Info, error)
GetRound1Info retrieves the Round1Commitment for the specified member ID.
func (GroupResult) GetRound2Info ¶
func (gr GroupResult) GetRound2Info(mid tss.MemberID) (types.Round2Info, error)
GetRound2Info retrieves the Round1Commitment for the specified member ID.
func (GroupResult) IsMember ¶
func (gr GroupResult) IsMember(address string) bool
IsMember returns boolean to show if the address is the member in the group.
type SigningResponse ¶
type SigningResponse struct {
types.QuerySigningResponse
}
SigningResponse wraps the types.QuerySigningResponse to provide additional helper methods.
func NewSigningResponse ¶
func NewSigningResponse(gr *types.QuerySigningResponse) *SigningResponse
NewSigningResponse creates a new instance of SigningResponse.
func (SigningResponse) GetAssignedMember ¶
func (sr SigningResponse) GetAssignedMember(address string) (types.AssignedMember, error)
GetAssignedMember returns assigned member of the specific address
func (SigningResponse) GetMemberIDs ¶
func (sr SigningResponse) GetMemberIDs() []tss.MemberID
GetMemberIDs returns all assigned member's id of the assigned members