
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@lennybakkalian/ngx-trpc
Advanced tools
This project was inspired by the amazing work of @analogjs/trpc
. It builds upon the same principles of type-safe API communication and seamless Angular integration, with added features such as WebSocket subscriptions.
Since the REQUEST token is reintroduced in v19, this library is compatible only with that version.
This project is a work in progress. Features and APIs may change as development continues. Use at your own risk, and expect frequent updates. Contributions and feedback are always welcome!
First, define a global injection token using the AppRouter
type from your tRPC backend. This will allow you to inject your tRPC client throughout your Angular app.
export const TRPC = createTrpcInjectionToken<AppRouter>();
Next, provide the tRPC client and httpClient in your app.config.ts
file.
provideHttpClient(withFetch()),
provideTrpc(TRPC, {
http: { url: 'http://localhost:4444/trpc' },
ws: {
url: 'ws://localhost:4444',
lazy: { enabled: true, closeMs: 10_000 },
},
})
You can now use the TRPC injection token to call tRPC queries as RxJS observables inside your components. Here's an example of how to call the hello query.
@Component({
selector: 'app-demo',
template: '{{ demoQuery$ | async | json }}',
})
export class DemoComponent {
readonly trpc = inject(TRPC);
readonly demoQuery$ = this.trpc.hello.query();
}
You can use different link configurations for server-side. So you can directly connect to the backend.
provideTrpc(TRPC, {
http: {
url: 'https://api.example.com/trpc',
ssrUrl: 'http://backend_host:4444/trpc' // <-- Add this line. This host will be used on the server
}
})
FAQs
Angular integration for tRPC
We found that @lennybakkalian/ngx-trpc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.