{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package plain\n\n## Variables\n\n```go\nvar TokenInputSpentMarker = []byte{1}\n```\n\n## Functions\n\n```go\nfunc GenerateKeyForTest(txID string, index int) (string, error)\n```\nGenerateKeyForTest is here only for testing purposes, to be removed later.\n\n## Types\n\n```go\ntype HistoryIterator struct {\n\t// contains filtered or unexported fields\n}\n```\nHistoryIterator is an iterator for iterating through the transaction history.\n\n```go\nfunc (it *HistoryIterator) Next() (string, *token.TokenTransaction, error)\n```\nNext gets the next transaction from the history, or io.EOF if there are no more transactions.\n\n```go\ntype Issuer struct{}\n```\nAn Issuer that can import new tokens\n\n```go\nfunc (i *Issuer) RequestExpectation(request *token.ExpectationRequest) (*token.TokenTransaction, error)\n```\nRequestExpectation allows indirect import based on the expectation. It creates a token transaction with the outputs as specified in the expectation.\n\n```go\nfunc (i *Issuer) RequestImport(tokensToIssue []*token.TokenToIssue) (*token.TokenTransaction, error)\n```\nRequestImport creates an import request with the token owners, types, and quantities specified in tokensToIssue.\n\n```go\ntype Manager struct {\n\t// contains filtered or unexported fields\n}\n```\nManager is used to access TMS components.\n\n```go\nfunc (m *Manager) GetTxProcessor(channel string) (transaction.TMSTxProcessor, error)\n```\nGetTxProcessor returns a TMSTxProcessor that is used to process token transactions.\n\n```go\nfunc (m *Manager) SetPolicyValidator(channel string, validator identity.IssuingValidator)\n```\nSetPolicyValidator sets the policy validator for the specified channel\n\n```go\ntype MemoryLedger struct {\n\t// contains filtered or unexported fields\n}\n```\nA MemoryLedger is an in-memory ledger of transactions and unspent outputs. This implementation is only meant for testing.\n\n```go\nfunc NewMemoryLedger() *MemoryLedger\n```\nNewMemoryLedger creates a new MemoryLedger\n\n```go\nfunc (p *MemoryLedger) Done()\n```\nDone releases resources occupied by the MemoryLedger\n\n```go\nfunc (p *MemoryLedger) GetState(namespace string, key string) ([]byte, error)\n```\nGetState gets the value for given namespace and Key. For a chaincode, the namespace corresponds to the chaincodeID\n\n```go\nfunc (p *MemoryLedger) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (ledger.ResultsIterator, error)\n```\nGetStateRangeScanIterator gets the values for a given namespace that lie in an interval determined by startKey and endKey. this is a mock function.\n\n```go\nfunc (p *MemoryLedger) SetState(namespace string, key string, value []byte) error\n```\nSetState sets the given value for the given namespace and Key. For a chaincode, the namespace corresponds to the chaincodeID\n\n```go\ntype MemoryPool struct {\n\t// contains filtered or unexported fields\n}\n```\nA MemoryPool is an in-memory ledger of transactions and unspent outputs. This implementation is only meant for testing.\n\n```go\nfunc NewMemoryPool() *MemoryPool\n```\nNewMemoryPool creates a new MemoryPool\n\n```go\nfunc (p *MemoryPool) CommitUpdate(transactionData []tms.TransactionData) error\n```\nCommitUpdate commits transaction data into the pool.\n\n```go\nfunc (p *MemoryPool) HistoryIterator() *HistoryIterator\n```\nHistoryIterator creates a new HistoryIterator for iterating through the transaction history.\n\n```go\nfunc (p *MemoryPool) Iterator() *PoolIterator\n```\nIterator returns an iterator of the unspent outputs based on a copy of the pool.\n\n```go\nfunc (p *MemoryPool) OutputByID(id string) (*token.PlainOutput, error)\n```\nOutputByID gets an output by its ID.\n\n```go\nfunc (p *MemoryPool) TxByID(txID string) (*token.TokenTransaction, error)\n```\nTxByID gets a transaction by its transaction ID. If no transaction exists with the given ID, a TxNotFoundError is returned.\n\n```go\ntype OutputNotFoundError struct {\n\tID string\n}\n```\nOutputNotFoundError is returned when an entry was not found in the pool.\n\n```go\nfunc (o *OutputNotFoundError) Error() string\n```\n\n```go\ntype PoolIterator struct {\n\t// contains filtered or unexported fields\n}\n```\nPoolIterator is an iterator for iterating through the items in the pool.\n\n```go\nfunc (it *PoolIterator) Next() (string, *token.PlainOutput, error)\n```\nNext gets the next output from the pool, or io.EOF if there are no more outputs.\n\n```go\ntype Transactor struct {\n\tPublicCredential []byte\n\tLedger           ledger.LedgerReader\n}\n```\nA Transactor that can transfer tokens.\n\n```go\nfunc (t *Transactor) Done()\n```\nDone releases any resources held by this transactor\n\n```go\nfunc (t *Transactor) ListTokens() (*token.UnspentTokens, error)\n```\nListTokens creates a TokenTransaction that lists the unspent tokens owned by owner.\n\n```go\nfunc (t *Transactor) RequestApprove(request *token.ApproveRequest) (*token.TokenTransaction, error)\n```\n\n```go\nfunc (t *Transactor) RequestExpectation(request *token.ExpectationRequest) (*token.TokenTransaction, error)\n```\nRequestExpectation allows indirect transfer based on the expectation. It creates a token transaction based on the outputs as specified in the expectation.\n\n```go\nfunc (t *Transactor) RequestRedeem(request *token.RedeemRequest) (*token.TokenTransaction, error)\n```\nRequestRedeem creates a TokenTransaction of type redeem request\n\n```go\nfunc (t *Transactor) RequestTransfer(request *token.TransferRequest) (*token.TokenTransaction, error)\n```\nRequestTransfer creates a TokenTransaction of type transfer request func (t \\*Transactor) RequestTransfer(inTokens \\[]\\*token.InputId, tokensToTransfer \\[]\\*token.RecipientTransferShare) (\\*token.TokenTransaction, error) {\n\n```go\nfunc (t *Transactor) RequestTransferFrom(request *token.TransferRequest) (*token.TokenTransaction, error)\n```\n\n```go\ntype TxNotFoundError struct {\n\tTxID string\n}\n```\nTxNotFoundError is returned when a transaction was not found in the pool.\n\n```go\nfunc (p *TxNotFoundError) Error() string\n```\n\n```go\ntype Verifier struct {\n\tIssuingValidator identity.IssuingValidator\n}\n```\nA Verifier validates and commits token transactions.\n\n```go\nfunc (v *Verifier) ProcessTx(txID string, creator identity.PublicInfo, ttx *token.TokenTransaction, simulator ledger.LedgerWriter) error\n```\nProcessTx checks that transactions are correct wrt. the most recent ledger state. ProcessTx checks are ones that shall be done sequentially, since transactions within a block may introduce dependencies.\n\n","path":"github.com/eric-erki/https-hyperledger.org/token/tms/plain","name":"plain","synopsis":"","isRedistributable":true}
