Keys.go raw

   1  // Code generated by mockery; DO NOT EDIT.
   2  // github.com/vektra/mockery
   3  // template: testify
   4  
   5  package mocks
   6  
   7  import (
   8  	"github.com/btcsuite/btcd/btcec/v2"
   9  	"github.com/getAlby/hub/config"
  10  	mock "github.com/stretchr/testify/mock"
  11  	"github.com/tyler-smith/go-bip32"
  12  )
  13  
  14  // NewMockKeys creates a new instance of MockKeys. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  15  // The first argument is typically a *testing.T value.
  16  func NewMockKeys(t interface {
  17  	mock.TestingT
  18  	Cleanup(func())
  19  }) *MockKeys {
  20  	mock := &MockKeys{}
  21  	mock.Mock.Test(t)
  22  
  23  	t.Cleanup(func() { mock.AssertExpectations(t) })
  24  
  25  	return mock
  26  }
  27  
  28  // MockKeys is an autogenerated mock type for the Keys type
  29  type MockKeys struct {
  30  	mock.Mock
  31  }
  32  
  33  type MockKeys_Expecter struct {
  34  	mock *mock.Mock
  35  }
  36  
  37  func (_m *MockKeys) EXPECT() *MockKeys_Expecter {
  38  	return &MockKeys_Expecter{mock: &_m.Mock}
  39  }
  40  
  41  // DeriveKey provides a mock function for the type MockKeys
  42  func (_mock *MockKeys) DeriveKey(path []uint32) (*bip32.Key, error) {
  43  	ret := _mock.Called(path)
  44  
  45  	if len(ret) == 0 {
  46  		panic("no return value specified for DeriveKey")
  47  	}
  48  
  49  	var r0 *bip32.Key
  50  	var r1 error
  51  	if returnFunc, ok := ret.Get(0).(func([]uint32) (*bip32.Key, error)); ok {
  52  		return returnFunc(path)
  53  	}
  54  	if returnFunc, ok := ret.Get(0).(func([]uint32) *bip32.Key); ok {
  55  		r0 = returnFunc(path)
  56  	} else {
  57  		if ret.Get(0) != nil {
  58  			r0 = ret.Get(0).(*bip32.Key)
  59  		}
  60  	}
  61  	if returnFunc, ok := ret.Get(1).(func([]uint32) error); ok {
  62  		r1 = returnFunc(path)
  63  	} else {
  64  		r1 = ret.Error(1)
  65  	}
  66  	return r0, r1
  67  }
  68  
  69  // MockKeys_DeriveKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveKey'
  70  type MockKeys_DeriveKey_Call struct {
  71  	*mock.Call
  72  }
  73  
  74  // DeriveKey is a helper method to define mock.On call
  75  //   - path []uint32
  76  func (_e *MockKeys_Expecter) DeriveKey(path interface{}) *MockKeys_DeriveKey_Call {
  77  	return &MockKeys_DeriveKey_Call{Call: _e.mock.On("DeriveKey", path)}
  78  }
  79  
  80  func (_c *MockKeys_DeriveKey_Call) Run(run func(path []uint32)) *MockKeys_DeriveKey_Call {
  81  	_c.Call.Run(func(args mock.Arguments) {
  82  		var arg0 []uint32
  83  		if args[0] != nil {
  84  			arg0 = args[0].([]uint32)
  85  		}
  86  		run(
  87  			arg0,
  88  		)
  89  	})
  90  	return _c
  91  }
  92  
  93  func (_c *MockKeys_DeriveKey_Call) Return(key *bip32.Key, err error) *MockKeys_DeriveKey_Call {
  94  	_c.Call.Return(key, err)
  95  	return _c
  96  }
  97  
  98  func (_c *MockKeys_DeriveKey_Call) RunAndReturn(run func(path []uint32) (*bip32.Key, error)) *MockKeys_DeriveKey_Call {
  99  	_c.Call.Return(run)
 100  	return _c
 101  }
 102  
 103  // GetAppWalletKey provides a mock function for the type MockKeys
 104  func (_mock *MockKeys) GetAppWalletKey(childIndex uint) (string, error) {
 105  	ret := _mock.Called(childIndex)
 106  
 107  	if len(ret) == 0 {
 108  		panic("no return value specified for GetAppWalletKey")
 109  	}
 110  
 111  	var r0 string
 112  	var r1 error
 113  	if returnFunc, ok := ret.Get(0).(func(uint) (string, error)); ok {
 114  		return returnFunc(childIndex)
 115  	}
 116  	if returnFunc, ok := ret.Get(0).(func(uint) string); ok {
 117  		r0 = returnFunc(childIndex)
 118  	} else {
 119  		r0 = ret.Get(0).(string)
 120  	}
 121  	if returnFunc, ok := ret.Get(1).(func(uint) error); ok {
 122  		r1 = returnFunc(childIndex)
 123  	} else {
 124  		r1 = ret.Error(1)
 125  	}
 126  	return r0, r1
 127  }
 128  
 129  // MockKeys_GetAppWalletKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAppWalletKey'
 130  type MockKeys_GetAppWalletKey_Call struct {
 131  	*mock.Call
 132  }
 133  
 134  // GetAppWalletKey is a helper method to define mock.On call
 135  //   - childIndex uint
 136  func (_e *MockKeys_Expecter) GetAppWalletKey(childIndex interface{}) *MockKeys_GetAppWalletKey_Call {
 137  	return &MockKeys_GetAppWalletKey_Call{Call: _e.mock.On("GetAppWalletKey", childIndex)}
 138  }
 139  
 140  func (_c *MockKeys_GetAppWalletKey_Call) Run(run func(childIndex uint)) *MockKeys_GetAppWalletKey_Call {
 141  	_c.Call.Run(func(args mock.Arguments) {
 142  		var arg0 uint
 143  		if args[0] != nil {
 144  			arg0 = args[0].(uint)
 145  		}
 146  		run(
 147  			arg0,
 148  		)
 149  	})
 150  	return _c
 151  }
 152  
 153  func (_c *MockKeys_GetAppWalletKey_Call) Return(s string, err error) *MockKeys_GetAppWalletKey_Call {
 154  	_c.Call.Return(s, err)
 155  	return _c
 156  }
 157  
 158  func (_c *MockKeys_GetAppWalletKey_Call) RunAndReturn(run func(childIndex uint) (string, error)) *MockKeys_GetAppWalletKey_Call {
 159  	_c.Call.Return(run)
 160  	return _c
 161  }
 162  
 163  // GetNostrPublicKey provides a mock function for the type MockKeys
 164  func (_mock *MockKeys) GetNostrPublicKey() string {
 165  	ret := _mock.Called()
 166  
 167  	if len(ret) == 0 {
 168  		panic("no return value specified for GetNostrPublicKey")
 169  	}
 170  
 171  	var r0 string
 172  	if returnFunc, ok := ret.Get(0).(func() string); ok {
 173  		r0 = returnFunc()
 174  	} else {
 175  		r0 = ret.Get(0).(string)
 176  	}
 177  	return r0
 178  }
 179  
 180  // MockKeys_GetNostrPublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNostrPublicKey'
 181  type MockKeys_GetNostrPublicKey_Call struct {
 182  	*mock.Call
 183  }
 184  
 185  // GetNostrPublicKey is a helper method to define mock.On call
 186  func (_e *MockKeys_Expecter) GetNostrPublicKey() *MockKeys_GetNostrPublicKey_Call {
 187  	return &MockKeys_GetNostrPublicKey_Call{Call: _e.mock.On("GetNostrPublicKey")}
 188  }
 189  
 190  func (_c *MockKeys_GetNostrPublicKey_Call) Run(run func()) *MockKeys_GetNostrPublicKey_Call {
 191  	_c.Call.Run(func(args mock.Arguments) {
 192  		run()
 193  	})
 194  	return _c
 195  }
 196  
 197  func (_c *MockKeys_GetNostrPublicKey_Call) Return(s string) *MockKeys_GetNostrPublicKey_Call {
 198  	_c.Call.Return(s)
 199  	return _c
 200  }
 201  
 202  func (_c *MockKeys_GetNostrPublicKey_Call) RunAndReturn(run func() string) *MockKeys_GetNostrPublicKey_Call {
 203  	_c.Call.Return(run)
 204  	return _c
 205  }
 206  
 207  // GetNostrSecretKey provides a mock function for the type MockKeys
 208  func (_mock *MockKeys) GetNostrSecretKey() string {
 209  	ret := _mock.Called()
 210  
 211  	if len(ret) == 0 {
 212  		panic("no return value specified for GetNostrSecretKey")
 213  	}
 214  
 215  	var r0 string
 216  	if returnFunc, ok := ret.Get(0).(func() string); ok {
 217  		r0 = returnFunc()
 218  	} else {
 219  		r0 = ret.Get(0).(string)
 220  	}
 221  	return r0
 222  }
 223  
 224  // MockKeys_GetNostrSecretKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNostrSecretKey'
 225  type MockKeys_GetNostrSecretKey_Call struct {
 226  	*mock.Call
 227  }
 228  
 229  // GetNostrSecretKey is a helper method to define mock.On call
 230  func (_e *MockKeys_Expecter) GetNostrSecretKey() *MockKeys_GetNostrSecretKey_Call {
 231  	return &MockKeys_GetNostrSecretKey_Call{Call: _e.mock.On("GetNostrSecretKey")}
 232  }
 233  
 234  func (_c *MockKeys_GetNostrSecretKey_Call) Run(run func()) *MockKeys_GetNostrSecretKey_Call {
 235  	_c.Call.Run(func(args mock.Arguments) {
 236  		run()
 237  	})
 238  	return _c
 239  }
 240  
 241  func (_c *MockKeys_GetNostrSecretKey_Call) Return(s string) *MockKeys_GetNostrSecretKey_Call {
 242  	_c.Call.Return(s)
 243  	return _c
 244  }
 245  
 246  func (_c *MockKeys_GetNostrSecretKey_Call) RunAndReturn(run func() string) *MockKeys_GetNostrSecretKey_Call {
 247  	_c.Call.Return(run)
 248  	return _c
 249  }
 250  
 251  // GetSwapKey provides a mock function for the type MockKeys
 252  func (_mock *MockKeys) GetSwapKey(childIndex uint) (*btcec.PrivateKey, error) {
 253  	ret := _mock.Called(childIndex)
 254  
 255  	if len(ret) == 0 {
 256  		panic("no return value specified for GetSwapKey")
 257  	}
 258  
 259  	var r0 *btcec.PrivateKey
 260  	var r1 error
 261  	if returnFunc, ok := ret.Get(0).(func(uint) (*btcec.PrivateKey, error)); ok {
 262  		return returnFunc(childIndex)
 263  	}
 264  	if returnFunc, ok := ret.Get(0).(func(uint) *btcec.PrivateKey); ok {
 265  		r0 = returnFunc(childIndex)
 266  	} else {
 267  		if ret.Get(0) != nil {
 268  			r0 = ret.Get(0).(*btcec.PrivateKey)
 269  		}
 270  	}
 271  	if returnFunc, ok := ret.Get(1).(func(uint) error); ok {
 272  		r1 = returnFunc(childIndex)
 273  	} else {
 274  		r1 = ret.Error(1)
 275  	}
 276  	return r0, r1
 277  }
 278  
 279  // MockKeys_GetSwapKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSwapKey'
 280  type MockKeys_GetSwapKey_Call struct {
 281  	*mock.Call
 282  }
 283  
 284  // GetSwapKey is a helper method to define mock.On call
 285  //   - childIndex uint
 286  func (_e *MockKeys_Expecter) GetSwapKey(childIndex interface{}) *MockKeys_GetSwapKey_Call {
 287  	return &MockKeys_GetSwapKey_Call{Call: _e.mock.On("GetSwapKey", childIndex)}
 288  }
 289  
 290  func (_c *MockKeys_GetSwapKey_Call) Run(run func(childIndex uint)) *MockKeys_GetSwapKey_Call {
 291  	_c.Call.Run(func(args mock.Arguments) {
 292  		var arg0 uint
 293  		if args[0] != nil {
 294  			arg0 = args[0].(uint)
 295  		}
 296  		run(
 297  			arg0,
 298  		)
 299  	})
 300  	return _c
 301  }
 302  
 303  func (_c *MockKeys_GetSwapKey_Call) Return(v *btcec.PrivateKey, err error) *MockKeys_GetSwapKey_Call {
 304  	_c.Call.Return(v, err)
 305  	return _c
 306  }
 307  
 308  func (_c *MockKeys_GetSwapKey_Call) RunAndReturn(run func(childIndex uint) (*btcec.PrivateKey, error)) *MockKeys_GetSwapKey_Call {
 309  	_c.Call.Return(run)
 310  	return _c
 311  }
 312  
 313  // GetSwapMnemonic provides a mock function for the type MockKeys
 314  func (_mock *MockKeys) GetSwapMnemonic() string {
 315  	ret := _mock.Called()
 316  
 317  	if len(ret) == 0 {
 318  		panic("no return value specified for GetSwapMnemonic")
 319  	}
 320  
 321  	var r0 string
 322  	if returnFunc, ok := ret.Get(0).(func() string); ok {
 323  		r0 = returnFunc()
 324  	} else {
 325  		r0 = ret.Get(0).(string)
 326  	}
 327  	return r0
 328  }
 329  
 330  // MockKeys_GetSwapMnemonic_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSwapMnemonic'
 331  type MockKeys_GetSwapMnemonic_Call struct {
 332  	*mock.Call
 333  }
 334  
 335  // GetSwapMnemonic is a helper method to define mock.On call
 336  func (_e *MockKeys_Expecter) GetSwapMnemonic() *MockKeys_GetSwapMnemonic_Call {
 337  	return &MockKeys_GetSwapMnemonic_Call{Call: _e.mock.On("GetSwapMnemonic")}
 338  }
 339  
 340  func (_c *MockKeys_GetSwapMnemonic_Call) Run(run func()) *MockKeys_GetSwapMnemonic_Call {
 341  	_c.Call.Run(func(args mock.Arguments) {
 342  		run()
 343  	})
 344  	return _c
 345  }
 346  
 347  func (_c *MockKeys_GetSwapMnemonic_Call) Return(s string) *MockKeys_GetSwapMnemonic_Call {
 348  	_c.Call.Return(s)
 349  	return _c
 350  }
 351  
 352  func (_c *MockKeys_GetSwapMnemonic_Call) RunAndReturn(run func() string) *MockKeys_GetSwapMnemonic_Call {
 353  	_c.Call.Return(run)
 354  	return _c
 355  }
 356  
 357  // Init provides a mock function for the type MockKeys
 358  func (_mock *MockKeys) Init(cfg config.Config, encryptionKey string) error {
 359  	ret := _mock.Called(cfg, encryptionKey)
 360  
 361  	if len(ret) == 0 {
 362  		panic("no return value specified for Init")
 363  	}
 364  
 365  	var r0 error
 366  	if returnFunc, ok := ret.Get(0).(func(config.Config, string) error); ok {
 367  		r0 = returnFunc(cfg, encryptionKey)
 368  	} else {
 369  		r0 = ret.Error(0)
 370  	}
 371  	return r0
 372  }
 373  
 374  // MockKeys_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'
 375  type MockKeys_Init_Call struct {
 376  	*mock.Call
 377  }
 378  
 379  // Init is a helper method to define mock.On call
 380  //   - cfg config.Config
 381  //   - encryptionKey string
 382  func (_e *MockKeys_Expecter) Init(cfg interface{}, encryptionKey interface{}) *MockKeys_Init_Call {
 383  	return &MockKeys_Init_Call{Call: _e.mock.On("Init", cfg, encryptionKey)}
 384  }
 385  
 386  func (_c *MockKeys_Init_Call) Run(run func(cfg config.Config, encryptionKey string)) *MockKeys_Init_Call {
 387  	_c.Call.Run(func(args mock.Arguments) {
 388  		var arg0 config.Config
 389  		if args[0] != nil {
 390  			arg0 = args[0].(config.Config)
 391  		}
 392  		var arg1 string
 393  		if args[1] != nil {
 394  			arg1 = args[1].(string)
 395  		}
 396  		run(
 397  			arg0,
 398  			arg1,
 399  		)
 400  	})
 401  	return _c
 402  }
 403  
 404  func (_c *MockKeys_Init_Call) Return(err error) *MockKeys_Init_Call {
 405  	_c.Call.Return(err)
 406  	return _c
 407  }
 408  
 409  func (_c *MockKeys_Init_Call) RunAndReturn(run func(cfg config.Config, encryptionKey string) error) *MockKeys_Init_Call {
 410  	_c.Call.Return(run)
 411  	return _c
 412  }
 413