@dcl/protocol 1.0.0-45443187908.commit-ad382e2 → 1.0.0-45872166367.commit-57a13e1
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/out-js/decentraland/common/gradient.gen.d.ts +50 -0
- package/out-js/decentraland/common/gradient.gen.js +147 -0
- package/out-js/decentraland/common/gradient.gen.js.map +1 -0
- package/out-js/decentraland/common/texture.gen.d.ts +0 -18
- package/out-js/decentraland/common/texture.gen.js +4 -104
- package/out-js/decentraland/common/texture.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +2 -113
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +3 -387
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/scene_credits.gen.d.ts +186 -0
- package/out-js/decentraland/kernel/apis/scene_credits.gen.js +388 -0
- package/out-js/decentraland/kernel/apis/scene_credits.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +0 -2
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +2 -19
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +0 -2
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +2 -14
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +27 -14
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js +1 -19
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +0 -2
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +2 -14
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +0 -3
- package/out-js/decentraland/sdk/components/common/input_action.gen.js +0 -18
- package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/environment_fog.gen.d.ts +44 -0
- package/out-js/decentraland/sdk/components/environment_fog.gen.js +86 -0
- package/out-js/decentraland/sdk/components/environment_fog.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +0 -19
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +3 -90
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/material.gen.d.ts +0 -20
- package/out-js/decentraland/sdk/components/material.gen.js +2 -86
- package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +0 -18
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js +4 -90
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +3 -19
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +4 -90
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/raycast.gen.d.ts +0 -13
- package/out-js/decentraland/sdk/components/raycast.gen.js +2 -64
- package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/skybox.gen.d.ts +103 -0
- package/out-js/decentraland/sdk/components/skybox.gen.js +355 -0
- package/out-js/decentraland/sdk/components/skybox.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/sun.gen.d.ts +53 -0
- package/out-js/decentraland/sdk/components/{global_light.gen.js → sun.gen.js} +48 -37
- package/out-js/decentraland/sdk/components/sun.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/ui_input.gen.d.ts +0 -4
- package/out-js/decentraland/sdk/components/ui_input.gen.js +2 -28
- package/out-js/decentraland/sdk/components/ui_input.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +0 -33
- package/out-js/decentraland/sdk/components/ui_transform.gen.js +3 -176
- package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
- package/out-ts/decentraland/common/gradient.gen.ts +170 -0
- package/out-ts/decentraland/common/texture.gen.ts +4 -119
- package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +2 -414
- package/out-ts/decentraland/kernel/apis/scene_credits.gen.ts +459 -0
- package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +1 -20
- package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +1 -16
- package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +28 -35
- package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +1 -16
- package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +0 -18
- package/out-ts/decentraland/sdk/components/environment_fog.gen.ts +113 -0
- package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +2 -108
- package/out-ts/decentraland/sdk/components/material.gen.ts +1 -102
- package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +0 -99
- package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +3 -100
- package/out-ts/decentraland/sdk/components/raycast.gen.ts +1 -73
- package/out-ts/decentraland/sdk/components/skybox.gen.ts +440 -0
- package/out-ts/decentraland/sdk/components/sun.gen.ts +155 -0
- package/out-ts/decentraland/sdk/components/ui_input.gen.ts +0 -36
- package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +0 -193
- package/package.json +2 -2
- package/proto/decentraland/common/gradient.proto +16 -0
- package/proto/decentraland/common/texture.proto +1 -8
- package/proto/decentraland/kernel/apis/restricted_actions.proto +0 -38
- package/proto/decentraland/kernel/apis/scene_credits.proto +108 -0
- package/proto/decentraland/sdk/components/avatar_equipped_data.proto +1 -2
- package/proto/decentraland/sdk/components/avatar_modifier_area.proto +0 -1
- package/proto/decentraland/sdk/components/avatar_shape.proto +32 -18
- package/proto/decentraland/sdk/components/camera_mode_area.proto +0 -1
- package/proto/decentraland/sdk/components/common/input_action.proto +0 -3
- package/proto/decentraland/sdk/components/environment_fog.proto +21 -0
- package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +0 -13
- package/proto/decentraland/sdk/components/material.proto +1 -13
- package/proto/decentraland/sdk/components/mesh_collider.proto +0 -7
- package/proto/decentraland/sdk/components/mesh_renderer.proto +3 -8
- package/proto/decentraland/sdk/components/primary_pointer_info.proto +0 -5
- package/proto/decentraland/sdk/components/raycast.proto +0 -13
- package/proto/decentraland/sdk/components/skybox.proto +51 -0
- package/proto/decentraland/sdk/components/sun.proto +26 -0
- package/proto/decentraland/sdk/components/ui_input.proto +0 -2
- package/proto/decentraland/sdk/components/ui_transform.proto +0 -20
- package/public/sdk-apis.proto +1 -0
- package/public/sdk-components.proto +3 -10
- package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +0 -51
- package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js +0 -177
- package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/avatar_movement.gen.d.ts +0 -71
- package/out-js/decentraland/sdk/components/avatar_movement.gen.js +0 -303
- package/out-js/decentraland/sdk/components/avatar_movement.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/avatar_movement_info.gen.d.ts +0 -79
- package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js +0 -357
- package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/camera_layer.gen.d.ts +0 -46
- package/out-js/decentraland/sdk/components/camera_layer.gen.js +0 -162
- package/out-js/decentraland/sdk/components/camera_layer.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/camera_layers.gen.d.ts +0 -30
- package/out-js/decentraland/sdk/components/camera_layers.gen.js +0 -80
- package/out-js/decentraland/sdk/components/camera_layers.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/global_light.gen.d.ts +0 -50
- package/out-js/decentraland/sdk/components/global_light.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +0 -66
- package/out-js/decentraland/sdk/components/gltf_node.gen.js +0 -69
- package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +0 -43
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +0 -122
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/input_modifier.gen.d.ts +0 -52
- package/out-js/decentraland/sdk/components/input_modifier.gen.js +0 -233
- package/out-js/decentraland/sdk/components/input_modifier.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/texture_camera.gen.d.ts +0 -86
- package/out-js/decentraland/sdk/components/texture_camera.gen.js +0 -296
- package/out-js/decentraland/sdk/components/texture_camera.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/ui_canvas.gen.d.ts +0 -35
- package/out-js/decentraland/sdk/components/ui_canvas.gen.js +0 -98
- package/out-js/decentraland/sdk/components/ui_canvas.gen.js.map +0 -1
- package/out-js/decentraland/sdk/components/ui_scroll_result.gen.d.ts +0 -31
- package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js +0 -71
- package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js.map +0 -1
- package/out-ts/decentraland/sdk/components/avatar_locomotion_settings.gen.ts +0 -237
- package/out-ts/decentraland/sdk/components/avatar_movement.gen.ts +0 -372
- package/out-ts/decentraland/sdk/components/avatar_movement_info.gen.ts +0 -432
- package/out-ts/decentraland/sdk/components/camera_layer.gen.ts +0 -202
- package/out-ts/decentraland/sdk/components/camera_layers.gen.ts +0 -92
- package/out-ts/decentraland/sdk/components/global_light.gen.ts +0 -138
- package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +0 -116
- package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +0 -139
- package/out-ts/decentraland/sdk/components/input_modifier.gen.ts +0 -265
- package/out-ts/decentraland/sdk/components/texture_camera.gen.ts +0 -362
- package/out-ts/decentraland/sdk/components/ui_canvas.gen.ts +0 -115
- package/out-ts/decentraland/sdk/components/ui_scroll_result.gen.ts +0 -83
- package/proto/decentraland/sdk/components/avatar_movement.proto +0 -62
- package/proto/decentraland/sdk/components/avatar_movement_info.proto +0 -36
- package/proto/decentraland/sdk/components/camera_layer.proto +0 -30
- package/proto/decentraland/sdk/components/camera_layers.proto +0 -11
- package/proto/decentraland/sdk/components/global_light.proto +0 -22
- package/proto/decentraland/sdk/components/gltf_node.proto +0 -42
- package/proto/decentraland/sdk/components/gltf_node_state.proto +0 -20
- package/proto/decentraland/sdk/components/texture_camera.proto +0 -46
- package/proto/decentraland/sdk/components/ui_canvas.proto +0 -16
- package/proto/decentraland/sdk/components/ui_scroll_result.proto +0 -12
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
|
|
4
|
+
export const protobufPackage = "decentraland.kernel.apis";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Why a response does not confirm a paid receipt. It does not always mean
|
|
8
|
+
* nothing was paid: after GCE_UNAVAILABLE the outcome is unknown. The numbers
|
|
9
|
+
* are stable, and values may be added later: treat a value you do not know as
|
|
10
|
+
* a refusal, and do not retry it on the same assumptions.
|
|
11
|
+
*/
|
|
12
|
+
export enum GrantCreditsError {
|
|
13
|
+
/**
|
|
14
|
+
* GCE_UNSPECIFIED - A refusal this version does not name, such as a code added later. Do
|
|
15
|
+
* not retry it with the same request.
|
|
16
|
+
*/
|
|
17
|
+
GCE_UNSPECIFIED = 0,
|
|
18
|
+
/**
|
|
19
|
+
* GCE_NOT_AVAILABLE - Paying Credits is not available here. An explorer always answers this,
|
|
20
|
+
* and so does an authoritative server while new payments are off or the
|
|
21
|
+
* pinned scene is no longer the one deployed.
|
|
22
|
+
*/
|
|
23
|
+
GCE_NOT_AVAILABLE = 1,
|
|
24
|
+
/** GCE_INVALID_REQUEST - The request is malformed: see the request's field formats. */
|
|
25
|
+
GCE_INVALID_REQUEST = 2,
|
|
26
|
+
/**
|
|
27
|
+
* GCE_RATE_LIMITED - Too many requests for this scene or this program, or the server is
|
|
28
|
+
* momentarily busy. Retry shortly, with a short backoff, and the same
|
|
29
|
+
* outcome id.
|
|
30
|
+
*/
|
|
31
|
+
GCE_RATE_LIMITED = 3,
|
|
32
|
+
/**
|
|
33
|
+
* GCE_UNAVAILABLE - The outcome could not be decided, or its answer was lost: the Credits
|
|
34
|
+
* may have been paid. Retry later with the same program, recipient and
|
|
35
|
+
* outcome id; a paid outcome is then answered with its receipt.
|
|
36
|
+
*/
|
|
37
|
+
GCE_UNAVAILABLE = 4,
|
|
38
|
+
/**
|
|
39
|
+
* GCE_NOT_AUTHORIZED - This scene may not pay from this program: the server's credential was
|
|
40
|
+
* not accepted, the program is unknown or not pinned to this scene, or the
|
|
41
|
+
* outcome was paid in another location.
|
|
42
|
+
*/
|
|
43
|
+
GCE_NOT_AUTHORIZED = 5,
|
|
44
|
+
/**
|
|
45
|
+
* GCE_RECIPIENT_NOT_CONNECTED - A new payment needs the recipient connected to this scene's
|
|
46
|
+
* authoritative server.
|
|
47
|
+
*/
|
|
48
|
+
GCE_RECIPIENT_NOT_CONNECTED = 6,
|
|
49
|
+
/** GCE_PROGRAM_PAUSED - The program or its studio is paused. */
|
|
50
|
+
GCE_PROGRAM_PAUSED = 7,
|
|
51
|
+
/** GCE_OUTSIDE_SCHEDULE - The program's schedule has no open slot for this outcome now. */
|
|
52
|
+
GCE_OUTSIDE_SCHEDULE = 8,
|
|
53
|
+
/** GCE_BUDGET_EXHAUSTED - The program's ceiling or the studio's budget cannot cover the payment. */
|
|
54
|
+
GCE_BUDGET_EXHAUSTED = 9,
|
|
55
|
+
/** GCE_PROGRAM_CAP_REACHED - The program paid all it may pay today. */
|
|
56
|
+
GCE_PROGRAM_CAP_REACHED = 10,
|
|
57
|
+
/**
|
|
58
|
+
* GCE_PLAYER_CAP_REACHED - The recipient was paid as many times as this program pays a player,
|
|
59
|
+
* for the program's payment day or in total. For a program that requires
|
|
60
|
+
* a NAME, also when every eligible NAME this wallet holds was already paid
|
|
61
|
+
* for that day, even if other wallets received those payments.
|
|
62
|
+
*/
|
|
63
|
+
GCE_PLAYER_CAP_REACHED = 11,
|
|
64
|
+
/**
|
|
65
|
+
* GCE_REQUIREMENT_NOT_MET - The recipient does not meet one of the program's public requirements,
|
|
66
|
+
* such as holding a NAME.
|
|
67
|
+
*/
|
|
68
|
+
GCE_REQUIREMENT_NOT_MET = 12,
|
|
69
|
+
/** GCE_RECIPIENT_NOT_ELIGIBLE - The recipient may not be paid by this program. */
|
|
70
|
+
GCE_RECIPIENT_NOT_ELIGIBLE = 13,
|
|
71
|
+
UNRECOGNIZED = -1,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function grantCreditsErrorFromJSON(object: any): GrantCreditsError {
|
|
75
|
+
switch (object) {
|
|
76
|
+
case 0:
|
|
77
|
+
case "GCE_UNSPECIFIED":
|
|
78
|
+
return GrantCreditsError.GCE_UNSPECIFIED;
|
|
79
|
+
case 1:
|
|
80
|
+
case "GCE_NOT_AVAILABLE":
|
|
81
|
+
return GrantCreditsError.GCE_NOT_AVAILABLE;
|
|
82
|
+
case 2:
|
|
83
|
+
case "GCE_INVALID_REQUEST":
|
|
84
|
+
return GrantCreditsError.GCE_INVALID_REQUEST;
|
|
85
|
+
case 3:
|
|
86
|
+
case "GCE_RATE_LIMITED":
|
|
87
|
+
return GrantCreditsError.GCE_RATE_LIMITED;
|
|
88
|
+
case 4:
|
|
89
|
+
case "GCE_UNAVAILABLE":
|
|
90
|
+
return GrantCreditsError.GCE_UNAVAILABLE;
|
|
91
|
+
case 5:
|
|
92
|
+
case "GCE_NOT_AUTHORIZED":
|
|
93
|
+
return GrantCreditsError.GCE_NOT_AUTHORIZED;
|
|
94
|
+
case 6:
|
|
95
|
+
case "GCE_RECIPIENT_NOT_CONNECTED":
|
|
96
|
+
return GrantCreditsError.GCE_RECIPIENT_NOT_CONNECTED;
|
|
97
|
+
case 7:
|
|
98
|
+
case "GCE_PROGRAM_PAUSED":
|
|
99
|
+
return GrantCreditsError.GCE_PROGRAM_PAUSED;
|
|
100
|
+
case 8:
|
|
101
|
+
case "GCE_OUTSIDE_SCHEDULE":
|
|
102
|
+
return GrantCreditsError.GCE_OUTSIDE_SCHEDULE;
|
|
103
|
+
case 9:
|
|
104
|
+
case "GCE_BUDGET_EXHAUSTED":
|
|
105
|
+
return GrantCreditsError.GCE_BUDGET_EXHAUSTED;
|
|
106
|
+
case 10:
|
|
107
|
+
case "GCE_PROGRAM_CAP_REACHED":
|
|
108
|
+
return GrantCreditsError.GCE_PROGRAM_CAP_REACHED;
|
|
109
|
+
case 11:
|
|
110
|
+
case "GCE_PLAYER_CAP_REACHED":
|
|
111
|
+
return GrantCreditsError.GCE_PLAYER_CAP_REACHED;
|
|
112
|
+
case 12:
|
|
113
|
+
case "GCE_REQUIREMENT_NOT_MET":
|
|
114
|
+
return GrantCreditsError.GCE_REQUIREMENT_NOT_MET;
|
|
115
|
+
case 13:
|
|
116
|
+
case "GCE_RECIPIENT_NOT_ELIGIBLE":
|
|
117
|
+
return GrantCreditsError.GCE_RECIPIENT_NOT_ELIGIBLE;
|
|
118
|
+
case -1:
|
|
119
|
+
case "UNRECOGNIZED":
|
|
120
|
+
default:
|
|
121
|
+
return GrantCreditsError.UNRECOGNIZED;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function grantCreditsErrorToJSON(object: GrantCreditsError): string {
|
|
126
|
+
switch (object) {
|
|
127
|
+
case GrantCreditsError.GCE_UNSPECIFIED:
|
|
128
|
+
return "GCE_UNSPECIFIED";
|
|
129
|
+
case GrantCreditsError.GCE_NOT_AVAILABLE:
|
|
130
|
+
return "GCE_NOT_AVAILABLE";
|
|
131
|
+
case GrantCreditsError.GCE_INVALID_REQUEST:
|
|
132
|
+
return "GCE_INVALID_REQUEST";
|
|
133
|
+
case GrantCreditsError.GCE_RATE_LIMITED:
|
|
134
|
+
return "GCE_RATE_LIMITED";
|
|
135
|
+
case GrantCreditsError.GCE_UNAVAILABLE:
|
|
136
|
+
return "GCE_UNAVAILABLE";
|
|
137
|
+
case GrantCreditsError.GCE_NOT_AUTHORIZED:
|
|
138
|
+
return "GCE_NOT_AUTHORIZED";
|
|
139
|
+
case GrantCreditsError.GCE_RECIPIENT_NOT_CONNECTED:
|
|
140
|
+
return "GCE_RECIPIENT_NOT_CONNECTED";
|
|
141
|
+
case GrantCreditsError.GCE_PROGRAM_PAUSED:
|
|
142
|
+
return "GCE_PROGRAM_PAUSED";
|
|
143
|
+
case GrantCreditsError.GCE_OUTSIDE_SCHEDULE:
|
|
144
|
+
return "GCE_OUTSIDE_SCHEDULE";
|
|
145
|
+
case GrantCreditsError.GCE_BUDGET_EXHAUSTED:
|
|
146
|
+
return "GCE_BUDGET_EXHAUSTED";
|
|
147
|
+
case GrantCreditsError.GCE_PROGRAM_CAP_REACHED:
|
|
148
|
+
return "GCE_PROGRAM_CAP_REACHED";
|
|
149
|
+
case GrantCreditsError.GCE_PLAYER_CAP_REACHED:
|
|
150
|
+
return "GCE_PLAYER_CAP_REACHED";
|
|
151
|
+
case GrantCreditsError.GCE_REQUIREMENT_NOT_MET:
|
|
152
|
+
return "GCE_REQUIREMENT_NOT_MET";
|
|
153
|
+
case GrantCreditsError.GCE_RECIPIENT_NOT_ELIGIBLE:
|
|
154
|
+
return "GCE_RECIPIENT_NOT_ELIGIBLE";
|
|
155
|
+
case GrantCreditsError.UNRECOGNIZED:
|
|
156
|
+
default:
|
|
157
|
+
return "UNRECOGNIZED";
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface GrantCreditsRequest {
|
|
162
|
+
/**
|
|
163
|
+
* The Credits program Decentraland ops configured for the studio and
|
|
164
|
+
* pinned to this scene, as a UUID. Anything else is answered like an
|
|
165
|
+
* unknown program.
|
|
166
|
+
*/
|
|
167
|
+
programId: string;
|
|
168
|
+
/**
|
|
169
|
+
* The player to pay: a literal lowercase "0x" followed by 40
|
|
170
|
+
* hexadecimal digits of either case; anything else is
|
|
171
|
+
* GCE_INVALID_REQUEST. The host normalizes it to check that the player is
|
|
172
|
+
* connected, and Credits normalizes it for the pay-once key and the
|
|
173
|
+
* per-player caps.
|
|
174
|
+
*/
|
|
175
|
+
recipient: string;
|
|
176
|
+
/**
|
|
177
|
+
* The scene's own id for what the player earned (a match, a round, a
|
|
178
|
+
* quest): 1 to 128 characters from A-Z, a-z, 0-9 and ". _ : -"; anything
|
|
179
|
+
* else is GCE_INVALID_REQUEST. A program pays the same recipient for the
|
|
180
|
+
* same outcome id at most once: repeating the call, for example after a
|
|
181
|
+
* lost response, returns the first payment's receipt.
|
|
182
|
+
*/
|
|
183
|
+
outcomeId: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface GrantCreditsResponse {
|
|
187
|
+
/**
|
|
188
|
+
* This response confirms a paid receipt. When ok, replayed, receipt_id
|
|
189
|
+
* and credits are set and error is not; when not ok, only error is set.
|
|
190
|
+
* Not ok does not always mean nothing was paid: see GCE_UNAVAILABLE.
|
|
191
|
+
*/
|
|
192
|
+
ok: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* False for the first payment, true when this is an earlier payment's
|
|
195
|
+
* receipt.
|
|
196
|
+
*/
|
|
197
|
+
replayed?: boolean | undefined;
|
|
198
|
+
receiptId?:
|
|
199
|
+
| string
|
|
200
|
+
| undefined;
|
|
201
|
+
/**
|
|
202
|
+
* The whole Credits paid, as a decimal string of digits with no sign,
|
|
203
|
+
* decimals or exponent, e.g. "5".
|
|
204
|
+
*/
|
|
205
|
+
credits?:
|
|
206
|
+
| string
|
|
207
|
+
| undefined;
|
|
208
|
+
/**
|
|
209
|
+
* Set on every refusal, GCE_UNSPECIFIED included. Back off on
|
|
210
|
+
* GCE_UNAVAILABLE or GCE_RATE_LIMITED. For other refusals, retry only
|
|
211
|
+
* after the relevant condition changes: a paused program can resume and
|
|
212
|
+
* an exhausted budget can be replenished. Reuse the same outcome id.
|
|
213
|
+
*/
|
|
214
|
+
error?: GrantCreditsError | undefined;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function createBaseGrantCreditsRequest(): GrantCreditsRequest {
|
|
218
|
+
return { programId: "", recipient: "", outcomeId: "" };
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export namespace GrantCreditsRequest {
|
|
222
|
+
export function encode(message: GrantCreditsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
223
|
+
if (message.programId !== "") {
|
|
224
|
+
writer.uint32(10).string(message.programId);
|
|
225
|
+
}
|
|
226
|
+
if (message.recipient !== "") {
|
|
227
|
+
writer.uint32(18).string(message.recipient);
|
|
228
|
+
}
|
|
229
|
+
if (message.outcomeId !== "") {
|
|
230
|
+
writer.uint32(26).string(message.outcomeId);
|
|
231
|
+
}
|
|
232
|
+
return writer;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): GrantCreditsRequest {
|
|
236
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
237
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
238
|
+
const message = createBaseGrantCreditsRequest();
|
|
239
|
+
while (reader.pos < end) {
|
|
240
|
+
const tag = reader.uint32();
|
|
241
|
+
switch (tag >>> 3) {
|
|
242
|
+
case 1:
|
|
243
|
+
if (tag !== 10) {
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
message.programId = reader.string();
|
|
248
|
+
continue;
|
|
249
|
+
case 2:
|
|
250
|
+
if (tag !== 18) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
message.recipient = reader.string();
|
|
255
|
+
continue;
|
|
256
|
+
case 3:
|
|
257
|
+
if (tag !== 26) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
message.outcomeId = reader.string();
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
reader.skipType(tag & 7);
|
|
268
|
+
}
|
|
269
|
+
return message;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export function fromJSON(object: any): GrantCreditsRequest {
|
|
273
|
+
return {
|
|
274
|
+
programId: isSet(object.programId) ? String(object.programId) : "",
|
|
275
|
+
recipient: isSet(object.recipient) ? String(object.recipient) : "",
|
|
276
|
+
outcomeId: isSet(object.outcomeId) ? String(object.outcomeId) : "",
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export function toJSON(message: GrantCreditsRequest): unknown {
|
|
281
|
+
const obj: any = {};
|
|
282
|
+
message.programId !== undefined && (obj.programId = message.programId);
|
|
283
|
+
message.recipient !== undefined && (obj.recipient = message.recipient);
|
|
284
|
+
message.outcomeId !== undefined && (obj.outcomeId = message.outcomeId);
|
|
285
|
+
return obj;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export function create<I extends Exact<DeepPartial<GrantCreditsRequest>, I>>(base?: I): GrantCreditsRequest {
|
|
289
|
+
return GrantCreditsRequest.fromPartial(base ?? {});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export function fromPartial<I extends Exact<DeepPartial<GrantCreditsRequest>, I>>(object: I): GrantCreditsRequest {
|
|
293
|
+
const message = createBaseGrantCreditsRequest();
|
|
294
|
+
message.programId = object.programId ?? "";
|
|
295
|
+
message.recipient = object.recipient ?? "";
|
|
296
|
+
message.outcomeId = object.outcomeId ?? "";
|
|
297
|
+
return message;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function createBaseGrantCreditsResponse(): GrantCreditsResponse {
|
|
302
|
+
return { ok: false, replayed: undefined, receiptId: undefined, credits: undefined, error: undefined };
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export namespace GrantCreditsResponse {
|
|
306
|
+
export function encode(message: GrantCreditsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
307
|
+
if (message.ok === true) {
|
|
308
|
+
writer.uint32(8).bool(message.ok);
|
|
309
|
+
}
|
|
310
|
+
if (message.replayed !== undefined) {
|
|
311
|
+
writer.uint32(16).bool(message.replayed);
|
|
312
|
+
}
|
|
313
|
+
if (message.receiptId !== undefined) {
|
|
314
|
+
writer.uint32(26).string(message.receiptId);
|
|
315
|
+
}
|
|
316
|
+
if (message.credits !== undefined) {
|
|
317
|
+
writer.uint32(34).string(message.credits);
|
|
318
|
+
}
|
|
319
|
+
if (message.error !== undefined) {
|
|
320
|
+
writer.uint32(40).int32(message.error);
|
|
321
|
+
}
|
|
322
|
+
return writer;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): GrantCreditsResponse {
|
|
326
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
327
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
328
|
+
const message = createBaseGrantCreditsResponse();
|
|
329
|
+
while (reader.pos < end) {
|
|
330
|
+
const tag = reader.uint32();
|
|
331
|
+
switch (tag >>> 3) {
|
|
332
|
+
case 1:
|
|
333
|
+
if (tag !== 8) {
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
message.ok = reader.bool();
|
|
338
|
+
continue;
|
|
339
|
+
case 2:
|
|
340
|
+
if (tag !== 16) {
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
message.replayed = reader.bool();
|
|
345
|
+
continue;
|
|
346
|
+
case 3:
|
|
347
|
+
if (tag !== 26) {
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
message.receiptId = reader.string();
|
|
352
|
+
continue;
|
|
353
|
+
case 4:
|
|
354
|
+
if (tag !== 34) {
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
message.credits = reader.string();
|
|
359
|
+
continue;
|
|
360
|
+
case 5:
|
|
361
|
+
if (tag !== 40) {
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
message.error = reader.int32() as any;
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
368
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
reader.skipType(tag & 7);
|
|
372
|
+
}
|
|
373
|
+
return message;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export function fromJSON(object: any): GrantCreditsResponse {
|
|
377
|
+
return {
|
|
378
|
+
ok: isSet(object.ok) ? Boolean(object.ok) : false,
|
|
379
|
+
replayed: isSet(object.replayed) ? Boolean(object.replayed) : undefined,
|
|
380
|
+
receiptId: isSet(object.receiptId) ? String(object.receiptId) : undefined,
|
|
381
|
+
credits: isSet(object.credits) ? String(object.credits) : undefined,
|
|
382
|
+
error: isSet(object.error) ? grantCreditsErrorFromJSON(object.error) : undefined,
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export function toJSON(message: GrantCreditsResponse): unknown {
|
|
387
|
+
const obj: any = {};
|
|
388
|
+
message.ok !== undefined && (obj.ok = message.ok);
|
|
389
|
+
message.replayed !== undefined && (obj.replayed = message.replayed);
|
|
390
|
+
message.receiptId !== undefined && (obj.receiptId = message.receiptId);
|
|
391
|
+
message.credits !== undefined && (obj.credits = message.credits);
|
|
392
|
+
message.error !== undefined &&
|
|
393
|
+
(obj.error = message.error !== undefined ? grantCreditsErrorToJSON(message.error) : undefined);
|
|
394
|
+
return obj;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export function create<I extends Exact<DeepPartial<GrantCreditsResponse>, I>>(base?: I): GrantCreditsResponse {
|
|
398
|
+
return GrantCreditsResponse.fromPartial(base ?? {});
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export function fromPartial<I extends Exact<DeepPartial<GrantCreditsResponse>, I>>(object: I): GrantCreditsResponse {
|
|
402
|
+
const message = createBaseGrantCreditsResponse();
|
|
403
|
+
message.ok = object.ok ?? false;
|
|
404
|
+
message.replayed = object.replayed ?? undefined;
|
|
405
|
+
message.receiptId = object.receiptId ?? undefined;
|
|
406
|
+
message.credits = object.credits ?? undefined;
|
|
407
|
+
message.error = object.error ?? undefined;
|
|
408
|
+
return message;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export type SceneCreditsServiceDefinition = typeof SceneCreditsServiceDefinition;
|
|
413
|
+
export const SceneCreditsServiceDefinition = {
|
|
414
|
+
name: "SceneCreditsService",
|
|
415
|
+
fullName: "decentraland.kernel.apis.SceneCreditsService",
|
|
416
|
+
methods: {
|
|
417
|
+
/**
|
|
418
|
+
* Pays the recipient the program's Credits for the outcome. The amount,
|
|
419
|
+
* the budget and the limits are the program's, never the scene's.
|
|
420
|
+
*
|
|
421
|
+
* Only a scene's authoritative server can pay. In an explorer the call
|
|
422
|
+
* always resolves with ok false and GCE_NOT_AVAILABLE, whatever the
|
|
423
|
+
* request: the formats and checks described here apply on the
|
|
424
|
+
* authoritative server.
|
|
425
|
+
*
|
|
426
|
+
* There, the scene's identity comes from the server's authenticated
|
|
427
|
+
* credential, never from the request. Basic validation and throttling can
|
|
428
|
+
* answer first. A new payment then checks that the program is pinned to
|
|
429
|
+
* this scene before anything about the program's state or the
|
|
430
|
+
* recipient's eligibility. A program pinned here can learn that a
|
|
431
|
+
* recipient does not meet one of its public requirements.
|
|
432
|
+
* Recovering a paid outcome checks the location it was paid in.
|
|
433
|
+
*/
|
|
434
|
+
grantCredits: {
|
|
435
|
+
name: "GrantCredits",
|
|
436
|
+
requestType: GrantCreditsRequest,
|
|
437
|
+
requestStream: false,
|
|
438
|
+
responseType: GrantCreditsResponse,
|
|
439
|
+
responseStream: false,
|
|
440
|
+
options: {},
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
} as const;
|
|
444
|
+
|
|
445
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
446
|
+
|
|
447
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
448
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
449
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
450
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
451
|
+
: Partial<T>;
|
|
452
|
+
|
|
453
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
454
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
455
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
456
|
+
|
|
457
|
+
function isSet(value: any): boolean {
|
|
458
|
+
return value !== null && value !== undefined;
|
|
459
|
+
}
|
|
@@ -13,8 +13,6 @@ export interface PBAvatarEquippedData {
|
|
|
13
13
|
emoteUrns: string[];
|
|
14
14
|
/** one per item of wearable_urns, in the same order */
|
|
15
15
|
wearables: PBAvatarEquippedData_EquippedWearable[];
|
|
16
|
-
/** slots that will render even if hidden */
|
|
17
|
-
forceRender: string[];
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
export interface PBAvatarEquippedData_EquippedWearable {
|
|
@@ -28,7 +26,7 @@ export interface PBAvatarEquippedData_EquippedWearable {
|
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
function createBasePBAvatarEquippedData(): PBAvatarEquippedData {
|
|
31
|
-
return { wearableUrns: [], emoteUrns: [], wearables: []
|
|
29
|
+
return { wearableUrns: [], emoteUrns: [], wearables: [] };
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
export namespace PBAvatarEquippedData {
|
|
@@ -42,9 +40,6 @@ export namespace PBAvatarEquippedData {
|
|
|
42
40
|
for (const v of message.wearables) {
|
|
43
41
|
PBAvatarEquippedData_EquippedWearable.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
44
42
|
}
|
|
45
|
-
for (const v of message.forceRender) {
|
|
46
|
-
writer.uint32(34).string(v!);
|
|
47
|
-
}
|
|
48
43
|
return writer;
|
|
49
44
|
}
|
|
50
45
|
|
|
@@ -76,13 +71,6 @@ export namespace PBAvatarEquippedData {
|
|
|
76
71
|
|
|
77
72
|
message.wearables.push(PBAvatarEquippedData_EquippedWearable.decode(reader, reader.uint32()));
|
|
78
73
|
continue;
|
|
79
|
-
case 4:
|
|
80
|
-
if (tag !== 34) {
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
message.forceRender.push(reader.string());
|
|
85
|
-
continue;
|
|
86
74
|
}
|
|
87
75
|
if ((tag & 7) === 4 || tag === 0) {
|
|
88
76
|
break;
|
|
@@ -99,7 +87,6 @@ export namespace PBAvatarEquippedData {
|
|
|
99
87
|
wearables: Array.isArray(object?.wearables)
|
|
100
88
|
? object.wearables.map((e: any) => PBAvatarEquippedData_EquippedWearable.fromJSON(e))
|
|
101
89
|
: [],
|
|
102
|
-
forceRender: Array.isArray(object?.forceRender) ? object.forceRender.map((e: any) => String(e)) : [],
|
|
103
90
|
};
|
|
104
91
|
}
|
|
105
92
|
|
|
@@ -120,11 +107,6 @@ export namespace PBAvatarEquippedData {
|
|
|
120
107
|
} else {
|
|
121
108
|
obj.wearables = [];
|
|
122
109
|
}
|
|
123
|
-
if (message.forceRender) {
|
|
124
|
-
obj.forceRender = message.forceRender.map((e) => e);
|
|
125
|
-
} else {
|
|
126
|
-
obj.forceRender = [];
|
|
127
|
-
}
|
|
128
110
|
return obj;
|
|
129
111
|
}
|
|
130
112
|
|
|
@@ -137,7 +119,6 @@ export namespace PBAvatarEquippedData {
|
|
|
137
119
|
message.wearableUrns = object.wearableUrns?.map((e) => e) || [];
|
|
138
120
|
message.emoteUrns = object.emoteUrns?.map((e) => e) || [];
|
|
139
121
|
message.wearables = object.wearables?.map((e) => PBAvatarEquippedData_EquippedWearable.fromPartial(e)) || [];
|
|
140
|
-
message.forceRender = object.forceRender?.map((e) => e) || [];
|
|
141
122
|
return message;
|
|
142
123
|
}
|
|
143
124
|
}
|
|
@@ -70,12 +70,10 @@ export interface PBAvatarModifierArea {
|
|
|
70
70
|
excludeIds: string[];
|
|
71
71
|
/** list of modifiers to apply */
|
|
72
72
|
modifiers: AvatarModifierType[];
|
|
73
|
-
/** if true, the player will be considered inside the area when they are within 0.3m of the area. default true */
|
|
74
|
-
useColliderRange?: boolean | undefined;
|
|
75
73
|
}
|
|
76
74
|
|
|
77
75
|
function createBasePBAvatarModifierArea(): PBAvatarModifierArea {
|
|
78
|
-
return { area: undefined, excludeIds: [], modifiers: []
|
|
76
|
+
return { area: undefined, excludeIds: [], modifiers: [] };
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
export namespace PBAvatarModifierArea {
|
|
@@ -91,9 +89,6 @@ export namespace PBAvatarModifierArea {
|
|
|
91
89
|
writer.int32(v);
|
|
92
90
|
}
|
|
93
91
|
writer.ldelim();
|
|
94
|
-
if (message.useColliderRange !== undefined) {
|
|
95
|
-
writer.uint32(40).bool(message.useColliderRange);
|
|
96
|
-
}
|
|
97
92
|
return writer;
|
|
98
93
|
}
|
|
99
94
|
|
|
@@ -135,13 +130,6 @@ export namespace PBAvatarModifierArea {
|
|
|
135
130
|
}
|
|
136
131
|
|
|
137
132
|
break;
|
|
138
|
-
case 5:
|
|
139
|
-
if (tag !== 40) {
|
|
140
|
-
break;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
message.useColliderRange = reader.bool();
|
|
144
|
-
continue;
|
|
145
133
|
}
|
|
146
134
|
if ((tag & 7) === 4 || tag === 0) {
|
|
147
135
|
break;
|
|
@@ -158,7 +146,6 @@ export namespace PBAvatarModifierArea {
|
|
|
158
146
|
modifiers: Array.isArray(object?.modifiers)
|
|
159
147
|
? object.modifiers.map((e: any) => avatarModifierTypeFromJSON(e))
|
|
160
148
|
: [],
|
|
161
|
-
useColliderRange: isSet(object.useColliderRange) ? Boolean(object.useColliderRange) : undefined,
|
|
162
149
|
};
|
|
163
150
|
}
|
|
164
151
|
|
|
@@ -175,7 +162,6 @@ export namespace PBAvatarModifierArea {
|
|
|
175
162
|
} else {
|
|
176
163
|
obj.modifiers = [];
|
|
177
164
|
}
|
|
178
|
-
message.useColliderRange !== undefined && (obj.useColliderRange = message.useColliderRange);
|
|
179
165
|
return obj;
|
|
180
166
|
}
|
|
181
167
|
|
|
@@ -188,7 +174,6 @@ export namespace PBAvatarModifierArea {
|
|
|
188
174
|
message.area = (object.area !== undefined && object.area !== null) ? Vector3.fromPartial(object.area) : undefined;
|
|
189
175
|
message.excludeIds = object.excludeIds?.map((e) => e) || [];
|
|
190
176
|
message.modifiers = object.modifiers?.map((e) => e) || [];
|
|
191
|
-
message.useColliderRange = object.useColliderRange ?? undefined;
|
|
192
177
|
return message;
|
|
193
178
|
}
|
|
194
179
|
}
|