Note
This documentation is under construction and the pweb3.js 1.0 stable version isn’t released. If you’re using a version v0.x.x of pweb3.js then please have a look at github.com/pweb3/wiki/wiki/JavaScript-API.
pweb3.js - Pchain JavaScript API¶
pweb3.js is a collection of libraries which allow you to interact with a local or remote Pchain node, using an HTTP, WebSocket or IPC connection.
The following documentation will guide you through installing and running pweb3.js, as well as providing a API reference documentation with examples.
Contents:
- Web3
- web3.pi
- Note on checksum addresses
- subscribe
- Contract
- Iban
- personal
- accounts
- ens
- abi
- net
- options
- defaultBlock
- defaultAccount
- defaultGasPrice
- defaultGas
- transactionBlockTimeout
- transactionConfirmationBlocks
- transactionPollingTimeout
- transactionSigner
- setProvider
- providers
- givenProvider
- currentProvider
- BatchRequest
- getProtocolVersion
- isSyncing
- getCoinbase
- isMining
- getHashrate
- getGasPrice
- getAccounts
- getBlockNumber
- getBalance
- getFullBalance
- getStorageAt
- getCode
- getBlock
- getBlockTransactionCount
- getUncle
- getTransaction
- getPendingTransactions
- getTransactionFromBlock
- getTransactionReceipt
- getTransactionCount
- sendTransaction
- sendSignedTransaction
- sign
- signTransaction
- call
- estimateGas
- getPastLogs
- getWork
- submitWork
- requestAccounts
- getChainId
- getNodeInfo
- getProof
- web3.pi.subscribe
- web3.pi.Contract
- web3.pi.accounts
- web3.pi.personal
- options
- defaultBlock
- defaultAccount
- defaultGasPrice
- defaultGas
- transactionBlockTimeout
- transactionConfirmationBlocks
- transactionPollingTimeout
- transactionSigner
- setProvider
- providers
- givenProvider
- currentProvider
- BatchRequest
- newAccount
- sign
- ecRecover
- signTransaction
- sendTransaction
- unlockAccount
- lockAccount
- getAccounts
- importRawKey
- web3.pi.ens
- web3.pi.Iban
- web3.pi.net
- web3.pi.abi
- web3.chain
- web3.tdm
- web3.del
- web3.*.net
- web3.bzz
- web3.shh
- options
- defaultBlock
- defaultAccount
- defaultGasPrice
- defaultGas
- transactionBlockTimeout
- transactionConfirmationBlocks
- transactionPollingTimeout
- transactionSigner
- setProvider
- providers
- givenProvider
- currentProvider
- BatchRequest
- 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
- keccak256
- soliditySha3
- isHex
- isHexStrict
- isAddress
- toChecksumAddress
- stripHexPrefix
- checkAddressChecksum
- toHex
- toBN
- hexToNumberString
- hexToNumber
- numberToHex
- hexToUtf8
- hexToAscii
- utf8ToHex
- asciiToHex
- hexToBytes
- bytesToHex
- toWei
- fromWei
- unitMap
- padLeft
- padRight
- toTwosComplement
- getSignatureParameters
- Module API
- Contract Module API
- Core Module
- Core Method Module
- AbstractMethodFactory
- AbstractMethod
- Type
- beforeExecution
- afterExecution
- execute
- rpcMethod
- parametersAmount
- parameters
- callback
- setArguments
- getArguments
- isHash
- AbstractObservedTransactionMethod
- Type
- beforeExecution
- afterExecution
- execute
- rpcMethod
- parametersAmount
- parameters
- callback
- setArguments
- getArguments
- isHash
- Core Subscriptions Module
- Admin Module
- options
- defaultBlock
- defaultAccount
- defaultGasPrice
- defaultGas
- transactionBlockTimeout
- transactionConfirmationBlocks
- transactionPollingTimeout
- transactionSigner
- setProvider
- providers
- givenProvider
- currentProvider
- BatchRequest
- addPeer
- getDataDirectory
- getNodeInfo
- getPeers
- setSolc
- startRPC
- startWS
- stopRPC
- stopWS
- Debug Module
- options
- defaultBlock
- defaultAccount
- defaultGasPrice
- defaultGas
- transactionBlockTimeout
- transactionConfirmationBlocks
- transactionPollingTimeout
- transactionSigner
- setProvider
- providers
- givenProvider
- currentProvider
- BatchRequest
- setBackTraceAt
- blockProfile
- cpuProfile
- dumpBlock
- getGCStats
- getBlockRlp
- goTrace
- getMemStats
- getSeedHash
- setBlockProfileRate
- setHead
- getStacks
- startCPUProfile
- stopCPUProfile
- startGoTrace
- stopGoTrace
- getBlockTrace
- getBlockTraceByNumber
- getBlockTraceByHash
- getBlockTraceFromFile
- getTransactionTrace
- setVerbosity
- setVerbosityPattern
- writeBlockProfile
- writeMemProfile
- Miner Module
- TxPool Module