Open tungleanh0902 opened 10 months ago
Hi, Thank you for the feedback!
We tested Grant and Revoke functions and passed in this test: https://github.com/cosmology-tech/telescope/blob/main/packages/starship/__tests__/v1/authz.test.ts
The test's using some features that we recently upgraded and we'll update docs very soon: https://github.com/cosmology-tech/telescope/blob/a6f00deb22d3a41a7b8c832b750ec078328014f6/packages/starship/scripts/codegen.js#L104
Hope these make sense, any problem please let me know.
Thank you very much!
Explained new options that matters:
telescope({
options: {
//enable some new misc features
env: 'v-next',
...
interfaces: {
enabled: true,
//enable better handling of polymorphic fields(with accepted_interfaces) like authorization
useGlobalDecoderRegistry: true,
useUnionTypes: true
},
prototypes: {
enabled: true,
//recommended to have those type urls inside codecs
addTypeUrlToObjects: true,
addTypeUrlToDecoders: true,
addAminoTypeToObjects: true,
...
methods: {
encode: true,
decode: true,
fromJSON: true,
toJSON: true,
fromPartial: true,
....
toAmino: true,
fromAmino: true,
toProto: true,
fromProto: true
},
...
typingsFormat: {
...
// will create a type for telescope generated codecs
useTelescopeGeneratedType: true
}
},
...
stargateClients: {
enabled: true,
includeCosmosDefaultTypes: true,
// create tx client for easier sign and broadcast
addGetTxRpc: true
},
...
rpcClients: {
enabled: true,
// for user easier to create query clients and tx clients
extensions: true,
...
// auto decide using tm34 or tm37, etc
useConnectComet: true,
...
// create valid Tx functions
serviceImplement: {
Msg: {
type: 'Tx'
}
},
...
},
aminoEncoding: {
enabled: true
}
}
})
Hi. Thanks for your reply. I can create msgGrant with single signature using proto signing but not multisignature case. And I think that the sdk require direct signing for single signature transaction but amino signing for multi signature transaction. I tried both direct and amino and it fails. So can you have a test for multi signature case?
Hi. Thanks for your reply. I can create msgGrant with single signature using proto signing but not multisignature case. And I think that the sdk require direct signing for single signature transaction but amino signing for multi signature transaction. I tried both direct and amino and it fails. So can you have a test for multi signature case?
Ok, we'll give it a try in these days!
So do you have any news? I think the problem here is how the sub typeurl is encoded in amino-json sign mode and the sdk don't understand it. I try many ways to encode it but nothing work.
So do you have any news? I think the problem here is how the sub typeurl is encoded in amino-json sign mode and the sdk don't understand it. I try many ways to encode it but nothing work.
Thx! recently we've had some clues for this, will try to fix asap!
I'm following this doc (https://www.npmjs.com/package/@cosmology/telescope#grpc-gateway-client) to create a multisig msg for typeUrl: "/cosmos.authz.v1beta1.MsgGrant" and we have typeUrl: "/cosmwasm.wasm.v1.ContractExecutionAuthorization", in it. But when I boadcast my transaction, it emits this error: "tx parse error". I'm using your latest version. Where am I wrong here? Can you give me a example for this? Here is the code: