views

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	OwnerWallet = iota
	IssuerWallet
	AuditorWallet
)

Variables

This section is empty.

Functions

func AssertTokensInVault

func AssertTokensInVault(vault *network.Vault, tx *ttx.Transaction, outputs *token.OutputStream, id view.Identity)

AssertTokensInVault checks that the tokens are or are not in the vault

func GetTMSPublicParams added in v0.2.0

func GetTMSPublicParams(tms *token.ManagementService) []byte

func ServiceOpts added in v0.3.0

func ServiceOpts(tmsId *token.TMSID) []token.ServiceOption

func TxOpts added in v0.3.0

func TxOpts(tmsId *token.TMSID) []ttx.TxOption

Types

type AcceptCashView

type AcceptCashView struct{}

func (*AcceptCashView) Call

func (a *AcceptCashView) Call(context view.Context) (interface{}, error)

type AcceptPreparedCashView

type AcceptPreparedCashView struct {
	WaitFinality bool
}

func (*AcceptPreparedCashView) Call

func (a *AcceptPreparedCashView) Call(context view.Context) (interface{}, error)

type AuditView

type AuditView struct {
	*token.TMSID
}

func (*AuditView) Call

func (a *AuditView) Call(context view.Context) (interface{}, error)

type Balance

type Balance struct {
	Type     string
	Quantity string
}

type BalanceQuery

type BalanceQuery struct {
	TMSID  *token.TMSID
	Wallet string
	Type   string
}

type BalanceView

type BalanceView struct {
	*BalanceQuery
}

func (*BalanceView) Call

func (b *BalanceView) Call(context view.Context) (interface{}, error)

type BalanceViewFactory

type BalanceViewFactory struct{}

func (*BalanceViewFactory) NewView

func (g *BalanceViewFactory) NewView(in []byte) (view.View, error)

type BroadcastPreparedTransfer

type BroadcastPreparedTransfer struct {
	Tx       []byte
	Finality bool
}

type BroadcastPreparedTransferView

type BroadcastPreparedTransferView struct {
	*BroadcastPreparedTransfer
}

BroadcastPreparedTransferView is a view that broadcasts a prepared transfer transaction

func (*BroadcastPreparedTransferView) Call

func (t *BroadcastPreparedTransferView) Call(context view.Context) (interface{}, error)

type BroadcastPreparedTransferViewFactory

type BroadcastPreparedTransferViewFactory struct{}

func (*BroadcastPreparedTransferViewFactory) NewView

type CheckIfExistsInVault

type CheckIfExistsInVault struct {
	TMSID token.TMSID
	IDs   []*token2.ID
}

type CheckIfExistsInVaultView

type CheckIfExistsInVaultView struct {
	*CheckIfExistsInVault
}

func (*CheckIfExistsInVaultView) Call

func (c *CheckIfExistsInVaultView) Call(context view.Context) (interface{}, error)

type CheckIfExistsInVaultViewFactory

type CheckIfExistsInVaultViewFactory struct {
}

func (*CheckIfExistsInVaultViewFactory) NewView

func (c *CheckIfExistsInVaultViewFactory) NewView(in []byte) (view.View, error)

type CheckPublicParamsMatch

type CheckPublicParamsMatch struct {
	TMSID *token.TMSID
}

type CheckPublicParamsMatchView

type CheckPublicParamsMatchView struct {
	*CheckPublicParamsMatch
}

func (*CheckPublicParamsMatchView) Call

func (p *CheckPublicParamsMatchView) Call(context view.Context) (interface{}, error)

type CheckPublicParamsMatchViewFactory

type CheckPublicParamsMatchViewFactory struct{}

func (*CheckPublicParamsMatchViewFactory) NewView

type CheckTTXDB

type CheckTTXDB struct {
	Auditor         bool
	AuditorWalletID string
	TMSID           token.TMSID
}

type CheckTTXDBView

type CheckTTXDBView struct {
	*CheckTTXDB
}

CheckTTXDBView is a view that performs consistency checks among the transaction db (either auditor or owner), the vault, and the backed. It reports a list of mismatch that can be used for debug purposes.

func (*CheckTTXDBView) Call

func (m *CheckTTXDBView) Call(context view.Context) (interface{}, error)

type CheckTTXDBViewFactory

type CheckTTXDBViewFactory struct{}

func (*CheckTTXDBViewFactory) NewView

func (p *CheckTTXDBViewFactory) NewView(in []byte) (view.View, error)

type CurrentHolding

type CurrentHolding struct {
	EnrollmentID string
	TokenType    string
	TMSID        token.TMSID
}

type CurrentHoldingView

type CurrentHoldingView struct {
	*CurrentHolding
}

CurrentHoldingView is used to retrieve the current holding of token type of the passed enrollment id

func (*CurrentHoldingView) Call

func (r *CurrentHoldingView) Call(context view.Context) (interface{}, error)

type CurrentHoldingViewFactory

type CurrentHoldingViewFactory struct{}

func (*CurrentHoldingViewFactory) NewView

func (p *CurrentHoldingViewFactory) NewView(in []byte) (view.View, error)

type CurrentSpending

type CurrentSpending struct {
	EnrollmentID string       `json:"enrollment_id"`
	TokenType    string       `json:"token_type"`
	TMSID        *token.TMSID `json:"tmsid"`
}

type CurrentSpendingView

type CurrentSpendingView struct {
	*CurrentSpending
}

CurrentSpendingView is used to retrieve the current spending of token type of the passed enrollment id

func (*CurrentSpendingView) Call

func (r *CurrentSpendingView) Call(context view.Context) (interface{}, error)

type CurrentSpendingViewFactory

type CurrentSpendingViewFactory struct{}

func (*CurrentSpendingViewFactory) NewView

func (p *CurrentSpendingViewFactory) NewView(in []byte) (view.View, error)

type DoesWalletExist added in v0.3.0

type DoesWalletExist struct {
	TMSID      token.TMSID
	Wallet     string
	WalletType int
}

type DoesWalletExistView added in v0.3.0

type DoesWalletExistView struct {
	*DoesWalletExist
}

func (*DoesWalletExistView) Call added in v0.3.0

func (p *DoesWalletExistView) Call(context view.Context) (interface{}, error)

type DoesWalletExistViewFactory added in v0.3.0

type DoesWalletExistViewFactory struct{}

func (*DoesWalletExistViewFactory) NewView added in v0.3.0

func (p *DoesWalletExistViewFactory) NewView(in []byte) (view.View, error)

type FinalityWithTimeout

type FinalityWithTimeout struct {
	Tx      []byte
	Timeout time.Duration
}

type FinalityWithTimeoutView

type FinalityWithTimeoutView struct {
	*FinalityWithTimeout
}

FinalityWithTimeoutView is a view that runs the finality view with timeout. The timeout is expected to happen

func (*FinalityWithTimeoutView) Call

func (r *FinalityWithTimeoutView) Call(ctx view.Context) (interface{}, error)

type FinalityWithTimeoutViewFactory

type FinalityWithTimeoutViewFactory struct{}

func (*FinalityWithTimeoutViewFactory) NewView

func (i *FinalityWithTimeoutViewFactory) NewView(in []byte) (view.View, error)

type GetAuditorWalletIdentity added in v0.2.0

type GetAuditorWalletIdentity struct {
	ID string
}

func (*GetAuditorWalletIdentity) Call added in v0.2.0

func (g *GetAuditorWalletIdentity) Call(context view.Context) (interface{}, error)

type GetAuditorWalletIdentityView added in v0.2.0

type GetAuditorWalletIdentityView struct {
	*GetAuditorWalletIdentity
}

type GetAuditorWalletIdentityViewFactory added in v0.2.0

type GetAuditorWalletIdentityViewFactory struct{}

func (*GetAuditorWalletIdentityViewFactory) NewView added in v0.2.0

type GetEnrollmentID

type GetEnrollmentID struct {
	Wallet string
	TMSID  *token.TMSID
}

type GetEnrollmentIDView

type GetEnrollmentIDView struct {
	*GetEnrollmentID
}

GetEnrollmentIDView is a view that returns the enrollment ID of a wallet.

func (*GetEnrollmentIDView) Call

func (r *GetEnrollmentIDView) Call(context view.Context) (interface{}, error)

type GetEnrollmentIDViewFactory

type GetEnrollmentIDViewFactory struct{}

func (*GetEnrollmentIDViewFactory) NewView

func (p *GetEnrollmentIDViewFactory) NewView(in []byte) (view.View, error)

type GetIssuerWalletIdentity added in v0.2.0

type GetIssuerWalletIdentity struct {
	ID string
}

func (*GetIssuerWalletIdentity) Call added in v0.2.0

func (g *GetIssuerWalletIdentity) Call(context view.Context) (interface{}, error)

type GetIssuerWalletIdentityView added in v0.2.0

type GetIssuerWalletIdentityView struct {
	*GetIssuerWalletIdentity
}

type GetIssuerWalletIdentityViewFactory added in v0.2.0

type GetIssuerWalletIdentityViewFactory struct{}

func (*GetIssuerWalletIdentityViewFactory) NewView added in v0.2.0

type GetPublicParams added in v0.2.0

type GetPublicParams struct {
	TMSID token.TMSID
}

type GetPublicParamsView added in v0.2.0

type GetPublicParamsView struct {
	*GetPublicParams
}

func (*GetPublicParamsView) Call added in v0.2.0

func (p *GetPublicParamsView) Call(context view.Context) (interface{}, error)

type GetPublicParamsViewFactory added in v0.2.0

type GetPublicParamsViewFactory struct{}

func (*GetPublicParamsViewFactory) NewView added in v0.2.0

func (p *GetPublicParamsViewFactory) NewView(in []byte) (view.View, error)

type GetRevocationHandle added in v0.3.0

type GetRevocationHandle struct {
	TMSID  token.TMSID
	Wallet string
}

func (*GetRevocationHandle) Call added in v0.3.0

func (r *GetRevocationHandle) Call(context view.Context) (interface{}, error)

type GetRevocationHandleView added in v0.3.0

type GetRevocationHandleView struct {
	*GetRevocationHandle
}

type GetRevocationHandleViewFactory added in v0.3.0

type GetRevocationHandleViewFactory struct{}

func (*GetRevocationHandleViewFactory) NewView added in v0.3.0

func (p *GetRevocationHandleViewFactory) NewView(in []byte) (view.View, error)

type IssueCash

type IssueCash struct {
	TMSID *token.TMSID
	// Anonymous set to true if the transaction is anonymous, false otherwise
	Anonymous bool
	// Auditor is the name of the auditor identity
	Auditor string
	// IssuerWallet is the issuer's wallet to use
	IssuerWallet string
	// TokenType is the type of token to issue
	TokenType string
	// Quantity represent the number of units of a certain token type stored in the token
	Quantity uint64
	// Recipient is the identity of the recipient's FSC node
	Recipient view.Identity
	// RecipientEID is the expected enrolment id of the recipient
	RecipientEID string
}

IssueCash contains the input information to issue a token

type IssueCashView

type IssueCashView struct {
	*IssueCash
}

func (*IssueCashView) Call

func (p *IssueCashView) Call(context view.Context) (interface{}, error)

type IssueCashViewFactory

type IssueCashViewFactory struct{}

func (*IssueCashViewFactory) NewView

func (p *IssueCashViewFactory) NewView(in []byte) (view.View, error)

type KVSEntry added in v0.3.0

type KVSEntry struct {
	Key   string
	Value string
}

type ListAcceptedTransactions

type ListAcceptedTransactions struct {
	SenderWallet    string
	RecipientWallet string
	From            *time.Time
	To              *time.Time
	ActionTypes     []ttxdb.ActionType
	Statuses        []driver.TxStatus
}

ListAcceptedTransactions contains the input to query the list of accepted tokens

type ListAcceptedTransactionsView

type ListAcceptedTransactionsView struct {
	*ListAcceptedTransactions
}

func (*ListAcceptedTransactionsView) Call

func (p *ListAcceptedTransactionsView) Call(context view.Context) (interface{}, error)

type ListAcceptedTransactionsViewFactory

type ListAcceptedTransactionsViewFactory struct{}

func (*ListAcceptedTransactionsViewFactory) NewView

type ListAuditedTransactions

type ListAuditedTransactions struct {
	From *time.Time
	To   *time.Time
}

type ListAuditedTransactionsView

type ListAuditedTransactionsView struct {
	*ListAuditedTransactions
}

func (*ListAuditedTransactionsView) Call

func (p *ListAuditedTransactionsView) Call(context view.Context) (interface{}, error)

type ListAuditedTransactionsViewFactory

type ListAuditedTransactionsViewFactory struct{}

func (*ListAuditedTransactionsViewFactory) NewView

type ListIssuedTokens

type ListIssuedTokens struct {
	// Wallet whose identities own the token
	Wallet string
	// TokenType is the token type to select
	TokenType string
	// The TMS to pick in case of multiple TMSIDs
	TMSID *token.TMSID
}

ListIssuedTokens contains the input to query the list of issued tokens

type ListIssuedTokensView

type ListIssuedTokensView struct {
	*ListIssuedTokens
}

func (*ListIssuedTokensView) Call

func (p *ListIssuedTokensView) Call(context view.Context) (interface{}, error)

type ListIssuedTokensViewFactory

type ListIssuedTokensViewFactory struct{}

func (*ListIssuedTokensViewFactory) NewView

func (i *ListIssuedTokensViewFactory) NewView(in []byte) (view.View, error)

type ListOwnerWalletIDsView added in v0.3.0

type ListOwnerWalletIDsView struct{}

func (*ListOwnerWalletIDsView) Call added in v0.3.0

func (p *ListOwnerWalletIDsView) Call(context view.Context) (interface{}, error)

type ListOwnerWalletIDsViewFactory added in v0.3.0

type ListOwnerWalletIDsViewFactory struct{}

func (*ListOwnerWalletIDsViewFactory) NewView added in v0.3.0

func (i *ListOwnerWalletIDsViewFactory) NewView(in []byte) (view.View, error)

type ListUnspentTokens

type ListUnspentTokens struct {
	// Wallet whose identities own the token
	Wallet string
	// TokenType is the token type to select
	TokenType string
	// The TMS to pick in case of multiple TMSIDs
	TMSID *token.TMSID
}

ListUnspentTokens contains the input to query the list of unspent tokens

type ListUnspentTokensView

type ListUnspentTokensView struct {
	*ListUnspentTokens
}

func (*ListUnspentTokensView) Call

func (p *ListUnspentTokensView) Call(context view.Context) (interface{}, error)

type ListUnspentTokensViewFactory

type ListUnspentTokensViewFactory struct{}

func (*ListUnspentTokensViewFactory) NewView

func (i *ListUnspentTokensViewFactory) NewView(in []byte) (view.View, error)

type ListVaultUnspentTokens

type ListVaultUnspentTokens struct {
	TMSID token.TMSID
}

type ListVaultUnspentTokensView

type ListVaultUnspentTokensView struct {
	*ListVaultUnspentTokens
}

func (*ListVaultUnspentTokensView) Call

func (l *ListVaultUnspentTokensView) Call(context view.Context) (interface{}, error)

type ListVaultUnspentTokensViewFactory

type ListVaultUnspentTokensViewFactory struct{}

func (*ListVaultUnspentTokensViewFactory) NewView

type PrepareTransferResult

type PrepareTransferResult struct {
	TxID  string
	TXRaw []byte
}

type PrepareTransferView

type PrepareTransferView struct {
	*Transfer
}

PrepareTransferView is a view that prepares a transfer transaction without broadcasting it

func (*PrepareTransferView) Call

func (t *PrepareTransferView) Call(context view.Context) (interface{}, error)

type PrepareTransferViewFactory

type PrepareTransferViewFactory struct{}

func (*PrepareTransferViewFactory) NewView

func (p *PrepareTransferViewFactory) NewView(in []byte) (view.View, error)

type PruneInvalidUnspentTokens

type PruneInvalidUnspentTokens struct {
	TMSID token.TMSID
}

type PruneInvalidUnspentTokensView

type PruneInvalidUnspentTokensView struct {
	*PruneInvalidUnspentTokens
}

func (*PruneInvalidUnspentTokensView) Call

func (p *PruneInvalidUnspentTokensView) Call(context view.Context) (interface{}, error)

type PruneInvalidUnspentTokensViewFactory

type PruneInvalidUnspentTokensViewFactory struct{}

func (*PruneInvalidUnspentTokensViewFactory) NewView

type Redeem

type Redeem struct {
	// Auditor is the name of the auditor that must be contacted to approve the operation
	Auditor string
	// Wallet is the identifier of the wallet that owns the tokens to redeem
	Wallet string
	// TokenIDs contains a list of token ids to redeem. If empty, tokens are selected on the spot.
	TokenIDs []*token.ID
	// Type of tokens to redeem
	Type string
	// Amount to redeem
	Amount uint64
	// The TMS to pick in case of multiple TMSIDs
	TMSID *token2.TMSID
}

Redeem contains the input information for a redeem

type RedeemView

type RedeemView struct {
	*Redeem
}

func (*RedeemView) Call

func (t *RedeemView) Call(context view.Context) (interface{}, error)

type RedeemViewFactory

type RedeemViewFactory struct{}

func (*RedeemViewFactory) NewView

func (p *RedeemViewFactory) NewView(in []byte) (view.View, error)

type RegisterAuditor added in v0.3.0

type RegisterAuditor struct {
	*token.TMSID
}

type RegisterAuditorView

type RegisterAuditorView struct {
	*RegisterAuditor
}

func (*RegisterAuditorView) Call

func (r *RegisterAuditorView) Call(context view.Context) (interface{}, error)

type RegisterAuditorViewFactory

type RegisterAuditorViewFactory struct{}

func (*RegisterAuditorViewFactory) NewView

func (p *RegisterAuditorViewFactory) NewView(in []byte) (view.View, error)

type RegisterCertifier

type RegisterCertifier struct {
	Network   string
	Channel   string
	Namespace string
	Wallet    string
}

type RegisterCertifierView

type RegisterCertifierView struct {
	*RegisterCertifier
}

func (*RegisterCertifierView) Call

func (r *RegisterCertifierView) Call(context view.Context) (interface{}, error)

type RegisterCertifierViewFactory

type RegisterCertifierViewFactory struct{}

func (*RegisterCertifierViewFactory) NewView

func (p *RegisterCertifierViewFactory) NewView(in []byte) (view.View, error)

type RegisterIssuerWallet

type RegisterIssuerWallet struct {
	TMSID token.TMSID
	ID    string
	Path  string
}

type RegisterIssuerWalletView

type RegisterIssuerWalletView struct {
	*RegisterIssuerWallet
}

RegisterIssuerWalletView is a view that register an issuer wallet

func (*RegisterIssuerWalletView) Call

func (r *RegisterIssuerWalletView) Call(context view.Context) (interface{}, error)

type RegisterIssuerWalletViewFactory

type RegisterIssuerWalletViewFactory struct{}

func (*RegisterIssuerWalletViewFactory) NewView

func (p *RegisterIssuerWalletViewFactory) NewView(in []byte) (view.View, error)

type RegisterOwnerWallet added in v0.2.0

type RegisterOwnerWallet struct {
	TMSID token.TMSID
	ID    string
	Path  string
}

type RegisterOwnerWalletView added in v0.2.0

type RegisterOwnerWalletView struct {
	*RegisterOwnerWallet
}

RegisterOwnerWalletView is a view that registers an owner wallet

func (*RegisterOwnerWalletView) Call added in v0.2.0

func (r *RegisterOwnerWalletView) Call(context view.Context) (interface{}, error)

type RegisterOwnerWalletViewFactory added in v0.2.0

type RegisterOwnerWalletViewFactory struct{}

func (*RegisterOwnerWalletViewFactory) NewView added in v0.2.0

func (p *RegisterOwnerWalletViewFactory) NewView(in []byte) (view.View, error)

type RevocationHandle added in v0.3.0

type RevocationHandle struct {
	RH string
}

type RevokeUser added in v0.3.0

type RevokeUser struct {
	RH string
}

type RevokeUserView added in v0.3.0

type RevokeUserView struct {
	*RevokeUser
}

func (*RevokeUserView) Call added in v0.3.0

func (u *RevokeUserView) Call(context view.Context) (interface{}, error)

type RevokeUserViewFactory added in v0.3.0

type RevokeUserViewFactory struct{}

func (*RevokeUserViewFactory) NewView added in v0.3.0

func (u *RevokeUserViewFactory) NewView(in []byte) (view.View, error)

type SetKVSEntryView added in v0.3.0

type SetKVSEntryView struct {
	*KVSEntry
}

func (*SetKVSEntryView) Call added in v0.3.0

func (s *SetKVSEntryView) Call(context view.Context) (interface{}, error)

type SetKVSEntryViewFactory added in v0.3.0

type SetKVSEntryViewFactory struct{}

func (*SetKVSEntryViewFactory) NewView added in v0.3.0

func (p *SetKVSEntryViewFactory) NewView(in []byte) (view.View, error)

type SetTransactionAuditStatus

type SetTransactionAuditStatus struct {
	TxID   string
	Status ttx.TxStatus
}

type SetTransactionAuditStatusView

type SetTransactionAuditStatusView struct {
	*SetTransactionAuditStatus
}

SetTransactionAuditStatusView is used to set the status of a given transaction in the audit db

func (*SetTransactionAuditStatusView) Call

func (r *SetTransactionAuditStatusView) Call(context view.Context) (interface{}, error)

type SetTransactionAuditStatusViewFactory

type SetTransactionAuditStatusViewFactory struct{}

func (*SetTransactionAuditStatusViewFactory) NewView

type SetTransactionOwnerStatus

type SetTransactionOwnerStatus struct {
	TxID   string
	Status ttx.TxStatus
}

type SetTransactionOwnerStatusView

type SetTransactionOwnerStatusView struct {
	*SetTransactionOwnerStatus
}

SetTransactionOwnerStatusView is used to set the status of a given transaction in the audit db

func (*SetTransactionOwnerStatusView) Call

func (r *SetTransactionOwnerStatusView) Call(context view.Context) (interface{}, error)

type SetTransactionOwnerStatusViewFactory

type SetTransactionOwnerStatusViewFactory struct{}

func (*SetTransactionOwnerStatusViewFactory) NewView

type Swap

type Swap struct {
	// Auditor is the identity of the auditor that must be contacted to approve the transaction
	Auditor string
	// AliceWallet is the wallet Alice will use
	AliceWallet string
	// FromAliceType is the token type Alice will transfer
	FromAliceType string
	// FromAliceAmount is the amount Alice will transfer
	FromAliceAmount uint64
	// FromBobType is the token type Bob will transfer
	FromBobType string
	// FromBobAmount is the amount Bob will transfer
	FromBobAmount uint64
	// Bob is the identity of the Bob's FSC node
	Bob view.Identity
}

Swap contains the input information for a swap

type SwapInitiatorView

type SwapInitiatorView struct {
	*Swap
}

func (*SwapInitiatorView) Call

func (t *SwapInitiatorView) Call(context view.Context) (interface{}, error)

type SwapInitiatorViewFactory

type SwapInitiatorViewFactory struct{}

func (*SwapInitiatorViewFactory) NewView

func (p *SwapInitiatorViewFactory) NewView(in []byte) (view.View, error)

type SwapResponderView

type SwapResponderView struct{}

func (*SwapResponderView) Call

func (t *SwapResponderView) Call(context view.Context) (interface{}, error)

type TokenSelectorUnlock

type TokenSelectorUnlock struct {
	TxID string
}

type TokenSelectorUnlockView

type TokenSelectorUnlockView struct {
	*TokenSelectorUnlock
}

TokenSelectorUnlockView is a view that broadcasts a prepared transfer transaction

func (*TokenSelectorUnlockView) Call

func (t *TokenSelectorUnlockView) Call(context view.Context) (interface{}, error)

type TokenSelectorUnlockViewFactory

type TokenSelectorUnlockViewFactory struct{}

func (*TokenSelectorUnlockViewFactory) NewView

func (p *TokenSelectorUnlockViewFactory) NewView(in []byte) (view.View, error)

type TokenTransactionDB added in v0.3.0

type TokenTransactionDB interface {
	GetTokenRequest(txID string) ([]byte, error)
}

type TransactionInfo

type TransactionInfo struct {
	TransactionID string
	TMSID         *token.TMSID
}

TransactionInfo contains the input information to search for transaction info

type TransactionInfoView

type TransactionInfoView struct {
	*TransactionInfo
}

func (*TransactionInfoView) Call

func (t *TransactionInfoView) Call(context view.Context) (interface{}, error)

type TransactionInfoViewFactory

type TransactionInfoViewFactory struct{}

func (*TransactionInfoViewFactory) NewView

func (p *TransactionInfoViewFactory) NewView(in []byte) (view.View, error)

type Transfer

type Transfer struct {
	// Auditor is the name of the auditor that must be contacted to approve the operation
	Auditor string
	// Wallet is the identifier of the wallet that owns the tokens to transfer
	Wallet         string
	ExternalWallet bool
	// TokenIDs contains a list of token ids to transfer. If empty, tokens are selected on the spot.
	TokenIDs []*token.ID
	// Type of tokens to transfer
	Type string
	// Amount to transfer
	Amount uint64
	// Recipient is the identity of the recipient's FSC node
	Recipient view.Identity
	// RecipientEID is the expected enrolment id of the recipient
	RecipientEID string
	// Retry tells if a retry must happen in case of a failure
	Retry bool
	// FailToRelease if true, it fails after transfer to trigger the Release function on the token transaction
	FailToRelease bool
	// For additional transfer actions
	TransferAction []TransferAction

	RecipientData *token2.RecipientData
	// The TMS to pick in case of multiple TMSIDs
	TMSID *token2.TMSID
}

Transfer contains the input information for a transfer

type TransferAction added in v0.3.0

type TransferAction struct {
	// Amount to transfer
	Amount uint64
	// Recipient is the identity of the recipient's FSC node
	Recipient view.Identity
	// RecipientEID is the expected enrolment id of the recipient
	RecipientEID string
}

TransferAction defines a transfer action

type TransferView

type TransferView struct {
	*Transfer
}

func (*TransferView) Call

func (t *TransferView) Call(context view.Context) (txID interface{}, err error)

type TransferViewFactory

type TransferViewFactory struct{}

func (*TransferViewFactory) NewView

func (p *TransferViewFactory) NewView(in []byte) (view.View, error)

type TransferWithSelectorView

type TransferWithSelectorView struct {
	*Transfer
}

func (*TransferWithSelectorView) Call

func (t *TransferWithSelectorView) Call(context view.Context) (interface{}, error)

type TransferWithSelectorViewFactory

type TransferWithSelectorViewFactory struct{}

func (*TransferWithSelectorViewFactory) NewView

func (p *TransferWithSelectorViewFactory) NewView(in []byte) (view.View, error)

type WhoDeletedToken

type WhoDeletedToken struct {
	TMSID    token.TMSID
	TokenIDs []*token2.ID
}

type WhoDeletedTokenResult

type WhoDeletedTokenResult struct {
	Who     []string
	Deleted []bool
}

type WhoDeletedTokenView

type WhoDeletedTokenView struct {
	*WhoDeletedToken
}

func (*WhoDeletedTokenView) Call

func (w *WhoDeletedTokenView) Call(context view.Context) (interface{}, error)

type WhoDeletedTokenViewFactory

type WhoDeletedTokenViewFactory struct{}

func (*WhoDeletedTokenViewFactory) NewView

func (p *WhoDeletedTokenViewFactory) NewView(in []byte) (view.View, error)

type Withdrawal added in v0.3.0

type Withdrawal struct {
	// TMSID the token management service identifier
	TMSID token.TMSID
	// Wallet of the recipient of the cash to be issued
	Wallet string
	// Amount represent the number of units of a certain token type stored in the token
	Amount uint64
	// TokenType is the type of token to issue
	TokenType string
	// Issuer identifies the issuer
	Issuer string
	// Recipient information
	RecipientData *token.RecipientData
}

type WithdrawalInitiatorView added in v0.3.0

type WithdrawalInitiatorView struct {
	*Withdrawal
}

func (*WithdrawalInitiatorView) Call added in v0.3.0

func (i *WithdrawalInitiatorView) Call(context view.Context) (interface{}, error)

type WithdrawalInitiatorViewFactory added in v0.3.0

type WithdrawalInitiatorViewFactory struct{}

func (*WithdrawalInitiatorViewFactory) NewView added in v0.3.0

func (p *WithdrawalInitiatorViewFactory) NewView(in []byte) (view.View, error)

type WithdrawalResponderView added in v0.3.0

type WithdrawalResponderView struct {
}

func (*WithdrawalResponderView) Call added in v0.3.0

func (p *WithdrawalResponderView) Call(context view.Context) (interface{}, error)

Jump to

Keyboard shortcuts

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