coinapult / public Goto Github PK
View Code? Open in Web Editor NEWCoinapult API clients, plugins, etc.
License: Other
Coinapult API clients, plugins, etc.
License: Other
WebSocket connection to 'wss://stream.coinapult.com/websocket' failed: Error during WebSocket handshake: Unexpected response code: 404
It seems connecting to the websocket stream for Coinapult is throwing an error.
Please recompile jars with Java 6 or Java 7. Compiling to Java 6 offers Android compatibility.
Regarding your comment in
class Coinapult_Bitcoin_Helper_Data extends Mage_Core_Helper_Abstract
{
//not sure why magento requires this... I have no need of a helper.
}
The helper is used for translation of system XML labels.
For example https://github.com/coinapult/public/blob/master/plugin/magento/app/code/local/Coinapult/Bitcoin/etc/system.xml#L26-L27
<bitcoin translate="label" module="bitcoin">
<label>Coinapult Bitcoin Payment</label>
...
</bitcoin>
When "Magento" sees you want to translate the <label>
content, it will take the value of the module
attribute and use that to construct the helper.
Then it calls the __()
method to translate the string as in:
Mage::helper('bitcoin')->__('Coinapult Bitcoin Payment'):
So you could get rid of the helper if you wanted to if you either removed the translate
attributes from the system.xml or if you removed the module
attribute (then Magento would default to the core/data helper).
But its good practice to keep a helper for each module because in Magento 1 translation is scoped by modules. Should you be interested there is more information on the translation process here:
Create more examples in JavaScript for using the SockJS and websocket for ticker and transactions. Also include the links for using those examples with the Coinapult playground, there is no documentation for using the Coinapult testnet environment.
I am seeing each "pending" transaction returned twice in rapid sequence. Example is below output from the SockJS connection. Expected behavior would be to see each unique transaction only once to reduce payload. The actual behavior is to see duplicates in the stream output. For example, here are two different pending transactions. Both are returned twice in rapid sequence (check timestamp on terminal dump).
I20150312-10:25:02.388(-3)? got tx { transaction:
I20150312-10:25:02.388(-3)? { timestamp: 1426166701,
I20150312-10:25:02.388(-3)? address: 'n3iwjj9bQj61zeBSLLDgUhxA5UBERt6pyY',
I20150312-10:25:02.388(-3)? state: 'pending',
I20150312-10:25:02.388(-3)? meta: { note: '', to: '', customid: '' },
I20150312-10:25:02.388(-3)? transaction_id: '54f898d231433d224ac3d407',
I20150312-10:25:02.389(-3)? in: { expected: 0.1, currency: 'BTC', amount: 0 },
I20150312-10:25:02.389(-3)? type: 'invoice',
I20150312-10:25:02.389(-3)? completeTime: null,
I20150312-10:25:02.389(-3)? out: { expected: 0.1, currency: 'BTC', amount: 0 } },
I20150312-10:25:02.389(-3)? type: 'transaction',
I20150312-10:25:02.389(-3)? meta:
I20150312-10:25:02.389(-3)? { to: '[email protected]',
I20150312-10:25:02.389(-3)? blockchain: { a: 'n3iwjj9bQj61zeBSLLDgUhxA5UBERt6pyY', l: 'address' },
I20150312-10:25:02.389(-3)? flow: '+',
I20150312-10:25:02.390(-3)? address: '[email protected]' } }
I20150312-10:25:02.390(-3)? got tx { transaction:
I20150312-10:25:02.390(-3)? { timestamp: 1426166701,
I20150312-10:25:02.390(-3)? address: 'n3iwjj9bQj61zeBSLLDgUhxA5UBERt6pyY',
I20150312-10:25:02.390(-3)? state: 'pending',
I20150312-10:25:02.390(-3)? meta: { note: '', to: '', customid: '' },
I20150312-10:25:02.390(-3)? transaction_id: '54f898d231433d224ac3d407',
I20150312-10:25:02.391(-3)? in: { expected: 0.1, currency: 'BTC', amount: 0 },
I20150312-10:25:02.391(-3)? type: 'invoice',
I20150312-10:25:02.391(-3)? completeTime: null,
I20150312-10:25:02.391(-3)? out: { expected: 0.1, currency: 'BTC', amount: 0 } },
I20150312-10:25:02.391(-3)? type: 'transaction',
I20150312-10:25:02.391(-3)? meta:
I20150312-10:25:02.391(-3)? { to: '[email protected]',
I20150312-10:25:02.391(-3)? blockchain: { a: 'n3iwjj9bQj61zeBSLLDgUhxA5UBERt6pyY', l: 'address' },
I20150312-10:25:02.392(-3)? flow: '+',
I20150312-10:25:02.392(-3)? address: '[email protected]' } }
I20150312-10:25:02.416(-3)? got tx { transaction:
I20150312-10:25:02.416(-3)? { timestamp: 1426166701,
I20150312-10:25:02.416(-3)? address: 'mqxKCNDzehM1sw8rPLc3hpLF9kGj3sUtzP',
I20150312-10:25:02.416(-3)? state: 'pending',
I20150312-10:25:02.416(-3)? meta: { note: '', to: '', customid: '' },
I20150312-10:25:02.416(-3)? transaction_id: '54fde0fc31433d224c009d30',
I20150312-10:25:02.416(-3)? in: { expected: 0.1, currency: 'BTC', amount: 0 },
I20150312-10:25:02.416(-3)? type: 'invoice',
I20150312-10:25:02.416(-3)? completeTime: null,
I20150312-10:25:02.416(-3)? out: { expected: 0.1, currency: 'BTC', amount: 0 } },
I20150312-10:25:02.416(-3)? type: 'transaction',
I20150312-10:25:02.416(-3)? meta:
I20150312-10:25:02.417(-3)? { to: '[email protected]',
I20150312-10:25:02.417(-3)? blockchain: { a: 'mqxKCNDzehM1sw8rPLc3hpLF9kGj3sUtzP', l: 'address' },
I20150312-10:25:02.417(-3)? flow: '+',
I20150312-10:25:02.417(-3)? address: null } }
I20150312-10:25:02.425(-3)? got tx { transaction:
I20150312-10:25:02.425(-3)? { timestamp: 1426166701,
I20150312-10:25:02.425(-3)? address: 'mqxKCNDzehM1sw8rPLc3hpLF9kGj3sUtzP',
I20150312-10:25:02.425(-3)? state: 'pending',
I20150312-10:25:02.425(-3)? meta: { note: '', to: '', customid: '' },
I20150312-10:25:02.425(-3)? transaction_id: '54fde0fc31433d224c009d30',
I20150312-10:25:02.425(-3)? in: { expected: 0.1, currency: 'BTC', amount: 0 },
I20150312-10:25:02.425(-3)? type: 'invoice',
I20150312-10:25:02.425(-3)? completeTime: null,
I20150312-10:25:02.426(-3)? out: { expected: 0.1, currency: 'BTC', amount: 0 } },
I20150312-10:25:02.426(-3)? type: 'transaction',
I20150312-10:25:02.426(-3)? meta:
I20150312-10:25:02.426(-3)? { to: '[email protected]',
I20150312-10:25:02.426(-3)? blockchain: { a: 'mqxKCNDzehM1sw8rPLc3hpLF9kGj3sUtzP', l: 'address' },
I20150312-10:25:02.426(-3)? flow: '+',
I20150312-10:25:02.426(-3)? address: null } }
coinapult.js:207
receive: function(cb, amount, address, inCurrency, outCurrency, extOID, urlCallback) {
var params = {'amount': amount};
if (typeof address != 'undefined') {
params.address = address;
}
if (typeof inCurrency != 'undefined') {
params.currency = inCurrency;
} else {
params.currency = 'BTC';
}
if (typeof outCurrency != 'undefined') {
params.outCurrency = outCurrency;
}
if (typeof extOID != 'undefined') {
params.extOID = extOID;
}
if (typeof urlCallback != 'undefined') {
params.callback = urlCallback;
}
return this.call('t/receive', params, true, true, cb);
},
I want to set outAmount
as in cli.receive(outAmount=100, outCurrency="EUR")
how to set this? When I try and force it, it returns an error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.