Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/canopy-network/canopy
/ functions
Functions
5,387 in github.com/canopy-network/canopy
⨍
Functions
5,387
◇
Types & classes
860
↓ 855 callers
Function
newTestAddressBytes
(t *testing.T, variation ...int)
fsm/state_test.go:367
↓ 720 callers
Method
Equal
Equal() compares two ClassGroups using their underlying values and returns true if they are equivalent
lib/crypto/classgroup.go:343
↓ 373 callers
Method
Error
(msg string)
lib/log.go:36
↓ 308 callers
Method
Bytes
Bytes() casts the public key to bytes
lib/crypto/key.go:47
↓ 275 callers
Function
NewError
(code ErrorCode, module ErrorModule, msg string)
lib/error.go:28
↓ 269 callers
Function
newTestNode
newTestNode creates a new node with the given key, value, left and right child keys
store/smt_test.go:2068
↓ 243 callers
Function
Hash
Hash() executes the global hashing algorithm on input bytes
lib/crypto/hash.go:28
↓ 221 callers
Method
bytes
bytes() encodes a key object to bytes
store/smt.go:970
↓ 203 callers
Function
newTestPublicKeyBytes
(t *testing.T, variation ...int)
fsm/state_test.go:376
↓ 192 callers
Method
Run
Run() *blocking call*: generates a VDF proof using the current params state of the VDF Service object The design is to save the results
lib/vdf.go:50
↓ 187 callers
Method
Errorf
(format string, args ...any)
lib/log.go:42
↓ 164 callers
Method
Debugf
(format string, args ...any)
lib/log.go:39
↓ 127 callers
Function
Marshal
Marshal() serializes a proto.Message into a byte slice
lib/util.go:258
↓ 127 callers
Method
Unmarshal
(data []byte, ptr any)
lib/codec/codec.go:16
↓ 124 callers
Function
newTestStateMachine
(t *testing.T)
fsm/state_test.go:334
↓ 120 callers
Method
Marshal
Marshal() models the protobuf.Marshaller interface
lib/crypto/key.go:45
↓ 113 callers
Function
JoinLenPrefix
JoinLenPrefix() appends the items together separated by a single byte to represent the length of the segment
lib/util.go:775
↓ 109 callers
Method
Set
(key, value []byte)
lib/store.go:85
↓ 101 callers
Method
Fatal
(msg string)
lib/log.go:37
↓ 100 callers
Function
newTestOrderId
(_ *testing.T, variant int)
fsm/swap_test.go:713
↓ 98 callers
Function
newTestPublicKeyBytes
(t *testing.T, variation ...int)
lib/block_test.go:460
↓ 97 callers
Method
New
()
lib/tx.go:72
↓ 89 callers
Method
GetPool
POOL CODE BELOW * Pools are owner-less designation funds that are 'earmarked' for a purpose NOTE: A distinct structure for pools are used instead of
fsm/account.go:223
↓ 89 callers
Function
write
write marshaled payload to w
cmd/rpc/server.go:430
↓ 84 callers
Method
PublicKey
()
lib/crypto/key.go:32
↓ 83 callers
Function
NewAddress
NewAddress() creates a new address object from bytes by assigning bytes to the underlying address object
lib/crypto/address.go:77
↓ 82 callers
Function
BytesToString
BytesToString() converts a byte slice to a hexadecimal string
lib/util.go:537
↓ 79 callers
Method
Lock
()
bft/bft.go:930
↓ 79 callers
Method
Unlock
()
bft/bft.go:931
↓ 77 callers
Function
newTestAddress
(t *testing.T, variation ...int)
fsm/state_test.go:362
↓ 75 callers
Method
Close
()
store/txn.go:71
↓ 72 callers
Method
String
String() returns the hex string representation
lib/crypto/key.go:49
↓ 69 callers
Method
Infof
(format string, args ...any)
lib/log.go:40
↓ 67 callers
Method
Warnf
(format string, args ...any)
lib/log.go:41
↓ 66 callers
Function
writeToConsole
(a any, err error)
cmd/cli/cli.go:298
↓ 62 callers
Method
Key
move to next item
lib/store.go:107
↓ 62 callers
Method
SetPool
SetPool() upserts a Pool structure into the state
fsm/account.go:288
↓ 61 callers
Method
Len
()
lib/event.go:73
↓ 58 callers
Method
Address
Address() creates a unique shorter fixed length version of the public key
lib/crypto/key.go:13
↓ 57 callers
Function
keyBytesFromStr
keyBytesFromStr converts a string of binary bits to a byte slice CONTRACT: str must be < than 8 bits
store/smt_test.go:2088
↓ 56 callers
Function
Unmarshal
Unmarshal() deserializes a byte slice into a proto.Message
lib/util.go:271
↓ 56 callers
Method
Value
retrieve key
lib/store.go:108
↓ 52 callers
Method
Fatalf
(format string, args ...any)
lib/log.go:43
↓ 51 callers
Method
Valid
()
lib/store.go:105
↓ 49 callers
Method
Copy
access the height of the store
lib/store.go:19
↓ 49 callers
Method
Next
if the item the iterator is pointing at is valid
lib/store.go:106
↓ 49 callers
Function
copy
(state, setState, detail, toastText = "Copied!")
cmd/rpc/web/wallet/components/util.js:484
↓ 48 callers
Function
BytesToTruncatedString
BytesToTruncatedString() converts a byte slice to a truncated hexadecimal string
lib/util.go:556
↓ 48 callers
Method
Close
reset the underlying writer
lib/store.go:24
↓ 48 callers
Method
GetValidator
()
fsm/gov.pb.go:154
↓ 48 callers
Method
Height
()
fsm/state.go:651
↓ 46 callers
Function
HashString
HashString() returns the hex byte version of a hash
lib/crypto/hash.go:44
↓ 44 callers
Method
Contains
(txHash string)
lib/mempool.go:18
↓ 44 callers
Function
DefaultParams
DefaultParams() returns the developer set params
fsm/gov_params.go:40
↓ 41 callers
Method
Discard
save the store and increment the height
lib/store.go:22
↓ 41 callers
Method
GetSupply
GetSupply() returns the Supply structure held in the state
fsm/account.go:530
↓ 41 callers
Method
Store
various self-explanatory 1 line functions below
fsm/state.go:649
↓ 39 callers
Method
GetParamsVal
GetParamsVal() returns the current state of the governance params in the Validator space
fsm/gov.go:319
↓ 38 callers
Function
newTestAddressBytes
(t *testing.T, variation ...int)
lib/block_test.go:451
↓ 37 callers
Method
Load
Load() fills a page from an IteratorI
lib/util.go:76
↓ 36 callers
Method
AccountAdd
AccountAdd() adds tokens to an Account
fsm/account.go:130
↓ 36 callers
Function
NewAddressFromBytes
NewAddressFromBytes() casts bytes as an AddressI interface
lib/crypto/address.go:24
↓ 35 callers
Method
GetAccountBalance
GetAccountBalance() returns the balance of an Account at a specific address
fsm/account.go:73
↓ 35 callers
Method
Info
(msg string)
lib/log.go:34
↓ 35 callers
Function
argToInt
(arg string)
cmd/cli/query.go:500
↓ 35 callers
Function
newTestP2PNode
(t *testing.T)
p2p/p2p_test.go:535
↓ 34 callers
Method
Hash
Hash() computes, sets, and returns the BlockHash
lib/block.go:201
↓ 34 callers
Method
SetSupply
SetSupply() upserts the Supply structure into the state
fsm/account.go:541
↓ 33 callers
Method
Add
Add() introduces a peer to the set
p2p/set.go:54
↓ 33 callers
Method
ChainHeight
ChainHeight returns the height of the target-chain
bft/bft.go:933
↓ 33 callers
Function
NewAny
NewAny() converts a proto.Message into an anypb.Any type
lib/util.go:511
↓ 33 callers
Method
SetValidator
SetValidator() upserts a Validator object into the state
fsm/validator.go:182
↓ 32 callers
Method
Stop
Stop() stops the P2P service
p2p/p2p.go:116
↓ 31 callers
Method
Debug
(msg string)
lib/log.go:33
↓ 31 callers
Function
POST
(url, path, request)
cmd/rpc/web/wallet/components/api.js:95
↓ 30 callers
Method
GetPoolBalance
GetPoolBalance() returns the balance of a Pool at an ID
fsm/account.go:277
↓ 29 callers
Method
Get
(key []byte)
store/txn.go:69
↓ 29 callers
Method
GetDexBatch
get a specific order from the order book
lib/consensus.go:125
↓ 29 callers
Function
NewClassGroup
NewClassGroup() is a constructor for the class group object
lib/crypto/classgroup.go:44
↓ 29 callers
Method
Sign
(p crypto.PrivateKeyI)
lib/tx.go:433
↓ 29 callers
Method
getFeeFromState
getFeeFromState populates txRequest with the fee for the transaction type specified in messageName
cmd/rpc/server.go:245
↓ 28 callers
Method
Commit
()
store/txn.go:79
↓ 28 callers
Method
Equals
(AddressI)
lib/crypto/key.go:50
↓ 28 callers
Function
NewPublicKeyFromBytes
NewPublicKeyFromBytes() creates a new PublicKeyI interface from a byte slice
lib/crypto/key.go:87
↓ 28 callers
Function
getPoolBalance
(t *testing.T, sm *StateMachine, poolId uint64)
fsm/dex_test.go:3430
↓ 27 callers
Method
AggregateSignatures
()
lib/crypto/key.go:57
↓ 27 callers
Method
Delete
set value bytes referenced by key bytes
lib/store.go:86
↓ 27 callers
Method
Get
(key []byte)
lib/store.go:91
↓ 27 callers
Method
Printf
(format string, args ...any)
lib/log.go:44
↓ 27 callers
Function
argGetAddrOrNickname
(arg string)
cmd/cli/admin.go:426
↓ 27 callers
Method
get
(publicKey []byte)
p2p/set.go:341
↓ 26 callers
Method
Iterator
access value bytes using key bytes
lib/store.go:92
↓ 25 callers
Function
file_plugin_proto_rawDescGZIP
()
plugin/go/tutorial/contract/plugin.pb.go:1802
↓ 25 callers
Function
file_plugin_proto_rawDescGZIP
()
plugin/go/contract/plugin.pb.go:1802
↓ 25 callers
Function
file_plugin_proto_rawDescGZIP
()
lib/plugin.pb.go:1816
↓ 25 callers
Function
newTestConsensus
newTestConsensus() creates a Consensus test suite containing a testable BFT object using a mocked controller and a deterministic validator set
bft/mock_test.go:24
↓ 24 callers
Method
Bitmap
Bitmap() returns a clone of the bitmap of the MPK The bitmap is used to track who signed or not
lib/crypto/key.go:70
↓ 24 callers
Method
Clone
Clone() returns a deep copy of the slash tracker to allow safe rollback on failed operations
fsm/byzantine.go:402
↓ 24 callers
Method
Height
Height responds with the next block version
cmd/rpc/query.go:51
↓ 24 callers
Function
MarshalJSON
MarshalJSON() serializes a message into a JSON byte slice
lib/util.go:427
next →
1–100 of 5,387, ranked by callers