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
↓ 3 callers
Function
safeGCD
safeGCD() extends big.Int GCD to handle non positive inputs
lib/crypto/classgroup.go:516
↓ 3 callers
Method
send
send() sends a message to a specific peer object
p2p/set.go:294
↓ 3 callers
Method
sendToPluginSync
(c: any, payload: any)
plugin/typescript/src/contract/plugin.ts:256
↓ 3 callers
Method
sendToPluginSync
sendToPluginSync() sends to the plugin and waits for a response, tracking FSM context
plugin/go/contract/plugin.go:192
↓ 3 callers
Method
set
map based CRUD operations below
p2p/set.go:339
↓ 3 callers
Function
setActivePrivateKey
(nickname, closeModal)
cmd/rpc/web/wallet/components/account.jsx:192
↓ 3 callers
Method
simElectionVotePhase
simElectionVotePhase() simulates the ELECTION-VOTE phase of the BFT lifecycle
bft/mock_test.go:116
↓ 3 callers
Method
simLead
simLead() generically simulates a Leader Phase, generating a Proposal, executing a custom callback, signing, and sending the Proposal
bft/mock_test.go:227
↓ 3 callers
Method
simProposePhase
simProposePhase() simulates the PROPOSE phase of the BFT lifecycle
bft/mock_test.go:142
↓ 3 callers
Method
simVote
simVote() generically simulates a Replica Vote Phase, generating the vote message, executing a custom callback, signing and sending the Vote
bft/mock_test.go:263
↓ 3 callers
Method
submitTxs
submitTxs submits transactions to the controller and writes http response
cmd/rpc/server.go:201
↓ 3 callers
Method
txAddress
(route string, from, signer AddrOrNickname, pwd string, submit bool, optFee uint64)
cmd/rpc/client.go:875
↓ 3 callers
Method
txHeightKey
(height uint64)
store/indexer.go:788
↓ 3 callers
Method
txnKey
txnKey() returns the key of the current in-memory operation
store/txn.go:471
↓ 3 callers
Method
unmarshalPool
unmarshalPool() coverts bytes into a Pool structure
fsm/account.go:386
↓ 3 callers
Method
updateMetrics
updateMetrics is a helper to update peer metrics
p2p/set.go:334
↓ 3 callers
Method
validateTarget
validateTarget() checks the target to ensure it's not a reserved key like root, minimum or maximum
store/smt.go:629
↓ 3 callers
Function
waitForTxInclusion
( rpcURL: string, senderAddr: string, txHash: string, timeoutMs: number )
plugin/typescript/tutorial/src/rpc_test.ts:110
↓ 3 callers
Function
waitForTxInclusion
waitForTxInclusion waits for a transaction to be included in a block
plugin/go/tutorial/rpc_test.go:272
↓ 3 callers
Function
wait_for_tx_inclusion
Wait for a transaction to be included in a block.
plugin/python/tutorial/rpc_test.py:121
↓ 3 callers
Method
write
write() writes a value operation to the underlying writer
store/txn.go:248
↓ 2 callers
Method
AccountDeductFees
AccountDeductFees() removes fees from a specific address and adds them to the Canopy reward pool
fsm/account.go:120
↓ 2 callers
Method
Add
Add() adds an event to the tracker
lib/event.go:34
↓ 2 callers
Method
AddEvent
AddEvent() adds a failed transaction to the results
lib/tx.go:416
↓ 2 callers
Method
AddFailed
AddFailed() adds a failed transaction to the results
lib/tx.go:411
↓ 2 callers
Method
AddHeight
DOUBLE SIGNER CODE BELOW AddHeight() adds a height to the DoubleSigner
lib/consensus.go:689
↓ 2 callers
Method
AddPaymentPercent
AddPaymentPercent() adds a payment percent to the certificate result for both the root chain and nested chain ids (if different)
controller/result.go:151
↓ 2 callers
Method
AddToDelegateSupply
AddToStakedSupply() adds to the staked supply count
fsm/account.go:436
↓ 2 callers
Method
AddToDelegateSupplyForChain
AddToDelegateSupplyForChain() adds to the delegate staked supply count
fsm/account.go:454
↓ 2 callers
Function
AddToPort
AddToPort() adds some number to the port ensuring it doesn't exceed the max port
lib/util.go:711
↓ 2 callers
Method
AddVote
AddVote adds a vote to a proposal
cmd/rpc/admin.go:587
↓ 2 callers
Method
ApplyTransactions
ApplyTransactions() 1. Batch validate signatures for every transaction provided 2. Processes all transactions provided against the state machine 3. Al
fsm/state.go:204
↓ 2 callers
Method
BeginBlock
* This file handles 'automatic' (non-transaction-induced) state changes that occur at the beginning and ending of a block */ BeginBlock() is code that
fsm/automatic.go:10
↓ 2 callers
Method
BigPow
BigPow() executes an exponential function (group^n) on a class group and returns the resulting class group
lib/crypto/classgroup.go:169
↓ 2 callers
Function
Blocks
(page, _)
cmd/rpc/web/explorer/components/api.js:113
↓ 2 callers
Method
Bytes
Bytes() returns the byte representation of the Public Key
lib/crypto/eth_secp256k1.go:59
↓ 2 callers
Method
Bytes
Bytes() casts the public key to bytes
lib/crypto/ed25519.go:131
↓ 2 callers
Method
Bytes
Bytes() returns the protobuf bytes representation of the public key
lib/crypto/bls.go:191
↓ 2 callers
Method
BytesToBlockHash
BytesToBlockHash() converts block bytes into a block hash
lib/block.go:204
↓ 2 callers
Function
BytesToED25519Private
BytesToED25519Private() creates a new PrivateKeyI interface from ED25519 bytes
lib/crypto/ed25519.go:37
↓ 2 callers
Function
BytesToED25519Public
BytesToED25519Public() creates a new PublicKeyI interface from a ED25519PublicKey hex string
lib/crypto/ed25519.go:163
↓ 2 callers
Method
CalculateCheckpoint
CalculateCheckpoint() calculates the checkpoint for the checkpoint as a service functionality
controller/result.go:249
↓ 2 callers
Method
CalculateSlashRecipients
CalculateSlashRecipients() calculates the addresses who receive slashes on the root-chain
controller/result.go:226
↓ 2 callers
Method
ChainHeight
ChainHeight() returns the height of this target chain
controller/controller.go:409
↓ 2 callers
Method
ChainIds
publish the root chain info to nested chain listeners
lib/consensus.go:118
↓ 2 callers
Method
Check
Check() validates the consensus params
fsm/gov_params.go:123
↓ 2 callers
Method
CheckFee
CheckFee() validates the fee amount is sufficient to pay for a transaction
fsm/transaction.go:286
↓ 2 callers
Method
CheckMessage
CheckMessage() performs basic validations on the msg payload
fsm/transaction.go:261
↓ 2 callers
Function
CheckNetAddress
CheckNetAddress() validates the p2p address in the Message
fsm/message_helpers.go:906
↓ 2 callers
Method
CheckProposalBasic
CheckProposalBasic() does a basic validity check on the proposal inside the QC and returns the block structure
lib/certificate.go:145
↓ 2 callers
Method
CheckProtocolVersion
CheckProtocolVersion() compares the protocol version against the governance enforced version
fsm/automatic.go:111
↓ 2 callers
Method
CheckReplay
CheckReplay() validates the timestamp of the transaction Instead of using an increasing 'sequence number' Canopy uses timestamp + created block to act
fsm/transaction.go:208
↓ 2 callers
Method
CheckSignature
CheckSignature() validates the signer and the digital signature associated with the transaction object
fsm/transaction.go:155
↓ 2 callers
Method
Checkpoint
Checkpoint retrieves the checkpoint block hash for a certain committee and height combination
cmd/rpc/query.go:130
↓ 2 callers
Method
CloseOrder
CloseOrder() sends the tokens from escrow to the 'buyer address' and deletes the order
fsm/swap.go:236
↓ 2 callers
Method
Commit
Commit() commits the in-memory operations to the batch writer and clears in-memory changes
store/txn.go:217
↓ 2 callers
Function
CommitteePrefix
(id uint64)
fsm/key.go:71
↓ 2 callers
Function
Config
()
cmd/rpc/web/explorer/components/api.js:209
↓ 2 callers
Method
ConformStateToParamUpdate
ConformStateToParamUpdate() ensures the state does not violate the new values of the governance parameters - Only MaxCommitteeSize, RootChainId, Minim
fsm/gov.go:109
↓ 2 callers
Method
Copy
Copy() returns a copy, omitting non-critical information
lib/dex.go:29
↓ 2 callers
Method
DB
get the merkle root from the store
lib/store.go:17
↓ 2 callers
Function
DecryptPrivateKey
DecryptPrivateKey takes an EncryptedPrivateKey and decrypts it to a PrivateKeyI interface using the password
lib/crypto/keystore.go:243
↓ 2 callers
Function
DefaultConfig
()
plugin/typescript/src/contract/plugin.ts:54
↓ 2 callers
Function
DefaultConsensusConfig
DefaultConsensusConfig() configures the block time
lib/config.go:199
↓ 2 callers
Function
DefaultMetricsConfig
DefaultMetricsConfig() returns the default metrics configuration
lib/config.go:326
↓ 2 callers
Function
DefaultP2PConfig
()
lib/config.go:242
↓ 2 callers
Function
DefaultRPCConfig
DefaultRPCConfig() sets rpc url to localhost and sets wallet, explorer, rpc, and admin ports from [50000-50003]
lib/config.go:134
↓ 2 callers
Function
DefaultStoreConfig
DefaultStoreConfig() returns the developer recommended store configuration
lib/config.go:285
↓ 2 callers
Function
DelegatePrefix
(id uint64)
fsm/key.go:72
↓ 2 callers
Method
DeleteCommittees
DeleteCommittees() deletes the membership and staked supply for each of an address' committees
fsm/committee.go:304
↓ 2 callers
Method
DeleteFinishedUnstaking
DeleteFinishedUnstaking() deletes the Validator structure and unstaking keys for those who have finished unstaking
fsm/validator.go:311
↓ 2 callers
Method
Descriptor
()
lib/peer.pb.go:98
↓ 2 callers
Method
DexBatch
DexBatch retrieves the 'locked' dex batch for a committee
cmd/rpc/query.go:312
↓ 2 callers
Method
DialAndDisconnect
DialAndDisconnect() dials the peer but disconnects once a fully authenticated connection is established
p2p/p2p.go:370
↓ 2 callers
Method
DialWithBackoff
DialWithBackoff() dials the peer with exponential backoff retry
p2p/p2p.go:356
↓ 2 callers
Method
Discard
Discard() closes the reader and writer
store/store.go:384
↓ 2 callers
Function
EncryptPrivateKey
EncryptPrivateKey creates an encrypted private key by generating a random salt and deriving an encryption key with the KDF, and finally encrypting key
lib/crypto/keystore.go:222
↓ 2 callers
Method
EndBlock
EndBlock() is code that is executed at the end of `applying` the block
fsm/automatic.go:69
↓ 2 callers
Function
EqualByteSlices
EqualByteSlices() performs equality check on two byte slices
lib/util.go:966
↓ 2 callers
Function
ErrDuplicateTx
(hash string)
lib/error.go:707
↓ 2 callers
Function
ErrEmptyCertificateResults
()
fsm/error.go:206
↓ 2 callers
Function
ErrEmptyChainId
()
lib/error.go:695
↓ 2 callers
Function
ErrEmptyMessage
()
lib/error.go:643
↓ 2 callers
Function
ErrEmptyOrderBook
()
lib/error.go:699
↓ 2 callers
Function
ErrExpectedMaxBlockSize
()
lib/error.go:723
↓ 2 callers
Function
ErrFailedChallenge
()
p2p/error.go:84
↓ 2 callers
Function
ErrFailedPluginRead
(err error)
plugin/go/contract/error.go:34
↓ 2 callers
Function
ErrFailedSafeNodePredicate
()
bft/error.go:58
↓ 2 callers
Function
ErrFromAny
(err: Error)
plugin/typescript/src/contract/error.ts:55
↓ 2 callers
Function
ErrHttpStatus
(status string, statusCode int, body []byte)
lib/error.go:812
↓ 2 callers
Function
ErrIncompatiblePeer
()
p2p/error.go:104
↓ 2 callers
Function
ErrInsufficientFunds
()
fsm/error.go:91
↓ 2 callers
Function
ErrInvalidAddress
()
plugin/typescript/src/contract/error.ts:63
↓ 2 callers
Function
ErrInvalidAddress
()
plugin/go/contract/error.go:66
↓ 2 callers
Function
ErrInvalidAddress
()
lib/error.go:655
↓ 2 callers
Function
ErrInvalidArgument
()
lib/error.go:715
↓ 2 callers
Function
ErrInvalidCloseOrder
()
fsm/error.go:238
↓ 2 callers
Function
ErrInvalidDoubleSignHeights
()
lib/error.go:659
↓ 2 callers
Function
ErrInvalidLockOrder
()
fsm/error.go:230
↓ 2 callers
Function
ErrInvalidMessageCast
()
plugin/go/contract/error.go:62
← previous
next →
801–900 of 5,387, ranked by callers