Giter Site home page Giter Site logo

greymass / anchor-link Goto Github PK

View Code? Open in Web Editor NEW
52.0 52.0 23.0 2.02 MB

Persistent, fast and secure signature provider for EOSIO chains built on top of EOSIO Signing Requests (EEP-7)

License: Other

Makefile 2.69% TypeScript 92.32% JavaScript 4.99%
anchor-link eos eosio eosio-signing-request

anchor-link's People

Contributors

aaroncox avatar apporc avatar dependabot[bot] avatar jnordberg 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  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

anchor-link's Issues

transfer

Hello,
I discover eosio and everything that goes with it.
I just did a test with anchor-link to connect, and to transfer eos, and everything works.
Is it possible to transfer or stake nfts in the same way?

React Native WS

RN WS needs binaryType to work properly

            const socket = new WebSocket(socketUrl);
            
// new
            if (typeof navigator != 'undefined' && navigator.product == 'ReactNative') {
                (socket as any).binaryType = 'blob'
            }

Add test case for websocket connection interruption testing

We should create a test case that we can use to check browser compatibility around the websocket interruption issue when clicking links.

Related: greymass/ual-anchor#15

Currently we have the iframe isolation hack in place to prevent the link click from being interrupted. The goal is just to have a place to test this behavior while we are developing.

build error in angular

ERROR in node_modules/anchor-link/lib/link-options.d.ts(37,19): error TS2304: Cannot find name 'TextEncoder'.
node_modules/anchor-link/lib/link-options.d.ts(41,19): error TS2304: Cannot find name 'TextDecoder'.
node_modules/anchor-link/lib/link-session.d.ts(85,21): error TS1039: Initializers are not allowed in ambient contexts.
node_modules/anchor-link/lib/link-session.d.ts(88,5): error TS2424: Class 'LinkSession' defines instance member function 'serialize', but extended class 'LinkChannelSession' defines it as instance member property.
node_modules/anchor-link/lib/link-session.d.ts(121,21): error TS1039: Initializers are not allowed in ambient contexts.
node_modules/anchor-link/lib/link-session.d.ts(127,5): error TS2424: Class 'LinkSession' defines instance member function 'serialize', but extended class 'LinkFallbackSession' defines it as instance member property.
node_modules/eosio-signing-request/lib/signing-request.d.ts(242,73): error TS2304: Cannot find name 'TextEncoder'.
node_modules/eosio-signing-request/lib/signing-request.d.ts(242,99): error TS2304: Cannot find name 'TextDecoder'.

React JS node modules error while using anchor link

Hi,
I have developing the anchor wallet integration for the react js application, for that I have install the anchor-link and anchor-link-browser-transport latest package. When we run it it shows below error:

ERROR in ./node_modules/asmcrypto.js/asmcrypto.all.es8.js 3901:23-40
Module not found: Error: Can't resolve 'crypto' in 'D:\My-Project\node_modules\asmcrypto.js'**

To solve this error we have to add the fallback in the node module file. Then it successful run on the local server, but when we deploy it on the live server, the server does not take node modules.
So please give some suggestions on this issue.

Add a "cancelled" callback for established sessions

If an established session exists, and the mobile device has cancelled an incoming request, anchor-link should be able to abort the countdown and close the existing modal.

It would only be able to close this dialog:

image

and then show an error of something like "User cancelled request on Jesta's iPhone".

Validate configuration parameters during initialization

When setting up the link instance, having some sanity checks for non-typescript applications and their configuration would help troubleshoot issues during setup. For example:

// initialize the browser transport
const transport = new AnchorLinkBrowserTransport()
// initialize the link, this time we are using the TELOS chain
const link = new AnchorLink({
    transport,
    chains: [{
        chainId: '4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11',
        INCORRECT: 'https://telos.greymass.com'
    }]
})

The chains are incorrectly configured and are missing the nodeUrl field. This could be the wrong keyword or even perhaps a casing issue. The goal would be to have it detect and throw an exception if the configuration was invalid to help the developer track down why it is not working.

Currently, if you specify a bad value for nodeUrl, it'll actually let you start the login process and then when it attempts to do the identity proof verification, it'll throw the following error:

link.ts:473 Uncaught (in promise) TypeError: Cannot read property 'v1' of undefined

This error isn't all that helpful in tracking down that the nodeUrl parameter is wrong.

Can't Find A Way To Authorize User On My Server

I am trying to authorize user who logins through Anchor Wallet on my page server, but I cannot find a way to do so.

In Scatter Wallet I used "getArbitrarySignature" method, which returns string signed with private key, I send this encrypted string to my server and there I decrypt it with public key, compare with original string and I know I am dealing with the user.

How I can achieve users server authorization in Anchor Wallet?
I found in login payload "sig" property which is some encrpyted string but, I cannot find what is the original string it refers to.

Please help.

Release new version with updated eosio

Hi,

I'm trying to update my ual-anchor dependencies, and the latest version pulls in @greymass/[email protected]. However iit also depends on this package in which the latest release still pulls @greymass/[email protected].

I see that 4643ef9 does update eosio to 0.5.x, so it would be great if you could release a new version to npm so that we don't need pull in two versions of @greymass/eosio

Thanks!

Invalid Private key

I am trying to sign a transaction on wax-test-net using Ancho wallet, but it is always shows this error, while keys imported are correct, I checked multiple times

image

Implement OBFA for Fuel (and others) within the anchor-link signature collection process

Currently we have a conflict between:

  • Signers using ESR (Anchor, etc)
  • Wallet Providers (Anchor Link, UAL, Transit)

Which prevents signers from appending OBFA (only bill first authorizer) action onto signing requests from providers.

Link, being used across all of these components, uses sessions which set the broadcast: false flag on every request passed between the provider and signer. Wallets detect this value being set to false, and refused to append OBFA actions like Fuel to the transaction being signed.

What we need is likely to modify the link itself (being the core of the UAL and Transit plugins) to have the ability to collect a signature from an OBFA signature before pushing the transaction to the blockchain itself.

The proposed new flow of a transaction in link would be something similar to:

  1. Application passed transaction to Provider.
  2. [New] Provider prepends OBFA action/authorization to transaction.
  3. Provider uses open channel to pass a signing request to the Wallet.
  4. Wallet signs transaction and issues callback, returning the transaction to Provider.
  5. [New] Provider submits transaction to designated non-push API for the OBFA action to generate the signature of the OBFA provider.
  6. [New] Provider combines signature into transaction
  7. Provider submits transaction to the blockchain.

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.