Documentation
¶
Index ¶
- func GetCustodian(cp configProvider, network string) (string, error)
- func InstallViews(viewRegistry ResponderRegistry, dbManager *DBManager, ...) error
- func IsCustodian(cp configProvider) (bool, error)
- func LookupKey(context view.Context, request *LookupKeyRequest) ([]byte, error)
- func NewCommitterBasedFLMProvider(onsp *orion.NetworkServiceProvider, tracerProvider trace.TracerProvider, ...) *committerBasedFLMProvider
- func NewOrionDriver(onsProvider *orion.NetworkServiceProvider, viewRegistry driver2.Registry, ...) driver.Driver
- func NewSpentTokenExecutorProvider(viewManager *view2.Manager, keyTranslator translator.KeyTranslator) *spentTokenFetcherProvider
- func NewTokenExecutorProvider(viewManager *view2.Manager) *tokenFetcherProvider
- func ReadPublicParameters(context token.ServiceProvider, network, namespace string) ([]byte, error)
- type ApprovalRequest
- type ApprovalResponse
- type BroadcastRequest
- type BroadcastResponderView
- type BroadcastResponse
- type BroadcastView
- type Certification
- type Custodian
- type DBManager
- type Driver
- type FinalityListener
- type FinalityListenerManager
- type FinalityListenerManagerProvider
- type GetTMSProviderFunc
- type GetTokenRequestFunc
- type GetTokensFunc
- type Identity
- type IdentityProvider
- type InteractiveCertification
- type LedgerWrapper
- type LookupKeyRequest
- type LookupKeyRequestRespondView
- type LookupKeyRequestView
- type LookupKeyResponse
- type Network
- func (n *Network) AddFinalityListener(namespace string, txID string, listener driver.FinalityListener) error
- func (n *Network) AreTokensSpent(context context.Context, namespace string, tokenIDs []*token.ID, meta []string) ([]bool, error)
- func (n *Network) Broadcast(ctx context.Context, blob interface{}) error
- func (n *Network) Channel() string
- func (n *Network) ComputeTxID(id *driver.TxID) string
- func (n *Network) Connect(ns string) ([]token2.ServiceOption, error)
- func (n *Network) FetchPublicParameters(namespace string) ([]byte, error)
- func (n *Network) GetTransient(id string) (driver.TransientMap, error)
- func (n *Network) Ledger() (driver.Ledger, error)
- func (n *Network) LocalMembership() driver.LocalMembership
- func (n *Network) LookupTransferMetadataKey(namespace string, startingTxID string, key string, timeout time.Duration, ...) ([]byte, error)
- func (n *Network) Name() string
- func (n *Network) NewEnvelope() driver.Envelope
- func (n *Network) Normalize(opt *token2.ServiceOptions) (*token2.ServiceOptions, error)
- func (n *Network) ProcessNamespace(namespace string) error
- func (n *Network) QueryTokens(context context.Context, namespace string, IDs []*token.ID) ([][]byte, error)
- func (n *Network) RemoveFinalityListener(txID string, listener driver.FinalityListener) error
- func (n *Network) RequestApproval(context view.Context, tms *token2.ManagementService, requestRaw []byte, ...) (driver.Envelope, error)
- func (n *Network) StoreTransient(id string, transient driver.TransientMap) error
- func (n *Network) TokenVault(namespace string) (driver.TokenVault, error)
- func (n *Network) TransientExists(id string) bool
- type NewVaultFunc
- type ONS
- type Orion
- type PublicParamsRequest
- type PublicParamsRequestResponderView
- type PublicParamsRequestView
- type PublicParamsResponse
- type QueryTokensRequest
- type QueryTokensResponse
- type RWSWrapper
- func (r *RWSWrapper) Bytes() ([]byte, error)
- func (r *RWSWrapper) DeleteState(namespace string, key string) error
- func (r *RWSWrapper) Done()
- func (r *RWSWrapper) Equals(right interface{}, namespace string) error
- func (r *RWSWrapper) GetState(namespace string, key string) ([]byte, error)
- func (r *RWSWrapper) SetState(namespace string, key string, value []byte) error
- type RWSetProcessor
- type ReadOnlyRWSWrapper
- type RequestApprovalResponderView
- type RequestApprovalView
- type RequestQueryTokensResponderView
- type RequestQueryTokensView
- type RequestSpentTokensResponderView
- type RequestSpentTokensView
- type RequestTxStatusResponderView
- type RequestTxStatusView
- type ResponderRegistry
- type SessionManager
- type SpentTokensRequest
- type SpentTokensResponse
- type StatusFetcher
- type TMS
- type Transaction
- type TxRWSWrapper
- type TxStatusRequest
- type TxStatusResponse
- type TxStatusResponseCache
- type Wallets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCustodian ¶
func InstallViews ¶
func InstallViews(viewRegistry ResponderRegistry, dbManager *DBManager, statusCache TxStatusResponseCache) error
func IsCustodian ¶
func NewCommitterBasedFLMProvider ¶ added in v0.4.0
func NewCommitterBasedFLMProvider(onsp *orion.NetworkServiceProvider, tracerProvider trace.TracerProvider, viewManager *view2.Manager) *committerBasedFLMProvider
func NewOrionDriver ¶ added in v0.4.0
func NewOrionDriver( onsProvider *orion.NetworkServiceProvider, viewRegistry driver2.Registry, viewManager *view.Manager, vaultProvider *vault2.Provider, configProvider *view.ConfigService, configService *config.Service, identityProvider view2.IdentityProvider, filterProvider *common.AcceptTxInDBFilterProvider, tmsProvider *token.ManagementServiceProvider, tracerProvider trace.TracerProvider, ) driver.Driver
func NewSpentTokenExecutorProvider ¶ added in v0.4.0
func NewSpentTokenExecutorProvider(viewManager *view2.Manager, keyTranslator translator.KeyTranslator) *spentTokenFetcherProvider
func NewTokenExecutorProvider ¶ added in v0.4.0
func ReadPublicParameters ¶
func ReadPublicParameters(context token.ServiceProvider, network, namespace string) ([]byte, error)
Types ¶
type ApprovalRequest ¶
type ApprovalResponse ¶
type ApprovalResponse struct {
Envelope []byte
}
type BroadcastRequest ¶
type BroadcastResponderView ¶
type BroadcastResponderView struct {
// contains filtered or unexported fields
}
type BroadcastResponse ¶
type BroadcastResponse struct {
Err string
}
type BroadcastView ¶
func NewBroadcastView ¶
func NewBroadcastView(dbManager *DBManager, network string, blob interface{}) *BroadcastView
type Certification ¶
type Certification struct {
Interactive *InteractiveCertification `yaml:"interactive,omitempty"`
}
type DBManager ¶ added in v0.4.0
type DBManager struct {
OrionNetworkProvider *orion.NetworkServiceProvider
IsCustodian bool
ConfigProvider configProvider
SMMutex sync.RWMutex
SessionManagers map[string]*SessionManager
}
func NewDBManager ¶ added in v0.4.0
func NewDBManager(onp *orion.NetworkServiceProvider, cp configProvider, isCustodian bool) *DBManager
func (*DBManager) GetSessionManager ¶ added in v0.4.0
func (d *DBManager) GetSessionManager(network string) (*SessionManager, error)
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func NewDriver ¶ added in v0.4.0
func NewDriver( onsProvider *orion.NetworkServiceProvider, viewRegistry driver2.Registry, viewManager *view.Manager, vaultProvider *vault2.Provider, configProvider *view.ConfigService, configService *config.Service, identityProvider view2.IdentityProvider, filterProvider *common.AcceptTxInDBFilterProvider, tmsProvider *token.ManagementServiceProvider, tokenQueryExecutorProvider driver.TokenQueryExecutorProvider, spentTokenQueryExecutorProvider driver.SpentTokenQueryExecutorProvider, tracerProvider trace.TracerProvider, keyTranslator translator.KeyTranslator, flmProvider FinalityListenerManagerProvider, ) *Driver
type FinalityListener ¶ added in v0.4.0
type FinalityListener struct {
// contains filtered or unexported fields
}
type FinalityListenerManager ¶ added in v0.4.0
type FinalityListenerManager driver.FinalityListenerManager
type FinalityListenerManagerProvider ¶ added in v0.4.0
type FinalityListenerManagerProvider interface {
NewManager(network string, dbManager *DBManager) (FinalityListenerManager, error)
}
type GetTMSProviderFunc ¶ added in v0.4.0
type GetTMSProviderFunc = func() *token.ManagementServiceProvider
type GetTokenRequestFunc ¶ added in v0.4.0
type GetTokenRequestFunc = func(tms *token.ManagementService, txID string) ([]byte, error)
type GetTokensFunc ¶ added in v0.4.0
type IdentityProvider ¶
type InteractiveCertification ¶
type InteractiveCertification struct {
IDs []string `yaml:"ids,omitempty"`
}
type LedgerWrapper ¶
type LedgerWrapper struct {
// contains filtered or unexported fields
}
type LookupKeyRequest ¶
type LookupKeyRequest struct {
Network string
Namespace string
StartingTxID string
Key string
Timeout time.Duration
}
func (*LookupKeyRequest) String ¶
func (l *LookupKeyRequest) String() string
type LookupKeyRequestRespondView ¶
type LookupKeyRequestRespondView struct{}
type LookupKeyRequestView ¶
type LookupKeyRequestView struct {
*LookupKeyRequest
}
func NewLookupKeyRequestView ¶
type LookupKeyResponse ¶
type LookupKeyResponse struct {
Raw []byte
}
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
func NewNetwork ¶
func NewNetwork( viewManager *view2.Manager, tmsProvider *token2.ManagementServiceProvider, ip IdentityProvider, n *orion.NetworkService, newVault NewVaultFunc, nsFinder common2.Configuration, filterProvider common2.TransactionFilterProvider[*common2.AcceptTxInDBsFilter], dbManager *DBManager, flm FinalityListenerManager, tokenQueryExecutor driver.TokenQueryExecutor, spentTokenQueryExecutor driver.SpentTokenQueryExecutor, tracerProvider trace.TracerProvider, keyTranslator translator.KeyTranslator, ) *Network
func (*Network) AddFinalityListener ¶ added in v0.4.0
func (*Network) AreTokensSpent ¶
func (*Network) Connect ¶ added in v0.4.0
func (n *Network) Connect(ns string) ([]token2.ServiceOption, error)
func (*Network) FetchPublicParameters ¶
func (*Network) GetTransient ¶
func (n *Network) GetTransient(id string) (driver.TransientMap, error)
func (*Network) LocalMembership ¶
func (n *Network) LocalMembership() driver.LocalMembership
func (*Network) LookupTransferMetadataKey ¶
func (*Network) NewEnvelope ¶
func (*Network) Normalize ¶ added in v0.4.0
func (n *Network) Normalize(opt *token2.ServiceOptions) (*token2.ServiceOptions, error)
func (*Network) ProcessNamespace ¶ added in v0.3.0
func (*Network) QueryTokens ¶
func (*Network) RemoveFinalityListener ¶ added in v0.4.0
func (n *Network) RemoveFinalityListener(txID string, listener driver.FinalityListener) error
func (*Network) RequestApproval ¶
func (*Network) StoreTransient ¶
func (n *Network) StoreTransient(id string, transient driver.TransientMap) error
func (*Network) TokenVault ¶ added in v0.4.0
func (n *Network) TokenVault(namespace string) (driver.TokenVault, error)
func (*Network) TransientExists ¶
type NewVaultFunc ¶ added in v0.4.0
type NewVaultFunc = func(network, channel, namespace string) (driver.TokenVault, error)
type ONS ¶
type ONS interface {
Name() string
MetadataService() *orion.MetadataService
}
type PublicParamsRequest ¶
type PublicParamsRequestResponderView ¶
type PublicParamsRequestResponderView struct{}
type PublicParamsRequestView ¶
type PublicParamsRequestView struct {
Network string
Namespace string
// contains filtered or unexported fields
}
func NewPublicParamsRequestView ¶
func NewPublicParamsRequestView(network string, namespace string) *PublicParamsRequestView
type PublicParamsResponse ¶
type PublicParamsResponse struct {
Raw []byte
}
type QueryTokensRequest ¶
type QueryTokensResponse ¶
type QueryTokensResponse struct {
Content [][]byte
}
type RWSWrapper ¶
type RWSWrapper struct {
// contains filtered or unexported fields
}
func NewRWSWrapper ¶
func NewRWSWrapper(r *orion.RWSet) *RWSWrapper
func (*RWSWrapper) Bytes ¶
func (r *RWSWrapper) Bytes() ([]byte, error)
func (*RWSWrapper) DeleteState ¶
func (r *RWSWrapper) DeleteState(namespace string, key string) error
func (*RWSWrapper) Done ¶
func (r *RWSWrapper) Done()
func (*RWSWrapper) Equals ¶
func (r *RWSWrapper) Equals(right interface{}, namespace string) error
type RWSetProcessor ¶
type RWSetProcessor struct {
GetTokens GetTokensFunc
GetTMSProvider GetTMSProviderFunc
GetTokenRequest GetTokenRequestFunc
// contains filtered or unexported fields
}
func NewTokenRWSetProcessor ¶
func NewTokenRWSetProcessor(network string, ns string, GetTokens GetTokensFunc, GetTMSProvider GetTMSProviderFunc, GetTokenRequest GetTokenRequestFunc) *RWSetProcessor
type ReadOnlyRWSWrapper ¶
type ReadOnlyRWSWrapper struct {
// contains filtered or unexported fields
}
func (*ReadOnlyRWSWrapper) DeleteState ¶
func (r *ReadOnlyRWSWrapper) DeleteState(namespace string, key string) error
type RequestApprovalResponderView ¶
type RequestApprovalResponderView struct {
// contains filtered or unexported fields
}
type RequestApprovalView ¶
type RequestApprovalView struct {
DBManager *DBManager
Network string
Namespace string
RequestRaw []byte
Signer view.Identity
TxID string
}
func NewRequestApprovalView ¶
type RequestQueryTokensResponderView ¶
type RequestQueryTokensResponderView struct{}
type RequestQueryTokensView ¶
func NewRequestQueryTokensView ¶
func NewRequestQueryTokensView(network string, namespace string, IDs []*token2.ID) *RequestQueryTokensView
type RequestSpentTokensResponderView ¶
type RequestSpentTokensResponderView struct{}
type RequestSpentTokensView ¶
func NewRequestSpentTokensView ¶
func NewRequestSpentTokensView(network string, namespace string, IDs []string) *RequestSpentTokensView
type RequestTxStatusResponderView ¶
type RequestTxStatusResponderView struct {
// contains filtered or unexported fields
}
type RequestTxStatusView ¶
type RequestTxStatusView struct {
Network string
Namespace string
TxID string
// contains filtered or unexported fields
}
func NewRequestTxStatusView ¶
func NewRequestTxStatusView(network string, namespace string, txID string, dbManager *DBManager) *RequestTxStatusView
type ResponderRegistry ¶ added in v0.4.0
type SessionManager ¶ added in v0.4.0
type SessionManager struct {
Orion *orion.NetworkService
CustodianID string
// contains filtered or unexported fields
}
func NewSessionManager ¶ added in v0.4.0
func NewSessionManager(dbManager *DBManager, network string) (*SessionManager, error)
func (*SessionManager) GetSession ¶ added in v0.4.0
func (s *SessionManager) GetSession() (os *orion.Session, err error)
func (*SessionManager) PublicParameters ¶ added in v0.4.0
func (s *SessionManager) PublicParameters(tds *driver.TokenDriverService, namespace string) (driver.PublicParameters, error)
func (*SessionManager) ReadPublicParameters ¶ added in v0.4.0
func (s *SessionManager) ReadPublicParameters(namespace string) ([]byte, error)
type SpentTokensRequest ¶
type SpentTokensResponse ¶
type SpentTokensResponse struct {
Flags []bool
}
type StatusFetcher ¶ added in v0.4.0
type StatusFetcher struct {
// contains filtered or unexported fields
}
func NewStatusFetcher ¶ added in v0.4.0
func NewStatusFetcher(dbManager *DBManager, keyTranslator translator.KeyTranslator) *StatusFetcher
func (*StatusFetcher) FetchCode ¶ added in v0.4.0
func (r *StatusFetcher) FetchCode(network string, txID driver.TxID) (driver2.ValidationCode, error)
func (*StatusFetcher) FetchStatus ¶ added in v0.4.0
func (r *StatusFetcher) FetchStatus(network, namespace string, txID driver.TxID) (*TxStatusResponse, error)
type Transaction ¶ added in v0.4.0
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Channel ¶ added in v0.4.0
func (t *Transaction) Channel() string
func (*Transaction) ID ¶ added in v0.4.0
func (t *Transaction) ID() string
func (*Transaction) Namespace ¶ added in v0.4.0
func (t *Transaction) Namespace() string
func (*Transaction) Network ¶ added in v0.4.0
func (t *Transaction) Network() string
func (*Transaction) Request ¶ added in v0.4.0
func (t *Transaction) Request() *token.Request
type TxRWSWrapper ¶
type TxRWSWrapper struct {
// contains filtered or unexported fields
}
func (*TxRWSWrapper) DeleteState ¶
func (r *TxRWSWrapper) DeleteState(namespace string, key string) error
type TxStatusRequest ¶
type TxStatusResponse ¶
type TxStatusResponse struct {
Status driver.ValidationCode
TokenRequestReference []byte
}
type TxStatusResponseCache ¶ added in v0.4.0
type TxStatusResponseCache interface {
Get(key string) (*TxStatusResponse, bool)
GetOrLoad(key string, loader func() (*TxStatusResponse, error)) (*TxStatusResponse, bool, error)
Add(key string, value *TxStatusResponse)
}
Click to show internal directories.
Click to hide internal directories.