forked from confio/cosmjs-types
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codegen.js
executable file
·67 lines (65 loc) · 1.76 KB
/
codegen.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env node
const { join } = require('path');
const telescope = require('@osmonauts/telescope').default;
telescope({
protoDirs: [
'wasmd-0.25/proto',
'wasmd-0.25/third_party/proto',
'cosmos-sdk-0.45/proto',
'cosmos-sdk-0.45/third_party/proto'
],
outPath: join(__dirname, '/../src'),
options: {
useSDKTypes: false,
tsDisable: {
disableAll: false
},
eslintDisable: {
disableAll: true
},
bundle: {
enabled: false
},
prototypes: {
includePackageVar: true,
excluded: {
protos: [
'cosmos/authz/v1beta1/event.proto',
'cosmos/base/reflection/v2alpha1/reflection.proto',
'cosmos/crypto/secp256r1/keys.proto',
'ibc/core/port/v1/query.proto',
'ibc/lightclients/solomachine/v2/solomachine.proto',
'tendermint/libs/bits/types.proto',
'google/api/httpbody.proto'
]
},
methods: {
fromJSON: true,
toJSON: true
},
typingsFormat: {
useExact: true,
useDeepPartial: true,
timestamp: 'timestamp',
duration: 'duration'
}
},
lcdClients: {
enabled: false
},
rpcClients: {
enabled: true,
inline: true,
extensions: false,
camelCase: false
},
aminoEncoding: {
enabled: false
}
}
}).then(() => {
console.log('✨ All Done!');
}, (e) => {
console.error(e);
process.exit(1);
});