github.com/XinFinOrg/xdcchain@v1.1.0/cmd/swarm/flags.go (about) 1 // Copyright 2018 The go-ethereum Authors 2 // This file is part of go-ethereum. 3 // 4 // go-ethereum is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // go-ethereum is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>. 16 17 // Command feed allows the user to create and update signed Swarm feeds 18 package main 19 20 import cli "gopkg.in/urfave/cli.v1" 21 22 var ( 23 ChequebookAddrFlag = cli.StringFlag{ 24 Name: "chequebook", 25 Usage: "chequebook contract address", 26 EnvVar: SWARM_ENV_CHEQUEBOOK_ADDR, 27 } 28 SwarmAccountFlag = cli.StringFlag{ 29 Name: "bzzaccount", 30 Usage: "Swarm account key file", 31 EnvVar: SWARM_ENV_ACCOUNT, 32 } 33 SwarmListenAddrFlag = cli.StringFlag{ 34 Name: "httpaddr", 35 Usage: "Swarm HTTP API listening interface", 36 EnvVar: SWARM_ENV_LISTEN_ADDR, 37 } 38 SwarmPortFlag = cli.StringFlag{ 39 Name: "bzzport", 40 Usage: "Swarm local http api port", 41 EnvVar: SWARM_ENV_PORT, 42 } 43 SwarmNetworkIdFlag = cli.IntFlag{ 44 Name: "bzznetworkid", 45 Usage: "Network identifier (integer, default 3=swarm testnet)", 46 EnvVar: SWARM_ENV_NETWORK_ID, 47 } 48 SwarmSwapEnabledFlag = cli.BoolFlag{ 49 Name: "swap", 50 Usage: "Swarm SWAP enabled (default false)", 51 EnvVar: SWARM_ENV_SWAP_ENABLE, 52 } 53 SwarmSwapAPIFlag = cli.StringFlag{ 54 Name: "swap-api", 55 Usage: "URL of the Ethereum API provider to use to settle SWAP payments", 56 EnvVar: SWARM_ENV_SWAP_API, 57 } 58 SwarmSyncDisabledFlag = cli.BoolTFlag{ 59 Name: "nosync", 60 Usage: "Disable swarm syncing", 61 EnvVar: SWARM_ENV_SYNC_DISABLE, 62 } 63 SwarmSyncUpdateDelay = cli.DurationFlag{ 64 Name: "sync-update-delay", 65 Usage: "Duration for sync subscriptions update after no new peers are added (default 15s)", 66 EnvVar: SWARM_ENV_SYNC_UPDATE_DELAY, 67 } 68 SwarmMaxStreamPeerServersFlag = cli.IntFlag{ 69 Name: "max-stream-peer-servers", 70 Usage: "Limit of Stream peer servers, 0 denotes unlimited", 71 EnvVar: SWARM_ENV_MAX_STREAM_PEER_SERVERS, 72 Value: 10000, // A very large default value is possible as stream servers have very small memory footprint 73 } 74 SwarmLightNodeEnabled = cli.BoolFlag{ 75 Name: "lightnode", 76 Usage: "Enable Swarm LightNode (default false)", 77 EnvVar: SWARM_ENV_LIGHT_NODE_ENABLE, 78 } 79 SwarmDeliverySkipCheckFlag = cli.BoolFlag{ 80 Name: "delivery-skip-check", 81 Usage: "Skip chunk delivery check (default false)", 82 EnvVar: SWARM_ENV_DELIVERY_SKIP_CHECK, 83 } 84 EnsAPIFlag = cli.StringSliceFlag{ 85 Name: "ens-api", 86 Usage: "ENS API endpoint for a TLD and with contract address, can be repeated, format [tld:][contract-addr@]url", 87 EnvVar: SWARM_ENV_ENS_API, 88 } 89 SwarmApiFlag = cli.StringFlag{ 90 Name: "bzzapi", 91 Usage: "Specifies the Swarm HTTP endpoint to connect to", 92 Value: "http://127.0.0.1:8500", 93 } 94 SwarmRecursiveFlag = cli.BoolFlag{ 95 Name: "recursive", 96 Usage: "Upload directories recursively", 97 } 98 SwarmWantManifestFlag = cli.BoolTFlag{ 99 Name: "manifest", 100 Usage: "Automatic manifest upload (default true)", 101 } 102 SwarmUploadDefaultPath = cli.StringFlag{ 103 Name: "defaultpath", 104 Usage: "path to file served for empty url path (none)", 105 } 106 SwarmAccessGrantKeyFlag = cli.StringFlag{ 107 Name: "grant-key", 108 Usage: "grants a given public key access to an ACT", 109 } 110 SwarmAccessGrantKeysFlag = cli.StringFlag{ 111 Name: "grant-keys", 112 Usage: "grants a given list of public keys in the following file (separated by line breaks) access to an ACT", 113 } 114 SwarmUpFromStdinFlag = cli.BoolFlag{ 115 Name: "stdin", 116 Usage: "reads data to be uploaded from stdin", 117 } 118 SwarmUploadMimeType = cli.StringFlag{ 119 Name: "mime", 120 Usage: "Manually specify MIME type", 121 } 122 SwarmEncryptedFlag = cli.BoolFlag{ 123 Name: "encrypt", 124 Usage: "use encrypted upload", 125 } 126 SwarmAccessPasswordFlag = cli.StringFlag{ 127 Name: "password", 128 Usage: "Password", 129 EnvVar: SWARM_ACCESS_PASSWORD, 130 } 131 SwarmDryRunFlag = cli.BoolFlag{ 132 Name: "dry-run", 133 Usage: "dry-run", 134 } 135 CorsStringFlag = cli.StringFlag{ 136 Name: "corsdomain", 137 Usage: "Domain on which to send Access-Control-Allow-Origin header (multiple domains can be supplied separated by a ',')", 138 EnvVar: SWARM_ENV_CORS, 139 } 140 SwarmStorePath = cli.StringFlag{ 141 Name: "store.path", 142 Usage: "Path to leveldb chunk DB (default <$GETH_ENV_DIR>/swarm/bzz-<$BZZ_KEY>/chunks)", 143 EnvVar: SWARM_ENV_STORE_PATH, 144 } 145 SwarmStoreCapacity = cli.Uint64Flag{ 146 Name: "store.size", 147 Usage: "Number of chunks (5M is roughly 20-25GB) (default 5000000)", 148 EnvVar: SWARM_ENV_STORE_CAPACITY, 149 } 150 SwarmStoreCacheCapacity = cli.UintFlag{ 151 Name: "store.cache.size", 152 Usage: "Number of recent chunks cached in memory (default 5000)", 153 EnvVar: SWARM_ENV_STORE_CACHE_CAPACITY, 154 } 155 SwarmCompressedFlag = cli.BoolFlag{ 156 Name: "compressed", 157 Usage: "Prints encryption keys in compressed form", 158 } 159 SwarmBootnodeModeFlag = cli.BoolFlag{ 160 Name: "bootnode-mode", 161 Usage: "Run Swarm in Bootnode mode", 162 } 163 SwarmFeedNameFlag = cli.StringFlag{ 164 Name: "name", 165 Usage: "User-defined name for the new feed, limited to 32 characters. If combined with topic, it will refer to a subtopic with this name", 166 } 167 SwarmFeedTopicFlag = cli.StringFlag{ 168 Name: "topic", 169 Usage: "User-defined topic this feed is tracking, hex encoded. Limited to 64 hexadecimal characters", 170 } 171 SwarmFeedManifestFlag = cli.StringFlag{ 172 Name: "manifest", 173 Usage: "Refers to the feed through a manifest", 174 } 175 SwarmFeedUserFlag = cli.StringFlag{ 176 Name: "user", 177 Usage: "Indicates the user who updates the feed", 178 } 179 SwarmGlobalStoreAPIFlag = cli.StringFlag{ 180 Name: "globalstore-api", 181 Usage: "URL of the Global Store API provider (only for testing)", 182 EnvVar: SWARM_GLOBALSTORE_API, 183 } 184 )