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

@0xsequence/sessions

Package Overview
Dependencies
Maintainers
0
Versions
300
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/sessions - npm Package Compare versions

Comparing version 2.2.4 to 2.2.5

14

package.json
{
"name": "@0xsequence/sessions",
"version": "2.2.4",
"version": "2.2.5",
"description": "tools for migrating sequence wallets to new versions",

@@ -16,6 +16,6 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/sessions",

"idb": "^7.1.1",
"@0xsequence/migration": "2.2.4",
"@0xsequence/core": "2.2.4",
"@0xsequence/replacer": "2.2.4",
"@0xsequence/utils": "2.2.4"
"@0xsequence/migration": "2.2.5",
"@0xsequence/core": "2.2.5",
"@0xsequence/utils": "2.2.5",
"@0xsequence/replacer": "2.2.5"
},

@@ -27,4 +27,4 @@ "devDependencies": {

"nyc": "^15.1.0",
"@0xsequence/tests": "2.2.4",
"@0xsequence/signhub": "2.2.4"
"@0xsequence/signhub": "2.2.5",
"@0xsequence/tests": "2.2.5"
},

@@ -31,0 +31,0 @@ "files": [

/* eslint-disable */
// sessions v0.0.1 67f782e8acfe452f905078a7423ed5d27c6639a8
// sessions v0.0.1 48681273e3b0249c5feb593b9af1b59dc6a14869
// --
// Code generated by webrpc-gen@v0.20.3 with typescript generator. DO NOT EDIT.
// Code generated by webrpc-gen@v0.22.1 with typescript generator. DO NOT EDIT.
//
// webrpc-gen -schema=sessions.ridl -target=typescript -client -out=./clients/sessions.gen.ts
export const WebrpcHeader = 'Webrpc'
export const WebrpcHeaderValue = 'webrpc@v0.22.1;gen-typescript@v0.16.2;sessions@v0.0.1'
// WebRPC description and code-gen version

@@ -15,4 +19,52 @@ export const WebRPCVersion = 'v1'

// Schema hash generated from your RIDL schema
export const WebRPCSchemaHash = '67f782e8acfe452f905078a7423ed5d27c6639a8'
export const WebRPCSchemaHash = '48681273e3b0249c5feb593b9af1b59dc6a14869'
type WebrpcGenVersions = {
webrpcGenVersion: string
codeGenName: string
codeGenVersion: string
schemaName: string
schemaVersion: string
}
export function VersionFromHeader(headers: Headers): WebrpcGenVersions {
const headerValue = headers.get(WebrpcHeader)
if (!headerValue) {
return {
webrpcGenVersion: '',
codeGenName: '',
codeGenVersion: '',
schemaName: '',
schemaVersion: ''
}
}
return parseWebrpcGenVersions(headerValue)
}
function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
const versions = header.split(';')
if (versions.length < 3) {
return {
webrpcGenVersion: '',
codeGenName: '',
codeGenVersion: '',
schemaName: '',
schemaVersion: ''
}
}
const [_, webrpcGenVersion] = versions[0].split('@')
const [codeGenName, codeGenVersion] = versions[1].split('@')
const [schemaName, schemaVersion] = versions[2].split('@')
return {
webrpcGenVersion,
codeGenName,
codeGenVersion,
schemaName,
schemaVersion
}
}
//

@@ -131,5 +183,5 @@ // Types

export interface SignerSignature {
referenceChainID?: string
signer?: string
signature: string
referenceChainID?: string
}

@@ -479,5 +531,8 @@

const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' }
reqHeaders[WebrpcHeader] = WebrpcHeaderValue
return {
method: 'POST',
headers: { ...headers, 'Content-Type': 'application/json' },
headers: reqHeaders,
body: JSON.stringify(body || {}),

@@ -547,3 +602,3 @@ signal

code: number = 0,
message: string = 'endpoint error',
message: string = `endpoint error`,
status: number = 0,

@@ -561,3 +616,3 @@ cause?: string

code: number = -1,
message: string = 'request failed',
message: string = `request failed`,
status: number = 0,

@@ -575,3 +630,3 @@ cause?: string

code: number = -2,
message: string = 'bad route',
message: string = `bad route`,
status: number = 0,

@@ -589,3 +644,3 @@ cause?: string

code: number = -3,
message: string = 'bad method',
message: string = `bad method`,
status: number = 0,

@@ -603,3 +658,3 @@ cause?: string

code: number = -4,
message: string = 'bad request',
message: string = `bad request`,
status: number = 0,

@@ -617,3 +672,3 @@ cause?: string

code: number = -5,
message: string = 'bad response',
message: string = `bad response`,
status: number = 0,

@@ -631,3 +686,3 @@ cause?: string

code: number = -6,
message: string = 'server panic',
message: string = `server panic`,
status: number = 0,

@@ -645,3 +700,3 @@ cause?: string

code: number = -7,
message: string = 'internal error',
message: string = `internal error`,
status: number = 0,

@@ -659,3 +714,3 @@ cause?: string

code: number = -8,
message: string = 'client disconnected',
message: string = `client disconnected`,
status: number = 0,

@@ -673,3 +728,3 @@ cause?: string

code: number = -9,
message: string = 'stream lost',
message: string = `stream lost`,
status: number = 0,

@@ -687,3 +742,3 @@ cause?: string

code: number = -10,
message: string = 'stream finished',
message: string = `stream finished`,
status: number = 0,

@@ -703,3 +758,3 @@ cause?: string

code: number = 1,
message: string = 'invalid argument',
message: string = `invalid argument`,
status: number = 0,

@@ -714,3 +769,3 @@ cause?: string

export class NotFoundError extends WebrpcError {
constructor(name: string = 'NotFound', code: number = 2, message: string = 'not found', status: number = 0, cause?: string) {
constructor(name: string = 'NotFound', code: number = 2, message: string = `not found`, status: number = 0, cause?: string) {
super(name, code, message, status, cause)

@@ -737,3 +792,19 @@ Object.setPrototypeOf(this, NotFoundError.prototype)

const webrpcErrorByCode: { [code: number]: any } = {
export enum WebrpcErrorCodes {
WebrpcEndpoint = 0,
WebrpcRequestFailed = -1,
WebrpcBadRoute = -2,
WebrpcBadMethod = -3,
WebrpcBadRequest = -4,
WebrpcBadResponse = -5,
WebrpcServerPanic = -6,
WebrpcInternalError = -7,
WebrpcClientDisconnected = -8,
WebrpcStreamLost = -9,
WebrpcStreamFinished = -10,
InvalidArgument = 1,
NotFound = 2
}
export const webrpcErrorByCode: { [code: number]: any } = {
[0]: WebrpcEndpointError,

@@ -740,0 +811,0 @@ [-1]: WebrpcRequestFailedError,

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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