views

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 36 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 AssertTokens added in v0.4.0

func AssertTokens(sp token.ServiceProvider, tx *ttx.Transaction, outputs *token.OutputStream, id view.Identity)

AssertTokens checks that the tokens are or are not in the tokendb

func GetKVS added in v0.4.0

func GetKVS(sp services.Provider) *kvs.KVS

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, opts ...token.ServiceOption) []token.ServiceOption

ServiceOpts creates a new array of token.ServiceOption containing token.WithTMSID and any additional token.ServiceOption passed to this function

func TxOpts added in v0.3.0

func TxOpts(tmsId *token.TMSID, opts ...ttx.TxOption) []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     token2.Type
	Quantity string
	CoOwned  string
}

type BalanceQuery

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

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 Binding added in v0.5.0

type Binding struct {
	FSCNodeIdentity view.Identity
	Alias           view.Identity
}

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 CoOwnedBalanceQuery added in v0.5.0

type CoOwnedBalanceQuery struct {
	TMSID  *token.TMSID
	Wallet string
	Type   token2.Type
}

type CoOwnedBalanceView added in v0.5.0

type CoOwnedBalanceView struct {
	*CoOwnedBalanceQuery
}

func (*CoOwnedBalanceView) Call added in v0.5.0

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

type CoOwnedBalanceViewFactory added in v0.5.0

type CoOwnedBalanceViewFactory struct{}

func (*CoOwnedBalanceViewFactory) NewView added in v0.5.0

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

type CurrentHolding

type CurrentHolding struct {
	EnrollmentID string
	TokenType    token2.Type
	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    token2.Type  `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 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 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 token2.Type
	// 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
	// RecipientWalletID specifies the wallet ID of the recipient
	RecipientWalletID string
	// RecipientEID is the expected enrolment id of the recipient
	RecipientEID string
	// SkipAuditorSignatureVerification set to true to skip the verification of the auditor signature during endorsement collection
	SkipAuditorSignatureVerification bool
}

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 IssuerRedeemAcceptView added in v0.5.0

type IssuerRedeemAcceptView struct{}

func (*IssuerRedeemAcceptView) Call added in v0.5.0

func (a *IssuerRedeemAcceptView) Call(context view.Context) (interface{}, 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        []ttxdb.TxStatus
	TMSID           *token.TMSID
}

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 token2.Type
	// 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 token2.Type
	// 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 MaliciousTransferView added in v0.4.0

type MaliciousTransferView struct {
	*Transfer
}

func (*MaliciousTransferView) Call added in v0.4.0

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

type MaliciousTransferViewFactory added in v0.4.0

type MaliciousTransferViewFactory struct{}

func (*MaliciousTransferViewFactory) NewView added in v0.4.0

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

type MultiSigAcceptSpendView added in v0.5.0

type MultiSigAcceptSpendView struct{}

func (*MultiSigAcceptSpendView) Call added in v0.5.0

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

type MultiSigLock added in v0.5.0

type MultiSigLock 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
	// Type of tokens to transfer
	Type token.Type
	// Amount to transfer
	Amount uint64
	// MultisigIdentities contains the identities of the FSC nodes of the multisig escrow
	MultisigIdentities []view.Identity
	// MultisigEIDs contains the expected enrolment ids of the multisig escrow
	MultisigEIDs []string
	// The TMS to pick in case of multiple TMSIDs
	TMSID *token2.TMSID
	// NotAnonymous true if the transaction must be anonymous, false otherwise
	NotAnonymous bool
}

MultiSigLock contains the input information for a multisig-based escrow

type MultiSigLockView added in v0.5.0

type MultiSigLockView struct {
	*MultiSigLock
}

func (*MultiSigLockView) Call added in v0.5.0

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

type MultiSigLockViewFactory added in v0.5.0

type MultiSigLockViewFactory struct{}

func (*MultiSigLockViewFactory) NewView added in v0.5.0

func (f *MultiSigLockViewFactory) NewView(in []byte) (view.View, error)

type MultiSigSpend added in v0.5.0

type MultiSigSpend 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
	// MultisigIdentities contains the identities of the FSC nodes of the multisig escrow
	Recipient view.Identity
	// The TMS to pick in case of multiple TMSIDs
	TMSID     *token2.TMSID
	TokenType token.Type
}

MultiSigSpend contains the input information to spend a token

type MultiSigSpendView added in v0.5.0

type MultiSigSpendView struct {
	*MultiSigSpend
}

func (*MultiSigSpendView) Call added in v0.5.0

func (r *MultiSigSpendView) Call(context view.Context) (res interface{}, err error)

type MultiSigSpendViewFactory added in v0.5.0

type MultiSigSpendViewFactory struct{}

func (*MultiSigSpendViewFactory) NewView added in v0.5.0

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

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
	// Issuer is the name of the issuer that must be contacted to approve the operation
	Issuer string
	// IssuerPublicParamsPublicKey is the public key of the issuer against which the issuer signature in the Redeem action will be checked.
	IssuerPublicParamsPublicKey view.Identity
	// 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 token.Type
	// 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 RegisterIssuerIdentityView added in v0.4.0

type RegisterIssuerIdentityView struct {
	*RegisterIssuerWallet
}

RegisterIssuerIdentityView is a view that register an issuer wallet

func (*RegisterIssuerIdentityView) Call added in v0.4.0

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

type RegisterIssuerIdentityViewFactory added in v0.4.0

type RegisterIssuerIdentityViewFactory struct{}

func (*RegisterIssuerIdentityViewFactory) NewView added in v0.4.0

type RegisterIssuerWallet

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

type RegisterOwnerIdentity added in v0.4.0

type RegisterOwnerIdentity struct {
	token.IdentityConfiguration
	TMSID token.TMSID
}

type RegisterOwnerIdentityView added in v0.4.0

type RegisterOwnerIdentityView struct {
	*RegisterOwnerIdentity
}

RegisterOwnerIdentityView is a view that registers an owner wallet

func (*RegisterOwnerIdentityView) Call added in v0.4.0

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

type RegisterOwnerIdentityViewFactory added in v0.4.0

type RegisterOwnerIdentityViewFactory struct{}

func (*RegisterOwnerIdentityViewFactory) NewView added in v0.4.0

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

type RegisterRecipientData added in v0.4.0

type RegisterRecipientData struct {
	TMSID         token.TMSID
	WalletID      string
	RecipientData token.RecipientData
}

type RegisterRecipientDataView added in v0.4.0

type RegisterRecipientDataView struct {
	*RegisterRecipientData
}

RegisterRecipientDataView is a view that registers recipient data

func (*RegisterRecipientDataView) Call added in v0.4.0

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

type RegisterRecipientDataViewFactory added in v0.4.0

type RegisterRecipientDataViewFactory struct{}

func (*RegisterRecipientDataViewFactory) NewView added in v0.4.0

func (p *RegisterRecipientDataViewFactory) 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 SetBindingView added in v0.5.0

type SetBindingView struct {
	*Binding
}

func (*SetBindingView) Call added in v0.5.0

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

type SetBindingViewFactory added in v0.5.0

type SetBindingViewFactory struct{}

func (*SetBindingViewFactory) NewView added in v0.5.0

func (p *SetBindingViewFactory) 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 SetSpendableFlag added in v0.4.0

type SetSpendableFlag struct {
	TMSID     token.TMSID
	TokenID   token2.ID
	Spendable bool
}

type SetSpendableFlagView added in v0.4.0

type SetSpendableFlagView struct {
	*SetSpendableFlag
}

func (*SetSpendableFlagView) Call added in v0.4.0

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

type SetSpendableFlagViewFactory added in v0.4.0

type SetSpendableFlagViewFactory struct{}

func (*SetSpendableFlagViewFactory) NewView added in v0.4.0

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

type SetTransactionAuditStatus

type SetTransactionAuditStatus struct {
	TxID    string
	Status  ttx.TxStatus
	Message string
}

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
	Message string
}

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 token.Type
	// FromAliceAmount is the amount Alice will transfer
	FromAliceAmount uint64
	// FromBobType is the token type Bob will transfer
	FromBobType token.Type
	// 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(ctx context.Context, txID string) ([]byte, error)
	Transactions(ctx context.Context, params driver.QueryTransactionsParams, pagination driver2.Pagination) (*driver2.PageIterator[*driver.TransactionRecord], error)
}

type TokensUpgrade added in v0.5.0

type TokensUpgrade struct {
	// TMSID the token management service identifier
	TMSID token.TMSID
	// Wallet of the recipient of the cash to be issued
	Wallet string
	// TokenType is the type of token to issue
	TokenType token2.Type
	// Issuer identifies the issuer
	Issuer string
	// Recipient information
	RecipientData *token.RecipientData
	// NotAnonymous true if the transaction must be anonymous, false otherwise
	NotAnonymous bool
}

type TokensUpgradeInitiatorView added in v0.5.0

type TokensUpgradeInitiatorView struct {
	*TokensUpgrade
}

func (*TokensUpgradeInitiatorView) Call added in v0.5.0

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

type TokensUpgradeInitiatorViewFactory added in v0.5.0

type TokensUpgradeInitiatorViewFactory struct{}

func (*TokensUpgradeInitiatorViewFactory) NewView added in v0.5.0

type TokensUpgradeResponderView added in v0.5.0

type TokensUpgradeResponderView struct {
	Auditor string
}

func (*TokensUpgradeResponderView) Call added in v0.5.0

func (p *TokensUpgradeResponderView) Call(context view.Context) (interface{}, 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
	// 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 token.Type
	// 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
	// RecipientWalletID specifies the wallet ID for the recipient
	RecipientWalletID 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
	// SenderChangeRecipientData contains the recipient data that needs to be used by sender to receive the change of the transfer operation, if needed.
	// If this field is set to nil, then the token sdk generates this information as needed.
	SenderChangeRecipientData *token2.RecipientData
	// RecipientData contains the recipient data of the recipient of the transfer.
	// If nil, the view will ask the remote part to generate it, otherwise the view will notify the recipient
	// about the recipient data that will be used to the transfer.
	RecipientData *token2.RecipientData
	// The TMS to pick in case of multiple TMSIDs
	TMSID *token2.TMSID
	// NotAnonymous true if the transaction must be anonymous, false otherwise
	NotAnonymous bool
	// Metadata contains application metadata to append to the transaction
	Metadata map[string][]byte
}

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 TxStatus added in v0.4.0

type TxStatus struct {
	TMSID token.TMSID
	TxID  string
}

type TxStatusResponse added in v0.4.0

type TxStatusResponse struct {
	ValidationCode    ttx.TxStatus
	ValidationMessage string
}

type TxStatusView added in v0.4.0

type TxStatusView struct {
	*TxStatus
}

func (*TxStatusView) Call added in v0.4.0

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

type TxStatusViewFactory added in v0.4.0

type TxStatusViewFactory struct{}

func (*TxStatusViewFactory) NewView added in v0.4.0

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

type UpdatePublicParams added in v0.5.0

type UpdatePublicParams struct {
	TMSID token.TMSID
}

type UpdatePublicParamsView added in v0.5.0

type UpdatePublicParamsView struct {
	*UpdatePublicParams
}

func (*UpdatePublicParamsView) Call added in v0.5.0

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

type UpdatePublicParamsViewFactory added in v0.5.0

type UpdatePublicParamsViewFactory struct{}

func (*UpdatePublicParamsViewFactory) NewView added in v0.5.0

func (p *UpdatePublicParamsViewFactory) 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 token2.Type
	// Issuer identifies the issuer
	Issuer string
	// Recipient information
	RecipientData *token.RecipientData
	// NotAnonymous true if the transaction must be anonymous, false otherwise
	NotAnonymous bool
}

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 {
	Auditor string
}

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