Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

For questions specifically regarding the JavaScript Software Development Kit (SDK) for Stellar client applications.

1
vote
2answers
21 views

How should the changeTrust Operation be used?

If I want to create a trustline between my issuing account and new users accounts, how do I do this. I tried with this code: const StellarSdk = require('stellar-sdk'); StellarSdk.Network....
2
votes
1answer
25 views

Is it possible to make a request to an account other than “Friendbot” to receive Lumens?

From the documentation you can make a request using Javascript to the "Friendbot" to receive test Lumens for an account: // The SDK does not have tools for creating test accounts, so you'll have to //...
0
votes
0answers
16 views

Error when trying to install stellar-sdk from npm, “LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libe ay32.lib'”

Anyone know what this means or how to fix it? I ran the command npm install --save stellar-sdk and got this LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libe ay32.lib' [...
1
vote
2answers
31 views

How do I get the public keys from a transaction javascript

I am developing a site as college project and I cannot seem to understand how to implement StrKey to get the public key from a transaction. I can decode the xdr but cannot seem to understand how to ...
1
vote
1answer
16 views

How to find cursor of a specific timestamp?

I need to find what's the coursor of a specific timestamp for let my users see theirs transactions by date. There are any function in SDK or any endpoint on horizon server?
2
votes
1answer
34 views

Error when including 2 deps that both have stellar-base as a subdependency

When I include both stellar-hd-wallet and stellar-sdk in my project I get errors when requiring them both as stellar-base is included twice which also imports the generated XDR types twice causing the ...
2
votes
2answers
56 views

Get the operation record of a payment

Using the javascript sdk, I'm sending a payment like so: const operation = Operation.payment({ destination: toAddress, asset: asset, amount: amount.toString() }); const account = await ...
1
vote
1answer
29 views

How do I locally manage sequence no of an account?

I am trying to successfully send a transaction but its failing whats the purpose of these two functions 1 - StellarSdk.Operation.createAccount 2 - StellarSdk.Operation.payment if I am using an ...
0
votes
2answers
39 views

using stellar-sdk in angular

Anybody here who had been successful in using the stellar-sdk in angular without any error? I am getting - cannot read property crc16xmodem error - anybody encountered this before?
5
votes
1answer
61 views

Why is the memo hash different from the one I specify during tx building?

I'm converting IPFS multi hash to hex, and after throwing away its prefix I want to attach that hash to a stellar transaction (something like here). I build it this way: let transaction = new ...
1
vote
1answer
20 views

(Dup for different SDK) How can I build a transaction with a dynamic list of mutators or operations using the JS SDK?

This is exactly what I am after but in JS. How can I build a transaction with a dynamic list of mutators or operations using the Go SDK? Something like this would be great, and then it'd be easy to ...
1
vote
2answers
40 views

Is it possible to retrieve last N transactions or all transactions since a given timestamp?

The dapp I'm building can not rely on the paging mechanism described here, since after a short amount of time I will have a lot of transactions for a given account. Retrieving them all to only select ...
1
vote
2answers
59 views

Java SDK: Transaction object from envelope

In Javascript SDK, transaction can be built, signed and then be converted to envelope xdr/string format. This is very useful for multi sig operations since we can retrieve the transaction object from ...
-2
votes
1answer
63 views

TX_BAD_AUTH, no idea why

i'm moving from testnet to pubnet but for some reason my code didn't work with pubnet. here some snippet. Of course sourceAccount,des.publicKey and sourceKeys contain what i'm expeting. sourceAccount ...
1
vote
1answer
30 views

How can I encode transaction specific information on the ledger, after it has been made?

Let's say I create invoices which contains consumer products. For each invoice, I create a transaction to the supply account which contains the invoice file hash in the memo. However, when I have ...
1
vote
1answer
59 views

Python vs Java(script) for stellar apps. Is it worth learning a new language?

I am starting to get into programming apps for crypto, and I would like to start on the Stellar network. My programming background lies mainly in C and Python, and I am a reasonably competent self ...
1
vote
1answer
32 views

How return a state after sumbit a transaction [JavaScript]

I've a dispatcher in node js called dis.js. in this dispatcher i want to call a function in makepayment.js and wait for the result of submit transaction. dis.js critical piece of code const mk = ...
2
votes
1answer
62 views

Messaging over Stellar - Is that right to do?

/* * Hi! * * I'm sending this tiny library for you to check. This is the basis of the * on-chain signature collection solution I'm writing. It includes collecting * signatures for multi-...
2
votes
1answer
139 views

Convert XDR to text

I want to convert the XDR fromat of the transaction to text using JS or java SDK in stellar.Or if there are any methods outside stellar also fine.
0
votes
1answer
57 views

Error trying to use stellar-sdk in the browser

I am trying to include stellar-sdk.js (for use on the browser side) like this: import * as stellarModule from './stellar-sdk.js'; The file stellar-sdk.js is present. However, I get this error, when ...
1
vote
1answer
43 views

operation bump sequence status

I am using latest stellar js library. However operation.BumpSequence is failing. Unhandled rejection TypeError: sdk.Operation.BumpSequence is not a function. As per the roadmap, bumpsequence ...
1
vote
1answer
80 views

How to verify a Transaction?

I sent a signed transaction through the internet to a cloud function that needs to verify that the signer is the valid one. My code: const bHMainKeys = Keypair.fromSecret(privateKey) if (...
4
votes
1answer
60 views

How to add a signature using Ledger Nano

I'm trying to add a signature using a Ledger Nano HW wallet but I could not find a question about it. I'm going to research the topic and post a working solution for that.
4
votes
2answers
59 views

How to serialize, send over network, deserialize a transaction envelope for multiple signatures?

I'm trying to send over the network a base64 encoded string representing a partly signed envelope. I need to parse the string back to the original javascript object in order to add a new signature to ...
0
votes
1answer
79 views

Trades stream setup

I have setup streams for transactions, payments, operations, and effects with the method from stellar api guide: this.server = new StellarSdk.Server('https://horizon.stellar.org'); this.stream = ...
1
vote
1answer
29 views

How can I direct stellar laboratory to my own instance of horizon?

I cloned the stellar laboratory project and edited the /src/constants/networks.js file to switch the testnet horizon url to url of my own horizon instance. This allowed me to get requests such as ...
1
vote
1answer
34 views

Can't close server stream

The other existing question didn't work for me. (How to close a stream event?) I set up a class to handle and switch streams. In the constructor, I define and initialize the stream this way: ...
3
votes
1answer
26 views

Getting the 'offerId' on a new Offer and any documentation on 'xdr.ManageOfferOp'?

I'm using the JS-SDK to make offers. An issue I am having though is getting the offerId from a new offer. The offerId is required to manage a pre-existing offer. As such, it seems that the offerId ...
1
vote
1answer
85 views

Good methods for Stress Test to prevent tx_bad_seq?

During a manual stress test with js-stellar-sdk, some transactions may be responded slower (e.g. 10 sec). At high TPS, asynch programming possibly causes server.loadAccount() to get the same tx_seq, ...
2
votes
2answers
130 views

How to control fees in stellar?

Hello is there any class or function where I can control the fees of stellar? How much fee and where it goes ... etc
0
votes
1answer
24 views

What is the default limit on the number of transactions returned for a `Server.transactions` request?

Using the Stellar Javascript SDK, what is the maximum number of transactions that will be returned for a request to server.transactions().forAccount(accountId).call() before I have to worry about ...
0
votes
1answer
29 views

How to retrieve Operations for a certain Asset?

I've been reading the js-stellar-sdk and I didn't find a way to retrieve the operations for a certain Asset. How should be this done?
0
votes
1answer
66 views

Need help getting result_codes using JavaScript SDK on Node. Failed to make a payment

I'm using the JavaScript SDK in Node and have run into a problem making payments on the testnet. I catch the error but am unable to parse it to get at the result_codes which show as [Object] when I ...
1
vote
2answers
179 views

Error in submitting the multisig transaction

The below code is the multisig transaction to submit to stellar horizon testnet. When I am submitting the transaction, I am getting the submission failed error. var alice_public_key = '...
2
votes
2answers
230 views

How to get friendbot to fund my new account using a HTTP request?

On the Stellar development guides it states that using the following code, you can achieve the following: To create a test account, send Friendbot the public key you created. It’ll create and fund ...
3
votes
1answer
141 views

How can I convert the built 'transaction' in XDR format?

Before I submit the transaction to the network I want to convert the 'transaction' in XDR format so that I can save it to database for future reference. I am using Stellar JS library. How to do it?
0
votes
2answers
192 views

Where to enter javascript SDK commands (to generate seed for example)

On the page https://www.stellar.org/developers/guides/get-started/create-account.html is stated: "You can generate the seed and key with the following command" // create a completely new and ...
3
votes
1answer
47 views

What sort of simple tasks could I add to my wallet in the stellar SDK? [closed]

What would be three of the most used lines of code in the JavaScript SDK that could make my wallet perform small actions for me?
5
votes
1answer
77 views

Is there a way to unset home domain and inflation destination options?

Using the Javascript SDK I'm trying different ways of unsetting the home domain and inflation destination options without success. Is this something that is supported at all on the network, is it just ...
6
votes
2answers
109 views

How to close a stream event?

I just opened a stream to listen for transactions. I'd like to know, how to close it, once I get what I am looking for. I can't find the close method in channel, or any of the objects for setting the ...
4
votes
1answer
53 views

Error: no PRNG in Safari web workers

Hey guys I'm working on a vanity address generator using the Stellar JS SDK inside web workers to relief the main thread from heavy computations. However, it is giving me an error 'no PRNG' regarding ...