@sparkdreamnft/sparkdreamjs 0.0.13 → 0.0.15
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/esm/sparkdream/commons/v1/tx.js +147 -0
- package/esm/sparkdream/commons/v1/tx.registry.js +20 -2
- package/esm/sparkdream/commons/v1/tx.rpc.msg.js +7 -1
- package/esm/sparkdream/forum/v1/hide_record.js +19 -1
- package/esm/sparkdream/forum/v1/params.js +26 -2
- package/esm/sparkdream/forum/v1/tx.amino.js +6 -1
- package/esm/sparkdream/forum/v1/tx.js +144 -0
- package/esm/sparkdream/forum/v1/tx.registry.js +20 -2
- package/esm/sparkdream/forum/v1/tx.rpc.msg.js +12 -1
- package/esm/sparkdream/rep/v1/params.js +74 -2
- package/esm/sparkdream/rep/v1/project.js +24 -1
- package/esm/sparkdream/session/v1/params.js +26 -2
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +81 -0
- package/sparkdream/client.d.ts +5 -0
- package/sparkdream/commons/v1/tx.d.ts +99 -0
- package/sparkdream/commons/v1/tx.js +148 -1
- package/sparkdream/commons/v1/tx.registry.d.ts +13 -1
- package/sparkdream/commons/v1/tx.registry.js +19 -1
- package/sparkdream/commons/v1/tx.rpc.msg.d.ts +3 -1
- package/sparkdream/commons/v1/tx.rpc.msg.js +6 -0
- package/sparkdream/forum/v1/hide_record.d.ts +50 -0
- package/sparkdream/forum/v1/hide_record.js +19 -1
- package/sparkdream/forum/v1/params.d.ts +28 -0
- package/sparkdream/forum/v1/params.js +26 -2
- package/sparkdream/forum/v1/tx.amino.d.ts +6 -1
- package/sparkdream/forum/v1/tx.amino.js +5 -0
- package/sparkdream/forum/v1/tx.d.ts +90 -0
- package/sparkdream/forum/v1/tx.js +146 -2
- package/sparkdream/forum/v1/tx.registry.d.ts +13 -1
- package/sparkdream/forum/v1/tx.registry.js +19 -1
- package/sparkdream/forum/v1/tx.rpc.msg.d.ts +11 -1
- package/sparkdream/forum/v1/tx.rpc.msg.js +11 -0
- package/sparkdream/rep/v1/params.d.ts +52 -0
- package/sparkdream/rep/v1/params.js +74 -2
- package/sparkdream/rep/v1/project.d.ts +22 -0
- package/sparkdream/rep/v1/project.js +24 -1
- package/sparkdream/session/v1/params.d.ts +12 -0
- package/sparkdream/session/v1/params.js +26 -2
|
@@ -16,6 +16,12 @@ export declare enum ProjectStatus {
|
|
|
16
16
|
PROJECT_STATUS_ACTIVE = 1,
|
|
17
17
|
PROJECT_STATUS_COMPLETED = 2,
|
|
18
18
|
PROJECT_STATUS_CANCELLED = 3,
|
|
19
|
+
/**
|
|
20
|
+
* PROJECT_STATUS_EXPIRED - EXPIRED is set by the EndBlocker when a PROPOSED project has not been
|
|
21
|
+
* approved before its expiry_block_height. Terminal state — kept (not
|
|
22
|
+
* deleted) so the audit trail of stale proposals survives.
|
|
23
|
+
*/
|
|
24
|
+
PROJECT_STATUS_EXPIRED = 4,
|
|
19
25
|
UNRECOGNIZED = -1
|
|
20
26
|
}
|
|
21
27
|
export declare const ProjectStatusAmino: typeof ProjectStatus;
|
|
@@ -60,6 +66,14 @@ export interface Project {
|
|
|
60
66
|
* Zero budget, APPRENTICE/STANDARD initiatives only, rewards minted on completion.
|
|
61
67
|
*/
|
|
62
68
|
permissionless: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Block height at which this project will be expired by the EndBlocker if it
|
|
71
|
+
* is still in PROPOSED status. Set at creation for non-permissionless
|
|
72
|
+
* projects (creation_height + params.proposed_project_expiry_blocks). Zero
|
|
73
|
+
* for permissionless projects (no expiry — ACTIVE on creation) and cleared
|
|
74
|
+
* when the project transitions out of PROPOSED.
|
|
75
|
+
*/
|
|
76
|
+
expiryBlockHeight: bigint;
|
|
63
77
|
}
|
|
64
78
|
export interface ProjectProtoMsg {
|
|
65
79
|
typeUrl: "/sparkdream.rep.v1.Project";
|
|
@@ -94,6 +108,14 @@ export interface ProjectAmino {
|
|
|
94
108
|
* Zero budget, APPRENTICE/STANDARD initiatives only, rewards minted on completion.
|
|
95
109
|
*/
|
|
96
110
|
permissionless?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Block height at which this project will be expired by the EndBlocker if it
|
|
113
|
+
* is still in PROPOSED status. Set at creation for non-permissionless
|
|
114
|
+
* projects (creation_height + params.proposed_project_expiry_blocks). Zero
|
|
115
|
+
* for permissionless projects (no expiry — ACTIVE on creation) and cleared
|
|
116
|
+
* when the project transitions out of PROPOSED.
|
|
117
|
+
*/
|
|
118
|
+
expiry_block_height?: string;
|
|
97
119
|
}
|
|
98
120
|
export interface ProjectAminoMsg {
|
|
99
121
|
type: "/sparkdream.rep.v1.Project";
|
|
@@ -66,6 +66,12 @@ var ProjectStatus;
|
|
|
66
66
|
ProjectStatus[ProjectStatus["PROJECT_STATUS_ACTIVE"] = 1] = "PROJECT_STATUS_ACTIVE";
|
|
67
67
|
ProjectStatus[ProjectStatus["PROJECT_STATUS_COMPLETED"] = 2] = "PROJECT_STATUS_COMPLETED";
|
|
68
68
|
ProjectStatus[ProjectStatus["PROJECT_STATUS_CANCELLED"] = 3] = "PROJECT_STATUS_CANCELLED";
|
|
69
|
+
/**
|
|
70
|
+
* PROJECT_STATUS_EXPIRED - EXPIRED is set by the EndBlocker when a PROPOSED project has not been
|
|
71
|
+
* approved before its expiry_block_height. Terminal state — kept (not
|
|
72
|
+
* deleted) so the audit trail of stale proposals survives.
|
|
73
|
+
*/
|
|
74
|
+
ProjectStatus[ProjectStatus["PROJECT_STATUS_EXPIRED"] = 4] = "PROJECT_STATUS_EXPIRED";
|
|
69
75
|
ProjectStatus[ProjectStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
70
76
|
})(ProjectStatus || (exports.ProjectStatus = ProjectStatus = {}));
|
|
71
77
|
exports.ProjectStatusAmino = ProjectStatus;
|
|
@@ -83,6 +89,9 @@ function projectStatusFromJSON(object) {
|
|
|
83
89
|
case 3:
|
|
84
90
|
case "PROJECT_STATUS_CANCELLED":
|
|
85
91
|
return ProjectStatus.PROJECT_STATUS_CANCELLED;
|
|
92
|
+
case 4:
|
|
93
|
+
case "PROJECT_STATUS_EXPIRED":
|
|
94
|
+
return ProjectStatus.PROJECT_STATUS_EXPIRED;
|
|
86
95
|
case -1:
|
|
87
96
|
case "UNRECOGNIZED":
|
|
88
97
|
default:
|
|
@@ -99,6 +108,8 @@ function projectStatusToJSON(object) {
|
|
|
99
108
|
return "PROJECT_STATUS_COMPLETED";
|
|
100
109
|
case ProjectStatus.PROJECT_STATUS_CANCELLED:
|
|
101
110
|
return "PROJECT_STATUS_CANCELLED";
|
|
111
|
+
case ProjectStatus.PROJECT_STATUS_EXPIRED:
|
|
112
|
+
return "PROJECT_STATUS_EXPIRED";
|
|
102
113
|
case ProjectStatus.UNRECOGNIZED:
|
|
103
114
|
default:
|
|
104
115
|
return "UNRECOGNIZED";
|
|
@@ -167,7 +178,8 @@ function createBaseProject() {
|
|
|
167
178
|
approvedBy: "",
|
|
168
179
|
approvedAt: BigInt(0),
|
|
169
180
|
completedAt: BigInt(0),
|
|
170
|
-
permissionless: false
|
|
181
|
+
permissionless: false,
|
|
182
|
+
expiryBlockHeight: BigInt(0)
|
|
171
183
|
};
|
|
172
184
|
}
|
|
173
185
|
/**
|
|
@@ -233,6 +245,9 @@ exports.Project = {
|
|
|
233
245
|
if (message.permissionless === true) {
|
|
234
246
|
writer.uint32(144).bool(message.permissionless);
|
|
235
247
|
}
|
|
248
|
+
if (message.expiryBlockHeight !== BigInt(0)) {
|
|
249
|
+
writer.uint32(152).int64(message.expiryBlockHeight);
|
|
250
|
+
}
|
|
236
251
|
return writer;
|
|
237
252
|
},
|
|
238
253
|
decode(input, length) {
|
|
@@ -296,6 +311,9 @@ exports.Project = {
|
|
|
296
311
|
case 18:
|
|
297
312
|
message.permissionless = reader.bool();
|
|
298
313
|
break;
|
|
314
|
+
case 19:
|
|
315
|
+
message.expiryBlockHeight = reader.int64();
|
|
316
|
+
break;
|
|
299
317
|
default:
|
|
300
318
|
reader.skipType(tag & 7);
|
|
301
319
|
break;
|
|
@@ -323,6 +341,7 @@ exports.Project = {
|
|
|
323
341
|
message.approvedAt = object.approvedAt !== undefined && object.approvedAt !== null ? BigInt(object.approvedAt.toString()) : BigInt(0);
|
|
324
342
|
message.completedAt = object.completedAt !== undefined && object.completedAt !== null ? BigInt(object.completedAt.toString()) : BigInt(0);
|
|
325
343
|
message.permissionless = object.permissionless ?? false;
|
|
344
|
+
message.expiryBlockHeight = object.expiryBlockHeight !== undefined && object.expiryBlockHeight !== null ? BigInt(object.expiryBlockHeight.toString()) : BigInt(0);
|
|
326
345
|
return message;
|
|
327
346
|
},
|
|
328
347
|
fromAmino(object) {
|
|
@@ -379,6 +398,9 @@ exports.Project = {
|
|
|
379
398
|
if (object.permissionless !== undefined && object.permissionless !== null) {
|
|
380
399
|
message.permissionless = object.permissionless;
|
|
381
400
|
}
|
|
401
|
+
if (object.expiry_block_height !== undefined && object.expiry_block_height !== null) {
|
|
402
|
+
message.expiryBlockHeight = BigInt(object.expiry_block_height);
|
|
403
|
+
}
|
|
382
404
|
return message;
|
|
383
405
|
},
|
|
384
406
|
toAmino(message) {
|
|
@@ -406,6 +428,7 @@ exports.Project = {
|
|
|
406
428
|
obj.approved_at = message.approvedAt !== BigInt(0) ? message.approvedAt?.toString() : undefined;
|
|
407
429
|
obj.completed_at = message.completedAt !== BigInt(0) ? message.completedAt?.toString() : undefined;
|
|
408
430
|
obj.permissionless = message.permissionless === false ? undefined : message.permissionless;
|
|
431
|
+
obj.expiry_block_height = message.expiryBlockHeight !== BigInt(0) ? message.expiryBlockHeight?.toString() : undefined;
|
|
409
432
|
return obj;
|
|
410
433
|
},
|
|
411
434
|
fromAminoMsg(object) {
|
|
@@ -35,6 +35,11 @@ export interface Params {
|
|
|
35
35
|
* Maximum gas budget per session.
|
|
36
36
|
*/
|
|
37
37
|
maxSpendLimit: Coin;
|
|
38
|
+
/**
|
|
39
|
+
* Maximum exec_count per session. Must be > 0; sessions must declare
|
|
40
|
+
* a finite cap (1 <= session.max_exec_count <= params.max_exec_count).
|
|
41
|
+
*/
|
|
42
|
+
maxExecCount: bigint;
|
|
38
43
|
}
|
|
39
44
|
export interface ParamsProtoMsg {
|
|
40
45
|
typeUrl: "/sparkdream.session.v1.Params";
|
|
@@ -73,6 +78,11 @@ export interface ParamsAmino {
|
|
|
73
78
|
* Maximum gas budget per session.
|
|
74
79
|
*/
|
|
75
80
|
max_spend_limit: CoinAmino;
|
|
81
|
+
/**
|
|
82
|
+
* Maximum exec_count per session. Must be > 0; sessions must declare
|
|
83
|
+
* a finite cap (1 <= session.max_exec_count <= params.max_exec_count).
|
|
84
|
+
*/
|
|
85
|
+
max_exec_count?: string;
|
|
76
86
|
}
|
|
77
87
|
export interface ParamsAminoMsg {
|
|
78
88
|
type: "sparkdream/x/session/Params";
|
|
@@ -96,6 +106,7 @@ export interface SessionOperationalParams {
|
|
|
96
106
|
maxMsgTypesPerSession: bigint;
|
|
97
107
|
maxExpiration: Duration;
|
|
98
108
|
maxSpendLimit: Coin;
|
|
109
|
+
maxExecCount: bigint;
|
|
99
110
|
}
|
|
100
111
|
export interface SessionOperationalParamsProtoMsg {
|
|
101
112
|
typeUrl: "/sparkdream.session.v1.SessionOperationalParams";
|
|
@@ -119,6 +130,7 @@ export interface SessionOperationalParamsAmino {
|
|
|
119
130
|
max_msg_types_per_session?: string;
|
|
120
131
|
max_expiration?: DurationAmino;
|
|
121
132
|
max_spend_limit: CoinAmino;
|
|
133
|
+
max_exec_count?: string;
|
|
122
134
|
}
|
|
123
135
|
export interface SessionOperationalParamsAminoMsg {
|
|
124
136
|
type: "sparkdream/x/session/SessionOperationalParams";
|
|
@@ -12,7 +12,8 @@ function createBaseParams() {
|
|
|
12
12
|
maxSessionsPerGranter: BigInt(0),
|
|
13
13
|
maxMsgTypesPerSession: BigInt(0),
|
|
14
14
|
maxExpiration: duration_1.Duration.fromPartial({}),
|
|
15
|
-
maxSpendLimit: coin_1.Coin.fromPartial({})
|
|
15
|
+
maxSpendLimit: coin_1.Coin.fromPartial({}),
|
|
16
|
+
maxExecCount: BigInt(0)
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
@@ -43,6 +44,9 @@ exports.Params = {
|
|
|
43
44
|
if (message.maxSpendLimit !== undefined) {
|
|
44
45
|
coin_1.Coin.encode(message.maxSpendLimit, writer.uint32(50).fork()).ldelim();
|
|
45
46
|
}
|
|
47
|
+
if (message.maxExecCount !== BigInt(0)) {
|
|
48
|
+
writer.uint32(56).uint64(message.maxExecCount);
|
|
49
|
+
}
|
|
46
50
|
return writer;
|
|
47
51
|
},
|
|
48
52
|
decode(input, length) {
|
|
@@ -70,6 +74,9 @@ exports.Params = {
|
|
|
70
74
|
case 6:
|
|
71
75
|
message.maxSpendLimit = coin_1.Coin.decode(reader, reader.uint32());
|
|
72
76
|
break;
|
|
77
|
+
case 7:
|
|
78
|
+
message.maxExecCount = reader.uint64();
|
|
79
|
+
break;
|
|
73
80
|
default:
|
|
74
81
|
reader.skipType(tag & 7);
|
|
75
82
|
break;
|
|
@@ -85,6 +92,7 @@ exports.Params = {
|
|
|
85
92
|
message.maxMsgTypesPerSession = object.maxMsgTypesPerSession !== undefined && object.maxMsgTypesPerSession !== null ? BigInt(object.maxMsgTypesPerSession.toString()) : BigInt(0);
|
|
86
93
|
message.maxExpiration = object.maxExpiration !== undefined && object.maxExpiration !== null ? duration_1.Duration.fromPartial(object.maxExpiration) : undefined;
|
|
87
94
|
message.maxSpendLimit = object.maxSpendLimit !== undefined && object.maxSpendLimit !== null ? coin_1.Coin.fromPartial(object.maxSpendLimit) : undefined;
|
|
95
|
+
message.maxExecCount = object.maxExecCount !== undefined && object.maxExecCount !== null ? BigInt(object.maxExecCount.toString()) : BigInt(0);
|
|
88
96
|
return message;
|
|
89
97
|
},
|
|
90
98
|
fromAmino(object) {
|
|
@@ -103,6 +111,9 @@ exports.Params = {
|
|
|
103
111
|
if (object.max_spend_limit !== undefined && object.max_spend_limit !== null) {
|
|
104
112
|
message.maxSpendLimit = coin_1.Coin.fromAmino(object.max_spend_limit);
|
|
105
113
|
}
|
|
114
|
+
if (object.max_exec_count !== undefined && object.max_exec_count !== null) {
|
|
115
|
+
message.maxExecCount = BigInt(object.max_exec_count);
|
|
116
|
+
}
|
|
106
117
|
return message;
|
|
107
118
|
},
|
|
108
119
|
toAmino(message) {
|
|
@@ -123,6 +134,7 @@ exports.Params = {
|
|
|
123
134
|
obj.max_msg_types_per_session = message.maxMsgTypesPerSession !== BigInt(0) ? message.maxMsgTypesPerSession?.toString() : undefined;
|
|
124
135
|
obj.max_expiration = message.maxExpiration ? duration_1.Duration.toAmino(message.maxExpiration) : undefined;
|
|
125
136
|
obj.max_spend_limit = message.maxSpendLimit ? coin_1.Coin.toAmino(message.maxSpendLimit) : coin_1.Coin.toAmino(coin_1.Coin.fromPartial({}));
|
|
137
|
+
obj.max_exec_count = message.maxExecCount !== BigInt(0) ? message.maxExecCount?.toString() : undefined;
|
|
126
138
|
return obj;
|
|
127
139
|
},
|
|
128
140
|
fromAminoMsg(object) {
|
|
@@ -153,7 +165,8 @@ function createBaseSessionOperationalParams() {
|
|
|
153
165
|
maxSessionsPerGranter: BigInt(0),
|
|
154
166
|
maxMsgTypesPerSession: BigInt(0),
|
|
155
167
|
maxExpiration: duration_1.Duration.fromPartial({}),
|
|
156
|
-
maxSpendLimit: coin_1.Coin.fromPartial({})
|
|
168
|
+
maxSpendLimit: coin_1.Coin.fromPartial({}),
|
|
169
|
+
maxExecCount: BigInt(0)
|
|
157
170
|
};
|
|
158
171
|
}
|
|
159
172
|
/**
|
|
@@ -183,6 +196,9 @@ exports.SessionOperationalParams = {
|
|
|
183
196
|
if (message.maxSpendLimit !== undefined) {
|
|
184
197
|
coin_1.Coin.encode(message.maxSpendLimit, writer.uint32(42).fork()).ldelim();
|
|
185
198
|
}
|
|
199
|
+
if (message.maxExecCount !== BigInt(0)) {
|
|
200
|
+
writer.uint32(48).uint64(message.maxExecCount);
|
|
201
|
+
}
|
|
186
202
|
return writer;
|
|
187
203
|
},
|
|
188
204
|
decode(input, length) {
|
|
@@ -207,6 +223,9 @@ exports.SessionOperationalParams = {
|
|
|
207
223
|
case 5:
|
|
208
224
|
message.maxSpendLimit = coin_1.Coin.decode(reader, reader.uint32());
|
|
209
225
|
break;
|
|
226
|
+
case 6:
|
|
227
|
+
message.maxExecCount = reader.uint64();
|
|
228
|
+
break;
|
|
210
229
|
default:
|
|
211
230
|
reader.skipType(tag & 7);
|
|
212
231
|
break;
|
|
@@ -221,6 +240,7 @@ exports.SessionOperationalParams = {
|
|
|
221
240
|
message.maxMsgTypesPerSession = object.maxMsgTypesPerSession !== undefined && object.maxMsgTypesPerSession !== null ? BigInt(object.maxMsgTypesPerSession.toString()) : BigInt(0);
|
|
222
241
|
message.maxExpiration = object.maxExpiration !== undefined && object.maxExpiration !== null ? duration_1.Duration.fromPartial(object.maxExpiration) : undefined;
|
|
223
242
|
message.maxSpendLimit = object.maxSpendLimit !== undefined && object.maxSpendLimit !== null ? coin_1.Coin.fromPartial(object.maxSpendLimit) : undefined;
|
|
243
|
+
message.maxExecCount = object.maxExecCount !== undefined && object.maxExecCount !== null ? BigInt(object.maxExecCount.toString()) : BigInt(0);
|
|
224
244
|
return message;
|
|
225
245
|
},
|
|
226
246
|
fromAmino(object) {
|
|
@@ -238,6 +258,9 @@ exports.SessionOperationalParams = {
|
|
|
238
258
|
if (object.max_spend_limit !== undefined && object.max_spend_limit !== null) {
|
|
239
259
|
message.maxSpendLimit = coin_1.Coin.fromAmino(object.max_spend_limit);
|
|
240
260
|
}
|
|
261
|
+
if (object.max_exec_count !== undefined && object.max_exec_count !== null) {
|
|
262
|
+
message.maxExecCount = BigInt(object.max_exec_count);
|
|
263
|
+
}
|
|
241
264
|
return message;
|
|
242
265
|
},
|
|
243
266
|
toAmino(message) {
|
|
@@ -252,6 +275,7 @@ exports.SessionOperationalParams = {
|
|
|
252
275
|
obj.max_msg_types_per_session = message.maxMsgTypesPerSession !== BigInt(0) ? message.maxMsgTypesPerSession?.toString() : undefined;
|
|
253
276
|
obj.max_expiration = message.maxExpiration ? duration_1.Duration.toAmino(message.maxExpiration) : undefined;
|
|
254
277
|
obj.max_spend_limit = message.maxSpendLimit ? coin_1.Coin.toAmino(message.maxSpendLimit) : coin_1.Coin.toAmino(coin_1.Coin.fromPartial({}));
|
|
278
|
+
obj.max_exec_count = message.maxExecCount !== BigInt(0) ? message.maxExecCount?.toString() : undefined;
|
|
255
279
|
return obj;
|
|
256
280
|
},
|
|
257
281
|
fromAminoMsg(object) {
|