examples

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrgId1 = "wx-org1.chainmaker.org"
	OrgId2 = "wx-org2.chainmaker.org"
	OrgId3 = "wx-org3.chainmaker.org"
	OrgId4 = "wx-org4.chainmaker.org"
	OrgId5 = "wx-org5.chainmaker.org"

	UserNameOrg1SoloClient = "org1client"
	UserNameOrg1Client1    = "org1client1"
	UserNameOrg2Client1    = "org2client1"

	UserNameOrg1SoloAdmin = "org1admin"
	UserNameOrg1Admin1    = "org1admin1"
	UserNameOrg2Admin1    = "org2admin1"
	UserNameOrg3Admin1    = "org3admin1"
	UserNameOrg4Admin1    = "org4admin1"
	UserNameOrg5Admin1    = "org5admin1"

	UserNameDpos1Admin1 = "dpos1admin1"
	UserNameDpos2Admin1 = "dpos2admin1"
	UserNameDpos3Admin1 = "dpos3admin1"
	UserNameDpos4Admin1 = "dpos4admin1"

	Version        = "1.0.0"
	UpgradeVersion = "2.0.0"
)

Variables

This section is empty.

Functions

func CalcContractName

func CalcContractName(contractName string) string

func CheckProposalRequestResp

func CheckProposalRequestResp(resp *common.TxResponse, needContractResult bool) error

func CreateChainClientWithSDKConf

func CreateChainClientWithSDKConf(sdkConfPath string) (*sdk.ChainClient, error)

CreateChainClientWithSDKConf create a chain client with sdk config file path

func GetEndorsersWithAuthType

func GetEndorsersWithAuthType(hashType crypto.HashType, authType sdk.AuthType, payload *common.Payload, usernames ...string) ([]*common.EndorsementEntry, error)

func MakeAddrAndSkiFromCrtFilePath

func MakeAddrAndSkiFromCrtFilePath(crtFilePath string) (string, string, string, error)

func PrintPrettyJson

func PrintPrettyJson(data interface{})

Types

type PermissionedPkUsers

type PermissionedPkUsers struct {
	SignKeyPath string
	OrgId       string
}

type PkUsers

type PkUsers struct {
	SignKeyPath string
}

type User

type User struct {
	TlsKeyPath, TlsCrtPath   string
	SignKeyPath, SignCrtPath string
}

func GetUser

func GetUser(username string) (*User, error)

Jump to

Keyboard shortcuts

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