Code Monkey home page Code Monkey logo

aleph-js's People

Contributors

bjrint avatar dorianbayart avatar jon1012 avatar leirbag95 avatar moshemalawach avatar vanmoortel 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aleph-js's Issues

Difficulty integrating with keplr (cosmos)

I cant use this with keplr as i am seeing an error like: "unmatched chain id"

Keplr (most popular cosmos wallet) takes chain-id as a param to sign message which for this example let's say is local-mainnet because the signer signing this message has his address derived from this local-mainnet chain but i believe when creating a signDoc to be signed, aleph creates it with chain-id signed-message-v1 which creates conflict at time of signing and hence throws this above error

What i have tried till now

  1. tried to change CHAIN_ID from aleph-js source for testing to local-mainnet, so that chain-id stays same, after running submit fn, it provides me with item hash, like it succeeded but i don't see anything on explorer or aleph's server
  2. tried mocking actual chain with a chain which is similar in all aspects, just chain-id will be signed-message-v1 for it (using keplr's suggest chain) and signing messages from this chain, after running submit fn, it provides me with item hash, like it succeeded but i don't see anything on explorer or aleph's server

I haven't read how handling of these messages is done on aleph network itself so pardon me if i am doing something completely wrong, i was just trying to make it work with keplr. I also don't understand if something wrong happens after submit fn, why its generating a success result and providing me with a item hash at the end ?

Message that i sign at keplr

{
  "chain_id": "local-mainnet",
  "account_number": "0",
  "fee": {
    "gas": "0",
    "amount": [
      {
        "denom": "uiov",
        "amount": "0"
      }
    ]
  },
  "memo": "",
  "sequence": "0",
  "msgs": [
    {
      "type": "signutil/MsgSignText",
      "value": {
        "message": "CSDK\nstar1yark4kdrn29erxpnh3njy2756pmlgwn0sta5sf\nAGGREGATE\n64667490389d514e794373b59601a085e83f25abcea57f4e049f3bb368dc2ea8",
        "signer": "star1yark4kdrn29erxpnh3njy2756pmlgwn0sta5sf"
      }
    }
  ]
}

Result from aggregateSubmit

{
    "chain": "CSDK",
    "channel": "TEST",
    "sender": "star1yark4kdrn29erxpnh3njy2756pmlgwn0sta5sf",
    "type": "AGGREGATE",
    "time": 1659689807.291,
    "item_type": "inline",
    "item_content": "{\"address\":\"star1yark4kdrn29erxpnh3njy2756pmlgwn0sta5sf\",\"key\":\"do*iov\",\"content\":{\"biography\":\"i am do\",\"name\":\"\",\"photo\":null},\"time\":1659689807.29}",
    "item_hash": "64667490389d514e794373b59601a085e83f25abcea57f4e049f3bb368dc2ea8",
    "signature": "{\"pub_key\":{\"type\":\"tendermint/PubKeySecp256k1\",\"value\":\"AuWRwc/FteDNIeGTJ0gOXx7bPrNWBcnBuGDyETeApCSd\"},\"signature\":\"mqoIWiJy+bMTu3CPTmF9yGe6jaVFV618wwFHAiSEVFNn2SskKVVWIlpvxrxW9lz9W5tYSe5IYGz4n1HwmsHjOg==\",\"account_number\":\"0\",\"sequence\":\"0\"}"
}

solana not available in umd build of lib

My front-end build is importing aleph-js/dist/aleph-js.umd.js and I'm trying to use the solana tools. I noticed that solana isn't exported, but it is within the other builds. Maybe this is from an old build / needs an update?

from aleph-js.umd.js:32994

  exports.aggregates = aggregates;
  exports.broadcast = broadcast;
  exports.encryption = encryption;
  exports.ethereum = ethereum;
  exports.ipfs_push = ipfs_push;
  exports.ipfs_push_file = ipfs_push_file;
  exports.neo = neo;
  exports.nuls = nuls;
  exports.nuls2 = nuls2;
  exports.posts = posts;
  exports.storage_push = storage_push;
  exports.storage_push_file = storage_push_file;
  exports.store = store;

  Object.defineProperty(exports, '__esModule', { value: true });

})));

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.