Documentation ¶
Index ¶
- func CreateTestUser(_ context.Context, ciData CiTestData, userID string) (*wallet.User, error)
- func EmitFiat(ctx context.Context, fiatOwner, u *wallet.User, amount uint64, ch, cc string) (string, error)
- func GetBalance(_ context.Context, user *wallet.User, channelName, chainCodeName string) (uint64, error)
- func GetCcOwner(_ context.Context, ciData CiTestData) (*wallet.User, error)
- func GetFiatOwner(_ context.Context, ciData CiTestData) (*wallet.User, error)
- func GetIndustrialOwner(_ context.Context, ciData CiTestData) (*wallet.User, error)
- func ParseBalance(balanceResponse []byte) (uint64, error)
- type CiTestData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestUser ¶
CreateTestUser creates new user in ACL. It takes context, CiTestData and user ID. Returns new user and not nil err if user isn't created.
func EmitFiat ¶
func EmitFiat(ctx context.Context, fiatOwner, u *wallet.User, amount uint64, ch, cc string) (string, error)
EmitFiat emits 'amount' fiats to the user 'u' using passed 'fiatOwner' in channel "ch" and chaincode "cc". Returns tx ID string and err (not nil) if emit operation failed. WARN calling this function several times during the formation of one block can lead to conflicts on some stands.
func GetBalance ¶
func GetBalance(_ context.Context, user *wallet.User, channelName, chainCodeName string) (uint64, error)
GetBalance returns balance of user.
func GetCcOwner ¶
func GetFiatOwner ¶
func GetIndustrialOwner ¶
func ParseBalance ¶
ParseBalance parses chaincode response for balance query.
Types ¶
type CiTestData ¶
type CiTestData struct { RedisAddr string RedisPass string HlfProfilePath string HlfFiatChannel string HlfCcChannel string HlfIndustrialChannel string HlfNoCcChannel string HlfUserName string HlfCert string HlfFiatOwnerKey string HlfCcOwnerKey string HlfIndustrialOwnerKey string HlfSk string HlfIndustrialGroup1 string HlfIndustrialGroup2 string HlfDoSwapTests bool HlfDoMultiSwapTests bool HlfProfile *hlfprofile.HlfProfile }
Click to show internal directories.
Click to hide internal directories.