Coder Social home page Coder Social logo

fuellabs / fuels-ts Goto Github PK

View Code? Open in Web Editor NEW
44.6K 118.0 1.3K 20.94 MB

Fuel Network Typescript SDK

Home Page: https://docs.fuel.network/docs/fuels-ts/

License: Apache License 2.0

TypeScript 97.82% Shell 0.21% JavaScript 0.90% Handlebars 0.38% Sway 0.09% Vue 0.03% CSS 0.48% HTML 0.09%
fuel typescript

fuels-ts's Issues

Encrypt/Decrypt wallet

  • Encrypt wallet data using password wallet.lock(password: string) -> Wallet({ locked: true })
  • Decrypt wallet data using password wallet.unlock(password: string) -> Wallet({ locked: false })

`Utilites.signMessage` it's not working like `wallet.<signMessage|signTransaction>`

It looks like we have a divergency when finding the public key from a signed message;

Given private key in this case:
0xae78c8b502571dba876742437f8bc78b689cf8518356c0921393d89caaf284ce

We have;

  1. When we sign a transaction/message with wallet.<signMessage|signTransaction> and retrieve the public key with utilities.<verifyMessage|verifyTransaction> or just check the wallet.publickKey it has a value
    0xa1ad658fd9b046cb8bc37cba09e1330c859467b235a5c76659000c4577f526c7. Link
  2. If we use utilities.signMessage and try to check the publicKey using utilities.verifyMessage it returns the publicKey 0xbafe4b5d65c9efd34390402ca185d4a58a9e5b1d89c5bc52d90d382059296508. Link

Fix `byte[]` Coding

WitnessCoder and anything else that uses byte[] should be checked if they properly pad to 8 bytes when encoding and also consume that padding during decoding.

Bikeshed Display Name

Just like ethers.js/Ethers and sway/Sway, fuels-ts and fuels-rs should also have capitalized display names.

Update to latest Forc and fuel-core

We don't actually depend on Forc, but we have files generated by Forc. We should update Forc on our locals and regenerate these files to make sure we are compatible with their latest version.

Changes similar to FuelLabs/fuels-rs#19 will be required.

Refactor `Tuple` and `Array` Coders

These coders are called recursively and have input/output types of any. We should refactor this so the types are explicit on these coders.

Add `signTransaction`

Currently it is hard to test/dev against a provider/contract. We should mock it out

Update `contact-v2` dependency to use NPM instead of github

The merkle tree code uses contracts from contract-v2. The repo is private and uses git to pull the dependency. This forces us to set an access token for CI. Once contract-v2 is accessible via NPM, CI and package.json should be updated.

Setup Versioned Releases

We have addressed the issue of publishing packages to NPM on #38, but that doesn't include proper versioning.

We should make proper releases that:

Metamask intergration

Integrate with metamask

https://docs.metamask.io/guide/rpc-api.html#wallet-addethereumchain

To intergrate we need the following:

interface AddEthereumChainParameter {
  chainId: string; // A 0x-prefixed hexadecimal string
  chainName: string;
  nativeCurrency: {
    name: string;
    symbol: string; // 2-6 characters long
    decimals: 18;
  };
  rpcUrls: string[];
  blockExplorerUrls?: string[];
  iconUrls?: string[]; // Currently ignored.
}

Currently don't have an ethereum json-rpc facade

Suggest rename to fuel-ts

I think this repository / module should be renamed fuel-ts. Is there any reason why we went with "fuels-ts"?

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.