web3.js

  • 资料简介
  • 学员评分

web3.js - 以太坊 JavaScript API

web3.js 是一组库,允许您使用 HTTP、IPC 或 WebSocket 与本地或远程以太坊节点进行交互。

以下文档将指导您安装和运行 web3.js,并提供带有示例的API 参考文档。

用户文档

  • 入门
    • 添加 web3.js
  • 回调承诺事件
  • 词汇表
    • json接口

API参考

Web3

  • Web3.modules
  • Web3 Instance
  • 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
  • maxListenersWarningThreshold
  • 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
  • subscribe
  • clearSubscriptions
  • subscribe(“pendingTransactions”)
  • subscribe(“newBlockHeaders”)
  • subscribe(“syncing”)
  • subscribe(“logs”)

    web3.eth.Contract

  • new contract
  • = Properties =
  • defaultAccount
  • defaultBlock
  • defaultHardfork
  • defaultChain
  • defaultCommon
  • transactionBlockTimeout
  • transactionConfirmationBlocks
  • transactionPollingTimeout
  • handleRevert
  • options
  • options.address
  • options.jsonInterface
  • = Methods =
  • clone
  • deploy
  • methods
  • methods.myMethod.call
  • methods.myMethod.send
  • methods.myMethod.estimateGas
  • methods.myMethod.encodeABI
  • = Events =
  • 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

  • registryAddress
  • registry
  • resolver
  • getResolver
  • setResolver
  • getOwner
  • setOwner
  • getTTL
  • setTTL
  • setSubnodeOwner
  • setRecord
  • setSubnodeRecord
  • setApprovalForAll
  • isApprovedForAll
  • recordExists
  • getAddress
  • setAddress
  • getPubkey
  • setPubkey
  • getContent
  • setContent
  • getContenthash
  • setContenthash
  • getMultihash
  • supportsInterface
  • setMultihash
  • ENS events

    web3.eth.Iban

  • Iban instance
  • Iban contructor
  • toAddress
  • toIban
  • fromAddress
  • fromBban
  • createIndirect
    i- sValid
  • 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

  • Bloom Filters
  • randomHex
  • _
  • BN
  • isBN
  • isBigNumber
  • sha3
  • sha3Raw
  • soliditySha3
  • soliditySha3Raw
  • isHex
  • isHexStrict
  • isAddress
  • toChecksumAddress
  • checkAddressChecksum
  • toHex
  • stripHexPrefix
  • toBN
  • hexToNumberString
  • hexToNumber
  • numberToHex
  • hexToUtf8
  • hexToAscii
  • utf8ToHex
  • asciiToHex
  • hexToBytes
  • bytesToHex
  • toWei
  • fromWei
  • unitMap
  • padLeft
  • padRight
  • toTwosComplement
已有 0 用户参与0
0 : 0
+1已打分

发表评论

程序咖XR实验室
电子邮箱
  • 程序咖巴士
联系我们
  • 扫一扫,联系我们