@sparkdreamnft/sparkdreamjs 0.0.43 → 0.0.45
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/akash/bundle.d.ts +134 -134
- package/akash/bundle.js +150 -150
- package/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/akash/bundle.js +150 -150
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +116 -116
- package/esm/sparkdream/artifact/module/v1/module.js +71 -0
- package/esm/sparkdream/artifact/v1/genesis.js +279 -0
- package/esm/sparkdream/artifact/v1/params.js +645 -0
- package/esm/sparkdream/artifact/v1/query.js +3415 -0
- package/esm/sparkdream/artifact/v1/query.lcd.js +159 -0
- package/esm/sparkdream/artifact/v1/query.rpc.Query.js +188 -0
- package/esm/sparkdream/artifact/v1/tx.amino.js +159 -0
- package/esm/sparkdream/artifact/v1/tx.js +5751 -0
- package/esm/sparkdream/artifact/v1/tx.registry.js +573 -0
- package/esm/sparkdream/artifact/v1/tx.rpc.msg.js +199 -0
- package/esm/sparkdream/artifact/v1/types.js +2603 -0
- package/esm/sparkdream/blog/v1/params.js +37 -1
- package/esm/sparkdream/blog/v1/post.js +38 -1
- package/esm/sparkdream/blog/v1/query.js +351 -0
- package/esm/sparkdream/blog/v1/query.lcd.js +12 -0
- package/esm/sparkdream/blog/v1/query.rpc.Query.js +21 -1
- package/esm/sparkdream/blog/v1/types.js +38 -1
- package/esm/sparkdream/bundle.js +521 -483
- package/esm/sparkdream/client.js +4 -1
- package/esm/sparkdream/collect/v1/params.js +102 -126
- package/esm/sparkdream/collect/v1/types.js +207 -123
- package/esm/sparkdream/common/v1/media_flag.js +63 -0
- package/esm/sparkdream/common/v1/moderation_reason.js +1 -1
- package/esm/sparkdream/commons/v1/query.js +27 -3
- package/esm/sparkdream/federation/v1/packet.js +13 -1
- package/esm/sparkdream/federation/v1/query.js +163 -0
- package/esm/sparkdream/federation/v1/query.lcd.js +7 -0
- package/esm/sparkdream/federation/v1/query.rpc.Query.js +12 -1
- package/esm/sparkdream/federation/v1/tx.js +13 -1
- package/esm/sparkdream/federation/v1/types.js +37 -1
- package/esm/sparkdream/forum/v1/params.js +37 -1
- package/esm/sparkdream/forum/v1/post.js +38 -1
- package/esm/sparkdream/forum/v1/query.js +176 -0
- package/esm/sparkdream/forum/v1/query.lcd.js +7 -0
- package/esm/sparkdream/forum/v1/query.rpc.Query.js +12 -1
- package/esm/sparkdream/lcd.js +5 -0
- package/esm/sparkdream/name/v1/genesis.js +32 -2
- package/esm/sparkdream/rep/v1/accountability.js +22 -0
- package/esm/sparkdream/rep/v1/genesis.js +18 -2
- package/esm/sparkdream/rep/v1/initiative_bounty.js +200 -0
- package/esm/sparkdream/rep/v1/member.js +97 -35
- package/esm/sparkdream/rep/v1/params.js +198 -66
- package/esm/sparkdream/rep/v1/query.js +530 -0
- package/esm/sparkdream/rep/v1/query.lcd.js +23 -0
- package/esm/sparkdream/rep/v1/query.rpc.Query.js +26 -1
- package/esm/sparkdream/rep/v1/tx.js +499 -7
- package/esm/sparkdream/rep/v1/tx.registry.js +56 -2
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +21 -1
- package/esm/sparkdream/rpc.query.js +3 -0
- package/esm/sparkdream/rpc.tx.js +3 -0
- package/esm/sparkdream/season/v1/tx.js +33 -2
- package/esm/sparkdream/service/v1/checkpoint.js +125 -0
- package/esm/sparkdream/service/v1/genesis.js +17 -1
- package/esm/sparkdream/service/v1/operator.js +25 -1
- package/esm/sparkdream/service/v1/query.js +317 -0
- package/esm/sparkdream/service/v1/query.lcd.js +18 -0
- package/esm/sparkdream/service/v1/query.rpc.Query.js +21 -1
- package/esm/sparkdream/service/v1/service_type_config.js +37 -1
- package/esm/sparkdream/service/v1/tx.amino.js +11 -1
- package/esm/sparkdream/service/v1/tx.js +332 -0
- package/esm/sparkdream/service/v1/tx.registry.js +38 -2
- package/esm/sparkdream/service/v1/tx.rpc.msg.js +20 -1
- package/esm/sparkdream/session/v1/grant.js +98 -6
- package/esm/sparkdream/session/v1/tx.amino.js +3 -0
- package/esm/sparkdream/session/v1/tx.js +15 -3
- package/esm/sparkdream/session/v1/tx.rpc.msg.js +2 -2
- package/esm/sparkdream/shield/v1/genesis.js +32 -2
- package/esm/sparkdream/shield/v1/params.js +25 -1
- package/esm/sparkdream/shield/v1/query.js +13 -1
- package/esm/sparkdream/shield/v1/types.js +480 -16
- package/esm/sparkdream/sparkdream/v1/query.js +176 -0
- package/esm/sparkdream/sparkdream/v1/query.lcd.js +9 -0
- package/esm/sparkdream/sparkdream/v1/query.rpc.Query.js +14 -1
- package/esm/tendermint/bundle.js +20 -20
- package/ibc/bundle.d.ts +99 -99
- package/ibc/bundle.js +116 -116
- package/package.json +1 -1
- package/sparkdream/artifact/module/v1/module.d.ts +54 -0
- package/sparkdream/artifact/module/v1/module.js +74 -0
- package/sparkdream/artifact/v1/genesis.d.ts +88 -0
- package/sparkdream/artifact/v1/genesis.js +282 -0
- package/sparkdream/artifact/v1/params.d.ts +251 -0
- package/sparkdream/artifact/v1/params.js +648 -0
- package/sparkdream/artifact/v1/query.d.ts +1986 -0
- package/sparkdream/artifact/v1/query.js +3418 -0
- package/sparkdream/artifact/v1/query.lcd.d.ts +27 -0
- package/sparkdream/artifact/v1/query.lcd.js +163 -0
- package/sparkdream/artifact/v1/query.rpc.Query.d.ts +88 -0
- package/sparkdream/artifact/v1/query.rpc.Query.js +193 -0
- package/sparkdream/artifact/v1/tx.amino.d.ts +158 -0
- package/sparkdream/artifact/v1/tx.amino.js +162 -0
- package/sparkdream/artifact/v1/tx.d.ts +3268 -0
- package/sparkdream/artifact/v1/tx.js +5755 -0
- package/sparkdream/artifact/v1/tx.registry.d.ts +385 -0
- package/sparkdream/artifact/v1/tx.registry.js +577 -0
- package/sparkdream/artifact/v1/tx.rpc.msg.d.ts +109 -0
- package/sparkdream/artifact/v1/tx.rpc.msg.js +204 -0
- package/sparkdream/artifact/v1/types.d.ts +1157 -0
- package/sparkdream/artifact/v1/types.js +2620 -0
- package/sparkdream/blog/v1/params.d.ts +46 -0
- package/sparkdream/blog/v1/params.js +37 -1
- package/sparkdream/blog/v1/post.d.ts +24 -0
- package/sparkdream/blog/v1/post.js +38 -1
- package/sparkdream/blog/v1/query.d.ts +195 -0
- package/sparkdream/blog/v1/query.js +352 -1
- package/sparkdream/blog/v1/query.lcd.d.ts +3 -1
- package/sparkdream/blog/v1/query.lcd.js +12 -0
- package/sparkdream/blog/v1/query.rpc.Query.d.ts +13 -1
- package/sparkdream/blog/v1/query.rpc.Query.js +20 -0
- package/sparkdream/blog/v1/types.d.ts +24 -0
- package/sparkdream/blog/v1/types.js +38 -1
- package/sparkdream/bundle.d.ts +20666 -17863
- package/sparkdream/bundle.js +521 -483
- package/sparkdream/client.d.ts +165 -0
- package/sparkdream/client.js +4 -1
- package/sparkdream/collect/v1/params.d.ts +0 -4
- package/sparkdream/collect/v1/params.js +102 -126
- package/sparkdream/collect/v1/types.d.ts +80 -4
- package/sparkdream/collect/v1/types.js +207 -123
- package/sparkdream/common/v1/media_flag.d.ts +23 -0
- package/sparkdream/common/v1/media_flag.js +68 -0
- package/sparkdream/common/v1/moderation_reason.d.ts +1 -1
- package/sparkdream/common/v1/moderation_reason.js +1 -1
- package/sparkdream/commons/v1/query.d.ts +19 -1
- package/sparkdream/commons/v1/query.js +26 -2
- package/sparkdream/federation/v1/packet.d.ts +14 -0
- package/sparkdream/federation/v1/packet.js +13 -1
- package/sparkdream/federation/v1/query.d.ts +92 -0
- package/sparkdream/federation/v1/query.js +164 -1
- package/sparkdream/federation/v1/query.lcd.d.ts +2 -1
- package/sparkdream/federation/v1/query.lcd.js +7 -0
- package/sparkdream/federation/v1/query.rpc.Query.d.ts +9 -1
- package/sparkdream/federation/v1/query.rpc.Query.js +11 -0
- package/sparkdream/federation/v1/tx.d.ts +18 -0
- package/sparkdream/federation/v1/tx.js +13 -1
- package/sparkdream/federation/v1/types.d.ts +34 -0
- package/sparkdream/federation/v1/types.js +37 -1
- package/sparkdream/forum/v1/params.d.ts +46 -0
- package/sparkdream/forum/v1/params.js +37 -1
- package/sparkdream/forum/v1/post.d.ts +30 -0
- package/sparkdream/forum/v1/post.js +38 -1
- package/sparkdream/forum/v1/query.d.ts +98 -0
- package/sparkdream/forum/v1/query.js +177 -1
- package/sparkdream/forum/v1/query.lcd.d.ts +2 -1
- package/sparkdream/forum/v1/query.lcd.js +7 -0
- package/sparkdream/forum/v1/query.rpc.Query.d.ts +9 -1
- package/sparkdream/forum/v1/query.rpc.Query.js +11 -0
- package/sparkdream/lcd.d.ts +3 -0
- package/sparkdream/lcd.js +5 -0
- package/sparkdream/name/v1/genesis.d.ts +23 -1
- package/sparkdream/name/v1/genesis.js +31 -1
- package/sparkdream/rep/v1/accountability.d.ts +12 -0
- package/sparkdream/rep/v1/accountability.js +22 -0
- package/sparkdream/rep/v1/genesis.d.ts +18 -7
- package/sparkdream/rep/v1/genesis.js +18 -2
- package/sparkdream/rep/v1/initiative_bounty.d.ts +143 -0
- package/sparkdream/rep/v1/initiative_bounty.js +203 -0
- package/sparkdream/rep/v1/member.d.ts +82 -28
- package/sparkdream/rep/v1/member.js +97 -35
- package/sparkdream/rep/v1/params.d.ts +144 -28
- package/sparkdream/rep/v1/params.js +198 -66
- package/sparkdream/rep/v1/query.d.ts +315 -10
- package/sparkdream/rep/v1/query.js +531 -1
- package/sparkdream/rep/v1/query.lcd.d.ts +3 -1
- package/sparkdream/rep/v1/query.lcd.js +23 -0
- package/sparkdream/rep/v1/query.rpc.Query.d.ts +18 -1
- package/sparkdream/rep/v1/query.rpc.Query.js +25 -0
- package/sparkdream/rep/v1/tx.d.ts +338 -1
- package/sparkdream/rep/v1/tx.js +500 -8
- package/sparkdream/rep/v1/tx.registry.d.ts +37 -1
- package/sparkdream/rep/v1/tx.registry.js +55 -1
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +14 -1
- package/sparkdream/rep/v1/tx.rpc.msg.js +20 -0
- package/sparkdream/rpc.query.d.ts +32 -0
- package/sparkdream/rpc.query.js +3 -0
- package/sparkdream/rpc.tx.d.ts +3 -0
- package/sparkdream/rpc.tx.js +3 -0
- package/sparkdream/season/v1/tx.d.ts +19 -0
- package/sparkdream/season/v1/tx.js +33 -2
- package/sparkdream/service/v1/checkpoint.d.ts +93 -0
- package/sparkdream/service/v1/checkpoint.js +128 -0
- package/sparkdream/service/v1/genesis.d.ts +15 -0
- package/sparkdream/service/v1/genesis.js +17 -1
- package/sparkdream/service/v1/operator.d.ts +30 -0
- package/sparkdream/service/v1/operator.js +25 -1
- package/sparkdream/service/v1/query.d.ts +186 -0
- package/sparkdream/service/v1/query.js +318 -1
- package/sparkdream/service/v1/query.lcd.d.ts +3 -1
- package/sparkdream/service/v1/query.lcd.js +18 -0
- package/sparkdream/service/v1/query.rpc.Query.d.ts +13 -1
- package/sparkdream/service/v1/query.rpc.Query.js +20 -0
- package/sparkdream/service/v1/service_type_config.d.ts +48 -0
- package/sparkdream/service/v1/service_type_config.js +37 -1
- package/sparkdream/service/v1/tx.amino.d.ts +11 -1
- package/sparkdream/service/v1/tx.amino.js +10 -0
- package/sparkdream/service/v1/tx.d.ts +216 -0
- package/sparkdream/service/v1/tx.js +333 -1
- package/sparkdream/service/v1/tx.registry.d.ts +25 -1
- package/sparkdream/service/v1/tx.registry.js +37 -1
- package/sparkdream/service/v1/tx.rpc.msg.d.ts +18 -1
- package/sparkdream/service/v1/tx.rpc.msg.js +19 -0
- package/sparkdream/session/v1/grant.d.ts +75 -7
- package/sparkdream/session/v1/grant.js +99 -7
- package/sparkdream/session/v1/tx.amino.js +3 -0
- package/sparkdream/session/v1/tx.d.ts +6 -4
- package/sparkdream/session/v1/tx.js +14 -2
- package/sparkdream/session/v1/tx.rpc.msg.d.ts +2 -2
- package/sparkdream/session/v1/tx.rpc.msg.js +2 -2
- package/sparkdream/shield/v1/genesis.d.ts +17 -1
- package/sparkdream/shield/v1/genesis.js +31 -1
- package/sparkdream/shield/v1/params.d.ts +32 -4
- package/sparkdream/shield/v1/params.js +25 -1
- package/sparkdream/shield/v1/query.d.ts +8 -0
- package/sparkdream/shield/v1/query.js +13 -1
- package/sparkdream/shield/v1/tx.d.ts +36 -10
- package/sparkdream/shield/v1/types.d.ts +337 -13
- package/sparkdream/shield/v1/types.js +483 -17
- package/sparkdream/sparkdream/v1/query.d.ts +132 -0
- package/sparkdream/sparkdream/v1/query.js +177 -1
- package/sparkdream/sparkdream/v1/query.lcd.d.ts +2 -1
- package/sparkdream/sparkdream/v1/query.lcd.js +9 -0
- package/sparkdream/sparkdream/v1/query.rpc.Query.d.ts +11 -1
- package/sparkdream/sparkdream/v1/query.rpc.Query.js +13 -0
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +20 -20
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MessageComposer = exports.load = exports.registry = void 0;
|
|
4
4
|
const tx_1 = require("./tx");
|
|
5
|
-
exports.registry = [["/sparkdream.service.v1.MsgUpdateParams", tx_1.MsgUpdateParams], ["/sparkdream.service.v1.MsgUpdateServiceTypeConfig", tx_1.MsgUpdateServiceTypeConfig], ["/sparkdream.service.v1.MsgRegisterOperator", tx_1.MsgRegisterOperator], ["/sparkdream.service.v1.MsgUpdateMetadata", tx_1.MsgUpdateMetadata], ["/sparkdream.service.v1.MsgUnbondOperator", tx_1.MsgUnbondOperator], ["/sparkdream.service.v1.MsgClaimUnbondedBond", tx_1.MsgClaimUnbondedBond], ["/sparkdream.service.v1.MsgTopUpBond", tx_1.MsgTopUpBond], ["/sparkdream.service.v1.MsgReportOperator", tx_1.MsgReportOperator], ["/sparkdream.service.v1.MsgResolveReport", tx_1.MsgResolveReport], ["/sparkdream.service.v1.MsgContestSlash", tx_1.MsgContestSlash], ["/sparkdream.service.v1.MsgResolveReportByJury", tx_1.MsgResolveReportByJury], ["/sparkdream.service.v1.MsgOpenControllerTransferCase", tx_1.MsgOpenControllerTransferCase], ["/sparkdream.service.v1.MsgFinalizeControllerTransfer", tx_1.MsgFinalizeControllerTransfer]];
|
|
5
|
+
exports.registry = [["/sparkdream.service.v1.MsgUpdateParams", tx_1.MsgUpdateParams], ["/sparkdream.service.v1.MsgUpdateServiceTypeConfig", tx_1.MsgUpdateServiceTypeConfig], ["/sparkdream.service.v1.MsgRegisterOperator", tx_1.MsgRegisterOperator], ["/sparkdream.service.v1.MsgUpdateMetadata", tx_1.MsgUpdateMetadata], ["/sparkdream.service.v1.MsgUnbondOperator", tx_1.MsgUnbondOperator], ["/sparkdream.service.v1.MsgClaimUnbondedBond", tx_1.MsgClaimUnbondedBond], ["/sparkdream.service.v1.MsgTopUpBond", tx_1.MsgTopUpBond], ["/sparkdream.service.v1.MsgWithdrawBond", tx_1.MsgWithdrawBond], ["/sparkdream.service.v1.MsgReportOperator", tx_1.MsgReportOperator], ["/sparkdream.service.v1.MsgResolveReport", tx_1.MsgResolveReport], ["/sparkdream.service.v1.MsgContestSlash", tx_1.MsgContestSlash], ["/sparkdream.service.v1.MsgResolveReportByJury", tx_1.MsgResolveReportByJury], ["/sparkdream.service.v1.MsgOpenControllerTransferCase", tx_1.MsgOpenControllerTransferCase], ["/sparkdream.service.v1.MsgFinalizeControllerTransfer", tx_1.MsgFinalizeControllerTransfer], ["/sparkdream.service.v1.MsgSubmitCheckpoint", tx_1.MsgSubmitCheckpoint]];
|
|
6
6
|
const load = (protoRegistry) => {
|
|
7
7
|
exports.registry.forEach(([typeUrl, mod]) => {
|
|
8
8
|
protoRegistry.register(typeUrl, mod);
|
|
@@ -53,6 +53,12 @@ exports.MessageComposer = {
|
|
|
53
53
|
value: tx_1.MsgTopUpBond.encode(value).finish()
|
|
54
54
|
};
|
|
55
55
|
},
|
|
56
|
+
withdrawBond(value) {
|
|
57
|
+
return {
|
|
58
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBond",
|
|
59
|
+
value: tx_1.MsgWithdrawBond.encode(value).finish()
|
|
60
|
+
};
|
|
61
|
+
},
|
|
56
62
|
reportOperator(value) {
|
|
57
63
|
return {
|
|
58
64
|
typeUrl: "/sparkdream.service.v1.MsgReportOperator",
|
|
@@ -88,6 +94,12 @@ exports.MessageComposer = {
|
|
|
88
94
|
typeUrl: "/sparkdream.service.v1.MsgFinalizeControllerTransfer",
|
|
89
95
|
value: tx_1.MsgFinalizeControllerTransfer.encode(value).finish()
|
|
90
96
|
};
|
|
97
|
+
},
|
|
98
|
+
submitCheckpoint(value) {
|
|
99
|
+
return {
|
|
100
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpoint",
|
|
101
|
+
value: tx_1.MsgSubmitCheckpoint.encode(value).finish()
|
|
102
|
+
};
|
|
91
103
|
}
|
|
92
104
|
},
|
|
93
105
|
withTypeUrl: {
|
|
@@ -133,6 +145,12 @@ exports.MessageComposer = {
|
|
|
133
145
|
value
|
|
134
146
|
};
|
|
135
147
|
},
|
|
148
|
+
withdrawBond(value) {
|
|
149
|
+
return {
|
|
150
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBond",
|
|
151
|
+
value
|
|
152
|
+
};
|
|
153
|
+
},
|
|
136
154
|
reportOperator(value) {
|
|
137
155
|
return {
|
|
138
156
|
typeUrl: "/sparkdream.service.v1.MsgReportOperator",
|
|
@@ -168,6 +186,12 @@ exports.MessageComposer = {
|
|
|
168
186
|
typeUrl: "/sparkdream.service.v1.MsgFinalizeControllerTransfer",
|
|
169
187
|
value
|
|
170
188
|
};
|
|
189
|
+
},
|
|
190
|
+
submitCheckpoint(value) {
|
|
191
|
+
return {
|
|
192
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpoint",
|
|
193
|
+
value
|
|
194
|
+
};
|
|
171
195
|
}
|
|
172
196
|
},
|
|
173
197
|
fromPartial: {
|
|
@@ -213,6 +237,12 @@ exports.MessageComposer = {
|
|
|
213
237
|
value: tx_1.MsgTopUpBond.fromPartial(value)
|
|
214
238
|
};
|
|
215
239
|
},
|
|
240
|
+
withdrawBond(value) {
|
|
241
|
+
return {
|
|
242
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBond",
|
|
243
|
+
value: tx_1.MsgWithdrawBond.fromPartial(value)
|
|
244
|
+
};
|
|
245
|
+
},
|
|
216
246
|
reportOperator(value) {
|
|
217
247
|
return {
|
|
218
248
|
typeUrl: "/sparkdream.service.v1.MsgReportOperator",
|
|
@@ -248,6 +278,12 @@ exports.MessageComposer = {
|
|
|
248
278
|
typeUrl: "/sparkdream.service.v1.MsgFinalizeControllerTransfer",
|
|
249
279
|
value: tx_1.MsgFinalizeControllerTransfer.fromPartial(value)
|
|
250
280
|
};
|
|
281
|
+
},
|
|
282
|
+
submitCheckpoint(value) {
|
|
283
|
+
return {
|
|
284
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpoint",
|
|
285
|
+
value: tx_1.MsgSubmitCheckpoint.fromPartial(value)
|
|
286
|
+
};
|
|
251
287
|
}
|
|
252
288
|
}
|
|
253
289
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TxRpc } from "../../../types";
|
|
2
|
-
import { MsgUpdateParams, MsgUpdateParamsResponse, MsgUpdateServiceTypeConfig, MsgUpdateServiceTypeConfigResponse, MsgRegisterOperator, MsgRegisterOperatorResponse, MsgUpdateMetadata, MsgUpdateMetadataResponse, MsgUnbondOperator, MsgUnbondOperatorResponse, MsgClaimUnbondedBond, MsgClaimUnbondedBondResponse, MsgTopUpBond, MsgTopUpBondResponse, MsgReportOperator, MsgReportOperatorResponse, MsgResolveReport, MsgResolveReportResponse, MsgContestSlash, MsgContestSlashResponse, MsgResolveReportByJury, MsgResolveReportByJuryResponse, MsgOpenControllerTransferCase, MsgOpenControllerTransferCaseResponse, MsgFinalizeControllerTransfer, MsgFinalizeControllerTransferResponse } from "./tx";
|
|
2
|
+
import { MsgUpdateParams, MsgUpdateParamsResponse, MsgUpdateServiceTypeConfig, MsgUpdateServiceTypeConfigResponse, MsgRegisterOperator, MsgRegisterOperatorResponse, MsgUpdateMetadata, MsgUpdateMetadataResponse, MsgUnbondOperator, MsgUnbondOperatorResponse, MsgClaimUnbondedBond, MsgClaimUnbondedBondResponse, MsgTopUpBond, MsgTopUpBondResponse, MsgWithdrawBond, MsgWithdrawBondResponse, MsgReportOperator, MsgReportOperatorResponse, MsgResolveReport, MsgResolveReportResponse, MsgContestSlash, MsgContestSlashResponse, MsgResolveReportByJury, MsgResolveReportByJuryResponse, MsgOpenControllerTransferCase, MsgOpenControllerTransferCaseResponse, MsgFinalizeControllerTransfer, MsgFinalizeControllerTransferResponse, MsgSubmitCheckpoint, MsgSubmitCheckpointResponse } from "./tx";
|
|
3
3
|
/** Msg defines the Msg service for x/service. See x-service-spec.md §5. */
|
|
4
4
|
export interface Msg {
|
|
5
5
|
/** UpdateParams updates module-wide params (§4.2). Authority = x/gov. */
|
|
@@ -28,6 +28,14 @@ export interface Msg {
|
|
|
28
28
|
* applicable.
|
|
29
29
|
*/
|
|
30
30
|
topUpBond(request: MsgTopUpBond): Promise<MsgTopUpBondResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* WithdrawBond queues a partial withdrawal of an ACTIVE operator's bond
|
|
33
|
+
* while keeping it ACTIVE: the staying bond must remain >= min_bond.
|
|
34
|
+
* The queued amount stays in the bond pool, slashable, for the
|
|
35
|
+
* service type's unbonding period and is then released through
|
|
36
|
+
* MsgClaimUnbondedBond (§3.5a). Not delegable.
|
|
37
|
+
*/
|
|
38
|
+
withdrawBond(request: MsgWithdrawBond): Promise<MsgWithdrawBondResponse>;
|
|
31
39
|
/**
|
|
32
40
|
* ReportOperator files a new report; reporter posts `report_deposit`
|
|
33
41
|
* escrow (§3.4.6).
|
|
@@ -59,6 +67,13 @@ export interface Msg {
|
|
|
59
67
|
* transfer cases; signer is the x/rep module account (§5.4 + §6.2).
|
|
60
68
|
*/
|
|
61
69
|
finalizeControllerTransfer(request: MsgFinalizeControllerTransfer): Promise<MsgFinalizeControllerTransferResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* SubmitCheckpoint records how far the signing operator's off-chain work
|
|
72
|
+
* has progressed (height + output root). Generic across service types;
|
|
73
|
+
* drives liveness system reports when the service type sets
|
|
74
|
+
* checkpoint_max_lag_blocks (docs/content-scanning.md §8.2).
|
|
75
|
+
*/
|
|
76
|
+
submitCheckpoint(request: MsgSubmitCheckpoint): Promise<MsgSubmitCheckpointResponse>;
|
|
62
77
|
}
|
|
63
78
|
export declare class MsgClientImpl implements Msg {
|
|
64
79
|
private readonly rpc;
|
|
@@ -70,11 +85,13 @@ export declare class MsgClientImpl implements Msg {
|
|
|
70
85
|
unbondOperator: (request: MsgUnbondOperator) => Promise<MsgUnbondOperatorResponse>;
|
|
71
86
|
claimUnbondedBond: (request: MsgClaimUnbondedBond) => Promise<MsgClaimUnbondedBondResponse>;
|
|
72
87
|
topUpBond: (request: MsgTopUpBond) => Promise<MsgTopUpBondResponse>;
|
|
88
|
+
withdrawBond: (request: MsgWithdrawBond) => Promise<MsgWithdrawBondResponse>;
|
|
73
89
|
reportOperator: (request: MsgReportOperator) => Promise<MsgReportOperatorResponse>;
|
|
74
90
|
resolveReport: (request: MsgResolveReport) => Promise<MsgResolveReportResponse>;
|
|
75
91
|
contestSlash: (request: MsgContestSlash) => Promise<MsgContestSlashResponse>;
|
|
76
92
|
resolveReportByJury: (request: MsgResolveReportByJury) => Promise<MsgResolveReportByJuryResponse>;
|
|
77
93
|
openControllerTransferCase: (request: MsgOpenControllerTransferCase) => Promise<MsgOpenControllerTransferCaseResponse>;
|
|
78
94
|
finalizeControllerTransfer: (request: MsgFinalizeControllerTransfer) => Promise<MsgFinalizeControllerTransferResponse>;
|
|
95
|
+
submitCheckpoint: (request: MsgSubmitCheckpoint) => Promise<MsgSubmitCheckpointResponse>;
|
|
79
96
|
}
|
|
80
97
|
export declare const createClientImpl: (rpc: TxRpc) => MsgClientImpl;
|
|
@@ -54,6 +54,16 @@ class MsgClientImpl {
|
|
|
54
54
|
const promise = this.rpc.request("sparkdream.service.v1.Msg", "TopUpBond", data);
|
|
55
55
|
return promise.then(data => tx_1.MsgTopUpBondResponse.decode(new binary_1.BinaryReader(data)));
|
|
56
56
|
};
|
|
57
|
+
/* WithdrawBond queues a partial withdrawal of an ACTIVE operator's bond
|
|
58
|
+
while keeping it ACTIVE: the staying bond must remain >= min_bond.
|
|
59
|
+
The queued amount stays in the bond pool, slashable, for the
|
|
60
|
+
service type's unbonding period and is then released through
|
|
61
|
+
MsgClaimUnbondedBond (§3.5a). Not delegable. */
|
|
62
|
+
withdrawBond = async (request) => {
|
|
63
|
+
const data = tx_1.MsgWithdrawBond.encode(request).finish();
|
|
64
|
+
const promise = this.rpc.request("sparkdream.service.v1.Msg", "WithdrawBond", data);
|
|
65
|
+
return promise.then(data => tx_1.MsgWithdrawBondResponse.decode(new binary_1.BinaryReader(data)));
|
|
66
|
+
};
|
|
57
67
|
/* ReportOperator files a new report; reporter posts `report_deposit`
|
|
58
68
|
escrow (§3.4.6). */
|
|
59
69
|
reportOperator = async (request) => {
|
|
@@ -97,6 +107,15 @@ class MsgClientImpl {
|
|
|
97
107
|
const promise = this.rpc.request("sparkdream.service.v1.Msg", "FinalizeControllerTransfer", data);
|
|
98
108
|
return promise.then(data => tx_1.MsgFinalizeControllerTransferResponse.decode(new binary_1.BinaryReader(data)));
|
|
99
109
|
};
|
|
110
|
+
/* SubmitCheckpoint records how far the signing operator's off-chain work
|
|
111
|
+
has progressed (height + output root). Generic across service types;
|
|
112
|
+
drives liveness system reports when the service type sets
|
|
113
|
+
checkpoint_max_lag_blocks (docs/content-scanning.md §8.2). */
|
|
114
|
+
submitCheckpoint = async (request) => {
|
|
115
|
+
const data = tx_1.MsgSubmitCheckpoint.encode(request).finish();
|
|
116
|
+
const promise = this.rpc.request("sparkdream.service.v1.Msg", "SubmitCheckpoint", data);
|
|
117
|
+
return promise.then(data => tx_1.MsgSubmitCheckpointResponse.decode(new binary_1.BinaryReader(data)));
|
|
118
|
+
};
|
|
100
119
|
}
|
|
101
120
|
exports.MsgClientImpl = MsgClientImpl;
|
|
102
121
|
const createClientImpl = (rpc) => {
|
|
@@ -3,11 +3,12 @@ import { Any, AnyAmino } from "../../../google/protobuf/any";
|
|
|
3
3
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
4
4
|
import { DeepPartial } from "../../../helpers";
|
|
5
5
|
/**
|
|
6
|
-
* GrantType enumerates the
|
|
6
|
+
* GrantType enumerates the typed payload variants of the unified grant
|
|
7
7
|
* registry. The session-key variant preserves the legacy x/session model;
|
|
8
|
-
*
|
|
9
|
-
* refactor
|
|
10
|
-
*
|
|
8
|
+
* RecurringPull, SpendingAllowance and ScheduledOneshot came with the
|
|
9
|
+
* delegated-authorization-registry refactor. SignIn is the one variant
|
|
10
|
+
* nothing on chain executes: it records permission for an off-chain
|
|
11
|
+
* service to let the grantee sign in as the granter.
|
|
11
12
|
*/
|
|
12
13
|
export declare enum GrantType {
|
|
13
14
|
GRANT_TYPE_UNSPECIFIED = 0,
|
|
@@ -15,6 +16,7 @@ export declare enum GrantType {
|
|
|
15
16
|
GRANT_TYPE_RECURRING_PULL = 2,
|
|
16
17
|
GRANT_TYPE_SPENDING_ALLOWANCE = 3,
|
|
17
18
|
GRANT_TYPE_SCHEDULED_ONESHOT = 4,
|
|
19
|
+
GRANT_TYPE_SIGN_IN = 5,
|
|
18
20
|
UNRECOGNIZED = -1
|
|
19
21
|
}
|
|
20
22
|
export declare const GrantTypeAmino: typeof GrantType;
|
|
@@ -41,7 +43,7 @@ export declare function grantStatusToJSON(object: GrantStatus): string;
|
|
|
41
43
|
/**
|
|
42
44
|
* Grant is the unified record for every delegated-authorization primitive
|
|
43
45
|
* in x/session. One record carries the shared lifecycle fields (id,
|
|
44
|
-
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
46
|
+
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
45
47
|
* typed payloads.
|
|
46
48
|
* @name Grant
|
|
47
49
|
* @package sparkdream.session.v1
|
|
@@ -63,6 +65,7 @@ export interface Grant {
|
|
|
63
65
|
recurringPull?: RecurringPullPayload;
|
|
64
66
|
spendingAllowance?: SpendingAllowancePayload;
|
|
65
67
|
scheduledOneshot?: ScheduledOneshotPayload;
|
|
68
|
+
signIn?: SignInPayload;
|
|
66
69
|
}
|
|
67
70
|
export interface GrantProtoMsg {
|
|
68
71
|
typeUrl: "/sparkdream.session.v1.Grant";
|
|
@@ -71,7 +74,7 @@ export interface GrantProtoMsg {
|
|
|
71
74
|
/**
|
|
72
75
|
* Grant is the unified record for every delegated-authorization primitive
|
|
73
76
|
* in x/session. One record carries the shared lifecycle fields (id,
|
|
74
|
-
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
77
|
+
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
75
78
|
* typed payloads.
|
|
76
79
|
* @name GrantAmino
|
|
77
80
|
* @package sparkdream.session.v1
|
|
@@ -93,6 +96,7 @@ export interface GrantAmino {
|
|
|
93
96
|
recurring_pull?: RecurringPullPayloadAmino;
|
|
94
97
|
spending_allowance?: SpendingAllowancePayloadAmino;
|
|
95
98
|
scheduled_oneshot?: ScheduledOneshotPayloadAmino;
|
|
99
|
+
sign_in?: SignInPayloadAmino;
|
|
96
100
|
}
|
|
97
101
|
export interface GrantAminoMsg {
|
|
98
102
|
type: "/sparkdream.session.v1.Grant";
|
|
@@ -372,10 +376,52 @@ export interface OneshotExecAminoMsg {
|
|
|
372
376
|
type: "/sparkdream.session.v1.OneshotExec";
|
|
373
377
|
value: OneshotExecAmino;
|
|
374
378
|
}
|
|
379
|
+
/**
|
|
380
|
+
* SignInPayload lets the grantee sign in to an off-chain service as the
|
|
381
|
+
* granter. The chain only records the permission: the service (e.g. a
|
|
382
|
+
* Spark Dream Mastodon instance's wallet login) reads active SIGN_IN grants
|
|
383
|
+
* to its own hostname and stops honouring one once it is revoked, declined
|
|
384
|
+
* or expired. Nothing on chain executes through it.
|
|
385
|
+
* @name SignInPayload
|
|
386
|
+
* @package sparkdream.session.v1
|
|
387
|
+
* @see proto type: sparkdream.session.v1.SignInPayload
|
|
388
|
+
*/
|
|
389
|
+
export interface SignInPayload {
|
|
390
|
+
/**
|
|
391
|
+
* Lowercase DNS hostname of the service the grantee may sign in to as the
|
|
392
|
+
* granter, e.g. "mstdn.sparkdream.io".
|
|
393
|
+
*/
|
|
394
|
+
service: string;
|
|
395
|
+
}
|
|
396
|
+
export interface SignInPayloadProtoMsg {
|
|
397
|
+
typeUrl: "/sparkdream.session.v1.SignInPayload";
|
|
398
|
+
value: Uint8Array;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* SignInPayload lets the grantee sign in to an off-chain service as the
|
|
402
|
+
* granter. The chain only records the permission: the service (e.g. a
|
|
403
|
+
* Spark Dream Mastodon instance's wallet login) reads active SIGN_IN grants
|
|
404
|
+
* to its own hostname and stops honouring one once it is revoked, declined
|
|
405
|
+
* or expired. Nothing on chain executes through it.
|
|
406
|
+
* @name SignInPayloadAmino
|
|
407
|
+
* @package sparkdream.session.v1
|
|
408
|
+
* @see proto type: sparkdream.session.v1.SignInPayload
|
|
409
|
+
*/
|
|
410
|
+
export interface SignInPayloadAmino {
|
|
411
|
+
/**
|
|
412
|
+
* Lowercase DNS hostname of the service the grantee may sign in to as the
|
|
413
|
+
* granter, e.g. "mstdn.sparkdream.io".
|
|
414
|
+
*/
|
|
415
|
+
service?: string;
|
|
416
|
+
}
|
|
417
|
+
export interface SignInPayloadAminoMsg {
|
|
418
|
+
type: "/sparkdream.session.v1.SignInPayload";
|
|
419
|
+
value: SignInPayloadAmino;
|
|
420
|
+
}
|
|
375
421
|
/**
|
|
376
422
|
* Grant is the unified record for every delegated-authorization primitive
|
|
377
423
|
* in x/session. One record carries the shared lifecycle fields (id,
|
|
378
|
-
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
424
|
+
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
379
425
|
* typed payloads.
|
|
380
426
|
* @name Grant
|
|
381
427
|
* @package sparkdream.session.v1
|
|
@@ -515,3 +561,25 @@ export declare const OneshotExec: {
|
|
|
515
561
|
toProto(message: OneshotExec): Uint8Array;
|
|
516
562
|
toProtoMsg(message: OneshotExec): OneshotExecProtoMsg;
|
|
517
563
|
};
|
|
564
|
+
/**
|
|
565
|
+
* SignInPayload lets the grantee sign in to an off-chain service as the
|
|
566
|
+
* granter. The chain only records the permission: the service (e.g. a
|
|
567
|
+
* Spark Dream Mastodon instance's wallet login) reads active SIGN_IN grants
|
|
568
|
+
* to its own hostname and stops honouring one once it is revoked, declined
|
|
569
|
+
* or expired. Nothing on chain executes through it.
|
|
570
|
+
* @name SignInPayload
|
|
571
|
+
* @package sparkdream.session.v1
|
|
572
|
+
* @see proto type: sparkdream.session.v1.SignInPayload
|
|
573
|
+
*/
|
|
574
|
+
export declare const SignInPayload: {
|
|
575
|
+
typeUrl: string;
|
|
576
|
+
encode(message: SignInPayload, writer?: BinaryWriter): BinaryWriter;
|
|
577
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SignInPayload;
|
|
578
|
+
fromPartial(object: DeepPartial<SignInPayload>): SignInPayload;
|
|
579
|
+
fromAmino(object: SignInPayloadAmino): SignInPayload;
|
|
580
|
+
toAmino(message: SignInPayload): SignInPayloadAmino;
|
|
581
|
+
fromAminoMsg(object: SignInPayloadAminoMsg): SignInPayload;
|
|
582
|
+
fromProtoMsg(message: SignInPayloadProtoMsg): SignInPayload;
|
|
583
|
+
toProto(message: SignInPayload): Uint8Array;
|
|
584
|
+
toProtoMsg(message: SignInPayload): SignInPayloadProtoMsg;
|
|
585
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OneshotExec = exports.OneshotTransfer = exports.ScheduledOneshotPayload = exports.SpendingAllowancePayload = exports.RecurringPullPayload = exports.SessionKeyPayload = exports.Grant = exports.GrantStatusAmino = exports.GrantStatus = exports.GrantTypeAmino = exports.GrantType = void 0;
|
|
3
|
+
exports.SignInPayload = exports.OneshotExec = exports.OneshotTransfer = exports.ScheduledOneshotPayload = exports.SpendingAllowancePayload = exports.RecurringPullPayload = exports.SessionKeyPayload = exports.Grant = exports.GrantStatusAmino = exports.GrantStatus = exports.GrantTypeAmino = exports.GrantType = void 0;
|
|
4
4
|
exports.grantTypeFromJSON = grantTypeFromJSON;
|
|
5
5
|
exports.grantTypeToJSON = grantTypeToJSON;
|
|
6
6
|
exports.grantStatusFromJSON = grantStatusFromJSON;
|
|
@@ -12,11 +12,12 @@ const any_1 = require("../../../google/protobuf/any");
|
|
|
12
12
|
const binary_1 = require("../../../binary");
|
|
13
13
|
const helpers_1 = require("../../../helpers");
|
|
14
14
|
/**
|
|
15
|
-
* GrantType enumerates the
|
|
15
|
+
* GrantType enumerates the typed payload variants of the unified grant
|
|
16
16
|
* registry. The session-key variant preserves the legacy x/session model;
|
|
17
|
-
*
|
|
18
|
-
* refactor
|
|
19
|
-
*
|
|
17
|
+
* RecurringPull, SpendingAllowance and ScheduledOneshot came with the
|
|
18
|
+
* delegated-authorization-registry refactor. SignIn is the one variant
|
|
19
|
+
* nothing on chain executes: it records permission for an off-chain
|
|
20
|
+
* service to let the grantee sign in as the granter.
|
|
20
21
|
*/
|
|
21
22
|
var GrantType;
|
|
22
23
|
(function (GrantType) {
|
|
@@ -25,6 +26,7 @@ var GrantType;
|
|
|
25
26
|
GrantType[GrantType["GRANT_TYPE_RECURRING_PULL"] = 2] = "GRANT_TYPE_RECURRING_PULL";
|
|
26
27
|
GrantType[GrantType["GRANT_TYPE_SPENDING_ALLOWANCE"] = 3] = "GRANT_TYPE_SPENDING_ALLOWANCE";
|
|
27
28
|
GrantType[GrantType["GRANT_TYPE_SCHEDULED_ONESHOT"] = 4] = "GRANT_TYPE_SCHEDULED_ONESHOT";
|
|
29
|
+
GrantType[GrantType["GRANT_TYPE_SIGN_IN"] = 5] = "GRANT_TYPE_SIGN_IN";
|
|
28
30
|
GrantType[GrantType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
29
31
|
})(GrantType || (exports.GrantType = GrantType = {}));
|
|
30
32
|
exports.GrantTypeAmino = GrantType;
|
|
@@ -45,6 +47,9 @@ function grantTypeFromJSON(object) {
|
|
|
45
47
|
case 4:
|
|
46
48
|
case "GRANT_TYPE_SCHEDULED_ONESHOT":
|
|
47
49
|
return GrantType.GRANT_TYPE_SCHEDULED_ONESHOT;
|
|
50
|
+
case 5:
|
|
51
|
+
case "GRANT_TYPE_SIGN_IN":
|
|
52
|
+
return GrantType.GRANT_TYPE_SIGN_IN;
|
|
48
53
|
case -1:
|
|
49
54
|
case "UNRECOGNIZED":
|
|
50
55
|
default:
|
|
@@ -63,6 +68,8 @@ function grantTypeToJSON(object) {
|
|
|
63
68
|
return "GRANT_TYPE_SPENDING_ALLOWANCE";
|
|
64
69
|
case GrantType.GRANT_TYPE_SCHEDULED_ONESHOT:
|
|
65
70
|
return "GRANT_TYPE_SCHEDULED_ONESHOT";
|
|
71
|
+
case GrantType.GRANT_TYPE_SIGN_IN:
|
|
72
|
+
return "GRANT_TYPE_SIGN_IN";
|
|
66
73
|
case GrantType.UNRECOGNIZED:
|
|
67
74
|
default:
|
|
68
75
|
return "UNRECOGNIZED";
|
|
@@ -148,13 +155,14 @@ function createBaseGrant() {
|
|
|
148
155
|
sessionKey: undefined,
|
|
149
156
|
recurringPull: undefined,
|
|
150
157
|
spendingAllowance: undefined,
|
|
151
|
-
scheduledOneshot: undefined
|
|
158
|
+
scheduledOneshot: undefined,
|
|
159
|
+
signIn: undefined
|
|
152
160
|
};
|
|
153
161
|
}
|
|
154
162
|
/**
|
|
155
163
|
* Grant is the unified record for every delegated-authorization primitive
|
|
156
164
|
* in x/session. One record carries the shared lifecycle fields (id,
|
|
157
|
-
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
165
|
+
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
158
166
|
* typed payloads.
|
|
159
167
|
* @name Grant
|
|
160
168
|
* @package sparkdream.session.v1
|
|
@@ -199,6 +207,9 @@ exports.Grant = {
|
|
|
199
207
|
if (message.scheduledOneshot !== undefined) {
|
|
200
208
|
exports.ScheduledOneshotPayload.encode(message.scheduledOneshot, writer.uint32(186).fork()).ldelim();
|
|
201
209
|
}
|
|
210
|
+
if (message.signIn !== undefined) {
|
|
211
|
+
exports.SignInPayload.encode(message.signIn, writer.uint32(194).fork()).ldelim();
|
|
212
|
+
}
|
|
202
213
|
return writer;
|
|
203
214
|
},
|
|
204
215
|
decode(input, length) {
|
|
@@ -244,6 +255,9 @@ exports.Grant = {
|
|
|
244
255
|
case 23:
|
|
245
256
|
message.scheduledOneshot = exports.ScheduledOneshotPayload.decode(reader, reader.uint32());
|
|
246
257
|
break;
|
|
258
|
+
case 24:
|
|
259
|
+
message.signIn = exports.SignInPayload.decode(reader, reader.uint32());
|
|
260
|
+
break;
|
|
247
261
|
default:
|
|
248
262
|
reader.skipType(tag & 7);
|
|
249
263
|
break;
|
|
@@ -265,6 +279,7 @@ exports.Grant = {
|
|
|
265
279
|
message.recurringPull = object.recurringPull !== undefined && object.recurringPull !== null ? exports.RecurringPullPayload.fromPartial(object.recurringPull) : undefined;
|
|
266
280
|
message.spendingAllowance = object.spendingAllowance !== undefined && object.spendingAllowance !== null ? exports.SpendingAllowancePayload.fromPartial(object.spendingAllowance) : undefined;
|
|
267
281
|
message.scheduledOneshot = object.scheduledOneshot !== undefined && object.scheduledOneshot !== null ? exports.ScheduledOneshotPayload.fromPartial(object.scheduledOneshot) : undefined;
|
|
282
|
+
message.signIn = object.signIn !== undefined && object.signIn !== null ? exports.SignInPayload.fromPartial(object.signIn) : undefined;
|
|
268
283
|
return message;
|
|
269
284
|
},
|
|
270
285
|
fromAmino(object) {
|
|
@@ -305,6 +320,9 @@ exports.Grant = {
|
|
|
305
320
|
if (object.scheduled_oneshot !== undefined && object.scheduled_oneshot !== null) {
|
|
306
321
|
message.scheduledOneshot = exports.ScheduledOneshotPayload.fromAmino(object.scheduled_oneshot);
|
|
307
322
|
}
|
|
323
|
+
if (object.sign_in !== undefined && object.sign_in !== null) {
|
|
324
|
+
message.signIn = exports.SignInPayload.fromAmino(object.sign_in);
|
|
325
|
+
}
|
|
308
326
|
return message;
|
|
309
327
|
},
|
|
310
328
|
toAmino(message) {
|
|
@@ -321,6 +339,7 @@ exports.Grant = {
|
|
|
321
339
|
obj.recurring_pull = message.recurringPull ? exports.RecurringPullPayload.toAmino(message.recurringPull) : undefined;
|
|
322
340
|
obj.spending_allowance = message.spendingAllowance ? exports.SpendingAllowancePayload.toAmino(message.spendingAllowance) : undefined;
|
|
323
341
|
obj.scheduled_oneshot = message.scheduledOneshot ? exports.ScheduledOneshotPayload.toAmino(message.scheduledOneshot) : undefined;
|
|
342
|
+
obj.sign_in = message.signIn ? exports.SignInPayload.toAmino(message.signIn) : undefined;
|
|
324
343
|
return obj;
|
|
325
344
|
},
|
|
326
345
|
fromAminoMsg(object) {
|
|
@@ -1025,3 +1044,76 @@ exports.OneshotExec = {
|
|
|
1025
1044
|
};
|
|
1026
1045
|
}
|
|
1027
1046
|
};
|
|
1047
|
+
function createBaseSignInPayload() {
|
|
1048
|
+
return {
|
|
1049
|
+
service: ""
|
|
1050
|
+
};
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* SignInPayload lets the grantee sign in to an off-chain service as the
|
|
1054
|
+
* granter. The chain only records the permission: the service (e.g. a
|
|
1055
|
+
* Spark Dream Mastodon instance's wallet login) reads active SIGN_IN grants
|
|
1056
|
+
* to its own hostname and stops honouring one once it is revoked, declined
|
|
1057
|
+
* or expired. Nothing on chain executes through it.
|
|
1058
|
+
* @name SignInPayload
|
|
1059
|
+
* @package sparkdream.session.v1
|
|
1060
|
+
* @see proto type: sparkdream.session.v1.SignInPayload
|
|
1061
|
+
*/
|
|
1062
|
+
exports.SignInPayload = {
|
|
1063
|
+
typeUrl: "/sparkdream.session.v1.SignInPayload",
|
|
1064
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
1065
|
+
if (message.service !== "") {
|
|
1066
|
+
writer.uint32(10).string(message.service);
|
|
1067
|
+
}
|
|
1068
|
+
return writer;
|
|
1069
|
+
},
|
|
1070
|
+
decode(input, length) {
|
|
1071
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1072
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1073
|
+
const message = createBaseSignInPayload();
|
|
1074
|
+
while (reader.pos < end) {
|
|
1075
|
+
const tag = reader.uint32();
|
|
1076
|
+
switch (tag >>> 3) {
|
|
1077
|
+
case 1:
|
|
1078
|
+
message.service = reader.string();
|
|
1079
|
+
break;
|
|
1080
|
+
default:
|
|
1081
|
+
reader.skipType(tag & 7);
|
|
1082
|
+
break;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
return message;
|
|
1086
|
+
},
|
|
1087
|
+
fromPartial(object) {
|
|
1088
|
+
const message = createBaseSignInPayload();
|
|
1089
|
+
message.service = object.service ?? "";
|
|
1090
|
+
return message;
|
|
1091
|
+
},
|
|
1092
|
+
fromAmino(object) {
|
|
1093
|
+
const message = createBaseSignInPayload();
|
|
1094
|
+
if (object.service !== undefined && object.service !== null) {
|
|
1095
|
+
message.service = object.service;
|
|
1096
|
+
}
|
|
1097
|
+
return message;
|
|
1098
|
+
},
|
|
1099
|
+
toAmino(message) {
|
|
1100
|
+
const obj = {};
|
|
1101
|
+
obj.service = message.service === "" ? undefined : message.service;
|
|
1102
|
+
return obj;
|
|
1103
|
+
},
|
|
1104
|
+
fromAminoMsg(object) {
|
|
1105
|
+
return exports.SignInPayload.fromAmino(object.value);
|
|
1106
|
+
},
|
|
1107
|
+
fromProtoMsg(message) {
|
|
1108
|
+
return exports.SignInPayload.decode(message.value);
|
|
1109
|
+
},
|
|
1110
|
+
toProto(message) {
|
|
1111
|
+
return exports.SignInPayload.encode(message).finish();
|
|
1112
|
+
},
|
|
1113
|
+
toProtoMsg(message) {
|
|
1114
|
+
return {
|
|
1115
|
+
typeUrl: "/sparkdream.session.v1.SignInPayload",
|
|
1116
|
+
value: exports.SignInPayload.encode(message).finish()
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
};
|
|
@@ -141,11 +141,14 @@ const scheduledOneshotFromAmino = (o) => {
|
|
|
141
141
|
fireError: o.fire_error ?? "",
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
|
+
const signInToAmino = (p) => ({ service: str(p.service) });
|
|
145
|
+
const signInFromAmino = (o) => ({ service: o.service ?? "" });
|
|
144
146
|
const PAYLOADS = [
|
|
145
147
|
["sessionKey", "session_key", "sparkdream/session/SessionKeyPayload", sessionKeyToAmino, sessionKeyFromAmino],
|
|
146
148
|
["recurringPull", "recurring_pull", "sparkdream/session/RecurringPullPayload", recurringPullToAmino, recurringPullFromAmino],
|
|
147
149
|
["spendingAllowance", "spending_allowance", "sparkdream/session/SpendingAllowancePayload", spendingAllowanceToAmino, spendingAllowanceFromAmino],
|
|
148
150
|
["scheduledOneshot", "scheduled_oneshot", "sparkdream/session/ScheduledOneshotPayload", scheduledOneshotToAmino, scheduledOneshotFromAmino],
|
|
151
|
+
["signIn", "sign_in", "sparkdream/session/SignInPayload", signInToAmino, signInFromAmino],
|
|
149
152
|
];
|
|
150
153
|
// ── Messages ────────────────────────────────────────────────────────────
|
|
151
154
|
// {<signer>, grant_id} messages; each signer field name is a single word, so
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Params, ParamsAmino, SessionOperationalParams, SessionOperationalParamsAmino } from "./params";
|
|
2
2
|
import { Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin";
|
|
3
3
|
import { Any, AnyAmino } from "../../../google/protobuf/any";
|
|
4
|
-
import { SessionKeyPayload, SessionKeyPayloadAmino, RecurringPullPayload, RecurringPullPayloadAmino, SpendingAllowancePayload, SpendingAllowancePayloadAmino, ScheduledOneshotPayload, ScheduledOneshotPayloadAmino } from "./grant";
|
|
4
|
+
import { SessionKeyPayload, SessionKeyPayloadAmino, RecurringPullPayload, RecurringPullPayloadAmino, SpendingAllowancePayload, SpendingAllowancePayloadAmino, ScheduledOneshotPayload, ScheduledOneshotPayloadAmino, SignInPayload, SignInPayloadAmino } from "./grant";
|
|
5
5
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
6
6
|
import { DeepPartial } from "../../../helpers";
|
|
7
7
|
/**
|
|
@@ -301,7 +301,7 @@ export interface MsgExecSessionResponseAminoMsg {
|
|
|
301
301
|
value: MsgExecSessionResponseAmino;
|
|
302
302
|
}
|
|
303
303
|
/**
|
|
304
|
-
* MsgCreateGrant is the unified entrypoint for creating any of the
|
|
304
|
+
* MsgCreateGrant is the unified entrypoint for creating any of the
|
|
305
305
|
* typed grants. The grant type is inferred from the payload oneof; the
|
|
306
306
|
* handler dispatches to type-specific validation. Signed by the granter.
|
|
307
307
|
* @name MsgCreateGrant
|
|
@@ -320,13 +320,14 @@ export interface MsgCreateGrant {
|
|
|
320
320
|
recurringPull?: RecurringPullPayload;
|
|
321
321
|
spendingAllowance?: SpendingAllowancePayload;
|
|
322
322
|
scheduledOneshot?: ScheduledOneshotPayload;
|
|
323
|
+
signIn?: SignInPayload;
|
|
323
324
|
}
|
|
324
325
|
export interface MsgCreateGrantProtoMsg {
|
|
325
326
|
typeUrl: "/sparkdream.session.v1.MsgCreateGrant";
|
|
326
327
|
value: Uint8Array;
|
|
327
328
|
}
|
|
328
329
|
/**
|
|
329
|
-
* MsgCreateGrant is the unified entrypoint for creating any of the
|
|
330
|
+
* MsgCreateGrant is the unified entrypoint for creating any of the
|
|
330
331
|
* typed grants. The grant type is inferred from the payload oneof; the
|
|
331
332
|
* handler dispatches to type-specific validation. Signed by the granter.
|
|
332
333
|
* @name MsgCreateGrantAmino
|
|
@@ -345,6 +346,7 @@ export interface MsgCreateGrantAmino {
|
|
|
345
346
|
recurring_pull?: RecurringPullPayloadAmino;
|
|
346
347
|
spending_allowance?: SpendingAllowancePayloadAmino;
|
|
347
348
|
scheduled_oneshot?: ScheduledOneshotPayloadAmino;
|
|
349
|
+
sign_in?: SignInPayloadAmino;
|
|
348
350
|
}
|
|
349
351
|
export interface MsgCreateGrantAminoMsg {
|
|
350
352
|
type: "sparkdream/x/session/MsgCreateGrant";
|
|
@@ -915,7 +917,7 @@ export declare const MsgExecSessionResponse: {
|
|
|
915
917
|
toProtoMsg(message: MsgExecSessionResponse): MsgExecSessionResponseProtoMsg;
|
|
916
918
|
};
|
|
917
919
|
/**
|
|
918
|
-
* MsgCreateGrant is the unified entrypoint for creating any of the
|
|
920
|
+
* MsgCreateGrant is the unified entrypoint for creating any of the
|
|
919
921
|
* typed grants. The grant type is inferred from the payload oneof; the
|
|
920
922
|
* handler dispatches to type-specific validation. Signed by the granter.
|
|
921
923
|
* @name MsgCreateGrant
|
|
@@ -800,11 +800,12 @@ function createBaseMsgCreateGrant() {
|
|
|
800
800
|
sessionKey: undefined,
|
|
801
801
|
recurringPull: undefined,
|
|
802
802
|
spendingAllowance: undefined,
|
|
803
|
-
scheduledOneshot: undefined
|
|
803
|
+
scheduledOneshot: undefined,
|
|
804
|
+
signIn: undefined
|
|
804
805
|
};
|
|
805
806
|
}
|
|
806
807
|
/**
|
|
807
|
-
* MsgCreateGrant is the unified entrypoint for creating any of the
|
|
808
|
+
* MsgCreateGrant is the unified entrypoint for creating any of the
|
|
808
809
|
* typed grants. The grant type is inferred from the payload oneof; the
|
|
809
810
|
* handler dispatches to type-specific validation. Signed by the granter.
|
|
810
811
|
* @name MsgCreateGrant
|
|
@@ -839,6 +840,9 @@ exports.MsgCreateGrant = {
|
|
|
839
840
|
if (message.scheduledOneshot !== undefined) {
|
|
840
841
|
grant_1.ScheduledOneshotPayload.encode(message.scheduledOneshot, writer.uint32(106).fork()).ldelim();
|
|
841
842
|
}
|
|
843
|
+
if (message.signIn !== undefined) {
|
|
844
|
+
grant_1.SignInPayload.encode(message.signIn, writer.uint32(114).fork()).ldelim();
|
|
845
|
+
}
|
|
842
846
|
return writer;
|
|
843
847
|
},
|
|
844
848
|
decode(input, length) {
|
|
@@ -872,6 +876,9 @@ exports.MsgCreateGrant = {
|
|
|
872
876
|
case 13:
|
|
873
877
|
message.scheduledOneshot = grant_1.ScheduledOneshotPayload.decode(reader, reader.uint32());
|
|
874
878
|
break;
|
|
879
|
+
case 14:
|
|
880
|
+
message.signIn = grant_1.SignInPayload.decode(reader, reader.uint32());
|
|
881
|
+
break;
|
|
875
882
|
default:
|
|
876
883
|
reader.skipType(tag & 7);
|
|
877
884
|
break;
|
|
@@ -889,6 +896,7 @@ exports.MsgCreateGrant = {
|
|
|
889
896
|
message.recurringPull = object.recurringPull !== undefined && object.recurringPull !== null ? grant_1.RecurringPullPayload.fromPartial(object.recurringPull) : undefined;
|
|
890
897
|
message.spendingAllowance = object.spendingAllowance !== undefined && object.spendingAllowance !== null ? grant_1.SpendingAllowancePayload.fromPartial(object.spendingAllowance) : undefined;
|
|
891
898
|
message.scheduledOneshot = object.scheduledOneshot !== undefined && object.scheduledOneshot !== null ? grant_1.ScheduledOneshotPayload.fromPartial(object.scheduledOneshot) : undefined;
|
|
899
|
+
message.signIn = object.signIn !== undefined && object.signIn !== null ? grant_1.SignInPayload.fromPartial(object.signIn) : undefined;
|
|
892
900
|
return message;
|
|
893
901
|
},
|
|
894
902
|
fromAmino(object) {
|
|
@@ -917,6 +925,9 @@ exports.MsgCreateGrant = {
|
|
|
917
925
|
if (object.scheduled_oneshot !== undefined && object.scheduled_oneshot !== null) {
|
|
918
926
|
message.scheduledOneshot = grant_1.ScheduledOneshotPayload.fromAmino(object.scheduled_oneshot);
|
|
919
927
|
}
|
|
928
|
+
if (object.sign_in !== undefined && object.sign_in !== null) {
|
|
929
|
+
message.signIn = grant_1.SignInPayload.fromAmino(object.sign_in);
|
|
930
|
+
}
|
|
920
931
|
return message;
|
|
921
932
|
},
|
|
922
933
|
toAmino(message) {
|
|
@@ -929,6 +940,7 @@ exports.MsgCreateGrant = {
|
|
|
929
940
|
obj.recurring_pull = message.recurringPull ? grant_1.RecurringPullPayload.toAmino(message.recurringPull) : undefined;
|
|
930
941
|
obj.spending_allowance = message.spendingAllowance ? grant_1.SpendingAllowancePayload.toAmino(message.spendingAllowance) : undefined;
|
|
931
942
|
obj.scheduled_oneshot = message.scheduledOneshot ? grant_1.ScheduledOneshotPayload.toAmino(message.scheduledOneshot) : undefined;
|
|
943
|
+
obj.sign_in = message.signIn ? grant_1.SignInPayload.toAmino(message.signIn) : undefined;
|
|
932
944
|
return obj;
|
|
933
945
|
},
|
|
934
946
|
fromAminoMsg(object) {
|
|
@@ -29,7 +29,7 @@ export interface Msg {
|
|
|
29
29
|
/** ExecSession executes messages using a session key. */
|
|
30
30
|
execSession(request: MsgExecSession): Promise<MsgExecSessionResponse>;
|
|
31
31
|
/**
|
|
32
|
-
* CreateGrant is the unified entrypoint that creates any of the
|
|
32
|
+
* CreateGrant is the unified entrypoint that creates any of the typed
|
|
33
33
|
* grants. Type is inferred from the payload oneof.
|
|
34
34
|
*/
|
|
35
35
|
createGrant(request: MsgCreateGrant): Promise<MsgCreateGrantResponse>;
|
|
@@ -65,7 +65,7 @@ export interface Msg {
|
|
|
65
65
|
revokeGrant(request: MsgRevokeGrant): Promise<MsgRevokeGrantResponse>;
|
|
66
66
|
/**
|
|
67
67
|
* DeclineGrant lets the grantee opt out of any active grant by id.
|
|
68
|
-
* Applies uniformly across all
|
|
68
|
+
* Applies uniformly across all grant types. For ScheduledOneshot
|
|
69
69
|
* this is a pre-fire veto: the grant transitions to DECLINED, the
|
|
70
70
|
* EndBlocker skips it, and the held deposit is refunded to the
|
|
71
71
|
* granter. Decline is one-way — the granter must Revoke + CreateGrant
|
|
@@ -46,7 +46,7 @@ class MsgClientImpl {
|
|
|
46
46
|
const promise = this.rpc.request("sparkdream.session.v1.Msg", "ExecSession", data);
|
|
47
47
|
return promise.then(data => tx_1.MsgExecSessionResponse.decode(new binary_1.BinaryReader(data)));
|
|
48
48
|
};
|
|
49
|
-
/* CreateGrant is the unified entrypoint that creates any of the
|
|
49
|
+
/* CreateGrant is the unified entrypoint that creates any of the typed
|
|
50
50
|
grants. Type is inferred from the payload oneof. */
|
|
51
51
|
createGrant = async (request) => {
|
|
52
52
|
const data = tx_1.MsgCreateGrant.encode(request).finish();
|
|
@@ -92,7 +92,7 @@ class MsgClientImpl {
|
|
|
92
92
|
return promise.then(data => tx_1.MsgRevokeGrantResponse.decode(new binary_1.BinaryReader(data)));
|
|
93
93
|
};
|
|
94
94
|
/* DeclineGrant lets the grantee opt out of any active grant by id.
|
|
95
|
-
Applies uniformly across all
|
|
95
|
+
Applies uniformly across all grant types. For ScheduledOneshot
|
|
96
96
|
this is a pre-fire veto: the grant transitions to DECLINED, the
|
|
97
97
|
EndBlocker skips it, and the held deposit is refunded to the
|
|
98
98
|
granter. Decline is one-way — the granter must Revoke + CreateGrant
|