Documentation ¶
Index ¶
- Constants
- Variables
- func AuthorizeToken(ctx context.Context, clientID, clientSecret string, code string, ...) (string, string, error)
- func BuildMintCollectibleMemo(collectionID string, token int64, metaHash []byte) string
- func CancelCollectibleRequest(ctx context.Context, accessToken, reqID string) error
- func CodeChallenge(b []byte) (verifier, challange string)
- func DecodeResponse(resp *resty.Response) ([]byte, error)
- func DecryptAttachment(data, keys, digest []byte) ([]byte, error)
- func DecryptMessageCategory(category string) string
- func DecryptMessageData(data []byte, sessionID string, private ed25519.PrivateKey) ([]byte, error)
- func EncryptMessageCategory(category string) string
- func EncryptMessageData(data []byte, sessions []*Session, private ed25519.PrivateKey) ([]byte, error)
- func GenerateCollectibleTokenID(collectionID string, token int64) string
- func GenerateEd25519Key() ed25519.PrivateKey
- func GenerateSessionChecksum(sessions []*Session) string
- func GetClient() *http.Client
- func GetRestyClient() *resty.Client
- func IsEncryptedMessageCategory(category string) bool
- func IsEncryptedMessageSupported(sessions []*Session) bool
- func IsErrorCodes(err error, codes ...int) bool
- func IsPlainMessageCategory(category string) bool
- func MakeCollectibleTransaction(ctx context.Context, accessToken string, txVer uint8, ...) (*mixinnet.Transaction, error)
- func MetaHash(content []byte) []byte
- func RandomCodeChallenge() (verifier, challange string)
- func RandomPin() string
- func RandomTraceID() string
- func Request(ctx context.Context) *resty.Request
- func RequestIdFromContext(ctx context.Context) string
- func SafeSignTransaction(tx *mixinnet.Transaction, spendKey mixinnet.Key, views []mixinnet.Key, ...) error
- func SignRaw(method, uri string, body []byte) string
- func SignRequest(r *http.Request) string
- func SignResponse(r *resty.Response) string
- func UniqueConversationID(userID, recipientID string) string
- func UnmarshalResponse(resp *resty.Response, v interface{}) (err error)
- func UploadAttachment(ctx context.Context, attachment *Attachment, file []byte) error
- func UploadAttachmentTo(ctx context.Context, uploadURL string, file []byte) error
- func UseApiHost(host string)
- func UseAutoFasterRoute()
- func UseBlazeHost(host string)
- func UseBlazeURL(rawURL string)
- func ValidatePinPattern(pin string) error
- func WithRequestID(ctx context.Context, requestID string) context.Context
- func WithSigner(ctx context.Context, s Signer) context.Context
- func WithVerifier(ctx context.Context, v Verifier) context.Context
- func WrapErrWithRequestID(err error, id string) error
- type AckQueue
- type AcknowledgementRequest
- type Address
- type App
- type AppButtonGroupMessage
- type AppButtonMessage
- type AppCardMessage
- type Asset
- func ReadAsset(ctx context.Context, accessToken, assetID string) (*Asset, error)
- func ReadAssets(ctx context.Context, accessToken string) ([]*Asset, error)
- func ReadMultisigAssets(ctx context.Context) ([]*Asset, error)
- func ReadNetworkAsset(ctx context.Context, assetID string) (*Asset, error)
- func ReadNetworkAssetsBySymbol(ctx context.Context, symbol string) ([]*Asset, error)
- func ReadTopNetworkAssets(ctx context.Context) ([]*Asset, error)
- type Attachment
- type AttachmentMessageEncrypt
- type AudioMessage
- type Authorization
- type BlazeListenFunc
- type BlazeListener
- type BlazeMessage
- type BlazeOption
- type Circle
- type CircleItem
- type Client
- func (c *Client) AddFriend(ctx context.Context, userID, remark string) (*User, error)
- func (c *Client) AddParticipants(ctx context.Context, conversationID string, users ...string) (*Conversation, error)
- func (c *Client) AdminParticipants(ctx context.Context, conversationID string, users ...string) (*Conversation, error)
- func (c *Client) AppendOutputsToInput(ctx context.Context, b *TransactionBuilder, outputs []*TransactionOutput) error
- func (c *Client) Authorize(ctx context.Context, authorizationID string, scopes []string, pin string) (*Authorization, error)
- func (c *Client) BatchReadGhostKeys(ctx context.Context, inputs []*GhostInput) ([]*GhostKeys, error)
- func (c *Client) BlockUser(ctx context.Context, userID string) (*User, error)
- func (c *Client) CancelCollectibleRequest(ctx context.Context, reqID string) error
- func (c *Client) CancelMultisig(ctx context.Context, reqID string) error
- func (c *Client) CreateAddress(ctx context.Context, input CreateAddressInput, pin string) (*Address, error)
- func (c *Client) CreateAttachment(ctx context.Context) (*Attachment, error)
- func (c *Client) CreateCircle(ctx context.Context, args CreateCircleParams) (*Circle, error)
- func (c *Client) CreateCollectibleRequest(ctx context.Context, action, raw string) (*CollectibleRequest, error)
- func (c *Client) CreateContactConversation(ctx context.Context, userID string) (*Conversation, error)
- func (c *Client) CreateConversation(ctx context.Context, input *CreateConversationInput) (*Conversation, error)
- func (c *Client) CreateGroupConversation(ctx context.Context, conversationID, name string, participants []*Participant) (*Conversation, error)
- func (c *Client) CreateMultisig(ctx context.Context, action, raw string) (*MultisigRequest, error)
- func (c *Client) CreateUser(ctx context.Context, key crypto.Signer, fullname string) (*User, *Keystore, error)
- func (c *Client) DeleteAddress(ctx context.Context, addressID, pin string) error
- func (c *Client) DeleteCircle(ctx context.Context, circleID string) error
- func (c *Client) EncryptMessageRequest(req *MessageRequest, sessions []*Session) error
- func (c *Client) EncryptTipPin(key mixinnet.Key, action string, params ...string) string
- func (c *Client) FavoriteApp(ctx context.Context, appID string) (*FavoriteApp, error)
- func (c *Client) FetchSessions(ctx context.Context, ids []string) ([]*Session, error)
- func (c *Client) Get(ctx context.Context, uri string, params map[string]string, resp interface{}) error
- func (c *Client) GetCode(ctx context.Context, codeString string) (*Code, error)
- func (c *Client) ListBlockingUsers(ctx context.Context) ([]*User, error)
- func (c *Client) ListCircleItems(ctx context.Context, args ListCircleItemsParams) ([]*CircleItem, error)
- func (c *Client) ListCircles(ctx context.Context) ([]*Circle, error)
- func (c *Client) ListMultisigOutputs(ctx context.Context, opt ListMultisigOutputsOption) ([]*MultisigUTXO, error)
- func (c *Client) LoopBlaze(ctx context.Context, listener BlazeListener, opts ...BlazeOption) error
- func (c *Client) MakeCollectibleTransaction(ctx context.Context, txVer uint8, output *CollectibleOutput, ...) (*mixinnet.Transaction, error)
- func (c *Client) MakeTransaction(ctx context.Context, b *TransactionBuilder, outputs []*TransactionOutput) (*mixinnet.Transaction, error)
- func (c *Client) ManageCircle(ctx context.Context, args ManageCircleParams) (*CircleItem, error)
- func (c *Client) ManageConversation(ctx context.Context, conversationID, action string, ...) (*Conversation, error)
- func (c *Client) ModifyPin(ctx context.Context, pin, newPin string) error
- func (c *Client) ModifyProfile(ctx context.Context, fullname, avatarBase64 string) (*User, error)
- func (c *Client) Post(ctx context.Context, uri string, body interface{}, resp interface{}) error
- func (c *Client) ReadAddress(ctx context.Context, addressID string) (*Address, error)
- func (c *Client) ReadAddresses(ctx context.Context, assetID string) ([]*Address, error)
- func (c *Client) ReadApp(ctx context.Context, appID string) (*App, error)
- func (c *Client) ReadAsset(ctx context.Context, assetID string) (*Asset, error)
- func (c *Client) ReadAssetFee(ctx context.Context, assetID string) (decimal.Decimal, error)
- func (c *Client) ReadAssets(ctx context.Context) ([]*Asset, error)
- func (c *Client) ReadCircle(ctx context.Context, circleID string) (*Circle, error)
- func (c *Client) ReadCollectibleCollection(ctx context.Context, collectionID string) (*CollectibleCollection, error)
- func (c *Client) ReadCollectibleOutputs(ctx context.Context, members []string, threshold uint8, state string, ...) ([]*CollectibleOutput, error)
- func (c *Client) ReadCollectiblesToken(ctx context.Context, id string) (*CollectibleToken, error)
- func (c *Client) ReadConversation(ctx context.Context, conversationID string) (*Conversation, error)
- func (c *Client) ReadExchangeRates(ctx context.Context) ([]ExchangeRate, error)
- func (c *Client) ReadFavoriteApps(ctx context.Context, userID string) ([]*FavoriteApp, error)
- func (c *Client) ReadFiats(ctx context.Context) ([]Fiat, error)
- func (c *Client) ReadFriends(ctx context.Context) ([]*User, error)
- func (c *Client) ReadGhostKeys(ctx context.Context, receivers []string, index uint8) (*GhostKeys, error)
- func (c *Client) ReadMultisigOutput(ctx context.Context, id string) (*MultisigUTXO, error)
- func (c *Client) ReadMultisigOutputs(ctx context.Context, members []string, threshold uint8, offset time.Time, ...) ([]*MultisigUTXO, error)
- func (c *Client) ReadMultisigs(ctx context.Context, offset time.Time, limit int) ([]*MultisigUTXO, error)
- func (c *Client) ReadNetworkSnapshot(ctx context.Context, snapshotID string) (*Snapshot, error)
- func (c *Client) ReadNetworkSnapshots(ctx context.Context, assetID string, offset time.Time, order string, limit int) ([]*Snapshot, error)
- func (c *Client) ReadSafeAppSnapshots(ctx context.Context, assetID string, offset time.Time, order string, limit int) ([]*SafeSnapshot, error)
- func (c *Client) ReadSafeSnapshot(ctx context.Context, snapshotID string) (*SafeSnapshot, error)
- func (c *Client) ReadSafeSnapshots(ctx context.Context, assetID string, offset time.Time, order string, limit int) ([]*SafeSnapshot, error)
- func (c *Client) ReadSnapshot(ctx context.Context, snapshotID string) (*Snapshot, error)
- func (c *Client) ReadSnapshotByTraceID(ctx context.Context, traceID string) (*Snapshot, error)
- func (c *Client) ReadSnapshots(ctx context.Context, assetID string, offset time.Time, order string, limit int) ([]*Snapshot, error)
- func (c *Client) ReadSnapshotsWithOptions(ctx context.Context, offset time.Time, limit int, input ReadSnapshotsOptions) ([]*Snapshot, error)
- func (c *Client) ReadTransfer(ctx context.Context, traceID string) (*Snapshot, error)
- func (c *Client) ReadTurnServers(ctx context.Context) ([]*Turn, error)
- func (c *Client) ReadUser(ctx context.Context, userIdOrIdentityNumber string) (*User, error)
- func (c *Client) ReadUsers(ctx context.Context, ids ...string) ([]*User, error)
- func (c *Client) RemarkFriend(ctx context.Context, userID, remark string) (*User, error)
- func (c *Client) RemoveFriend(ctx context.Context, userID string) (*User, error)
- func (c *Client) RemoveParticipants(ctx context.Context, conversationID string, users ...string) (*Conversation, error)
- func (c *Client) Request(ctx context.Context) *resty.Request
- func (c *Client) RotateConversation(ctx context.Context, conversationID string) (*Conversation, error)
- func (c *Client) SafeCreateDepositEntries(ctx context.Context, receivers []string, threshold int, chain string) ([]*SafeDepositEntry, error)
- func (c *Client) SafeCreateGhostKeys(ctx context.Context, inputs []*GhostInput, senders ...string) ([]*GhostKeys, error)
- func (c *Client) SafeCreateMultisigRequest(ctx context.Context, input *SafeTransactionRequestInput) (*SafeMultisigRequest, error)
- func (c *Client) SafeCreateMultisigRequests(ctx context.Context, inputs []*SafeTransactionRequestInput) ([]*SafeMultisigRequest, error)
- func (c *Client) SafeCreateTransactionRequest(ctx context.Context, input *SafeTransactionRequestInput) (*SafeTransactionRequest, error)
- func (c *Client) SafeCreateTransactionRequests(ctx context.Context, inputs []*SafeTransactionRequestInput) ([]*SafeTransactionRequest, error)
- func (c *Client) SafeFetchAssets(ctx context.Context, assetIds []string) ([]*SafeAsset, error)
- func (c *Client) SafeListDeposits(ctx context.Context, entry *SafeDepositEntry, asset string, offset time.Time, ...) ([]*SafeDeposit, error)
- func (c *Client) SafeListUtxos(ctx context.Context, opt SafeListUtxoOption) ([]*SafeUtxo, error)
- func (c *Client) SafeMigrate(ctx context.Context, priv string, pin string) (*User, error)
- func (c *Client) SafeNotifySnapshot(ctx context.Context, receiverID string, hash mixinnet.Hash, index uint8) error
- func (c *Client) SafeReadAsset(ctx context.Context, assetID string) (*SafeAsset, error)
- func (c *Client) SafeReadAssets(ctx context.Context) ([]*SafeAsset, error)
- func (c *Client) SafeReadMultisigRequests(ctx context.Context, idOrHash string) (*SafeMultisigRequest, error)
- func (c *Client) SafeReadTransactionRequest(ctx context.Context, idOrHash string) (*SafeTransactionRequest, error)
- func (c *Client) SafeReadUtxo(ctx context.Context, id string) (*SafeUtxo, error)
- func (c *Client) SafeReadUtxoByHash(ctx context.Context, hash mixinnet.Hash, index uint8) (*SafeUtxo, error)
- func (c *Client) SafeSignMultisigRequest(ctx context.Context, input *SafeTransactionRequestInput) (*SafeMultisigRequest, error)
- func (c *Client) SafeSubmitTransactionRequest(ctx context.Context, input *SafeTransactionRequestInput) (*SafeTransactionRequest, error)
- func (c *Client) SafeSubmitTransactionRequests(ctx context.Context, inputs []*SafeTransactionRequestInput) ([]*SafeTransactionRequest, error)
- func (c *Client) SafeUnlockMultisigRequest(ctx context.Context, requestID string) (*SafeMultisigRequest, error)
- func (c *Client) SearchUser(ctx context.Context, identityNumberOrPhoneNumber string) (*User, error)
- func (c *Client) SendAcknowledgement(ctx context.Context, request *AcknowledgementRequest) error
- func (c *Client) SendAcknowledgements(ctx context.Context, requests []*AcknowledgementRequest) error
- func (c *Client) SendEncryptedMessages(ctx context.Context, messages []*MessageRequest) ([]*EncryptedMessageReceipt, error)
- func (c *Client) SendMessage(ctx context.Context, message *MessageRequest) error
- func (c *Client) SendMessages(ctx context.Context, messages []*MessageRequest) error
- func (c *Client) SendRawMessage(ctx context.Context, message json.RawMessage) error
- func (c *Client) SendRawMessages(ctx context.Context, messages []json.RawMessage) error
- func (c *Client) ShowAttachment(ctx context.Context, id string) (*Attachment, error)
- func (c *Client) SignCollectibleRequest(ctx context.Context, reqID, pin string) (*CollectibleRequest, error)
- func (c *Client) SignMultisig(ctx context.Context, reqID, pin string) (*MultisigRequest, error)
- func (c *Client) Transaction(ctx context.Context, in *TransferInput, pin string) (*RawTransaction, error)
- func (c *Client) Transfer(ctx context.Context, input *TransferInput, pin string) (*Snapshot, error)
- func (c *Client) TransferOwnership(ctx context.Context, newOwner, pin string) error
- func (c *Client) UnblockUser(ctx context.Context, userID string) (*User, error)
- func (c *Client) UnfavoriteApp(ctx context.Context, appID string) error
- func (c *Client) UnlockCollectibleRequest(ctx context.Context, reqID, pin string) error
- func (c *Client) UnlockMultisig(ctx context.Context, reqID, pin string) error
- func (c *Client) UpdateApp(ctx context.Context, appID string, req UpdateAppRequest) (*App, error)
- func (c *Client) UpdateCircle(ctx context.Context, args UpdateCircleParams) (*Circle, error)
- func (c *Client) UpdateConversation(ctx context.Context, conversationID string, input ConversationUpdate) (*Conversation, error)
- func (c *Client) UpdateConversationAnnouncement(ctx context.Context, conversationID, announcement string) (*Conversation, error)
- func (c *Client) UpdateProfile(ctx context.Context, input UserUpdate) (*User, error)
- func (c *Client) UpdateRelationship(ctx context.Context, req RelationshipRequest) (*User, error)
- func (c *Client) UserMe(ctx context.Context) (*User, error)
- func (c *Client) VerifyPayment(ctx context.Context, input TransferInput) (*Payment, error)
- func (c *Client) VerifyPin(ctx context.Context, pin string) error
- func (c *Client) Withdraw(ctx context.Context, input WithdrawInput, pin string) (*Snapshot, error)
- type Code
- type CodeType
- type CollectibleCollection
- type CollectibleOutput
- type CollectibleRequest
- type CollectibleToken
- type CollectibleTokenMeta
- type ContactMessage
- type Conversation
- type ConversationUpdate
- type CreateAddressInput
- type CreateCircleParams
- type CreateConversationInput
- type DataMessage
- type DepositEntry
- type EncryptedMessageReceipt
- type Error
- type ExchangeRate
- type ExternalTransaction
- type FavoriteApp
- type Fiat
- type GhostInput
- type GhostKeys
- type ImageMessage
- type Keystore
- type KeystoreAuth
- type ListCircleItemsParams
- type ListMultisigOutputsOption
- type LiveMessage
- type LocationMessage
- type ManageCircleParams
- type MessageLocker
- type MessageRequest
- type MessageView
- type MixAddress
- func MixAddressFromString(s string) (*MixAddress, error)
- func NewMainnetMixAddress(members []string, threshold byte) (*MixAddress, error)
- func NewMixAddress(members []string, threshold byte) (*MixAddress, error)
- func RequireNewMainnetMixAddress(members []string, threshold byte) *MixAddress
- func RequireNewMixAddress(members []string, threshold byte) *MixAddress
- type MultisigRequest
- type MultisigUTXO
- type NetworkAsset
- type NetworkChain
- type NetworkInfo
- type OauthKeystore
- type OauthKeystoreAuth
- func (o *OauthKeystoreAuth) EncryptPin(pin string) string
- func (o *OauthKeystoreAuth) SignToken(signature, requestID string, exp time.Duration) string
- func (o *OauthKeystoreAuth) SignTokenAt(signature, requestID string, at time.Time, exp time.Duration) string
- func (o *OauthKeystoreAuth) Verify(resp *resty.Response) error
- type Participant
- type Payment
- type RawTransaction
- type ReadSnapshotsOptions
- type RecallMessage
- type RecipientSession
- type RelationshipRequest
- type SafeAsset
- type SafeDeposit
- type SafeDepositEntry
- type SafeListUtxoOption
- type SafeMultisigRequest
- type SafeSnapshot
- type SafeSnapshotDeposit
- type SafeTransactionReceiver
- type SafeTransactionRequest
- type SafeTransactionRequestInput
- type SafeUtxo
- type SafeUtxoState
- type SendSchemeCategory
- type Session
- type Signer
- type Snapshot
- func ReadSnapshot(ctx context.Context, accessToken, snapshotID string) (*Snapshot, error)
- func ReadSnapshotByTraceID(ctx context.Context, accessToken, traceID string) (*Snapshot, error)
- func ReadSnapshots(ctx context.Context, accessToken string, assetID string, offset time.Time, ...) ([]*Snapshot, error)
- func ReadSnapshotsWithOptions(ctx context.Context, accessToken string, offset time.Time, limit int, ...) ([]*Snapshot, error)
- type StickerMessage
- type SystemConversationPayload
- type Ticker
- type TransactionBuilder
- type TransactionOutput
- type TranscriptMessage
- type TransferInput
- type TransferView
- type Turn
- type UpdateAppRequest
- type UpdateCircleParams
- type User
- type UserUpdate
- type Verifier
- type VideoMessage
- type WithdrawInput
Constants ¶
const ( MixAddressPrefix = "MIX" MixAddressVersion = byte(2) )
const ( ScopeProfileRead = "PROFILE:READ" ScopePhoneRead = "PHONE:READ" ScopeContactRead = "CONTACTS:READ" ScopeAssetsRead = "ASSETS:READ" ScopeSnapshotsRead = "SNAPSHOTS:READ" ScopeFull = "FULL" )
const ( CreateMessageAction = "CREATE_MESSAGE" AcknowledgeReceiptAction = "ACKNOWLEDGE_MESSAGE_RECEIPT" )
const ( CircleActionAdd = "ADD" CircleActionRemove = "REMOVE" CircleItemTypeUsers = "users" CircleItemTypeConversations = "conversations" )
const ( ConversationCategoryContact = "CONTACT" ConversationCategoryGroup = "GROUP" ParticipantActionCreate = "CREATE" ParticipantActionUpdate = "UPDATE" ParticipantActionAdd = "ADD" ParticipantActionRemove = "REMOVE" ParticipantActionJoin = "JOIN" ParticipantActionExit = "EXIT" ParticipantActionRole = "ROLE" ParticipantRoleOwner = "OWNER" ParticipantRoleAdmin = "ADMIN" ParticipantRoleMember = "" )
const ( DefaultApiHost = "https://api.mixin.one" DefaultBlazeHost = "blaze.mixin.one" ZeromeshApiHost = "https://mixin-api.zeromesh.net" ZeromeshBlazeHost = "mixin-blaze.zeromesh.net" EchoApiHost = "https://echo.yiplee.com" )
const ( EndpointNotFound = 404 InsufficientBalance = 20117 PinIncorrect = 20119 InsufficientFee = 20124 InvalidTraceID = 20125 InvalidReceivers = 20150 InvalidOutputKey = 2000001 InputLocked = 2000002 InvalidSignature = 2000003 )
mixin error codes https://developers.mixin.one/api/alpha-mixin-network/errors/
const ( // CollectibleOutputState CollectibleOutputStateUnspent = "unspent" CollectibleOutputStateSigned = "signed" CollectibleOutputStateSpent = "spent" // CollectibleRequestAction CollectibleRequestActionSign = "sign" CollectibleRequestActionUnlock = "unlock" // CollectibleRequestState CollectibleRequestStateInitial = "initial" CollectibleRequestStateSigned = "signed" )
const ( UTXOStateUnspent = "unspent" UTXOStateSigned = "signed" UTXOStateSpent = "spent" )
const ( MultisigActionSign = "sign" MultisigActionUnlock = "unlock" )
const ( MultisigStateInitial = "initial" MultisigStateSigned = "signed" )
const ( PaymentStatusPending = "pending" PaymentStatusPaid = "paid" )
const ( MessageCategoryPlainText = "PLAIN_TEXT" MessageCategoryPlainPost = "PLAIN_POST" MessageCategoryPlainImage = "PLAIN_IMAGE" MessageCategoryPlainAudio = "PLAIN_AUDIO" MessageCategoryPlainData = "PLAIN_DATA" MessageCategoryPlainSticker = "PLAIN_STICKER" MessageCategoryPlainLive = "PLAIN_LIVE" MessageCategoryPlainVideo = "PLAIN_VIDEO" MessageCategoryPlainContact = "PLAIN_CONTACT" MessageCategoryPlainTranscript = "PLAIN_TRANSCRIPT" MessageCategoryPlainLocation = "PLAIN_LOCATION" MessageCategoryAppCard = "APP_CARD" MessageCategoryAppButtonGroup = "APP_BUTTON_GROUP" MessageCategoryMessageRecall = "MESSAGE_RECALL" MessageCategorySystemConversation = "SYSTEM_CONVERSATION" MessageCategorySystemAccountSnapshot = "SYSTEM_ACCOUNT_SNAPSHOT" MessageCategorySystemSafeSnapshot = "SYSTEM_SAFE_SNAPSHOT" MessageStatusSent = "SENT" MessageStatusDelivered = "DELIVERED" MessageStatusRead = "READ" )
const ( EncryptedMessageReceiptStateSuccess = "SUCCESS" EncryptedMessageReceiptStateFailed = "FAILED" )
const ( RelationshipActionAdd = "ADD" RelationshipActionRemove = "Remove" RelationshipActionUpdate = "UPDATE" RelationshipActionBlock = "BLOCK" RelationshipActionUnblock = "UNBLOCK" )
const ( SessionPlatformIOS = "iOS" SessionPlatformAndroid = "Android" SessionPlatformDesktop = "Desktop" )
const ( TIPVerify = "TIP:VERIFY:" TIPAddressAdd = "TIP:ADDRESS:ADD:" TIPAddressRemove = "TIP:ADDRESS:REMOVE:" TIPUserDeactivate = "TIP:USER:DEACTIVATE:" TIPEmergencyContactCreate = "TIP:EMERGENCY:CONTACT:CREATE:" TIPEmergencyContactRead = "TIP:EMERGENCY:CONTACT:READ:" TIPEmergencyContactRemove = "TIP:EMERGENCY:CONTACT:REMOVE:" TIPPhoneNumberUpdate = "TIP:PHONE:NUMBER:UPDATE:" TIPMultisigRequestSign = "TIP:MULTISIG:REQUEST:SIGN:" TIPMultisigRequestUnlock = "TIP:MULTISIG:REQUEST:UNLOCK:" TIPCollectibleRequestSign = "TIP:COLLECTIBLE:REQUEST:SIGN:" TIPCollectibleRequestUnlock = "TIP:COLLECTIBLE:REQUEST:UNLOCK:" TIPTransferCreate = "TIP:TRANSFER:CREATE:" TIPWithdrawalCreate = "TIP:WITHDRAWAL:CREATE:" TIPRawTransactionCreate = "TIP:TRANSACTION:CREATE:" TIPOAuthApprove = "TIP:OAUTH:APPROVE:" TIPProvisioningUpdate = "TIP:PROVISIONING:UPDATE:" TIPAppOwnershipTransfer = "TIP:APP:OWNERSHIP:TRANSFER:" TIPSequencerRegister = "SEQUENCER:REGISTER:" )
const (
Scheme = "mixin"
)
Variables ¶
var (
ErrResponseVerifyFailed = errors.New("response verify failed")
)
var URL = urlScheme{ // contains filtered or unexported fields }
Functions ¶
func AuthorizeToken ¶
func CancelCollectibleRequest ¶
CancelCollectible cancel a collectibles request with accessToken
func CodeChallenge ¶
func DecodeResponse ¶
func DecryptAttachment ¶
func DecryptMessageCategory ¶
func DecryptMessageData ¶
func EncryptMessageCategory ¶
func EncryptMessageData ¶
func GenerateEd25519Key ¶
func GenerateEd25519Key() ed25519.PrivateKey
func GenerateSessionChecksum ¶
func GetRestyClient ¶
func GetRestyClient() *resty.Client
func IsErrorCodes ¶
func IsPlainMessageCategory ¶
func MakeCollectibleTransaction ¶
func MakeCollectibleTransaction( ctx context.Context, accessToken string, txVer uint8, output *CollectibleOutput, token *CollectibleToken, receivers []string, threshold uint8, ) (*mixinnet.Transaction, error)
MakeCollectibleTransaction make collectible transaction with accessToken
func RandomCodeChallenge ¶
func RandomCodeChallenge() (verifier, challange string)
func RandomTraceID ¶
func RandomTraceID() string
func RequestIdFromContext ¶
func SafeSignTransaction ¶
func SignRequest ¶
func SignResponse ¶
func SignResponse(r *resty.Response) string
func UniqueConversationID ¶
func UnmarshalResponse ¶
func UnmarshalResponse(resp *resty.Response, v interface{}) (err error)
func UploadAttachment ¶
func UploadAttachment(ctx context.Context, attachment *Attachment, file []byte) error
func UploadAttachmentTo ¶
func UseApiHost ¶
func UseApiHost(host string)
func UseAutoFasterRoute ¶
func UseAutoFasterRoute()
func UseBlazeHost ¶
func UseBlazeHost(host string)
func UseBlazeURL ¶
func UseBlazeURL(rawURL string)
func ValidatePinPattern ¶
ValidatePinPattern validate the pin with pinRegex
func WithRequestID ¶
WithRequestID bind request id to context request id must be uuid
func WrapErrWithRequestID ¶
Types ¶
type AcknowledgementRequest ¶
type Address ¶
type Address struct { AddressID string `json:"address_id,omitempty"` AssetID string `json:"asset_id"` Label string `json:"label,omitempty"` Destination string `json:"destination,omitempty"` Tag string `json:"tag,omitempty"` Fee decimal.Decimal `json:"fee,omitempty"` Dust decimal.Decimal `json:"dust,omitempty"` }
func ReadAddress ¶
type App ¶
type App struct { UpdatedAt time.Time `json:"updated_at,omitempty"` AppID string `json:"app_id,omitempty"` AppNumber string `json:"app_number,omitempty"` RedirectURI string `json:"redirect_uri,omitempty"` HomeURI string `json:"home_uri,omitempty"` Name string `json:"name,omitempty"` IconURL string `json:"icon_url,omitempty"` Description string `json:"description,omitempty"` Capabilities []string `json:"capabilities,omitempty"` ResourcePatterns []string `json:"resource_patterns,omitempty"` Category string `json:"category,omitempty"` CreatorID string `json:"creator_id,omitempty"` AppSecret string `json:"app_secret,omitempty"` }
type AppButtonGroupMessage ¶
type AppButtonGroupMessage []AppButtonMessage
type AppButtonMessage ¶
type AppCardMessage ¶
type AppCardMessage struct { AppID string `json:"app_id,omitempty"` IconURL string `json:"icon_url,omitempty"` CoverURL string `json:"cover_url,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Action string `json:"action,omitempty"` Actions AppButtonGroupMessage `json:"actions,omitempty"` }
type Asset ¶
type Asset struct { AssetID string `json:"asset_id"` ChainID string `json:"chain_id"` AssetKey string `json:"asset_key,omitempty"` MixinID string `json:"mixin_id,omitempty"` Symbol string `json:"symbol,omitempty"` Name string `json:"name,omitempty"` IconURL string `json:"icon_url,omitempty"` PriceBTC decimal.Decimal `json:"price_btc,omitempty"` ChangeBTC decimal.Decimal `json:"change_btc,omitempty"` PriceUSD decimal.Decimal `json:"price_usd,omitempty"` ChangeUsd decimal.Decimal `json:"change_usd,omitempty"` Balance decimal.Decimal `json:"balance,omitempty"` Destination string `json:"destination,omitempty"` Tag string `json:"tag,omitempty"` Confirmations int `json:"confirmations,omitempty"` Capitalization float64 `json:"capitalization,omitempty"` DepositEntries []DepositEntry `json:"deposit_entries"` }
func ReadNetworkAsset ¶
ReadNetworkAsset read mixin network asset by asset id
func ReadNetworkAssetsBySymbol ¶
ReadNetworkAssetsBySymbol read mixin network assets by symbol
type Attachment ¶
type AudioMessage ¶
type Authorization ¶
type Authorization struct { CreatedAt time.Time `json:"created_at"` AccessedAt time.Time `json:"accessed_at"` AuthorizationID string `json:"authorization_id"` AuthorizationCode string `json:"authorization_code"` Scopes []string `json:"scopes"` CodeID string `json:"code_id"` App App `json:"app"` User User `json:"user"` }
func RequestAuthorization ¶
type BlazeListenFunc ¶
type BlazeListenFunc func(ctx context.Context, msg *MessageView, userID string) error
func (BlazeListenFunc) OnAckReceipt ¶
func (f BlazeListenFunc) OnAckReceipt(ctx context.Context, msg *MessageView, userID string) error
func (BlazeListenFunc) OnMessage ¶
func (f BlazeListenFunc) OnMessage(ctx context.Context, msg *MessageView, userID string) error
type BlazeListener ¶
type BlazeListener interface { OnAckReceipt(ctx context.Context, msg *MessageView, userID string) error OnMessage(ctx context.Context, msg *MessageView, userID string) error }
type BlazeMessage ¶
type BlazeOption ¶
type CircleItem ¶
type Client ¶
type Client struct { Signer Verifier MessageLocker ClientID string }
func NewFromAccessToken ¶
func NewFromKeystore ¶
func NewFromOauthKeystore ¶
func NewFromOauthKeystore(keystore *OauthKeystore) (*Client, error)
func (*Client) AddParticipants ¶
func (*Client) AdminParticipants ¶
func (*Client) AppendOutputsToInput ¶
func (c *Client) AppendOutputsToInput(ctx context.Context, b *TransactionBuilder, outputs []*TransactionOutput) error
func (*Client) BatchReadGhostKeys ¶
func (*Client) CancelCollectibleRequest ¶
CancelCollectible cancel a collectibles request
func (*Client) CancelMultisig ¶
CancelMultisig cancel a multisig request
func (*Client) CreateAddress ¶
func (*Client) CreateAttachment ¶
func (c *Client) CreateAttachment(ctx context.Context) (*Attachment, error)
func (*Client) CreateCircle ¶
func (*Client) CreateCollectibleRequest ¶
func (c *Client) CreateCollectibleRequest(ctx context.Context, action, raw string) (*CollectibleRequest, error)
CreateCollectibleRequest create a collectibles request
func (*Client) CreateContactConversation ¶
func (c *Client) CreateContactConversation(ctx context.Context, userID string) (*Conversation, error)
CreateContactConversation create a conversation with a mixin messenger user
func (*Client) CreateConversation ¶
func (c *Client) CreateConversation(ctx context.Context, input *CreateConversationInput) (*Conversation, error)
CreateConversation crate conversation
func (*Client) CreateGroupConversation ¶
func (c *Client) CreateGroupConversation(ctx context.Context, conversationID, name string, participants []*Participant) (*Conversation, error)
CreateGroupConversation create a group in mixin messenger with given participants
func (*Client) CreateMultisig ¶
CreateMultisig create a multisig request
func (*Client) CreateUser ¶
func (*Client) DeleteAddress ¶
func (*Client) DeleteCircle ¶
func (*Client) EncryptMessageRequest ¶
func (c *Client) EncryptMessageRequest(req *MessageRequest, sessions []*Session) error
func (*Client) EncryptTipPin ¶
func (*Client) FavoriteApp ¶
func (*Client) FetchSessions ¶
func (*Client) ListBlockingUsers ¶
func (*Client) ListCircleItems ¶
func (c *Client) ListCircleItems(ctx context.Context, args ListCircleItemsParams) ([]*CircleItem, error)
func (*Client) ListMultisigOutputs ¶
func (c *Client) ListMultisigOutputs(ctx context.Context, opt ListMultisigOutputsOption) ([]*MultisigUTXO, error)
ListMultisigOutputs return a list of multisig outputs of special members & threshold
func (*Client) LoopBlaze ¶
func (c *Client) LoopBlaze(ctx context.Context, listener BlazeListener, opts ...BlazeOption) error
func (*Client) MakeCollectibleTransaction ¶
func (c *Client) MakeCollectibleTransaction( ctx context.Context, txVer uint8, output *CollectibleOutput, token *CollectibleToken, receivers []string, threshold uint8, ) (*mixinnet.Transaction, error)
func (*Client) MakeTransaction ¶
func (c *Client) MakeTransaction(ctx context.Context, b *TransactionBuilder, outputs []*TransactionOutput) (*mixinnet.Transaction, error)
func (*Client) ManageCircle ¶
func (c *Client) ManageCircle(ctx context.Context, args ManageCircleParams) (*CircleItem, error)
func (*Client) ManageConversation ¶
func (c *Client) ManageConversation(ctx context.Context, conversationID, action string, participants []*Participant) (*Conversation, error)
func (*Client) ModifyProfile ¶
func (*Client) ReadAddress ¶
func (*Client) ReadAddresses ¶
func (*Client) ReadAssetFee ¶
func (*Client) ReadCircle ¶
func (*Client) ReadCollectibleCollection ¶
func (c *Client) ReadCollectibleCollection(ctx context.Context, collectionID string) (*CollectibleCollection, error)
ReadCollectibleCollection request collectible collection
func (*Client) ReadCollectibleOutputs ¶
func (c *Client) ReadCollectibleOutputs(ctx context.Context, members []string, threshold uint8, state string, offset time.Time, limit int) ([]*CollectibleOutput, error)
ReadCollectibleOutputs return a list of collectibles outputs
func (*Client) ReadCollectiblesToken ¶
ReadCollectiblesToken return the detail of CollectibleToken
func (*Client) ReadConversation ¶
func (c *Client) ReadConversation(ctx context.Context, conversationID string) (*Conversation, error)
ReadConversation read conversation
func (*Client) ReadExchangeRates ¶
func (c *Client) ReadExchangeRates(ctx context.Context) ([]ExchangeRate, error)
ReadExchangeRates returns the exchange rates between two currencies deprecated: use ReadFiats instead
func (*Client) ReadFavoriteApps ¶
func (*Client) ReadGhostKeys ¶
func (*Client) ReadMultisigOutput ¶
ReadMultisigOutput read a multisig output by utxo_id
func (*Client) ReadMultisigOutputs ¶
func (c *Client) ReadMultisigOutputs(ctx context.Context, members []string, threshold uint8, offset time.Time, limit int) ([]*MultisigUTXO, error)
ReadMultisigOutputs return a list of multisig outputs order by updated_at, including unspent, signed, spent utxos
func (*Client) ReadMultisigs ¶
func (c *Client) ReadMultisigs(ctx context.Context, offset time.Time, limit int) ([]*MultisigUTXO, error)
ReadMultisigs return a list of multisig utxos
func (*Client) ReadNetworkSnapshot ¶
func (*Client) ReadNetworkSnapshots ¶
func (*Client) ReadSafeAppSnapshots ¶ added in v2.0.9
func (c *Client) ReadSafeAppSnapshots(ctx context.Context, assetID string, offset time.Time, order string, limit int) ([]*SafeSnapshot, error)
list safe snapshots of dapp & sub wallets created by this dapp
func (*Client) ReadSafeSnapshot ¶
func (*Client) ReadSafeSnapshots ¶
func (*Client) ReadSnapshot ¶
func (*Client) ReadSnapshotByTraceID ¶
func (*Client) ReadSnapshots ¶
func (c *Client) ReadSnapshots(ctx context.Context, assetID string, offset time.Time, order string, limit int) ([]*Snapshot, error)
ReadSnapshots return a list of snapshots order must be `ASC` or `DESC` Deprecated: use ReadSnapshotsWithOptions instead.
func (*Client) ReadSnapshotsWithOptions ¶
func (c *Client) ReadSnapshotsWithOptions(ctx context.Context, offset time.Time, limit int, input ReadSnapshotsOptions) ([]*Snapshot, error)
ReadSnapshotsWithOptions returns a list of snapshots
func (*Client) ReadTransfer ¶
func (*Client) ReadTurnServers ¶
func (*Client) RemarkFriend ¶
func (*Client) RemoveFriend ¶
func (*Client) RemoveParticipants ¶
func (*Client) RotateConversation ¶
func (*Client) SafeCreateDepositEntries ¶
func (*Client) SafeCreateGhostKeys ¶
func (*Client) SafeCreateMultisigRequest ¶
func (c *Client) SafeCreateMultisigRequest(ctx context.Context, input *SafeTransactionRequestInput) (*SafeMultisigRequest, error)
func (*Client) SafeCreateMultisigRequests ¶
func (c *Client) SafeCreateMultisigRequests(ctx context.Context, inputs []*SafeTransactionRequestInput) ([]*SafeMultisigRequest, error)
func (*Client) SafeCreateTransactionRequest ¶
func (c *Client) SafeCreateTransactionRequest(ctx context.Context, input *SafeTransactionRequestInput) (*SafeTransactionRequest, error)
func (*Client) SafeCreateTransactionRequests ¶
func (c *Client) SafeCreateTransactionRequests(ctx context.Context, inputs []*SafeTransactionRequestInput) ([]*SafeTransactionRequest, error)
func (*Client) SafeFetchAssets ¶ added in v2.0.2
func (*Client) SafeListDeposits ¶
func (c *Client) SafeListDeposits(ctx context.Context, entry *SafeDepositEntry, asset string, offset time.Time, limit int) ([]*SafeDeposit, error)
func (*Client) SafeListUtxos ¶
func (*Client) SafeMigrate ¶
func (*Client) SafeNotifySnapshot ¶ added in v2.0.2
func (*Client) SafeReadAsset ¶
func (*Client) SafeReadAssets ¶
func (*Client) SafeReadMultisigRequests ¶
func (*Client) SafeReadTransactionRequest ¶
func (*Client) SafeReadUtxo ¶ added in v2.0.2
func (*Client) SafeReadUtxoByHash ¶ added in v2.0.2
func (*Client) SafeSignMultisigRequest ¶
func (c *Client) SafeSignMultisigRequest(ctx context.Context, input *SafeTransactionRequestInput) (*SafeMultisigRequest, error)
func (*Client) SafeSubmitTransactionRequest ¶
func (c *Client) SafeSubmitTransactionRequest(ctx context.Context, input *SafeTransactionRequestInput) (*SafeTransactionRequest, error)
func (*Client) SafeSubmitTransactionRequests ¶
func (c *Client) SafeSubmitTransactionRequests(ctx context.Context, inputs []*SafeTransactionRequestInput) ([]*SafeTransactionRequest, error)
func (*Client) SafeUnlockMultisigRequest ¶
func (*Client) SearchUser ¶
func (*Client) SendAcknowledgement ¶
func (c *Client) SendAcknowledgement(ctx context.Context, request *AcknowledgementRequest) error
func (*Client) SendAcknowledgements ¶
func (c *Client) SendAcknowledgements(ctx context.Context, requests []*AcknowledgementRequest) error
func (*Client) SendEncryptedMessages ¶
func (c *Client) SendEncryptedMessages(ctx context.Context, messages []*MessageRequest) ([]*EncryptedMessageReceipt, error)
func (*Client) SendMessage ¶
func (c *Client) SendMessage(ctx context.Context, message *MessageRequest) error
func (*Client) SendMessages ¶
func (c *Client) SendMessages(ctx context.Context, messages []*MessageRequest) error
func (*Client) SendRawMessage ¶
func (*Client) SendRawMessages ¶
func (*Client) ShowAttachment ¶
func (*Client) SignCollectibleRequest ¶
func (c *Client) SignCollectibleRequest(ctx context.Context, reqID, pin string) (*CollectibleRequest, error)
SignCollectibleRequest sign a collectibles request
func (*Client) SignMultisig ¶
SignMultisig sign a multisig request
func (*Client) Transaction ¶
func (c *Client) Transaction(ctx context.Context, in *TransferInput, pin string) (*RawTransaction, error)
func (*Client) TransferOwnership ¶
func (*Client) UnblockUser ¶
func (*Client) UnfavoriteApp ¶
func (*Client) UnlockCollectibleRequest ¶
UnlockCollectibleRequest unlock a collectibles request
func (*Client) UnlockMultisig ¶
UnlockMultisig unlock a multisig request
func (*Client) UpdateCircle ¶
func (*Client) UpdateConversation ¶
func (c *Client) UpdateConversation(ctx context.Context, conversationID string, input ConversationUpdate) (*Conversation, error)
UpdateConversation update conversation
func (*Client) UpdateConversationAnnouncement ¶
func (c *Client) UpdateConversationAnnouncement(ctx context.Context, conversationID, announcement string) (*Conversation, error)
Update conversation announcement
func (*Client) UpdateProfile ¶
func (*Client) UpdateRelationship ¶
func (*Client) VerifyPayment ¶
type Code ¶
type Code struct { Type CodeType `json:"type"` RawData json.RawMessage }
func (*Code) Authorization ¶
func (c *Code) Authorization() *Authorization
func (*Code) Collectible ¶
func (c *Code) Collectible() *CollectibleRequest
func (*Code) Conversation ¶
func (c *Code) Conversation() *Conversation
func (*Code) Multisig ¶
func (c *Code) Multisig() *MultisigRequest
type CollectibleCollection ¶
type CollectibleCollection struct { CollectionID string `json:"collection_id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` IconUrl string `json:"icon_url,omitempty"` Description string `json:"description,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` }
func ReadCollectibleCollection ¶
func ReadCollectibleCollection(ctx context.Context, accessToken, collectionID string) (*CollectibleCollection, error)
ReadCollectibleCollection request collectible collection with accessToken
type CollectibleOutput ¶
type CollectibleOutput struct { Type string `json:"type,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` UserID string `json:"user_id,omitempty"` OutputID string `json:"output_id,omitempty"` TokenID string `json:"token_id,omitempty"` Extra string `json:"extra,omitempty"` TransactionHash mixinnet.Hash `json:"transaction_hash,omitempty"` OutputIndex uint8 `json:"output_index,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` Senders []string `json:"senders,omitempty"` SendersThreshold uint8 `json:"senders_threshold,omitempty"` Receivers []string `json:"receivers,omitempty"` ReceiversThreshold uint8 `json:"receivers_threshold,omitempty"` State string `json:"state,omitempty"` SignedBy string `json:"signed_by,omitempty"` SignedTx string `json:"signed_tx,omitempty"` }
type CollectibleRequest ¶
type CollectibleRequest struct { Type string `json:"type,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` RequestID string `json:"request_id,omitempty"` UserID string `json:"user_id,omitempty"` TokenID string `json:"token_id,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` Senders []string `json:"senders,omitempty"` SendersThreshold uint8 `json:"senders_threshold,omitempty"` Receivers []string `json:"receivers,omitempty"` ReceiversThreshold uint8 `json:"receivers_threshold,omitempty"` Signers []string `json:"signers,omitempty"` Action string `json:"action,omitempty"` State string `json:"state,omitempty"` TransactionHash mixinnet.Hash `json:"transaction_hash,omitempty"` RawTransaction string `json:"raw_transaction,omitempty"` CodeID string `json:"code_id"` }
func CreateCollectibleRequest ¶
func CreateCollectibleRequest(ctx context.Context, accessToken, action, raw string) (*CollectibleRequest, error)
CreateCollectibleRequest create a collectibles request with accessToken
type CollectibleToken ¶
type CollectibleToken struct { Type string `json:"type,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` CollectionID string `json:"collection_id,omitempty"` TokenID string `json:"token_id,omitempty"` Group string `json:"group,omitempty"` Token string `json:"token,omitempty"` MixinID mixinnet.Hash `json:"mixin_id,omitempty"` NFO mixinnet.TransactionExtra `json:"nfo,omitempty"` Meta CollectibleTokenMeta `json:"meta,omitempty"` }
func ReadCollectiblesToken ¶
func ReadCollectiblesToken(ctx context.Context, accessToken, tokenID string) (*CollectibleToken, error)
ReadCollectiblesToken request with access token and returns the detail of CollectibleToken
type CollectibleTokenMeta ¶
type CollectibleTokenMeta struct { Group string `json:"group,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` IconURL string `json:"icon_url,omitempty"` MediaURL string `json:"media_url,omitempty"` Mime string `json:"mime,omitempty"` Hash mixinnet.Hash `json:"hash,omitempty"` }
type ContactMessage ¶
type ContactMessage struct {
UserID string `json:"user_id,omitempty"`
}
type Conversation ¶
type Conversation struct { ConversationID string `json:"conversation_id,omitempty"` CreatorID string `json:"creator_id,omitempty"` Category string `json:"category,omitempty"` Name string `json:"name,omitempty"` IconURL string `json:"icon_url,omitempty"` Announcement string `json:"announcement,omitempty"` CreatedAt string `json:"created_at,omitempty"` CodeID string `json:"code_id,omitempty"` CodeURL string `json:"code_url,omitempty"` Participants []*Participant `json:"participants,omitempty"` }
Conversation conversation
type ConversationUpdate ¶
type CreateAddressInput ¶
type CreateCircleParams ¶
type CreateCircleParams struct {
Name string `json:"name,omitempty"`
}
type CreateConversationInput ¶
type CreateConversationInput struct { Category string `json:"category,omitempty"` ConversationID string `json:"conversation_id,omitempty"` Name string `json:"name,omitempty"` Participants []*Participant `json:"participants,omitempty"` }
type DataMessage ¶
type DataMessage struct { AttachmentID string `json:"attachment_id,omitempty"` MimeType string `json:"mime_type,omitempty"` Size int `json:"size,omitempty"` Name string `json:"name,omitempty"` *AttachmentMessageEncrypt }
type DepositEntry ¶
type EncryptedMessageReceipt ¶
type Error ¶
type ExchangeRate ¶
type ExchangeRate Fiat
ExchangeRate represent the exchange rate between two currencies deprecated: use Fiat instead
type ExternalTransaction ¶
type ExternalTransaction struct { TransactionID string `json:"transaction_id"` CreatedAt time.Time `json:"created_at"` TransactionHash string `json:"transaction_hash"` Sender string `json:"sender"` ChainId string `json:"chain_id"` AssetId string `json:"asset_id"` Amount decimal.Decimal `json:"amount"` Destination string `json:"destination"` Tag string `json:"tag"` Confirmations int64 `json:"confirmations"` Threshold int64 `json:"threshold"` }
func ReadExternalTransactions ¶
func ReadExternalTransactions(ctx context.Context, assetID, destination, tag string) ([]*ExternalTransaction, error)
type FavoriteApp ¶
type Fiat ¶
type Fiat struct { Code string `json:"code,omitempty"` Rate decimal.Decimal `json:"rate,omitempty"` }
Fiat is a struct for fiat currencies
type GhostInput ¶
type ImageMessage ¶
type ImageMessage struct { AttachmentID string `json:"attachment_id,omitempty"` MimeType string `json:"mime_type,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Size int `json:"size,omitempty"` Thumbnail string `json:"thumbnail,omitempty"` *AttachmentMessageEncrypt }
type Keystore ¶
type Keystore struct { ClientID string `json:"client_id"` SessionID string `json:"session_id"` PrivateKey string `json:"private_key"` PinToken string `json:"pin_token"` Scope string `json:"scope"` // AppID is equivalent to the ClientID AppID string `json:"app_id"` // ServerPublicKey is equivalent to the PinToken in hex format ServerPublicKey string `json:"server_public_key"` // SessionPrivateKey is equivalent to the PrivateKey in hex format SessionPrivateKey string `json:"session_private_key"` // ExtraClaims is used to store extra claims in the jwt token ExtraClaims map[string]interface{} `json:"extra_claims"` }
type KeystoreAuth ¶
type KeystoreAuth struct { *Keystore // contains filtered or unexported fields }
func AuthEd25519FromKeystore ¶
func AuthEd25519FromKeystore(store *Keystore) (*KeystoreAuth, error)
AuthEd25519FromKeystore produces a signer using an ed25519 keystore. Deprecated: use AuthFromKeystore instead.
func AuthFromKeystore ¶
func AuthFromKeystore(store *Keystore) (*KeystoreAuth, error)
AuthFromKeystore produces a signer using both ed25519 & RSA keystore.
func (*KeystoreAuth) EncryptPin ¶
func (k *KeystoreAuth) EncryptPin(pin string) string
func (*KeystoreAuth) SignToken ¶
func (k *KeystoreAuth) SignToken(signature, requestID string, exp time.Duration) string
func (*KeystoreAuth) SignTokenAt ¶
type ListCircleItemsParams ¶
type LiveMessage ¶
type LocationMessage ¶
type ManageCircleParams ¶
type MessageLocker ¶
type MessageRequest ¶
type MessageRequest struct { ConversationID string `json:"conversation_id"` RecipientID string `json:"recipient_id"` MessageID string `json:"message_id"` Category string `json:"category"` Data string `json:"data,omitempty"` // DataBase64 is same as Data but encoded by base64.RawURLEncoding DataBase64 string `json:"data_base64,omitempty"` RepresentativeID string `json:"representative_id,omitempty"` QuoteMessageID string `json:"quote_message_id,omitempty"` Silent bool `json:"silent,omitempty"` // encrypted messages Checksum string `json:"checksum,omitempty"` RecipientSessions []RecipientSession `json:"recipient_sessions,omitempty"` }
type MessageView ¶
type MessageView struct { ConversationID string `json:"conversation_id"` UserID string `json:"user_id"` MessageID string `json:"message_id"` Category string `json:"category"` Data string `json:"data"` // DataBase64 is same as Data but encoded by base64.RawURLEncoding DataBase64 string `json:"data_base64"` RepresentativeID string `json:"representative_id"` QuoteMessageID string `json:"quote_message_id"` Status string `json:"status"` Source string `json:"source"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` // contains filtered or unexported fields }
func (*MessageView) Ack ¶
func (m *MessageView) Ack()
Ack mark messageView as acked otherwise sdk will ack this message
type MixAddress ¶
func MixAddressFromString ¶
func MixAddressFromString(s string) (*MixAddress, error)
func NewMainnetMixAddress ¶
func NewMainnetMixAddress(members []string, threshold byte) (*MixAddress, error)
func NewMixAddress ¶
func NewMixAddress(members []string, threshold byte) (*MixAddress, error)
func RequireNewMainnetMixAddress ¶
func RequireNewMainnetMixAddress(members []string, threshold byte) *MixAddress
func RequireNewMixAddress ¶
func RequireNewMixAddress(members []string, threshold byte) *MixAddress
func (*MixAddress) Members ¶
func (ma *MixAddress) Members() []string
func (*MixAddress) String ¶
func (ma *MixAddress) String() string
type MultisigRequest ¶
type MultisigRequest struct { Type string `json:"type"` RequestID string `json:"request_id"` UserID string `json:"user_id"` AssetID string `json:"asset_id"` Amount decimal.Decimal `json:"amount"` Threshold uint8 `json:"threshold"` Senders []string `json:"senders"` Receivers []string `json:"receivers"` Signers []string `json:"signers"` Memo string `json:"memo"` Action string `json:"action"` State string `json:"state"` TransactionHash mixinnet.Hash `json:"transaction_hash"` RawTransaction string `json:"raw_transaction"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` CodeID string `json:"code_id"` }
type MultisigUTXO ¶
type MultisigUTXO struct { Type string `json:"type"` UserID string `json:"user_id"` UTXOID string `json:"utxo_id"` AssetID string `json:"asset_id"` TransactionHash mixinnet.Hash `json:"transaction_hash"` OutputIndex int `json:"output_index"` Sender string `json:"sender,omitempty"` Amount decimal.Decimal `json:"amount"` Threshold uint8 `json:"threshold"` Members []string `json:"members"` Memo string `json:"memo"` State string `json:"state"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` SignedBy string `json:"signed_by"` SignedTx string `json:"signed_tx"` }
func (MultisigUTXO) Asset ¶
func (utxo MultisigUTXO) Asset() mixinnet.Hash
type NetworkAsset ¶
type NetworkChain ¶
type NetworkChain struct { ChainID string `json:"chain_id"` IconURL string `json:"icon_url"` Name string `json:"name"` Type string `json:"type"` WithdrawFee decimal.Decimal `json:"withdrawal_fee"` WithdrawTimestamp time.Time `json:"withdrawal_timestamp"` WithdrawPendingCount int64 `json:"withdrawal_pending_count"` DepositBlockHeight int64 `json:"deposit_block_height"` ExternalBlockHeight int64 `json:"external_block_height"` ManagedBlockHeight int64 `json:"managed_block_height"` IsSynchronized bool `json:"is_synchronized"` }
type NetworkInfo ¶
type NetworkInfo struct { Assets []*NetworkAsset `json:"assets"` Chains []*NetworkChain `json:"chains"` AssetsCount decimal.Decimal `json:"assets_count"` PeakThroughput decimal.Decimal `json:"peak_throughput"` SnapshotsCount decimal.Decimal `json:"snapshots_count"` Type string `json:"type"` }
NetworkInfo mixin network info
func ReadNetworkInfo ¶
func ReadNetworkInfo(ctx context.Context) (*NetworkInfo, error)
ReadNetworkInfo read mixin network
type OauthKeystore ¶
type OauthKeystore struct { ClientID string `json:"client_id,omitempty"` AuthID string `json:"authorization_id,omitempty"` Scope string `json:"scope,omitempty"` PrivateKey string `json:"private_key,omitempty"` VerifyKey string `json:"ed25519,omitempty"` }
func AuthorizeEd25519 ¶
func AuthorizeEd25519(ctx context.Context, clientID, clientSecret string, code string, verifier string, privateKey ed25519.PrivateKey) (*OauthKeystore, error)
type OauthKeystoreAuth ¶
type OauthKeystoreAuth struct { *OauthKeystore // contains filtered or unexported fields }
func AuthFromOauthKeystore ¶
func AuthFromOauthKeystore(store *OauthKeystore) (*OauthKeystoreAuth, error)
func (*OauthKeystoreAuth) EncryptPin ¶
func (o *OauthKeystoreAuth) EncryptPin(pin string) string
func (*OauthKeystoreAuth) SignToken ¶
func (o *OauthKeystoreAuth) SignToken(signature, requestID string, exp time.Duration) string
func (*OauthKeystoreAuth) SignTokenAt ¶
func (*OauthKeystoreAuth) Verify ¶
func (o *OauthKeystoreAuth) Verify(resp *resty.Response) error
type Participant ¶
type Participant struct { Action string `json:"action,omitempty"` Type string `json:"type,omitempty"` UserID string `json:"user_id,omitempty"` ParticipantID string `json:"participant_id,omitempty"` Role string `json:"role,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` }
Participant conversation participant
type Payment ¶
type Payment struct { Recipient *User `json:"recipient,omitempty"` Asset *Asset `json:"asset,omitempty"` AssetID string `json:"asset_id,omitempty"` Amount string `json:"amount,omitempty"` TraceID string `json:"trace_id,omitempty"` Status string `json:"status,omitempty"` Memo string `json:"memo,omitempty"` Receivers []string `json:"receivers,omitempty"` Threshold uint8 `json:"threshold,omitempty"` CodeID string `json:"code_id,omitempty"` }
type RawTransaction ¶
type RawTransaction struct { Type string `json:"type"` SnapshotID string `json:"snapshot_id,omitempty"` OpponentKey string `json:"opponent_key,omitempty"` AssetID string `json:"asset_id"` Amount string `json:"amount"` TraceID string `json:"trace_id"` Memo string `json:"memo"` State string `json:"state"` CreatedAt time.Time `json:"created_at"` TransactionHash string `json:"transaction_hash,omitempty"` SnapshotHash string `json:"snapshot_hash,omitempty"` SnapshotAt time.Time `json:"snapshot_at"` }
RawTransaction raw transaction
type ReadSnapshotsOptions ¶
type RecallMessage ¶
type RecallMessage struct {
MessageID string `json:"message_id"`
}
type RecipientSession ¶
type RecipientSession struct {
SessionID string `json:"session_id,omitempty"`
}
type RelationshipRequest ¶
type SafeAsset ¶
type SafeAsset struct { AssetID string `json:"asset_id"` ChainID string `json:"chain_id"` FeeAssetID string `json:"fee_asset_id"` KernelAssetID string `json:"kernel_asset_id,omitempty"` Symbol string `json:"symbol,omitempty"` Name string `json:"name,omitempty"` IconURL string `json:"icon_url,omitempty"` PriceBTC decimal.Decimal `json:"price_btc,omitempty"` PriceUSD decimal.Decimal `json:"price_usd,omitempty"` ChangeBTC decimal.Decimal `json:"change_btc,omitempty"` ChangeUsd decimal.Decimal `json:"change_usd,omitempty"` PriceUpdatedAt time.Time `json:"price_updated_at,omitempty"` AssetKey string `json:"asset_key,omitempty"` Precision int32 `json:"precision,omitempty"` Dust decimal.Decimal `json:"dust,omitempty"` Confirmations int `json:"confirmations,omitempty"` }
func SafeFetchAssets ¶ added in v2.0.2
func SafeReadAsset ¶
type SafeDeposit ¶
type SafeDeposit struct { DepositID string `json:"deposit_id,omitempty"` Destination string `json:"destination,omitempty"` Tag string `json:"tag,omitempty"` ChainID string `json:"chain_id,omitempty"` AssetID string `json:"asset_id,omitempty"` KernelAssetID string `json:"kernel_asset_id,omitempty"` AssetKey string `json:"chain_key,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` TransactionHash string `json:"transaction_hash,omitempty"` OutputIndex uint64 `json:"output_index,omitempty"` BlockHash string `json:"block_hash,omitempty"` Confirmations uint64 `json:"confirmations,omitempty"` Threshold uint64 `json:"threshold,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
type SafeDepositEntry ¶
type SafeDepositEntry struct { EntryID string `json:"entry_id,omitempty"` Members []string `json:"members,omitempty"` Threshold int `json:"threshold,omitempty"` ChainID string `json:"chain_id,omitempty"` Destination string `json:"destination,omitempty"` Tag string `json:"tag,omitempty"` IsPrimary bool `json:"is_primary,omitempty"` Signature string `json:"signature,omitempty"` }
type SafeListUtxoOption ¶
type SafeMultisigRequest ¶
type SafeMultisigRequest struct { RequestID string `json:"request_id,omitempty"` TransactionHash string `json:"transaction_hash,omitempty"` AssetID string `json:"asset_id,omitempty"` KernelAssetID mixinnet.Hash `json:"kernel_asset_id,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` SendersHash string `json:"senders_hash,omitempty"` SendersThreshold uint8 `json:"senders_threshold,omitempty"` Senders []string `json:"senders,omitempty"` Signers []string `json:"signers,omitempty"` Extra string `json:"extra,omitempty"` RawTransaction string `json:"raw_transaction"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Views []mixinnet.Key `json:"views,omitempty"` RevokedBy string `json:"revoked_by"` }
type SafeSnapshot ¶
type SafeSnapshot struct { SnapshotID string `json:"snapshot_id,omitempty"` RequestID string `json:"request_id,omitempty"` UserID string `json:"user_id,omitempty"` OpponentID string `json:"opponent_id,omitempty"` TransactionHash *mixinnet.Hash `json:"transaction_hash,omitempty"` AssetID string `json:"asset_id,omitempty"` KernelAssetID string `json:"kernel_asset_id,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` Memo string `json:"memo,omitempty"` CreatedAt time.Time `json:"created_at"` Deposit *SafeSnapshotDeposit `json:"deposit,omitempty"` }
func ReadSafeSnapshot ¶
func ReadSafeSnapshot(ctx context.Context, accessToken, snapshotID string) (*SafeSnapshot, error)
type SafeSnapshotDeposit ¶
type SafeTransactionReceiver ¶
type SafeTransactionRequest ¶
type SafeTransactionRequest struct { RequestID string `json:"request_id,omitempty"` TransactionHash string `json:"transaction_hash,omitempty"` UserID string `json:"user_id,omitempty"` KernelAssetID mixinnet.Hash `json:"kernel_asset_id,omitempty"` AssetID mixinnet.Hash `json:"asset_id,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Extra string `json:"extra,omitempty"` Receivers []*SafeTransactionReceiver `json:"receivers,omitempty"` Senders []string `json:"senders,omitempty"` SendersHash string `json:"senders_hash,omitempty"` SendersThreshold uint8 `json:"senders_threshold,omitempty"` Signers []string `json:"signers,omitempty"` SnapshotHash string `json:"snapshot_hash,omitempty"` SnapshotAt *time.Time `json:"snapshot_at,omitempty"` State SafeUtxoState `json:"state,omitempty"` RawTransaction string `json:"raw_transaction"` Views []mixinnet.Key `json:"views,omitempty"` RevokedBy string `json:"revoked_by"` // TODO delete when asset_id is on Asset mixinnet.Hash `json:"asset,omitempty"` }
type SafeUtxo ¶
type SafeUtxo struct { OutputID string `json:"output_id,omitempty"` RequestID string `json:"request_id,omitempty"` TransactionHash mixinnet.Hash `json:"transaction_hash,omitempty"` OutputIndex uint8 `json:"output_index,omitempty"` KernelAssetID mixinnet.Hash `json:"kernel_asset_id,omitempty"` AssetID string `json:"asset_id,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` Mask mixinnet.Key `json:"mask,omitempty"` Keys []mixinnet.Key `json:"keys,omitempty"` InscriptionHash mixinnet.Hash `json:"inscription_hash,omitempty"` SendersHash string `json:"senders_hash,omitempty"` SendersThreshold uint8 `json:"senders_threshold,omitempty"` Senders []string `json:"senders,omitempty"` ReceiversHash mixinnet.Hash `json:"receivers_hash,omitempty"` ReceiversThreshold uint8 `json:"receivers_threshold,omitempty"` Receivers []string `json:"receivers,omitempty"` Extra string `json:"extra,omitempty"` State SafeUtxoState `json:"state,omitempty"` Sequence uint64 `json:"sequence,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Signers []string `json:"signers,omitempty"` SignedBy string `json:"signed_by,omitempty"` SignedAt *time.Time `json:"signed_at,omitempty"` SpentAt *time.Time `json:"spent_at,omitempty"` }
type SafeUtxoState ¶
type SafeUtxoState string
const ( SafeUtxoStateUnspent SafeUtxoState = "unspent" SafeUtxoStateSigned SafeUtxoState = "signed" SafeUtxoStateSpent SafeUtxoState = "spent" )
type SendSchemeCategory ¶
type SendSchemeCategory = string
const ( SendSchemeCategoryText SendSchemeCategory = "text" SendSchemeCategoryImage SendSchemeCategory = "image" SendSchemeCategoryContact SendSchemeCategory = "contact" SendSchemeCategoryAppCard SendSchemeCategory = "app_card" SendSchemeCategoryLive SendSchemeCategory = "live" SendSchemeCategoryPost SendSchemeCategory = "post" )
type Snapshot ¶
type Snapshot struct { SnapshotID string `json:"snapshot_id"` CreatedAt time.Time `json:"created_at,omitempty"` TraceID string `json:"trace_id,omitempty"` UserID string `json:"user_id,omitempty"` AssetID string `json:"asset_id,omitempty"` ChainID string `json:"chain_id,omitempty"` OpponentID string `json:"opponent_id,omitempty"` OpponentKey string `json:"opponent_key,omitempty"` OpponentReceivers []string `json:"opponent_receivers,omitempty"` OpponentThreshold uint8 `json:"opponent_threshold,omitempty"` Source string `json:"source,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` OpeningBalance decimal.Decimal `json:"opening_balance,omitempty"` ClosingBalance decimal.Decimal `json:"closing_balance,omitempty"` Memo string `json:"memo,omitempty"` Type string `json:"type,omitempty"` Sender string `json:"sender,omitempty"` Receiver string `json:"receiver,omitempty"` TransactionHash string `json:"transaction_hash,omitempty"` SnapshotHash string `json:"snapshot_hash,omitempty"` SnapshotAt *time.Time `json:"snapshot_at,omitempty"` Asset *Asset `json:"asset,omitempty"` }
func ReadSnapshot ¶
ReadSnapshot by accessToken, scope SNAPSHOTS:READ required
func ReadSnapshotByTraceID ¶
ReadSnapshotByTraceID by accessToken, scope SNAPSHOTS:READ required
func ReadSnapshots ¶
func ReadSnapshots(ctx context.Context, accessToken string, assetID string, offset time.Time, order string, limit int) ([]*Snapshot, error)
ReadSnapshots by accessToken, scope SNAPSHOTS:READ required Deprecated: use ReadSnapshotsWithOptions instead.
func ReadSnapshotsWithOptions ¶
func ReadSnapshotsWithOptions(ctx context.Context, accessToken string, offset time.Time, limit int, input ReadSnapshotsOptions) ([]*Snapshot, error)
ReadSnapshotsWithOptions reads snapshots by accessToken, scope SNAPSHOTS:READ required
func (*Snapshot) UnmarshalJSON ¶
type StickerMessage ¶
type Ticker ¶
type TransactionBuilder ¶
type TransactionBuilder struct { *mixinnet.TransactionInput // contains filtered or unexported fields }
func NewLegacyTransactionBuilder ¶
func NewLegacyTransactionBuilder(utxos []*MultisigUTXO) *TransactionBuilder
func NewSafeTransactionBuilder ¶
func NewSafeTransactionBuilder(utxos []*SafeUtxo) *TransactionBuilder
type TransactionOutput ¶
type TransactionOutput struct { Address *MixAddress `json:"address,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` }
type TranscriptMessage ¶
type TranscriptMessage struct { TranscriptID string `json:"transcript_id,omitempty"` MessageID string `json:"message_id,omitempty"` UserID string `json:"user_id,omitempty"` UserFullName string `json:"user_full_name,omitempty"` Category string `json:"category,omitempty"` Content string `json:"content,omitempty"` MediaURL string `json:"media_url,omitempty"` MediaName string `json:"media_name,omitempty"` MediaSize int `json:"media_size,omitempty"` MediaWidth int `json:"media_width,omitempty"` MediaHeight int `json:"media_height,omitempty"` MediaDuration int `json:"media_duration,omitempty"` MediaMimeType string `json:"media_mime_type,omitempty"` MediaStatus string `json:"media_status,omitempty"` MediaWaveform string `json:"media_waveform,omitempty"` MediaKey string `json:"media_key,omitempty"` MediaDigest string `json:"media_digest,omitempty"` MediaCreatedAt time.Time `json:"media_created_at,omitempty"` ThumbImage string `json:"thumb_image,omitempty"` ThumbURL string `json:"thumb_url,omitempty"` StickerID string `json:"sticker_id,omitempty"` Mentions string `json:"mentions,omitempty"` QuoteID string `json:"quote_id,omitempty"` QuoteContent string `json:"quote_content,omitempty"` Caption string `json:"caption,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` }
type TransferInput ¶
type TransferInput struct { AssetID string `json:"asset_id,omitempty"` OpponentID string `json:"opponent_id,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` TraceID string `json:"trace_id,omitempty"` Memo string `json:"memo,omitempty"` // OpponentKey used for raw transaction OpponentKey string `json:"opponent_key,omitempty"` OpponentMultisig struct { Receivers []string `json:"receivers,omitempty"` Threshold uint8 `json:"threshold,omitempty"` } `json:"opponent_multisig,omitempty"` }
TransferInput input for transfer/verify payment request
func NewMintCollectibleTransferInput ¶
func NewMintCollectibleTransferInput(traceID, collectionID string, token int64, metaHash []byte) TransferInput
type TransferView ¶
type TransferView struct { Type string `json:"type"` SnapshotID string `json:"snapshot_id"` CounterUserID string `json:"counter_user_id"` AssetID string `json:"asset_id"` Amount string `json:"amount"` TraceID string `json:"trace_id"` Memo string `json:"memo"` CreatedAt time.Time `json:"created_at"` }
type UpdateAppRequest ¶
type UpdateAppRequest struct { RedirectURI string `json:"redirect_uri,omitempty"` HomeURI string `json:"home_uri,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` IconBase64 string `json:"icon_base64,omitempty"` SessionSecret string `json:"session_secret,omitempty"` Category string `json:"category,omitempty"` Capabilities []string `json:"capabilities,omitempty"` ResourcePatterns []string `json:"resource_patterns,omitempty"` }
type UpdateCircleParams ¶
type User ¶
type User struct { UserID string `json:"user_id,omitempty"` IdentityNumber string `json:"identity_number,omitempty"` Phone string `json:"phone,omitempty"` FullName string `json:"full_name,omitempty"` Biography string `json:"biography,omitempty"` AvatarURL string `json:"avatar_url,omitempty"` Relationship string `json:"relationship,omitempty"` MuteUntil time.Time `json:"mute_until,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` IsVerified bool `json:"is_verified,omitempty"` IsScam bool `json:"is_scam,omitempty"` IsDeactivated bool `json:"is_deactivated,omitempty"` CodeID string `json:"code_id,omitempty"` CodeURL string `json:"code_url,omitempty"` SessionID string `json:"session_id,omitempty"` DeviceStatus string `json:"device_status,omitempty"` HasSafe bool `json:"has_safe,omitempty"` HasPin bool `json:"has_pin,omitempty"` HasEmergencyContact bool `json:"has_emergency_contact,omitempty"` ReceiveMessageSource string `json:"receive_message_source,omitempty"` AcceptConversationSource string `json:"accept_conversation_source,omitempty"` AcceptSearchSource string `json:"accept_search_source,omitempty"` FiatCurrency string `json:"fiat_currency,omitempty"` PinToken string `json:"pin_token,omitempty"` PinTokenBase64 string `json:"pin_token_base64,omitempty"` SaltBase64 string `json:"salt_base64,omitempty"` TipKeyBase64 string `json:"tip_key_base64,omitempty"` SpendPublicKey string `json:"spend_public_key,omitempty"` TipCounter int `json:"tip_counter,omitempty"` App *App `json:"app,omitempty"` }
type UserUpdate ¶
type Verifier ¶
type Verifier interface {
Verify(resp *resty.Response) error
}
func NopVerifier ¶
func NopVerifier() Verifier
type VideoMessage ¶
type VideoMessage struct { AttachmentID string `json:"attachment_id,omitempty"` MimeType string `json:"mime_type,omitempty"` WaveForm string `json:"wave_form,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Size int `json:"size,omitempty"` Duration int `json:"duration,omitempty"` Thumbnail []byte `json:"thumbnail,omitempty"` *AttachmentMessageEncrypt }
Source Files ¶
- ack.go
- address_mix.go
- app.go
- attachment.go
- auth.go
- authorization.go
- blaze.go
- blaze_ack.go
- circle.go
- client.go
- code.go
- context.go
- conversation.go
- curve.go
- ed25519.go
- endpoint.go
- error.go
- fiats.go
- keystore.go
- legacy_address.go
- legacy_assets.go
- legacy_collectible.go
- legacy_collectible_collection.go
- legacy_collectible_mint.go
- legacy_collectible_token.go
- legacy_ghost_key.go
- legacy_multisig_assets.go
- legacy_multisigs.go
- legacy_payment.go
- legacy_snapshot.go
- legacy_transaction_external.go
- legacy_transaction_raw.go
- legacy_transfer.go
- legacy_withdraw.go
- messages.go
- messages_encrypt.go
- network.go
- oauth.go
- oauth_ed25519.go
- ownership.go
- pin.go
- relationships.go
- request.go
- safe_asset.go
- safe_deposit.go
- safe_ghost_keys.go
- safe_migrate.go
- safe_multisigs.go
- safe_snapshot.go
- safe_transaction_request.go
- safe_utxo.go
- session.go
- sign.go
- tip.go
- transaction_input.go
- transaction_signer.go
- turn.go
- url_scheme.go
- user.go
- utils.go