test_cases

package
v0.0.0-...-e4bbcfe Latest Latest
Warning

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

Go to latest
Published: May 1, 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) (*base_token.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 base_token.BaseTokenInterface, toChaincodeAPI base_token.BaseTokenInterface, keyPair *base_token.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 base_token.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