alfafrens-sdkx
v0.0.2
Published
Install alfafrens-sdk with npm
Downloads
5
Readme
Installation
Install alfafrens-sdk with npm
npm install alfafrens-sdk @trpc/server @trpc/client
Usage/Examples
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
import type { PublicAPIRouter } from 'alfafrens-sdk';
const client = createTRPCProxyClient<PublicAPIRouter>({
links: [
httpBatchLink({
url: 'http://localhost:3000/api/public',
async headers() {
return {
authorization: "Bearer 123c123cmdqwécljdéc",
};
},
}),
],
});
const result = await client.getChannel.query({
channelAddress: '0x123',
});