testcases

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserByUserID

func AddUserByUserID(aclAPI *acl.API, userID string) (*basetoken.KeyPair, error)

func AddUserByUserIDAndPublicKey

func AddUserByUserIDAndPublicKey(aclAPI *acl.API, userID string, publicKey ed25519.PublicKey) error

func GetAllowedBalance

func GetAllowedBalance(externalChannel basetoken.BaseTokenInterface, address string, token string) (uint64, error)

func GetBalance

func GetBalance(tokenChannel basetoken.BaseTokenInterface, address string) (uint64, error)

func Retry

func Retry(
	ctx context.Context,
	what func() error,
	d time.Duration,
) error

func Swap

func Swap(fromChaincodeAPI basetoken.BaseTokenInterface, toChaincodeAPI basetoken.BaseTokenInterface, keyPair *basetoken.KeyPair, token string, swapAmount uint64) error

Swap user token from one cc to another cc fromChaincodeAPI - source chaincode api toChaincodeAPI - target chaincode api user - who will swap token - token owner token - title token swapAmount - amount of token

func UserAllowedBalanceShouldBe

func UserAllowedBalanceShouldBe(keyPair *basetoken.KeyPair, externalChannel basetoken.BaseTokenInterface, token string, expectedAllowedAmount uint64) error

func UserBalanceShouldBe

func UserBalanceShouldBe(keyPair *basetoken.KeyPair, tokenOwnChannel basetoken.BaseTokenInterface, expectedAmount uint64) error

func WaitSwapInOtherChannel

func WaitSwapInOtherChannel(chaincodeAPI basetoken.BaseTokenInterface, swapTransactionID string) (*channel.Response, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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