filecoin-shipyard / filecoin.js Goto Github PK
View Code? Open in Web Editor NEWA JavaScript (and TypeScript) library for interacting with the Filecoin's Lotus node, with support for external signers.
License: Other
A JavaScript (and TypeScript) library for interacting with the Filecoin's Lotus node, with support for external signers.
License: Other
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.
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 📦🚀
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.
/**
* 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?
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}
using globals is a fairly well documented antipattern that we should avoid at all cost.
In this particular case, if the app is connected to 2 websockets they will bork each others request ids:
https://github.com/filecoin-shipyard/filecoin.js/blob/master/src/connectors/WsJsonRpcConnector.ts#L12
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');
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
});
Proposed functionalities to be implemented in the library.
These are open to discussion. Other proposals may also be submitted
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?
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?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.