You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@0xsequence/api

Package Overview
Dependencies
Maintainers
5
Versions
554
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/api - npm Package Compare versions

Comparing version

to
0.0.0-anypay-20250527101311

.turbo/turbo-build.log

39

package.json
{
"name": "@0xsequence/api",
"version": "0.0.0-26b08ee9-20220629135033",
"version": "0.0.0-anypay-20250527101311",
"description": "api sub-package for Sequence",
"repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api",
"source": "src/index.ts",
"main": "dist/0xsequence-api.cjs.js",
"module": "dist/0xsequence-api.esm.js",
"author": "Horizon Blockchain Games",
"author": "Sequence Platforms Inc.",
"license": "Apache-2.0",
"publishConfig": {
"access": "public"
},
"private": false,
"exports": {
".": {
"types": "./src/index.ts",
"default": "./dist/index.js"
}
},
"peerDependencies": {},
"devDependencies": {
"@types/node": "^22.13.9",
"typescript": "^5.7.3",
"@repo/typescript-config": "^0.0.0"
},
"dependencies": {},
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"test": "echo",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"cross-fetch": "^3.1.5"
},
"peerDependencies": {},
"devDependencies": {},
"files": [
"src",
"dist"
]
}
}
}

@@ -1,4 +0,3 @@

@0xsequence/api
===============
# @0xsequence/api
See [0xsequence project page](https://github.com/0xsequence/sequence.js).
export * from './api.gen'
import fetch from 'cross-fetch'
import { API as ApiRpc } from './api.gen'
import { API as BaseSequenceAPI } from './api.gen'
export class SequenceAPIClient extends BaseSequenceAPI {
constructor(hostname: string, public jwtAuth?: string) {
export class SequenceAPIClient extends ApiRpc {
constructor(
hostname: string,
public projectAccessKey?: string,
public jwtAuth?: string,
) {
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch)

@@ -14,9 +16,17 @@ this.fetch = this._fetch

_fetch = (input: RequestInfo, init?: RequestInit): Promise<Response> => {
// automatically include jwt auth header to requests
// automatically include jwt and access key auth header to requests
// if its been set on the api client
const headers: { [key: string]: any } = {}
if (this.jwtAuth && this.jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${this.jwtAuth}`
const jwtAuth = this.jwtAuth
const projectAccessKey = this.projectAccessKey
if (jwtAuth && jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${jwtAuth}`
}
if (projectAccessKey && projectAccessKey.length > 0) {
headers['X-Access-Key'] = projectAccessKey
}
// before the request is made

@@ -23,0 +33,0 @@ init!.headers = { ...init!.headers, ...headers }

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