netVersion()
Returns the network protocol version.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.NetVersion> netVersion(); |
None
- NetVersion
- String - Network protocol version.’1’- MAN Mainnet,’3’- MAN Testnet
1 | //net_Version |
netListening ()
If the client is in a listening state, the call returns true.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.NetListening> netListening(); |
None
- NetListening
- Boolean - When the client is in a listening state, it returns true. Otherwise, it returns false.
1 | //net_listening |
netPeerCount ()
Returns the number of peers connected to the current client.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.NetPeerCount> netPeerCount(); |
None
- NetPeerCount
- Number - the number of connected peers.
1 | // net_peerCount |
manProtocolVersion ()
Returns the version of the current protocol.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManProtocolVersion> manProtocolVersion(); |
None
- ManProtocolVersion
- String - the version of the current protocol.
1 | // man_protocolVersion |
manMining ()
If the client is actively mining, the call returns true.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManMining> manMining(); |
None
- ManMining
- Boolean - When the client is mining, it returns true, otherwise it returns false.
1 | // man_mining |
manHashrate ()
Returns the number of hashes that can be calculated per second when mining.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManHashrate> manHashrate(); |
None
- ManHashrate
- Number - The number of hashes calculated per second.
1 | // man_hashrate |
manGetDepositByAddr ()
Returns the stake information of the specified account.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetDepositAddr> manGetDepositByAddr(java.lang.String arg0, org.aimanj.protocol.core.DefaultBlockParameter arg1); |
- String – MAN address.
- DefaultBlockParameter
OBJECT – Stake account information, the information structure is as follows:
- AddressA0:STRING-The address of stake.
- AddressA1: STRING- The address of signature.
- OnlineTime: QUANTITY-Integer, online time, counted by block height.
- Role:QUANTITY-Election identity, 128: Verifiers; 16: Miners.
- PositionNonce: QUANTITY-Integer, position nonce value.
- Dpstmsg:OBJECT-stake position information list, stake warehouse information structure is as follows:
- DepositType:QUANTITY-Integer,//0-flexible,1-fixed1month,3-fixed3months,6-fixed6months.
- DepositAmount:QUANTITY-Integer, stake amount in zhu.
- Interest:QUANTITY-Integer,interest value in zhu.
- Slash:QUANTITY-Integer, punish value in zhu.
- BeginTime: QUANTITY-Integer, UTC time, the start time of stake; The start time of flexible stake is 0 .
- EndTime: QUANTITY-Integer, UTC time, represents the unstake time for fixed stakes, or the earliest withdrawal time for flexible stakes.
- Position: QUANTITY-Integer, the number of warehouse.
- WithDrawInfo:OBJECT-Refund object array, the information structure of refund object is as follows:
- WithDrawAmount:QUANTITY-Integer, refund amount in zhu
- WithDrawTime:QUANTITY-Integer, UTC time, refund time
1 | // man_getDepositByAddr |
manGetDeposit ()
Returns the stake information of the specified block. The block is specified by height.
- DefaultBlockParameter
OBJECT – The information of stake account is structured as follows:
- Address: STRING – The address of stake.
- SignAddress: STRING – The address of signature.
- Deposit: QUANTITY – Stake amount.
- Withdraw: QUANTITY – Election state, 0, in the election; non-0, withdrawal height.
- OnlineTime: QUANTITY – Integer, online time, counted by block height.
- Role: QUANTITY – Election identity, 128: Verifiers; 16: Miners.
1 | // man_getDeposit |
manGetMatrixCoin ()
Returns the multi-currency information.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetMatrixCoin> manGetMatrixCoin(org.aimanj.protocol.core.DefaultBlockParameter arg0); |
- DefaultBlockParameter
- ManGetMatrixCoin – array, the names of multi-currency.
1 | // man_getMatrixCoin |
manGetMatrixCoinConfig ()
Returns the configuration information for multi-currency.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetMatrixCoinConfig> manGetMatrixCoinConfig(java.lang.String arg0, org.aimanj.protocol.core.DefaultBlockParameter arg1); |
- STRING – The name of currency.
- DefaultBlockParameter
- OBJECT – Currency configuration information. The structure is as follows:
- CoinRange: STRING. The range of the coin.
- CoinType: STRING. The name of the coin.
- PackNum: QUANTITY. Integer, the maximum number of transactions per block.
- CoinUnit: QUANTITY. Integer, coin unit.
- CoinTotal: QUANTITY. Integer, coin total circulation.
- CoinAddress: DATA, 20 bytes. Coin transaction fee account address.
1 | ManGetMatrixCoinConfig manGetMatrixCoinConfig = aiManj.manGetMatrixCoinConfig("XMA", DefaultBlockParameterName.LATEST).send(); |
manGetDestroyBalance ()
Returns the number of MANs consumed to create multiple currencies.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.GetDestroyBalance> manGetDestroyBalance(org.aimanj.protocol.core.DefaultBlockParameter arg0); |
- DefaultBlockParameter
- GetDestroyBalance
- String,the number of MANs consumed to create multiple currencies in zhu.
1 | DefaultBlockParameter defaultBlockParameter = new DefaultBlockParameterNumber(11); |
manGetSignAccountsByHash ()
Returns a list of block signatures for the specified block. The block is specified by block hash.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetSignAccountsByHash> manGetSignAccountsByHash(java.lang.String arg0); |
String - block hash
- Object Array – The array of signature object. The signature structure is as follows:
- Sign: DATA, 65 bytes – signature
- Account:STRING, – signature account
- Validate:BOOL, – signature state。TRUE:signed;FALSE:unsigned
- Stock: QUANTITY, stock right. Invalid for now.
1 | ManGetSignAccountsByHash manGetSignAccountsByHash = aiManj.manGetSignAccountsByHash("0x6f56342215d11d2181f88f897dfd93da80dbaa686e6b2288178d8ec30e1b88a9").send(); |
manGetSignAccountsByNumber ()
Returns a list of block signatures for the specified block. The block is specified by block height.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetSignAccountsByHash> manGetSignAccountsByNumber(org.aimanj.protocol.core.DefaultBlockParameter arg0); |
- DefaultBlockParameter
- Object Array – The array of signature object. The signature structure is as follows:
- Sign: DATA, 65 bytes – signature
- Account:STRING, – signature account
- Validate:BOOL, – signature state。TRUE:signed;FALSE:unsigned
- Stock: QUANTITY, stock right. Invalid for now.
1 | ManGetSignAccountsByHash manGetSignAccountsByHash2 = aiManj.manGetSignAccountsByNumber(defaultBlockParameter).send(); |
manCall ()
A new message call is executed immediately without creating a transaction on the blockchain.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManCall> manCall(org.aimanj.protocol.core.methods.request.Transaction arg0, org.aimanj.protocol.core.DefaultBlockParameter arg1); |
Transaction – The transaction object to be sent:
- from: STRING – The original address that send the transaction, optional
- to: STRING – Transaction target address
- Currency: STRING – Transaction currency name
- gas: QUANTITY – The amount of gas available for transaction, optional.
aiman.man.call
does not consume gas, but some implementations require this parameter - gasPrice: QUANTITY – Gas price, optional
- value: QUANTITY – The number of MAN tokens sent by the transaction, optional
- data: DATA – Method signature and hash of encoding parameters, optional
DefaultBlockParameter
- ManCall
- String - Return Value of the executed contract.
1 | List list = new ArrayList(); |
manGetValidatorGroupInfo ()
Returns the joint mining information of the specified block. Block is specified by block height.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetMap> manGetValidatorGroupInfo(org.aimanj.protocol.core.DefaultBlockParameter arg0); |
- DefaultBlockParameter
OBJECT – Joint Mining Information MAP. MAP: subcontract address as key value; STRING; slice with contract storage information as value, OBJECT.
The contract storage information structure is as follows:
- OwnerInfo.OBJECT, contract creation information is structured as follows:
- Owner: String – Owner account address
- SignAddress: String – Signature account address
- WithdrawAllTime: QUANTITY – All revocation time
- Reward.OBJECT, return allocation information is structured as follows:
- LevelRate: OBJECT – Participant Threshold and Returns Ratio Information, structured as follows:
- Rate: OBJECT – Distribution proportional coefficient { Decimal : denominator; Rate: numerator };
- Threshold: QUANTITY – Integer, minimum threshold for participation. Unit zhu.
- NodeRate: OBJECT – Management fee information is structured as follows:
- Decimal: QUANTITY – Integer, denominator of management fee ratio.
- Rate: QUANTITY – Integer, numerator of management fee ratio.
- OwnerRate: OBJECT – owner return ratio information, structured as follows:
- Decimal: QUANTITY – Integer, denominator of owner’s return ratio.
- Rate: QUANTITY – Integer, numerator of owner’s return ratio.
- ValidatorMap: OBJECT, an array of participant information, including Owner; participant information structure is as follows:
- Address: STRING – Participant account address;
- Reward: QUANTITY – Integer, Incentive distribution accumulated value.
- AllAmount: QUANTITY – Integer, Total stake amount.
- Current: OBJECT – flexible stake information, structured as follows:
- Amount: QUANTITY – Integer, the amount of flexible stake.
- PreAmount: QUANTITY – Integer, the amount of flexible stake in the previous round.
- Interest: QUANTITY – Integer, flexible interest.
- WithdrawList: Withdraw stake information list a) WithDrawAmount Withdraw Amount;b) .
- WithDrawTime :Withdraw time
- Positions: OBJECT – fixed stake warehouse information list; fixed stake information is structured as follows:
- DType: QUANTITY – Integer, fixed stake type
- Position: QUANTITY – Integer, fixed stake warehouse
- Amount: QUANTITY – Integer, fixed stake amount
- EndTime: QUANTITY – Integer, fixed stake end time
- LevelRate: OBJECT – Participant Threshold and Returns Ratio Information, structured as follows:
1 | ManGetMap mangetvalidator = aiManj.manGetValidatorGroupInfo(DefaultBlockParameterName.LATEST).send(); |
manGetStorageAt ()
Returns the value of the specified address storage location.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetStorageAt> manGetStorageAt(java.lang.String arg0, java.math.BigInteger arg1, java.lang.String arg2, org.aimanj.protocol.core.DefaultBlockParameter arg3); |
- String- MAN address
- BigInteger - Location number in storage
- String – currency name
- DefaultBlockParameter
- ManGetStorageAt - The value of the specified storage location.
1 | ManGetStorageAt manGetStorageAt = aiManj.manGetStorageAt("MAN.aR54tfdEWDfsfHhdsy6BkRVGRYLj", new BigInteger("0"),"MAN",DefaultBlockParameterName.LATEST ).send(); |
manGetTopologyStatusByNumber ()
Returns the top-level node topology information of the specified block. Block is specified by height.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetMap> manGetTopologyStatusByNumber(org.aimanj.protocol.core.DefaultBlockParameter arg0); |
- DefaultBlockParameter
Object – Matched Topological Information Objects. The structure is as follows:
- leader_reelect: BOOL – Verifier Reelection Status. False: No verifier re-election occurred; True: Verifier re-election occurred;
- validators: An array of verifier information. The verifier information structure is as follows:
- account: STRING – Account;
- online: BOOL – Online status. True: Online; False: Offline
- position: QUANTITY – Location number
- backup_validators: Backup the verifier information array. For backup verifier information structure, see verifier information structure.
- miners: Miners information array. For miner information structure, see verifier information structure.
- elect_validators: Verifier masternode consensus online and offline information. For information structure, see verifier information structure.
- electbackupvalidators: Verifier backup node consensus online and offline information. For information structure, see verifier information structure.
1 | // man_getTopologyStatusByNumber |
manGetBlackList ()
Returns transaction blacklist accounts, which cannot transfer transactions.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetMap> manGetBlackList(); |
None
String array – Blacklisted transaction account address.
1 | // man_getBlackList |
manBlockNumber ()
Returns the number of the latest block.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManBlockNumber> manBlockNumber(); |
None
BigInteger- the number of the current block.
1 | // man_blockNumber |
manEstimateGas ()
Executes and estimates the amount of gas required for a transaction. The transaction will not be written to the blockchain. Note that, for reasons such as the EVM mechanism and node performance, the estimated values may be much larger than during actual usage.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManEstimateGas> manEstimateGas(org.aimanj.protocol.core.methods.request.Transaction arg0); |
Object - The object of the transaction. The structure is as follows:
- from: String - Specified the sender’s address. If not specified, use aiman.man.defaultAccount.
- to: String - The target address of the transaction. If created by a contract, it is null
- value: Number|String|BigNumber - Number of currencies carried in a transaction, in zhu. If the transaction is created through a contract, it is the initial capital.
- gas: Number|String|BigNumber - The amount of gas used in transactions; unused gases will be returned.
- gasPrice: Number|String|BigNumber - Gas fees for transactions.
- data: String - (optional) a byte string containing relevant data. If created through a contract, it’s code for initialization
- nonce: Number - Integer, using this value you can use the same nonce to cover your own pending transactions
- Function - Callback function that supports asynchronous execution [async].
- Currency – Type of currency
- bigInteger - Gas consumed by simulated call/transaction.
1 | List list = new ArrayList(); |
manGetBalance ()
Returns the balance of the specified address account.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetBalance> manGetBalance(java.lang.String arg0, org.aimanj.protocol.core.DefaultBlockParameter arg1); |
- String - The address in which the balance needs to be checked.
- DefaultBlockParameter
OBJECT – The corresponding account currency balance object array is structured as
follows:
- accountType:
QUANTITY
– Integer, currency number. 0, represents the main currency, MAN - balance:
QUANTITY
– Integer, balance, Unit: zhu
1 | ManGetBalance manGetBalance = aiManj |
manGetSelfLevel ()
Returns the identity of the current node in the network.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetString> manGetSelfLevel(); |
None
Identity mark. 0: Error; 1-4 bucket; 5 top-level nodes; 6 basic nodes.
1 | // man_getSelfLevel |
manGetCode ()
Returns the code for the specified address.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetCode> manGetCode(java.lang.String arg0, java.lang.String arg1, org.aimanj.protocol.core.DefaultBlockParameter arg2); |
- String - MAN address.
- String - currency name.
- DefaultBlockParameter
- Compiled byte code for a given address contract.
1 | // man_getCode |
manGasPrice ()
Returns the current price of gas.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGasPrice> manGasPrice(); |
None
- Integer- the current price of gas, unit: zhu.
1 | ManGasPrice manGasPrice = aiManj.manGasPrice().send(); |
manGetUpTime ()
Returns the uptime of the specified account from the latest mortgage to the specified block. The block is specified by the block height.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetString> manGetUpTime(java.lang.String arg0, org.aimanj.protocol.core.DefaultBlockParameter arg1); |
- STRING – Account address
- DefaultBlockParameter
- STRING – online time, counted by block height.
1 | // man_getUpTime |
manGetTransactionByBlockNumberAndIndex ()
Returns the transaction with the specified index number in the specified block.The block is specified by the block height.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManTransaction> manGetTransactionByBlockNumberAndIndex(org.aimanj.protocol.core.DefaultBlockParameter arg0, java.math.BigInteger arg1, java.lang.String arg2); |
- DefaultBlockParameter
- BigInteger - The serial number of the transaction.
- String - Currency name.
See manGetTransactionByHash()
1 | //man_getTransactionByBlockNumberAndIndex |
manGetTransactionByBlockHashAndIndex ()
Returns the transaction with the specified index number in the specified block.The block is specified by the hash.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManTransaction> manGetTransactionByBlockHashAndIndex(java.lang.String arg0, java.math.BigInteger arg1, java.lang.String arg2); |
- String - Transaction hash.
- BigInteger - The serial number of the transaction.
- String – Currency name.
参考manGetTransactionByHash()
1 | // manGetTransactionByBlockHashAndIndex |
manGetTransactionByHash ()
Returns a transaction with the specified hash value.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManTransaction> manGetTransactionByHash(java.lang.String arg0); |
String - transaction hash value.
Object – The object of the transaction. If no matching transaction is found, null is returned. The structure is as follows:
- hash: DATA, 32 bytes – transaction hash
- nonce: QUANTITY – Number of transactions that occurred prior to this transaction by the sender
- blockHash: DATA, 32 bytes – Hash value of blocks containing transactions. Pending blocks return null
- blockNumber: QUANTITY – Block number of blocks containing transactions. Pending blocks return null
- transactionIndex: QUANTITY – Transaction Index. Pending blocks return null
- from: String, – Transaction sender address
- to: String, – Transaction receiver address
- value: QUANTITY – the quantity of MAN sent, unit: zhu
- gasPrice: QUANTITY – the price of gas paid by the sender, unit: zhu
- gas: QUANTITY – the amount of gas available to the sender
- input: DATA – data sent alongside the transaction
- v: QUANTITY – ECDSA recovery id
- r: DATA, 32 bytes – ECDSA signature r
- s: DATA, 32 bytes– ECDSA signature s
- TxEnterType: transaction pool types (normal transactions are set as 0)
- matrixType: transaction types (normal transactions are set as 0)
- IsEntrustTx:
- 0: self-paid gas
- 1: gas paid by others
- CommitTime: submit time, available to scheduled transactions and revocable transactions only
- Currency: type of currency
- ExtraTo: extended transaction (should be filled for one to many transactions)
1 | // man_getTransactionByHash |
manGetBlockTransactionCountByHash ()
Return to the number of transactions sent from a specified address.The block is specified by the hash.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetBlockTransactionCountByHash> manGetBlockTransactionCountByHash(java.lang.String arg0); |
- String - Block hash。
- ManGetBlockTransactionCountByHash
- BigInteger - Number of transactions within a specified block.
1 | // man_getBlockTransactionCountByHash |
manGetTransactionCount ()
Return to the number of transactions sent from a specified address.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetTransactionCount> manGetTransactionCount(java.lang.String arg0, org.aimanj.protocol.core.DefaultBlockParameter arg1); |
- String - MAN address
- DefaultBlockParameter
- BigInteger - Number of transactions sent from a specified address.The starting number is 0x10000000000000.
1 | ManGetTransactionCount manGetTransactionCount = aiManj |
manGetTransactionReceipt ()
Returns the receipt for the specified transaction. The transactions are specified by hash.
Please note that receipts for pending transactions are invalid.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetTransactionReceipt> manGetTransactionReceipt(java.lang.String arg0); |
- String - Transaction hash
Object – Transaction recipients. If the receipt does not exist, null is returned. The structure of transaction options is as follows:
- transactionHash: DATA, 32 bytes – transaction hash
- transactionIndex: QUANTITY – transaction Index
- Currency:STRING-currency name
- blockHash: DATA, 32 bytes – hash of transaction blocks
- blockNumber: QUANTITY – transaction block number
- from: String, the address of transaction sender
- to: String, the address of transaction recipient
- cumulativeGasUsed: QUANTITY – Total gas consumption of blocks in the transaction process
- gasUsed: QUANTITY – The amount of gas consumed in transactions
- contractAddress: String – In a new contract creation transaction, this value is the newly created contract address. Otherwise, it returns null.
- logs: Array – An array of log objects generated by this transaction
- logsBloom: DATA, 256 bytes– bloom filter, lightweight client for fast extraction of related logs
- status: QUANTITY, 1 (Success) or 0 (Failure)
1 | ManGetTransactionReceipt transactionReceipt = aiManj.manGetTransactionReceipt("0x7642a93a137df23bcb31c82365c2c4dcd3067f6794168fbaab6db0d7c0b964cd").send(); |
manSendTransaction ()
Launches a transaction.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManSendTransaction> manSendTransaction(org.aimanj.protocol.core.methods.request.Transaction arg0); |
Object – The object of the transaction. The structure is as follows:
- from: String – Specified the sender’s address. If not specified, use man.defaultAccount.
- to: String – The target address of the transaction. If created by a contract, it is null
- Note: If the transaction is issuing a contract, it is null.
- value: Number|String|BigNumber – Number of currencies carried in a transaction, in zhu. If the transaction is created through a contract, it is the initial capital.
- gas: Number|String|BigNumber – The amount of gas used in transactions; unused gases will be returned
- gasPrice: Number|String|BigNumber – Gas fees for transactions
- data: String – (optional) a byte string containing relevant data. If created through a contract, it’s code for initialization
- nonce: Number – Integer, using this value you can use the same nonce to cover your own pending transactions
- Currency: Type of currency
- ExtraTo: Extended transactions (1 to more transactions should be filled in)
- String - 32-byte transaction hash string. Denoted in hexadecimal.
When creating a contract, you can use manGetTransactionReceipt()
to get the contract address.
1 | // man_sendTransaction |
manSendRawTransaction ()
Initiates a transaction or contract to sign a transaction.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManSendTransaction> manSendRawTransaction(java.lang.String arg0); |
Object - The transaction object to be sent:
- to: String - The target address of the transaction. If created by a contract, it is null
- value: Number|String|BigNumber - Number of currencies carried in a transaction, in zhu. If the transaction is created through a contract, it is the initial capital.
- gas: Number|String|BigNumber - The amount of gas used in transactions; unused gases will be returned.
- gasPrice: Number|String|BigNumber - Gas fees for transactions
- data: String - (optional) a byte string containing relevant data. If created through a contract, it is the code used for initialization.
- nonce: Number -Integer, using this value you can use the same nonce to cover your own pending transactions.
- V: Signature results
- R: Signature results
- S: Signature results
- txEnterType Type of transaction pool (normal transaction set to 0)
- Currency: The type of currency
- TxType:transaction type (normal transaction set to 0)
- LockHeight:Reserved fields
- IsEntrustTx
- 0: self-paid gas
- 1: gas paid by others
- CommitTime:Submission time, available only for schduled and revocable transactions
- ExtraTo: Extended transactions (1 to more transactions should be filled in)
- TxEnterType:transaction pool types(normaltransactions are set as 0)
- String - transaction hash.
When creating a contract, you can use manGetTransactionReceipt()
to get the contract address.
1 | List list = new ArrayList(); |
manSign ()
Matrix signatures are calculated using the following formula:
``sign(keccak256(“\x19Matrix Signed Message:\n” + len(message) + message)))`.
By adding a prefix to the message, the result signature can be recognized as a Matrix signature. This prevents malicious DApp from signing arbitrary data, such as transactions, and using signatures to impersonate others.
It should be noted that the address of the signature must be unlocked.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManSign> manSign(java.lang.String arg0, java.lang.String arg1); |
- String - MAN Address
- String - Message to Sign
String - Signature
1 | // man_sign |
manGetBlockTransactionCountByNumber ()
Return to the number of transactions sent from a specified address.The block is specified by the block height.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetBlockTransactionCountByNumber> manGetBlockTransactionCountByNumber(org.aimanj.protocol.core.DefaultBlockParameter arg0); |
- DefaultBlockParameter
- BigInteger - Number of transactions within a specified block.
1 | // man_getBlockTransactionCountByNumber |
manAccounts ()
Returns a list of address strings held by the client.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManAccounts> manAccounts(); |
无
- Array - A list of address strings held by the client.
1 | ManAccounts manaAccounts = aiManj.manAccounts().send(); |
manNewBlockFilter ()
Creates a filter in the node to notify when a new block is generated. To check whether the state changes, call man_getFilterChanges
。
None
ManFilter – Filter Number
1 | ManFilter newBlockFilter = aiManj.manNewBlockFilter().send(); |
manUninstallFilter ()
Uninstalls a filter with a specified number. When you do not need to listen, you always need to execute the call. In addition, if the filter does not receive the manGetFilterChanges
call within a certain period of time, it will automatically timeout.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManUninstallFilter> manUninstallFilter(java.math.BigInteger arg0); |
- BigInteger-Filter Number
- ManUninstallFilter – Uninstall object.
- Boolean - Return true if uninstalled successfully, otherwise return false.
1 | ManUninstallFilter manUninstallFilter = aiManj.manUninstallFilter(new BigInteger("5b54065e0ab48d655ce6a6dea28b7e2c",16)).send(); |
manNewPendingTransactionFilter ()
Create a filter in the node for notification when pending transactions occur. To check if the state has changed, call manGetFilterChanges
.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManFilter> manNewPendingTransactionFilter(); |
None
- ManFilter - Filter Number
1 | // man_newPendingTransactionFilter |
manGetEntrustList ()
Returns entrust list for specified authorized account.
1 | public abstract org.aimanj.protocol.core.Request<?,org.aimanj.protocol.core.methods.response.ManGetEntrustList> manGetEntrustList(java.lang.String arg0); |
- STRING- Authorized account address.
OBJECT – Entrusted account information list. The information structure of the entrusted account is as follows:
- EntrustAddres: STRING – Entrusted account address
- IsEntrustGas: BOOLEAN – Whether to entrust others to pay for gas. True means that gas is paid by others entrusted.
- IsEntrustSign: BOOLEAN – Whether to entrust signature or not. True means that it is an entrusted signature.
- EnstrustSetType: DATA, 1byte- 0: entrusted by height, 1: entrusted by time, 2: entrusted by number of times
- StartHeight: QUANTITY – Integer block number, start height of entrust
- EndHeight: QUANTITY – Integer block number, end height of entrust
- StartTime: QUANTITY – UTC time, start time of entrust
- EndTime: QUANTITY – UTC time, end time of entrust
- EntrustCount: QUANTITY – Number of entrusts
1 | ManGetEntrustList manGetEntrustList = aiManj.manGetEntrustList("MAN.5xYzBHrJfXeJi9yQ8Qq8hvm19bU4").send(); |