keys

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxUnicodeRuneValue         = utf8.MaxRune // U+10FFFF - maximum (and unallocated) code point
	CompositeKeyNamespace       = "\x00"
	TokenKeyPrefix              = "ztoken"
	FabTokenKeyPrefix           = "token"
	DeletedTokenKeyPrefix       = "deltoken"
	FabTokenExtendedKeyPrefix   = "etoken"
	AuditTokenKeyPrefix         = "audittoken"
	TokenMineKeyPrefix          = "mine"
	TokenSetupKeyPrefix         = "setup"
	IssuedHistoryTokenKeyPrefix = "issued"
	TokenNamespace              = "tns"

	Info                   = "info"
	IDs                    = "ids"
	TokenRequestKeyPrefix  = "token_request"
	SerialNumber           = "sn"
	IssueActionMetadata    = "iam"
	TransferActionMetadata = "tam"
	TokenRequestMetadata   = "trmd"
)

Variables

This section is empty.

Functions

func CreateAuditTokenKey

func CreateAuditTokenKey(txID string, index uint64) (string, error)

func CreateCompositeKey

func CreateCompositeKey(objectType string, attributes []string) (string, error)

CreateCompositeKey and its related functions and consts copied from core/chaincode/shim/chaincode.go

func CreateDeletedTokenKey

func CreateDeletedTokenKey(txID string, index uint64) (string, error)

func CreateExtendedFabTokenKey

func CreateExtendedFabTokenKey(id string, typ string, txID string, index uint64) (string, error)

func CreateFabTokenKey

func CreateFabTokenKey(txID string, index uint64) (string, error)

func CreateIssueActionMetadataKey

func CreateIssueActionMetadataKey(hash string) (string, error)

func CreateIssuedHistoryTokenKey

func CreateIssuedHistoryTokenKey(txID string, index uint64) (string, error)

func CreateSNKey

func CreateSNKey(sn string) (string, error)

func CreateSetupBundleKey

func CreateSetupBundleKey() (string, error)

func CreateSetupKey

func CreateSetupKey() (string, error)

func CreateTokenKey

func CreateTokenKey(txID string, index uint64) (string, error)

CreateTokenKey Creates a rwset key for an individual output in a token transaction, as a function of the token owner, transaction ID, and index of the output

func CreateTokenMineKey

func CreateTokenMineKey(txID string, index uint64) (string, error)

func CreateTokenRequestKey

func CreateTokenRequestKey(txID string) (string, error)

func CreateTransferActionMetadataKey

func CreateTransferActionMetadataKey(subKey string) (string, error)

CreateTransferActionMetadataKey returns the transfer action metadata key built from the passed transaction id, subkey, and index. Index is used to make sure the key is unique with the respect to the token request this key appears.

func GetTokenIdFromExtendedKey

func GetTokenIdFromExtendedKey(key string) (*token.ID, error)

func GetTokenIdFromKey

func GetTokenIdFromKey(key string) (*token.ID, error)

func GetTransferMetadataSubKey

func GetTransferMetadataSubKey(k string) (string, error)

func SplitCompositeKey

func SplitCompositeKey(compositeKey string) (string, []string, error)

func ValidateCompositeKeyAttribute

func ValidateCompositeKeyAttribute(str string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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