@dcl/sdk 7.0.0-2982061039.commit-9cc9ea8 → 7.0.0-3008112906.commit-524d1bd
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/ecs7/index.d.ts +328 -0
- package/dist/ecs7/index.js +502 -4
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/package.json +5 -5
- package/types/ecs7/index.d.ts +328 -0
- package/types/rpc-modules/CommunicationsController/index.d.ts +14 -0
- package/types/rpc-modules/DevTools/index.d.ts +15 -0
- package/types/rpc-modules/EngineAPI/index.d.ts +160 -0
- package/types/rpc-modules/EnvironmentAPI/index.d.ts +81 -0
- package/types/rpc-modules/EthereumController/index.d.ts +60 -0
- package/types/rpc-modules/ExperimentalAPI/index.d.ts +20 -0
- package/types/rpc-modules/ParcelIdentity/index.d.ts +48 -0
- package/types/rpc-modules/Permissions/index.d.ts +30 -0
- package/types/rpc-modules/Players/index.d.ts +52 -0
- package/types/rpc-modules/PortableExperiences/index.d.ts +38 -0
- package/types/rpc-modules/RestrictedActions/index.d.ts +26 -0
- package/types/rpc-modules/SceneStateStorageController/index.d.ts +90 -0
- package/types/rpc-modules/SignedFetch/index.d.ts +37 -0
- package/types/rpc-modules/SocialController/index.d.ts +18 -0
- package/types/rpc-modules/UserActionModule/index.d.ts +14 -0
- package/types/rpc-modules/UserIdentity/index.d.ts +45 -0
- package/types/tsconfig.ecs7.json +15 -11
- package/types/@decentraland/CommunicationsController/index.d.ts +0 -7
- package/types/@decentraland/EnvironmentAPI/index.d.ts +0 -45
- package/types/@decentraland/EthereumController/index.d.ts +0 -47
- package/types/@decentraland/Identity/index.d.ts +0 -44
- package/types/@decentraland/ParcelIdentity/index.d.ts +0 -49
- package/types/@decentraland/Players/index.d.ts +0 -49
- package/types/@decentraland/PortableExperiences/index.d.ts +0 -39
- package/types/@decentraland/RestrictedActions/index.d.ts +0 -41
- package/types/@decentraland/SignedFetch/index.d.ts +0 -16
- package/types/@decentraland/SocialController/index.d.ts +0 -1
- package/types/@decentraland/web3-provider/index.d.ts +0 -7
@@ -0,0 +1,60 @@
|
|
1
|
+
declare module "~system/EthereumController" {
|
2
|
+
|
3
|
+
export interface RequirePaymentRequest {
|
4
|
+
toAddress: string;
|
5
|
+
amount: number;
|
6
|
+
currency: string;
|
7
|
+
}
|
8
|
+
export interface RequirePaymentResponse {
|
9
|
+
jsonAnyResponse: string;
|
10
|
+
}
|
11
|
+
export interface SignMessageRequest {
|
12
|
+
message: {
|
13
|
+
[key: string]: string;
|
14
|
+
};
|
15
|
+
}
|
16
|
+
export interface SignMessageRequest_MessageEntry {
|
17
|
+
key: string;
|
18
|
+
value: string;
|
19
|
+
}
|
20
|
+
export interface SignMessageResponse {
|
21
|
+
message: string;
|
22
|
+
hexEncodedMessage: string;
|
23
|
+
signature: string;
|
24
|
+
}
|
25
|
+
export interface ConvertMessageToObjectRequest {
|
26
|
+
message: string;
|
27
|
+
}
|
28
|
+
export interface ConvertMessageToObjectResponse {
|
29
|
+
dict: {
|
30
|
+
[key: string]: string;
|
31
|
+
};
|
32
|
+
}
|
33
|
+
export interface ConvertMessageToObjectResponse_DictEntry {
|
34
|
+
key: string;
|
35
|
+
value: string;
|
36
|
+
}
|
37
|
+
export interface SendAsyncRequest {
|
38
|
+
id: number;
|
39
|
+
method: string;
|
40
|
+
jsonParams: string;
|
41
|
+
}
|
42
|
+
export interface SendAsyncResponse {
|
43
|
+
jsonAnyResponse: string;
|
44
|
+
}
|
45
|
+
export interface GetUserAccountRequest {
|
46
|
+
}
|
47
|
+
export interface GetUserAccountResponse {
|
48
|
+
address?: string | undefined;
|
49
|
+
}
|
50
|
+
|
51
|
+
// ########### BLOCK
|
52
|
+
|
53
|
+
// importtype { RequirePaymentRequest, RequirePaymentResponse, SignMessageRequest, SignMessageResponse, ConvertMessageToObjectRequest, ConvertMessageToObjectResponse, SendAsyncRequest, SendAsyncResponse, GetUserAccountRequest, GetUserAccountResponse } from "proto/EthereumController.gen";
|
54
|
+
export function requirePayment(body: RequirePaymentRequest): Promise<RequirePaymentResponse>;
|
55
|
+
export function signMessage(body: SignMessageRequest): Promise<SignMessageResponse>;
|
56
|
+
export function convertMessageToObject(body: ConvertMessageToObjectRequest): Promise<ConvertMessageToObjectResponse>;
|
57
|
+
export function sendAsync(body: SendAsyncRequest): Promise<SendAsyncResponse>;
|
58
|
+
export function getUserAccount(body: GetUserAccountRequest): Promise<GetUserAccountResponse>;
|
59
|
+
|
60
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
declare module "~system/ExperimentalAPI" {
|
2
|
+
|
3
|
+
export interface SendToRendererRequest {
|
4
|
+
data: Uint8Array;
|
5
|
+
}
|
6
|
+
export interface SendToResponse {
|
7
|
+
}
|
8
|
+
export interface MessageFromRendererRequest {
|
9
|
+
}
|
10
|
+
export interface MessageFromRendererResponse {
|
11
|
+
data: Uint8Array[];
|
12
|
+
}
|
13
|
+
|
14
|
+
// ########### BLOCK
|
15
|
+
|
16
|
+
// importtype { SendToRendererRequest, SendToResponse, MessageFromRendererRequest, MessageFromRendererResponse } from "proto/ExperimentalAPI.gen";
|
17
|
+
export function sendToRenderer(body: SendToRendererRequest): Promise<SendToResponse>;
|
18
|
+
export function messageFromRenderer(body: MessageFromRendererRequest): Promise<MessageFromRendererResponse>;
|
19
|
+
|
20
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
declare module "~system/ParcelIdentity" {
|
2
|
+
|
3
|
+
|
4
|
+
export interface ContentMapping {
|
5
|
+
file: string;
|
6
|
+
hash: string;
|
7
|
+
}
|
8
|
+
|
9
|
+
// ########### BLOCK
|
10
|
+
|
11
|
+
// importtype { ContentMapping } from "proto/common/ContentMapping.gen";
|
12
|
+
export interface MappingsResponse {
|
13
|
+
parcelId: string;
|
14
|
+
rootCid: string;
|
15
|
+
contents: ContentMapping[];
|
16
|
+
}
|
17
|
+
export interface Land {
|
18
|
+
sceneId: string;
|
19
|
+
sceneJsonData: string;
|
20
|
+
baseUrl: string;
|
21
|
+
baseUrlBundles: string;
|
22
|
+
mappingsResponse: MappingsResponse | undefined;
|
23
|
+
}
|
24
|
+
export interface GetParcelRequest {
|
25
|
+
}
|
26
|
+
export interface GetParcelResponse {
|
27
|
+
land: Land | undefined;
|
28
|
+
cid: string;
|
29
|
+
}
|
30
|
+
export interface GetSceneIdRequest {
|
31
|
+
}
|
32
|
+
export interface GetSceneIdResponse {
|
33
|
+
sceneId: string;
|
34
|
+
}
|
35
|
+
export interface GetIsEmptyRequest {
|
36
|
+
}
|
37
|
+
export interface GetIsEmptyResponse {
|
38
|
+
isEmpty: boolean;
|
39
|
+
}
|
40
|
+
|
41
|
+
// ########### BLOCK
|
42
|
+
|
43
|
+
// importtype { GetParcelRequest, GetParcelResponse, GetSceneIdRequest, GetSceneIdResponse, GetIsEmptyRequest, GetIsEmptyResponse } from "proto/ParcelIdentity.gen";
|
44
|
+
export function getParcel(body: GetParcelRequest): Promise<GetParcelResponse>;
|
45
|
+
export function getSceneId(body: GetSceneIdRequest): Promise<GetSceneIdResponse>;
|
46
|
+
export function getIsEmpty(body: GetIsEmptyRequest): Promise<GetIsEmptyResponse>;
|
47
|
+
|
48
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
declare module "~system/Permissions" {
|
2
|
+
|
3
|
+
export enum PermissionItem {
|
4
|
+
ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE = 0,
|
5
|
+
ALLOW_TO_TRIGGER_AVATAR_EMOTE = 1,
|
6
|
+
USE_WEB3_API = 2,
|
7
|
+
USE_WEBSOCKET = 3,
|
8
|
+
USE_FETCH = 4,
|
9
|
+
UNRECOGNIZED = -1
|
10
|
+
}
|
11
|
+
export interface PermissionResponse {
|
12
|
+
hasPermission: boolean;
|
13
|
+
}
|
14
|
+
export interface HasPermissionRequest {
|
15
|
+
permission: PermissionItem;
|
16
|
+
}
|
17
|
+
export interface HasManyPermissionRequest {
|
18
|
+
permissions: PermissionItem[];
|
19
|
+
}
|
20
|
+
export interface HasManyPermissionResponse {
|
21
|
+
hasManyPermission: boolean[];
|
22
|
+
}
|
23
|
+
|
24
|
+
// ########### BLOCK
|
25
|
+
|
26
|
+
// importtype { HasPermissionRequest, PermissionResponse, HasManyPermissionRequest, HasManyPermissionResponse } from "proto/Permissions.gen";
|
27
|
+
export function hasPermission(body: HasPermissionRequest): Promise<PermissionResponse>;
|
28
|
+
export function hasManyPermissions(body: HasManyPermissionRequest): Promise<HasManyPermissionResponse>;
|
29
|
+
|
30
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
declare module "~system/Players" {
|
2
|
+
|
3
|
+
|
4
|
+
export interface Snapshots {
|
5
|
+
face256: string;
|
6
|
+
body: string;
|
7
|
+
}
|
8
|
+
export interface AvatarForUserData {
|
9
|
+
bodyShape: string;
|
10
|
+
skinColor: string;
|
11
|
+
hairColor: string;
|
12
|
+
eyeColor: string;
|
13
|
+
wearables: string[];
|
14
|
+
snapshots: Snapshots | undefined;
|
15
|
+
}
|
16
|
+
export interface UserData {
|
17
|
+
displayName: string;
|
18
|
+
publicKey?: string | undefined;
|
19
|
+
hasConnectedWeb3: boolean;
|
20
|
+
userId: string;
|
21
|
+
version: number;
|
22
|
+
avatar: AvatarForUserData | undefined;
|
23
|
+
}
|
24
|
+
|
25
|
+
// ########### BLOCK
|
26
|
+
|
27
|
+
// importtype { UserData } from "proto/common/UserData.gen";
|
28
|
+
export interface Player {
|
29
|
+
userId: string;
|
30
|
+
}
|
31
|
+
export interface PlayersGetUserDataResponse {
|
32
|
+
data?: UserData | undefined;
|
33
|
+
}
|
34
|
+
export interface PlayerListResponse {
|
35
|
+
players: Player[];
|
36
|
+
}
|
37
|
+
export interface GetPlayerDataRequest {
|
38
|
+
userId: string;
|
39
|
+
}
|
40
|
+
export interface GetPlayersInSceneRequest {
|
41
|
+
}
|
42
|
+
export interface GetConnectedPlayersRequest {
|
43
|
+
}
|
44
|
+
|
45
|
+
// ########### BLOCK
|
46
|
+
|
47
|
+
// importtype { GetPlayerDataRequest, PlayersGetUserDataResponse, GetPlayersInSceneRequest, PlayerListResponse, GetConnectedPlayersRequest } from "proto/Players.gen";
|
48
|
+
export function getPlayerData(body: GetPlayerDataRequest): Promise<PlayersGetUserDataResponse>;
|
49
|
+
export function getPlayersInScene(body: GetPlayersInSceneRequest): Promise<PlayerListResponse>;
|
50
|
+
export function getConnectedPlayers(body: GetConnectedPlayersRequest): Promise<PlayerListResponse>;
|
51
|
+
|
52
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
declare module "~system/PortableExperiences" {
|
2
|
+
|
3
|
+
export interface KillRequest {
|
4
|
+
pid: string;
|
5
|
+
}
|
6
|
+
export interface KillResponse {
|
7
|
+
status: boolean;
|
8
|
+
}
|
9
|
+
export interface SpawnRequest {
|
10
|
+
pid: string;
|
11
|
+
}
|
12
|
+
export interface SpawnResponse {
|
13
|
+
pid: string;
|
14
|
+
parentCid: string;
|
15
|
+
}
|
16
|
+
export interface PxRequest {
|
17
|
+
pid: string;
|
18
|
+
}
|
19
|
+
export interface GetPortableExperiencesLoadedRequest {
|
20
|
+
}
|
21
|
+
export interface GetPortableExperiencesLoadedResponse {
|
22
|
+
loaded: SpawnResponse[];
|
23
|
+
}
|
24
|
+
export interface ExitRequest {
|
25
|
+
}
|
26
|
+
export interface ExitResponse {
|
27
|
+
status: boolean;
|
28
|
+
}
|
29
|
+
|
30
|
+
// ########### BLOCK
|
31
|
+
|
32
|
+
// importtype { SpawnRequest, SpawnResponse, KillRequest, KillResponse, ExitRequest, ExitResponse, GetPortableExperiencesLoadedRequest, GetPortableExperiencesLoadedResponse } from "proto/PortableExperiences.gen";
|
33
|
+
export function spawn(body: SpawnRequest): Promise<SpawnResponse>;
|
34
|
+
export function kill(body: KillRequest): Promise<KillResponse>;
|
35
|
+
export function exit(body: ExitRequest): Promise<ExitResponse>;
|
36
|
+
export function getPortableExperiencesLoaded(body: GetPortableExperiencesLoadedRequest): Promise<GetPortableExperiencesLoadedResponse>;
|
37
|
+
|
38
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
declare module "~system/RestrictedActions" {
|
2
|
+
|
3
|
+
export interface Vector3 {
|
4
|
+
x: number;
|
5
|
+
y: number;
|
6
|
+
z: number;
|
7
|
+
}
|
8
|
+
export interface MovePlayerToResponse {
|
9
|
+
}
|
10
|
+
export interface MovePlayerToRequest {
|
11
|
+
newRelativePosition: Vector3 | undefined;
|
12
|
+
cameraTarget?: Vector3 | undefined;
|
13
|
+
}
|
14
|
+
export interface TriggerEmoteResponse {
|
15
|
+
}
|
16
|
+
export interface TriggerEmoteRequest {
|
17
|
+
predefinedEmote: string;
|
18
|
+
}
|
19
|
+
|
20
|
+
// ########### BLOCK
|
21
|
+
|
22
|
+
// importtype { MovePlayerToRequest, MovePlayerToResponse, TriggerEmoteRequest, TriggerEmoteResponse } from "proto/RestrictedActions.gen";
|
23
|
+
export function movePlayerTo(body: MovePlayerToRequest): Promise<MovePlayerToResponse>;
|
24
|
+
export function triggerEmote(body: TriggerEmoteRequest): Promise<TriggerEmoteResponse>;
|
25
|
+
|
26
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
declare module "~system/SceneStateStorageController" {
|
2
|
+
|
3
|
+
export interface SerializedSceneState {
|
4
|
+
entities: SerializedEntity[];
|
5
|
+
}
|
6
|
+
export interface SerializedComponent {
|
7
|
+
type: number;
|
8
|
+
valueJson: string;
|
9
|
+
}
|
10
|
+
export interface SerializedEntity {
|
11
|
+
id: string;
|
12
|
+
components: SerializedComponent[];
|
13
|
+
}
|
14
|
+
export interface GetProjectManifestRequest {
|
15
|
+
projectId: string;
|
16
|
+
}
|
17
|
+
export interface GetProjectManifestResponse {
|
18
|
+
state?: SerializedSceneState | undefined;
|
19
|
+
}
|
20
|
+
export interface GetProjectManifestByCoordinatesRequest {
|
21
|
+
land: string;
|
22
|
+
}
|
23
|
+
export interface GetProjectManifestByCoordinatesResponse {
|
24
|
+
state?: SerializedSceneState | undefined;
|
25
|
+
}
|
26
|
+
export interface CreateProjectWithCoordsRequest {
|
27
|
+
coordinates: string;
|
28
|
+
}
|
29
|
+
export interface CreateProjectWithCoordsResponse {
|
30
|
+
ok: boolean;
|
31
|
+
}
|
32
|
+
export interface SaveSceneStateRequest {
|
33
|
+
serializedSceneState: SerializedSceneState | undefined;
|
34
|
+
}
|
35
|
+
export interface SaveSceneStateResponse {
|
36
|
+
ok: boolean;
|
37
|
+
error?: string | undefined;
|
38
|
+
}
|
39
|
+
export interface SaveProjectInfoRequest {
|
40
|
+
sceneState: SerializedSceneState | undefined;
|
41
|
+
projectName: string;
|
42
|
+
projectDescription: string;
|
43
|
+
projectScreenshot: string;
|
44
|
+
}
|
45
|
+
export interface SaveProjectInfoResponse {
|
46
|
+
ok: boolean;
|
47
|
+
}
|
48
|
+
export interface PublishSceneStateRequest {
|
49
|
+
sceneId: string;
|
50
|
+
sceneName: string;
|
51
|
+
sceneDescription: string;
|
52
|
+
sceneScreenshot: string;
|
53
|
+
sceneState: SerializedSceneState | undefined;
|
54
|
+
}
|
55
|
+
export interface PublishSceneStateResponse {
|
56
|
+
ok: boolean;
|
57
|
+
error?: string | undefined;
|
58
|
+
}
|
59
|
+
export interface GetStoredStateRequest {
|
60
|
+
sceneId: string;
|
61
|
+
}
|
62
|
+
export interface GetStoredStateResponse {
|
63
|
+
state?: SerializedSceneState | undefined;
|
64
|
+
}
|
65
|
+
export interface CreateProjectFromStateDefinitionRequest {
|
66
|
+
}
|
67
|
+
export interface CreateProjectFromStateDefinitionResponse {
|
68
|
+
state?: SerializedSceneState | undefined;
|
69
|
+
}
|
70
|
+
export interface SendAssetsToRendererRequest {
|
71
|
+
state: SerializedSceneState | undefined;
|
72
|
+
}
|
73
|
+
export interface SendAssetsToRendererResponse {
|
74
|
+
state: string;
|
75
|
+
}
|
76
|
+
|
77
|
+
// ########### BLOCK
|
78
|
+
|
79
|
+
// importtype { GetProjectManifestRequest, GetProjectManifestResponse, GetProjectManifestByCoordinatesRequest, GetProjectManifestByCoordinatesResponse, CreateProjectWithCoordsRequest, CreateProjectWithCoordsResponse, SaveSceneStateRequest, SaveSceneStateResponse, SaveProjectInfoRequest, SaveProjectInfoResponse, PublishSceneStateRequest, PublishSceneStateResponse, GetStoredStateRequest, GetStoredStateResponse, CreateProjectFromStateDefinitionRequest, CreateProjectFromStateDefinitionResponse, SendAssetsToRendererRequest, SendAssetsToRendererResponse } from "proto/SceneStateStorageController.gen";
|
80
|
+
export function getProjectManifest(body: GetProjectManifestRequest): Promise<GetProjectManifestResponse>;
|
81
|
+
export function getProjectManifestByCoordinates(body: GetProjectManifestByCoordinatesRequest): Promise<GetProjectManifestByCoordinatesResponse>;
|
82
|
+
export function createProjectWithCoords(body: CreateProjectWithCoordsRequest): Promise<CreateProjectWithCoordsResponse>;
|
83
|
+
export function saveSceneState(body: SaveSceneStateRequest): Promise<SaveSceneStateResponse>;
|
84
|
+
export function saveProjectInfo(body: SaveProjectInfoRequest): Promise<SaveProjectInfoResponse>;
|
85
|
+
export function publishSceneState(body: PublishSceneStateRequest): Promise<PublishSceneStateResponse>;
|
86
|
+
export function getStoredState(body: GetStoredStateRequest): Promise<GetStoredStateResponse>;
|
87
|
+
export function createProjectFromStateDefinition(body: CreateProjectFromStateDefinitionRequest): Promise<CreateProjectFromStateDefinitionResponse>;
|
88
|
+
export function sendAssetsToRenderer(body: SendAssetsToRendererRequest): Promise<SendAssetsToRendererResponse>;
|
89
|
+
|
90
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
declare module "~system/SignedFetch" {
|
2
|
+
|
3
|
+
export interface FlatFetchInit {
|
4
|
+
method?: string | undefined;
|
5
|
+
body?: string | undefined;
|
6
|
+
headers: {
|
7
|
+
[key: string]: string;
|
8
|
+
};
|
9
|
+
}
|
10
|
+
export interface FlatFetchInit_HeadersEntry {
|
11
|
+
key: string;
|
12
|
+
value: string;
|
13
|
+
}
|
14
|
+
export interface FlatFetchResponse {
|
15
|
+
ok: boolean;
|
16
|
+
status: number;
|
17
|
+
statusText: string;
|
18
|
+
headers: {
|
19
|
+
[key: string]: string;
|
20
|
+
};
|
21
|
+
body: string;
|
22
|
+
}
|
23
|
+
export interface FlatFetchResponse_HeadersEntry {
|
24
|
+
key: string;
|
25
|
+
value: string;
|
26
|
+
}
|
27
|
+
export interface SignedFetchRequest {
|
28
|
+
url: string;
|
29
|
+
init?: FlatFetchInit | undefined;
|
30
|
+
}
|
31
|
+
|
32
|
+
// ########### BLOCK
|
33
|
+
|
34
|
+
// importtype { SignedFetchRequest, FlatFetchResponse } from "proto/SignedFetch.gen";
|
35
|
+
export function signedFetch(body: SignedFetchRequest): Promise<FlatFetchResponse>;
|
36
|
+
|
37
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
declare module "~system/SocialController" {
|
2
|
+
|
3
|
+
export interface InitRequest {
|
4
|
+
}
|
5
|
+
export interface SocialEvent {
|
6
|
+
event: string;
|
7
|
+
payload: string;
|
8
|
+
}
|
9
|
+
export interface GetAvatarEventsResponse {
|
10
|
+
events: SocialEvent[];
|
11
|
+
}
|
12
|
+
|
13
|
+
// ########### BLOCK
|
14
|
+
|
15
|
+
// importtype { InitRequest, GetAvatarEventsResponse } from "proto/SocialController.gen";
|
16
|
+
export function pullAvatarEvents(body: InitRequest): Promise<GetAvatarEventsResponse>;
|
17
|
+
|
18
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
declare module "~system/UserActionModule" {
|
2
|
+
|
3
|
+
export interface RequestTeleportRequest {
|
4
|
+
destination: string;
|
5
|
+
}
|
6
|
+
export interface RequestTeleportResponse {
|
7
|
+
}
|
8
|
+
|
9
|
+
// ########### BLOCK
|
10
|
+
|
11
|
+
// importtype { RequestTeleportRequest, RequestTeleportResponse } from "proto/UserActionModule.gen";
|
12
|
+
export function requestTeleport(body: RequestTeleportRequest): Promise<RequestTeleportResponse>;
|
13
|
+
|
14
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
declare module "~system/UserIdentity" {
|
2
|
+
|
3
|
+
|
4
|
+
export interface Snapshots {
|
5
|
+
face256: string;
|
6
|
+
body: string;
|
7
|
+
}
|
8
|
+
export interface AvatarForUserData {
|
9
|
+
bodyShape: string;
|
10
|
+
skinColor: string;
|
11
|
+
hairColor: string;
|
12
|
+
eyeColor: string;
|
13
|
+
wearables: string[];
|
14
|
+
snapshots: Snapshots | undefined;
|
15
|
+
}
|
16
|
+
export interface UserData {
|
17
|
+
displayName: string;
|
18
|
+
publicKey?: string | undefined;
|
19
|
+
hasConnectedWeb3: boolean;
|
20
|
+
userId: string;
|
21
|
+
version: number;
|
22
|
+
avatar: AvatarForUserData | undefined;
|
23
|
+
}
|
24
|
+
|
25
|
+
// ########### BLOCK
|
26
|
+
|
27
|
+
// importtype { UserData } from "proto/common/UserData.gen";
|
28
|
+
export interface GetUserDataRequest {
|
29
|
+
}
|
30
|
+
export interface GetUserDataResponse {
|
31
|
+
data?: UserData | undefined;
|
32
|
+
}
|
33
|
+
export interface GetUserPublicKeyRequest {
|
34
|
+
}
|
35
|
+
export interface GetUserPublicKeyResponse {
|
36
|
+
address?: string | undefined;
|
37
|
+
}
|
38
|
+
|
39
|
+
// ########### BLOCK
|
40
|
+
|
41
|
+
// importtype { GetUserPublicKeyRequest, GetUserPublicKeyResponse, GetUserDataRequest, GetUserDataResponse } from "proto/UserIdentity.gen";
|
42
|
+
export function getUserPublicKey(body: GetUserPublicKeyRequest): Promise<GetUserPublicKeyResponse>;
|
43
|
+
export function getUserData(body: GetUserDataRequest): Promise<GetUserDataResponse>;
|
44
|
+
|
45
|
+
}
|
package/types/tsconfig.ecs7.json
CHANGED
@@ -22,19 +22,23 @@
|
|
22
22
|
"types": [
|
23
23
|
"env",
|
24
24
|
"ecs7",
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
25
|
+
"rpc-modules/CommunicationsController",
|
26
|
+
"rpc-modules/DevTools",
|
27
|
+
"rpc-modules/EngineAPI",
|
28
|
+
"rpc-modules/EnvironmentAPI",
|
29
|
+
"rpc-modules/EthereumController",
|
30
|
+
"rpc-modules/ExperimentalAPI",
|
31
|
+
"rpc-modules/ParcelIdentity",
|
32
|
+
"rpc-modules/Permissions",
|
33
|
+
"rpc-modules/Players",
|
34
|
+
"rpc-modules/PortableExperiences",
|
35
|
+
"rpc-modules/SignedFetch",
|
36
|
+
"rpc-modules/SocialController",
|
37
|
+
"rpc-modules/UserActionModule",
|
38
|
+
"rpc-modules/UserIdentity"
|
35
39
|
],
|
36
40
|
"typeRoots": [
|
37
41
|
"."
|
38
42
|
]
|
39
43
|
}
|
40
|
-
}
|
44
|
+
}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
declare module '@decentraland/EnvironmentAPI' {
|
2
|
-
export type Realm = {
|
3
|
-
domain: string
|
4
|
-
/** @deprecated use room instead */
|
5
|
-
layer: string
|
6
|
-
room: string
|
7
|
-
serverName: string
|
8
|
-
displayName: string
|
9
|
-
}
|
10
|
-
|
11
|
-
export type ExplorerConfiguration = {
|
12
|
-
clientUri: string
|
13
|
-
configurations: Record<string, string | number | boolean>
|
14
|
-
}
|
15
|
-
|
16
|
-
export const enum Platform {
|
17
|
-
DESKTOP = 'desktop',
|
18
|
-
BROWSER = 'browser'
|
19
|
-
}
|
20
|
-
|
21
|
-
/**
|
22
|
-
* Returns the current connected realm
|
23
|
-
*/
|
24
|
-
export function getCurrentRealm(): Promise<Realm | undefined>
|
25
|
-
|
26
|
-
/**
|
27
|
-
* Returns whether the scene is running in preview mode or not
|
28
|
-
*/
|
29
|
-
export function isPreviewMode(): Promise<boolean>
|
30
|
-
|
31
|
-
/**
|
32
|
-
* Returns explorer configuration and environment information
|
33
|
-
*/
|
34
|
-
export function getExplorerConfiguration(): Promise<ExplorerConfiguration>
|
35
|
-
|
36
|
-
/**
|
37
|
-
* Returns what platform is running the scene
|
38
|
-
*/
|
39
|
-
export function getPlatform(): Promise<Platform>
|
40
|
-
|
41
|
-
/**
|
42
|
-
* Returns Decentraland's time
|
43
|
-
*/
|
44
|
-
export function getDecentralandTime(): Promise<{ seconds: number }>
|
45
|
-
}
|
@@ -1,47 +0,0 @@
|
|
1
|
-
declare module '@decentraland/EthereumController' {
|
2
|
-
export type RPCSendableMessage = {
|
3
|
-
jsonrpc: '2.0'
|
4
|
-
id: number
|
5
|
-
method: string
|
6
|
-
params: any[]
|
7
|
-
}
|
8
|
-
|
9
|
-
export interface MessageDict {
|
10
|
-
[key: string]: string
|
11
|
-
}
|
12
|
-
|
13
|
-
/**
|
14
|
-
* Requires a generic payment in ETH or ERC20.
|
15
|
-
* @param {string} [toAddress] - NFT asset id.
|
16
|
-
* @param {number} [amount] - Exact amount of the order.
|
17
|
-
* @param {string} [currency] - ETH or ERC20 supported token symbol
|
18
|
-
*/
|
19
|
-
export function requirePayment(toAddress: string, amount: number, currency: string): Promise<any>
|
20
|
-
|
21
|
-
/**
|
22
|
-
* Takes a dictionary, converts it to string with correct format and signs it.
|
23
|
-
* @param {messageToSign} [MessageDict] - Message in an object format.
|
24
|
-
* @return {object} - Promise of message and signature in an object.
|
25
|
-
*/
|
26
|
-
export function signMessage(
|
27
|
-
message: MessageDict
|
28
|
-
): Promise<{ message: string; hexEncodedMessage: string; signature: string }>
|
29
|
-
|
30
|
-
/**
|
31
|
-
* Takes a message string, parses it and converts to object.
|
32
|
-
* @param {message} [string] - Message in a string format.
|
33
|
-
* @return {object} - Promise of message as a MessageDict.
|
34
|
-
* @internal
|
35
|
-
*/
|
36
|
-
export function convertMessageToObject(message: string): Promise<MessageDict>
|
37
|
-
|
38
|
-
/**
|
39
|
-
* Used to build a Ethereum provider
|
40
|
-
*/
|
41
|
-
export function sendAsync(message: RPCSendableMessage): Promise<any>
|
42
|
-
|
43
|
-
/**
|
44
|
-
* Returns the user's public key (address)
|
45
|
-
*/
|
46
|
-
export function getUserAccount(): Promise<string>
|
47
|
-
}
|
@@ -1,44 +0,0 @@
|
|
1
|
-
declare module '@decentraland/Identity' {
|
2
|
-
export type ColorString = string
|
3
|
-
|
4
|
-
export type WearableId = string
|
5
|
-
|
6
|
-
export type Snapshots = {
|
7
|
-
// @deprecated
|
8
|
-
face: string
|
9
|
-
// @deprecated
|
10
|
-
face256: string
|
11
|
-
// @deprecated
|
12
|
-
face128: string
|
13
|
-
// @deprecated
|
14
|
-
body: string
|
15
|
-
}
|
16
|
-
|
17
|
-
export type AvatarForUserData = {
|
18
|
-
bodyShape: WearableId
|
19
|
-
skinColor: ColorString
|
20
|
-
hairColor: ColorString
|
21
|
-
eyeColor: ColorString
|
22
|
-
wearables: WearableId[]
|
23
|
-
snapshots: Snapshots
|
24
|
-
}
|
25
|
-
|
26
|
-
export type UserData = {
|
27
|
-
displayName: string
|
28
|
-
publicKey: string | null
|
29
|
-
hasConnectedWeb3: boolean
|
30
|
-
userId: string
|
31
|
-
version: number
|
32
|
-
avatar: AvatarForUserData
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Return the Ethereum address of the user
|
37
|
-
*/
|
38
|
-
export function getUserPublicKey(): Promise<string | null>
|
39
|
-
|
40
|
-
/**
|
41
|
-
* Return the user's data
|
42
|
-
*/
|
43
|
-
export function getUserData(): Promise<UserData | null>
|
44
|
-
}
|