@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
|
@@ -1071,6 +1071,169 @@ export const MsgTopUpBondResponse = {
|
|
|
1071
1071
|
};
|
|
1072
1072
|
}
|
|
1073
1073
|
};
|
|
1074
|
+
function createBaseMsgWithdrawBond() {
|
|
1075
|
+
return {
|
|
1076
|
+
operator: "",
|
|
1077
|
+
serviceType: "",
|
|
1078
|
+
amount: ""
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* MsgWithdrawBond queues `amount` of the operator's bond for withdrawal
|
|
1083
|
+
* without leaving the service (§3.5a). Allowed only for ACTIVE operators,
|
|
1084
|
+
* and only while bond - pending_withdraw_amount - amount >= min_bond, so the
|
|
1085
|
+
* operator never drops out of ACTIVE through its own withdrawal. Calls are
|
|
1086
|
+
* incremental: a second call adds to pending_withdraw_amount and resets the
|
|
1087
|
+
* single withdraw_complete_at clock to now + unbonding_period_blocks. The
|
|
1088
|
+
* SPARK stays in the module bond pool and remains slashable until the
|
|
1089
|
+
* operator claims it with MsgClaimUnbondedBond after the clock elapses.
|
|
1090
|
+
* MUST be signed by `operator` directly (not delegable).
|
|
1091
|
+
* @name MsgWithdrawBond
|
|
1092
|
+
* @package sparkdream.service.v1
|
|
1093
|
+
* @see proto type: sparkdream.service.v1.MsgWithdrawBond
|
|
1094
|
+
*/
|
|
1095
|
+
export const MsgWithdrawBond = {
|
|
1096
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBond",
|
|
1097
|
+
aminoType: "sparkdream/x/service/MsgWithdrawBond",
|
|
1098
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1099
|
+
if (message.operator !== "") {
|
|
1100
|
+
writer.uint32(10).string(message.operator);
|
|
1101
|
+
}
|
|
1102
|
+
if (message.serviceType !== "") {
|
|
1103
|
+
writer.uint32(18).string(message.serviceType);
|
|
1104
|
+
}
|
|
1105
|
+
if (message.amount !== "") {
|
|
1106
|
+
writer.uint32(26).string(message.amount);
|
|
1107
|
+
}
|
|
1108
|
+
return writer;
|
|
1109
|
+
},
|
|
1110
|
+
decode(input, length) {
|
|
1111
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1112
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1113
|
+
const message = createBaseMsgWithdrawBond();
|
|
1114
|
+
while (reader.pos < end) {
|
|
1115
|
+
const tag = reader.uint32();
|
|
1116
|
+
switch (tag >>> 3) {
|
|
1117
|
+
case 1:
|
|
1118
|
+
message.operator = reader.string();
|
|
1119
|
+
break;
|
|
1120
|
+
case 2:
|
|
1121
|
+
message.serviceType = reader.string();
|
|
1122
|
+
break;
|
|
1123
|
+
case 3:
|
|
1124
|
+
message.amount = reader.string();
|
|
1125
|
+
break;
|
|
1126
|
+
default:
|
|
1127
|
+
reader.skipType(tag & 7);
|
|
1128
|
+
break;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
return message;
|
|
1132
|
+
},
|
|
1133
|
+
fromPartial(object) {
|
|
1134
|
+
const message = createBaseMsgWithdrawBond();
|
|
1135
|
+
message.operator = object.operator ?? "";
|
|
1136
|
+
message.serviceType = object.serviceType ?? "";
|
|
1137
|
+
message.amount = object.amount ?? "";
|
|
1138
|
+
return message;
|
|
1139
|
+
},
|
|
1140
|
+
fromAmino(object) {
|
|
1141
|
+
const message = createBaseMsgWithdrawBond();
|
|
1142
|
+
if (object.operator !== undefined && object.operator !== null) {
|
|
1143
|
+
message.operator = object.operator;
|
|
1144
|
+
}
|
|
1145
|
+
if (object.service_type !== undefined && object.service_type !== null) {
|
|
1146
|
+
message.serviceType = object.service_type;
|
|
1147
|
+
}
|
|
1148
|
+
if (object.amount !== undefined && object.amount !== null) {
|
|
1149
|
+
message.amount = object.amount;
|
|
1150
|
+
}
|
|
1151
|
+
return message;
|
|
1152
|
+
},
|
|
1153
|
+
toAmino(message) {
|
|
1154
|
+
const obj = {};
|
|
1155
|
+
obj.operator = message.operator === "" ? undefined : message.operator;
|
|
1156
|
+
obj.service_type = message.serviceType === "" ? undefined : message.serviceType;
|
|
1157
|
+
obj.amount = message.amount === "" ? undefined : message.amount;
|
|
1158
|
+
return obj;
|
|
1159
|
+
},
|
|
1160
|
+
fromAminoMsg(object) {
|
|
1161
|
+
return MsgWithdrawBond.fromAmino(object.value);
|
|
1162
|
+
},
|
|
1163
|
+
toAminoMsg(message) {
|
|
1164
|
+
return {
|
|
1165
|
+
type: "sparkdream/x/service/MsgWithdrawBond",
|
|
1166
|
+
value: MsgWithdrawBond.toAmino(message)
|
|
1167
|
+
};
|
|
1168
|
+
},
|
|
1169
|
+
fromProtoMsg(message) {
|
|
1170
|
+
return MsgWithdrawBond.decode(message.value);
|
|
1171
|
+
},
|
|
1172
|
+
toProto(message) {
|
|
1173
|
+
return MsgWithdrawBond.encode(message).finish();
|
|
1174
|
+
},
|
|
1175
|
+
toProtoMsg(message) {
|
|
1176
|
+
return {
|
|
1177
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBond",
|
|
1178
|
+
value: MsgWithdrawBond.encode(message).finish()
|
|
1179
|
+
};
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1182
|
+
function createBaseMsgWithdrawBondResponse() {
|
|
1183
|
+
return {};
|
|
1184
|
+
}
|
|
1185
|
+
/**
|
|
1186
|
+
* @name MsgWithdrawBondResponse
|
|
1187
|
+
* @package sparkdream.service.v1
|
|
1188
|
+
* @see proto type: sparkdream.service.v1.MsgWithdrawBondResponse
|
|
1189
|
+
*/
|
|
1190
|
+
export const MsgWithdrawBondResponse = {
|
|
1191
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBondResponse",
|
|
1192
|
+
encode(_, writer = BinaryWriter.create()) {
|
|
1193
|
+
return writer;
|
|
1194
|
+
},
|
|
1195
|
+
decode(input, length) {
|
|
1196
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1197
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1198
|
+
const message = createBaseMsgWithdrawBondResponse();
|
|
1199
|
+
while (reader.pos < end) {
|
|
1200
|
+
const tag = reader.uint32();
|
|
1201
|
+
switch (tag >>> 3) {
|
|
1202
|
+
default:
|
|
1203
|
+
reader.skipType(tag & 7);
|
|
1204
|
+
break;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
return message;
|
|
1208
|
+
},
|
|
1209
|
+
fromPartial(_) {
|
|
1210
|
+
const message = createBaseMsgWithdrawBondResponse();
|
|
1211
|
+
return message;
|
|
1212
|
+
},
|
|
1213
|
+
fromAmino(_) {
|
|
1214
|
+
const message = createBaseMsgWithdrawBondResponse();
|
|
1215
|
+
return message;
|
|
1216
|
+
},
|
|
1217
|
+
toAmino(_) {
|
|
1218
|
+
const obj = {};
|
|
1219
|
+
return obj;
|
|
1220
|
+
},
|
|
1221
|
+
fromAminoMsg(object) {
|
|
1222
|
+
return MsgWithdrawBondResponse.fromAmino(object.value);
|
|
1223
|
+
},
|
|
1224
|
+
fromProtoMsg(message) {
|
|
1225
|
+
return MsgWithdrawBondResponse.decode(message.value);
|
|
1226
|
+
},
|
|
1227
|
+
toProto(message) {
|
|
1228
|
+
return MsgWithdrawBondResponse.encode(message).finish();
|
|
1229
|
+
},
|
|
1230
|
+
toProtoMsg(message) {
|
|
1231
|
+
return {
|
|
1232
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBondResponse",
|
|
1233
|
+
value: MsgWithdrawBondResponse.encode(message).finish()
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
};
|
|
1074
1237
|
function createBaseMsgReportOperator() {
|
|
1075
1238
|
return {
|
|
1076
1239
|
reporter: "",
|
|
@@ -2122,3 +2285,172 @@ export const MsgFinalizeControllerTransferResponse = {
|
|
|
2122
2285
|
};
|
|
2123
2286
|
}
|
|
2124
2287
|
};
|
|
2288
|
+
function createBaseMsgSubmitCheckpoint() {
|
|
2289
|
+
return {
|
|
2290
|
+
operator: "",
|
|
2291
|
+
serviceType: "",
|
|
2292
|
+
height: BigInt(0),
|
|
2293
|
+
root: new Uint8Array()
|
|
2294
|
+
};
|
|
2295
|
+
}
|
|
2296
|
+
/**
|
|
2297
|
+
* MsgSubmitCheckpoint is signed by the operator itself. The operator must be
|
|
2298
|
+
* ACTIVE or UNDERFUNDED under service_type; height must exceed its previous
|
|
2299
|
+
* checkpoint and must not exceed the current block height; root is 32 bytes.
|
|
2300
|
+
* @name MsgSubmitCheckpoint
|
|
2301
|
+
* @package sparkdream.service.v1
|
|
2302
|
+
* @see proto type: sparkdream.service.v1.MsgSubmitCheckpoint
|
|
2303
|
+
*/
|
|
2304
|
+
export const MsgSubmitCheckpoint = {
|
|
2305
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpoint",
|
|
2306
|
+
aminoType: "sparkdream/x/service/MsgSubmitCheckpoint",
|
|
2307
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
2308
|
+
if (message.operator !== "") {
|
|
2309
|
+
writer.uint32(10).string(message.operator);
|
|
2310
|
+
}
|
|
2311
|
+
if (message.serviceType !== "") {
|
|
2312
|
+
writer.uint32(18).string(message.serviceType);
|
|
2313
|
+
}
|
|
2314
|
+
if (message.height !== BigInt(0)) {
|
|
2315
|
+
writer.uint32(24).int64(message.height);
|
|
2316
|
+
}
|
|
2317
|
+
if (message.root.length !== 0) {
|
|
2318
|
+
writer.uint32(34).bytes(message.root);
|
|
2319
|
+
}
|
|
2320
|
+
return writer;
|
|
2321
|
+
},
|
|
2322
|
+
decode(input, length) {
|
|
2323
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2324
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2325
|
+
const message = createBaseMsgSubmitCheckpoint();
|
|
2326
|
+
while (reader.pos < end) {
|
|
2327
|
+
const tag = reader.uint32();
|
|
2328
|
+
switch (tag >>> 3) {
|
|
2329
|
+
case 1:
|
|
2330
|
+
message.operator = reader.string();
|
|
2331
|
+
break;
|
|
2332
|
+
case 2:
|
|
2333
|
+
message.serviceType = reader.string();
|
|
2334
|
+
break;
|
|
2335
|
+
case 3:
|
|
2336
|
+
message.height = reader.int64();
|
|
2337
|
+
break;
|
|
2338
|
+
case 4:
|
|
2339
|
+
message.root = reader.bytes();
|
|
2340
|
+
break;
|
|
2341
|
+
default:
|
|
2342
|
+
reader.skipType(tag & 7);
|
|
2343
|
+
break;
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
return message;
|
|
2347
|
+
},
|
|
2348
|
+
fromPartial(object) {
|
|
2349
|
+
const message = createBaseMsgSubmitCheckpoint();
|
|
2350
|
+
message.operator = object.operator ?? "";
|
|
2351
|
+
message.serviceType = object.serviceType ?? "";
|
|
2352
|
+
message.height = object.height !== undefined && object.height !== null ? BigInt(object.height.toString()) : BigInt(0);
|
|
2353
|
+
message.root = object.root ?? new Uint8Array();
|
|
2354
|
+
return message;
|
|
2355
|
+
},
|
|
2356
|
+
fromAmino(object) {
|
|
2357
|
+
const message = createBaseMsgSubmitCheckpoint();
|
|
2358
|
+
if (object.operator !== undefined && object.operator !== null) {
|
|
2359
|
+
message.operator = object.operator;
|
|
2360
|
+
}
|
|
2361
|
+
if (object.service_type !== undefined && object.service_type !== null) {
|
|
2362
|
+
message.serviceType = object.service_type;
|
|
2363
|
+
}
|
|
2364
|
+
if (object.height !== undefined && object.height !== null) {
|
|
2365
|
+
message.height = BigInt(object.height);
|
|
2366
|
+
}
|
|
2367
|
+
if (object.root !== undefined && object.root !== null) {
|
|
2368
|
+
message.root = bytesFromBase64(object.root);
|
|
2369
|
+
}
|
|
2370
|
+
return message;
|
|
2371
|
+
},
|
|
2372
|
+
toAmino(message) {
|
|
2373
|
+
const obj = {};
|
|
2374
|
+
obj.operator = message.operator === "" ? undefined : message.operator;
|
|
2375
|
+
obj.service_type = message.serviceType === "" ? undefined : message.serviceType;
|
|
2376
|
+
obj.height = message.height !== BigInt(0) ? message.height?.toString() : undefined;
|
|
2377
|
+
obj.root = message.root ? base64FromBytes(message.root) : undefined;
|
|
2378
|
+
return obj;
|
|
2379
|
+
},
|
|
2380
|
+
fromAminoMsg(object) {
|
|
2381
|
+
return MsgSubmitCheckpoint.fromAmino(object.value);
|
|
2382
|
+
},
|
|
2383
|
+
toAminoMsg(message) {
|
|
2384
|
+
return {
|
|
2385
|
+
type: "sparkdream/x/service/MsgSubmitCheckpoint",
|
|
2386
|
+
value: MsgSubmitCheckpoint.toAmino(message)
|
|
2387
|
+
};
|
|
2388
|
+
},
|
|
2389
|
+
fromProtoMsg(message) {
|
|
2390
|
+
return MsgSubmitCheckpoint.decode(message.value);
|
|
2391
|
+
},
|
|
2392
|
+
toProto(message) {
|
|
2393
|
+
return MsgSubmitCheckpoint.encode(message).finish();
|
|
2394
|
+
},
|
|
2395
|
+
toProtoMsg(message) {
|
|
2396
|
+
return {
|
|
2397
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpoint",
|
|
2398
|
+
value: MsgSubmitCheckpoint.encode(message).finish()
|
|
2399
|
+
};
|
|
2400
|
+
}
|
|
2401
|
+
};
|
|
2402
|
+
function createBaseMsgSubmitCheckpointResponse() {
|
|
2403
|
+
return {};
|
|
2404
|
+
}
|
|
2405
|
+
/**
|
|
2406
|
+
* @name MsgSubmitCheckpointResponse
|
|
2407
|
+
* @package sparkdream.service.v1
|
|
2408
|
+
* @see proto type: sparkdream.service.v1.MsgSubmitCheckpointResponse
|
|
2409
|
+
*/
|
|
2410
|
+
export const MsgSubmitCheckpointResponse = {
|
|
2411
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpointResponse",
|
|
2412
|
+
encode(_, writer = BinaryWriter.create()) {
|
|
2413
|
+
return writer;
|
|
2414
|
+
},
|
|
2415
|
+
decode(input, length) {
|
|
2416
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2417
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2418
|
+
const message = createBaseMsgSubmitCheckpointResponse();
|
|
2419
|
+
while (reader.pos < end) {
|
|
2420
|
+
const tag = reader.uint32();
|
|
2421
|
+
switch (tag >>> 3) {
|
|
2422
|
+
default:
|
|
2423
|
+
reader.skipType(tag & 7);
|
|
2424
|
+
break;
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
return message;
|
|
2428
|
+
},
|
|
2429
|
+
fromPartial(_) {
|
|
2430
|
+
const message = createBaseMsgSubmitCheckpointResponse();
|
|
2431
|
+
return message;
|
|
2432
|
+
},
|
|
2433
|
+
fromAmino(_) {
|
|
2434
|
+
const message = createBaseMsgSubmitCheckpointResponse();
|
|
2435
|
+
return message;
|
|
2436
|
+
},
|
|
2437
|
+
toAmino(_) {
|
|
2438
|
+
const obj = {};
|
|
2439
|
+
return obj;
|
|
2440
|
+
},
|
|
2441
|
+
fromAminoMsg(object) {
|
|
2442
|
+
return MsgSubmitCheckpointResponse.fromAmino(object.value);
|
|
2443
|
+
},
|
|
2444
|
+
fromProtoMsg(message) {
|
|
2445
|
+
return MsgSubmitCheckpointResponse.decode(message.value);
|
|
2446
|
+
},
|
|
2447
|
+
toProto(message) {
|
|
2448
|
+
return MsgSubmitCheckpointResponse.encode(message).finish();
|
|
2449
|
+
},
|
|
2450
|
+
toProtoMsg(message) {
|
|
2451
|
+
return {
|
|
2452
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpointResponse",
|
|
2453
|
+
value: MsgSubmitCheckpointResponse.encode(message).finish()
|
|
2454
|
+
};
|
|
2455
|
+
}
|
|
2456
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MsgUpdateParams, MsgUpdateServiceTypeConfig, MsgRegisterOperator, MsgUpdateMetadata, MsgUnbondOperator, MsgClaimUnbondedBond, MsgTopUpBond, MsgReportOperator, MsgResolveReport, MsgContestSlash, MsgResolveReportByJury, MsgOpenControllerTransferCase, MsgFinalizeControllerTransfer } from "./tx";
|
|
2
|
-
export const registry = [["/sparkdream.service.v1.MsgUpdateParams", MsgUpdateParams], ["/sparkdream.service.v1.MsgUpdateServiceTypeConfig", MsgUpdateServiceTypeConfig], ["/sparkdream.service.v1.MsgRegisterOperator", MsgRegisterOperator], ["/sparkdream.service.v1.MsgUpdateMetadata", MsgUpdateMetadata], ["/sparkdream.service.v1.MsgUnbondOperator", MsgUnbondOperator], ["/sparkdream.service.v1.MsgClaimUnbondedBond", MsgClaimUnbondedBond], ["/sparkdream.service.v1.MsgTopUpBond", MsgTopUpBond], ["/sparkdream.service.v1.MsgReportOperator", MsgReportOperator], ["/sparkdream.service.v1.MsgResolveReport", MsgResolveReport], ["/sparkdream.service.v1.MsgContestSlash", MsgContestSlash], ["/sparkdream.service.v1.MsgResolveReportByJury", MsgResolveReportByJury], ["/sparkdream.service.v1.MsgOpenControllerTransferCase", MsgOpenControllerTransferCase], ["/sparkdream.service.v1.MsgFinalizeControllerTransfer", MsgFinalizeControllerTransfer]];
|
|
1
|
+
import { MsgUpdateParams, MsgUpdateServiceTypeConfig, MsgRegisterOperator, MsgUpdateMetadata, MsgUnbondOperator, MsgClaimUnbondedBond, MsgTopUpBond, MsgWithdrawBond, MsgReportOperator, MsgResolveReport, MsgContestSlash, MsgResolveReportByJury, MsgOpenControllerTransferCase, MsgFinalizeControllerTransfer, MsgSubmitCheckpoint } from "./tx";
|
|
2
|
+
export const registry = [["/sparkdream.service.v1.MsgUpdateParams", MsgUpdateParams], ["/sparkdream.service.v1.MsgUpdateServiceTypeConfig", MsgUpdateServiceTypeConfig], ["/sparkdream.service.v1.MsgRegisterOperator", MsgRegisterOperator], ["/sparkdream.service.v1.MsgUpdateMetadata", MsgUpdateMetadata], ["/sparkdream.service.v1.MsgUnbondOperator", MsgUnbondOperator], ["/sparkdream.service.v1.MsgClaimUnbondedBond", MsgClaimUnbondedBond], ["/sparkdream.service.v1.MsgTopUpBond", MsgTopUpBond], ["/sparkdream.service.v1.MsgWithdrawBond", MsgWithdrawBond], ["/sparkdream.service.v1.MsgReportOperator", MsgReportOperator], ["/sparkdream.service.v1.MsgResolveReport", MsgResolveReport], ["/sparkdream.service.v1.MsgContestSlash", MsgContestSlash], ["/sparkdream.service.v1.MsgResolveReportByJury", MsgResolveReportByJury], ["/sparkdream.service.v1.MsgOpenControllerTransferCase", MsgOpenControllerTransferCase], ["/sparkdream.service.v1.MsgFinalizeControllerTransfer", MsgFinalizeControllerTransfer], ["/sparkdream.service.v1.MsgSubmitCheckpoint", MsgSubmitCheckpoint]];
|
|
3
3
|
export const load = (protoRegistry) => {
|
|
4
4
|
registry.forEach(([typeUrl, mod]) => {
|
|
5
5
|
protoRegistry.register(typeUrl, mod);
|
|
@@ -49,6 +49,12 @@ export const MessageComposer = {
|
|
|
49
49
|
value: MsgTopUpBond.encode(value).finish()
|
|
50
50
|
};
|
|
51
51
|
},
|
|
52
|
+
withdrawBond(value) {
|
|
53
|
+
return {
|
|
54
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBond",
|
|
55
|
+
value: MsgWithdrawBond.encode(value).finish()
|
|
56
|
+
};
|
|
57
|
+
},
|
|
52
58
|
reportOperator(value) {
|
|
53
59
|
return {
|
|
54
60
|
typeUrl: "/sparkdream.service.v1.MsgReportOperator",
|
|
@@ -84,6 +90,12 @@ export const MessageComposer = {
|
|
|
84
90
|
typeUrl: "/sparkdream.service.v1.MsgFinalizeControllerTransfer",
|
|
85
91
|
value: MsgFinalizeControllerTransfer.encode(value).finish()
|
|
86
92
|
};
|
|
93
|
+
},
|
|
94
|
+
submitCheckpoint(value) {
|
|
95
|
+
return {
|
|
96
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpoint",
|
|
97
|
+
value: MsgSubmitCheckpoint.encode(value).finish()
|
|
98
|
+
};
|
|
87
99
|
}
|
|
88
100
|
},
|
|
89
101
|
withTypeUrl: {
|
|
@@ -129,6 +141,12 @@ export const MessageComposer = {
|
|
|
129
141
|
value
|
|
130
142
|
};
|
|
131
143
|
},
|
|
144
|
+
withdrawBond(value) {
|
|
145
|
+
return {
|
|
146
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBond",
|
|
147
|
+
value
|
|
148
|
+
};
|
|
149
|
+
},
|
|
132
150
|
reportOperator(value) {
|
|
133
151
|
return {
|
|
134
152
|
typeUrl: "/sparkdream.service.v1.MsgReportOperator",
|
|
@@ -164,6 +182,12 @@ export const MessageComposer = {
|
|
|
164
182
|
typeUrl: "/sparkdream.service.v1.MsgFinalizeControllerTransfer",
|
|
165
183
|
value
|
|
166
184
|
};
|
|
185
|
+
},
|
|
186
|
+
submitCheckpoint(value) {
|
|
187
|
+
return {
|
|
188
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpoint",
|
|
189
|
+
value
|
|
190
|
+
};
|
|
167
191
|
}
|
|
168
192
|
},
|
|
169
193
|
fromPartial: {
|
|
@@ -209,6 +233,12 @@ export const MessageComposer = {
|
|
|
209
233
|
value: MsgTopUpBond.fromPartial(value)
|
|
210
234
|
};
|
|
211
235
|
},
|
|
236
|
+
withdrawBond(value) {
|
|
237
|
+
return {
|
|
238
|
+
typeUrl: "/sparkdream.service.v1.MsgWithdrawBond",
|
|
239
|
+
value: MsgWithdrawBond.fromPartial(value)
|
|
240
|
+
};
|
|
241
|
+
},
|
|
212
242
|
reportOperator(value) {
|
|
213
243
|
return {
|
|
214
244
|
typeUrl: "/sparkdream.service.v1.MsgReportOperator",
|
|
@@ -244,6 +274,12 @@ export const MessageComposer = {
|
|
|
244
274
|
typeUrl: "/sparkdream.service.v1.MsgFinalizeControllerTransfer",
|
|
245
275
|
value: MsgFinalizeControllerTransfer.fromPartial(value)
|
|
246
276
|
};
|
|
277
|
+
},
|
|
278
|
+
submitCheckpoint(value) {
|
|
279
|
+
return {
|
|
280
|
+
typeUrl: "/sparkdream.service.v1.MsgSubmitCheckpoint",
|
|
281
|
+
value: MsgSubmitCheckpoint.fromPartial(value)
|
|
282
|
+
};
|
|
247
283
|
}
|
|
248
284
|
}
|
|
249
285
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BinaryReader } from "../../../binary";
|
|
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
|
export class MsgClientImpl {
|
|
4
4
|
rpc;
|
|
5
5
|
constructor(rpc) {
|
|
@@ -51,6 +51,16 @@ export class MsgClientImpl {
|
|
|
51
51
|
const promise = this.rpc.request("sparkdream.service.v1.Msg", "TopUpBond", data);
|
|
52
52
|
return promise.then(data => MsgTopUpBondResponse.decode(new BinaryReader(data)));
|
|
53
53
|
};
|
|
54
|
+
/* WithdrawBond queues a partial withdrawal of an ACTIVE operator's bond
|
|
55
|
+
while keeping it ACTIVE: the staying bond must remain >= min_bond.
|
|
56
|
+
The queued amount stays in the bond pool, slashable, for the
|
|
57
|
+
service type's unbonding period and is then released through
|
|
58
|
+
MsgClaimUnbondedBond (§3.5a). Not delegable. */
|
|
59
|
+
withdrawBond = async (request) => {
|
|
60
|
+
const data = MsgWithdrawBond.encode(request).finish();
|
|
61
|
+
const promise = this.rpc.request("sparkdream.service.v1.Msg", "WithdrawBond", data);
|
|
62
|
+
return promise.then(data => MsgWithdrawBondResponse.decode(new BinaryReader(data)));
|
|
63
|
+
};
|
|
54
64
|
/* ReportOperator files a new report; reporter posts `report_deposit`
|
|
55
65
|
escrow (§3.4.6). */
|
|
56
66
|
reportOperator = async (request) => {
|
|
@@ -94,6 +104,15 @@ export class MsgClientImpl {
|
|
|
94
104
|
const promise = this.rpc.request("sparkdream.service.v1.Msg", "FinalizeControllerTransfer", data);
|
|
95
105
|
return promise.then(data => MsgFinalizeControllerTransferResponse.decode(new BinaryReader(data)));
|
|
96
106
|
};
|
|
107
|
+
/* SubmitCheckpoint records how far the signing operator's off-chain work
|
|
108
|
+
has progressed (height + output root). Generic across service types;
|
|
109
|
+
drives liveness system reports when the service type sets
|
|
110
|
+
checkpoint_max_lag_blocks (docs/content-scanning.md §8.2). */
|
|
111
|
+
submitCheckpoint = async (request) => {
|
|
112
|
+
const data = MsgSubmitCheckpoint.encode(request).finish();
|
|
113
|
+
const promise = this.rpc.request("sparkdream.service.v1.Msg", "SubmitCheckpoint", data);
|
|
114
|
+
return promise.then(data => MsgSubmitCheckpointResponse.decode(new BinaryReader(data)));
|
|
115
|
+
};
|
|
97
116
|
}
|
|
98
117
|
export const createClientImpl = (rpc) => {
|
|
99
118
|
return new MsgClientImpl(rpc);
|
|
@@ -5,11 +5,12 @@ import { Any } from "../../../google/protobuf/any";
|
|
|
5
5
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
6
6
|
import { toTimestamp, fromTimestamp } from "../../../helpers";
|
|
7
7
|
/**
|
|
8
|
-
* GrantType enumerates the
|
|
8
|
+
* GrantType enumerates the typed payload variants of the unified grant
|
|
9
9
|
* registry. The session-key variant preserves the legacy x/session model;
|
|
10
|
-
*
|
|
11
|
-
* refactor
|
|
12
|
-
*
|
|
10
|
+
* RecurringPull, SpendingAllowance and ScheduledOneshot came with the
|
|
11
|
+
* delegated-authorization-registry refactor. SignIn is the one variant
|
|
12
|
+
* nothing on chain executes: it records permission for an off-chain
|
|
13
|
+
* service to let the grantee sign in as the granter.
|
|
13
14
|
*/
|
|
14
15
|
export var GrantType;
|
|
15
16
|
(function (GrantType) {
|
|
@@ -18,6 +19,7 @@ export var GrantType;
|
|
|
18
19
|
GrantType[GrantType["GRANT_TYPE_RECURRING_PULL"] = 2] = "GRANT_TYPE_RECURRING_PULL";
|
|
19
20
|
GrantType[GrantType["GRANT_TYPE_SPENDING_ALLOWANCE"] = 3] = "GRANT_TYPE_SPENDING_ALLOWANCE";
|
|
20
21
|
GrantType[GrantType["GRANT_TYPE_SCHEDULED_ONESHOT"] = 4] = "GRANT_TYPE_SCHEDULED_ONESHOT";
|
|
22
|
+
GrantType[GrantType["GRANT_TYPE_SIGN_IN"] = 5] = "GRANT_TYPE_SIGN_IN";
|
|
21
23
|
GrantType[GrantType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
22
24
|
})(GrantType || (GrantType = {}));
|
|
23
25
|
export const GrantTypeAmino = GrantType;
|
|
@@ -38,6 +40,9 @@ export function grantTypeFromJSON(object) {
|
|
|
38
40
|
case 4:
|
|
39
41
|
case "GRANT_TYPE_SCHEDULED_ONESHOT":
|
|
40
42
|
return GrantType.GRANT_TYPE_SCHEDULED_ONESHOT;
|
|
43
|
+
case 5:
|
|
44
|
+
case "GRANT_TYPE_SIGN_IN":
|
|
45
|
+
return GrantType.GRANT_TYPE_SIGN_IN;
|
|
41
46
|
case -1:
|
|
42
47
|
case "UNRECOGNIZED":
|
|
43
48
|
default:
|
|
@@ -56,6 +61,8 @@ export function grantTypeToJSON(object) {
|
|
|
56
61
|
return "GRANT_TYPE_SPENDING_ALLOWANCE";
|
|
57
62
|
case GrantType.GRANT_TYPE_SCHEDULED_ONESHOT:
|
|
58
63
|
return "GRANT_TYPE_SCHEDULED_ONESHOT";
|
|
64
|
+
case GrantType.GRANT_TYPE_SIGN_IN:
|
|
65
|
+
return "GRANT_TYPE_SIGN_IN";
|
|
59
66
|
case GrantType.UNRECOGNIZED:
|
|
60
67
|
default:
|
|
61
68
|
return "UNRECOGNIZED";
|
|
@@ -141,13 +148,14 @@ function createBaseGrant() {
|
|
|
141
148
|
sessionKey: undefined,
|
|
142
149
|
recurringPull: undefined,
|
|
143
150
|
spendingAllowance: undefined,
|
|
144
|
-
scheduledOneshot: undefined
|
|
151
|
+
scheduledOneshot: undefined,
|
|
152
|
+
signIn: undefined
|
|
145
153
|
};
|
|
146
154
|
}
|
|
147
155
|
/**
|
|
148
156
|
* Grant is the unified record for every delegated-authorization primitive
|
|
149
157
|
* in x/session. One record carries the shared lifecycle fields (id,
|
|
150
|
-
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
158
|
+
* granter, grantee, status, expires_at, note) and exactly one of the
|
|
151
159
|
* typed payloads.
|
|
152
160
|
* @name Grant
|
|
153
161
|
* @package sparkdream.session.v1
|
|
@@ -192,6 +200,9 @@ export const Grant = {
|
|
|
192
200
|
if (message.scheduledOneshot !== undefined) {
|
|
193
201
|
ScheduledOneshotPayload.encode(message.scheduledOneshot, writer.uint32(186).fork()).ldelim();
|
|
194
202
|
}
|
|
203
|
+
if (message.signIn !== undefined) {
|
|
204
|
+
SignInPayload.encode(message.signIn, writer.uint32(194).fork()).ldelim();
|
|
205
|
+
}
|
|
195
206
|
return writer;
|
|
196
207
|
},
|
|
197
208
|
decode(input, length) {
|
|
@@ -237,6 +248,9 @@ export const Grant = {
|
|
|
237
248
|
case 23:
|
|
238
249
|
message.scheduledOneshot = ScheduledOneshotPayload.decode(reader, reader.uint32());
|
|
239
250
|
break;
|
|
251
|
+
case 24:
|
|
252
|
+
message.signIn = SignInPayload.decode(reader, reader.uint32());
|
|
253
|
+
break;
|
|
240
254
|
default:
|
|
241
255
|
reader.skipType(tag & 7);
|
|
242
256
|
break;
|
|
@@ -258,6 +272,7 @@ export const Grant = {
|
|
|
258
272
|
message.recurringPull = object.recurringPull !== undefined && object.recurringPull !== null ? RecurringPullPayload.fromPartial(object.recurringPull) : undefined;
|
|
259
273
|
message.spendingAllowance = object.spendingAllowance !== undefined && object.spendingAllowance !== null ? SpendingAllowancePayload.fromPartial(object.spendingAllowance) : undefined;
|
|
260
274
|
message.scheduledOneshot = object.scheduledOneshot !== undefined && object.scheduledOneshot !== null ? ScheduledOneshotPayload.fromPartial(object.scheduledOneshot) : undefined;
|
|
275
|
+
message.signIn = object.signIn !== undefined && object.signIn !== null ? SignInPayload.fromPartial(object.signIn) : undefined;
|
|
261
276
|
return message;
|
|
262
277
|
},
|
|
263
278
|
fromAmino(object) {
|
|
@@ -298,6 +313,9 @@ export const Grant = {
|
|
|
298
313
|
if (object.scheduled_oneshot !== undefined && object.scheduled_oneshot !== null) {
|
|
299
314
|
message.scheduledOneshot = ScheduledOneshotPayload.fromAmino(object.scheduled_oneshot);
|
|
300
315
|
}
|
|
316
|
+
if (object.sign_in !== undefined && object.sign_in !== null) {
|
|
317
|
+
message.signIn = SignInPayload.fromAmino(object.sign_in);
|
|
318
|
+
}
|
|
301
319
|
return message;
|
|
302
320
|
},
|
|
303
321
|
toAmino(message) {
|
|
@@ -314,6 +332,7 @@ export const Grant = {
|
|
|
314
332
|
obj.recurring_pull = message.recurringPull ? RecurringPullPayload.toAmino(message.recurringPull) : undefined;
|
|
315
333
|
obj.spending_allowance = message.spendingAllowance ? SpendingAllowancePayload.toAmino(message.spendingAllowance) : undefined;
|
|
316
334
|
obj.scheduled_oneshot = message.scheduledOneshot ? ScheduledOneshotPayload.toAmino(message.scheduledOneshot) : undefined;
|
|
335
|
+
obj.sign_in = message.signIn ? SignInPayload.toAmino(message.signIn) : undefined;
|
|
317
336
|
return obj;
|
|
318
337
|
},
|
|
319
338
|
fromAminoMsg(object) {
|
|
@@ -1018,3 +1037,76 @@ export const OneshotExec = {
|
|
|
1018
1037
|
};
|
|
1019
1038
|
}
|
|
1020
1039
|
};
|
|
1040
|
+
function createBaseSignInPayload() {
|
|
1041
|
+
return {
|
|
1042
|
+
service: ""
|
|
1043
|
+
};
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* SignInPayload lets the grantee sign in to an off-chain service as the
|
|
1047
|
+
* granter. The chain only records the permission: the service (e.g. a
|
|
1048
|
+
* Spark Dream Mastodon instance's wallet login) reads active SIGN_IN grants
|
|
1049
|
+
* to its own hostname and stops honouring one once it is revoked, declined
|
|
1050
|
+
* or expired. Nothing on chain executes through it.
|
|
1051
|
+
* @name SignInPayload
|
|
1052
|
+
* @package sparkdream.session.v1
|
|
1053
|
+
* @see proto type: sparkdream.session.v1.SignInPayload
|
|
1054
|
+
*/
|
|
1055
|
+
export const SignInPayload = {
|
|
1056
|
+
typeUrl: "/sparkdream.session.v1.SignInPayload",
|
|
1057
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1058
|
+
if (message.service !== "") {
|
|
1059
|
+
writer.uint32(10).string(message.service);
|
|
1060
|
+
}
|
|
1061
|
+
return writer;
|
|
1062
|
+
},
|
|
1063
|
+
decode(input, length) {
|
|
1064
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1065
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1066
|
+
const message = createBaseSignInPayload();
|
|
1067
|
+
while (reader.pos < end) {
|
|
1068
|
+
const tag = reader.uint32();
|
|
1069
|
+
switch (tag >>> 3) {
|
|
1070
|
+
case 1:
|
|
1071
|
+
message.service = reader.string();
|
|
1072
|
+
break;
|
|
1073
|
+
default:
|
|
1074
|
+
reader.skipType(tag & 7);
|
|
1075
|
+
break;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
return message;
|
|
1079
|
+
},
|
|
1080
|
+
fromPartial(object) {
|
|
1081
|
+
const message = createBaseSignInPayload();
|
|
1082
|
+
message.service = object.service ?? "";
|
|
1083
|
+
return message;
|
|
1084
|
+
},
|
|
1085
|
+
fromAmino(object) {
|
|
1086
|
+
const message = createBaseSignInPayload();
|
|
1087
|
+
if (object.service !== undefined && object.service !== null) {
|
|
1088
|
+
message.service = object.service;
|
|
1089
|
+
}
|
|
1090
|
+
return message;
|
|
1091
|
+
},
|
|
1092
|
+
toAmino(message) {
|
|
1093
|
+
const obj = {};
|
|
1094
|
+
obj.service = message.service === "" ? undefined : message.service;
|
|
1095
|
+
return obj;
|
|
1096
|
+
},
|
|
1097
|
+
fromAminoMsg(object) {
|
|
1098
|
+
return SignInPayload.fromAmino(object.value);
|
|
1099
|
+
},
|
|
1100
|
+
fromProtoMsg(message) {
|
|
1101
|
+
return SignInPayload.decode(message.value);
|
|
1102
|
+
},
|
|
1103
|
+
toProto(message) {
|
|
1104
|
+
return SignInPayload.encode(message).finish();
|
|
1105
|
+
},
|
|
1106
|
+
toProtoMsg(message) {
|
|
1107
|
+
return {
|
|
1108
|
+
typeUrl: "/sparkdream.session.v1.SignInPayload",
|
|
1109
|
+
value: SignInPayload.encode(message).finish()
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
};
|
|
@@ -138,11 +138,14 @@ const scheduledOneshotFromAmino = (o) => {
|
|
|
138
138
|
fireError: o.fire_error ?? "",
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
|
+
const signInToAmino = (p) => ({ service: str(p.service) });
|
|
142
|
+
const signInFromAmino = (o) => ({ service: o.service ?? "" });
|
|
141
143
|
const PAYLOADS = [
|
|
142
144
|
["sessionKey", "session_key", "sparkdream/session/SessionKeyPayload", sessionKeyToAmino, sessionKeyFromAmino],
|
|
143
145
|
["recurringPull", "recurring_pull", "sparkdream/session/RecurringPullPayload", recurringPullToAmino, recurringPullFromAmino],
|
|
144
146
|
["spendingAllowance", "spending_allowance", "sparkdream/session/SpendingAllowancePayload", spendingAllowanceToAmino, spendingAllowanceFromAmino],
|
|
145
147
|
["scheduledOneshot", "scheduled_oneshot", "sparkdream/session/ScheduledOneshotPayload", scheduledOneshotToAmino, scheduledOneshotFromAmino],
|
|
148
|
+
["signIn", "sign_in", "sparkdream/session/SignInPayload", signInToAmino, signInFromAmino],
|
|
146
149
|
];
|
|
147
150
|
// ── Messages ────────────────────────────────────────────────────────────
|
|
148
151
|
// {<signer>, grant_id} messages; each signer field name is a single word, so
|