@kynesyslabs/demosdk 2.3.6 → 2.3.8
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.
|
@@ -84,12 +84,17 @@ export interface InferFromXPayload extends Web2CoreTargetIdentityPayload {
|
|
|
84
84
|
}
|
|
85
85
|
export interface InferFromTwitterPayload extends InferFromXPayload {
|
|
86
86
|
}
|
|
87
|
+
export interface InferFromTelegramPayload extends Web2CoreTargetIdentityPayload {
|
|
88
|
+
context: "telegram";
|
|
89
|
+
username: string;
|
|
90
|
+
userId: string;
|
|
91
|
+
}
|
|
87
92
|
export interface BaseWeb2IdentityPayload {
|
|
88
93
|
context: "web2";
|
|
89
94
|
}
|
|
90
95
|
export interface Web2IdentityAssignPayload extends BaseWeb2IdentityPayload {
|
|
91
96
|
method: "web2_identity_assign";
|
|
92
|
-
payload: InferFromGithubPayload | InferFromTwitterPayload;
|
|
97
|
+
payload: InferFromGithubPayload | InferFromTwitterPayload | InferFromTelegramPayload;
|
|
93
98
|
}
|
|
94
99
|
export interface Web2IdentityRemovePayload extends BaseWeb2IdentityPayload {
|
|
95
100
|
method: "web2_identity_remove";
|
package/build/types/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { ISecurityReport, SIComlink, SIResponseRegistry, } from "./network/Secur
|
|
|
20
20
|
export { IPeerConfig, IPeer } from "./peers/Peer";
|
|
21
21
|
export { IParam, IRawWeb2Request, IWeb2Request, IWeb2Payload, IWeb2Result, ISendHTTPRequestParams, IAuthorizationException, IAuthorizationConfig, IWeb2RequestOptions, IStartProxyParams, IDAHRStartProxyParams, EnumWeb2Methods, EnumWeb2Actions, } from "./web2";
|
|
22
22
|
export { TweetSimplified, Tweet, TwitterTimelineResponse, TwitterProfile, TwitterFollowersResponse } from "./web2/twitter";
|
|
23
|
+
export { TelegramChallengeRequest, TelegramChallengeResponse, TelegramVerificationResponse, TelegramUser, TelegramVerificationRequest } from "./web2/telegram";
|
|
23
24
|
export { EthTransactionResponse, EthTransaction, SolanaTransactionResponse, SolTransaction } from "./xm/apiTools";
|
|
24
25
|
export { IOperation, ITask, XMScript } from "./xm";
|
|
25
26
|
export { DemoScript } from "./demoswork";
|
package/build/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAsCA,0DAAuE;AAA9D,6GAAA,aAAa,OAAA;AA+BtB,OAAO;AACP,+BAce;AAFX,uGAAA,eAAe,OAAA;AACf,uGAAA,eAAe,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAsCA,0DAAuE;AAA9D,6GAAA,aAAa,OAAA;AA+BtB,OAAO;AACP,+BAce;AAFX,uGAAA,eAAe,OAAA;AACf,uGAAA,eAAe,OAAA;AAgBnB,mDAA4D;AAAnD,sGAAA,SAAS,OAAA;AAOlB,2CAQ0B;AAHtB,qGAAA,YAAY,OAAA;AAEZ,qGAAA,YAAY,OAAA;AAGhB,2CAU4B;AADxB,0GAAA,aAAa,OAAuB;AAgBxC,gDAI2B;AAHvB,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,4GAAA,eAAe,OAAA;AAanB,+BAA+B;AAC/B,gEAG+C;AAF3C,0GAAA,iBAAiB,OAAA;AACjB,8GAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telegram identity verification types for dApp integration
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Request payload for generating a Telegram verification challenge
|
|
6
|
+
*/
|
|
7
|
+
export interface TelegramChallengeRequest {
|
|
8
|
+
/** The Demos address requesting verification */
|
|
9
|
+
demos_address: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Response containing the challenge to be signed by the user
|
|
13
|
+
*/
|
|
14
|
+
export interface TelegramChallengeResponse {
|
|
15
|
+
/** The challenge string that must be signed by the user's wallet */
|
|
16
|
+
challenge: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Response from Telegram identity verification attempt
|
|
20
|
+
*/
|
|
21
|
+
export interface TelegramVerificationResponse {
|
|
22
|
+
/** Whether the verification was successful */
|
|
23
|
+
success: boolean;
|
|
24
|
+
/** Human-readable message describing the result */
|
|
25
|
+
message: string;
|
|
26
|
+
/** The verified Demos address (only present on success) */
|
|
27
|
+
demosAddress?: string;
|
|
28
|
+
/** The verified Telegram identity data (only present on success) */
|
|
29
|
+
telegramData?: {
|
|
30
|
+
userId: string;
|
|
31
|
+
username: string;
|
|
32
|
+
timestamp: number;
|
|
33
|
+
};
|
|
34
|
+
/** Unsigned identity transaction to be signed by user (only present on success) */
|
|
35
|
+
unsignedTransaction?: any;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Telegram user data structure
|
|
39
|
+
*/
|
|
40
|
+
export interface TelegramUser {
|
|
41
|
+
/** Telegram user ID (unique identifier) */
|
|
42
|
+
id: string;
|
|
43
|
+
/** Telegram username (optional, can be changed by user) */
|
|
44
|
+
username?: string;
|
|
45
|
+
/** User's first name */
|
|
46
|
+
first_name: string;
|
|
47
|
+
/** User's last name (optional) */
|
|
48
|
+
last_name?: string;
|
|
49
|
+
/** Whether this user is a bot */
|
|
50
|
+
is_bot: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Telegram verification payload sent by bot to node (internal structure for reference)
|
|
54
|
+
* Note: This is handled internally by the bot and node, dApps don't need to construct this
|
|
55
|
+
*/
|
|
56
|
+
export interface TelegramVerificationRequest {
|
|
57
|
+
/** Telegram user ID from message context */
|
|
58
|
+
telegram_id: string;
|
|
59
|
+
/** Telegram username (optional) */
|
|
60
|
+
username: string;
|
|
61
|
+
/** User's signature of the challenge */
|
|
62
|
+
signed_challenge: string;
|
|
63
|
+
/** Unix timestamp of attestation creation */
|
|
64
|
+
timestamp: number;
|
|
65
|
+
/** Bot's Demos address (must be from genesis) */
|
|
66
|
+
bot_address: string;
|
|
67
|
+
/** Bot's signature of the entire attestation */
|
|
68
|
+
bot_signature: string;
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telegram.js","sourceRoot":"","sources":["../../../../src/types/web2/telegram.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/package.json
CHANGED