mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-25 23:43:49 +00:00
*: add more package-specific documentation
For the most important packages at least.
This commit is contained in:
parent
c1b2a79cfe
commit
b56e028733
27 changed files with 129 additions and 1 deletions
4
pkg/compiler/doc.go
Normal file
4
pkg/compiler/doc.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Package compiler implements Go to NEF smart contract compiler.
|
||||
*/
|
||||
package compiler
|
4
pkg/config/doc.go
Normal file
4
pkg/config/doc.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Package config contains NeoGo node configuration definition.
|
||||
*/
|
||||
package config
|
4
pkg/config/netmode/doc.go
Normal file
4
pkg/config/netmode/doc.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Package netmode contains well-known network magic numbers.
|
||||
*/
|
||||
package netmode
|
7
pkg/consensus/doc.go
Normal file
7
pkg/consensus/doc.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
Package consensus contains Neo consensus node implementation.
|
||||
|
||||
It uses external dBFT library for the core algorithm and basically joins this
|
||||
library with Neo node internals implemented in NeoGo.
|
||||
*/
|
||||
package consensus
|
6
pkg/core/block/doc.go
Normal file
6
pkg/core/block/doc.go
Normal file
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
Package block contains Neo block definition.
|
||||
|
||||
This is one of the core structures of Neo blockchain.
|
||||
*/
|
||||
package block
|
7
pkg/core/interop/doc.go
Normal file
7
pkg/core/interop/doc.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
Package interop contains implementations of Neo interop functions.
|
||||
|
||||
This is not the package you use from smart contracts, refer to pkg/interop
|
||||
for that.
|
||||
*/
|
||||
package interop
|
4
pkg/core/native/doc.go
Normal file
4
pkg/core/native/doc.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Package native contains Neo native contracts.
|
||||
*/
|
||||
package native
|
6
pkg/core/transaction/doc.go
Normal file
6
pkg/core/transaction/doc.go
Normal file
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
Package transaction contains Neo transaction definition.
|
||||
|
||||
This is one of the core structures of Neo blockchain.
|
||||
*/
|
||||
package transaction
|
6
pkg/crypto/doc.go
Normal file
6
pkg/crypto/doc.go
Normal file
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
Package crypto contains implementation of crypto functions used by Neo.
|
||||
|
||||
This package itself just has some useful interfaces.
|
||||
*/
|
||||
package crypto
|
6
pkg/crypto/hash/doc.go
Normal file
6
pkg/crypto/hash/doc.go
Normal file
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
Package hash contains wrappers for Neo hashing algorithms.
|
||||
|
||||
It also implements Merkle tree.
|
||||
*/
|
||||
package hash
|
4
pkg/crypto/keys/doc.go
Normal file
4
pkg/crypto/keys/doc.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Package keys wraps public/private keys and implements NEP-2 and WIF.
|
||||
*/
|
||||
package keys
|
4
pkg/encoding/address/doc.go
Normal file
4
pkg/encoding/address/doc.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Package address implements conversion of script hash to/from Neo address.
|
||||
*/
|
||||
package address
|
4
pkg/encoding/bigint/doc.go
Normal file
4
pkg/encoding/bigint/doc.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Package bigint implements Neo-specific big.Int (de)serialization to/from []byte.
|
||||
*/
|
||||
package bigint
|
4
pkg/encoding/fixedn/doc.go
Normal file
4
pkg/encoding/fixedn/doc.go
Normal file
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
Package fixedn implements fixed point integers with arbitrary precision.
|
||||
*/
|
||||
package fixedn
|
|
@ -1,3 +1,6 @@
|
|||
/*
|
||||
Package math provides access to useful numeric functions available in Neo VM.
|
||||
*/
|
||||
package math
|
||||
|
||||
import "github.com/nspcc-dev/neo-go/pkg/interop/neogointernal"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
Package crypto provides interface to CryptoLib native contract.
|
||||
It implements some cryptographic functions.
|
||||
*/
|
||||
package crypto
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
Package gas provides interface to GasToken native contract.
|
||||
It implements regular NEP-17 functions for GAS token.
|
||||
*/
|
||||
package gas
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
Package ledger provides interface to LedgerContract native contract.
|
||||
It allows to access ledger contents like transactions and blocks.
|
||||
*/
|
||||
package ledger
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
Package management provides interface to ContractManagement native contract.
|
||||
It allows to get/deploy/update contracts as well as get/set deployment fee.
|
||||
*/
|
||||
package management
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
Package nameservice provides interface to NameService native contract.
|
||||
It's a NEP-11 contract implementing a domain name service.
|
||||
*/
|
||||
package nameservice
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
Package neo provides interface to NeoToken native contract.
|
||||
NEO token is special, it's not just a regular NEP-17 contract, it also
|
||||
provides access to chain-specific settings and implements commmittee
|
||||
voting system.
|
||||
*/
|
||||
package neo
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
Package notary provides interface to Notary native contract.
|
||||
This contract is a NeoGo extension and is not available on regular Neo
|
||||
networks. To use it you need to have this extension enabled on the network.
|
||||
*/
|
||||
package notary
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
Package oracle provides interface to OracleContract native contract.
|
||||
Oracles allow you to get external (non-blockchain) data using HTTPS or NeoFS
|
||||
protocols.
|
||||
*/
|
||||
package oracle
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
Package policy provides interface to PolicyContract native contract.
|
||||
This contract holds various network-wide settings.
|
||||
*/
|
||||
package policy
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/*
|
||||
Package roles provides interface to RoleManagement native contract.
|
||||
Role management contract is used by committee to designate some nodes as
|
||||
providing some service on the network.
|
||||
*/
|
||||
package roles
|
||||
|
||||
import (
|
||||
|
@ -15,7 +20,8 @@ type Role byte
|
|||
const (
|
||||
StateValidator Role = 4
|
||||
Oracle Role = 8
|
||||
P2PNotary Role = 128
|
||||
// P2PNotary is an extension of Neo protocol available on specifically configured NeoGo networks.
|
||||
P2PNotary Role = 128
|
||||
)
|
||||
|
||||
// GetDesignatedByRole represents `getDesignatedByRole` method of RoleManagement native contract.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
Package std provides interface to StdLib native contract.
|
||||
It implements various useful conversion functions.
|
||||
*/
|
||||
package std
|
||||
|
||||
import (
|
||||
|
|
5
pkg/interop/neogointernal/doc.go
Normal file
5
pkg/interop/neogointernal/doc.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
/*
|
||||
Package neogointernal contains definitions of compiler intrinsics.
|
||||
It's not intended to be used directly by smart contracts.
|
||||
*/
|
||||
package neogointernal
|
Loading…
Reference in a new issue