NEO NameSpace
NEO namespace provides APIs for native contracts and verifying digital signature.
Native API :
API | Description |
---|---|
Neo.Native.Deploy | Deploys and initializes all native contracts |
Neo.Native.Call | Invokes native contracts |
API | Method Name | Description |
---|---|---|
Neo.Native.Tokens.NEO | name | Gets token name, ie: NEO |
symbol | Gets token symbol, ie: neo | |
decimals | Gets decimals | |
totalSupply | Gets the total supply | |
balanceOf | Gets balance of the token | |
transfer | Transfers the token | |
SetGasPerBlock | Sets the number of GAS generated for each block | |
GetGasPerBlock | Gets the number of GAS generated for each block | |
RegisterCandidate | Registers as a candidate | |
UnregisterCandidate | Unregisters as a candidate | |
vote | Vote | |
GetCandidates | Gets a list of candidates | |
GetCommittee | Gets a list of committee members | |
unclaimedGas | Gets unclaimed Gas |
API | Method Name | Description |
---|---|---|
Neo.Native.Tokens.GAS | name | Gets token name, ie: GAS |
symbol | Gets token symbol, ie: gas | |
decimals | Gets decimals | |
totalSupply | Gets the total supply | |
balanceOf | Gets balance of the token | |
transfer | Transfers the token |
API | Method Name | Description |
---|---|---|
Neo.Native.Policy | getMaxTransactionsPerBlock | Gets max transaction number per block |
getMaxBlockSize | Gets max block size | |
GetMaxBlockSystemFee | Gets the maximum system fee for the block | |
getFeePerByte | Gets fee per byte | |
IsBlocked | Verifies whether the account is blocked | |
setMaxBlockSize | Sets the max block size | |
SetMaxBlockSystemFee | Sets the maximum system fee for the block | |
setMaxTransactionsPerBlock | Sets max transaction per block | |
setFeePerByte | Sets fee per byte | |
BlockAccount | Sets blocked accounts | |
UnblockAccount | Unblocks accounts |
API | Method Name | Description |
---|---|---|
Neo.Native.Oracle | Finish | Invokes the callback function after getting the Oracle response |
Request | Initiates an Oracle request | |
Verify | Verifies if the Oracle response transaction is legal |
The above API are used for committee members only; ordinary users will fail during the signature verification process.
The source code for the above API can be found under
NEO
in the ( https://github.com/neo-project/neo/blob/master/src/neo/SmartContract/Native/PolicyContract.cs ).
Crypto API :
API | Description |
---|---|
Neo.Crypto.ECDsaVerify | Verifies signature of the current script container by public key |
Neo.Crypto.ECDsaCheckMultiSig | Verifies multiple signatures of the current script container by public key |
The source code for the above API can be found under
NEO
in the src/neo/SmartContract/InteropService.Native.cs and src/neo/SmartContract/InteropService.Crypto.cs .