You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| --name | Name your node. This identifier will appear on the CarrIOTA Field Dashboard | CarrIOTA Field |
223
-
| --address, -a | Optional IOTA address for donations. ||
224
-
| --seed, -b | Optional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security. ||
225
-
| --config, -c | Path to Field configuration file. ||
226
-
| --disableIRI, -d | Do not allow jobs to be passed from the Field load balancer. Just send the statistics about my node. | false |
227
-
| --iriHostname, -h | Hostname where your IRI instance is running. | localhost |
228
-
| --iriPort, -i | API port of your IRI instance. | 14265 |
229
-
| --port, -p | Field port to be used | 21310 |
230
-
| --silent, -s | Do not print log messages | false |
231
-
| --pow, -w | Allow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI. | false |
232
-
| --customFieldId, -y | If you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID. | false |
| --name | Name your node. This identifier will appear on the CarrIOTA Field Dashboard | CarrIOTA Field |
242
+
| --address, -a | Optional IOTA address for donations. ||
243
+
| --seed, -b | Optional. If no donation address is provided, you can provide a seed. In that case the field client will generate new, unused addresses dynamically. WARNING! Please do not use your usual, main seed. Generate a new one for this occasion. It is easy and adds up to everyone's security. ||
244
+
| --config, -c | Path to Field configuration file. ||
245
+
| --disableIRI, -d | Do not allow jobs to be passed from the Field load balancer. Just send the statistics about my node. | false |
246
+
| --fieldHostname, -f | Field Server hostname (including port) or a space-separated list of multiple Field Server hostnames. | field.carriota.com:80 |
247
+
| --iriHostname, -h | Hostname where your IRI instance is running. | localhost |
248
+
| --iriPort, -i | API port of your IRI instance. | 14265 |
249
+
| --port, -p | Field port to be used | 21310 |
250
+
| --silent, -s | Do not print log messages | false |
251
+
| --pow, -w | Allow attachToTangle jobs to be passed from the Field server load balancer. When disableIRI and pow are true, only PoW work will be passed to IRI. | false |
252
+
| --customFieldId, -y | If you want Field to generate a custom id, instead of using machine-id. This is required for VPS and servers created from an image, which often have the same machine ID. | false |
thrownewError('Wrong seed format provided! Has to be a 81-trytes string!');
35
+
}
36
+
returnseed;
37
+
};
38
+
39
+
varparseAddress=functionparseAddress(address){
40
+
if(address){
41
+
if(!isTrytes(address,90)){
42
+
thrownewError('Wrong donation address provided. Has to be a 90-trytes string (81+checksum)!');
43
+
}
44
+
if(!isValidChecksum(address)){
45
+
thrownewError('Please check your donation address: wrong checksum!');
46
+
}
47
+
}
48
+
returnaddress;
49
+
};
22
50
23
51
// TODO: write tests
24
-
// TODO: write README
25
-
program.version(version).option('-a, --address [value]','Optional IOTA address for donations',null).option('-b, --seed [value]','Optional IOTA seed for automatic donation address generation',null).option('-c, --config [value]','Config file path',null).option('-d, --disableIRI [value]','Do not allow public IRI connections through the Field',DEFAULT_OPTIONS.disableIRI).option('-f, --fieldHostname [value]','Hostname of the Field endpoint',process.env.FIELD_HOSTNAME||DEFAULT_OPTIONS.fieldHostname).option('-h, --IRIHostname [value]','IRI API hostname',process.env.IRI_HOSTNAME||DEFAULT_OPTIONS.IRIHostname).option('-i, --IRIPort [value]','IRI API port',parseNumber,process.env.IRI_PORT||DEFAULT_OPTIONS.IRIPort).option('-n, --name [value]','Name of your node instance',DEFAULT_OPTIONS.name).option('-p, --port [value]','Field port',parseNumber,DEFAULT_OPTIONS.port).option('-s, --silent [value]','Silent',DEFAULT_BASE_OPTIONS.silent).option('-w, --pow [value]','Allow attachToTange / PoW',DEFAULT_OPTIONS.pow).option('-y, --customFieldId [value]','Generate a custom field ID, instead of using machine ID').parse(process.argv);
52
+
program.version(version).option('-a, --address [value]','Optional IOTA address for donations',parseAddress,null).option('-b, --seed [value]','Optional IOTA seed for automatic donation address generation',parseSeed,null).option('-c, --config [value]','Config file path',null).option('-d, --disableIRI [value]','Do not allow public IRI connections through the Field',DEFAULT_OPTIONS.disableIRI).option('-f, --fieldHostname [value]','Hostname of the Field endpoint',parseServers,process.env.FIELD_HOSTNAME ? parseServers(process.env.FIELD_HOSTNAME) : DEFAULT_OPTIONS.fieldHostname).option('-h, --IRIHostname [value]','IRI API hostname',process.env.IRI_HOSTNAME||DEFAULT_OPTIONS.IRIHostname).option('-i, --IRIPort [value]','IRI API port',parseNumber,process.env.IRI_PORT||DEFAULT_OPTIONS.IRIPort).option('-n, --name [value]','Name of your node instance',DEFAULT_OPTIONS.name).option('-p, --port [value]','Field port',parseNumber,DEFAULT_OPTIONS.port).option('-s, --silent [value]','Silent',parseSeed,DEFAULT_BASE_OPTIONS.silent).option('-w, --pow [value]','Allow attachToTange / PoW',DEFAULT_OPTIONS.pow).option('-y, --customFieldId [value]','Generate a custom field ID, instead of using machine ID').parse(process.argv);
0 commit comments