2020-03-25 15:30:21 +00:00
|
|
|
package rpc
|
|
|
|
|
2020-12-01 08:40:58 +00:00
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
|
|
|
)
|
2020-03-25 15:30:21 +00:00
|
|
|
|
|
|
|
type (
|
2021-05-12 20:17:03 +00:00
|
|
|
// Config is an RPC service configuration information.
|
2020-03-25 15:30:21 +00:00
|
|
|
Config struct {
|
|
|
|
Address string `yaml:"Address"`
|
|
|
|
Enabled bool `yaml:"Enabled"`
|
|
|
|
EnableCORSWorkaround bool `yaml:"EnableCORSWorkaround"`
|
2022-04-20 18:30:09 +00:00
|
|
|
// MaxGasInvoke is the maximum amount of GAS which
|
|
|
|
// can be spent during an RPC call.
|
2021-04-28 14:46:34 +00:00
|
|
|
MaxGasInvoke fixedn.Fixed8 `yaml:"MaxGasInvoke"`
|
|
|
|
MaxIteratorResultItems int `yaml:"MaxIteratorResultItems"`
|
2021-10-07 13:56:27 +00:00
|
|
|
MaxFindResultItems int `yaml:"MaxFindResultItems"`
|
2021-11-17 20:04:50 +00:00
|
|
|
MaxNEP11Tokens int `yaml:"MaxNEP11Tokens"`
|
2021-04-28 14:46:34 +00:00
|
|
|
Port uint16 `yaml:"Port"`
|
2022-06-15 18:23:29 +00:00
|
|
|
SessionEnabled bool `yaml:"SessionEnabled"`
|
|
|
|
SessionExpirationTime int `yaml:"SessionExpirationTime"`
|
2022-04-22 08:47:36 +00:00
|
|
|
StartWhenSynchronized bool `yaml:"StartWhenSynchronized"`
|
2021-04-28 14:46:34 +00:00
|
|
|
TLSConfig TLSConfig `yaml:"TLSConfig"`
|
2020-03-25 15:30:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// TLSConfig describes SSL/TLS configuration.
|
|
|
|
TLSConfig struct {
|
|
|
|
Address string `yaml:"Address"`
|
|
|
|
CertFile string `yaml:"CertFile"`
|
|
|
|
Enabled bool `yaml:"Enabled"`
|
|
|
|
Port uint16 `yaml:"Port"`
|
|
|
|
KeyFile string `yaml:"KeyFile"`
|
|
|
|
}
|
|
|
|
)
|