@useragent-kit/chat-v2-wasm 0.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@useragent-kit/chat-v2-wasm",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"description": "WASM/JS bindings for the Chat v2 Statement Store protocol",
|
|
5
|
+
"version": "0.4.17",
|
|
6
|
+
"license": "AGPL-3.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/paritytech/useragent-kit"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"useragent_chat_v2_wasm_bg.wasm",
|
|
13
|
+
"useragent_chat_v2_wasm.js",
|
|
14
|
+
"useragent_chat_v2_wasm_bg.js",
|
|
15
|
+
"useragent_chat_v2_wasm.d.ts"
|
|
16
|
+
],
|
|
17
|
+
"main": "useragent_chat_v2_wasm.js",
|
|
18
|
+
"types": "useragent_chat_v2_wasm.d.ts",
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"./useragent_chat_v2_wasm.js",
|
|
21
|
+
"./snippets/*"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export class ChatHandle {
|
|
5
|
+
free(): void;
|
|
6
|
+
[Symbol.dispose](): void;
|
|
7
|
+
constructor();
|
|
8
|
+
scaleDecodeBytes(data: Uint8Array): Uint8Array;
|
|
9
|
+
scaleEncodeBytes(data: Uint8Array): Uint8Array;
|
|
10
|
+
v2ChatRequestDay(unix_timestamp_seconds: number): number;
|
|
11
|
+
v2ChatRequestDayTopic(acceptor_account_id: Uint8Array, day: number): Uint8Array;
|
|
12
|
+
v2ChatRequestFullTopic(acceptor_account_id: Uint8Array): Uint8Array;
|
|
13
|
+
v2ChatRequestSessionTopic(shared_secret: Uint8Array, requester_account_id: Uint8Array, requester_pin: string | null | undefined, acceptor_account_id: Uint8Array, acceptor_pin?: string | null): Uint8Array;
|
|
14
|
+
v2DecodeChatRequest(data: Uint8Array): any;
|
|
15
|
+
v2DecodeEncryptedChatRequest(data: Uint8Array): any;
|
|
16
|
+
v2DecodeMessage(data: Uint8Array): any;
|
|
17
|
+
v2DecodeTransport(aes_key: Uint8Array, data: Uint8Array): any;
|
|
18
|
+
v2EncodeChatAcceptedMessage(message_id: string, timestamp: number, request_id: string): Uint8Array;
|
|
19
|
+
v2EncodeChatRequest(message_id: string, timestamp: number, welcome_text: string | null | undefined, proof_signature: Uint8Array, proof_signer: Uint8Array): Uint8Array;
|
|
20
|
+
v2EncodeChatRequestMessage(message_id: string, timestamp: number, welcome_text?: string | null): Uint8Array;
|
|
21
|
+
v2EncodeChatRequestMessageWithPushToken(message_id: string, timestamp: number, push_token: Uint8Array, push_platform: number, welcome_text?: string | null): Uint8Array;
|
|
22
|
+
v2EncodeChatRequestProofPayload(message_id: string, timestamp: number, welcome_text: string | null | undefined, acceptor_account_id: Uint8Array): Uint8Array;
|
|
23
|
+
v2EncodeChatRequestProofPayloadWithPushToken(message_id: string, timestamp: number, push_token: Uint8Array, push_platform: number, welcome_text: string | null | undefined, acceptor_account_id: Uint8Array): Uint8Array;
|
|
24
|
+
v2EncodeChatRequestWithPushToken(message_id: string, timestamp: number, push_token: Uint8Array, push_platform: number, welcome_text: string | null | undefined, proof_signature: Uint8Array, proof_signer: Uint8Array): Uint8Array;
|
|
25
|
+
v2EncodeCoinageSendMessage(message_id: string, timestamp: number, total_value: string, coin_keys: Array<any>): Uint8Array;
|
|
26
|
+
v2EncodeContactAddedMessage(message_id: string, timestamp: number): Uint8Array;
|
|
27
|
+
v2EncodeDataChannelAnswerMessage(message_id: string, timestamp: number, offer_id: string, sdp: Uint8Array): Uint8Array;
|
|
28
|
+
v2EncodeDataChannelCandidatesMessage(message_id: string, timestamp: number, offer_id: string, sdp: Uint8Array): Uint8Array;
|
|
29
|
+
v2EncodeDataChannelClosedMessage(message_id: string, timestamp: number, offer_id: string): Uint8Array;
|
|
30
|
+
v2EncodeDataChannelOfferMessage(message_id: string, timestamp: number, sdp: Uint8Array, purpose: number): Uint8Array;
|
|
31
|
+
v2EncodeEditedMessage(message_id: string, timestamp: number, referenced_message_id: string, new_text?: string | null): Uint8Array;
|
|
32
|
+
v2EncodeEncryptedChatRequest(encryption_pubkey: Uint8Array, encrypted_request: Uint8Array): Uint8Array;
|
|
33
|
+
v2EncodeLeftChatMessage(message_id: string, timestamp: number): Uint8Array;
|
|
34
|
+
v2EncodeReactedMessage(message_id: string, timestamp: number, referenced_message_id: string, emoji: string): Uint8Array;
|
|
35
|
+
v2EncodeReactionRemovedMessage(message_id: string, timestamp: number, referenced_message_id: string, emoji: string): Uint8Array;
|
|
36
|
+
v2EncodeReplyMessage(message_id: string, timestamp: number, referenced_message_id: string, text?: string | null): Uint8Array;
|
|
37
|
+
v2EncodeRichTextMessage(message_id: string, timestamp: number, text?: string | null): Uint8Array;
|
|
38
|
+
v2EncodeSendLegacyMessage(message_id: string, timestamp: number, amount: string): Uint8Array;
|
|
39
|
+
v2EncodeTextMessage(message_id: string, timestamp: number, text: string): Uint8Array;
|
|
40
|
+
v2EncodeTokenMessage(message_id: string, timestamp: number, amount: string): Uint8Array;
|
|
41
|
+
v2EncodeTransportRequest(aes_key: Uint8Array, request_id: string, messages: Array<any>): Uint8Array;
|
|
42
|
+
v2EncodeTransportResponse(aes_key: Uint8Array, request_id: string, response_code: number): Uint8Array;
|
|
43
|
+
verifySr25519(payload: Uint8Array, signature: Uint8Array, public_key: Uint8Array): boolean;
|
|
44
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* @ts-self-types="./useragent_chat_v2_wasm.d.ts" */
|
|
2
|
+
import * as wasm from "./useragent_chat_v2_wasm_bg.wasm";
|
|
3
|
+
import { __wbg_set_wasm } from "./useragent_chat_v2_wasm_bg.js";
|
|
4
|
+
|
|
5
|
+
__wbg_set_wasm(wasm);
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
ChatHandle
|
|
9
|
+
} from "./useragent_chat_v2_wasm_bg.js";
|