Help us shape the future of Go! Take the 2026 Go Developer Survey

fx

package
v1.30.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: BSD-3-Clause Imports: 6 Imported by: 1

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 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

	// VerifyOperation verifies that [tx] can perform [op] against [utxos]
	// using [cred] for authorisation. Mirrors the XVM contract — the
	// concrete secp256k1fx.Fx satisfies both interfaces identically, so the
	// same per-Op authorisation logic protects P-Chain assets.
	VerifyOperation(tx, op, cred interface{}, utxos []interface{}) error

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

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

type MockFx added in v1.1.11

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

MockFx is a mock of Fx interface.

func NewMockFx added in v1.1.11

func NewMockFx(ctrl *gomock.Controller) *MockFx

NewMockFx creates a new mock instance.

func (*MockFx) Bootstrapped added in v1.1.11

func (m *MockFx) Bootstrapped() error

Bootstrapped mocks base method.

func (*MockFx) Bootstrapping added in v1.1.11

func (m *MockFx) Bootstrapping() error

Bootstrapping mocks base method.

func (*MockFx) CreateOutput added in v1.1.11

func (m *MockFx) CreateOutput(arg0 uint64, arg1 any) (any, error)

CreateOutput mocks base method.

func (*MockFx) EXPECT added in v1.1.11

func (m *MockFx) EXPECT() *MockFxMockRecorder

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

func (*MockFx) Initialize added in v1.1.11

func (m *MockFx) Initialize(arg0 any) error

Initialize mocks base method.

func (*MockFx) VerifyOperation added in v1.26.25

func (m *MockFx) VerifyOperation(arg0, arg1, arg2 any, arg3 []any) error

VerifyOperation mocks base method.

func (*MockFx) VerifyPermission added in v1.1.11

func (m *MockFx) VerifyPermission(arg0, arg1, arg2, arg3 any) error

VerifyPermission mocks base method.

func (*MockFx) VerifyTransfer added in v1.1.11

func (m *MockFx) VerifyTransfer(arg0, arg1, arg2, arg3 any) error

VerifyTransfer mocks base method.

type MockFxMockRecorder added in v1.1.11

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

MockFxMockRecorder is the mock recorder for MockFx.

func (*MockFxMockRecorder) Bootstrapped added in v1.1.11

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

Bootstrapped indicates an expected call of Bootstrapped.

func (*MockFxMockRecorder) Bootstrapping added in v1.1.11

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

Bootstrapping indicates an expected call of Bootstrapping.

func (*MockFxMockRecorder) CreateOutput added in v1.1.11

func (mr *MockFxMockRecorder) CreateOutput(arg0, arg1 any) *gomock.Call

CreateOutput indicates an expected call of CreateOutput.

func (*MockFxMockRecorder) Initialize added in v1.1.11

func (mr *MockFxMockRecorder) Initialize(arg0 any) *gomock.Call

Initialize indicates an expected call of Initialize.

func (*MockFxMockRecorder) VerifyOperation added in v1.26.25

func (mr *MockFxMockRecorder) VerifyOperation(arg0, arg1, arg2, arg3 any) *gomock.Call

VerifyOperation indicates an expected call of VerifyOperation.

func (*MockFxMockRecorder) VerifyPermission added in v1.1.11

func (mr *MockFxMockRecorder) VerifyPermission(arg0, arg1, arg2, arg3 any) *gomock.Call

VerifyPermission indicates an expected call of VerifyPermission.

func (*MockFxMockRecorder) VerifyTransfer added in v1.1.11

func (mr *MockFxMockRecorder) VerifyTransfer(arg0, arg1, arg2, arg3 any) *gomock.Call

VerifyTransfer indicates an expected call of VerifyTransfer.

type MockOwner added in v1.1.11

type MockOwner struct {
	verify.IsNotState
	// contains filtered or unexported fields
}

MockOwner is a mock of Owner interface.

func NewMockOwner added in v1.1.11

func NewMockOwner(ctrl *gomock.Controller) *MockOwner

NewMockOwner creates a new mock instance.

func (*MockOwner) EXPECT added in v1.1.11

func (m *MockOwner) EXPECT() *MockOwnerMockRecorder

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

func (*MockOwner) InitRuntime added in v1.22.87

func (m *MockOwner) InitRuntime(arg0 *runtime.Runtime)

InitRuntime mocks base method.

func (*MockOwner) InitializeRuntime added in v1.22.87

func (m *MockOwner) InitializeRuntime(arg0 context.Context) error

InitializeRuntime mocks base method (delegates to InitRuntime for compatibility).

func (*MockOwner) Verify added in v1.1.11

func (m *MockOwner) Verify() error

Verify mocks base method.

type MockOwnerMockRecorder added in v1.1.11

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

MockOwnerMockRecorder is the mock recorder for MockOwner.

func (*MockOwnerMockRecorder) InitRuntime added in v1.22.87

func (mr *MockOwnerMockRecorder) InitRuntime(arg0 any) *gomock.Call

InitRuntime indicates an expected call of InitRuntime.

func (*MockOwnerMockRecorder) InitializeRuntime added in v1.22.87

func (mr *MockOwnerMockRecorder) InitializeRuntime(arg0 any) *gomock.Call

InitializeRuntime indicates an expected call of InitializeRuntime.

func (*MockOwnerMockRecorder) Verify added in v1.1.11

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

Verify indicates an expected call of Verify.

type OutputOwnersWrapper added in v1.16.16

type OutputOwnersWrapper struct {
	*secp256k1fx.OutputOwners
}

OutputOwnersWrapper wraps secp256k1fx.OutputOwners to implement Owner

type Owned

type Owned interface {
	Owners() interface{}
}

type Owner

type Owner interface {
	verify.IsNotState

	verify.Verifiable
}

Directories

Path Synopsis
Package fxmock is a generated GoMock package.
Package fxmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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