mirror of
https://github.com/status-im/status-go.git
synced 2026-08-31 17:11:23 +00:00
30 lines
910 B
Go
30 lines
910 B
Go
package messaging
|
|
|
|
import (
|
|
"context"
|
|
"crypto/ecdsa"
|
|
|
|
"github.com/status-im/status-go/pkg/messaging/layers/transport"
|
|
"github.com/status-im/status-go/pkg/messaging/types"
|
|
)
|
|
|
|
func (a *API) SendPublic(ctx context.Context, params types.SendPublicParams) error {
|
|
return a.core.controller.Sender().SendPublic(ctx, params)
|
|
}
|
|
|
|
func (a *API) SendPrivate(ctx context.Context, params types.SendPrivateParams) error {
|
|
return a.core.controller.Sender().SendPrivate(ctx, params)
|
|
}
|
|
|
|
func (a *API) SendPrivateHashRatchetKeys(ctx context.Context, recipients []*ecdsa.PublicKey, groupID []byte) error {
|
|
return a.core.controller.Sender().SendPrivateHashRatchetKeys(ctx, recipients, groupID)
|
|
}
|
|
|
|
func (a *API) GetEphemeralKey() (*ecdsa.PrivateKey, error) {
|
|
return a.core.controller.Processor().GetEphemeralKey()
|
|
}
|
|
|
|
func ContactCodeTopic(publicKey *ecdsa.PublicKey) string {
|
|
return transport.ContactCodeTopic(publicKey)
|
|
}
|