{"modulePath":"github.com/ethersphere/bee","version":"v1.18.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package node\n\nPackage node defines the concept of a Bee node by bootstrapping and injecting all necessary dependencies.\n\n## Constants\n\n```go\nconst LoggerName = \"node\"\n```\nLoggerName is the tree path name of the logger for this package.\n\n```go\nconst (\n\tReserveCapacity = 4_194_304 // 2^22 chunks\n\n)\n```\n\n## Variables\n\n```go\nvar ErrShutdownInProgress error = errors.New(\"shutdown in progress\")\n```\n\n## Functions\n\n```go\nfunc GetTxHash(stateStore storage.StateStorer, logger log.Logger, trxString string) ([]byte, error)\n```\n\n```go\nfunc GetTxNextBlock(ctx context.Context, logger log.Logger, backend transaction.Backend, monitor transaction.Monitor, duration time.Duration, trx []byte, blockHash string) ([]byte, error)\n```\n\n```go\nfunc InitChain(\n\tctx context.Context,\n\tlogger log.Logger,\n\tstateStore storage.StateStorer,\n\tendpoint string,\n\toChainID int64,\n\tsigner crypto.Signer,\n\tpollingInterval time.Duration,\n\tchainEnabled bool,\n) (transaction.Backend, common.Address, int64, transaction.Monitor, transaction.Service, error)\n```\nInitChain will initialize the Ethereum backend at the given endpoint and set up the Transaction Service to interact with it using the provided signer.\n\n```go\nfunc InitChequebookFactory(\n\tlogger log.Logger,\n\tbackend transaction.Backend,\n\tchainID int64,\n\ttransactionService transaction.Service,\n\tfactoryAddress string,\n\tlegacyFactoryAddresses []string,\n) (chequebook.Factory, error)\n```\nInitChequebookFactory will initialize the chequebook factory with the given chain backend.\n\n```go\nfunc InitChequebookService(\n\tctx context.Context,\n\tlogger log.Logger,\n\tstateStore storage.StateStorer,\n\tsigner crypto.Signer,\n\tchainID int64,\n\tbackend transaction.Backend,\n\toverlayEthAddress common.Address,\n\ttransactionService transaction.Service,\n\tchequebookFactory chequebook.Factory,\n\tinitialDeposit string,\n\tdeployGasPrice string,\n\terc20Service erc20.Service,\n) (chequebook.Service, error)\n```\nInitChequebookService will initialize the chequebook service with the given chequebook factory and chain backend.\n\n```go\nfunc InitStamperStore(logger log.Logger, dataDir string, stateStore storage.StateStorer) (storage.Store, error)\n```\nInitStamperStore will create new stamper store with the given path to the data directory. When given an empty directory path, the function will instead initialize an in-memory state store that will not be persisted.\n\n```go\nfunc InitStateStore(logger log.Logger, dataDir string, cacheCapacity uint64) (storage.StateStorer, metrics.Collector, error)\n```\nInitStateStore will initialize the stateStore with the given path to the data directory. When given an empty directory path, the function will instead initialize an in-memory state store that will not be persisted.\n\n```go\nfunc InitSwap(\n\tp2ps *libp2p.Service,\n\tlogger log.Logger,\n\tstateStore storage.StateStorer,\n\tnetworkID uint64,\n\toverlayEthAddress common.Address,\n\tchequebookService chequebook.Service,\n\tchequeStore chequebook.ChequeStore,\n\tcashoutService chequebook.CashoutService,\n\taccounting settlement.Accounting,\n\tpriceOracleAddress string,\n\tchainID int64,\n\ttransactionService transaction.Service,\n) (*swap.Service, priceoracle.Service, error)\n```\nInitSwap will initialize and register the swap service.\n\n## Types\n\n```go\ntype Bee struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewBee(\n\tctx context.Context,\n\taddr string,\n\tpublicKey *ecdsa.PublicKey,\n\tsigner crypto.Signer,\n\tnetworkID uint64,\n\tlogger log.Logger,\n\tlibp2pPrivateKey,\n\tpssPrivateKey *ecdsa.PrivateKey,\n\to *Options,\n) (b *Bee, err error)\n```\n\n```go\nfunc (b *Bee) Shutdown() error\n```\n\n```go\nfunc (b *Bee) SyncingStopped() chan struct{}\n```\n\n```go\ntype DevBee struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewDevBee(logger log.Logger, o *DevOptions) (b *DevBee, err error)\n```\nNewDevBee starts the bee instance in 'development' mode this implies starting an API and a Debug endpoints while mocking all their services.\n\n```go\nfunc (b *DevBee) Shutdown() error\n```\n\n```go\ntype DevOptions struct {\n\tLogger                   log.Logger\n\tAPIAddr                  string\n\tDebugAPIAddr             string\n\tCORSAllowedOrigins       []string\n\tDBOpenFilesLimit         uint64\n\tReserveCapacity          uint64\n\tDBWriteBufferSize        uint64\n\tDBBlockCacheCapacity     uint64\n\tDBDisableSeeksCompaction bool\n\tRestricted               bool\n\tTokenEncryptionKey       string\n\tAdminPasswordHash        string\n}\n```\n\n```go\ntype Options struct {\n\tDataDir                       string\n\tCacheCapacity                 uint64\n\tDBOpenFilesLimit              uint64\n\tDBWriteBufferSize             uint64\n\tDBBlockCacheCapacity          uint64\n\tDBDisableSeeksCompaction      bool\n\tAPIAddr                       string\n\tDebugAPIAddr                  string\n\tAddr                          string\n\tNATAddr                       string\n\tEnableWS                      bool\n\tWelcomeMessage                string\n\tBootnodes                     []string\n\tCORSAllowedOrigins            []string\n\tLogger                        log.Logger\n\tTracingEnabled                bool\n\tTracingEndpoint               string\n\tTracingServiceName            string\n\tPaymentThreshold              string\n\tPaymentTolerance              int64\n\tPaymentEarly                  int64\n\tResolverConnectionCfgs        []multiresolver.ConnectionConfig\n\tRetrievalCaching              bool\n\tBootnodeMode                  bool\n\tBlockchainRpcEndpoint         string\n\tSwapFactoryAddress            string\n\tSwapLegacyFactoryAddresses    []string\n\tSwapInitialDeposit            string\n\tSwapEnable                    bool\n\tChequebookEnable              bool\n\tFullNodeMode                  bool\n\tPostageContractAddress        string\n\tPostageContractStartBlock     uint64\n\tStakingContractAddress        string\n\tPriceOracleAddress            string\n\tRedistributionContractAddress string\n\tBlockTime                     time.Duration\n\tDeployGasPrice                string\n\tWarmupTime                    time.Duration\n\tChainID                       int64\n\tResync                        bool\n\tBlockProfile                  bool\n\tMutexProfile                  bool\n\tStaticNodes                   []swarm.Address\n\tAllowPrivateCIDRs             bool\n\tRestricted                    bool\n\tTokenEncryptionKey            string\n\tAdminPasswordHash             string\n\tUsePostageSnapshot            bool\n\tEnableStorageIncentives       bool\n\tStatestoreCacheCapacity       uint64\n\tTargetNeighborhood            string\n}\n```\n\n","path":"github.com/ethersphere/bee/pkg/node","name":"node","synopsis":"Package node defines the concept of a Bee node by bootstrapping and injecting all necessary dependencies.","isRedistributable":true}
