Coder Social home page Coder Social logo

xpring-eng / xpringkit Goto Github PK

View Code? Open in Web Editor NEW
26.0 15.0 14.0 4.6 MB

XpringKit provides a Swift SDK for interacting with Xpring Protocols (XRP/PayID/ILP). This library is deprecated.

Home Page: https://xrpl.org/

License: MIT License

Swift 99.50% Shell 0.38% Ruby 0.12%
xpring xrp xrp-ledger ilp interledger interledger-protocol sdk swift xpringkit ripple

xpringkit's People

Contributors

intelliot avatar keefertaylor avatar loisrp avatar mvadari avatar nkramer44 avatar stormtv avatar theotherian avatar

Stargazers

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

Watchers

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

xpringkit's Issues

Web Socket for account balance?

I'm not familiar with your repo or grpc but I wanted to know how to call the subscribe command on the web socket? I want to call it for both account and transactions. Similar to how ethereum does it..

Is this implemented in your library? If not, how am I supposed to update the balance when a balance is updated on the chain? Just call the function again? Seems like alot of work went into the proto's and grpc but the functionality that developers need to execute a proper application on the blockchain is missing? Or am I missing something?

Dependency Issue Firebase & XpringKit

I'm getting the following error when I try to install XpringKit after upgrading the firebase pod

[!] CocoaPods could not find compatible versions for pod "BigInt":
  In snapshot (Podfile.lock):
    BigInt (= 4.0.0, ~> 4.0)

  In Podfile:
    XpringKit was resolved to 5.1.1, which depends on
      BigInt (~> 5.0.0)

    web3.swift.pod was resolved to 2.2.1, which depends on
      BigInt (~> 4.0)

CocoaPods could not find compatible versions for pod "gRPC-Core":
  In snapshot (Podfile.lock):
    gRPC-Core (= 1.28.2)

  In Podfile:
    Firebase/Firestore was resolved to 6.33.0, which depends on
      FirebaseFirestore (~> 1.18.0) was resolved to 1.18.0, which depends on
        gRPC-C++ (~> 1.28.0) was resolved to 1.28.2, which depends on
          gRPC-C++/Implementation (= 1.28.2) was resolved to 1.28.2, which depends on
            gRPC-Core (= 1.28.2)

    XpringKit was resolved to 2.0.0, which depends on
      SwiftGRPC was resolved to 0.4.3, which depends on
        gRPC-Core (~> 1.11.0)

Any help would be appreciated...

Better Error Handling

If you call getBalance on a new address is returns

The operation couldn’t be completed. (XSwiftGRPC.RPCError error 0.)

If you review the error the status message is:

Account not found

This made me go crazy. Apparently it's the error you receive when the balance is 0.

I'm just putting this here so someone else searches for it.

Get Transaction Data??

Is there any way to get the transaction data from the send call? It's recommended by ripple that the transaction data be persisted in the database.

XRPClient "Send" functionality clarification

Sorry to bother but I had a question concerning the XRPClient.send function. I am a little confused on the "From" parameter because it is asking for a "Wallet" and not an Address. The only way to create a wallet variable is by using Wallet(seed: "seedID"). How would I create a "wallet" variable if I have the senders wallet address as a string? Do i need to get a seed value from the senders address? Not sure if I am missing something... sorry, still somewhat new to this..

This is an error I am getting:
"Cannot convert value of type 'Address?' (aka 'Optional') to expected argument type 'Wallet' "

Error Installing Cocoa Pods

Error installing cocoa pods on swift 5

[!] /bin/bash -c 
set -e
git submodule update --init --recursive && ./scripts/bundle_js.sh && ./scripts/regenerate_protos.sh

Submodule 'xpring-common-js' ([email protected]:xpring-eng/xpring-common-js) registered for path 'xpring-common-js'
Submodule 'xpring-common-protocol-buffers' ([email protected]:xpring-eng/xpring-common-protocol-buffers) registered for path 'xpring-common-protocol-buffers'
Cloning into '/Users/denisangell/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:xpring-eng/xpring-common-js' into submodule path '/Users/denisangell/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js' failed
Failed to clone 'xpring-common-js'. Retry scheduled
Cloning into '/Users/denisangell/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-protocol-buffers'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:xpring-eng/xpring-common-protocol-buffers' into submodule path '/Users/denisangell/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-protocol-buffers' failed
Failed to clone 'xpring-common-protocol-buffers'. Retry scheduled
Cloning into '/Users/denisangell/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:xpring-eng/xpring-common-js' into submodule path '/Users/denisangell/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js' failed
Failed to clone 'xpring-common-js' a second time, aborting

Change sendPayment parameter in IlpClient

This is a small nit, but the IlpClient.sendPayment API takes a String as its second parameter for paymentPointer. Although at the call site this label will be to: , we should align the parameter name with Xpring4j and set it to destinationPaymentPointer.

API should be:

sendPayment(
        _ amount: UInt64,
        to destinationPaymentPointer: String,
        from senderAccountID: String,
        withAuthorization bearerToken: String
) throws -> Org_Interledger_Stream_Proto_SendPaymentResponse

How do I run the GRPC Server?

This sdk is confusing to say the least...

As a developer I would expect the same access to the ledger that is given over the api through web sockets or rpc. I'm under the impression this is not the case with grpc and I need to run my own adaptor over my local server to interact. Is that correct?

Error Cloning SDK

I got the following error when cloning and trying to run the clone?

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'XpringKit_iOS' from project 'XpringKit')
    cd /Users/denisangell/projects/tabs/mobile/XpringKit
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name XpringKit -Onone -enable-batch-mode -enforce-exclusivity=checked @/Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/Objects-normal/x86_64/XpringKit.SwiftFileList -DDEBUG -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -target x86_64-apple-ios13.2-simulator -g -module-cache-path /Users/denisangell/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -profile-coverage-mapping -profile-generate -enable-testing -index-store-path /Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Index/DataStore -swift-version 5 -I /Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Products/Debug-iphonesimulator -F /Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Products/Debug-iphonesimulator -F /Users/denisangell/projects/tabs/mobile/XpringKit/Carthage/Build/iOS -c -j4 -output-file-map /Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/Objects-normal/x86_64/XpringKit_iOS-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/Objects-normal/x86_64/XpringKit.swiftmodule -Xcc -I/Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/XpringKit-generated-files.hmap -Xcc -I/Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/XpringKit-own-target-headers.hmap -Xcc -I/Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/XpringKit-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/XpringKit-project-headers.hmap -Xcc -I/Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/DerivedSources-normal/x86_64 -Xcc -I/Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/DerivedSources/x86_64 -Xcc -I/Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/DerivedSources -Xcc -DDEBUG=1 -emit-objc-header -emit-objc-header-path /Users/denisangell/Library/Developer/Xcode/DerivedData/XpringKit-dlemcvtgcliwlsdkmabtfvxshnfn/Build/Intermediates.noindex/XpringKit.build/Debug-iphonesimulator/XpringKit_iOS.build/Objects-normal/x86_64/XpringKit-Swift.h -working-directory /Users/denisangell/projects/tabs/mobile/XpringKit

error: Build input files cannot be found: '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/get_account_info_request.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/fiat_amount.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/account_info.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/submit_signed_transaction_request.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/payment.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/ledger_sequence.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/get_transaction_status_request.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/fee.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/signed_transaction.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/xrp_ledger.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/submit_signed_transaction_response.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/transaction_status.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/get_latest_validated_ledger_sequence_request.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/get_fee_request.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/transaction.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/xrp_amount.pb.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/xrp_ledger.grpc.swift', '/Users/denisangell/projects/tabs/mobile/XpringKit/XpringKit/generated/currency.pb.swift' (in target 'XpringKit_iOS' from project 'XpringKit')

Greetings!

Hello engineering team working on the Xpring suite of mobile SDKs,

My name is Alex Smith and I'm interested in working with your SDKs on a current project of mine. I've been following the progress being made here in the XpringKit SDK for iOS since that's ecosystem I'm most familiar working in.

I come from a background of working with financial institutions with my previous company Flybits in which I was an employee. My days were spent managing a suite of 7 SDKs not too dissimilar from what you have with your own. Distribution was a pain since ABI stability hadn't really been introduced yet (as you probably know, customers at financial institutions are slow moving and must allot proper funding to make any updates). So, the latest version of Swift we could support was Swift 4.2 but we supported multiple versions of Swift simultaneously for our suite of SDKs.

In short, Flybits' SDKs provide a mechanism for personalizing user experiences using contextual elements from the array of sensors in the device and creating rules to determine what content a user should be presented with.

That's some background of the kind of work that I've done recently. On the side, I'm playing around with some NLP and the new things introduced at WWDC this year, mostly to do with SwiftUI.

In the near future, I plan to share what it is that I'm building but in the meantime I'm interested in seeing this project succeed both internally to the company and externally in terms of adoption with developers like me!

I've read your guide on contributing but I realized that I'm unable to create PRs since I'm not a white-listed team member/contributor.

How might I become a contributor to this project? Also, if I have questions more broadly speaking about the SDKs and their direction, what might you suggest as the appropriate avenue? Create an Issue here like I am now, post something to the Xpring forums, email, or something else?

By the way, you may have seen me making comments on some PRs already; however, until now I hadn't introduced myself.

Thanks for your time learning about me and your consideration to add me as a contributor!

grpc-swift is no longer maintained

The library for SwiftGRPC is no longer maintained and they use a completely different library. I was having trouble integrating XpringKit into google products.

I had to Podfile install SwiftGRPC with a gRPC-Core version of 1.28.0 to get my pods to install correctly.

I was wondering if you are going to upgrade XpringKit to the new NIO protocol and the new grpc-Swift library?

Failing to install XpringKit with Cocoapods

I'm a bit lost as to why this is failing as nothing is obvious to me as to what is the issue. Any help appreciated.

Thanks. Logs below after I run pod update

Mac:XRPL donie$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing BigInt (5.0.0)
Installing BoringSSL-GRPC (0.0.3)
Installing SwiftGRPC (0.10.0)
Installing SwiftProtobuf (1.7.0)
Installing XpringKit (1.2.0)
Enter passphrase for key '/Users/donie/.ssh/id_rsa': 
Enter passphrase for key '/Users/donie/.ssh/id_rsa': 

[!] /bin/bash -c 
set -e
git submodule update --init --recursive && ./scripts/bundle_js.sh && ./scripts/regenerate_protos.sh

Submodule path 'xpring-common-js': checked out '4ce627e8ed33f44e9870fd84695a7d7c18f80884'
Submodule path 'xpring-common-js/xpring-common-protocol-buffers': checked out '3603db829677c41a7789746b858feb19a6e77845'
Submodule path 'xpring-common-protocol-buffers': checked out '41d8d7c316d11b79ab495110da24b9fb0f2c691b'
Bundling JS
>> Installing Node Dependencies

> [email protected] install /Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js/node_modules/fsevents
> node install

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  COPY /Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node
  TOUCH Release/obj.target/action_after_build.stamp

> [email protected] install /Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js/node_modules/tiny-secp256k1
> npm run build || echo "secp256k1 bindings compilation fail. Pure JS implementation will be used."


> [email protected] build /Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js/node_modules/tiny-secp256k1
> node-gyp rebuild

  CXX(target) Release/obj.target/secp256k1/native/addon.o
secp256k1 bindings compilation fail. Pure JS implementation will be used.

> [email protected] install /Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "/Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown/grpc_node.node" is installed via remote

> [email protected] postinstall /Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js/node_modules/ripple-binary-codec/node_modules/core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

added 962 packages from 1268 contributors and audited 7903 packages in 27.513s

1 package is looking for funding
  run `npm fund` for details

found 12 vulnerabilities (3 moderate, 9 high)
  run `npm audit fix` to fix them, or `npm audit` for details
>> Done Installing Node Dependencies
>> Running Webpack.

> [email protected] webpack /Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js
> npm run clean && ./scripts/regenerate_protos.sh && tsc && npx webpack


> [email protected] clean /Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js
> rm -rf ./generated ./dist ./build

Regenerating Protocol Buffers
Submodule 'xpring-common-js' ([email protected]:xpring-eng/xpring-common-js) registered for path 'xpring-common-js'
Submodule 'xpring-common-protocol-buffers' ([email protected]:xpring-eng/xpring-common-protocol-buffers) registered for path 'xpring-common-protocol-buffers'
Cloning into '/Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js'...
Cloning into '/Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-protocol-buffers'...
Submodule 'xpring-common-protocol-buffers' (http://github.com/xpring-eng/xpring-common-protocol-buffers) registered for path 'xpring-common-js/xpring-common-protocol-buffers'
Cloning into '/Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js/xpring-common-protocol-buffers'...
warning: redirecting to https://github.com/xpring-eng/xpring-common-protocol-buffers/
node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.9/fse-v1.2.9-node-v79-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v79 ABI, unknown) (falling back to source compile with node-gyp) 
../native/addon.cpp:240:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        secp256k1_ec_privkey_negate(context, tweak_negated); // returns 1 always
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:320:34: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
                strict = info[3]->BooleanValue(Nan::GetCurrentContext()).FromJust();
                                               ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/donie/Library/Caches/node-gyp/13.3.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
../native/addon.cpp:82:36: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
                return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:142:21: note: in instantiation of function template specialization '(anonymous namespace)::assumeCompression<2, Nan::FunctionCallbackInfo<v8::Value>, v8::Local<v8::Object> >' requested here
        const auto flags = assumeCompression<2>(info, pA);
                           ^
/Users/donie/Library/Caches/node-gyp/13.3.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
../native/addon.cpp:80:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                    ~~~~~~~~~~~~~ ^  ~~~~~
../native/addon.cpp:82:36: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
                return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:174:21: note: in instantiation of function template specialization '(anonymous namespace)::assumeCompression<1, Nan::FunctionCallbackInfo<v8::Value>, v8::Local<v8::Object> >' requested here
        const auto flags = assumeCompression<1>(info, p);
                           ^
/Users/donie/Library/Caches/node-gyp/13.3.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
../native/addon.cpp:80:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                    ~~~~~~~~~~~~~ ^  ~~~~~
../native/addon.cpp:89:36: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
                return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:189:21: note: in instantiation of function template specialization '(anonymous namespace)::assumeCompression<1, Nan::FunctionCallbackInfo<v8::Value> >' requested here
        const auto flags = assumeCompression<1>(info);
                           ^
/Users/donie/Library/Caches/node-gyp/13.3.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
../native/addon.cpp:87:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                if (info.Length() <= index) return SECP256K1_EC_COMPRESSED;
                    ~~~~~~~~~~~~~ ^  ~~~~~
4 warnings and 4 errors generated.
make: *** [Release/obj.target/secp256k1/native/addon.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:219:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/usr/local/Cellar/node/13.3.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/donie/Library/Caches/CocoaPods/Pods/Release/XpringKit/1.2.0-83e16/xpring-common-js/node_modules/tiny-secp256k1
gyp ERR! node -v v13.3.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/donie/.npm/_logs/2019-12-12T21_18_00_480Z-debug.log
node-pre-gyp WARN Using needle for node-pre-gyp https download 
./scripts/regenerate_protos.sh: line 16: grpc_tools_node_protoc: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] webpack: `npm run clean && ./scripts/regenerate_protos.sh && tsc && npx webpack`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/donie/.npm/_logs/2019-12-12T21_18_14_506Z-debug.log


[!] Automatically assigning platform `iOS` with version `13.2` on target `XRPL` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Mac:XRPL donie$ 

Utils.encode - Unable to call the encode function

I keep getting the error " Value of type 'Utils' has no member 'encode' " and cannot call the "encode" function. Any help on being able to encode a classic address into an Xaddress would be awesome!
I am using the code below within a function (per the documentation):

let xAddress = Utils.encode(classicAddress: address, tag: tag)

pod XpringKit

Please make sure you have the correct access rights and the repository exists.

Prepend "Bearer " to auth token

This won't change anything functionally, but in order to abide by correct standards, the ILP SDK should add Bearer to the beginning of all auth tokens, if they do not already have them.

Similarly, we should wrap bearerToken in a class called IlpCallCredentials, which will do this for us and make the bearer token more strongly typed.

Same as xpring-eng/Xpring-JS#228

Failed to install pod

Hello!
First, there was a problem with the submodules. I had to add ssh keys to make cocoapods clone submodules. Now, I can't install pod due to compilation issues. Maybe you can add the precompiled binaries to facilitate pod installation? A lot of time needs to be spent just to install the pod. In the future, we will have many problems with our CI-machine. Thank you

Analyzing dependencies
Downloading dependencies
Installing BoringSSL-GRPC (0.0.3)
Installing SwiftGRPC (0.10.0)
Installing XpringKit (1.1.3)
[!] /bin/bash -c 
set -e
git submodule update --init --recursive && ./scripts/bundle_js.sh && ./scripts/regenerate_protos.sh

Submodule path 'xpring-common-js': checked out '344737a1652c55120c2b1659315d8c760171f111'
Submodule path 'xpring-common-js/xpring-common-protocol-buffers': checked out '6f983e508bee6d358156776561e884719275d9f0'
Submodule path 'xpring-common-protocol-buffers': checked out '5a345fd40b468f824d6ad1bdb88e8db3f41354b4'
Bundling JS
>> Installing Node Dependencies

> [email protected] install /Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js/node_modules/fsevents
> node install

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  COPY /Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node
  TOUCH Release/obj.target/action_after_build.stamp

> [email protected] install /Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js/node_modules/tiny-secp256k1
> npm run build || echo "secp256k1 bindings compilation fail. Pure JS implementation will be used."


> [email protected] build /Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js/node_modules/tiny-secp256k1
> node-gyp rebuild

  CXX(target) Release/obj.target/secp256k1/native/addon.o
secp256k1 bindings compilation fail. Pure JS implementation will be used.

> [email protected] install /Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "/Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown/grpc_node.node" is installed via remote

> [email protected] postinstall /Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js/node_modules/ripple-binary-codec/node_modules/core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

added 961 packages from 1267 contributors and audited 7904 packages in 19.674s
found 13 vulnerabilities (4 moderate, 9 high)
  run `npm audit fix` to fix them, or `npm audit` for details
>> Done Installing Node Dependencies
>> Running Webpack.

> [email protected] webpack /Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js
> npm run clean && ./scripts/regenerate_protos.sh && tsc && npx webpack


> [email protected] clean /Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js
> rm -rf ./generated ./dist ./build

Regenerating Protocol Buffers
Submodule 'xpring-common-js' ([email protected]:xpring-eng/xpring-common-js) registered for path 'xpring-common-js'
Submodule 'xpring-common-protocol-buffers' ([email protected]:xpring-eng/xpring-common-protocol-buffers) registered for path 'xpring-common-protocol-buffers'
Cloning into '/Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js'...
Cloning into '/Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-protocol-buffers'...
Submodule 'xpring-common-protocol-buffers' (http://github.com/xpring-eng/xpring-common-protocol-buffers) registered for path 'xpring-common-js/xpring-common-protocol-buffers'
Cloning into '/Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js/xpring-common-protocol-buffers'...
warning: redirecting to https://github.com/xpring-eng/xpring-common-protocol-buffers/
node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.9/fse-v1.2.9-node-v79-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v79 ABI, unknown) (falling back to source compile with node-gyp) 
../native/addon.cpp:240:2: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
        secp256k1_ec_privkey_negate(context, tweak_negated); // returns 1 always
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:320:34: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
                strict = info[3]->BooleanValue(Nan::GetCurrentContext()).FromJust();
                                               ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/.../Library/Caches/node-gyp/13.8.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
../native/addon.cpp:82:36: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
                return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:142:21: note: in instantiation of function template specialization '(anonymous namespace)::assumeCompression<2, Nan::FunctionCallbackInfo<v8::Value>, v8::Local<v8::Object> >' requested here
        const auto flags = assumeCompression<2>(info, pA);
                           ^
/Users/.../Library/Caches/node-gyp/13.8.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
../native/addon.cpp:80:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                    ~~~~~~~~~~~~~ ^  ~~~~~
../native/addon.cpp:82:36: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
                return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:174:21: note: in instantiation of function template specialization '(anonymous namespace)::assumeCompression<1, Nan::FunctionCallbackInfo<v8::Value>, v8::Local<v8::Object> >' requested here
        const auto flags = assumeCompression<1>(info, p);
                           ^
/Users/.../Library/Caches/node-gyp/13.8.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
../native/addon.cpp:80:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                if (info.Length() <= index) return __isPointCompressed(p) ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                    ~~~~~~~~~~~~~ ^  ~~~~~
../native/addon.cpp:89:36: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
                return info[index]->BooleanValue(Nan::GetCurrentContext()).FromJust() ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED;
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
../native/addon.cpp:189:21: note: in instantiation of function template specialization '(anonymous namespace)::assumeCompression<1, Nan::FunctionCallbackInfo<v8::Value> >' requested here
        const auto flags = assumeCompression<1>(info);
                           ^
/Users/.../Library/Caches/node-gyp/13.8.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
../native/addon.cpp:87:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                if (info.Length() <= index) return SECP256K1_EC_COMPRESSED;
                    ~~~~~~~~~~~~~ ^  ~~~~~
4 warnings and 4 errors generated.
make: *** [Release/obj.target/secp256k1/native/addon.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/.../Library/Caches/CocoaPods/Pods/Release/XpringKit/1.1.3-42df3/xpring-common-js/node_modules/tiny-secp256k1
gyp ERR! node -v v13.8.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/.../.npm/_logs/2020-02-10T20_05_52_869Z-debug.log
node-pre-gyp WARN Using needle for node-pre-gyp https download 
./scripts/regenerate_protos.sh: line 16: grpc_tools_node_protoc: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] webpack: `npm run clean && ./scripts/regenerate_protos.sh && tsc && npx webpack`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/.../.npm/_logs/2020-02-10T20_05_55_617Z-debug.log

Send Escrow Transaction?

Just overviewing the sdk, I wasn't sure how to create an escrow transaction? Can I also use smart contracts with this sdk

CocoaPods could not find compatible versions for pod "gRPC-Core":

I'm working on my fork and I use swift 5 with Google Firestore Dependencies. I'm now running into the issue using pod install with the following errors:

[!] CocoaPods could not find compatible versions for pod "gRPC-Core":
  In snapshot (Podfile.lock):
    gRPC-Core (= 1.21.0)

  In Podfile:
    Firebase/Firestore was resolved to 6.14.0, which depends on
      FirebaseFirestore (~> 1.8.2) was resolved to 1.8.3, which depends on
        gRPC-C++ (= 0.0.9) was resolved to 0.0.9, which depends on
          gRPC-C++/Implementation (= 0.0.9) was resolved to 0.0.9, which depends on
            gRPC-Core (= 1.21.0)

    XpringKit (from `/Users/denisangell/projects/xrp/xpringKit/XpringKit.podspec`) was resolved to 1.2.1, which depends on
      SwiftGRPC was resolved to 0.4.3, which depends on
        gRPC-Core (~> 1.11.0)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `gRPC-Core` inside your development pod `XpringKit`.
   You should run `pod update gRPC-Core` to apply changes you've made.

I believe this is a dependency issue... So I went https://github.com/grpc/grpc-swift and found a depreciation issue?

‼️ Please use the nio branch ‼️
gRPC Swift versions v0.x based on gRPC-Core will soon be replaced with a re-implementation based on SwiftNIO.

We strongly suggest that new projects use the re-implementation from the nio branch which we consider to be production ready.

Please see DEPRECATION.md for more information.

My goal is to get all of this up to swift 5.

Happy Hollidays!!

PayID & ILP

Hey guys,

I wanted to get some additional. Are payment pointers and PayID the same? Can payID be used for ILP or is the PayID, just a record of the users accounts?

Also, for something like a ethereum smart contract, how would I use the ILP to interact with this smart contract? Also, on the ILP it looks like there is a way to "handshake" much similar to that of a payment channel. Is the "Payment Channel" possible to be used by the ILP?

Thank You!!

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.