![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.
@blockbee/api
Advanced tools
NodeJS's implementation of BlockBee's payment gateway
npm install @blockbee/api
var BlockBee = require('@blockbee/api')
const bb = new BlockBee(coin, myAddress, callbackUrl, params, blockbeeParams, apiKey)
const address = await bb.getAddress()
Where:
coin
is the coin you wish to use, from BlockBee's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...).myAddress
is your own crypto address, where your funds will be sent to. It's optional, you can leave it empty (e.g ''
) if you are setting it up in BlockBee's dashboard.callbackUrl
is the URL that will be called upon payment.params
is any parameter you wish to send to identify the payment, such as {orderId: 1234}
.blockbeeParams
parameters that will be passed to BlockBee _(check which extra parameters are available here: https://docs.blockbee.io/#operation/create).apiKey
is the API Key provided by BlockBee's dashboard.address
is the newly generated address, that you will show your users in order to receive payments.Once your customer makes a payment, BlockBee will send a callback to your
callbackUrl
. This callback information is by default inGET
but you can se it toPOST
by settingpost: 1
inblockbeeParams
. The parameters sent by BlockBee in this callback can be consulted here: https://docs.blockbee.io/#operation/confirmedcallbackget
const bb = new BlockBee(coin, myAddress, callbackUrl, params, blockbeeParams, apiKey)
const data = await bb.checkLogs()
Same parameters as before, the
data
returned can b e checked here: https://docs.blockbee.io/#operation/logs
const bb = new BlockBee(coin, myAddress, callbackUrl, params, blockbeeParams, apiKey)
const address = await bb.getAddress()
// ...
const qrCode = await bb.getQrcode(value, size)
For object creation, same parameters as before. You must first call ``getAddress` as this method requires the payment address to have been created.
For QR Code generation:
value
is the value requested to the user in the coin to which the request was done. Optional, can be empty if you don't wish to add the value to the QR Code.size
Size of the QR Code image in pixels. Optional, leave empty to use the default size of 512.apiKey
is the API Key provided by BlockBee's dashboard.Response is an object with
qr_code
(base64 encoded image data) andpayment_uri
(the value encoded in the QR), see https://docs.blockbee.io/#operation/qrcode for more information.
const fees = await BlockBee.getEstimate(coin, apiKey, addresses, priority)
Where:
coin
is the coin you wish to check, from BlockBee's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...)apiKey
is the API Key provided by BlockBee's dashboard.addresses
The number of addresses to forward the funds to. Optional, defaults to 1.priority
Confirmation priority, (check this article to learn more about it). Optional, defaults to default
.Response is an object with
estimated_cost
andestimated_cost_usd
, see https://docs.blockbee.io/#operation/estimate for more information.
const conversion = await BlockBee.getConvert(coin, value, from, apiKey)
Where:
coin
the target currency to convert to, from BlockBee's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...)value
value to convert in from
.from
currency to convert from, FIAT or crypto.apiKey
is the API Key provided by BlockBee's dashboard.Response is an object with
value_coin
andexchange_rate
, see https://docs.blockbee.io/#operation/convert for more information.
const supportedCoins = await BlockBee.getSupportedCoins(apiKey)
Where:
apiKey
is the API Key provided by BlockBee's dashboard.Response is an array with all support coins.
const createPayout = await BlockBee.createPayout(coin, address, value, apiKey);
This function can be used by you to request payouts (withdrawals in your platform).
Where:
coin
The cryptocurrency you want to request the Payout in (e.g btc
, eth
, erc20_usdt
, ...).
address
Address where the Payout must be sent to.
value
Amount to send to the address
.
The response will be only a
success
to confirm the Payout Request was successfully created. To fulfill it you will need to go to BlockBee Dashboard.
Need help?
Contact us @ https://blockbee.io/contacts/
FAQs
BlockBee's Library for NodeJS
The npm package @blockbee/api receives a total of 10 weekly downloads. As such, @blockbee/api popularity was classified as not popular.
We found that @blockbee/api 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
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.