Open fmorency opened 10 months ago
Things I had to do in order to make it work.
Run yarn add @cosmology/lcd
After running the transpile command a first time, edit .telescope.json
and set the following
{
"protoDirs": [
"./proto"
],
"outPath": "./src/codegen",
"options": {
"interfaces": {
"enabled": false,
"useByDefault": false,
"useUnionTypes": false
},
"prototypes": {
"enabled": true,
"parser": {
"keepCase": false
},
"methods": {
"fromJSON": true, ----> Change this to `true`
"toJSON": true, ----> Change this to `true`
"encode": true,
"decode": true,
"fromPartial": true,
"toAmino": true,
"fromAmino": true,
"fromProto": true,
"toProto": true
},
"addTypeUrlToObjects": true,
"addTypeUrlToDecoders": true,
"enableRegistryLoader": false, ----> Add this line
"typingsFormat": {
"duration": "duration",
"timestamp": "timestamp", ----> Change `date` to `timestamp`
"useExact": false,
"useDeepPartial": false,
"num64": "bigint",
"useTelescopeGeneratedType": true, ----> Add this line
"customTypes": {
"useCosmosSDKDec": true
}
}
},
"bundle": {
"enabled": true
},
"stargateClients": {
"enabled": true,
"includeCosmosDefaultTypes": true
},
"aminoEncoding": {
"enabled": true
},
"lcdClients": {
"enabled": true
},
"rpcClients": {
"enabled": true,
"camelCase": true
},
"tsDisable": { ----> Add this whole block
"patterns": [
"**/client.ts"
]
}
}
}
I have no idea if this is the right way of working around the build issue.
thanks! We're working to update the video :)
Hi Cosmology! I followed the video tutorial from
Turn your Cosmos SDK chain into a TypeScript npm module
and got a bunch of errors when runningyarn
at the end.