Giter VIP home page Giter VIP logo

filecoin.js's People

Contributors

alexandrumatei36 avatar dependabot[bot] avatar eshon avatar fainashalts avatar galargh avatar mishmosh avatar popra avatar rvagg avatar smagdali avatar smooth-operator avatar vasco-santos avatar web-flow 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filecoin.js's Issues

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two-Factor Authentication, make configure the auth-only level is supported. semantic-release cannot publish with the default auth-and-writes level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Unable to Sign Transaction

I am using Mnemonic Wallet Provider in calibration node and while trying to sign transaction i could not sign the transation. Here is the things that i did to sign the transacton:


 const message = await walletProvider.createMessage({
                From: myAddress,
                To: 't17aadv3s2hi4gntz2vt7jluerrijogsugpqt5qai',
                GasLimit: 608335,
                GasFeeCap: new BigNumber(0),
                GasPremium: new BigNumber(0),
                Value: 0.001,
                Method: 0,
                Params: '',
                Nonce: 12
            });

            const signedMessage = await walletProvider.signMessage(message);

When the walletProvider.signMessage(message) method gets executed i am receiving error as Invalid Character.

Comment Typo

/**
   * walletImport returns the private key of an address in the wallet.
   * @param keyInfo
   */
  public async walletImport(keyInfo: KeyInfo): Promise<string> {
    const ret = await this.conn.request({ method: 'Filecoin.WalletImport', params: [keyInfo] });
    return ret as string;
  }

walletImport should Import a private and returns the address of the private key I assume?

* walletImport returns the private key of an address in the wallet.

get different addresses when Import imtoken

Excuse me , i When I run ‘example-lightwallet.html’
use LightWalletProvider get a private key, Why get different addresses when Import imtoken ?
----------data------------
{"encSeed":{"encStr":"NC/gnpFDoFLQRBf+PVH9kVqhL+Vf4fHShB5vvpN+Svg/hcQPVIonvfiG4owQ2ctK1h8kS9PEQ9b4fGhPibQMw4jxvJFSAe1kst8RU0vYaUORnvU8zHkbOj8X2h50KcpzoDiLdW+y79Gh0nlozVfZxaBZ9/8IWzC0RM5z8t5ExR8n44etnwNZ0Q==","nonce":"oTXyvyF2ExCEyO7hxXuJtPOSgTvc06zJ"},"addresses":["f1x4l2txrayrtvnrj7fnp2m5cp6k3rvtifvkhuy5y"],"encPrivKeys":{"f1x4l2txrayrtvnrj7fnp2m5cp6k3rvtifvkhuy5y":{"key":"w234lMU+OBbM7d1tqhBARnZ1fmrf6PxhhgcFXxoMsDSR39GQ+MfQcxHXxHGHV2hA","nonce":"rUmU+ReChvUMR0I6yASM31XVzcyudPGs"}},"hdPathString":"m/44'/461'/0/0/1","salt":"OOcPOZgmNC/TrZvaMx5enGnEVvGhfC+ws/e9FSBXkc0=","hdIndex":0,"version":1}

StorageAsk not working

The following line of code doesn't work for either Lotus nor filecoin.js clients,
I am trying to ask the price in FIL of a specific storage provider from Filecoin (found one of many through https://calibration.filfox.info/), but each time I try to make a query-ask it just keeps loading forever.
Tried mainnet, calibnet, HTTP connection and WS connection, still timeout error.

        const ask = await lotusClient.client.queryAsk('12D3KooWDtntXDiNUz1B2DTxxbvLD8nhJytrps4tVhfkEvaMNw9d', 't01132');

Example of Documentation Not Working

I was following https://filecoin-shipyard.github.io/filecoin.js/docs/sign-message document for creating the message but seems the example provided to create Message gives an error.

This gives an error:

const message = await walletProvider.createMessage({
    To: __to__,
    From: __from__,
    Value: new BigNumber(__amount__),
});

But this works

 const message = await walletProvider.createMessage({
                From: myAddress,
                To: toAddress,
                GasLimit: 608335,
                GasFeeCap: new BigNumber(0),
                GasPremium: new BigNumber(0),
                Value: 0.001,
                Method: 0,
                Params: '',
                Nonce: 12
            });

Refactor Wallet Providers

  • Rename JsonRpcProvider to LotusClient
  • Move api requests from HttpJsonWalletProvider to LotusClient
  • Define interfaces for wallet providers (passtrough for methods that don't require accessing lotus store, separate interfaces for messages, payment channels & multisigs, each provider implements all the aforementioned interfaces)

Github website link not working in the header

Link present in the Github text in the header file is not working.

It should send the user to the Github documentation repository but it is not working and showing the page as shown in the screenshot. I would like to work on the issue to solve it. Can I work on it?


Screenshot (25)

roadmap: next

Proposed functionalities to be implemented in the library.

  • keeping the source code and library documentation up to date with the latest Lotus changes
  • add support for serializing BLS addresses. It may be implemented in the Zondax signing library and submit a PR if it is not in their short-term roadmap
  • implement serialization as a general mechanism. for example, it’ll be necessary in the future when using smart contract methods
  • store and download files using Filecoin.js. It will be implemented with support from the Lotus team.
  • implement a module to support general operations such as: FIL conversions, large number helpers
  • add a subscription module that contains high-level methods for managing long-term processes (synchronization, new block headers, wait for pending transactions, etc.)
  • use multisig wallets and payment channels with external signers

These are open to discussion. Other proposals may also be submitted

Using Infura endpoint

Hi, I've been trying to use Infura to send messages but it never seems to connect properly, is it compatible, and if yes how is it supposed to be used?

Run tests locally

The tests are running in CI and I am trying to run them locally as well.

Following github actions workflow I am trying to run run_tests_ci.sh but it simply hangs forever with timeouts like:

waiting for 105 seconds, timeout 320
curl response status
000

waiting for 120 seconds, timeout 320
curl response status
000

Any clues of what else I should do first?

Abortf: caller type bafkqadlgnfwc6mjpmfrwg33vnz2a cannot exec actor type bafkqadtgnfwc6mrpnv2wy5djonuwo

const {HttpJsonRpcConnector, LightWalletProvider, LotusClient, LotusWalletProvider} = require('filecoin.js');
const BigNumber = require("bignumber.js");

const testMnemonic = 'equip will roof matter pink blind book anxiety banner elbow sun young';

async function multisig() {
  const connector = new HttpJsonRpcConnector({ url: 'http://localhost:7777'});
  const con = new LotusClient(connector);
  const lightWalletHttp = new LightWalletProvider(con, () => { return 'testPwd' }, 'test');
  await lightWalletHttp.recoverLightWallet(testMnemonic, 'testPwd');

  await lightWalletHttp.newAddress();
  await lightWalletHttp.newAddress();
  const addresses = await lightWalletHttp.getAddresses();
  const mnemonicAddress = await lightWalletHttp.newAddress();
  const multisigCid = await lightWalletHttp.msigCreate(2, addresses, 0, 0, '1000', addresses[0]);
  // const multisigCid = await lightWalletHttp.msigCreate(2, addresses, 0, 0, 0, await walletLotusHttp.getDefaultAddress());
  const receipt = await con.state.waitMsg(multisigCid, 0);
  console.log(receipt);
  const multisigAddress = receipt.ReturnDec.RobustAddress;
  console.log(multisigAddress);
  const balance = await lightWalletHttp.msigGetAvailableBalance(multisigAddress, []);
  console.log(balance);
}

Hi i was testing above sample codes. I ran local devnet node. But when i run this code. it fails with Abortf: caller type bafkqadlgnfwc6mjpmfrwg33vnz2a cannot exec actor type bafkqadtgnfwc6mrpnv2wy5djonuwo Do i miss something?

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.