承接 freddiecoleman/luxstack-razrbit 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

freddiecoleman/luxstack-razrbit

Composer 安装命令:

composer require freddiecoleman/luxstack-razrbit

包简介

Build, test and scale bitcoin apps faster with Razrbit

关键字:

README 文档

README

This package contains the Luxstack Razrbit Bitcoin platform - allowing you to build, test and scale bitcoin apps faster.

I did not create the Razrbit Bitcoin Platform, it is built by Luxstack. I have simply written some automated tests for it and added some extra Laravel support.

Installation

Begin by installing this package through Composer.

{
    "require": {
		"freddiecoleman/luxstack-razrbit": "1.1.0"
	}
}

API Key

In order to use this package you will need to set the following constants containing your Luxstack App ID and secret.

CONST MY_APP_ID     = "A25AOpLUoT";
CONST MY_APP_SECRET = "688e2b77-09a3-4945-9468-bf188ff3de88";

Laravel Users

If you are a Laravel user there is a service provider that you can make use of.

// app/config/app.php

'providers' => [
    '...',
    'Luxstack\Razrbit\RazrbitServiceProvider'
];

When this provider is booted, you'll have access to a helpful Razrbit facade, which you may use in your controllers.

Route::get('/', function()
{
	return Razrbit::marketsPrice('USD');
});

Non-Laravel users

If you are not using Laravel you will need to instantiate Razrbit manually yourself.

$razrbit = new Razrbit(MY_APP_ID,MY_APP_SECRET);

Once this has been done, any available services can be invoked. Response data is accessible in the callback and can be used as needed:

$new_address = $razrbit->walletCreateNewAddress();

$balance = $razrbit->getBalanceFromAddress($new_address);

API

Wallet

$razrbit->walletCreateNewAddress();

Creates a new bitcoin address

razrbit->walletSendAmount("1exampleFromAddressPrivateKey", "1exampleToAddress", 123456);

Sends bitcoin from one of your addresses to the destination address. Amount is measured in bits.

$razrbit->walletGetBalanceFromAddress($exampleAddress);

Returns the balance of the given address in bits.

Explorer

$razrbit->explorerBlock($exampleBlock);

Retrieve details about a given block

$razrbit->explorerTransaction($exampleTransaction);

Retrieve details about a given transaction

$razrbit->explorerAddress($exampleAddress);

Retrieve details about a given address

$razrbit->explorerAddressUnspentOutputs($exampleAddress);

Returns the list of unspent outputs for a given address

Network

$razrbit->networkGetDifficulty();

Retrieve the current network difficulty

$razrbit->networkPushTransaction("exampleTransaction");

Push a transaction onto the network

Markets

currencyCode is a valid ISO 4217 code such as USD or EUR.

$razrbit->marketsPrice("USD");

Returns the current bitcoin price

$razrbit->marketsDayPrice("USD");

Returns the day price

$razrbit->marketsHistoricalPrice("USD","2014-03-03");

Returns the historical price at the given date. date must be a date in the yyyy-mm-dd format.

Webhooks

$razrbit->notificationAddress($exampleAddress,"example@example.com");

Set up a notification email for a given address

$razrbit->notificationBlock($blockHash,"example@example.com");

Set up a notification email for a given block

$razrbit->notificationTransaction($transactionHash,"example@example.com");

Set up a notification email for a given transaction

License

Razrbit code released under the MIT license.

Copyright 2012-2014 LUXSTACK Inc. Razrbit is a trademark maintained by LUXSTACK Inc.

Razrbit Bitcoin SDKs for other platforms

Package author

This package was made by Freddie Coleman

统计信息

  • 总下载量: 81
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-09-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固