Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@0xpass/passport-viem

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xpass/passport-viem - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

dist/index.d.ts

@@ -13,4 +13,4 @@ import { Chain, HttpTransport, Transport, WalletClient } from "viem";

};
export declare function createPassTransport(sessionSignature: string, chain: Chain, fallback: Transport): HttpTransport;
export declare function createPassportClient(signature: string, transport: Transport, chain: Chain): WalletClient;
export declare function createPassTransport(session: any, chain: Chain, fallback: Transport): HttpTransport;
export declare function createPassportClient(session: any, transport: Transport, chain: Chain): WalletClient;
//# sourceMappingURL=index.d.ts.map

@@ -35,3 +35,3 @@ import { http, createWalletClient, assertRequest, assertCurrentChain } from 'viem';

}
function createPassTransport(sessionSignature, chain, fallback) {
function createPassTransport(session, chain, fallback) {
const fallbackTransport = fallback({ chain }); // Invoke the fallback Transport function

@@ -41,3 +41,4 @@ return httpWrapper(passEndpoint, {

headers: {
'X-Session-Signature': sessionSignature
'session': session,
'secure_context': "1"
}

@@ -47,6 +48,6 @@ }

}
function createPassportClient(signature, transport, chain) {
function createPassportClient(session, transport, chain) {
const walletClient = createWalletClient({
chain,
transport: createPassTransport(signature, chain, transport),
transport: createPassTransport(session, chain, transport),
});

@@ -53,0 +54,0 @@ return new Proxy(walletClient, {

{
"name": "@0xpass/passport-viem",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,1 +0,1 @@

export const passEndpoint = "https://kesari.0xpass.io"
export const passEndpoint = "https://kesari.0xpass.io";

@@ -28,3 +28,2 @@ import {

export function httpWrapper(url: string, config: any, fallback: any) {

@@ -52,3 +51,3 @@ const originalHttpFunction = http(url, config);

export function createPassTransport(sessionSignature: string, chain: Chain, fallback: Transport): HttpTransport {
export function createPassTransport(session: any, chain: Chain, fallback: Transport): HttpTransport {
const fallbackTransport = fallback({chain}); // Invoke the fallback Transport function

@@ -58,3 +57,4 @@ return httpWrapper(passEndpoint, {

headers: {
'X-Session-Signature': sessionSignature
'session': session,
'secure_context': "1"
}

@@ -66,6 +66,6 @@ }

export function createPassportClient(signature: string, transport: Transport, chain: Chain): WalletClient {
export function createPassportClient(session: any, transport: Transport, chain: Chain): WalletClient {
const walletClient = createWalletClient({
chain,
transport: createPassTransport(signature, chain, transport),
transport: createPassTransport(session, chain, transport),
});

@@ -136,3 +136,2 @@

});
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc