Documentation ¶
Index ¶
- Constants
- Variables
- func BroadcastPreparedTransferCash(network *integration.Infrastructure, id string, txID string, tx []byte, ...)
- func CheckAcceptedTransactions(network *integration.Infrastructure, id string, wallet string, ...)
- func CheckAuditedTransactions(network *integration.Infrastructure, auditor string, ...)
- func CheckAuditorDB(network *integration.Infrastructure, auditorID string, walletID string, ...)
- func CheckBalance(network *integration.Infrastructure, id string, wallet string, typ string, ...)
- func CheckBalanceAndHolding(network *integration.Infrastructure, id string, wallet string, typ string, ...)
- func CheckBalanceAndHoldingForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, ...)
- func CheckBalanceForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, ...)
- func CheckHolding(network *integration.Infrastructure, id string, wallet string, typ string, ...)
- func CheckHoldingForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, ...)
- func CheckIfExistsInVault(network *integration.Infrastructure, id string, tokenIDs []*token.ID)
- func CheckOwnerDB(network *integration.Infrastructure, expectedErrors []string, ids ...string)
- func CheckOwnerWalletIDs(network *integration.Infrastructure, id string, ids ...string)
- func CheckPublicParams(network *integration.Infrastructure, ids ...string)
- func CheckPublicParamsForTMSID(network *integration.Infrastructure, tmsId *token2.TMSID, ids ...string)
- func CheckSpending(network *integration.Infrastructure, id string, wallet string, ...)
- func CheckSpendingForTMSID(network *integration.Infrastructure, id string, wallet string, ...)
- func DoesWalletExist(network *integration.Infrastructure, id string, wallet string, walletType int) bool
- func FinalityWithTimeout(network *integration.Infrastructure, id string, tx []byte, ...)
- func GetAuditorIdentity(network *integration.Infrastructure, Id string) []byte
- func GetIssuerIdentity(network *integration.Infrastructure, Id string) []byte
- func GetPublicParams(network *integration.Infrastructure, id string) []byte
- func GetRevocationHandle(network *integration.Infrastructure, id string) string
- func GetTMS(network *integration.Infrastructure, networkName string) *topology.TMS
- func GetTransactionInfo(network *integration.Infrastructure, id string, txnId string) *ttx.TransactionInfo
- func GetTransactionInfoForTMSID(network *integration.Infrastructure, id string, txnId string, ...) *ttx.TransactionInfo
- func IssueCash(network *integration.Infrastructure, wallet string, typ string, amount uint64, ...) string
- func IssueCashForTMSID(network *integration.Infrastructure, wallet string, typ string, amount uint64, ...) string
- func JSONUnmarshalFloat64(v interface{}) float64
- func ListIssuerHistory(network *integration.Infrastructure, wallet, typ, issuer string) *token.IssuedTokens
- func ListIssuerHistoryForTMSID(network *integration.Infrastructure, wallet, typ, issuer string, ...) *token.IssuedTokens
- func ListUnspentTokens(network *integration.Infrastructure, id string, wallet string, typ string) *token.UnspentTokens
- func ListUnspentTokensForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, ...) *token.UnspentTokens
- func ListVaultUnspentTokens(network *integration.Infrastructure, id string) []*token.ID
- func PrepareTransferCash(network *integration.Infrastructure, id string, wallet string, typ string, ...) (string, []byte)
- func PruneInvalidUnspentTokens(network *integration.Infrastructure, ids ...string)
- func RedeemCash(network *integration.Infrastructure, id string, wallet string, typ string, ...)
- func RedeemCashByIDs(network *integration.Infrastructure, id string, wallet string, ids []*token.ID, ...)
- func RedeemCashForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, ...)
- func RegisterAuditor(network *integration.Infrastructure, id string, ...)
- func RegisterAuditorForTMSID(network *integration.Infrastructure, id string, tmsId *token2.TMSID, ...)
- func RegisterCertifier(network *integration.Infrastructure, id string)
- func RegisterIssuerWallet(network *integration.Infrastructure, id string, walletID, walletPath string)
- func RegisterOwnerWallet(network *integration.Infrastructure, id string, walletID, walletPath string)
- func Restart(network *integration.Infrastructure, deleteVault bool, ids ...string)
- func RevokeIdentity(network *integration.Infrastructure, auditor string, rh string)
- func SetKVSEntry(network *integration.Infrastructure, user string, key string, value string)
- func SetTransactionAuditStatus(network *integration.Infrastructure, id string, txID string, ...)
- func SetTransactionOwnersStatus(network *integration.Infrastructure, txID string, txStatus ttx.TxStatus, ...)
- func SwapCash(network *integration.Infrastructure, id string, wallet string, typeLeft string, ...)
- func TestAll(network *integration.Infrastructure, auditor string, ...)
- func TestMixed(network *integration.Infrastructure)
- func TestPublicParamsUpdate(network *integration.Infrastructure, auditor string, ppBytes []byte, ...)
- func TestRemoteOwnerWallet(network *integration.Infrastructure, auditor string, websSocket bool)
- func TestRevokeIdentity(network *integration.Infrastructure, auditor string, revocationHandle string, ...)
- func TokenSelectorUnlock(network *integration.Infrastructure, id string, txID string)
- func TransferCash(network *integration.Infrastructure, id string, wallet string, typ string, ...) string
- func TransferCashByIDs(network *integration.Infrastructure, id string, wallet string, ids []*token.ID, ...) string
- func TransferCashForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, ...) string
- func TransferCashMultiActions(network *integration.Infrastructure, id string, wallet string, typ string, ...) string
- func TransferCashWithExternalWallet(network *integration.Infrastructure, wmp *WalletManagerProvider, ...) string
- func TransferCashWithSelector(network *integration.Infrastructure, id string, wallet string, typ string, ...)
- func UpdatePublicParams(network *integration.Infrastructure, publicParams []byte, tms *topology.TMS)
- func WhoDeletedToken(network *integration.Infrastructure, id string, tokenIDs []*token.ID, ...) *views.WhoDeletedTokenResult
- func Withdraw(network *integration.Infrastructure, wpm *WalletManagerProvider, user string, ...) string
- type OnAuditorRestartFunc
- type SignerProvider
- type Stream
- type WalletManagerProvider
Constants ¶
View Source
const ( DLogNamespace = "dlog-token-chaincode" FabTokenNamespace = "fabtoken-token-chaincode" )
Variables ¶
View Source
var AliceAcceptedTransactions = []*ttxdb.TransactionRecord{ { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "alice", TokenType: "USD", Amount: big.NewInt(110), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "alice", TokenType: "USD", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, }
View Source
var AliceID1AcceptedTransactions = []*ttxdb.TransactionRecord{ { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "alice", TokenType: "EUR", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, }
View Source
var AuditedTransactions = []*ttxdb.TransactionRecord{ { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "alice", TokenType: "USD", Amount: big.NewInt(110), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "alice", TokenType: "USD", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "bob", TokenType: "EUR", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "bob", TokenType: "EUR", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "bob", TokenType: "EUR", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Transfer, SenderEID: "alice", RecipientEID: "bob", TokenType: "USD", Amount: big.NewInt(111), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Transfer, SenderEID: "alice", RecipientEID: "alice", TokenType: "USD", Amount: big.NewInt(9), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Transfer, SenderEID: "bob", RecipientEID: "bob", TokenType: "USD", Amount: big.NewInt(100), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Redeem, SenderEID: "bob", RecipientEID: "", TokenType: "USD", Amount: big.NewInt(11), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "bob", TokenType: "USD", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "alice", TokenType: "LIRA", Amount: big.NewInt(3), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "alice", TokenType: "LIRA", Amount: big.NewInt(3), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Transfer, SenderEID: "alice", RecipientEID: "bob", TokenType: "LIRA", Amount: big.NewInt(2), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Transfer, SenderEID: "alice", RecipientEID: "alice", TokenType: "LIRA", Amount: big.NewInt(1), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Transfer, SenderEID: "alice", RecipientEID: "charlie", TokenType: "LIRA", Amount: big.NewInt(3), Status: ttxdb.Confirmed, }, }
View Source
var BobAcceptedTransactions = []*ttxdb.TransactionRecord{ { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "bob", TokenType: "EUR", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "bob", TokenType: "EUR", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Issue, SenderEID: "", RecipientEID: "bob", TokenType: "EUR", Amount: big.NewInt(10), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Transfer, SenderEID: "alice", RecipientEID: "bob", TokenType: "USD", Amount: big.NewInt(111), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Transfer, SenderEID: "bob", RecipientEID: "bob", TokenType: "USD", Amount: big.NewInt(100), Status: ttxdb.Confirmed, }, { TxID: "", ActionType: ttxdb.Redeem, SenderEID: "bob", RecipientEID: "", TokenType: "USD", Amount: big.NewInt(11), Status: ttxdb.Confirmed, }, }
Functions ¶
func BroadcastPreparedTransferCash ¶
func BroadcastPreparedTransferCash(network *integration.Infrastructure, id string, txID string, tx []byte, finality bool, expectedErrorMsgs ...string)
func CheckAcceptedTransactions ¶
func CheckAcceptedTransactions(network *integration.Infrastructure, id string, wallet string, expected []*ttxdb.TransactionRecord, start *time.Time, end *time.Time, statuses []driver.TxStatus, actionTypes ...ttxdb.ActionType)
func CheckAuditedTransactions ¶
func CheckAuditedTransactions(network *integration.Infrastructure, auditor string, expected []*ttxdb.TransactionRecord, start *time.Time, end *time.Time)
func CheckAuditorDB ¶
func CheckAuditorDB(network *integration.Infrastructure, auditorID string, walletID string, errorCheck func([]string) error)
func CheckBalance ¶
func CheckBalance(network *integration.Infrastructure, id string, wallet string, typ string, expected uint64)
func CheckBalanceAndHolding ¶
func CheckBalanceAndHolding(network *integration.Infrastructure, id string, wallet string, typ string, expected uint64, auditorId string)
func CheckBalanceAndHoldingForTMSID ¶ added in v0.3.0
func CheckBalanceAndHoldingForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, expected uint64, auditorId string, tmsID *token2.TMSID)
func CheckBalanceForTMSID ¶ added in v0.3.0
func CheckBalanceForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, expected uint64, tmsID *token2.TMSID)
func CheckHolding ¶
func CheckHolding(network *integration.Infrastructure, id string, wallet string, typ string, expected int64, auditorId string)
func CheckHoldingForTMSID ¶ added in v0.3.0
func CheckHoldingForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, expected int64, auditorId string, tmsID *token2.TMSID)
func CheckIfExistsInVault ¶
func CheckIfExistsInVault(network *integration.Infrastructure, id string, tokenIDs []*token.ID)
func CheckOwnerDB ¶
func CheckOwnerDB(network *integration.Infrastructure, expectedErrors []string, ids ...string)
func CheckOwnerWalletIDs ¶ added in v0.3.0
func CheckOwnerWalletIDs(network *integration.Infrastructure, id string, ids ...string)
func CheckPublicParams ¶
func CheckPublicParams(network *integration.Infrastructure, ids ...string)
func CheckPublicParamsForTMSID ¶ added in v0.3.0
func CheckPublicParamsForTMSID(network *integration.Infrastructure, tmsId *token2.TMSID, ids ...string)
func CheckSpending ¶
func CheckSpending(network *integration.Infrastructure, id string, wallet string, tokenType string, auditor string, expected uint64)
func CheckSpendingForTMSID ¶ added in v0.3.0
func CheckSpendingForTMSID(network *integration.Infrastructure, id string, wallet string, tokenType string, auditor string, expected uint64, tmsId *token2.TMSID)
func DoesWalletExist ¶ added in v0.3.0
func DoesWalletExist(network *integration.Infrastructure, id string, wallet string, walletType int) bool
func FinalityWithTimeout ¶
func FinalityWithTimeout(network *integration.Infrastructure, id string, tx []byte, timeout time.Duration)
func GetAuditorIdentity ¶ added in v0.2.0
func GetAuditorIdentity(network *integration.Infrastructure, Id string) []byte
func GetIssuerIdentity ¶ added in v0.2.0
func GetIssuerIdentity(network *integration.Infrastructure, Id string) []byte
func GetPublicParams ¶ added in v0.2.0
func GetPublicParams(network *integration.Infrastructure, id string) []byte
func GetRevocationHandle ¶ added in v0.3.0
func GetRevocationHandle(network *integration.Infrastructure, id string) string
func GetTMS ¶ added in v0.2.0
func GetTMS(network *integration.Infrastructure, networkName string) *topology.TMS
func GetTransactionInfo ¶
func GetTransactionInfo(network *integration.Infrastructure, id string, txnId string) *ttx.TransactionInfo
func GetTransactionInfoForTMSID ¶ added in v0.3.0
func GetTransactionInfoForTMSID(network *integration.Infrastructure, id string, txnId string, tmsId *token2.TMSID) *ttx.TransactionInfo
func IssueCashForTMSID ¶ added in v0.3.0
func JSONUnmarshalFloat64 ¶
func JSONUnmarshalFloat64(v interface{}) float64
func ListIssuerHistory ¶
func ListIssuerHistory(network *integration.Infrastructure, wallet, typ, issuer string) *token.IssuedTokens
func ListIssuerHistoryForTMSID ¶ added in v0.3.0
func ListIssuerHistoryForTMSID(network *integration.Infrastructure, wallet, typ, issuer string, tmsId *token2.TMSID) *token.IssuedTokens
func ListUnspentTokens ¶
func ListUnspentTokens(network *integration.Infrastructure, id string, wallet string, typ string) *token.UnspentTokens
func ListUnspentTokensForTMSID ¶ added in v0.3.0
func ListUnspentTokensForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, tmsId *token2.TMSID) *token.UnspentTokens
func ListVaultUnspentTokens ¶
func ListVaultUnspentTokens(network *integration.Infrastructure, id string) []*token.ID
func PrepareTransferCash ¶
func PruneInvalidUnspentTokens ¶
func PruneInvalidUnspentTokens(network *integration.Infrastructure, ids ...string)
func RedeemCash ¶
func RedeemCash(network *integration.Infrastructure, id string, wallet string, typ string, amount uint64, auditor string)
func RedeemCashByIDs ¶
func RedeemCashByIDs(network *integration.Infrastructure, id string, wallet string, ids []*token.ID, amount uint64, auditor string)
func RedeemCashForTMSID ¶ added in v0.3.0
func RedeemCashForTMSID(network *integration.Infrastructure, id string, wallet string, typ string, amount uint64, auditor string, tmsId *token2.TMSID)
func RegisterAuditor ¶
func RegisterAuditor(network *integration.Infrastructure, id string, onAuditorRestart OnAuditorRestartFunc)
func RegisterAuditorForTMSID ¶ added in v0.3.0
func RegisterAuditorForTMSID(network *integration.Infrastructure, id string, tmsId *token2.TMSID, onAuditorRestart OnAuditorRestartFunc)
func RegisterCertifier ¶
func RegisterCertifier(network *integration.Infrastructure, id string)
func RegisterIssuerWallet ¶
func RegisterIssuerWallet(network *integration.Infrastructure, id string, walletID, walletPath string)
func RegisterOwnerWallet ¶ added in v0.2.0
func RegisterOwnerWallet(network *integration.Infrastructure, id string, walletID, walletPath string)
func Restart ¶
func Restart(network *integration.Infrastructure, deleteVault bool, ids ...string)
func RevokeIdentity ¶ added in v0.3.0
func RevokeIdentity(network *integration.Infrastructure, auditor string, rh string)
func SetKVSEntry ¶ added in v0.3.0
func SetKVSEntry(network *integration.Infrastructure, user string, key string, value string)
func SetTransactionAuditStatus ¶
func SetTransactionAuditStatus(network *integration.Infrastructure, id string, txID string, txStatus ttx.TxStatus)
func SetTransactionOwnersStatus ¶
func SetTransactionOwnersStatus(network *integration.Infrastructure, txID string, txStatus ttx.TxStatus, ids ...string)
func SwapCash ¶
func SwapCash(network *integration.Infrastructure, id string, wallet string, typeLeft string, amountLeft uint64, typRight string, amountRight uint64, receiver string, auditor string)
func TestAll ¶
func TestAll(network *integration.Infrastructure, auditor string, onAuditorRestart OnAuditorRestartFunc, aries bool)
func TestMixed ¶ added in v0.3.0
func TestMixed(network *integration.Infrastructure)
func TestPublicParamsUpdate ¶ added in v0.2.0
func TestPublicParamsUpdate(network *integration.Infrastructure, auditor string, ppBytes []byte, tms *topology.TMS, issuerAsAuditor bool)
func TestRemoteOwnerWallet ¶ added in v0.3.0
func TestRemoteOwnerWallet(network *integration.Infrastructure, auditor string, websSocket bool)
func TestRevokeIdentity ¶ added in v0.3.0
func TestRevokeIdentity(network *integration.Infrastructure, auditor string, revocationHandle string, errorMessage string)
func TokenSelectorUnlock ¶
func TokenSelectorUnlock(network *integration.Infrastructure, id string, txID string)
func TransferCash ¶
func TransferCash(network *integration.Infrastructure, id string, wallet string, typ string, amount uint64, receiver string, auditor string, expectedErrorMsgs ...string) string
func TransferCashByIDs ¶
func TransferCashForTMSID ¶ added in v0.3.0
func TransferCashMultiActions ¶ added in v0.3.0
func TransferCashWithExternalWallet ¶ added in v0.3.0
func TransferCashWithExternalWallet(network *integration.Infrastructure, wmp *WalletManagerProvider, websSocket bool, id string, wallet string, typ string, amount uint64, receiver string, auditor string, expectedErrorMsgs ...string) string
func TransferCashWithSelector ¶
func TransferCashWithSelector(network *integration.Infrastructure, id string, wallet string, typ string, amount uint64, receiver string, auditor string, expectedErrorMsgs ...string)
func UpdatePublicParams ¶ added in v0.2.0
func UpdatePublicParams(network *integration.Infrastructure, publicParams []byte, tms *topology.TMS)
func WhoDeletedToken ¶
func WhoDeletedToken(network *integration.Infrastructure, id string, tokenIDs []*token.ID, txIDs ...string) *views.WhoDeletedTokenResult
func Withdraw ¶ added in v0.3.0
func Withdraw(network *integration.Infrastructure, wpm *WalletManagerProvider, user string, wallet string, typ string, amount uint64, auditor string, IssuerId string, expectedErrorMsgs ...string) string
Types ¶
type OnAuditorRestartFunc ¶ added in v0.3.0
type OnAuditorRestartFunc = func(*integration.Infrastructure, string)
type SignerProvider ¶ added in v0.3.0
type SignerProvider struct { *WalletManagerProvider Id, Wallet string }
func NewSignerProvider ¶ added in v0.3.0
func NewSignerProvider(walletManagerProvider *WalletManagerProvider, id string, wallet string) *SignerProvider
type WalletManagerProvider ¶ added in v0.3.0
type WalletManagerProvider struct { II *integration.Infrastructure Managers map[string]*token.WalletManager }
func NewWalletManagerProvider ¶ added in v0.3.0
func NewWalletManagerProvider(II *integration.Infrastructure) *WalletManagerProvider
func (*WalletManagerProvider) RecipientData ¶ added in v0.3.0
func (p *WalletManagerProvider) RecipientData(user string, wallet string) *token.RecipientData
func (*WalletManagerProvider) SignerProvider ¶ added in v0.3.0
func (p *WalletManagerProvider) SignerProvider(id string, wallet string) *SignerProvider
Click to show internal directories.
Click to hide internal directories.