![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@parity/api
Advanced tools
The Parity Promise-based API library for interfacing with Ethereum over RPC
Parity.js is a thin, fast, Promise-based wrapper around the Ethereum APIs.
Install the package with npm install --save @parity/api
// import the actual Api class
import Api from '@parity/api';
// do the setup
const provider = new Api.Provider.Http('http://localhost:8545');
const api = new Api(provider);
perform a call
api.eth.coinbase().then(coinbase => {
console.log(`The coinbase is ${coinbase}`);
});
multiple promises
Promise.all([api.eth.coinbase(), api.net.listening()]).then(
([coinbase, listening]) => {
// do stuff here
}
);
chaining promises
api.eth
.newFilter({...})
.then((filterId) => api.eth.getFilterChanges(filterId))
.then((changes) => {
console.log(changes);
});
attach contract
const abi = [{ name: 'callMe', inputs: [{ type: 'bool', ...}, { type: 'string', ...}]}, ...abi...];
const address = '0x123456...9abc';
const contract = api.newContract(abi, address);
find & call a function
contract.instance.callMe
.call({ gas: 21000 }, [true, 'someString']) // or estimateGas or postTransaction
.then(result => {
console.log(`the result was ${result}`);
});
APIs implement the calls as exposed in the Ethcore JSON Ethereum RPC definitions. Mapping follows the naming conventions of the originals, i.e. eth_call
becomes eth.call
, personal_accounts
becomes personal.accounts
, etc.
For operation within a public node, the following peerDependencies needs to be added (this functionality will be moved shortly) -
FAQs
The Parity Promise-based API library for interfacing with Ethereum over RPC
The npm package @parity/api receives a total of 62 weekly downloads. As such, @parity/api popularity was classified as not popular.
We found that @parity/api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.