Skip to main content

Type List

EventTypes

nametypeformatdesceg
EventTypes"all" | EVENT_MAP-event types in event center"channel.getList"

ServiceResponse

nametypeformatdesceg
codeobject-response status code0
datastring-response body{user: xx}
msgnumber-response status description"ok"

PageParams

nametypeformatdesceg
pagenumber-current page number1
sizenumber-number of data items per page20

KeyPairsType

nametypeformatdesceg
PrivateKeystringtemporaryPrivateKeytemporary private key of the current user
PublicKeystringtemporaryPublicKeytemporary public key of the current user
useridstringuseridid of the current user'user: xxx'

DidType

nametypeformatdesceg
didType"eth" | "starknet"didTypedid type"eth" or "starknet"

DidValue

nametypeformatdesceg
didValuestringdidValueThe account address corresponding to didType"0x000000"

WalletType

nametypeformatdesceg
WalletType"metamask" | "dappConnect" | 'argentX' | 'braavos'-wallet type"metamask"

BlockChainType

nametypeformatdesceg
BlockChainType"eth" | "starknet"BlockChainTypewallet address"eth" or "starknet"

AccountType

nametypeformatdesceg
addressstringwalletAddresswallet address of the current user'0x000000'

InitOptions

nametypeformatdesceg
app_keystring-temporary authorization key obtained by applying
connectUrlstring | nullWeb3MQAPiEndpointstakes in a valid endpoint url as input, when this paramter is given, client will always connect to that specific nodehttps://testnet-ap-jp-2.web3mq.com
didKeystringdidType:didvaluedidType and didValue collection'eth:0x000000'
envEnvTypes-network environment'test'
tempPubkeystringtemporaryPublicKeytemporary public key of the current user

SendTempConnectOptions

nametypeformatdesceg
dAppIDstring-dApp id of user-
topicIDstring-Logo for connection-

SignClientCallBackType

nametypeformatdesceg
data"success"|"error"|"close"|object-Callback return data"success"
type"createQrcode" | "connect" | "messageStatus" | "keys" | "dapp-connect"-Callback return type"connect"

GetUserInfoParams

nametypeformatdesceg
didType'web3mq' | didType'web3mq' | didTypedid type"eth"
didValuedidValuedidValuedid value,for example, wallet address"0x000000"
timestampnumber-time stampDate.now()

EnvTypes

nametypeformatdesceg
EnvTypes"dev" | "test"-network environment"test"

ChannelItemType

nametypeformatdesceg
avatar_urlstring-current channel avatar resourceshttps://www.xxx.com
chat_namestring-current channel name"channel name"
chat_typestring-current channel type"user" or "group"
chatidstring-current channel id"user: xxx" or "group:xxx"
topicstring-current channel id"user: xxx" or "group:xxx"
topic_typestring-current channel type"user" or "group"
lastMessagestring-last message in the current channel"content of last message"
updatedAtstring-time of the last message in the current chat room"2023-02-01 00:00:00"
unreadnumber-number of unread messages in the current chat room0

NftPermissionType

nametypeformatdesceg
chain_typestring: 'starknet'starknetchain typestarknet
chain_idstring-chain idSN_GOERLI
contractstring-nft collection contract address"0x00000"

CreateRoomParams

nametypeformatdesceg
avatarUrlstring-select the avatar resource for the group channelhttps://www.xxx.com
groupidstring-customize a group channel id"group: xxx"
groupNamestring-enter the group channel name"channel name"
permissionsGroupPermissions-group channel permissions{"group:join": {type: "enum",value: "public"}}
nftsNftPermissionType[]-Required to hold nfts[{"chain_id":"SN_GOERLI","chain_type":"starknet","contract":"0xd29f5f02f5ffcd102faf467f2f236c601830780d"}]

UpdateRoomListParams

nametypeformatdesceg
chatidstring-the id of the chat room to be updated"group:xx" or "user:xx"
chatTypestring-the type of the chat room to be updated"group" or "user"
topicstring-the id of the chat room to be updated"group:xx" or "user:xx"
topicTypestring-the type of the chat room to be updated"group" or "user"

UpdateGroupPermissionsParams

nametypeformatdesceg
groupidstring-group channel id"group:xx"
permissionsGroupPermissions-group channel permissions{"group:join": {type: "enum",value: "public"}}
nftsNftPermissionType[]-Required to hold nfts[{"chain_id":"SN_GOERLI","chain_type":"starknet","contract":"0xd29f5f02f5ffcd102faf467f2f236c601830780d"}]

JoinGroupPermissionsType

nametypeformatdesceg
type"enum"-The type of group to join in group permissions"enum"
value"creator_invite_friends" | "public"-The value of group to join in group permissions"public"

GroupPermissions

nametypeformatdesceg
group:joinJoinGroupPermissionsType-Group channel permission type{"group:join": {type: "enum",value: "public"}}

UserChatPermissionsType

nametypeformatdesceg
type"enum"-Chat permission type in user permissions"enum"
value"public"|"follower"|"following"|"friends"-Chat permission value in user permissions"public"

UserPermissionsType

nametypeformatdesceg
user: chatUserChatPermissionsType-chat permission in user permisson{'user: chat': {type: "enum",value: "public"}}

ContactListItemType

nametypeformatdesceg
avatar_urlstring-contactL avatar resourceshttps://www.xxx.com
follow_statusFollowStatus-follow status with contact"channel name"
nicknamestring-nickname of contact
permissionsUserPermissionsType-permissions of contact{'user: chat': {type: "enum",value: "public"}}
useridstringuseriduserid of contact"user: xxx"
wallet_addressstringwalletAddresswallet address of contact"0x000000"
wallet_typeWalletTypewalletTypewallet type of contact"eth" or "starknet"

GroupMemberListItemType

nametypeformatdesceg
avatar_urlstring-contactL avatar resourceshttps://www.xxx.com
create_atnumber-user create at1695803377572
nicknamestring-nickname of contact
useridstringuseriduserid of contact"user: xxx"
wallet_addressstringwalletAddresswallet address of contact"0x000000"
wallet_typeWalletTypewalletTypewallet type of contact"eth" or "starknet"

FollowStatus

nametypeformatdesceg
FollowStatus'following' | 'follower' | 'follow_each'-follow status type"follow_each"

FollowOperationParams

nametypeformatdesceg
addressstringwalletAddresswallet address"0x000000"
action"follow" | "cancel"-follow or unfollow"follow"
didTypedidTypedidTypedid type"eth"
targetUseridstringuseriduserid of the target user"user:xxx"

PublishNotificationToFollowersParams

nametypeformatdesceg
contentstring-published content-
titlestring-published title-

MessageStatus

nametypeformatdesceg
MessageStatus"delivered" | "read"-message status"delivered"

MessageListItem

nametypeformatdesceg
cipher_suitestring-Encryption Type"NONE"
fromuserid-message sender user id"user: xxx"
topicstring-current channel if"group: xxx"| "user: xxx"
from_signstring-from signature-
messageidstring-message id-
payload_typestring-payload type-
timestampnumber-time stamp-
message_statusMessageStatus-message status-
payloadstring-payload base64 encode content-
versionsnumber-versions-

SearchUsersResponse

nametypeformatdesceg
useridstringuseriduserid of user"user: xxx"
wallet_addressstringwalletAddresswallet address"0x000000"
wallet_typeWalletTypewalletTypewallet type"eth" or "starknet"

UpdateMyProfileResponse

nametypeformatdesceg
avatar_urlstring-avatar resourcehttps://www.xxx.com
nicknamestring-nickname-
useridstringuseriduserid of user"user:xxx"
wallet_addressstringwalletAddresswallet address"0x000000"
wallet_typeWalletTypewalletTypeuserid of user"eth" or "starknet"

UserBindDidParams

nametypeformatdesceg
did_typedidTypedidTypedid type"eth"
did_valuedidValuedidValuedid value,for example, wallet address"0x000000"
did_actionstring-action of did-
did_contentstring-content of did-
provider_id'web3mq:lens.xyz'| 'web3mq: email:SwapChat'|'web3mq:sms:SwapChat'|'web3mq:ens:SwapChat'|'web3mq:dotbit:SwapChat'-provider id'web3mq:lens.xyz'

UserBindDidIdsResponse

nametypeformatdesceg
did_typedidTypedidTypedid type"eth"
did_valuedidValuedidValuedid value,for example, wallet address"0x000000"
provider_id'web3mq:lens.xyz' | 'web3mq: email:SwapChat' |'web3mq:sms:SwapChat'|'web3mq:ens:SwapChat'|'web3mq:dotbit:SwapChat'-provider id'web3mq:lens.xyz'

UpdateUserPermissionsParams

nametypeformatdesceg
permissionsUserPermissionsType-user permissions{'user: chat': {type: "enum",value: "public"}}

NotifyResponse

nametypeformatdesceg
titlestring-title of notification-
contentstring-content of notification-
type"system.friend_request"|"system.agree_friend_request"|"system.group_invitation"|"subscription"-type of notification-
timestampnumber-time stamp of notification-
versionnumber-version of notification-

SubscribeListType

nametypeformatdesceg
topicidstring-id of the subscribed topic-
create_atnumber-the create time of the subscribed topic-

TopicListType

nametypeformatdesceg
create_atnumber-the create time of the topic-
topicidstring-id of topic-
topic_namestring-the name of the topic-

TopicMessageType

nametypeformatdesceg
contentstring-content of the pushed topic-
topicidstring-id of the pushed topic-
titlestring-title of the pushed topic-

CreateTopicResponse

nametypeformatdesceg
topicidstring-id of the topic-

WalletSignRes

nametypeformatdesceg
publicKeystringtemporaryPublicKeytemporary public key-
signstringwalletSignwallet sign-

GetMainKeypairParams

nametypeformatdesceg
did_typeWalletTypeWalletTypewallet type"metamask"
did_valuedidValuedidValuewallet address"0x000000"
passwordstring-password of user-

GetRegisterSignContentParams

nametypeformatdesceg
didTypeWalletTypeWalletTypewallet type"metamask"
didValuedidValuedidValuedid value,for example, wallet address"0x000000"
mainPublicKeystringPublicKeymaster public key-
signContentURIstring-url of the current pagewindow.location.origin
useridstringuseriduseid of user"user:xxx"

GetSignContentResponse

nametypeformatdesceg
signContentstringsignContentcontent of sign-

DappConnectSignParams

nametypeformatdesceg
didValuedidValuedidValuedid value,for example, wallet address"0x000000"
signContentstringsignContentconent of sign-
signType'get_Keys_For_Login' | 'get_keys_For_Register' | 'register'-type of sign'register'

Web3MQBridgeOptions

nametypeformatdesceg
dAppIDstring-dApp id of user-
wsUrlstringWeb3mqApiEndpointsws url of Web3MQ nodeswss://testnet-ap-aj-2.web3mq.com/

LoginByKeysParams

nametypeformatdesceg
didTypeWalletTypeWalletTypewallet type"metamask"
didValuedidValuedidValuedid value,for example, wallet address"0x000000"
mainPrivateKeystringPrivateKeymaster private key-
mainPublicKeystringPublicKeymaster public key-
passwordstring-Login password-
pubkeyExpiredTimestampnumber-the expiration time of the temporary key pair-
useridstringuseriduseid of user"user:xxx"

RegisterBySignParams

nametypeformatdesceg
avatar_base64string-avatar resource is in base64 format-
avatar_urlstring-avatar resource-
did_pubkeystringtemporaryPublicKeytemporary public key-
didTypeWalletTypeWalletTypewallet type"metamask"
didValuedidValuedidValuedid value,for example, wallet address"0x000000"
mainPublicKeystringPublicKeymaster public key-
nicknamestring-nickname-
signaturestringsignaturecontent of sign-
useridstringuseriduseid of user"user:xxx"

RegisterApiResponse

nametypeformatdesceg
did_typedidTypedidTypedid type"eth"
did_valuedidValuedidValuedid value,for example, wallet address"0x000000"
useridstringuseriduseid of user"user:xxx"

LoginResponse

nametypeformatdesceg
mainPrivateKeystringPrivateKeymaster private key-
mainPublicKeystringPublicKeymaster public key-
tempPrivateKeystringtemporaryPrivateKeytemporary private key-
tempPublicKeystringtemporaryPublicKeytemporary public key-
pubkeyExpiredTimestampnumber-the expiration time of the temporary key pair-

GetUserInfoResponse

nametypeformatdesceg
useridstringuseriduseid of user"user:xxx"
userExistboolean-whether the user existstrue

MainKeypairType

nametypeformatdesceg
secretKeystringPrivateKeymaster private key-
publicKeystringPublicKeymaster public key-

ResetPasswordParams

nametypeformatdesceg
avatar_base64string-avatar resource is in base64 format-
avatar_urlstring-avatar resource-
did_typedidTypedidTypedid type"eth"
did_valuedidValuedidValuedid value,for example, wallet address"0x000000"
nicknamestring-nickname-
passwordstring-Login password-
signaturestringsignaturecontent of sign-
useridstringuseriduseid of user"user:xxx"

ResetPasswordResponse

nametypeformatdesceg
mainPrivateKeystringPrivateKeymaster private key-
mainPublicKeystringPublicKeymaster public key-