Documentation ¶
Overview ¶
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- func AssertTokensInVault(vault *network.Vault, tx *ttx.Transaction, outputs *token.OutputStream, ...)
- func GetTMSPublicParams(tms *token.ManagementService) []byte
- func ServiceOpts(tmsId *token.TMSID) []token.ServiceOption
- func TxOpts(tmsId *token.TMSID) []ttx.TxOption
- type AcceptCashView
- type AcceptPreparedCashView
- type AuditView
- type Balance
- type BalanceQuery
- type BalanceView
- type BalanceViewFactory
- type BroadcastPreparedTransfer
- type BroadcastPreparedTransferView
- type BroadcastPreparedTransferViewFactory
- type CheckIfExistsInVault
- type CheckIfExistsInVaultView
- type CheckIfExistsInVaultViewFactory
- type CheckPublicParamsMatch
- type CheckPublicParamsMatchView
- type CheckPublicParamsMatchViewFactory
- type CheckTTXDB
- type CheckTTXDBView
- type CheckTTXDBViewFactory
- type CurrentHolding
- type CurrentHoldingView
- type CurrentHoldingViewFactory
- type CurrentSpending
- type CurrentSpendingView
- type CurrentSpendingViewFactory
- type DoesWalletExist
- type DoesWalletExistView
- type DoesWalletExistViewFactory
- type FinalityWithTimeout
- type FinalityWithTimeoutView
- type FinalityWithTimeoutViewFactory
- type GetAuditorWalletIdentity
- type GetAuditorWalletIdentityView
- type GetAuditorWalletIdentityViewFactory
- type GetEnrollmentID
- type GetEnrollmentIDView
- type GetEnrollmentIDViewFactory
- type GetIssuerWalletIdentity
- type GetIssuerWalletIdentityView
- type GetIssuerWalletIdentityViewFactory
- type GetPublicParams
- type GetPublicParamsView
- type GetPublicParamsViewFactory
- type GetRevocationHandle
- type GetRevocationHandleView
- type GetRevocationHandleViewFactory
- type IssueCash
- type IssueCashView
- type IssueCashViewFactory
- type KVSEntry
- type ListAcceptedTransactions
- type ListAcceptedTransactionsView
- type ListAcceptedTransactionsViewFactory
- type ListAuditedTransactions
- type ListAuditedTransactionsView
- type ListAuditedTransactionsViewFactory
- type ListIssuedTokens
- type ListIssuedTokensView
- type ListIssuedTokensViewFactory
- type ListOwnerWalletIDsView
- type ListOwnerWalletIDsViewFactory
- type ListUnspentTokens
- type ListUnspentTokensView
- type ListUnspentTokensViewFactory
- type ListVaultUnspentTokens
- type ListVaultUnspentTokensView
- type ListVaultUnspentTokensViewFactory
- type PrepareTransferResult
- type PrepareTransferView
- type PrepareTransferViewFactory
- type PruneInvalidUnspentTokens
- type PruneInvalidUnspentTokensView
- type PruneInvalidUnspentTokensViewFactory
- type Redeem
- type RedeemView
- type RedeemViewFactory
- type RegisterAuditor
- type RegisterAuditorView
- type RegisterAuditorViewFactory
- type RegisterCertifier
- type RegisterCertifierView
- type RegisterCertifierViewFactory
- type RegisterIssuerWallet
- type RegisterIssuerWalletView
- type RegisterIssuerWalletViewFactory
- type RegisterOwnerWallet
- type RegisterOwnerWalletView
- type RegisterOwnerWalletViewFactory
- type RevocationHandle
- type RevokeUser
- type RevokeUserView
- type RevokeUserViewFactory
- type SetKVSEntryView
- type SetKVSEntryViewFactory
- type SetTransactionAuditStatus
- type SetTransactionAuditStatusView
- type SetTransactionAuditStatusViewFactory
- type SetTransactionOwnerStatus
- type SetTransactionOwnerStatusView
- type SetTransactionOwnerStatusViewFactory
- type Swap
- type SwapInitiatorView
- type SwapInitiatorViewFactory
- type SwapResponderView
- type TokenSelectorUnlock
- type TokenSelectorUnlockView
- type TokenSelectorUnlockViewFactory
- type TokenTransactionDB
- type TransactionInfo
- type TransactionInfoView
- type TransactionInfoViewFactory
- type Transfer
- type TransferAction
- type TransferView
- type TransferViewFactory
- type TransferWithSelectorView
- type TransferWithSelectorViewFactory
- type WhoDeletedToken
- type WhoDeletedTokenResult
- type WhoDeletedTokenView
- type WhoDeletedTokenViewFactory
- type Withdrawal
- type WithdrawalInitiatorView
- type WithdrawalInitiatorViewFactory
- type WithdrawalResponderView
Constants ¶
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
Types ¶
type AcceptCashView ¶
type AcceptCashView struct{}
type AcceptPreparedCashView ¶
type AcceptPreparedCashView struct {
WaitFinality bool
}
type BalanceView ¶
type BalanceView struct {
*BalanceQuery
}
type BalanceViewFactory ¶
type BalanceViewFactory struct{}
type BroadcastPreparedTransferView ¶
type BroadcastPreparedTransferView struct {
*BroadcastPreparedTransfer
}
BroadcastPreparedTransferView is a view that broadcasts a prepared transfer transaction
type BroadcastPreparedTransferViewFactory ¶
type BroadcastPreparedTransferViewFactory struct{}
type CheckIfExistsInVaultView ¶
type CheckIfExistsInVaultView struct {
*CheckIfExistsInVault
}
type CheckIfExistsInVaultViewFactory ¶
type CheckIfExistsInVaultViewFactory struct { }
type CheckPublicParamsMatch ¶
type CheckPublicParamsMatchView ¶
type CheckPublicParamsMatchView struct {
*CheckPublicParamsMatch
}
type CheckPublicParamsMatchViewFactory ¶
type CheckPublicParamsMatchViewFactory struct{}
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.
type CheckTTXDBViewFactory ¶
type CheckTTXDBViewFactory struct{}
type CurrentHolding ¶
type CurrentHoldingView ¶
type CurrentHoldingView struct {
*CurrentHolding
}
CurrentHoldingView is used to retrieve the current holding of token type of the passed enrollment id
type CurrentHoldingViewFactory ¶
type CurrentHoldingViewFactory struct{}
type CurrentSpending ¶
type CurrentSpendingView ¶
type CurrentSpendingView struct {
*CurrentSpending
}
CurrentSpendingView is used to retrieve the current spending of token type of the passed enrollment id
type CurrentSpendingViewFactory ¶
type CurrentSpendingViewFactory struct{}
type DoesWalletExist ¶ added in v0.3.0
type DoesWalletExistView ¶ added in v0.3.0
type DoesWalletExistView struct {
*DoesWalletExist
}
type DoesWalletExistViewFactory ¶ added in v0.3.0
type DoesWalletExistViewFactory struct{}
type FinalityWithTimeout ¶
type FinalityWithTimeoutView ¶
type FinalityWithTimeoutView struct {
*FinalityWithTimeout
}
FinalityWithTimeoutView is a view that runs the finality view with timeout. The timeout is expected to happen
type FinalityWithTimeoutViewFactory ¶
type FinalityWithTimeoutViewFactory struct{}
type GetAuditorWalletIdentity ¶ added in v0.2.0
type GetAuditorWalletIdentity struct {
ID string
}
type GetAuditorWalletIdentityView ¶ added in v0.2.0
type GetAuditorWalletIdentityView struct {
*GetAuditorWalletIdentity
}
type GetAuditorWalletIdentityViewFactory ¶ added in v0.2.0
type GetAuditorWalletIdentityViewFactory struct{}
type GetEnrollmentID ¶
type GetEnrollmentIDView ¶
type GetEnrollmentIDView struct {
*GetEnrollmentID
}
GetEnrollmentIDView is a view that returns the enrollment ID of a wallet.
type GetEnrollmentIDViewFactory ¶
type GetEnrollmentIDViewFactory struct{}
type GetIssuerWalletIdentity ¶ added in v0.2.0
type GetIssuerWalletIdentity struct {
ID string
}
type GetIssuerWalletIdentityView ¶ added in v0.2.0
type GetIssuerWalletIdentityView struct {
*GetIssuerWalletIdentity
}
type GetIssuerWalletIdentityViewFactory ¶ added in v0.2.0
type GetIssuerWalletIdentityViewFactory struct{}
type GetPublicParams ¶ added in v0.2.0
type GetPublicParamsView ¶ added in v0.2.0
type GetPublicParamsView struct {
*GetPublicParams
}
type GetPublicParamsViewFactory ¶ added in v0.2.0
type GetPublicParamsViewFactory struct{}
type GetRevocationHandle ¶ added in v0.3.0
type GetRevocationHandleView ¶ added in v0.3.0
type GetRevocationHandleView struct {
*GetRevocationHandle
}
type GetRevocationHandleViewFactory ¶ added in v0.3.0
type GetRevocationHandleViewFactory struct{}
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
}
type IssueCashViewFactory ¶
type IssueCashViewFactory struct{}
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
}
type ListAcceptedTransactionsViewFactory ¶
type ListAcceptedTransactionsViewFactory struct{}
type ListAuditedTransactions ¶
type ListAuditedTransactionsView ¶
type ListAuditedTransactionsView struct {
*ListAuditedTransactions
}
type ListAuditedTransactionsViewFactory ¶
type ListAuditedTransactionsViewFactory struct{}
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
}
type ListIssuedTokensViewFactory ¶
type ListIssuedTokensViewFactory struct{}
type ListOwnerWalletIDsView ¶ added in v0.3.0
type ListOwnerWalletIDsView struct{}
type ListOwnerWalletIDsViewFactory ¶ added in v0.3.0
type ListOwnerWalletIDsViewFactory struct{}
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
}
type ListUnspentTokensViewFactory ¶
type ListUnspentTokensViewFactory struct{}
type ListVaultUnspentTokens ¶
type ListVaultUnspentTokensView ¶
type ListVaultUnspentTokensView struct {
*ListVaultUnspentTokens
}
type ListVaultUnspentTokensViewFactory ¶
type ListVaultUnspentTokensViewFactory struct{}
type PrepareTransferResult ¶
type PrepareTransferView ¶
type PrepareTransferView struct {
*Transfer
}
PrepareTransferView is a view that prepares a transfer transaction without broadcasting it
type PrepareTransferViewFactory ¶
type PrepareTransferViewFactory struct{}
type PruneInvalidUnspentTokensView ¶
type PruneInvalidUnspentTokensView struct {
*PruneInvalidUnspentTokens
}
type PruneInvalidUnspentTokensViewFactory ¶
type PruneInvalidUnspentTokensViewFactory struct{}
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
}
type RedeemViewFactory ¶
type RedeemViewFactory struct{}
type RegisterAuditor ¶ added in v0.3.0
type RegisterAuditorView ¶
type RegisterAuditorView struct {
*RegisterAuditor
}
type RegisterAuditorViewFactory ¶
type RegisterAuditorViewFactory struct{}
type RegisterCertifier ¶
type RegisterCertifierView ¶
type RegisterCertifierView struct {
*RegisterCertifier
}
type RegisterCertifierViewFactory ¶
type RegisterCertifierViewFactory struct{}
type RegisterIssuerWallet ¶
type RegisterIssuerWalletView ¶
type RegisterIssuerWalletView struct {
*RegisterIssuerWallet
}
RegisterIssuerWalletView is a view that register an issuer wallet
type RegisterIssuerWalletViewFactory ¶
type RegisterIssuerWalletViewFactory struct{}
type RegisterOwnerWallet ¶ added in v0.2.0
type RegisterOwnerWalletView ¶ added in v0.2.0
type RegisterOwnerWalletView struct {
*RegisterOwnerWallet
}
RegisterOwnerWalletView is a view that registers an owner wallet
type RegisterOwnerWalletViewFactory ¶ added in v0.2.0
type RegisterOwnerWalletViewFactory struct{}
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
}
type RevokeUserViewFactory ¶ added in v0.3.0
type RevokeUserViewFactory struct{}
type SetKVSEntryView ¶ added in v0.3.0
type SetKVSEntryView struct {
*KVSEntry
}
type SetKVSEntryViewFactory ¶ added in v0.3.0
type SetKVSEntryViewFactory struct{}
type SetTransactionAuditStatusView ¶
type SetTransactionAuditStatusView struct {
*SetTransactionAuditStatus
}
SetTransactionAuditStatusView is used to set the status of a given transaction in the audit db
type SetTransactionAuditStatusViewFactory ¶
type SetTransactionAuditStatusViewFactory struct{}
type SetTransactionOwnerStatusView ¶
type SetTransactionOwnerStatusView struct {
*SetTransactionOwnerStatus
}
SetTransactionOwnerStatusView is used to set the status of a given transaction in the audit db
type SetTransactionOwnerStatusViewFactory ¶
type SetTransactionOwnerStatusViewFactory struct{}
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
}
type SwapInitiatorViewFactory ¶
type SwapInitiatorViewFactory struct{}
type SwapResponderView ¶
type SwapResponderView struct{}
type TokenSelectorUnlock ¶
type TokenSelectorUnlock struct {
TxID string
}
type TokenSelectorUnlockView ¶
type TokenSelectorUnlockView struct {
*TokenSelectorUnlock
}
TokenSelectorUnlockView is a view that broadcasts a prepared transfer transaction
type TokenSelectorUnlockViewFactory ¶
type TokenSelectorUnlockViewFactory struct{}
type TokenTransactionDB ¶ added in v0.3.0
type TransactionInfo ¶
TransactionInfo contains the input information to search for transaction info
type TransactionInfoView ¶
type TransactionInfoView struct {
*TransactionInfo
}
type TransactionInfoViewFactory ¶
type TransactionInfoViewFactory struct{}
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
}
type TransferViewFactory ¶
type TransferViewFactory struct{}
type TransferWithSelectorView ¶
type TransferWithSelectorView struct {
*Transfer
}
type TransferWithSelectorViewFactory ¶
type TransferWithSelectorViewFactory struct{}
type WhoDeletedTokenResult ¶
type WhoDeletedTokenView ¶
type WhoDeletedTokenView struct {
*WhoDeletedToken
}
type WhoDeletedTokenViewFactory ¶
type WhoDeletedTokenViewFactory struct{}
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
}
type WithdrawalInitiatorViewFactory ¶ added in v0.3.0
type WithdrawalInitiatorViewFactory struct{}
type WithdrawalResponderView ¶ added in v0.3.0
type WithdrawalResponderView struct { }