Documentation ¶
Index ¶
- Constants
- func MakeHeader(method string) (jsonrpc.Header, error)
- func MakeId() (json.Number, error)
- func MakeKey() ([]byte, error)
- func MakeTopic() string
- func ReadMessage(msg string, aead cipher.AEAD, priv []byte) (*jsonrpc.Header, []byte, error)
- func WithDialerDebug(debug bool) dialerOption
- func WithDialerOptions(d *websocket.DialOptions) dialerOption
- func WithDialerPrivateKey(sk ed25519.PrivateKey) dialerOption
- func WithDialerUrl(url string) dialerOption
- type AlgoSignParams
- type AlgoSignRequest
- type AlgoSignTxn
- type AlgoSignTxnResponse
- type Client
- type ClientOption
- type Conn
- type Dialer
- type FetchMessagesResponse
- type Irn
- func (irn *Irn) Close() error
- func (irn *Irn) FetchMessages(ctx context.Context, reqId json.Number, topic string) (*FetchMessagesResponse, error)
- func (irn *Irn) Publish(ctx context.Context, params IrnPublishRequestParams) (*jsonrpc.Header, []byte, error)
- func (irn *Irn) Request(ctx context.Context, id json.Number, method string, params any) (*jsonrpc.Header, []byte, error)
- func (irn *Irn) Subscribe(ctx context.Context, reqId json.Number, topic string) (string, error)
- func (irn *Irn) Subscriptions() <-chan IrnSubscription
- func (irn *Irn) Unsubscribe(ctx context.Context, reqId json.Number, topic string, subId string) error
- type IrnFetchMessagesRequestParams
- type IrnFetchMessagesResponseResult
- type IrnPublishRequestParams
- type IrnPublishRequestParamsHeader
- type IrnReceivedMessage
- type IrnRequestFunc
- type IrnSubscribeRequestParams
- type IrnSubscribeResponse
- type IrnSubscription
- type IrnSubscriptionParams
- type IrnUnsubscribeRequestParams
- type MakeConnFunc
- type Message
- type Metadata
- type Namespace
- type Peer
- type Relay
- type Server
- type ServerOption
- type SessionExtendRequest
- type SessionProposeRequest
- type SessionProposeRequestParams
- type SessionProposeResponse
- type SessionProposeResponseParams
- type SessionRequestAlgoSignTxn
- type SessionRequestAlgoSignTxnParams
- type SessionRequestRequestHeader
- type SessionRequestRequestHeaderParams
- type SessionSettleRequest
- type SessionSettleRequestParams
- type SettleNamespace
- type Signer
- type Uri
- type UriHandler
Constants ¶
View Source
const ( MAINNET = "algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k" TESTNET = "algorand:SGO1GKSzyE7IEPItTxCByw9x8FmnrCDe" BETANET = "algorand:mFgazF-2uRS1tMiL9dsj01hJGySEmPN2" )
View Source
const (
ALGO_SIGNTXN = "algo_signTxn"
)
Variables ¶
This section is empty.
Functions ¶
func ReadMessage ¶
func WithDialerDebug ¶
func WithDialerDebug(debug bool) dialerOption
func WithDialerOptions ¶
func WithDialerOptions(d *websocket.DialOptions) dialerOption
func WithDialerPrivateKey ¶
func WithDialerPrivateKey(sk ed25519.PrivateKey) dialerOption
func WithDialerUrl ¶
func WithDialerUrl(url string) dialerOption
Types ¶
type AlgoSignParams ¶
type AlgoSignParams struct {
TxnBase64 string `json:"txn"`
}
type AlgoSignRequest ¶
type AlgoSignRequest struct {
Params [][]AlgoSignParams `json:"params"`
}
type AlgoSignTxn ¶
type AlgoSignTxn struct { jsonrpc.Header Params [][]AlgoSignParams `json:"params"` }
type AlgoSignTxnResponse ¶
type ClientOption ¶
type ClientOption func(*clientConfig)
func WithClientDebug ¶
func WithClientDebug(debug bool) ClientOption
func WithClientMetadata ¶
func WithClientMetadata(metadata Metadata) ClientOption
func WithClientSigner ¶
func WithClientSigner(s Signer) ClientOption
type FetchMessagesResponse ¶
type FetchMessagesResponse jsonrpc.Response[IrnFetchMessagesResponseResult]
func UnmarshalFetchMessagesResponse ¶
func UnmarshalFetchMessagesResponse(bs []byte) (FetchMessagesResponse, error)
type Irn ¶
type Irn struct {
// contains filtered or unexported fields
}
func (*Irn) FetchMessages ¶
func (*Irn) Subscriptions ¶
func (irn *Irn) Subscriptions() <-chan IrnSubscription
type IrnFetchMessagesRequestParams ¶
type IrnFetchMessagesRequestParams struct {
Topic string `json:"topic"`
}
type IrnFetchMessagesResponseResult ¶
type IrnFetchMessagesResponseResult struct { Messages []IrnReceivedMessage HasMode bool `json:"hasMore"` }
type IrnPublishRequestParams ¶
type IrnPublishRequestParams struct { IrnPublishRequestParamsHeader Message string `json:"message"` }
type IrnReceivedMessage ¶
type IrnSubscribeRequestParams ¶
type IrnSubscribeRequestParams struct {
Topic string `json:"topic"`
}
type IrnSubscribeResponse ¶
type IrnSubscription ¶
type IrnSubscription struct { jsonrpc.Header Params IrnSubscriptionParams `json:"params"` }
type IrnSubscriptionParams ¶
type IrnSubscriptionParams struct { Id string `json:"id"` Data IrnReceivedMessage `json:"data"` }
type MakeConnFunc ¶
type ServerOption ¶
type ServerOption func(*serverConfig)
func WithServerDebug ¶
func WithServerDebug(debug bool) ServerOption
func WithServerMetadata ¶
func WithServerMetadata(m Metadata) ServerOption
func WithServerUriHandler ¶
func WithServerUriHandler(h UriHandler) ServerOption
type SessionExtendRequest ¶
type SessionProposeRequest ¶
type SessionProposeRequest struct { jsonrpc.Header Params SessionProposeRequestParams `json:"params"` }
type SessionProposeResponse ¶
type SessionProposeResponse jsonrpc.Response[SessionProposeResponseParams]
type SessionRequestAlgoSignTxn ¶
type SessionRequestAlgoSignTxn struct { jsonrpc.Header Params SessionRequestAlgoSignTxnParams `json:"params"` }
type SessionRequestAlgoSignTxnParams ¶
type SessionRequestAlgoSignTxnParams struct { Request AlgoSignTxn `json:"request"` ChainId string `json:"chainId"` }
type SessionRequestRequestHeader ¶
type SessionRequestRequestHeader struct { jsonrpc.Header Params SessionRequestRequestHeaderParams `json:"params"` }
type SessionSettleRequest ¶
type SessionSettleRequest struct { jsonrpc.Header Params SessionSettleRequestParams `json:"params"` }
type SessionSettleRequestParams ¶
type SessionSettleRequestParams struct { Relay `json:"relay"` Controller Peer `json:"controller"` Namespaces map[string]SettleNamespace `json:"namespaces"` Expiry int64 `json:"expiry"` }
type SettleNamespace ¶
type Uri ¶
func MakeUriFrom ¶
type UriHandler ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.