func (c *Client) Actions() ([]Action, error) {
	actions, err := c.oobService.Actions()
	if err != nil {
		return nil, err
	}
	result := make([]Action, len(actions))
	for i, action := range actions {
		result[i] = Action(action)
	}
	return result, nil
}
Actions returns unfinished actions for the async usage.
package outofband
import (
	"errors"
	"fmt"
	"github.com/google/uuid"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/common/service"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/decorator"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/didexchange"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/mediator"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/protocol/outofband"
	"github.com/hyperledger/aries-framework-go/pkg/didcomm/transport"
	"github.com/hyperledger/aries-framework-go/pkg/doc/did"
	"github.com/hyperledger/aries-framework-go/pkg/doc/util/kmsdidkey"
	"github.com/hyperledger/aries-framework-go/pkg/framework/aries/api/vdr"
	"github.com/hyperledger/aries-framework-go/pkg/kms"
)
type (
	Invitation outofband.Invitation
	Action outofband.Action
)
const (
	InvitationMsgType = outofband.InvitationMsgType
	HandshakeReuseMsgType = outofband.HandshakeReuseMsgType
	HandshakeReuseAcceptedMsgType = outofband.HandshakeReuseAcceptedMsgType
)
type EventOptions struct {
	Label string
	Connections []string
	ReuseAny    bool
	ReuseDID    string
}
func (e *EventOptions) RouterConnections() []string {
	return e.Connections
}
func (e *EventOptions) MyLabel() string {
	return e.Label
}
func (e *EventOptions) ReuseAnyConnection() bool {
	return e.ReuseAny
}
func (e *EventOptions) ReuseConnection() string {
	return e.ReuseDID
}
type Event interface {
	ConnectionID() string
	Error() error
}
type MessageOption func(*message)
type message struct {
	Label              string
	Goal               string
	GoalCode           string
	RouterConnections  []string
	Service            []interface{}
	HandshakeProtocols []string
	Attachments        []*decorator.Attachment
	Accept             []string
	ReuseAnyConnection bool
	ReuseConnection    string
}
func (m *message) RouterConnection() string {
	if len(m.RouterConnections) == 0 {
		return ""
	}
	return m.RouterConnections[0]
}
type OobService interface {
	service.Event
	AcceptInvitation(*outofband.Invitation, outofband.Options) (string, error)
	SaveInvitation(*outofband.Invitation) error
	Actions() ([]outofband.Action, error)
	ActionContinue(string, outofband.Options) error
	ActionStop(string, error) error
}
type Provider interface {
	ServiceEndpoint() string
	Service(id string) (interface{}, error)
	KMS() kms.KeyManager
	KeyType() kms.KeyType
	KeyAgreementType() kms.KeyType
	MediaTypeProfiles() []string
}
type Client struct {
	service.Event
	didDocSvcFunc     func(routerConnID string, accept []string) (*did.Service, error)
	oobService        OobService
	mediaTypeProfiles []string
}
func New(p Provider) (*Client, error) {
	s, err := p.Service(outofband.Name)
	if err != nil {
		return nil, fmt.Errorf("failed to look up service %s : %w", outofband.Name, err)
	}
	oobSvc, ok := s.(OobService)
	if !ok {
		return nil, fmt.Errorf("failed to cast service %s as a dependency", outofband.Name)
	}
	mtp := p.MediaTypeProfiles()
	if len(mtp) == 0 {
		mtp = []string{transport.MediaTypeAIP2RFC0019Profile}
	}
	client := &Client{
		Event:             oobSvc,
		oobService:        oobSvc,
		mediaTypeProfiles: mtp,
	}
	client.didDocSvcFunc = client.didServiceBlockFunc(p)
	return client, nil
}
func (c *Client) CreateInvitation(services []interface{}, opts ...MessageOption) (*Invitation, error) {
	msg := &message{}
	for _, opt := range opts {
		opt(msg)
	}
	inv := &Invitation{
		ID:        uuid.New().String(),
		Type:      InvitationMsgType,
		Label:     msg.Label,
		Goal:      msg.Goal,
		GoalCode:  msg.GoalCode,
		Services:  services,
		Accept:    msg.Accept,
		Protocols: msg.HandshakeProtocols,
		Requests:  msg.Attachments,
	}
	if len(inv.Accept) == 0 {
		inv.Accept = c.mediaTypeProfiles
	}
	if len(inv.Services) == 0 {
		svc, err := c.didDocSvcFunc(msg.RouterConnection(), inv.Accept)
		if err != nil {
			return nil, fmt.Errorf("failed to create a new inlined did doc service block : %w", err)
		}
		inv.Services = []interface{}{svc}
	} else {
		err := validateServices(inv.Services...)
		if err != nil {
			return nil, fmt.Errorf("invalid service: %w", err)
		}
	}
	if len(inv.Protocols) == 0 {
		inv.Protocols = []string{didexchange.PIURI}
	}
	cast := outofband.Invitation(*inv)
	err := c.oobService.SaveInvitation(&cast)
	if err != nil {
		return nil, fmt.Errorf("failed to save outofband invitation : %w", err)
	}
	return inv, nil
}