Versions in this module Expand all Collapse all v0 v0.0.5 Dec 31, 2021 v0.0.4 Nov 21, 2021 v0.0.3 Oct 26, 2021 v0.0.2 Oct 11, 2021 Changes in this version + const DefaultSecretSize + const EVMWordByteLen + const EVMWordHexLen + const FastN + const FastP + const FormatBool + const FormatBytes + const FormatInt256 + const FormatPreformatted + const FormatUint256 + var Client *http.Client + var DefaultScryptParams = ScryptParams + var EmptyHash = common.Hash + var ErrNotStarted = errors.New("Not started") + var FastScryptParams = ScryptParams + var MaxInt256 = &big.Int + var MaxUint256 = &big.Int + var MinInt256 = &big.Int + var UnrestrictedClient *http.Client + var ZeroAddress = common.Address + func AddHexPrefix(str string) string + func Bytes32FromString(s string) [32]byte + func Bytes4FromString(s string) [4]byte + func CheckPasswordHash(password, hash string) bool + func CheckUint256(n *big.Int) error + func CombinedContext(signals ...interface{}) (context.Context, context.CancelFunc) + func ConcatBytes(bufs ...[]byte) []byte + func ContextFromChan(chStop <-chan struct{}) (context.Context, context.CancelFunc) + func CopyFileWithMaxPerms(srcPath, dstPath string, perms os.FileMode) error + func DebugPanic() + func DecodeEthereumTx(hex string) (types.Transaction, error) + func DurationFromNow(t time.Time) time.Duration + func EIP55CapitalizedAddress(possibleAddressString string) bool + func EVMBytesToUint64(buf []byte) uint64 + func EVMEncodeBytes(input []byte) []byte + func EVMTranscodeBool(value gjson.Result) ([]byte, error) + func EVMTranscodeBytes(value gjson.Result) ([]byte, error) + func EVMTranscodeInt256(value gjson.Result) ([]byte, error) + func EVMTranscodeJSONWithFormat(value gjson.Result, format string) ([]byte, error) + func EVMTranscodeUint256(value gjson.Result) ([]byte, error) + func EVMWordBigInt(val *big.Int) ([]byte, error) + func EVMWordSignedBigInt(val *big.Int) ([]byte, error) + func EVMWordUint128(val *big.Int) ([]byte, error) + func EVMWordUint64(val uint64) []byte + func EnsureDirAndMaxPerms(path string, perms os.FileMode) error + func EnsureFileMaxPerms(file *os.File, perms os.FileMode) error + func EnsureFilepathMaxPerms(filepath string, perms os.FileMode) error + func FileContents(path string) (string, error) + func FileExists(name string) bool + func FilesInDir(dir string) ([]string, error) + func FormatJSON(v interface{}) ([]byte, error) + func HasHexPrefix(str string) bool + func HashPassword(password string) (string, error) + func HexToBig(s string) *big.Int + func HexToUint256(s string) (*big.Int, error) + func ISO8601UTC(t time.Time) string + func IsEmpty(bytes []byte) bool + func IsEmptyAddress(addr common.Address) bool + func IsFileOwnedByChainlink(fileInfo os.FileInfo) (bool, error) + func IsQuoted(input []byte) bool + func JustError(_ interface{}, err error) error + func Keccak256(in []byte) ([]byte, error) + func LogIfError(err *error, msg string) + func LogListeningAddress(address common.Address) string + func MaxBigs(first *big.Int, bigs ...*big.Int) *big.Int + func MaxInt(first int, ints ...int) int + func MaxUint32(first uint32, uints ...uint32) uint32 + func MinUint(first uint, vals ...uint) uint + func MustHash(in string) common.Hash + func MustUnmarshalToMap(input string) map[string]interface + func NewBytes32ID() string + func NewSecret(n int) string + func NormalizedJSON(val []byte) (string, error) + func NullISO8601UTC(t null.Time) string + func ParseEthereumAddress(addressString string) (common.Address, error) + func RemoveHexPrefix(str string) string + func RemoveQuotes(input []byte) []byte + func RetryWithBackoff(ctx context.Context, fn func() (retry bool)) + func ReverseString(s string) string + func Sha256(in string) (string, error) + func StringToHex(in string) string + func StripBearer(authorizationStr string) string + func ToDecimal(input interface{}) (decimal.Decimal, error) + func TooPermissive(fileMode, maxAllowedPerms os.FileMode) bool + func Uint256ToBytes(x *big.Int) (uint256 []byte, err error) + func Uint256ToBytes32(n *big.Int) []byte + func Uint256ToHex(n *big.Int) (string, error) + func Uint64ToHex(i uint64) string + func UnmarshalToMap(input string) (map[string]interface{}, error) + func WaitGroupChan(wg *sync.WaitGroup) <-chan struct + func WithJitter(d time.Duration) time.Duration + func WithoutZeroAddresses(addresses []common.Address) []common.Address + func WrapIfError(err *error, msg string) + func WriteFileWithMaxPerms(path string, data []byte, perms os.FileMode) error + type AfterNower interface + After func(d time.Duration) <-chan time.Time + Now func() time.Time + type Afterer interface + After func(d time.Duration) <-chan time.Time + type BackoffSleeper struct + func NewBackoffSleeper() *BackoffSleeper + func (bs *BackoffSleeper) After() time.Duration + func (bs *BackoffSleeper) Duration() time.Duration + func (bs *BackoffSleeper) Reset() + func (bs *BackoffSleeper) Sleep() + type BackoffTicker struct + C chan time.Time + func NewBackoffTicker(min, max time.Duration) BackoffTicker + func (t *BackoffTicker) Bounds() (time.Duration, time.Duration) + func (t *BackoffTicker) Start() bool + func (t *BackoffTicker) Stop() bool + func (t *BackoffTicker) Ticks() <-chan time.Time + type Big big.Int + func NewBig(i *big.Int) *Big + func NewBigI(i int64) *Big + func (b *Big) Hex() string + func (b *Big) MarshalJSON() ([]byte, error) + func (b *Big) MarshalText() ([]byte, error) + func (b *Big) Scan(value interface{}) error + func (b *Big) String() string + func (b *Big) ToInt() *big.Int + func (b *Big) UnmarshalJSON(input []byte) error + func (b *Big) UnmarshalText(input []byte) error + func (b Big) Value() (driver.Value, error) + type BigFloat big.Float + func (b *BigFloat) UnmarshalJSON(buf []byte) error + func (b *BigFloat) Value() *big.Float + func (b BigFloat) MarshalJSON() ([]byte, error) + type BigIntSlice []*big.Int + func (s BigIntSlice) Len() int + func (s BigIntSlice) Less(i, j int) bool + func (s BigIntSlice) Max() *big.Int + func (s BigIntSlice) Min() *big.Int + func (s BigIntSlice) Sort() + func (s BigIntSlice) Swap(i, j int) + type BoundedPriorityQueue struct + func NewBoundedPriorityQueue(capacities map[uint]uint) *BoundedPriorityQueue + func (q *BoundedPriorityQueue) Add(priority uint, x interface{}) + func (q *BoundedPriorityQueue) Empty() bool + func (q *BoundedPriorityQueue) Take() interface{} + type BoundedQueue struct + func NewBoundedQueue(capacity uint) *BoundedQueue + func (q *BoundedQueue) Add(x interface{}) + func (q *BoundedQueue) Empty() bool + func (q *BoundedQueue) Full() bool + func (q *BoundedQueue) Take() interface{} + type Clock struct + func (Clock) After(d time.Duration) <-chan time.Time + func (Clock) Now() time.Time + type DependentAwaiter interface + AddDependents func(n int) + AwaitDependents func() <-chan struct{} + DependentReady func() + func NewDependentAwaiter() DependentAwaiter + type HTTPRequest struct + Config HTTPRequestConfig + Request *http.Request + func (h *HTTPRequest) SendRequest(ctx context.Context) (responseBody []byte, statusCode int, err error) + type HTTPRequestConfig struct + AllowUnrestrictedNetworkAccess bool + MaxAttempts uint + SizeLimit int64 + Timeout time.Duration + type HTTPResponseTooLargeError struct + func (e *HTTPResponseTooLargeError) Error() string + type KeyedMutex struct + func (m *KeyedMutex) LockInt64(key int64) func() + type Mailbox struct + func NewMailbox(capacity uint64) *Mailbox + func (m *Mailbox) Deliver(x interface{}) (wasOverCapacity bool) + func (m *Mailbox) Notify() chan struct{} + func (m *Mailbox) Retrieve() (interface{}, bool) + func (m *Mailbox) RetrieveLatestAndClear() interface{} + type MaxBytesReader struct + func NewMaxBytesReader(rc io.ReadCloser, limit int64) *MaxBytesReader + func (mbr *MaxBytesReader) Close() error + func (mbr *MaxBytesReader) Read(p []byte) (n int, err error) + type Nower interface + Now func() time.Time + type PausableTicker struct + func NewPausableTicker(duration time.Duration) PausableTicker + func (t *PausableTicker) Destroy() + func (t *PausableTicker) Pause() + func (t *PausableTicker) Resume() + func (t PausableTicker) Ticks() <-chan time.Time + type RemoteServerError struct + func (e *RemoteServerError) Error() string + type ResettableTimer struct + func NewResettableTimer() ResettableTimer + func (t *ResettableTimer) Reset(duration time.Duration) + func (t *ResettableTimer) Stop() + func (t ResettableTimer) Ticks() <-chan time.Time + type ScryptConfigReader interface + InsecureFastScrypt func() bool + type ScryptParams struct + N int + P int + func GetScryptParams(config ScryptConfigReader) ScryptParams + type Sleeper interface + After func() time.Duration + Duration func() time.Duration + Reset func() + Sleep func() + type SleeperTask interface + Stop func() error + WakeUp func() + WakeUpIfStarted func() + func NewSleeperTask(worker Worker) SleeperTask + type SleeperTaskFuncWorker func() + func (fn SleeperTaskFuncWorker) Work() + type StartStopOnce struct + func (once *StartStopOnce) Healthy() error + func (once *StartStopOnce) IfStarted(f func()) (ok bool) + func (once *StartStopOnce) Ready() error + func (once *StartStopOnce) StartOnce(name string, fn func() error) error + func (once *StartStopOnce) State() StartStopOnceState + func (once *StartStopOnce) StopOnce(name string, fn func() error) error + type StartStopOnceState int32 + const StartStopOnce_Started + const StartStopOnce_Starting + const StartStopOnce_Stopped + const StartStopOnce_Stopping + const StartStopOnce_Unstarted + type Worker interface + Work func()