-
-
Notifications
You must be signed in to change notification settings - Fork 0
User
martiliones edited this page Jun 12, 2023
·
1 revision
-
Type
interface User { api: Api; }
The user's ADAMANT address
-
Type
interface User { id: string; }
The user's Public Key
-
Type
interface User { publicKey: string; }
Gets the user's account balance
-
Type
interface User { balance(): Promise<GetAccountBalanceResponseDto>; } interface GetAccountBalanceResponseDto { balance: string; nodeTimestamp: number; success: boolean; unconfirmedBalance: string; }
Returns list of the chat messages between the bot and the user
-
Type
interface User { chatMessages(): Promise<GetChatMessagesResponseDto>; } interface GetChatMessagesResponseDto { messages: (ChatMessageTransaction | TokenTransferTransaction)[]; nodeTimestamp: number; participants: ChatParticipant[]; success: boolean; } type TokenTransferTransaction = { asset: TokenTransferAsset; type: number; } & BaseTransaction; type ChatMessageTransaction = { asset: ChatMessageAsset; type: number; } & BaseTransaction; interface ChatParticipant { address: string; publicKey: string; } interface BaseTransaction { amount: number; asset: object; blockId: string; block_timestamp: number; confirmations: number; fee: number; height: number; id: string; recipientId: string; recipientPublicKey: string; senderId: string; senderPublicKey: string; signature: string; signatures: string[]; timestamp: number; type: number; } type TokenTransferAsset = object; interface ChatMessageAsset { chat: { message?: string; own_message?: string; type?: number }; }
Returns the user's account information using
-
Type
interface User { info(): Promise<GetAccountInfoResponseDto>; } interface GetAccountInfoResponseDto { account: AccountDto; nodeTimestamp: number; success: boolean; } interface AccountDto { address: string; balance: string; multisignatures: string[]; publicKey: string; secondPublicKey: string; secondSignature: number; u_multisignatures: string[]; unconfirmedBalance: string; unconfirmedSignature: number; }
Sends a message to the user
-
Type
interface User { reply( message: string, messageType?: MessageType, amount?: number, isADM?: boolean ): Promise<TransferTokenResponseDto>; } interface TransferTokenResponseDto { nodeTimestamp: number; success: boolean; transactionId: string; }
-
References
Sends the given amount of tokens to the user
-
Type
interface User { send(amount: number, isADM?: boolean): Promise<TransferTokenResponseDto>; } interface TransferTokenResponseDto { nodeTimestamp: number; success: boolean; transactionId: string; }