15

I can't think of an easy way to do this right now. If someone has a proposal for an extension to allow things like this please put it here: https://github.com/stellar/stellar-protocol


8

The streaming API is good for that job, you could get the last token from the network just when the user sends the payment and open the stream channel using that token so it looks only for transactions after that particular point in time. You won't miss a payment, and in case the user doesn't get the confirmation due to internet problems just reopen the ...


7

Sure, addOperation can be called multiple times. const transaction = new StellarSdk.TransactionBuilder(account) .addOperation(StellarSdk.Operation.payment({ destination: managerPublickey, asset: StellarSdk.Asset.native(), amount: '50', })) .addOperation(StellarSdk.Operation.payment({ destination: managerPublickey, asset: StellarSdk....


6

Actually, you can setup simple flow by yourself. Check the "Streaming payment events" demo (https://www.stellar.org/developers/js-stellar-sdk/reference/examples.html#streaming-payment-events). You just need to ask for the memo field, which allows you to track the inbound payments. There is a Stellar checkout project registered for the next SBC already: ...


6

Using the payments by account endpoint of Horizon we can see that the from account has since been merged into GCXELXZUHZEZFT5E63P2R2HMXJ3MPPIVR3TI2MDBP244ECRBQEFBVKCG. { "_links": { "self": { "href": "https://horizon.stellar.org/operations/81346985528979457" }, "transaction": { "href": "https://horizon.stellar.org/...


5

Here's the process in action: https://github.com/shredding/stellar-bot/blob/master/src/stellar/index.js


4

The detail of a transaction's operations are encoded in the field envelope_xdr. You can decode this value to obtain the payments and other operations. For example, this transaction with memo "Fruitcakes for Iguanas" has an envelope_xdr that decodes to show the payment details. So if you can approach your problem by fetching transactions instead of payments ...


4

If you're thinking about the path finding, used for doing cross-asset payments, there was a recent update to it, described here: https://github.com/stellar/go/pull/719


4

Use the CreateAccount operation instead of Payment.


3

Technically you don't have to, although having 6 accounts for different distribution phase may be a better option if there is a need for different signatories per phase.


3

The memo is associated with the transaction, so you'll have to actually pull the transaction for each payment. Here is some code for how I've handled it in the past with the JS SDK: function watchForPayments(publicKey, { onPayment, cursor }) { const paymentsCallBuilder = server.payments().forAccount(publicKey); if (cursor) { paymentsCallBuilder....


3

I misunderstood the documentation. The mac_key should be any valid Stellar Private Key. After changing it, I'm getting the HMAC-SHA256 encoded string.


3

Fees are always paid for in the native currency (XLM), so you can't cover the cost of a transaction using USD like in your example


3

There is no way to send lumens directly on the Stellar Network without the sender paying the fee. This fee is built directly into the Stellar Network. "Stellar deducts the entire fee from the transaction’s source account, regardless of which accounts are involved in each operation or who signed the transaction."


3

Brief guide to buying ANY Stellar-based asset In general the approach looks like the following: Fiat Money (USD, EUR etc.) → XLM (Stellar internal currency) → Asset of your choice 0. Prerequisites In order to hold XLM and purchase Stellar-based assets, you'll need a Stellar account first. If you don't have one, generate a new account keypair here. ...


3

The link provides purpose in a nutshell: Passive offers allow market makers to have zero spread. If you want to trade EUR for USD at 1:1 price and USD for EUR also at 1:1, you can create two passive offers so the two offers don’t immediately act on each other. As in the example above, with normal offers those two offers would cancel each other out and ...


3

The website is Moonitor.io. I have no affiliation with that site. I asked the web site owner through their contact form and he said: "a Stellar getaway for WooCommerce" WooCommerce enables one to sell stuff on a Wordpress Site. One such gateway is the one by ProPress: https://prospress.com/sell-with-stellar-using-woocommerce/ That gateway is opensouce ...


3

Payment is actually a result of the successful execution of a payment operation. A successful payment operation will yield two effects (Account Credited and Account Debited). If a transaction fails it yields no effects, and won't be displayed in payment API endpoint.


3

Maybe this flow is working on the backend process. You create transaction with signed rootKeypair and save transaction object somewhere else waiting for person B to signed that transaction ?


3

Assume you want to convert USD to EUR. Send USD (Fiat) to anchor, anchor gives you back USD Token. Trade USD Token with XLM and then trade again to buy EUR Token. (XLM acts as bridge currency, you can directly trade USD Token with EUR Token if there is market volume or else Stellar will ensure the trade using Path Find algorithm.) Anchor converts EUR ...


3

OperationId is unique within the network, so you need not to pair it with TransactionId. (TransactionId is also known as TransactionHash.) You may consider OperationId a better choice for primary key, if the transactions contain more than one operation. The operation details endpoint provides information on a single operation. The operation ID provided ...


2

First of all, you can't execute code programmatically (like Ethereum Smart Contract) in Stellar, but you can programmatically create pre-defined transactions getting variables from in-chain data. Let me explain what would be my approach to your scenario and I'd like to have feedbacks: Setup a new "data account" with enough XLM to host a couple of key:value ...


2

That is the object returned from a successful submitTransaction call, it is not the transaction record object that you get from calling server.transactions().transaction(hash). If you would like to get the operation object, you can either decode the envelope_xdr or call server.operations.forTransactions(transactionID) just parse the transactionID from the ...


2

According to the Stellar docs and source code, what you get back is just a plain object, straight from Horizon. https://stellar.github.io/js-stellar-sdk/Server.html#submitTransaction https://github.com/stellar/js-stellar-sdk/blob/master/src/server.js#L63 Here is more documentation on what Horizon returns: https://github.com/stellar/go/blob/master/...


2

I've made Payment Locator tool with public API that exactly matches your case. Some highlights: Lookup by transaction memo, amount, asset, source/destination account. Search by a single parameter or a complex criteria. All operations are supported: PAYMENT, PATH_PAYMENT, CREATE_ACCOUNT, MERGE_ACCOUNT. Find everything, no matter how long ago operations were ...


2

The easiest way is to compare the transaction hashes - if they are the same then it was not modified. Signatures are used to prove that a given user signed a transaction (and actually what is being signed is the transaction hash). You could do what you’re suggesting about using verify, but it’s a roundabout way of doing it. Regarding your code - it doesn’t ...


2

Had the same problem but it seems I figured it out. If you want the full history available on your horizon you need to do the following. Run your stellar-core with CATCHUP_COMPLETE=true. On your horizon side you need to manually tell it to ingest historical ledgers. Just starting horizon with --ingest=true is not enough as it will only ingest ledgers that ...


2

The behavior you encountered existed in protocol versions 1 and 2. Protocol version 10, the most recently released version, incorporates CAP-0003 and CAP-0004 which make changes to the functionality of the offer book. For example the situation you described in your question results in a crossed book, but CAP-0004 (https://github.com/stellar/stellar-protocol/...


2

This page documents the core API which takes integers. You must divide by 10^7 to get the actual numbers. All of the SDKs use strings which are the actual amounts. So the doc isn't wrong, just a bit confusing to the reader.


2

if you just want all payments from the network, then you don't need stellar-notifier. Just use stellar-sdk. Here's example in javascript const StellarSdk = require('stellar-sdk'); StellarSdk.Network.usePublicNetwork(); const server = new StellarSdk.Server('https://horizon.stellar.org'); server.payments() .stream({ onmessage: msg => { ...


Only top voted, non community-wiki answers of a minimum length are eligible