Giter VIP home page Giter VIP logo

base58swift's People

Contributors

keefertaylor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

base58swift's Issues

Type 'Base58' has no member 'encode'

Attempted to use example code from README

        let bytes: [UInt8] = [255, 254, 253, 252]

        let encodedString = Base58.encode(bytes)
        let decodedBytes = Base58.decode(encodedString)!

        print(encodedString) // 7YXVWT
        print(decodedBytes)  // [255, 254, 253, 252]

Fails to compile with noted error

Decoding fails if the data's first byte is 0

Example:

let bytes: [UInt8] = [0, 128, 128, 128]
let encodedString = Base58.base58CheckEncode(bytes)
let decodedBytes = Base58.base58CheckDecode(encodedString)!  // <- fails here

Base58 Encoded string not being properly decoded

What is the issue:

When I go ahead and encode a value to Base58, everything works as intended (e.g., correct hash). However, when decoding, I receive the incorrect value. Here is the example:

let test = Base58.base58Encode([UInt8]([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))  // "1Bhh3pU9gLXZhoVxkr5wyg9sX6"
let test2 = Base58.base58Decode(test)  // [49, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Expected: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Received: [49, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

swiftlint required but not a dependency

Trying to install TezosKit via carthage.

*** Building scheme "Base58Swift_macOS" in Base58Swift.xcodeproj
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -project /Users/jojo/Documents/CodeProjects/MyProj1/Carthage/Checkouts/Base58Swift/Base58Swift.xcodeproj -scheme Base58Swift_macOS -configuration Release -derivedDataPath /Users/jojo/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/Base58Swift/2.1.14 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/76/q9_yh34j5wd23ksxl7b70ssm0000gn/T/Base58Swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO

...
...
/Users/jojo/Library/Caches/org.carthage.CarthageKit/DerivedData/12.3_12C33/Base58Swift/2.1.14/Build/Intermediates.noindex/ArchiveIntermediates/Base58Swift_macOS/IntermediateBuildFilesPath/Base58Swift.build/Release/Base58Swift_macOS.build/Script-836D7AF445A97E1216598BA1.sh: line 2: swiftlint: command not found

This "swiftlint" seems to be some 3rd party tool? But none of the documentation for Base58Swift says I need to install it and it is not a dependency list anywhere

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.