push_restapi_dart library

Classes

AccountEnvOptionsType
AdditionalMeta
AdditionalMetaType
AddressValidatorsType
AdminPeer
Android
AndroidNotification
Api
ApiNotificationType
ApiPaths
Apns
ApnsPayload
Aps
Broadcast
CAIPDetailsType
CallDetailsType
CHAIN_ID_TO_SOURCE
Chat
CHAT
ChatCreateGroupTypeV2
ChatMemberCounts
ChatMemberProfile
ChatOptionsType
ChatSendOptions
ChatUpdateConfigProfileType
ChatUpdateGroupProfileType
CompositeMessage
ComputedOptions
ConfigType
ConnectedUser
Constants
Content
ConversationHashOptionsType
CreateUser
DataModifier
EmojiReaction
EnableAudioInputOptions
EnableVideoInputOptions
EncryptedPrivateKeyModel
EncryptedPrivateKeyTypeV1
EncryptedPrivateKeyTypeV2
ENCRYPTION_TYPE
EnvOptionsType
EnvProvider
EthWalletProvider
EVENTS
FcmOptions
FeedResponse
Feeds
FetchChatGroupInfoType
FetchLimit
FileMessage
Represents a message containing a file.
FilterOptions
GetGroupParticipantsOptions
Graph
GroupAccess
GroupConfig
GroupCountInfo
GroupCreationOptions
GroupDTO
GroupEventType
GroupInfoDTO
GroupMemberPublicKey
GroupMemberRole
GroupMemberStatus
GroupMeta
GroupUpdateOptions
HttpService
IEncryptedRequest
ImageMessage
Represents a message containing an image.
Info
Initiator
ListenerPeer
LivepeerParticipant
LivepeerStreamDetails
LiveSpaceData
Local
Member
MemberDTO
Message
MessageContent
MessageEvent
MessageEventType
MessageIPFSWithCID
MessageMeta
MessageObj
MessageObject
MessageOrigin
MessageRawData
MessageType
MessageWithCID
Meta
MetaMessage
ModifyRolesType
NestedContent
Notification
NOTIFICATION_TYPE
NotificationAdvanced
NotificationApiPayload
NotificationChannel
NotificationConfig
NotificationContent
NotificationEvent
NotificationEventType
NotificationMessage
NotificationMeta
NotificationOptions
NotificationPayload
NotificationPayloadMeta
NotificationRawData
Pagination
ParticipantStatus
Payload
PayloadData
PayloadOptions
Peer
PeerData
Profile
ProgressHookType
ProposedEventNames
PushAPI
PushAPIInitializeOptions
PushSpaceNotifier
PushStream
PushStreamConnection
PushStreamFilter
PushStreamInitializeOptions
ReactionMessage
ReceiptMessage
ReplyMessage
SendMessage
SendMessagePayload
SendNotificationInputOptions
ShowHttpLogProvider
Signer
SocketInputOptions
SocketOptions
SOCKETTYPES
SOURCE_TYPES
SpaceData
SpaceDTO
SpaceFeeds
SpaceMemberDTO
Subscribers
UpsertDTO
User
UserActivityMessage
UserAPI
UserInfo
UserInfoType
UserProfile
UserProvider
UserV2
VIDEO_CALL_TYPE
VideoAcceptRequestInputOptions
VideoCallBroadcast
VideoCallData
VideoCallIncoming
VideoCallInfoType
VideoCallInitiator
VideoCallLocal
VideoCallStateNotifier
VideoCallType
VideoConnectInputOptions
VideoCreateInputOptions
VideoDataType
VideoRequestInputDetails
VideoRequestInputOptions
Wallet

Extensions

STREAMExtension on STREAM

Properties

addressValidators AddressValidatorsType
getter/setter pair
CONFIG Map<ENV, Map<String?, ConfigType>>
final
envProvider → StateNotifierProvider<EnvProvider, ENV>
final
http HttpService
getter/setter pair
ibanLookup Map<String, String>
getter/setter pair
initLiveSpaceData LiveSpaceData
getter/setter pair
initVideoCallData VideoCallData
getter/setter pair
PROGRESSHOOK Map<String, dynamic>
final
providerContainer → ProviderContainer
final
PushVideoCallProvider → ChangeNotifierProvider<VideoCallStateNotifier>
final
safeDigits int
getter/setter pair
showHttpLogProvider → StateNotifierProvider<ShowHttpLogProvider, bool>
final
userEthWalletProvider → StateNotifierProvider<EthWalletProvider, Wallet?>
final
userProvider → StateNotifierProvider<UserProvider, User?>
final

Functions

acceptPromotionRequest_({required SpaceData data, required String promoteeAddress}) Future<SpaceData>
addAdmins({required String chatId, String? account, Signer? signer, String? pgpPrivateKey, required List<String> admins}) Future<GroupInfoDTO?>
addDeprecatedInfo(List<Feeds> chats) List<Feeds>
addDeprecatedInfoSpaceFeeds(List<SpaceFeeds> chats) List<SpaceFeeds>
addDeprecatedInfoToMessages(List<Message> chats) List<Message>
addListeners({required String spaceId, String? account, Signer? signer, String? pgpPrivateKey, required List<String> listeners}) Future<SpaceDTO>
addMembers({required String chatId, String? account, Signer? signer, String? pgpPrivateKey, required List<String> members}) Future<GroupInfoDTO?>
addSpeakers({required String spaceId, String? account, Signer? signer, String? pgpPrivateKey, required List<String> speakers}) Future<SpaceDTO>
aesDecrypt({required String cipherText, required String secretKey}) String
aesEncrypt({required String plainText, required String secretKey}) Future<String>
approve({required String senderAddress, String? account, Signer? signer, String? pgpPrivateKey, String status = 'Approved'}) Future<String?>
approveSpaceRequest({required String senderAddress, String? account, Signer? signer, String? pgpPrivateKey, dynamic status = 'Approved'}) Future<String?>
authUpdate({required String pgpPrivateKey, required String pgpEncryptionVersion, Wallet? wallet, required String pgpPublicKey, required String account, dynamic additionalMeta}) Future<User?>
authUpdateUserService({required String address, dynamic wallet, required String publicKey, required String encryptedPrivateKey}) Future<User?>
base16To36(String base16Number) String
base36To16(String base36Number) String
base36ToDecimal(String base36Number) BigInt
bytesToHex(List<int> bytes) String
chat({String? accountAddress, String? pgpPrivateKey, required String recipient, bool toDecrypt = true}) Future<Feeds?>
Return the latest message from all wallet addresses you have talked to. This can be used when building the inbox page.
chats({String? accountAddress, String? pgpPrivateKey, bool toDecrypt = false, int page = 1, int limit = 10}) Future<List<Feeds>?>
Return the latest message from all wallet addresses you have talked to. This can be used when building the inbox page.
chatStatusFromString(String status) ChatStatus
chatStringFromChatStatus(ChatStatus? status) String?
computeOptions(ChatSendOptions options) ComputedOptions
conversationHash({required String conversationId, String? accountAddress}) Future<String?>
All chat messages are stored on IPFS. This function will return the latest message's CID (Content Identifier on IPFS). Whenever a new message is sent or received, this CID will change.
convertToWalletAddressList(List<MemberDTO> memberList) List<String>
convertToWalletAddressListV2(List<SpaceMemberDTO> memberList) List<String>
createGroup({String? account, Signer? signer, required String groupName, required String groupDescription, String? groupImage, required List<String> members, required List<String> admins, required bool isPublic, String? contractAddressNFT, int? numberOfNFTs, String? contractAddressERC20, int? numberOfERC20, String? pgpPrivateKey, String? meta, String? groupType, DateTime? scheduleAt, DateTime? scheduleEnd}) Future<GroupDTO?>
createGroupCoreV2({required ChatCreateGroupTypeV2 options}) Future<GroupInfoDTO?>
createGroupRequestValidator({required String groupName, required String groupDescription, required List<String> members, required List<String> admins, String? contractAddressNFT, int? numberOfNFTs, String? contractAddressERC20, int? numberOfERC20}) → void
createGroupV2({required ChatCreateGroupTypeV2 options}) Future<GroupInfoDTO?>
createGroupV2OptionsValidator({required ChatCreateGroupTypeV2 options}) → void
createIbanLookup() → void
createSocketConnection(SocketInputOptions options) Future<Socket?>
createSpace({String? account, Signer? signer, required String spaceName, required String spaceDescription, String? spaceImage, required List<String> listeners, required List<String> speakers, bool isPublic = true, String? contractAddressNFT, int? numberOfNFTs, String? contractAddressERC20, int? numberOfERC20, String? pgpPrivateKey, String? meta, required DateTime scheduleAt, DateTime? scheduleEnd}) Future<SpaceDTO?>
createUint8ListFromString(String s) Uint8List
createUser({required Signer signer, String version = ENCRYPTION_TYPE.PGP_V3, required dynamic progressHook(ProgressHookType)}) Future<CreateUser>
createUserCore({required Signer signer, String version = ENCRYPTION_TYPE.PGP_V3, required dynamic progressHook(ProgressHookType)}) Future<CreateUser>
createUserEmpty({required String accountAddress}) Future<User?>
createUserService({required String user, Wallet? wallet, required String publicKey, required String encryptedPrivateKey}) Future<User>
decimalToBase36(BigInt decimalValue) String
decryptAndVerifyMessage({required Message message, required String pgpPublicKey, required String pgpPrivateKey}) Future<Message>
Decrypts and verifies a Push Chat Message
decryptAuth({String? account, Signer? signer, required dynamic additionalMeta, Function? progressHook}) Future<String>
decryptConversation({required List<Message> messages, required User? connectedUser, required String pgpPrivateKey}) Future<List<Message>>
decryptFeeds({required List<Feeds> feeds, required User connectedUser, required String pgpPrivateKey}) Future<List<Feeds>>
decryptPGPKey({required String encryptedPGPPrivateKey, required Wallet wallet, bool? toUpgrade = false, dynamic additionalMeta, Function? progressHook}) Future<String>
decryptSpaceFeeds({required List<SpaceFeeds> feeds, required User connectedUser, required String pgpPrivateKey}) Future<List<SpaceFeeds>>
decryptV2({required EncryptedPrivateKeyModel encryptedData, required List<int> secret}) Future<List<int>>
AES-GCM Decryption
deriveKeyAndIV(String passphrase, Uint8List salt) List<Uint8List>
encryptAndSignCore({required String plainText, required List<String> keys, required String senderPgpPrivateKey, String? secretKey}) Future<Map<String, String>>
encryptPGPKey({String encryptionType = Constants.ENC_TYPE_V3, required String generatedPrivateKey, required Wallet wallet, dynamic additionalMeta}) Future<EncryptedPrivateKeyModel>
encryptV1(String text, String encryptionPublicKey, String version) EncryptedPrivateKeyModel
encryptV2({required List<int> data, required List<int> secret}) Future<EncryptedPrivateKeyModel>
AES-GCM Encryption
endStream(MediaStream stream) → void
generateHash(dynamic message) String
generateKeyPair() Future<KeyPair>
generateRandomBytes(int count) List<int>
This produces a list of count random bytes.
generateRandomSecret(int length) String
genRandomWithNonZero(int seedLength) Uint8List
getAccountAddress(Wallet wallet) String
getAddress(String address) String
getAdminsList(List<MemberDTO>? members, List<MemberDTO>? pendingMembers) List<String>
getAllGroupMembers({required String chatId}) Future<List<ChatMemberProfile>>
getAllGroupMembersPublicKeys({required String chatId}) Future<List<GroupMemberPublicKey>>
getBatch({required List<String> userIds}) → dynamic
getCachedENV() ENV
getCachedUser() User?
getCachedWallet() Wallet?
getCAIPAddress({required String address}) Future<String>
getCAIPDetails(String addressInCAIP) CAIPDetailsType?
getCAIPWithChainId(String address, int chainId, [String? msg]) String
getChecksumAddress(String address) String
getCID({required String cid}) Future<Message?>
getConnectedUserV2({required Wallet wallet, String? privateKey}) Future<ConnectedUser>
getConnectedUserV2Core({required Wallet wallet, String? privateKey}) Future<ConnectedUser>
getConversationHashService({required String conversationId, required String account}) → dynamic
getDecryptedPrivateKey({required Wallet wallet, required User user, required String address}) Future<String>
getDelegations({required String address}) → dynamic
getDomainInformation(int chainId) Map<String, dynamic>
getEip191Signature(Wallet wallet, String message, {String version = 'v1'}) Future<Map<String, dynamic>>
getEip712Signature(Wallet wallet, String hash, bool isDomainEmpty) Future<Map<String, dynamic>>
getEncryptedRequestCore({required String receiverAddress, required ConnectedUser senderConnectedUser, required String message, required bool isGroup, GroupInfoDTO? group, required String secretKey}) Future<IEncryptedRequest>
getEncryptedSecret({required String sessionKey}) Future<String>
getFallbackETHCAIPAddress({ENV? env, required String address}) String
getFeeds({required String address, int page = Pagination.INITIAL_PAGE, int limit = Pagination.LIMIT, bool spam = false, bool raw = false}) Future<List<FeedResponse>?>
getGroup({required String chatId}) Future<GroupDTO>
getGroupAccess({required String chatId, required String did}) Future<GroupAccess>
getGroupByName({required String groupName}) Future<GroupDTO?>
getGroupInfo({required String chatId}) Future<GroupInfoDTO>
getGroupMemberCount({required String chatId}) Future<ChatMemberCounts>
getGroupMembers({required FetchChatGroupInfoType options}) Future<List<ChatMemberProfile>>
getGroupMembersPublicKeys({required String chatId, int page = 1, int limit = 20}) Future<List<GroupMemberPublicKey>>
getGroupMemberStatus({required String chatId, required String did}) Future<GroupMemberStatus>
getIceServerConfig() Future
getInboxList({required List<Feeds> feedsList, required String accountAddress, required String? pgpPrivateKey, required bool toDecrypt}) Future<List<Feeds>>
getIncomingIndexFromAddress(List<PeerData> incomingPeers, String address) int
getLatestLiveSpaceData({String? accountAddress, String? pgpPrivateKey, required String spaceId}) Future<LiveSpaceData>
getMembersList(List<MemberDTO> members, List<MemberDTO> pendingMembers) List<String>
getMessagesService({required String threadhash, required int limit}) Future<List<Message>?>
getPublicKeyFromString(String pgpPublicKeyString) String
getQueryParams(Map data) String
getRandomValues(Uint8List array) Future<Uint8List>
getSpaceAdminsList(List<SpaceMemberDTO>? members, List<SpaceMemberDTO>? pendingMembers) List<String>
getSpaceById({required String spaceId}) Future<SpaceDTO>
getSpaceInboxList({required List<SpaceFeeds> feedsList, required String user, required String? pgpPrivateKey, required bool toDecrypt}) Future<List<SpaceFeeds>>
getSpacesMembersList(List<SpaceMemberDTO> members, List<SpaceMemberDTO> pendingMembers) List<String>
getSubscriptions({required String address}) → dynamic
getTrendingSpaceInboxList({required List<SpaceFeeds> feedsList}) Future<List<SpaceFeeds>>
getTypeInformation() Map<String, dynamic>
getUser({required String address}) Future<User?>
getUserDID({required String address}) Future<String>
getWallet({String? address, Signer? signer}) Wallet
groupDtoToSpaceDto(GroupDTO groupDto) SpaceDTO
groupInfoDtoToSpaceDto(GroupInfoDTO groupDto) SpaceDTO
hexToBytes(String hex) List<int>
hexToBytesInternal(String hex) Uint8List
history({required String threadhash, String? accountAddress, int limit = FetchLimit.DEFAULT, String? pgpPrivateKey, bool toDecrypt = false}) Future<List<Message>?>
hkdf(List<int> secret, List<int> salt) Future<SecretKey>
ibanChecksum(String address) String
initPush({ENV env = ENV.prod, Wallet? wallet, bool showHttpLog = false}) Future
isAddress(String address) bool
isGroup(String address) bool
isGroupChatId(String id) bool
isHexString(String value, int length) bool
isHost({required String hostAddress, required String errorMessage}) → dynamic
Verifies if the local user's address matches the host's address. If not, throws an exception with a custom error message.
isJson(String input) bool
isValidCAIP10NFTAddress(String? wallet) bool
isValidETHAddress(String address) bool
isValidNFTCAIP10Address(String realCAIP10) bool
latest({required String threadhash, String? accountAddress, String? pgpPrivateKey, bool toDecrypt = false}) Future<Message?>
Get the latest chat message
log(Object? data) → dynamic
modifyRoles({required ModifyRolesType options}) Future<GroupInfoDTO?>
parseApiResponse(List response) List<FeedResponse>
pCAIP10ToWallet(String wallet) String
pgpDecrypt({required String cipherText, required String privateKeyArmored}) Future<String>
pgpEncrypt({required String plainText, required List<String> keys}) Future<String>
populateDeprecatedUser({required User user}) Future<User>
preparePGPPublicKey({String encryptionType = Constants.ENC_TYPE_V3, required String generatedPublicKey, required Wallet wallet}) Future<String>
profileUpdate({required String pgpPrivateKey, required String account, required Profile profile}) Future<User?>
reject({required String senderAddress, String? account, Signer? signer, String? pgpPrivateKey}) Future<String?>
Reject Chat Request
rejectPromotionRequest_({required SpaceData data, required String promoteeAddress}) SpaceData
removeAdmins({required String chatId, String? account, Signer? signer, String? pgpPrivateKey, required List<String> admins}) Future<GroupInfoDTO?>
removeListeners({required String spaceId, String? account, Signer? signer, String? pgpPrivateKey, required List<String> listeners}) Future<SpaceDTO>
removeMembers({required String chatId, String? account, Signer? signer, String? pgpPrivateKey, required List<String> members}) Future<GroupInfoDTO?>
removeSpeakers({required String spaceId, String? account, Signer? signer, String? pgpPrivateKey, required List<String> speakers}) Future<SpaceDTO>
removeVersionFromPublicKey(String key) String
requests({String? accountAddress, String? pgpPrivateKey, bool toDecrypt = false, int page = 1, int limit = 10}) Future<List<Feeds>?>
The first time an address wants to send a message to another peer, the address sends an intent request. This first message shall not land in this peer Inbox but in its Request box. This function will return all the chats that landed on the address' Request box. The user can then approve the request or ignore it for now.
requestToBePromoted_({required SpaceData data}) SpaceData
restartAudioStream(MediaStream stream) → void
restartVideoStream(MediaStream stream) → void
searchSpaces({required String searchTerm, int pageNumber = 1, int pageSize = 20}) Future<List<SpaceDTO>>
send(ChatSendOptions options) Future<MessageWithCID?>
sendLiveSpaceData({required String messageType, required LiveSpaceData updatedLiveSpaceData, required String content, required List<String> affectedAddresses, required String spaceId}) Future
sendMessagePayloadCore({required String receiverAddress, required ConnectedUser senderConnectedUser, String? senderAddress, String? senderPgpPrivateKey, required String messageType, required String messageContent, dynamic messageObj, GroupInfoDTO? group, required bool isGroup}) Future<SendMessagePayload>
sendMessageService(SendMessagePayload payload, bool isIntent) Future<MessageWithCID?>
sendNotification(SendNotificationInputOptions options) Future
sendVideoCallNotification(UserInfoType userInfo, VideoCallInfoType videoCallInfo) Future<void>
setHandRaisedForListener({required bool handRaised, required String listenerAddress, required SpaceData spaceData}) SpaceData
sign({required String message, required String privateKey}) Future<String>
signMessageWithPGPCore({required String message, required String privateKeyArmored}) Future<String>
spaceRequests({String? accountAddress, String? pgpPrivateKey, bool toDecrypt = false, int page = 1, int limit = 10}) Future<List<SpaceFeeds>?>
The first time an address wants to send a message to another peer, the address sends an intent request. This first message shall not land in this peer Inbox but in its Request box. This function will return all the chats that landed on the address' Request box. The user can then approve the request or ignore it for now.
spaces({String? accountAddress, String? pgpPrivateKey, bool toDecrypt = false, int page = 1, int limit = 10}) Future<List<SpaceFeeds>?>
Return the latest message from all wallet addresses you have talked to. This can be used when building the inbox page.
start_({String? accountAddress, Signer? signer, String? pgpPrivateKey, required String spaceId, required dynamic progressHook(ProgressHookType), required dynamic updateRoom(Room?)}) Future<SpaceData?>
stopAudioStream(MediaStream stream) → void
stopVideoStream(MediaStream stream) → void
stringToHex(String input) String
page index - default 1 limit: no of items per page - default 10 - max 30
updateGroup({required String chatId, String? account, Signer? signer, required String groupName, required String groupDescription, String? groupImage, required List<String> members, required List<String> admins, required bool isPublic, String? pgpPrivateKey, String? meta, DateTime? scheduleAt, DateTime? scheduleEnd, ChatStatus? status, Map<String, dynamic>? rules}) Future<GroupDTO?>
updateGroupConfig({required ChatUpdateConfigProfileType options}) Future<GroupDTO>
updateGroupCore({required String chatId, String? account, Signer? signer, required String groupName, required String groupDescription, String? groupImage, required List<String> members, required List<String> admins, required bool isPublic, String? pgpPrivateKey, String? meta, DateTime? scheduleAt, DateTime? scheduleEnd, ChatStatus? status, Map<String, dynamic>? rules}) Future<GroupDTO?>
updateGroupMembers({String? account, Signer? signer, required String chatId, UpsertDTO? upsert, List<String> remove = const [], String? pgpPrivateKey}) Future<GroupInfoDTO?>
updateGroupProfile({required ChatUpdateGroupProfileType options}) Future<GroupInfoDTO>
updateGroupRequestValidator(String chatId, String groupName, String groupDescription, String? groupImage, List<String> members, List<String> admins, String address) → void
updateSpace({String? account, Signer? signer, required String spaceId, required String spaceName, required String spaceDescription, String? spaceImage, required List<String> listeners, required List<String> speakers, String? pgpPrivateKey, String? meta, required DateTime scheduleAt, DateTime? scheduleEnd, required ChatStatus status}) Future<SpaceDTO?>
upgrade({String? account, Signer? signer, dynamic additionalMeta, required dynamic progressHook(ProgressHookType)}) Future<User?>
validateCAIP(String addressInCAIP) bool
validateGroupMemberUpdateOptions({required String chatId, required UpsertDTO upsert, required List<String> remove}) → void
validateOptions(SendNotificationInputOptions options) → void
validatePassword(String password) → void
validateScheduleDates({DateTime? scheduleAt, DateTime? scheduleEnd}) → void
validateSendOptions(ComputedOptions options) Future
verifyProfileKeys({required String encryptedPrivateKey, required String publicKey, required String did, required String caip10, required String verificationProof}) → dynamic
verifySignature({required String messageContent, required String signatureArmored, required String publicKeyArmored}) Future<void>
walletToPCAIP10(String account) String