Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@aeternity/aepp-sdk
Advanced tools
JavaScript SDK for the revolutionary æternity blockchain, targeting the æternity node implementation. Aepp-sdk is hosted on GitHub.
<script>
tagFor those not using any JS bundling/complilation or compilation technique or tools like Codepen or similar online Editors, please check our Import SDK bundle with <script>
tag.
If you're using bundling/compilation techniques (eg. webpack
), please continue reading.
npm
or similarAdd the latest @aeternity/aepp-sdk
release from npmjs.com to your project using one of these commands
# install using npm...or yarn or pnpm
npm i @aeternity/aepp-sdk
Note: To install a Pre-Release (latest beta
or alpha
version) using on the latest Node version, you have to install the package appending the @next
tag reference, or even use the #
symbol and the Repo URL to install a version coming from a specific branch.
# install the @next version of the SDK
npm i @aeternity/aepp-sdk@next
# install the #develop version of the SDK
npm i https://github.com/aeternity/aepp-sdk-js#develop
Note : If you experience errors during the installation, you might need to install build tools for your OS.
Windows: Windows Build Tools
npm install -g windows-build-tools
Ubuntu / Debian: Build Essential
sudo apt-get update
sudo apt-get install build-essential
Mac: Download Xcode from AppStore, then run
xcode-select --install
You can do many more things now, but you'll probably have to start with:
Create an account using the 💻 CLI
import { Crypto } from '@aeternity/aepp-sdk/es'
const keypair = Crypto.generateKeyPair()
console.log(`Secret key: ${keypair.secretKey}`)
console.log(`Public key: ${keypair.publicKey}`)
To get yourself some AEs you can use the 🚰 Faucet Aepp. Just add your publicKey, and you'll immediately get some test tokens.
Import the right flavor. For this example with get the Universal
flavor, which contains all the features of the SDK:
// Import Flavor
import Ae from '@aeternity/aepp-sdk/es/ae/universal' // or other flavor
// Use Flavor
import Ae from '@aeternity/aepp-sdk/es/ae/universal' // or other flavor
import MemoryAccount from '@aeternity/aepp-sdk/es/account/memory' // or other flavor
import Node from '@aeternity/aepp-sdk/es/node' // or other flavor
Promise.all([
Node({ url, internalUrl })
]).then(nodes => {
Ae({
// This two params deprecated and will be remove in next major release
url: 'https://sdk-testnet.aepps.com',
internalUrl: 'https://sdk-testnet.aepps.com',
// instead use
nodes: [
{ name: 'someNode', instance: nodes[0] },
// mode2
],
compilerUrl: 'COMPILER_URL',
// `keypair` param deprecated and will be removed in next major release
keypair: { secretKey: 'A_PRIV_KEY', publicKey: 'A_PUB_ADDRESS' },
// instead use
accounts: [
MemoryAccount({ keypair: { secretKey: 'A_PRIV_KEY', publicKey: 'A_PUB_ADDRESS' } }),
// acc2
],
address: 'SELECTED_ACCOUNT_PUB',
networkId: 'ae_uat' // or any other networkId your client should connect to
}).then(ae => {
// Interacting with the blockchain client
// getting the latest block height
ae.height().then(height => {
// logs current height
console.log('Current Block Height:', height)
}).catch(e => {
// logs error
console.log(e)
})
})
})
Check out our Guides and Examples.
To quickly test all of Aeternity's blockchain features from your Terminal, you can Install and use our NodeJS CLI by running:
npm i -g @aeternity/aepp-cli
to globally install the CLIaecli --help
to get a list of possible commandseg. Create an Account:
aecli account create testWhateverAccountName
For advanced use, to get a deeper understanding of the SDK or to contribute to its development, it is advised to read the Contributing Guidelines section.
We keep our Changelog up to date.
ISC License (ISC) Copyright © 2018 aeternity developers
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
FAQs
SDK for the æternity blockchain
The npm package @aeternity/aepp-sdk receives a total of 769 weekly downloads. As such, @aeternity/aepp-sdk popularity was classified as not popular.
We found that @aeternity/aepp-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.