@0xpass/passport-viem
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
254
12488