{"modulePath":"github.com/ethersphere/bee/v2","version":"v2.8.3","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## Variables\n\n```go\nvar ErrShutdownInProgress = 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\tchainID int64,\n\tsigner crypto.Signer,\n\tpollingInterval time.Duration,\n\tchainEnabled bool,\n\tminimumGasTipCap uint64,\n\tfallbackGasLimit uint64,\n\trpcCfg BlockchainRPCConfig,\n\tblockSyncInterval uint64,\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(logger log.Logger, backend transaction.Backend, chainID int64, transactionService transaction.Service, factoryAddress string) (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\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, bool, 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. The returned bool indicates whether the previous shutdown was unclean (dirty).\n\n```go\nfunc InitStateStore(logger log.Logger, dataDir string, cacheCapacity uint64) (storage.StateStorerManager, 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\tsession accesscontrol.Session,\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 BlockchainRPCConfig struct {\n\tEndpoint    string\n\tDialTimeout time.Duration\n\tTLSTimeout  time.Duration\n\tIdleTimeout time.Duration\n\tKeepalive   time.Duration\n}\n```\nBlockchainRPCConfig holds the configuration parameters for the blockchain RPC client transport.\n\n```go\ntype Options struct {\n\tAddr                          string\n\tAllowPrivateCIDRs             bool\n\tAPIAddr                       string\n\tEnableWSS                     bool\n\tWSSAddr                       string\n\tAutoTLSStorageDir             string\n\tBlockchainRpcEndpoint         string\n\tBlockchainRpcDialTimeout      time.Duration\n\tBlockchainRpcTLSTimeout       time.Duration\n\tBlockchainRpcIdleTimeout      time.Duration\n\tBlockchainRpcKeepalive        time.Duration\n\tBzzTokenAddress               common.Address\n\tBlockProfile                  bool\n\tBlockTime                     time.Duration\n\tBlockSyncInterval             uint64\n\tBootnodeMode                  bool\n\tBootnodes                     []string\n\tCacheCapacity                 uint64\n\tAutoTLSCAEndpoint             string\n\tChainID                       int64\n\tChequebookEnable              bool\n\tChequebookVerification        bool\n\tChequebookMinBalance          string\n\tCORSAllowedOrigins            []string\n\tDataDir                       string\n\tDBBlockCacheCapacity          uint64\n\tDBDisableSeeksCompaction      bool\n\tDBOpenFilesLimit              uint64\n\tDBWriteBufferSize             uint64\n\tEnableStorageIncentives       bool\n\tEnableWS                      bool\n\tAutoTLSDomain                 string\n\tAutoTLSRegistrationEndpoint   string\n\tFullNodeMode                  bool\n\tLightNodeLimit                int\n\tGasLimitFallback              uint64\n\tLogger                        log.Logger\n\tMinimumGasTipCap              uint64\n\tMinimumStorageRadius          uint\n\tMutexProfile                  bool\n\tNATAddr                       string\n\tNATWSSAddr                    string\n\tNeighborhoodSuggester         string\n\tPaymentEarly                  int64\n\tPaymentThreshold              string\n\tPaymentTolerance              int64\n\tPostageContractAddress        string\n\tPostageContractStartBlock     uint64\n\tPostageSyncBlockRange         uint64\n\tPriceOracleAddress            string\n\tRedistributionContractAddress string\n\tReserveCapacityDoubling       int\n\tResolverConnectionCfgs        []multiresolver.ConnectionConfig\n\tResync                        bool\n\tRetrievalCaching              bool\n\tSkipPostageSnapshot           bool\n\tStakingContractAddress        string\n\tStatestoreCacheCapacity       uint64\n\tStaticNodes                   []swarm.Address\n\tSwapEnable                    bool\n\tSwapFactoryAddress            string\n\tSwapInitialDeposit            string\n\tTargetNeighborhood            string\n\tTracingEnabled                bool\n\tTracingEndpoint               string\n\tTracingInsecure               bool\n\tTracingCAFile                 string\n\tTracingProtocol               string\n\tTracingSamplingRatio          float64\n\tTracingServiceName            string\n\tTrxDebugMode                  bool\n\tWarmupTime                    time.Duration\n\tWelcomeMessage                string\n\tWhitelistedWithdrawalAddress  []string\n}\n```\n\n","path":"github.com/ethersphere/bee/v2/pkg/node","name":"node","synopsis":"Package node defines the concept of a Bee node by bootstrapping and injecting all necessary dependencies.","isRedistributable":true}
