Utilize this tool to engage with accounts and programs on the L1X Network via the L1X Network JSON RPC API.
For use in Node.js or a web application (Invited Members)
npm login
For use in Node.js or a web application
npm install --save @l1x/l1x-wallet-sdk
For more detail on individual functions, see the latest API Documentation
Requirements:
To Build from source run
npm install
npm run build
To run tests, run the following command
npm run test
const {L1XProvider} = require("@l1x/l1x-wallet-sdk")
OR
For V1 Chain:
import {L1XProvider} from ("@l1x/l1x-wallet-sdk")
function getL1XProvider(){
return new L1XProvider({
clusterType:"mainnet"
})
}
(async() => {
const l1x = getL1XProvider();
await l1x.core.getChainState().then(console.log)
})();
For V2 Chain:
import {L1XProvider} from ("@l1x/l1x-wallet-sdk")
function getL1XProvider(){
return new L1XProvider({
clusterType:"mainnet",
endpoint:"https://v2-mainnet-rpc.l1x.foundation"
})
}
(async() => {
const l1x = getL1XProvider();
await l1x.core.getChainState().then(console.log)
})();
Generated using TypeDoc