web3.js - 以太坊 JavaScript API
web3.js 是一组使用HTTP或IPC连接来和本地或远程以太坊节点进行交互的库。
译者注:如果我们使用JavaScript 来开发 DApp时,很多时候需要使用到 web3.js (当然也可以选择使用 ethers.js )。
这份文档有两个部分: 安装和运行web3.js 指导我们如何导入web3.js ,而 接口文档 API 说明了接口的时候,同时也包含了大量的实例。
内容:
文档说明
接口手册
- Web3
- Web3.modules
- Web3 实例
- version
- utils
- setProvider
- providers
- givenProvider
- currentProvider
- BatchRequest
- extend
- web3.eth
- Note on checksum addresses
- subscribe
- Contract
- Iban
- personal
- accounts
- ens
- abi
- net
- setProvider
- providers
- givenProvider
- currentProvider
- BatchRequest
- extend
- defaultAccount
- defaultBlock
- defaultHardfork
- defaultChain
- defaultCommon
- transactionBlockTimeout
- transactionConfirmationBlocks
- transactionPollingTimeout
- handleRevert
- getProtocolVersion
- isSyncing
- getCoinbase
- isMining
- getHashrate
- getGasPrice
- getAccounts
- getBlockNumber
- getBalance
- getStorageAt
- getCode
- getBlock
- getBlockTransactionCount
- getBlockUncleCount
- getUncle
- getTransaction
- getPendingTransactions
- getTransactionFromBlock
- getTransactionReceipt
- getTransactionCount
- sendTransaction
- sendSignedTransaction
- sign
- signTransaction
- call
- estimateGas
- getPastLogs
- getWork
- submitWork
- requestAccounts
- getChainId
- getNodeInfo
- getProof
- web3.eth.subscribe
- 订阅调用
- clearSubscriptions
- subscribe(“pendingTransactions”)
- subscribe(“newBlockHeaders”)
- subscribe(“syncing”)
- subscribe(“logs”)
- web3.eth.Contract
- new contract
- = 属性列表 =
- defaultAccount
- defaultBlock
- defaultHardfork
- defaultChain
- defaultCommon
- transactionBlockTimeout
- transactionConfirmationBlocks
- transactionPollingTimeout
- handleRevert
- 选项属性
- options.address
- options.jsonInterface
- = 方法 =
- clone
- deploy
- methods
- methods.myMethod.call
- methods.myMethod.send
- methods.myMethod.estimateGas
- methods.myMethod.encodeABI
- = 事件 =
- once
- events
- events.allEvents
- getPastEvents
- web3.eth.accounts
- create
- privateKeyToAccount
- signTransaction
- recoverTransaction
- hashMessage
- sign
- recover
- encrypt
- decrypt
- wallet
- wallet.create
- wallet.add
- wallet.remove
- wallet.clear
- wallet.encrypt
- wallet.decrypt
- wallet.save
- wallet.load
- web3.eth.personal
- setProvider
- providers
- givenProvider
- currentProvider
- BatchRequest
- extend
- newAccount
- sign
- ecRecover
- signTransaction
- sendTransaction
- unlockAccount
- lockAccount
- getAccounts
- importRawKey
- web3.eth.ens
[web3.eth.ens](/docs/web3js/web3-eth-ens.md#web3-eth-ens-ens)
相关函数让你可以与 ENS 进行交互。- web3.eth.Iban
- Iban 实例
- Iban 构造器
- toAddress
- toIban
- fromAddress
- fromBban
- createIndirect
- isValid
- prototype.isValid
- prototype.isDirect
- prototype.isIndirect
- prototype.checksum
- prototype.institution
- prototype.client
- prototype.toAddress
- prototype.toString
- web3.eth.abi
- encodeFunctionSignature
- encodeEventSignature
- encodeParameter
- encodeParameters
- encodeFunctionCall
- decodeParameter
- decodeParameters
- decodeLog
- web3.*.net
- getId
- isListening
- getPeerCount
- web3.bzz
- setProvider
- givenProvider
- currentProvider
- upload
- download
- pick
- web3.shh
- setProvider
- providers
- givenProvider
- currentProvider
- BatchRequest
- extend
- getId
- isListening
- getPeerCount
- getVersion
- getInfo
- setMaxMessageSize
- setMinPoW
- markTrustedPeer
- newKeyPair
- addPrivateKey
- deleteKeyPair
- hasKeyPair
- getPublicKey
- getPrivateKey
- newSymKey
- addSymKey
- generateSymKeyFromPassword
- hasSymKey
- getSymKey
- deleteSymKey
- post
- subscribe
- clearSubscriptions
- newMessageFilter
- deleteMessageFilter
- getFilterMessages
- web3.utils
- 布隆过滤器
- randomHex
- _
- BN
- isBN
- isBigNumber
- sha3
- sha3Raw
- soliditySha3
- soliditySha3Raw
- isHex
- isHexStrict
- isAddress
- toChecksumAddress
- checkAddressChecksum
- toHex
- toBN
- hexToNumberString
- hexToNumber
- numberToHex
- hexToUtf8
- hexToAscii
- utf8ToHex
- asciiToHex
- hexToBytes
- bytesToHex
- toWei
- fromWei
- unitMap
- padLeft
- padRight
- toTwosComplement
作者:admin 创建时间:2024-10-23 05:17
最后编辑:admin 更新时间:2024-10-23 08:49
最后编辑:admin 更新时间:2024-10-23 08:49