fx

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package fx is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaminoFx

type CaminoFx interface {
	// Recovers signers addresses from [credentials] for [msg] bytes (e.g. transaction bytes)
	RecoverAddresses(msg []byte, credentials []verify.Verifiable) (secp256k1fx.RecoverMap, error)

	// Verifies that Multisig aliases are on inputs are only used in supported hierarchy
	VerifyMultisigOwner(ownerIntf, msigIntf interface{}) error

	// Verifies that Multisig aliases are on inputs are only used in supported hierarchy
	VerifyMultisigOutputOwner(outIntf, msigIntf interface{}) error

	// VerifyMultisigTransfer verifies that the specified transaction can spend the
	// provided utxo with no restrictions on the destination. If the transaction
	// can't spend the output based on the input and credential, a non-nil error
	// should be returned. Multisig aliases supported.
	VerifyMultisigTransfer(txIntf, inIntf, credIntf, utxoIntf, msigIntf interface{}) error

	// VerifyMultisigPermission returns nil if credential [credIntf] proves that [controlGroup] assents to transaction [utx].
	// Multisig aliases supported.
	VerifyMultisigPermission(txIntf, inIntf, credIntf, controlGroup, msigIntf interface{}) error

	// VerifyMultisigMessage returns nil if credential [credIntf] proves that [controlGroup] signed [msgBytes].
	// Multisig aliases supported.
	VerifyMultisigMessage(msgBytes []byte, inIntf, credIntf, controlGroup, msigIntf interface{}) error

	// CollectMultisigAliases returns an array of OutputOwners part of the owner
	CollectMultisigAliases(ownerIntf, msigIntf interface{}) ([]interface{}, error)

	// Checks if [ownerIntf] contains msig alias
	IsNestedMultisig(ownerIntf interface{}, msigIntf interface{}) (bool, error)
}

type Fx

type Fx interface {
	// Initialize this feature extension to be running under this VM. Should
	// return an error if the VM is incompatible.
	Initialize(vm interface{}) error

	// Notify this Fx that the VM is in bootstrapping
	Bootstrapping() error

	// Notify this Fx that the VM is bootstrapped
	Bootstrapped() error

	// VerifyTransfer verifies that the specified transaction can spend the
	// provided utxo with no restrictions on the destination. If the transaction
	// can't spend the output based on the input and credential, a non-nil error
	// should be returned.
	VerifyTransfer(tx, in, cred, utxo interface{}) error

	// VerifyPermission returns nil iff [cred] proves that [controlGroup]
	// assents to [tx]
	VerifyPermission(tx, in, cred, controlGroup interface{}) error

	// CreateOutput creates a new output with the provided control group worth
	// the specified amount
	CreateOutput(amount uint64, controlGroup interface{}) (interface{}, error)
	CaminoFx
}

Fx is the interface a feature extension must implement to support the Platform Chain.

type MockFx

type MockFx struct {
	// contains filtered or unexported fields
}

MockFx is a mock of Fx interface.

func NewMockFx

func NewMockFx(ctrl *gomock.Controller) *MockFx

NewMockFx creates a new mock instance.

func (*MockFx) Bootstrapped

func (m *MockFx) Bootstrapped() error

Bootstrapped mocks base method.

func (*MockFx) Bootstrapping

func (m *MockFx) Bootstrapping() error

Bootstrapping mocks base method.

func (*MockFx) CollectMultisigAliases

func (m *MockFx) CollectMultisigAliases(arg0, arg1 interface{}) ([]interface{}, error)

CollectMultisigAliases mocks base method.

func (*MockFx) CreateOutput

func (m *MockFx) CreateOutput(arg0 uint64, arg1 interface{}) (interface{}, error)

CreateOutput mocks base method.

func (*MockFx) EXPECT

func (m *MockFx) EXPECT() *MockFxMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockFx) Initialize

func (m *MockFx) Initialize(arg0 interface{}) error

Initialize mocks base method.

func (*MockFx) IsNestedMultisig

func (m *MockFx) IsNestedMultisig(arg0, arg1 interface{}) (bool, error)

IsNestedMultisig mocks base method.

func (*MockFx) RecoverAddresses

func (m *MockFx) RecoverAddresses(arg0 []byte, arg1 []verify.Verifiable) (secp256k1fx.RecoverMap, error)

RecoverAddresses mocks base method.

func (*MockFx) VerifyMultisigMessage

func (m *MockFx) VerifyMultisigMessage(arg0 []byte, arg1, arg2, arg3, arg4 interface{}) error

VerifyMultisigMessage mocks base method.

func (*MockFx) VerifyMultisigOutputOwner

func (m *MockFx) VerifyMultisigOutputOwner(arg0, arg1 interface{}) error

VerifyMultisigOutputOwner mocks base method.

func (*MockFx) VerifyMultisigOwner

func (m *MockFx) VerifyMultisigOwner(arg0, arg1 interface{}) error

VerifyMultisigOwner mocks base method.

func (*MockFx) VerifyMultisigPermission

func (m *MockFx) VerifyMultisigPermission(arg0, arg1, arg2, arg3, arg4 interface{}) error

VerifyMultisigPermission mocks base method.

func (*MockFx) VerifyMultisigTransfer

func (m *MockFx) VerifyMultisigTransfer(arg0, arg1, arg2, arg3, arg4 interface{}) error

VerifyMultisigTransfer mocks base method.

func (*MockFx) VerifyPermission

func (m *MockFx) VerifyPermission(arg0, arg1, arg2, arg3 interface{}) error

VerifyPermission mocks base method.

func (*MockFx) VerifyTransfer

func (m *MockFx) VerifyTransfer(arg0, arg1, arg2, arg3 interface{}) error

VerifyTransfer mocks base method.

type MockFxMockRecorder

type MockFxMockRecorder struct {
	// contains filtered or unexported fields
}

MockFxMockRecorder is the mock recorder for MockFx.

func (*MockFxMockRecorder) Bootstrapped

func (mr *MockFxMockRecorder) Bootstrapped() *gomock.Call

Bootstrapped indicates an expected call of Bootstrapped.

func (*MockFxMockRecorder) Bootstrapping

func (mr *MockFxMockRecorder) Bootstrapping() *gomock.Call

Bootstrapping indicates an expected call of Bootstrapping.

func (*MockFxMockRecorder) CollectMultisigAliases

func (mr *MockFxMockRecorder) CollectMultisigAliases(arg0, arg1 interface{}) *gomock.Call

CollectMultisigAliases indicates an expected call of CollectMultisigAliases.

func (*MockFxMockRecorder) CreateOutput

func (mr *MockFxMockRecorder) CreateOutput(arg0, arg1 interface{}) *gomock.Call

CreateOutput indicates an expected call of CreateOutput.

func (*MockFxMockRecorder) Initialize

func (mr *MockFxMockRecorder) Initialize(arg0 interface{}) *gomock.Call

Initialize indicates an expected call of Initialize.

func (*MockFxMockRecorder) IsNestedMultisig

func (mr *MockFxMockRecorder) IsNestedMultisig(arg0, arg1 interface{}) *gomock.Call

IsNestedMultisig indicates an expected call of IsNestedMultisig.

func (*MockFxMockRecorder) RecoverAddresses

func (mr *MockFxMockRecorder) RecoverAddresses(arg0, arg1 interface{}) *gomock.Call

RecoverAddresses indicates an expected call of RecoverAddresses.

func (*MockFxMockRecorder) VerifyMultisigMessage

func (mr *MockFxMockRecorder) VerifyMultisigMessage(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

VerifyMultisigMessage indicates an expected call of VerifyMultisigMessage.

func (*MockFxMockRecorder) VerifyMultisigOutputOwner

func (mr *MockFxMockRecorder) VerifyMultisigOutputOwner(arg0, arg1 interface{}) *gomock.Call

VerifyMultisigOutputOwner indicates an expected call of VerifyMultisigOutputOwner.

func (*MockFxMockRecorder) VerifyMultisigOwner

func (mr *MockFxMockRecorder) VerifyMultisigOwner(arg0, arg1 interface{}) *gomock.Call

VerifyMultisigOwner indicates an expected call of VerifyMultisigOwner.

func (*MockFxMockRecorder) VerifyMultisigPermission

func (mr *MockFxMockRecorder) VerifyMultisigPermission(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

VerifyMultisigPermission indicates an expected call of VerifyMultisigPermission.

func (*MockFxMockRecorder) VerifyMultisigTransfer

func (mr *MockFxMockRecorder) VerifyMultisigTransfer(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

VerifyMultisigTransfer indicates an expected call of VerifyMultisigTransfer.

func (*MockFxMockRecorder) VerifyPermission

func (mr *MockFxMockRecorder) VerifyPermission(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

VerifyPermission indicates an expected call of VerifyPermission.

func (*MockFxMockRecorder) VerifyTransfer

func (mr *MockFxMockRecorder) VerifyTransfer(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

VerifyTransfer indicates an expected call of VerifyTransfer.

type MockOwner

type MockOwner struct {
	// contains filtered or unexported fields
}

MockOwner is a mock of Owner interface.

func NewMockOwner

func NewMockOwner(ctrl *gomock.Controller) *MockOwner

NewMockOwner creates a new mock instance.

func (*MockOwner) EXPECT

func (m *MockOwner) EXPECT() *MockOwnerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOwner) InitCtx

func (m *MockOwner) InitCtx(arg0 *snow.Context)

InitCtx mocks base method.

func (*MockOwner) Verify

func (m *MockOwner) Verify() error

Verify mocks base method.

type MockOwnerMockRecorder

type MockOwnerMockRecorder struct {
	// contains filtered or unexported fields
}

MockOwnerMockRecorder is the mock recorder for MockOwner.

func (*MockOwnerMockRecorder) InitCtx

func (mr *MockOwnerMockRecorder) InitCtx(arg0 interface{}) *gomock.Call

InitCtx indicates an expected call of InitCtx.

func (*MockOwnerMockRecorder) Verify

func (mr *MockOwnerMockRecorder) Verify() *gomock.Call

Verify indicates an expected call of Verify.

type Owned

type Owned interface {
	Owners() interface{}
}

type Owner

type Owner interface {
	verify.Verifiable
	snow.ContextInitializable
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL