mirror of
https://github.com/status-im/whisper.git
synced 2025-02-22 15:38:18 +00:00
Add comments to the methods
This commit is contained in:
parent
75752de2e0
commit
c40e8cfd37
@ -240,6 +240,8 @@ func (api *PublicWhisperAPI) Post(ctx context.Context, req NewMessage) (hexutil.
|
|||||||
return api.PostRaw(ctx, env, req.TargetPeer)
|
return api.PostRaw(ctx, env, req.TargetPeer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CreateEnvelope creates, signs and returns an envelope.
|
||||||
|
// returns the envelope in case of success
|
||||||
func (api *PublicWhisperAPI) CreateEnvelope(ctx context.Context, req NewMessage) (*Envelope, error) {
|
func (api *PublicWhisperAPI) CreateEnvelope(ctx context.Context, req NewMessage) (*Envelope, error) {
|
||||||
var (
|
var (
|
||||||
symKeyGiven = len(req.SymKeyID) > 0
|
symKeyGiven = len(req.SymKeyID) > 0
|
||||||
@ -307,6 +309,8 @@ func (api *PublicWhisperAPI) CreateEnvelope(ctx context.Context, req NewMessage)
|
|||||||
return env, nil
|
return env, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PostRaw posts the existing envelope to the network
|
||||||
|
// returns the hash of the message on success
|
||||||
func (api *PublicWhisperAPI) PostRaw(ctx context.Context, env *Envelope, targetPeer string) (hexutil.Bytes, error) {
|
func (api *PublicWhisperAPI) PostRaw(ctx context.Context, env *Envelope, targetPeer string) (hexutil.Bytes, error) {
|
||||||
var result []byte
|
var result []byte
|
||||||
// send to specific node (skip PoW check)
|
// send to specific node (skip PoW check)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user