Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Javascript module to connect to Tenzorum's Service Nodes and ecosystem.
Easy to use SDK for implementing gasless transactions
Users must have an environment capable of running web3@1.0.0
Package | Version | Docs | Description |
---|---|---|---|
web3 | The core of web3 |
Utility for signing transactions and interaction with TSNN.
npm i tenzorum --save
To onboard a user to be able to use gasless transactions the user's app must have 2 components.
const privateKey = "d51729c3b597d162d7be8f83c8ee4eb137db72e7e0828d7709a1a5b274afe017";
import {deployPersonalMultisig} from tenzSdk;
const personalMultisigWallet = await deployPersonalMultisig(<publicKey from privateKey>)
returns 0xf8894138aa4d7b54b7d49afa9d5600cdb5178721
For better UX it's recommended to deploy a ens username which resolves to the user's personal multisig wallet.
This can be done all at once using the deployUserAccount
method.
import {deployUserAccount} from 'tenzorum';
deployUserAccount('user.ens-name.eth', "0xf8894138aa4d7b54b7d49afa9d5600cdb5178721");
You can then initialise the SDK
const tenzSdk = require('tenzorum');
tenzSdk.initSdk(web3, privateKey, personalWalletAddress);
/*ES6*/
import {initSdk, transferTokensWithTokenReward} from 'tenzorum';
initSdk(web3, privateKey, personalWalletAddress);
The user's wallet can then access transferring tokens via gasless transactions easily with the following function calls.
const result = await tenzSdk.transferTokensWithTokenReward(tokenAddress, tenTokens, toAddress, oneToken);
console.log(result);
This will print out a message in the following format as expected in the body of POST request by TSNN:
{
"v":"0x1b",
"r":"0x2a061c04485a307802d76f3e4c7fda40ec4d3390df3c6df28fd6c3165ca1fb59",
"s":"0x5dd8b1d92512baa9ce7e49cad004a45c4bdabf8b852c99f522740f62b955a6c6",
"from":"0x9E48c4A74D618a567CD657579B728774f35B82C5",
"to":"0xf74694642a81a226771981cd38df9105a133c111",
"value":"0",
"data":"0x947aca55000000000000000000000000f938bfdc53f72cb7a4b1946969ba0cce05c902c6",
"rewardType":"0x0000000000000000000000000000000000000000",
"rewardAmount":"0"
}
where:
For full working example check example.js.
FAQs
Javascript module to connect to Tenzorum's Service Nodes and ecosystem.
The npm package tenzorum receives a total of 23 weekly downloads. As such, tenzorum popularity was classified as not popular.
We found that tenzorum demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.