@thru/chain-interfaces 0.0.4 → 0.0.6
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/dist/index.d.ts +5 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/IThruChain.ts +0 -2
- package/src/types.ts +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
* keeps the Surface area aligned with other chain adapters.
|
|
6
6
|
*/
|
|
7
7
|
interface IThruChain {
|
|
8
|
-
/** The active Thru address, if connected. */
|
|
9
|
-
readonly publicKey: string | null;
|
|
10
8
|
/** Indicates whether the wallet has approved a Thru connection. */
|
|
11
9
|
readonly connected: boolean;
|
|
12
10
|
/**
|
|
@@ -29,9 +27,10 @@ declare const AddressType: {
|
|
|
29
27
|
readonly THRU: "thru";
|
|
30
28
|
};
|
|
31
29
|
type AddressType = typeof AddressType[keyof typeof AddressType];
|
|
32
|
-
interface
|
|
33
|
-
|
|
30
|
+
interface WalletAccount {
|
|
31
|
+
accountType: AddressType;
|
|
34
32
|
address: string;
|
|
33
|
+
label: string;
|
|
35
34
|
}
|
|
36
35
|
interface AppMetadata {
|
|
37
36
|
appId: string;
|
|
@@ -41,7 +40,7 @@ interface AppMetadata {
|
|
|
41
40
|
}
|
|
42
41
|
interface ConnectResult {
|
|
43
42
|
walletId?: string;
|
|
44
|
-
|
|
43
|
+
accounts: WalletAccount[];
|
|
45
44
|
status?: 'pending' | 'completed';
|
|
46
45
|
metadata?: AppMetadata;
|
|
47
46
|
}
|
|
@@ -62,4 +61,4 @@ interface SignMessageResult {
|
|
|
62
61
|
publicKey: string;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
export { AddressType, type AppMetadata, type ConnectResult, type ConnectedApp, type IThruChain, type SignMessageParams, type SignMessageResult, type
|
|
64
|
+
export { AddressType, type AppMetadata, type ConnectResult, type ConnectedApp, type IThruChain, type SignMessageParams, type SignMessageResult, type WalletAccount };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"names":[],"mappings":";AAAO,IAAM,WAAA,GAAc;AAAA,EACzB,IAAA,EAAM;AACR","file":"index.js","sourcesContent":["export const AddressType = {\n THRU: 'thru',\n} as const;\n\nexport type AddressType = typeof AddressType[keyof typeof AddressType];\n\nexport interface
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"names":[],"mappings":";AAAO,IAAM,WAAA,GAAc;AAAA,EACzB,IAAA,EAAM;AACR","file":"index.js","sourcesContent":["export const AddressType = {\n THRU: 'thru',\n} as const;\n\nexport type AddressType = typeof AddressType[keyof typeof AddressType];\n\nexport interface WalletAccount {\n accountType: AddressType;\n address: string;\n label: string;\n}\n\nexport interface AppMetadata {\n appId: string;\n appName: string;\n appUrl: string;\n imageUrl?: string;\n}\n\nexport interface ConnectResult {\n walletId?: string;\n accounts: WalletAccount[];\n status?: 'pending' | 'completed';\n metadata?: AppMetadata;\n}\n\nexport interface ConnectedApp {\n accountId: number;\n appId: string;\n origin: string;\n metadata: AppMetadata;\n connectedAt: number;\n updatedAt: number;\n}\n\nexport interface SignMessageParams {\n message: string | Uint8Array;\n networkId: string;\n}\n\nexport interface SignMessageResult {\n signature: Uint8Array;\n publicKey: string;\n}\n"]}
|
package/package.json
CHANGED
package/src/IThruChain.ts
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
* keeps the Surface area aligned with other chain adapters.
|
|
6
6
|
*/
|
|
7
7
|
export interface IThruChain {
|
|
8
|
-
/** The active Thru address, if connected. */
|
|
9
|
-
readonly publicKey: string | null;
|
|
10
8
|
/** Indicates whether the wallet has approved a Thru connection. */
|
|
11
9
|
readonly connected: boolean;
|
|
12
10
|
|
package/src/types.ts
CHANGED
|
@@ -4,9 +4,10 @@ export const AddressType = {
|
|
|
4
4
|
|
|
5
5
|
export type AddressType = typeof AddressType[keyof typeof AddressType];
|
|
6
6
|
|
|
7
|
-
export interface
|
|
8
|
-
|
|
7
|
+
export interface WalletAccount {
|
|
8
|
+
accountType: AddressType;
|
|
9
9
|
address: string;
|
|
10
|
+
label: string;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export interface AppMetadata {
|
|
@@ -18,7 +19,7 @@ export interface AppMetadata {
|
|
|
18
19
|
|
|
19
20
|
export interface ConnectResult {
|
|
20
21
|
walletId?: string;
|
|
21
|
-
|
|
22
|
+
accounts: WalletAccount[];
|
|
22
23
|
status?: 'pending' | 'completed';
|
|
23
24
|
metadata?: AppMetadata;
|
|
24
25
|
}
|