Questions tagged [base58]

Base58 is a Ruby library/gem for converting ints to and from base58.

28 questions
4
votes
2 answers

How to decode base58 solana transaction info?

I am using solana API and as response from getTransaction function I get some data. Generally speaking, I am interested in data filed. Documentation says: data: - The program input data encoded in a base-58 string. And here is the problem, I…
dokichan
  • 857
  • 2
  • 11
  • 44
4
votes
2 answers

Base58 javascript implementation

I am using IPFS-multihash method to store IPFS hash in smart contracts. For that I need to decode base58 format: QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4 to binary(as…
ak07_
  • 95
  • 1
  • 8
4
votes
4 answers

Cannot decode! Invalid Base58 Character(s)!

I am trying to run base58perl.pl in my terminal using the following command: perl base58perl.pl but I get the following error: Cannot decode! Invalid Base58 Character(s)! Here's the code: my $fileSrc = 'base58.txt'; open my $fhSrc, $fileSrc or die…
Quin Noaj
  • 65
  • 1
  • 10
3
votes
6 answers

Base58 Encoder function in PostgreSQL

I found this MySQL function for Base58 Encoder in a Github Gist. DELIMITER $$ CREATE FUNCTION base58_encode (num int) RETURNS varchar(255) DETERMINISTIC BEGIN DECLARE alphabet varchar(255); DECLARE base_count int DEFAULT 0; DECLARE…
TheKojuEffect
  • 20,103
  • 19
  • 89
  • 125
2
votes
1 answer

How convert ByteArray string to NEO address in PHP?

I analyze transactions with the InvocationTransaction type using the getplicationlog and get a data array in response array(2) { ["type"]=> string(9) "ByteArray" ["value"]=> string(40) "0631901fb121f633fa496d3689649a06628f63c8" } Help me,…
Юрий
  • 21
  • 2
2
votes
1 answer

Size of buffer to hold base58 encoded data

When trying to understand how base58check works, in the referenced implementation by bitcoin, when calculating the size needed to hold a base58 encoded string, it used following formula: //…
fluter
  • 13,238
  • 8
  • 62
  • 100
2
votes
1 answer

Split byte array to get the first 12 chars and the last 12 chars(Java)

I have a byte Array which I want to Base58 encode. But I only want to encode the first 12 and the last 12 letter. So I need to convert the byte array into a String split it and convert it back into a byte array to encode it in Base58? Maybe there is…
SamuelTJackson
  • 1,357
  • 3
  • 19
  • 40
2
votes
2 answers

How to unpack 7-bits at a time in ruby?

I'm trying to format a UUIDv4 into a url friendly string. The typical format in base16 is pretty long and has dashes: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx To avoid dashes and underscores I was going to use base58 (like bitcoin does) so each…
AJcodez
  • 31,780
  • 20
  • 84
  • 118
1
vote
1 answer

Converting an array, slice or vector to base58 encoding WITH check

I'm writing a code that converts an array/slice/vector to a B58-encoded string with the check. Here is the relevant code excerpt: use bs58; i = b"Hello"; // or i = [0,1,2,3]; // or i = vec![0,1,2,3]; let e =…
Proto Ukr
  • 492
  • 4
  • 13
1
vote
1 answer

Hex string to base58

does anyone know any package that support the following conversion of base58 to hex string or the other way round from hex string to base58 encoding. below is an example of a python…
user7729135
  • 399
  • 1
  • 3
  • 11
1
vote
0 answers

algorithm for converting from base58 string into Hexadecimal string

I want to convert 1AGNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62i base58 string into hexadecimal string. I began to do it from converting base58 into decimal number and after that into heximal string. fn base58_decode(code: &String) -> u128 { use…
ChzChz
  • 57
  • 3
1
vote
1 answer

Problem to pass csv file into a function in Python

I'm finally asking for help for a small project I just can't complete. I work on Linux Ubuntu 16.04 and Python 2.7.12 or Python 3.5.2 That's pretty simple: I have a csv file containing thousands of bitcoin addresses in that format …
BrianG
  • 11
  • 1
1
vote
1 answer

Base58 returns incorrect value in elixir

I'm trying to encode hex to base58. It works with js library base-x with hex = 1777c7ba65e23151ec09125011dd25c28998c70230e7b89ca6 Expected base58 = AShDKgLSuCjGZr8Fs5SRLSYvmcSV7S4zwX Got base58 =…
user3508453
  • 878
  • 3
  • 14
  • 24
1
vote
2 answers

How to convert integer to base58?

I have a decimal number, and I want to show it on the screen as a base58 string. There is what I have already: >>> from base58 import b58encode >>> b58encode('33') '4tz' This appears to be correct, but since the number is less than 58, shouldn't…
priestc
  • 33,060
  • 24
  • 83
  • 117
1
vote
2 answers

Base58 and utf-8 Encoding Issues in Python 3.6.5

I'm using Python 3.6.5. Hello, I'm having issues with encoding. I believe the issue has something to do with trying to use both base58 and utf-8. This portion of the program worked in Python 2.7.14 and I'm trying to convert it to Python 3.6.5. def…
Menace
  • 207
  • 1
  • 3
  • 11
1
2