
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
round-node
Advanced tools
The round client is designed to interact with Gem's API to make building blockchain apps drop dead simple. All the complexity of altcoin protocols and cryptography has been abstracted away so you can focus on building your product. Here are a few of the many great things the API and clients provide:
$ npm install round-node --save
This tutorial will run you through the process of setting up an application with Gem, creating a wallet, funding an address and creating a transaction.
This tutorial assumes that you have completed the developer signup and that you have successfully installed the client
In this step you will authenticate as one of your Gem applications.
var creds = {
api_token: API_TOKEN,
admin_token: ADMIN_TOKEN,
totp_secret: TOTP_SECRET
}
Round.client()
.then(function (client) {
return client.authenticate_application(creds);
})
.then(function (application) {
...
})
In this step you will create a Gem wallet, which is a 2-of-3 multisig bitcoin wallet.
// application.wallets() returns a 'wallets' resource which
// will allow you to create a wallet.
application.wallets()
.then(function (wallets) {
return wallets.create({
name: WALLET_NAME,
passphrase: SECURE_PASSPHRASE
});
})
.then(function (data) {
var wallet = data.wallet;
var backup_seed = data.backup_seed
});
IMPORTANT: Save the backup_seed somewhere safe, ideally on a piece of papper. You will need your backup_seed in case you forget your wallet's password. Gem wallets are multi-sig wallets and we only keep an encrypted copy of your primary pivate seed (which is decrypted client-side usig your wallet's passphrase). Therefor, if you forget your wallet's passphrase there is no way for us to recover a wallet without a backup_seed.
Wallets and Accounts Gem wallets have accounts that are scoped to a network (i.e. bitcoin, testnet, litecoin, dogecoin). A wallet comes with a default account named 'default'. The default account is a bitcoin account (not testnet).
wallet.accounts()
.then(function (accounts) {
// get the default account
return accounts.get('default');
})
.then(function (account) {
...
})
wallet.accounts()
.then(function (accounts) {
return accounts.create({
name: ACCOUNT_NAME,
network: NETWORK_OF_YOUR_CHOICE
});
})
.then(function (account) {
...
})
account.addresses()
.then(function (addresses) {
return addresses.create();
})
.then(function (address) {
// fund this address
console.log(address.string)
})
Payments have to be confirmed by the network and on Testnet that can be slow. To monitor for confirmations: input the address into the following url https://live.blockcypher.com/btc-testnet/address/<YOUR ADDRESS>. The current standard number of confirmations for a transaction to be considered safe is 6.
You will be able to make a payment with only one confirmation, however. While you wait for that to happen, feel free to read more details about: Wallets and Accounts
In this section you’ll learn how to create a payment using your wallet. Once your address gets one confirmation we’ll be able to send a payment out of the wallet. To make a payment, you'll unlock a wallet, generate a list of payees and then call the pay method.
```Javascript
var payees = [{
address: '18XcgfcK4F8d2VhwqFbCbgqrT44r2yHczr',
amount: 50000
}]
return account.pay({payees: payees});
})
.then(function (tx) {
console.log(tx)
})
```
The pay call takes a list of payee objects. A payee is a dict of {'address':ADDRESS, 'amount':amount} where address is the bitcoin address and amount is the number of satoshis. utxo_confirmations default to 6 and represents the number of confirmations an unspent output needs to have in order to be selected for the transaction.
CONGRATS - now build something cool.
FAQs
Client for the Gem cryptocurrency API
The npm package round-node receives a total of 30 weekly downloads. As such, round-node popularity was classified as not popular.
We found that round-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.