@chaintestnet/sdk
v1.0.8
Published
```Bash npm run build npm publish ```
Downloads
35
Readme
XEN Wallet SDK
npm run build
npm publishConnector for Injected Apps
- Support XEN Extension
- Support Telegram/Mobile App via Iframe Widget
XEN Connect
If the application is opened inside XEN, then your wallet-selector (web3modal or rainbowkit) will automatically see the XEN wallet:
import "@xen-wallet/sdk";If you integrate XEN on a website or a separate Telegram miniapp, you need to call the method:
import { XEN } from "@xen-wallet/sdk";
XEN.setupEthProvider((request, chain, address) => {
// use rpc for connected chain and address
return yourPublicRpcProvider[chain]?.request(request);
});xenProvider implements methods that require a private key signature. All other methods that need to be sent to the network you must implement yourself.
You can use your own rpc for this in conjunction with etherjs or web3 library.
// Or use low lvel api
import { XEN } from "@xen-wallet/sdk";
await XEN.request("ethereum", { ... });Happy hacking
