@sparkdreamnft/sparkdreamjs 0.0.17 → 0.0.18
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/cosmos/bundle.d.ts +160 -160
- package/cosmos/bundle.js +182 -182
- package/esm/cosmos/bundle.js +182 -182
- package/esm/ibc/bundle.js +106 -106
- package/esm/sparkdream/blog/v1/params.js +51 -50
- package/esm/sparkdream/bundle.js +448 -346
- package/esm/sparkdream/client.js +7 -1
- package/esm/sparkdream/collect/v1/params.js +13 -1
- package/esm/sparkdream/collect/v1/types.js +13 -1
- package/esm/sparkdream/commons/v1/genesis.js +29 -1
- package/esm/sparkdream/commons/v1/query.js +317 -0
- package/esm/sparkdream/commons/v1/query.lcd.js +23 -0
- package/esm/sparkdream/commons/v1/query.rpc.Query.js +20 -1
- package/esm/sparkdream/commons/v1/recurring_spend.js +296 -0
- package/esm/sparkdream/commons/v1/tx.js +693 -0
- package/esm/sparkdream/commons/v1/tx.registry.js +74 -2
- package/esm/sparkdream/commons/v1/tx.rpc.msg.js +33 -1
- package/esm/sparkdream/federation/v1/genesis.js +10 -10
- package/esm/sparkdream/federation/v1/params.js +29 -54
- package/esm/sparkdream/federation/v1/query.js +216 -71
- package/esm/sparkdream/federation/v1/query.lcd.js +11 -6
- package/esm/sparkdream/federation/v1/query.rpc.Query.js +24 -15
- package/esm/sparkdream/federation/v1/tx.amino.js +21 -21
- package/esm/sparkdream/federation/v1/tx.js +1146 -1105
- package/esm/sparkdream/federation/v1/tx.registry.js +74 -74
- package/esm/sparkdream/federation/v1/tx.rpc.msg.js +32 -26
- package/esm/sparkdream/federation/v1/types.js +355 -99
- package/esm/sparkdream/federation/v1/verifier_activity.js +13 -1
- package/esm/sparkdream/forum/v1/params.js +173 -148
- package/esm/sparkdream/guardian/module/v1/module.js +68 -0
- package/esm/sparkdream/guardian/v1/query.js +128 -0
- package/esm/sparkdream/guardian/v1/query.lcd.js +13 -0
- package/esm/sparkdream/guardian/v1/query.rpc.Query.js +26 -0
- package/esm/sparkdream/guardian/v1/tx.amino.js +9 -0
- package/esm/sparkdream/guardian/v1/tx.js +175 -0
- package/esm/sparkdream/guardian/v1/tx.registry.js +33 -0
- package/esm/sparkdream/guardian/v1/tx.rpc.msg.js +24 -0
- package/esm/sparkdream/identity/module/v1/module.js +71 -0
- package/esm/sparkdream/identity/v1/chain_identity.js +199 -0
- package/esm/sparkdream/identity/v1/genesis.js +84 -0
- package/esm/sparkdream/identity/v1/query.js +372 -0
- package/esm/sparkdream/identity/v1/query.lcd.js +21 -0
- package/esm/sparkdream/identity/v1/query.rpc.Query.js +42 -0
- package/esm/sparkdream/lcd.js +15 -0
- package/esm/sparkdream/name/v1/params.js +19 -18
- package/esm/sparkdream/rep/v1/bonded_role.js +48 -2
- package/esm/sparkdream/rep/v1/tag.js +6 -13
- package/esm/sparkdream/rpc.query.js +9 -0
- package/esm/sparkdream/rpc.tx.js +6 -0
- package/esm/sparkdream/service/module/v1/module.js +71 -0
- package/esm/sparkdream/service/v1/controller_transfer_case.js +155 -0
- package/esm/sparkdream/service/v1/genesis.js +240 -0
- package/esm/sparkdream/service/v1/operator.js +250 -0
- package/esm/sparkdream/service/v1/params.js +355 -0
- package/esm/sparkdream/service/v1/query.js +1582 -0
- package/esm/sparkdream/service/v1/query.lcd.js +107 -0
- package/esm/sparkdream/service/v1/query.rpc.Query.js +109 -0
- package/esm/sparkdream/service/v1/refile_cooldown.js +121 -0
- package/esm/sparkdream/service/v1/report.js +212 -0
- package/esm/sparkdream/service/v1/reporter_rate_limit.js +137 -0
- package/esm/sparkdream/service/v1/service_type_config.js +264 -0
- package/esm/sparkdream/service/v1/system_report_rate_limit.js +115 -0
- package/esm/sparkdream/service/v1/tier1_escrow_entry.js +145 -0
- package/esm/sparkdream/service/v1/tier1_last_slash.js +121 -0
- package/esm/sparkdream/service/v1/tx.amino.js +69 -0
- package/esm/sparkdream/service/v1/tx.js +2124 -0
- package/esm/sparkdream/service/v1/tx.registry.js +249 -0
- package/esm/sparkdream/service/v1/tx.rpc.msg.js +100 -0
- package/esm/sparkdream/service/v1/types.js +353 -0
- package/esm/sparkdream/session/v1/genesis.js +136 -10
- package/esm/sparkdream/session/v1/grant.js +1020 -0
- package/esm/sparkdream/session/v1/params.js +543 -19
- package/esm/sparkdream/session/v1/query.js +487 -0
- package/esm/sparkdream/session/v1/query.lcd.js +41 -3
- package/esm/sparkdream/session/v1/query.rpc.Query.js +36 -4
- package/esm/sparkdream/session/v1/session.js +6 -0
- package/esm/sparkdream/session/v1/tx.js +1066 -0
- package/esm/sparkdream/session/v1/tx.registry.js +110 -2
- package/esm/sparkdream/session/v1/tx.rpc.msg.js +65 -3
- package/esm/tendermint/bundle.js +20 -20
- package/ibc/bundle.d.ts +90 -90
- package/ibc/bundle.js +106 -106
- package/package.json +1 -1
- package/sparkdream/blog/v1/params.d.ts +37 -28
- package/sparkdream/blog/v1/params.js +51 -50
- package/sparkdream/blog/v1/post.d.ts +2 -2
- package/sparkdream/blog/v1/tx.d.ts +4 -4
- package/sparkdream/bundle.d.ts +14912 -12896
- package/sparkdream/bundle.js +448 -346
- package/sparkdream/client.d.ts +90 -20
- package/sparkdream/client.js +7 -1
- package/sparkdream/collect/v1/params.d.ts +16 -0
- package/sparkdream/collect/v1/params.js +13 -1
- package/sparkdream/collect/v1/types.d.ts +2 -0
- package/sparkdream/collect/v1/types.js +13 -1
- package/sparkdream/commons/v1/genesis.d.ts +17 -0
- package/sparkdream/commons/v1/genesis.js +29 -1
- package/sparkdream/commons/v1/query.d.ts +186 -0
- package/sparkdream/commons/v1/query.js +318 -1
- package/sparkdream/commons/v1/query.lcd.d.ts +3 -1
- package/sparkdream/commons/v1/query.lcd.js +23 -0
- package/sparkdream/commons/v1/query.rpc.Query.d.ts +12 -1
- package/sparkdream/commons/v1/query.rpc.Query.js +19 -0
- package/sparkdream/commons/v1/recurring_spend.d.ts +234 -0
- package/sparkdream/commons/v1/recurring_spend.js +301 -0
- package/sparkdream/commons/v1/tx.d.ts +472 -0
- package/sparkdream/commons/v1/tx.js +694 -1
- package/sparkdream/commons/v1/tx.registry.d.ts +49 -1
- package/sparkdream/commons/v1/tx.registry.js +73 -1
- package/sparkdream/commons/v1/tx.rpc.msg.d.ts +29 -1
- package/sparkdream/commons/v1/tx.rpc.msg.js +32 -0
- package/sparkdream/federation/v1/genesis.d.ts +3 -3
- package/sparkdream/federation/v1/genesis.js +9 -9
- package/sparkdream/federation/v1/params.d.ts +64 -13
- package/sparkdream/federation/v1/params.js +29 -54
- package/sparkdream/federation/v1/query.d.ts +209 -100
- package/sparkdream/federation/v1/query.js +216 -71
- package/sparkdream/federation/v1/query.lcd.d.ts +4 -3
- package/sparkdream/federation/v1/query.lcd.js +11 -6
- package/sparkdream/federation/v1/query.rpc.Query.d.ts +10 -7
- package/sparkdream/federation/v1/query.rpc.Query.js +24 -15
- package/sparkdream/federation/v1/tx.amino.d.ts +21 -21
- package/sparkdream/federation/v1/tx.amino.js +20 -20
- package/sparkdream/federation/v1/tx.d.ts +479 -352
- package/sparkdream/federation/v1/tx.js +1147 -1106
- package/sparkdream/federation/v1/tx.registry.d.ts +49 -49
- package/sparkdream/federation/v1/tx.registry.js +73 -73
- package/sparkdream/federation/v1/tx.rpc.msg.d.ts +18 -9
- package/sparkdream/federation/v1/tx.rpc.msg.js +31 -25
- package/sparkdream/federation/v1/types.d.ts +307 -41
- package/sparkdream/federation/v1/types.js +360 -100
- package/sparkdream/federation/v1/verifier_activity.d.ts +18 -0
- package/sparkdream/federation/v1/verifier_activity.js +13 -1
- package/sparkdream/forum/v1/params.d.ts +99 -62
- package/sparkdream/forum/v1/params.js +173 -148
- package/sparkdream/guardian/module/v1/module.d.ts +74 -0
- package/sparkdream/guardian/module/v1/module.js +71 -0
- package/sparkdream/guardian/v1/query.d.ts +88 -0
- package/sparkdream/guardian/v1/query.js +131 -0
- package/sparkdream/guardian/v1/query.lcd.d.ts +9 -0
- package/sparkdream/guardian/v1/query.lcd.js +17 -0
- package/sparkdream/guardian/v1/query.rpc.Query.d.ts +20 -0
- package/sparkdream/guardian/v1/query.rpc.Query.js +31 -0
- package/sparkdream/guardian/v1/tx.amino.d.ts +8 -0
- package/sparkdream/guardian/v1/tx.amino.js +12 -0
- package/sparkdream/guardian/v1/tx.d.ts +138 -0
- package/sparkdream/guardian/v1/tx.js +181 -0
- package/sparkdream/guardian/v1/tx.registry.d.ts +25 -0
- package/sparkdream/guardian/v1/tx.registry.js +37 -0
- package/sparkdream/guardian/v1/tx.rpc.msg.d.ts +22 -0
- package/sparkdream/guardian/v1/tx.rpc.msg.js +29 -0
- package/sparkdream/identity/module/v1/module.d.ts +54 -0
- package/sparkdream/identity/module/v1/module.js +74 -0
- package/sparkdream/identity/v1/chain_identity.d.ts +131 -0
- package/sparkdream/identity/v1/chain_identity.js +202 -0
- package/sparkdream/identity/v1/genesis.d.ts +65 -0
- package/sparkdream/identity/v1/genesis.js +87 -0
- package/sparkdream/identity/v1/query.d.ts +243 -0
- package/sparkdream/identity/v1/query.js +375 -0
- package/sparkdream/identity/v1/query.lcd.d.ts +11 -0
- package/sparkdream/identity/v1/query.lcd.js +25 -0
- package/sparkdream/identity/v1/query.rpc.Query.d.ts +26 -0
- package/sparkdream/identity/v1/query.rpc.Query.js +47 -0
- package/sparkdream/lcd.d.ts +9 -0
- package/sparkdream/lcd.js +15 -0
- package/sparkdream/name/v1/params.d.ts +25 -8
- package/sparkdream/name/v1/params.js +19 -18
- package/sparkdream/rep/v1/bonded_role.d.ts +51 -0
- package/sparkdream/rep/v1/bonded_role.js +48 -2
- package/sparkdream/rep/v1/tag.d.ts +15 -2
- package/sparkdream/rep/v1/tag.js +6 -13
- package/sparkdream/rpc.query.d.ts +34 -2
- package/sparkdream/rpc.query.js +9 -0
- package/sparkdream/rpc.tx.d.ts +6 -0
- package/sparkdream/rpc.tx.js +6 -0
- package/sparkdream/service/module/v1/module.d.ts +54 -0
- package/sparkdream/service/module/v1/module.js +74 -0
- package/sparkdream/service/v1/controller_transfer_case.d.ts +125 -0
- package/sparkdream/service/v1/controller_transfer_case.js +158 -0
- package/sparkdream/service/v1/genesis.d.ts +172 -0
- package/sparkdream/service/v1/genesis.js +243 -0
- package/sparkdream/service/v1/operator.d.ts +215 -0
- package/sparkdream/service/v1/operator.js +253 -0
- package/sparkdream/service/v1/params.d.ts +346 -0
- package/sparkdream/service/v1/params.js +358 -0
- package/sparkdream/service/v1/query.d.ts +964 -0
- package/sparkdream/service/v1/query.js +1585 -0
- package/sparkdream/service/v1/query.lcd.d.ts +18 -0
- package/sparkdream/service/v1/query.lcd.js +111 -0
- package/sparkdream/service/v1/query.rpc.Query.d.ts +63 -0
- package/sparkdream/service/v1/query.rpc.Query.js +114 -0
- package/sparkdream/service/v1/refile_cooldown.d.ts +105 -0
- package/sparkdream/service/v1/refile_cooldown.js +124 -0
- package/sparkdream/service/v1/report.d.ts +174 -0
- package/sparkdream/service/v1/report.js +215 -0
- package/sparkdream/service/v1/reporter_rate_limit.d.ts +112 -0
- package/sparkdream/service/v1/reporter_rate_limit.js +140 -0
- package/sparkdream/service/v1/service_type_config.d.ts +222 -0
- package/sparkdream/service/v1/service_type_config.js +269 -0
- package/sparkdream/service/v1/system_report_rate_limit.d.ts +106 -0
- package/sparkdream/service/v1/system_report_rate_limit.js +118 -0
- package/sparkdream/service/v1/tier1_escrow_entry.d.ts +125 -0
- package/sparkdream/service/v1/tier1_escrow_entry.js +148 -0
- package/sparkdream/service/v1/tier1_last_slash.d.ts +101 -0
- package/sparkdream/service/v1/tier1_last_slash.js +124 -0
- package/sparkdream/service/v1/tx.amino.d.ts +68 -0
- package/sparkdream/service/v1/tx.amino.js +72 -0
- package/sparkdream/service/v1/tx.d.ts +1264 -0
- package/sparkdream/service/v1/tx.js +2127 -0
- package/sparkdream/service/v1/tx.registry.d.ts +169 -0
- package/sparkdream/service/v1/tx.registry.js +253 -0
- package/sparkdream/service/v1/tx.rpc.msg.d.ts +80 -0
- package/sparkdream/service/v1/tx.rpc.msg.js +105 -0
- package/sparkdream/service/v1/types.d.ts +94 -0
- package/sparkdream/service/v1/types.js +370 -0
- package/sparkdream/session/v1/genesis.d.ts +93 -9
- package/sparkdream/session/v1/genesis.js +137 -11
- package/sparkdream/session/v1/grant.d.ts +517 -0
- package/sparkdream/session/v1/grant.js +1027 -0
- package/sparkdream/session/v1/params.d.ts +338 -7
- package/sparkdream/session/v1/params.js +543 -19
- package/sparkdream/session/v1/query.d.ts +265 -0
- package/sparkdream/session/v1/query.js +488 -1
- package/sparkdream/session/v1/query.lcd.d.ts +4 -1
- package/sparkdream/session/v1/query.lcd.js +41 -3
- package/sparkdream/session/v1/query.rpc.Query.d.ts +27 -4
- package/sparkdream/session/v1/query.rpc.Query.js +35 -3
- package/sparkdream/session/v1/session.d.ts +18 -0
- package/sparkdream/session/v1/session.js +6 -0
- package/sparkdream/session/v1/tx.d.ts +660 -0
- package/sparkdream/session/v1/tx.js +1067 -1
- package/sparkdream/session/v1/tx.registry.d.ts +73 -1
- package/sparkdream/session/v1/tx.registry.js +109 -1
- package/sparkdream/session/v1/tx.rpc.msg.d.ts +63 -3
- package/sparkdream/session/v1/tx.rpc.msg.js +64 -2
- package/tendermint/bundle.d.ts +844 -844
- package/tendermint/bundle.js +20 -20
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
2
|
import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination";
|
|
3
|
+
import { Grant } from "./grant";
|
|
3
4
|
import { Params } from "./params";
|
|
4
5
|
import { Session } from "./session";
|
|
5
6
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
@@ -600,6 +601,492 @@ export const QuerySessionsByGranteeResponse = {
|
|
|
600
601
|
};
|
|
601
602
|
}
|
|
602
603
|
};
|
|
604
|
+
function createBaseQueryGrantRequest() {
|
|
605
|
+
return {
|
|
606
|
+
id: BigInt(0)
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* @name QueryGrantRequest
|
|
611
|
+
* @package sparkdream.session.v1
|
|
612
|
+
* @see proto type: sparkdream.session.v1.QueryGrantRequest
|
|
613
|
+
*/
|
|
614
|
+
export const QueryGrantRequest = {
|
|
615
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantRequest",
|
|
616
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
617
|
+
if (message.id !== BigInt(0)) {
|
|
618
|
+
writer.uint32(8).uint64(message.id);
|
|
619
|
+
}
|
|
620
|
+
return writer;
|
|
621
|
+
},
|
|
622
|
+
decode(input, length) {
|
|
623
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
624
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
625
|
+
const message = createBaseQueryGrantRequest();
|
|
626
|
+
while (reader.pos < end) {
|
|
627
|
+
const tag = reader.uint32();
|
|
628
|
+
switch (tag >>> 3) {
|
|
629
|
+
case 1:
|
|
630
|
+
message.id = reader.uint64();
|
|
631
|
+
break;
|
|
632
|
+
default:
|
|
633
|
+
reader.skipType(tag & 7);
|
|
634
|
+
break;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return message;
|
|
638
|
+
},
|
|
639
|
+
fromPartial(object) {
|
|
640
|
+
const message = createBaseQueryGrantRequest();
|
|
641
|
+
message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
|
|
642
|
+
return message;
|
|
643
|
+
},
|
|
644
|
+
fromAmino(object) {
|
|
645
|
+
const message = createBaseQueryGrantRequest();
|
|
646
|
+
if (object.id !== undefined && object.id !== null) {
|
|
647
|
+
message.id = BigInt(object.id);
|
|
648
|
+
}
|
|
649
|
+
return message;
|
|
650
|
+
},
|
|
651
|
+
toAmino(message) {
|
|
652
|
+
const obj = {};
|
|
653
|
+
obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
|
|
654
|
+
return obj;
|
|
655
|
+
},
|
|
656
|
+
fromAminoMsg(object) {
|
|
657
|
+
return QueryGrantRequest.fromAmino(object.value);
|
|
658
|
+
},
|
|
659
|
+
fromProtoMsg(message) {
|
|
660
|
+
return QueryGrantRequest.decode(message.value);
|
|
661
|
+
},
|
|
662
|
+
toProto(message) {
|
|
663
|
+
return QueryGrantRequest.encode(message).finish();
|
|
664
|
+
},
|
|
665
|
+
toProtoMsg(message) {
|
|
666
|
+
return {
|
|
667
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantRequest",
|
|
668
|
+
value: QueryGrantRequest.encode(message).finish()
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
function createBaseQueryGrantResponse() {
|
|
673
|
+
return {
|
|
674
|
+
grant: Grant.fromPartial({})
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* @name QueryGrantResponse
|
|
679
|
+
* @package sparkdream.session.v1
|
|
680
|
+
* @see proto type: sparkdream.session.v1.QueryGrantResponse
|
|
681
|
+
*/
|
|
682
|
+
export const QueryGrantResponse = {
|
|
683
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantResponse",
|
|
684
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
685
|
+
if (message.grant !== undefined) {
|
|
686
|
+
Grant.encode(message.grant, writer.uint32(10).fork()).ldelim();
|
|
687
|
+
}
|
|
688
|
+
return writer;
|
|
689
|
+
},
|
|
690
|
+
decode(input, length) {
|
|
691
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
692
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
693
|
+
const message = createBaseQueryGrantResponse();
|
|
694
|
+
while (reader.pos < end) {
|
|
695
|
+
const tag = reader.uint32();
|
|
696
|
+
switch (tag >>> 3) {
|
|
697
|
+
case 1:
|
|
698
|
+
message.grant = Grant.decode(reader, reader.uint32());
|
|
699
|
+
break;
|
|
700
|
+
default:
|
|
701
|
+
reader.skipType(tag & 7);
|
|
702
|
+
break;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
return message;
|
|
706
|
+
},
|
|
707
|
+
fromPartial(object) {
|
|
708
|
+
const message = createBaseQueryGrantResponse();
|
|
709
|
+
message.grant = object.grant !== undefined && object.grant !== null ? Grant.fromPartial(object.grant) : undefined;
|
|
710
|
+
return message;
|
|
711
|
+
},
|
|
712
|
+
fromAmino(object) {
|
|
713
|
+
const message = createBaseQueryGrantResponse();
|
|
714
|
+
if (object.grant !== undefined && object.grant !== null) {
|
|
715
|
+
message.grant = Grant.fromAmino(object.grant);
|
|
716
|
+
}
|
|
717
|
+
return message;
|
|
718
|
+
},
|
|
719
|
+
toAmino(message) {
|
|
720
|
+
const obj = {};
|
|
721
|
+
obj.grant = message.grant ? Grant.toAmino(message.grant) : undefined;
|
|
722
|
+
return obj;
|
|
723
|
+
},
|
|
724
|
+
fromAminoMsg(object) {
|
|
725
|
+
return QueryGrantResponse.fromAmino(object.value);
|
|
726
|
+
},
|
|
727
|
+
fromProtoMsg(message) {
|
|
728
|
+
return QueryGrantResponse.decode(message.value);
|
|
729
|
+
},
|
|
730
|
+
toProto(message) {
|
|
731
|
+
return QueryGrantResponse.encode(message).finish();
|
|
732
|
+
},
|
|
733
|
+
toProtoMsg(message) {
|
|
734
|
+
return {
|
|
735
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantResponse",
|
|
736
|
+
value: QueryGrantResponse.encode(message).finish()
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
function createBaseQueryGrantsByGranterRequest() {
|
|
741
|
+
return {
|
|
742
|
+
granter: "",
|
|
743
|
+
type: 0,
|
|
744
|
+
pagination: undefined
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* @name QueryGrantsByGranterRequest
|
|
749
|
+
* @package sparkdream.session.v1
|
|
750
|
+
* @see proto type: sparkdream.session.v1.QueryGrantsByGranterRequest
|
|
751
|
+
*/
|
|
752
|
+
export const QueryGrantsByGranterRequest = {
|
|
753
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantsByGranterRequest",
|
|
754
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
755
|
+
if (message.granter !== "") {
|
|
756
|
+
writer.uint32(10).string(message.granter);
|
|
757
|
+
}
|
|
758
|
+
if (message.type !== 0) {
|
|
759
|
+
writer.uint32(16).int32(message.type);
|
|
760
|
+
}
|
|
761
|
+
if (message.pagination !== undefined) {
|
|
762
|
+
PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim();
|
|
763
|
+
}
|
|
764
|
+
return writer;
|
|
765
|
+
},
|
|
766
|
+
decode(input, length) {
|
|
767
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
768
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
769
|
+
const message = createBaseQueryGrantsByGranterRequest();
|
|
770
|
+
while (reader.pos < end) {
|
|
771
|
+
const tag = reader.uint32();
|
|
772
|
+
switch (tag >>> 3) {
|
|
773
|
+
case 1:
|
|
774
|
+
message.granter = reader.string();
|
|
775
|
+
break;
|
|
776
|
+
case 2:
|
|
777
|
+
message.type = reader.int32();
|
|
778
|
+
break;
|
|
779
|
+
case 3:
|
|
780
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
781
|
+
break;
|
|
782
|
+
default:
|
|
783
|
+
reader.skipType(tag & 7);
|
|
784
|
+
break;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
return message;
|
|
788
|
+
},
|
|
789
|
+
fromPartial(object) {
|
|
790
|
+
const message = createBaseQueryGrantsByGranterRequest();
|
|
791
|
+
message.granter = object.granter ?? "";
|
|
792
|
+
message.type = object.type ?? 0;
|
|
793
|
+
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
|
|
794
|
+
return message;
|
|
795
|
+
},
|
|
796
|
+
fromAmino(object) {
|
|
797
|
+
const message = createBaseQueryGrantsByGranterRequest();
|
|
798
|
+
if (object.granter !== undefined && object.granter !== null) {
|
|
799
|
+
message.granter = object.granter;
|
|
800
|
+
}
|
|
801
|
+
if (object.type !== undefined && object.type !== null) {
|
|
802
|
+
message.type = object.type;
|
|
803
|
+
}
|
|
804
|
+
if (object.pagination !== undefined && object.pagination !== null) {
|
|
805
|
+
message.pagination = PageRequest.fromAmino(object.pagination);
|
|
806
|
+
}
|
|
807
|
+
return message;
|
|
808
|
+
},
|
|
809
|
+
toAmino(message) {
|
|
810
|
+
const obj = {};
|
|
811
|
+
obj.granter = message.granter === "" ? undefined : message.granter;
|
|
812
|
+
obj.type = message.type === 0 ? undefined : message.type;
|
|
813
|
+
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
|
|
814
|
+
return obj;
|
|
815
|
+
},
|
|
816
|
+
fromAminoMsg(object) {
|
|
817
|
+
return QueryGrantsByGranterRequest.fromAmino(object.value);
|
|
818
|
+
},
|
|
819
|
+
fromProtoMsg(message) {
|
|
820
|
+
return QueryGrantsByGranterRequest.decode(message.value);
|
|
821
|
+
},
|
|
822
|
+
toProto(message) {
|
|
823
|
+
return QueryGrantsByGranterRequest.encode(message).finish();
|
|
824
|
+
},
|
|
825
|
+
toProtoMsg(message) {
|
|
826
|
+
return {
|
|
827
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantsByGranterRequest",
|
|
828
|
+
value: QueryGrantsByGranterRequest.encode(message).finish()
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
function createBaseQueryGrantsByGranterResponse() {
|
|
833
|
+
return {
|
|
834
|
+
grants: [],
|
|
835
|
+
pagination: undefined
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* @name QueryGrantsByGranterResponse
|
|
840
|
+
* @package sparkdream.session.v1
|
|
841
|
+
* @see proto type: sparkdream.session.v1.QueryGrantsByGranterResponse
|
|
842
|
+
*/
|
|
843
|
+
export const QueryGrantsByGranterResponse = {
|
|
844
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantsByGranterResponse",
|
|
845
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
846
|
+
for (const v of message.grants) {
|
|
847
|
+
Grant.encode(v, writer.uint32(10).fork()).ldelim();
|
|
848
|
+
}
|
|
849
|
+
if (message.pagination !== undefined) {
|
|
850
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
851
|
+
}
|
|
852
|
+
return writer;
|
|
853
|
+
},
|
|
854
|
+
decode(input, length) {
|
|
855
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
856
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
857
|
+
const message = createBaseQueryGrantsByGranterResponse();
|
|
858
|
+
while (reader.pos < end) {
|
|
859
|
+
const tag = reader.uint32();
|
|
860
|
+
switch (tag >>> 3) {
|
|
861
|
+
case 1:
|
|
862
|
+
message.grants.push(Grant.decode(reader, reader.uint32()));
|
|
863
|
+
break;
|
|
864
|
+
case 2:
|
|
865
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
866
|
+
break;
|
|
867
|
+
default:
|
|
868
|
+
reader.skipType(tag & 7);
|
|
869
|
+
break;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
return message;
|
|
873
|
+
},
|
|
874
|
+
fromPartial(object) {
|
|
875
|
+
const message = createBaseQueryGrantsByGranterResponse();
|
|
876
|
+
message.grants = object.grants?.map(e => Grant.fromPartial(e)) || [];
|
|
877
|
+
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
|
|
878
|
+
return message;
|
|
879
|
+
},
|
|
880
|
+
fromAmino(object) {
|
|
881
|
+
const message = createBaseQueryGrantsByGranterResponse();
|
|
882
|
+
message.grants = object.grants?.map(e => Grant.fromAmino(e)) || [];
|
|
883
|
+
if (object.pagination !== undefined && object.pagination !== null) {
|
|
884
|
+
message.pagination = PageResponse.fromAmino(object.pagination);
|
|
885
|
+
}
|
|
886
|
+
return message;
|
|
887
|
+
},
|
|
888
|
+
toAmino(message) {
|
|
889
|
+
const obj = {};
|
|
890
|
+
if (message.grants) {
|
|
891
|
+
obj.grants = message.grants.map(e => e ? Grant.toAmino(e) : undefined);
|
|
892
|
+
}
|
|
893
|
+
else {
|
|
894
|
+
obj.grants = message.grants;
|
|
895
|
+
}
|
|
896
|
+
obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
|
|
897
|
+
return obj;
|
|
898
|
+
},
|
|
899
|
+
fromAminoMsg(object) {
|
|
900
|
+
return QueryGrantsByGranterResponse.fromAmino(object.value);
|
|
901
|
+
},
|
|
902
|
+
fromProtoMsg(message) {
|
|
903
|
+
return QueryGrantsByGranterResponse.decode(message.value);
|
|
904
|
+
},
|
|
905
|
+
toProto(message) {
|
|
906
|
+
return QueryGrantsByGranterResponse.encode(message).finish();
|
|
907
|
+
},
|
|
908
|
+
toProtoMsg(message) {
|
|
909
|
+
return {
|
|
910
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantsByGranterResponse",
|
|
911
|
+
value: QueryGrantsByGranterResponse.encode(message).finish()
|
|
912
|
+
};
|
|
913
|
+
}
|
|
914
|
+
};
|
|
915
|
+
function createBaseQueryGrantsByGranteeRequest() {
|
|
916
|
+
return {
|
|
917
|
+
grantee: "",
|
|
918
|
+
type: 0,
|
|
919
|
+
pagination: undefined
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* @name QueryGrantsByGranteeRequest
|
|
924
|
+
* @package sparkdream.session.v1
|
|
925
|
+
* @see proto type: sparkdream.session.v1.QueryGrantsByGranteeRequest
|
|
926
|
+
*/
|
|
927
|
+
export const QueryGrantsByGranteeRequest = {
|
|
928
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantsByGranteeRequest",
|
|
929
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
930
|
+
if (message.grantee !== "") {
|
|
931
|
+
writer.uint32(10).string(message.grantee);
|
|
932
|
+
}
|
|
933
|
+
if (message.type !== 0) {
|
|
934
|
+
writer.uint32(16).int32(message.type);
|
|
935
|
+
}
|
|
936
|
+
if (message.pagination !== undefined) {
|
|
937
|
+
PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim();
|
|
938
|
+
}
|
|
939
|
+
return writer;
|
|
940
|
+
},
|
|
941
|
+
decode(input, length) {
|
|
942
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
943
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
944
|
+
const message = createBaseQueryGrantsByGranteeRequest();
|
|
945
|
+
while (reader.pos < end) {
|
|
946
|
+
const tag = reader.uint32();
|
|
947
|
+
switch (tag >>> 3) {
|
|
948
|
+
case 1:
|
|
949
|
+
message.grantee = reader.string();
|
|
950
|
+
break;
|
|
951
|
+
case 2:
|
|
952
|
+
message.type = reader.int32();
|
|
953
|
+
break;
|
|
954
|
+
case 3:
|
|
955
|
+
message.pagination = PageRequest.decode(reader, reader.uint32());
|
|
956
|
+
break;
|
|
957
|
+
default:
|
|
958
|
+
reader.skipType(tag & 7);
|
|
959
|
+
break;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
return message;
|
|
963
|
+
},
|
|
964
|
+
fromPartial(object) {
|
|
965
|
+
const message = createBaseQueryGrantsByGranteeRequest();
|
|
966
|
+
message.grantee = object.grantee ?? "";
|
|
967
|
+
message.type = object.type ?? 0;
|
|
968
|
+
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
|
|
969
|
+
return message;
|
|
970
|
+
},
|
|
971
|
+
fromAmino(object) {
|
|
972
|
+
const message = createBaseQueryGrantsByGranteeRequest();
|
|
973
|
+
if (object.grantee !== undefined && object.grantee !== null) {
|
|
974
|
+
message.grantee = object.grantee;
|
|
975
|
+
}
|
|
976
|
+
if (object.type !== undefined && object.type !== null) {
|
|
977
|
+
message.type = object.type;
|
|
978
|
+
}
|
|
979
|
+
if (object.pagination !== undefined && object.pagination !== null) {
|
|
980
|
+
message.pagination = PageRequest.fromAmino(object.pagination);
|
|
981
|
+
}
|
|
982
|
+
return message;
|
|
983
|
+
},
|
|
984
|
+
toAmino(message) {
|
|
985
|
+
const obj = {};
|
|
986
|
+
obj.grantee = message.grantee === "" ? undefined : message.grantee;
|
|
987
|
+
obj.type = message.type === 0 ? undefined : message.type;
|
|
988
|
+
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
|
|
989
|
+
return obj;
|
|
990
|
+
},
|
|
991
|
+
fromAminoMsg(object) {
|
|
992
|
+
return QueryGrantsByGranteeRequest.fromAmino(object.value);
|
|
993
|
+
},
|
|
994
|
+
fromProtoMsg(message) {
|
|
995
|
+
return QueryGrantsByGranteeRequest.decode(message.value);
|
|
996
|
+
},
|
|
997
|
+
toProto(message) {
|
|
998
|
+
return QueryGrantsByGranteeRequest.encode(message).finish();
|
|
999
|
+
},
|
|
1000
|
+
toProtoMsg(message) {
|
|
1001
|
+
return {
|
|
1002
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantsByGranteeRequest",
|
|
1003
|
+
value: QueryGrantsByGranteeRequest.encode(message).finish()
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
function createBaseQueryGrantsByGranteeResponse() {
|
|
1008
|
+
return {
|
|
1009
|
+
grants: [],
|
|
1010
|
+
pagination: undefined
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* @name QueryGrantsByGranteeResponse
|
|
1015
|
+
* @package sparkdream.session.v1
|
|
1016
|
+
* @see proto type: sparkdream.session.v1.QueryGrantsByGranteeResponse
|
|
1017
|
+
*/
|
|
1018
|
+
export const QueryGrantsByGranteeResponse = {
|
|
1019
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantsByGranteeResponse",
|
|
1020
|
+
encode(message, writer = BinaryWriter.create()) {
|
|
1021
|
+
for (const v of message.grants) {
|
|
1022
|
+
Grant.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1023
|
+
}
|
|
1024
|
+
if (message.pagination !== undefined) {
|
|
1025
|
+
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1026
|
+
}
|
|
1027
|
+
return writer;
|
|
1028
|
+
},
|
|
1029
|
+
decode(input, length) {
|
|
1030
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1031
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1032
|
+
const message = createBaseQueryGrantsByGranteeResponse();
|
|
1033
|
+
while (reader.pos < end) {
|
|
1034
|
+
const tag = reader.uint32();
|
|
1035
|
+
switch (tag >>> 3) {
|
|
1036
|
+
case 1:
|
|
1037
|
+
message.grants.push(Grant.decode(reader, reader.uint32()));
|
|
1038
|
+
break;
|
|
1039
|
+
case 2:
|
|
1040
|
+
message.pagination = PageResponse.decode(reader, reader.uint32());
|
|
1041
|
+
break;
|
|
1042
|
+
default:
|
|
1043
|
+
reader.skipType(tag & 7);
|
|
1044
|
+
break;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
return message;
|
|
1048
|
+
},
|
|
1049
|
+
fromPartial(object) {
|
|
1050
|
+
const message = createBaseQueryGrantsByGranteeResponse();
|
|
1051
|
+
message.grants = object.grants?.map(e => Grant.fromPartial(e)) || [];
|
|
1052
|
+
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
|
|
1053
|
+
return message;
|
|
1054
|
+
},
|
|
1055
|
+
fromAmino(object) {
|
|
1056
|
+
const message = createBaseQueryGrantsByGranteeResponse();
|
|
1057
|
+
message.grants = object.grants?.map(e => Grant.fromAmino(e)) || [];
|
|
1058
|
+
if (object.pagination !== undefined && object.pagination !== null) {
|
|
1059
|
+
message.pagination = PageResponse.fromAmino(object.pagination);
|
|
1060
|
+
}
|
|
1061
|
+
return message;
|
|
1062
|
+
},
|
|
1063
|
+
toAmino(message) {
|
|
1064
|
+
const obj = {};
|
|
1065
|
+
if (message.grants) {
|
|
1066
|
+
obj.grants = message.grants.map(e => e ? Grant.toAmino(e) : undefined);
|
|
1067
|
+
}
|
|
1068
|
+
else {
|
|
1069
|
+
obj.grants = message.grants;
|
|
1070
|
+
}
|
|
1071
|
+
obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
|
|
1072
|
+
return obj;
|
|
1073
|
+
},
|
|
1074
|
+
fromAminoMsg(object) {
|
|
1075
|
+
return QueryGrantsByGranteeResponse.fromAmino(object.value);
|
|
1076
|
+
},
|
|
1077
|
+
fromProtoMsg(message) {
|
|
1078
|
+
return QueryGrantsByGranteeResponse.decode(message.value);
|
|
1079
|
+
},
|
|
1080
|
+
toProto(message) {
|
|
1081
|
+
return QueryGrantsByGranteeResponse.encode(message).finish();
|
|
1082
|
+
},
|
|
1083
|
+
toProtoMsg(message) {
|
|
1084
|
+
return {
|
|
1085
|
+
typeUrl: "/sparkdream.session.v1.QueryGrantsByGranteeResponse",
|
|
1086
|
+
value: QueryGrantsByGranteeResponse.encode(message).finish()
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
603
1090
|
function createBaseQueryAllowedMsgTypesRequest() {
|
|
604
1091
|
return {};
|
|
605
1092
|
}
|
|
@@ -10,12 +10,16 @@ export class LCDQueryClient {
|
|
|
10
10
|
const endpoint = `sparkdream/session/v1/params`;
|
|
11
11
|
return await this.req.get(endpoint);
|
|
12
12
|
};
|
|
13
|
-
/* Session queries a single session by (granter, grantee).
|
|
13
|
+
/* Session queries a single session by (granter, grantee).
|
|
14
|
+
|
|
15
|
+
Legacy compat: projects the underlying SESSION_KEY-type Grant back to
|
|
16
|
+
the Session shape. New consumers should use the Grant queries below. */
|
|
14
17
|
session = async (params) => {
|
|
15
18
|
const endpoint = `sparkdream/session/v1/session/${params.granter}/${params.grantee}`;
|
|
16
19
|
return await this.req.get(endpoint);
|
|
17
20
|
};
|
|
18
|
-
/* SessionsByGranter queries all active sessions for a granter
|
|
21
|
+
/* SessionsByGranter queries all active sessions for a granter (legacy
|
|
22
|
+
compat — projects SESSION_KEY grants only). */
|
|
19
23
|
sessionsByGranter = async (params) => {
|
|
20
24
|
const options = {
|
|
21
25
|
params: {}
|
|
@@ -26,7 +30,8 @@ export class LCDQueryClient {
|
|
|
26
30
|
const endpoint = `sparkdream/session/v1/sessions_by_granter/${params.granter}`;
|
|
27
31
|
return await this.req.get(endpoint, options);
|
|
28
32
|
};
|
|
29
|
-
/* SessionsByGrantee queries all active sessions for a grantee
|
|
33
|
+
/* SessionsByGrantee queries all active sessions for a grantee (legacy
|
|
34
|
+
compat — projects SESSION_KEY grants only). */
|
|
30
35
|
sessionsByGrantee = async (params) => {
|
|
31
36
|
const options = {
|
|
32
37
|
params: {}
|
|
@@ -37,6 +42,39 @@ export class LCDQueryClient {
|
|
|
37
42
|
const endpoint = `sparkdream/session/v1/sessions_by_grantee/${params.grantee}`;
|
|
38
43
|
return await this.req.get(endpoint, options);
|
|
39
44
|
};
|
|
45
|
+
/* Grant queries a single grant by id. */
|
|
46
|
+
grant = async (params) => {
|
|
47
|
+
const endpoint = `sparkdream/session/v1/grants/${params.id}`;
|
|
48
|
+
return await this.req.get(endpoint);
|
|
49
|
+
};
|
|
50
|
+
/* GrantsByGranter queries all active grants for a granter (any type). */
|
|
51
|
+
grantsByGranter = async (params) => {
|
|
52
|
+
const options = {
|
|
53
|
+
params: {}
|
|
54
|
+
};
|
|
55
|
+
if (typeof params?.type !== "undefined") {
|
|
56
|
+
options.params.type = params.type;
|
|
57
|
+
}
|
|
58
|
+
if (typeof params?.pagination !== "undefined") {
|
|
59
|
+
setPaginationParams(options, params.pagination);
|
|
60
|
+
}
|
|
61
|
+
const endpoint = `sparkdream/session/v1/grants/by_granter/${params.granter}`;
|
|
62
|
+
return await this.req.get(endpoint, options);
|
|
63
|
+
};
|
|
64
|
+
/* GrantsByGrantee queries all active grants for a grantee (any type). */
|
|
65
|
+
grantsByGrantee = async (params) => {
|
|
66
|
+
const options = {
|
|
67
|
+
params: {}
|
|
68
|
+
};
|
|
69
|
+
if (typeof params?.type !== "undefined") {
|
|
70
|
+
options.params.type = params.type;
|
|
71
|
+
}
|
|
72
|
+
if (typeof params?.pagination !== "undefined") {
|
|
73
|
+
setPaginationParams(options, params.pagination);
|
|
74
|
+
}
|
|
75
|
+
const endpoint = `sparkdream/session/v1/grants/by_grantee/${params.grantee}`;
|
|
76
|
+
return await this.req.get(endpoint, options);
|
|
77
|
+
};
|
|
40
78
|
/* AllowedMsgTypes queries the ceiling and currently active message types. */
|
|
41
79
|
allowedMsgTypes = async (_params = {}) => {
|
|
42
80
|
const endpoint = `sparkdream/session/v1/allowed_msg_types`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BinaryReader } from "../../../binary";
|
|
2
2
|
import { createProtobufRpcClient } from "@cosmjs/stargate";
|
|
3
|
-
import { QueryParamsRequest, QueryParamsResponse, QuerySessionRequest, QuerySessionResponse, QuerySessionsByGranterRequest, QuerySessionsByGranterResponse, QuerySessionsByGranteeRequest, QuerySessionsByGranteeResponse, QueryAllowedMsgTypesRequest, QueryAllowedMsgTypesResponse } from "./query";
|
|
3
|
+
import { QueryParamsRequest, QueryParamsResponse, QuerySessionRequest, QuerySessionResponse, QuerySessionsByGranterRequest, QuerySessionsByGranterResponse, QuerySessionsByGranteeRequest, QuerySessionsByGranteeResponse, QueryGrantRequest, QueryGrantResponse, QueryGrantsByGranterRequest, QueryGrantsByGranterResponse, QueryGrantsByGranteeRequest, QueryGrantsByGranteeResponse, QueryAllowedMsgTypesRequest, QueryAllowedMsgTypesResponse } from "./query";
|
|
4
4
|
export class QueryClientImpl {
|
|
5
5
|
rpc;
|
|
6
6
|
constructor(rpc) {
|
|
@@ -12,24 +12,47 @@ export class QueryClientImpl {
|
|
|
12
12
|
const promise = this.rpc.request("sparkdream.session.v1.Query", "Params", data);
|
|
13
13
|
return promise.then(data => QueryParamsResponse.decode(new BinaryReader(data)));
|
|
14
14
|
};
|
|
15
|
-
/* Session queries a single session by (granter, grantee).
|
|
15
|
+
/* Session queries a single session by (granter, grantee).
|
|
16
|
+
|
|
17
|
+
Legacy compat: projects the underlying SESSION_KEY-type Grant back to
|
|
18
|
+
the Session shape. New consumers should use the Grant queries below. */
|
|
16
19
|
session = async (request) => {
|
|
17
20
|
const data = QuerySessionRequest.encode(request).finish();
|
|
18
21
|
const promise = this.rpc.request("sparkdream.session.v1.Query", "Session", data);
|
|
19
22
|
return promise.then(data => QuerySessionResponse.decode(new BinaryReader(data)));
|
|
20
23
|
};
|
|
21
|
-
/* SessionsByGranter queries all active sessions for a granter
|
|
24
|
+
/* SessionsByGranter queries all active sessions for a granter (legacy
|
|
25
|
+
compat — projects SESSION_KEY grants only). */
|
|
22
26
|
sessionsByGranter = async (request) => {
|
|
23
27
|
const data = QuerySessionsByGranterRequest.encode(request).finish();
|
|
24
28
|
const promise = this.rpc.request("sparkdream.session.v1.Query", "SessionsByGranter", data);
|
|
25
29
|
return promise.then(data => QuerySessionsByGranterResponse.decode(new BinaryReader(data)));
|
|
26
30
|
};
|
|
27
|
-
/* SessionsByGrantee queries all active sessions for a grantee
|
|
31
|
+
/* SessionsByGrantee queries all active sessions for a grantee (legacy
|
|
32
|
+
compat — projects SESSION_KEY grants only). */
|
|
28
33
|
sessionsByGrantee = async (request) => {
|
|
29
34
|
const data = QuerySessionsByGranteeRequest.encode(request).finish();
|
|
30
35
|
const promise = this.rpc.request("sparkdream.session.v1.Query", "SessionsByGrantee", data);
|
|
31
36
|
return promise.then(data => QuerySessionsByGranteeResponse.decode(new BinaryReader(data)));
|
|
32
37
|
};
|
|
38
|
+
/* Grant queries a single grant by id. */
|
|
39
|
+
grant = async (request) => {
|
|
40
|
+
const data = QueryGrantRequest.encode(request).finish();
|
|
41
|
+
const promise = this.rpc.request("sparkdream.session.v1.Query", "Grant", data);
|
|
42
|
+
return promise.then(data => QueryGrantResponse.decode(new BinaryReader(data)));
|
|
43
|
+
};
|
|
44
|
+
/* GrantsByGranter queries all active grants for a granter (any type). */
|
|
45
|
+
grantsByGranter = async (request) => {
|
|
46
|
+
const data = QueryGrantsByGranterRequest.encode(request).finish();
|
|
47
|
+
const promise = this.rpc.request("sparkdream.session.v1.Query", "GrantsByGranter", data);
|
|
48
|
+
return promise.then(data => QueryGrantsByGranterResponse.decode(new BinaryReader(data)));
|
|
49
|
+
};
|
|
50
|
+
/* GrantsByGrantee queries all active grants for a grantee (any type). */
|
|
51
|
+
grantsByGrantee = async (request) => {
|
|
52
|
+
const data = QueryGrantsByGranteeRequest.encode(request).finish();
|
|
53
|
+
const promise = this.rpc.request("sparkdream.session.v1.Query", "GrantsByGrantee", data);
|
|
54
|
+
return promise.then(data => QueryGrantsByGranteeResponse.decode(new BinaryReader(data)));
|
|
55
|
+
};
|
|
33
56
|
/* AllowedMsgTypes queries the ceiling and currently active message types. */
|
|
34
57
|
allowedMsgTypes = async (request = {}) => {
|
|
35
58
|
const data = QueryAllowedMsgTypesRequest.encode(request).finish();
|
|
@@ -53,6 +76,15 @@ export const createRpcQueryExtension = (base) => {
|
|
|
53
76
|
sessionsByGrantee(request) {
|
|
54
77
|
return queryService.sessionsByGrantee(request);
|
|
55
78
|
},
|
|
79
|
+
grant(request) {
|
|
80
|
+
return queryService.grant(request);
|
|
81
|
+
},
|
|
82
|
+
grantsByGranter(request) {
|
|
83
|
+
return queryService.grantsByGranter(request);
|
|
84
|
+
},
|
|
85
|
+
grantsByGrantee(request) {
|
|
86
|
+
return queryService.grantsByGrantee(request);
|
|
87
|
+
},
|
|
56
88
|
allowedMsgTypes(request) {
|
|
57
89
|
return queryService.allowedMsgTypes(request);
|
|
58
90
|
}
|
|
@@ -19,6 +19,12 @@ function createBaseSession() {
|
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Session represents an active session key delegation from granter to grantee.
|
|
22
|
+
*
|
|
23
|
+
* DEPRECATED: kept as the response shape for the legacy Session / SessionsByGranter
|
|
24
|
+
* / SessionsByGrantee queries while the registry transitions to the unified Grant
|
|
25
|
+
* model in grant.proto. Internally the keeper now persists every session as a
|
|
26
|
+
* SESSION_KEY-type Grant; the query handlers project Session views back from those
|
|
27
|
+
* grants. New grant types must use Grant directly.
|
|
22
28
|
* @name Session
|
|
23
29
|
* @package sparkdream.session.v1
|
|
24
30
|
* @see proto type: sparkdream.session.v1.Session
|