Skip to content

Commit

Permalink
add message composers
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Dec 17, 2024
1 parent 357cfad commit 3550d18
Show file tree
Hide file tree
Showing 44 changed files with 5,650 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .telescope.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"useSDKTypes": false,
"prototypes": {
"enableRegistryLoader": false,
"enableMessageComposer": false,
"enableMessageComposer": true,
"enabled": true,
"parser": {
"keepCase": false
Expand Down
64 changes: 63 additions & 1 deletion libs/injective-vue/src/cosmos/authz/v1beta1/tx.registry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
import { TelescopeGeneratedType } from "../../../types";
import { MsgGrant, MsgExec, MsgRevoke } from "./tx";
export const registry: ReadonlyArray<[string, TelescopeGeneratedType<any, any, any>]> = [["/cosmos.authz.v1beta1.MsgGrant", MsgGrant], ["/cosmos.authz.v1beta1.MsgExec", MsgExec], ["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke]];
export const registry: ReadonlyArray<[string, TelescopeGeneratedType<any, any, any>]> = [["/cosmos.authz.v1beta1.MsgGrant", MsgGrant], ["/cosmos.authz.v1beta1.MsgExec", MsgExec], ["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke]];
export const MessageComposer = {
encoded: {
grant(value: MsgGrant) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgGrant",
value: MsgGrant.encode(value).finish()
};
},
exec(value: MsgExec) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgExec",
value: MsgExec.encode(value).finish()
};
},
revoke(value: MsgRevoke) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgRevoke",
value: MsgRevoke.encode(value).finish()
};
}
},
withTypeUrl: {
grant(value: MsgGrant) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgGrant",
value
};
},
exec(value: MsgExec) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgExec",
value
};
},
revoke(value: MsgRevoke) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgRevoke",
value
};
}
},
fromPartial: {
grant(value: MsgGrant) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgGrant",
value: MsgGrant.fromPartial(value)
};
},
exec(value: MsgExec) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgExec",
value: MsgExec.fromPartial(value)
};
},
revoke(value: MsgRevoke) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgRevoke",
value: MsgRevoke.fromPartial(value)
};
}
}
};
82 changes: 81 additions & 1 deletion libs/injective-vue/src/cosmos/bank/v1beta1/tx.registry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,83 @@
import { TelescopeGeneratedType } from "../../../types";
import { MsgSend, MsgMultiSend, MsgUpdateParams, MsgSetSendEnabled } from "./tx";
export const registry: ReadonlyArray<[string, TelescopeGeneratedType<any, any, any>]> = [["/cosmos.bank.v1beta1.MsgSend", MsgSend], ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], ["/cosmos.bank.v1beta1.MsgUpdateParams", MsgUpdateParams], ["/cosmos.bank.v1beta1.MsgSetSendEnabled", MsgSetSendEnabled]];
export const registry: ReadonlyArray<[string, TelescopeGeneratedType<any, any, any>]> = [["/cosmos.bank.v1beta1.MsgSend", MsgSend], ["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend], ["/cosmos.bank.v1beta1.MsgUpdateParams", MsgUpdateParams], ["/cosmos.bank.v1beta1.MsgSetSendEnabled", MsgSetSendEnabled]];
export const MessageComposer = {
encoded: {
send(value: MsgSend) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgSend",
value: MsgSend.encode(value).finish()
};
},
multiSend(value: MsgMultiSend) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend",
value: MsgMultiSend.encode(value).finish()
};
},
updateParams(value: MsgUpdateParams) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams",
value: MsgUpdateParams.encode(value).finish()
};
},
setSendEnabled(value: MsgSetSendEnabled) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled",
value: MsgSetSendEnabled.encode(value).finish()
};
}
},
withTypeUrl: {
send(value: MsgSend) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgSend",
value
};
},
multiSend(value: MsgMultiSend) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend",
value
};
},
updateParams(value: MsgUpdateParams) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams",
value
};
},
setSendEnabled(value: MsgSetSendEnabled) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled",
value
};
}
},
fromPartial: {
send(value: MsgSend) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgSend",
value: MsgSend.fromPartial(value)
};
},
multiSend(value: MsgMultiSend) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend",
value: MsgMultiSend.fromPartial(value)
};
},
updateParams(value: MsgUpdateParams) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgUpdateParams",
value: MsgUpdateParams.fromPartial(value)
};
},
setSendEnabled(value: MsgSetSendEnabled) {
return {
typeUrl: "/cosmos.bank.v1beta1.MsgSetSendEnabled",
value: MsgSetSendEnabled.fromPartial(value)
};
}
}
};
136 changes: 135 additions & 1 deletion libs/injective-vue/src/cosmos/distribution/v1beta1/tx.registry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,137 @@
import { TelescopeGeneratedType } from "../../../types";
import { MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, MsgFundCommunityPool, MsgUpdateParams, MsgCommunityPoolSpend, MsgDepositValidatorRewardsPool } from "./tx";
export const registry: ReadonlyArray<[string, TelescopeGeneratedType<any, any, any>]> = [["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], ["/cosmos.distribution.v1beta1.MsgUpdateParams", MsgUpdateParams], ["/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", MsgCommunityPoolSpend], ["/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", MsgDepositValidatorRewardsPool]];
export const registry: ReadonlyArray<[string, TelescopeGeneratedType<any, any, any>]> = [["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress], ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward], ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission], ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool], ["/cosmos.distribution.v1beta1.MsgUpdateParams", MsgUpdateParams], ["/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", MsgCommunityPoolSpend], ["/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", MsgDepositValidatorRewardsPool]];
export const MessageComposer = {
encoded: {
setWithdrawAddress(value: MsgSetWithdrawAddress) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
value: MsgSetWithdrawAddress.encode(value).finish()
};
},
withdrawDelegatorReward(value: MsgWithdrawDelegatorReward) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
value: MsgWithdrawDelegatorReward.encode(value).finish()
};
},
withdrawValidatorCommission(value: MsgWithdrawValidatorCommission) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
value: MsgWithdrawValidatorCommission.encode(value).finish()
};
},
fundCommunityPool(value: MsgFundCommunityPool) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
value: MsgFundCommunityPool.encode(value).finish()
};
},
updateParams(value: MsgUpdateParams) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams",
value: MsgUpdateParams.encode(value).finish()
};
},
communityPoolSpend(value: MsgCommunityPoolSpend) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",
value: MsgCommunityPoolSpend.encode(value).finish()
};
},
depositValidatorRewardsPool(value: MsgDepositValidatorRewardsPool) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool",
value: MsgDepositValidatorRewardsPool.encode(value).finish()
};
}
},
withTypeUrl: {
setWithdrawAddress(value: MsgSetWithdrawAddress) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
value
};
},
withdrawDelegatorReward(value: MsgWithdrawDelegatorReward) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
value
};
},
withdrawValidatorCommission(value: MsgWithdrawValidatorCommission) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
value
};
},
fundCommunityPool(value: MsgFundCommunityPool) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
value
};
},
updateParams(value: MsgUpdateParams) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams",
value
};
},
communityPoolSpend(value: MsgCommunityPoolSpend) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",
value
};
},
depositValidatorRewardsPool(value: MsgDepositValidatorRewardsPool) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool",
value
};
}
},
fromPartial: {
setWithdrawAddress(value: MsgSetWithdrawAddress) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
value: MsgSetWithdrawAddress.fromPartial(value)
};
},
withdrawDelegatorReward(value: MsgWithdrawDelegatorReward) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
value: MsgWithdrawDelegatorReward.fromPartial(value)
};
},
withdrawValidatorCommission(value: MsgWithdrawValidatorCommission) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
value: MsgWithdrawValidatorCommission.fromPartial(value)
};
},
fundCommunityPool(value: MsgFundCommunityPool) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
value: MsgFundCommunityPool.fromPartial(value)
};
},
updateParams(value: MsgUpdateParams) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgUpdateParams",
value: MsgUpdateParams.fromPartial(value)
};
},
communityPoolSpend(value: MsgCommunityPoolSpend) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",
value: MsgCommunityPoolSpend.fromPartial(value)
};
},
depositValidatorRewardsPool(value: MsgDepositValidatorRewardsPool) {
return {
typeUrl: "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool",
value: MsgDepositValidatorRewardsPool.fromPartial(value)
};
}
}
};
64 changes: 63 additions & 1 deletion libs/injective-vue/src/cosmos/feegrant/v1beta1/tx.registry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
import { TelescopeGeneratedType } from "../../../types";
import { MsgGrantAllowance, MsgRevokeAllowance, MsgPruneAllowances } from "./tx";
export const registry: ReadonlyArray<[string, TelescopeGeneratedType<any, any, any>]> = [["/cosmos.feegrant.v1beta1.MsgGrantAllowance", MsgGrantAllowance], ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance], ["/cosmos.feegrant.v1beta1.MsgPruneAllowances", MsgPruneAllowances]];
export const registry: ReadonlyArray<[string, TelescopeGeneratedType<any, any, any>]> = [["/cosmos.feegrant.v1beta1.MsgGrantAllowance", MsgGrantAllowance], ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", MsgRevokeAllowance], ["/cosmos.feegrant.v1beta1.MsgPruneAllowances", MsgPruneAllowances]];
export const MessageComposer = {
encoded: {
grantAllowance(value: MsgGrantAllowance) {
return {
typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance",
value: MsgGrantAllowance.encode(value).finish()
};
},
revokeAllowance(value: MsgRevokeAllowance) {
return {
typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance",
value: MsgRevokeAllowance.encode(value).finish()
};
},
pruneAllowances(value: MsgPruneAllowances) {
return {
typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances",
value: MsgPruneAllowances.encode(value).finish()
};
}
},
withTypeUrl: {
grantAllowance(value: MsgGrantAllowance) {
return {
typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance",
value
};
},
revokeAllowance(value: MsgRevokeAllowance) {
return {
typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance",
value
};
},
pruneAllowances(value: MsgPruneAllowances) {
return {
typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances",
value
};
}
},
fromPartial: {
grantAllowance(value: MsgGrantAllowance) {
return {
typeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance",
value: MsgGrantAllowance.fromPartial(value)
};
},
revokeAllowance(value: MsgRevokeAllowance) {
return {
typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance",
value: MsgRevokeAllowance.fromPartial(value)
};
},
pruneAllowances(value: MsgPruneAllowances) {
return {
typeUrl: "/cosmos.feegrant.v1beta1.MsgPruneAllowances",
value: MsgPruneAllowances.fromPartial(value)
};
}
}
};
Loading

0 comments on commit 3550d18

Please sign in to comment.