Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chain/txvm
/ functions
Functions
1,025 in github.com/chain/txvm
⨍
Functions
1,025
◇
Types & classes
110
↓ 4 callers
Function
binOp
(vm *VM, f func(a, b int64) (int64, bool))
protocol/txvm/math.go:26
↓ 4 callers
Function
childIdx
(key []byte, len int, bit byte)
protocol/patricia/patricia.go:263
↓ 4 callers
Method
isEmpty
()
protocol/txvm/stack.go:51
↓ 4 callers
Function
keccakF1600
keccakF1600 applies the Keccak permutation to a 1600b-wide state represented as a slice of 25 uint64s.
crypto/sha3/keccakf.go:39
↓ 4 callers
Function
mask
(b, bits byte)
protocol/patricia/patricia.go:255
↓ 4 callers
Function
must
(err error)
protocol/txvm/op/gen.go:66
↓ 4 callers
Function
must
(err error)
cmd/assetid/assetid.go:46
↓ 4 callers
Function
mustDecodeHex
(str string)
protocol/validation/validation_test.go:323
↓ 4 callers
Function
newKMAC
(securitybits int, key []byte, length int, s []byte)
crypto/sha3/kmac.go:72
↓ 4 callers
Function
newTestChain
newTestChain returns a new Chain using memstore for storage, along with an initial block b1 (with a 0/0 multisig program). It commits b1 before return
protocol/block_test.go:280
↓ 4 callers
Function
newTupleHash
(securitybits int, tuple [][]byte, s []byte)
crypto/sha3/tuple_hash.go:146
↓ 4 callers
Function
newTupleHasher
(securitybits int, length int, s []byte)
crypto/sha3/tuple_hash.go:154
↓ 4 callers
Method
peek
()
protocol/txvm/vm.go:251
↓ 4 callers
Method
scan
()
protocol/txvm/asm/scanner.go:193
↓ 4 callers
Method
setHeight
(h uint64)
protocol/protocol.go:212
↓ 4 callers
Method
wraperr
(e error)
protocol/txvm/error.go:15
↓ 3 callers
Function
BlockOnly
BlockOnly performs those parts of block validation that depend only on the block and not on the previous block header. TODO(eric): consider another na
protocol/validation/validation.go:100
↓ 3 callers
Method
Bytes
Bytes encodes the Block as a byte slice, by converting it to a RawBlock protobuf and marshaling that.
protocol/bc/block.go:170
↓ 3 callers
Method
CommitBlock
CommitBlock takes a block, commits it to persistent storage and applies it to c. CommitBlock is idempotent. A duplicate call with a previously committ
protocol/block.go:76
↓ 3 callers
Method
ConstTimeEqual
(x *Point)
crypto/ed25519/ecmath/point.go:97
↓ 3 callers
Function
Data
Data returns the data item in err, if any.
errors/errors.go:162
↓ 3 callers
Method
Derive
Derive produces the descendant of the XPrv at the given path. It's equivalent to repeated calls of xprv.Child with the elements of path.
crypto/ed25519/chainkd/chainkd.go:125
↓ 3 callers
Function
Disassemble
Disassemble converts a txvm bytecode program into an assembly-language representation. Sequences of instructions that can be abbreviated as one of th
protocol/txvm/asm/asm.go:352
↓ 3 callers
Function
Error
Error prints a log entry containing an error message assigned to the "error" key. Optionally, an error message prefix can be included. Prefix argument
log/log.go:197
↓ 3 callers
Function
FeCMove
Replace (f,g) with (g,g) if b == 1; replace (f,g) with (f,g) if b == 0. Preconditions: b in {0,1}.
crypto/ed25519/internal/edwards25519/edwards25519.go:62
↓ 3 callers
Function
FeIsNegative
(f *FieldElement)
crypto/ed25519/internal/edwards25519/edwards25519.go:220
↓ 3 callers
Method
Hash
Hash computes the unique Chain protocol hash of the BlockHeader.
protocol/bc/blockheader.go:13
↓ 3 callers
Function
IsSmallIntOp
IsSmallIntOp tells whether the given opcode is one of the small-integer-encoding instructions.
protocol/txvm/op/op.go:129
↓ 3 callers
Function
IssueWithAnchorContract
IssueWithAnchorContract produces the txvm bytecode of an issuance contract which invokes the standard asset-issuance contract to issue the requested n
protocol/txbuilder/standard/issue.go:111
↓ 3 callers
Function
IssueWithoutAnchorContract
IssueWithoutAnchorContract produces the txvm bytecode of an issuance contract which invokes the standard asset-issuance contract to issue the requeste
protocol/txbuilder/standard/issue.go:125
↓ 3 callers
Function
MakeBlock
MakeBlock makes a new block from txs, commits it, and returns it. It assumes c's consensus program requires 0 signatures. (This is true for chains ret
protocol/prottest/block.go:133
↓ 3 callers
Function
New256
New256 creates a new SHA3-256 hash. Its generic security strength is 256 bits against preimage attacks, and 128 bits against collision attacks.
crypto/sha3/hashes.go:23
↓ 3 callers
Function
New512
New512 creates a new SHA3-512 hash. Its generic security strength is 512 bits against preimage attacks, and 256 bits against collision attacks.
crypto/sha3/hashes.go:33
↓ 3 callers
Function
NewCShake128
NewCShake128 creates a new cSHAKE128 variable-output-length customizable ShakeHash. Its generic security strength is 128 bits against all attacks if a
crypto/sha3/cshake.go:11
↓ 3 callers
Function
NewCShake256
NewCShake256 creates a new cSHAKE256 variable-output-length customizable ShakeHash. Its generic security strength is 256 bits against all attacks if a
crypto/sha3/cshake.go:21
↓ 3 callers
Function
NewKMAC128
NewKMAC128 creates an instance of Hash with a given key, output length in bytes and a customization string s.
crypto/sha3/kmac.go:12
↓ 3 callers
Function
NewKMAC256
NewKMAC256 creates an instance of Hash with a given key, output length in bytes and a customization string s.
crypto/sha3/kmac.go:18
↓ 3 callers
Function
NewKMACXOF128
NewKMACXOF128 provides an arbitrary-length output.
crypto/sha3/kmac.go:23
↓ 3 callers
Function
NewKMACXOF256
NewKMACXOF256 provides an arbitrary-length output.
crypto/sha3/kmac.go:28
↓ 3 callers
Function
NewTupleHash128
NewTupleHash128 creates an instance of Hash with a given key, output length in bytes and a customization string s.
crypto/sha3/tuple_hash.go:71
↓ 3 callers
Function
NewTupleHash256
NewTupleHash256 creates an instance of Hash with a given key, output length in bytes and a customization string s.
crypto/sha3/tuple_hash.go:77
↓ 3 callers
Function
OnFinalize
OnFinalize can be passed as an option to Validate. It adds a callback to be invoked when "finalize" is executed.
protocol/txvm/option.go:27
↓ 3 callers
Method
OpCode
OpCode returns the current opcode in the VM. Use it in BeforeStep and AfterStep callbacks to discover the instruction being executed.
protocol/txvm/introspection.go:15
↓ 3 callers
Function
Printf
Printf prints a log entry containing a message assigned to the "message" key. Arguments are handled as in fmt.Printf.
log/log.go:188
↓ 3 callers
Method
PublicKey
PublicKey extracts the ed25519 public key from an xpub.
crypto/ed25519/chainkd/chainkd.go:197
↓ 3 callers
Method
Read
(out []byte)
crypto/sha3/tuple_hash.go:125
↓ 3 callers
Method
Read
(p []byte)
cmd/hex/main.go:40
↓ 3 callers
Function
SetPrefix
SetPrefix sets the global output prefix.
log/log.go:78
↓ 3 callers
Function
Sub
Sub returns an error containing root as its root and taking all other metadata (stack trace, detail, message, and data items) from err. Sub returns n
errors/errors.go:176
↓ 3 callers
Method
TimestampMS
TimestampMS returns the timestamp from the stored latest header.
protocol/state/snapshot.go:208
↓ 3 callers
Function
Trace
Trace can be passed as an option to Validate. It causes a textual execution trace to be written to the given io.Writer.
protocol/txvm/option.go:110
↓ 3 callers
Function
TupleHash128
TupleHash128 hashes a tuple with a given customization string s. Output is written to `out`. len(out) determines the output size.
crypto/sha3/tuple_hash.go:41
↓ 3 callers
Function
TupleHash256
TupleHash256 hashes a tuple with a given customization string s. Output is written to `out`. len(out) determines the output size.
crypto/sha3/tuple_hash.go:49
↓ 3 callers
Function
TupleHashXOF128
TupleHashXOF128 provides an arbitrary-length output.
crypto/sha3/tuple_hash.go:56
↓ 3 callers
Function
TupleHashXOF256
TupleHashXOF256 provides an arbitrary-length output.
crypto/sha3/tuple_hash.go:63
↓ 3 callers
Function
VerifyTxID
VerifyTxID returns a program that verifies the txid matches the given value.
protocol/txbuilder/standard/standard.go:12
↓ 3 callers
Method
Version
Version returns the current transaction version.
protocol/txvm/introspection.go:4
↓ 3 callers
Method
WriteWitnessCommitmentTo
WriteWitnessCommitmentTo writes the "Transaction Witness Commitment" to w, consisting of the version, runlimit, and program in a tuple, encoded accord
protocol/bc/tx.go:260
↓ 3 callers
Function
asBytes
(b []i10rjson.HexBytes)
protocol/txbuilder/template.go:215
↓ 3 callers
Function
bitOp
(vm *VM, f func(a, b byte) byte)
protocol/txvm/bitwise.go:26
↓ 3 callers
Method
calcHash
()
protocol/patricia/patricia.go:288
↓ 3 callers
Function
compareItems
(t *testing.T, stackItem, testItem string)
protocol/txvm/vm_test.go:243
↓ 3 callers
Function
compareStacks
a is the stack returned by the test, b is the expected stack.
protocol/txvm/simple_ops_test.go:1261
↓ 3 callers
Function
delete
(n *node, key []byte)
protocol/patricia/patricia.go:173
↓ 3 callers
Method
encode
(*bytes.Buffer)
protocol/txvm/item.go:24
↓ 3 callers
Function
findAndRoll
(b *txvmutil.Builder, stack []stackItem, f func(int, stackItem) bool)
protocol/txbuilder/template.go:661
↓ 3 callers
Method
flush
()
protocol/txvm/asm/asm.go:119
↓ 3 callers
Function
formatKey
formatKey ensures that the stringified key is valid for use in a Splunk-style K=V format. It stubs out delimeter and quoter characters in the key stri
log/log.go:210
↓ 3 callers
Function
formatValue
formatValue ensures that the stringified value is valid for use in a Splunk-style K=V format. It quotes the string value if delimeter or quoter charac
log/log.go:226
↓ 3 callers
Function
geMixedAdd
(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement)
crypto/ed25519/internal/edwards25519/edwards25519.go:814
↓ 3 callers
Function
hashKeySaltSelector
(out []byte, version byte, key, salt, sel []byte)
crypto/ed25519/chainkd/chainkd.go:201
↓ 3 callers
Function
isDigit
(ch rune)
protocol/txvm/asm/scanner.go:84
↓ 3 callers
Function
isHelper
(name string)
log/stack.go:26
↓ 3 callers
Function
must
(err error)
protocol/txvm/gen.go:67
↓ 3 callers
Function
must
(err error)
protocol/txvm/txvmtest/txvmtest.go:283
↓ 3 callers
Function
mustDecodeHex
(hexstr string)
protocol/txvm/txvmtest/txvmtest.go:289
↓ 3 callers
Function
mustDecodePrvHex
(h string)
protocol/bc/block_test.go:284
↓ 3 callers
Method
name
(i int)
log/rotation/file.go:107
↓ 3 callers
Method
peekValue
()
protocol/txvm/values.go:52
↓ 3 callers
Method
permute
permute applies the KeccakF-1600 permutation. It handles any input-output buffering.
crypto/sha3/sha3.go:82
↓ 3 callers
Method
popTuple
()
protocol/txvm/vm.go:243
↓ 3 callers
Function
pushint64
(num int64)
protocol/txvm/asm/asm.go:331
↓ 3 callers
Method
recoverError
perr must be non-nil
protocol/txvm/vm.go:306
↓ 3 callers
Method
scanIdentifier
(offs int)
protocol/txvm/asm/scanner.go:104
↓ 3 callers
Function
sequentialBytes
sequentialBytes produces a buffer of size consecutive bytes 0x00, 0x01, ..., used for testing.
crypto/sha3/sha3_test.go:218
↓ 3 callers
Function
split
(b *txvmutil.Builder, stack []stackItem, amount int64)
protocol/txbuilder/template.go:686
↓ 3 callers
Function
testBlock
()
protocol/bc/block_test.go:28
↓ 3 callers
Function
usage
()
cmd/block/block.go:383
↓ 3 callers
Method
write
write writes the given data to f, rotating files if necessary.
log/rotation/file.go:74
↓ 3 callers
Function
writePushdata
(buf *bytes.Buffer, data []byte)
protocol/txvm/asm/asm.go:217
↓ 2 callers
Method
AddTx
(tx *bc.CommitmentsTx)
protocol/builder.go:78
↓ 2 callers
Method
ApplyBlockHeader
ApplyBlockHeader is the header-specific phase of applying a block to the blockchain state. (See ApplyBlock.)
protocol/state/snapshot.go:100
↓ 2 callers
Function
AssetID
AssetID produces the ID for the asset whose issuing contract has the given ID, and that has the given optional asset tag.
protocol/txvm/values.go:47
↓ 2 callers
Function
BeforeStep
BeforeStep can be passed as an option to Validate. It adds a callback to be invoked just before each instruction is executed.
protocol/txvm/option.go:35
↓ 2 callers
Function
Block
Block validates a block and the transactions within. It does not check the predicate; for that, see ValidateBlockSig.
protocol/validation/validation.go:83
↓ 2 callers
Function
BlockPrev
BlockPrev performs those parts of block validation that require the previous block's header.
protocol/validation/validation.go:129
↓ 2 callers
Function
BlockSig
BlockSig checks the predicate against b.
protocol/validation/validation.go:29
↓ 2 callers
Method
Build
()
protocol/builder.go:101
↓ 2 callers
Function
DecodeInst
DecodeInst decodes the first instruction in the given program. For non-pushdata instructions, DecodeInst returns (opcode, nil, 1, err). For pushdata
protocol/txvm/op/op.go:153
↓ 2 callers
Method
Dematerialize
Dematerialize clears any previous materialization. This is helpful when a change to the template has been made, and it needs to be recognized.
protocol/txbuilder/template.go:429
← previous
next →
201–300 of 1,025, ranked by callers