@dialectlabs/identity-dialect-dapps
Advanced tools
Comparing version 1.0.0-beta.2 to 1.0.0-beta.3
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fetchAllDapps = void 0; | ||
exports.fetchAllDapps = exports.createHeaders = void 0; | ||
const tslib_1 = require("tslib"); | ||
const version_1 = require("./version"); | ||
const XClientNameHeader = 'x-client-name'; | ||
const XClientVersionHeader = 'x-client-version'; | ||
function createHeaders() { | ||
return { | ||
[XClientNameHeader]: 'dialect-sdk', | ||
[XClientVersionHeader]: version_1.SDK_VERSION, | ||
}; | ||
} | ||
exports.createHeaders = createHeaders; | ||
function fetchAllDapps(baseUrl) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
return fetch(`${baseUrl}/api/v1/dapps?verified=true`).then((it) => it.json()); | ||
return fetch(`${baseUrl}/api/v1/dapps?verified=true`, { | ||
headers: createHeaders(), | ||
}).then((it) => it.json()); | ||
}); | ||
@@ -9,0 +21,0 @@ } |
@@ -0,4 +1,15 @@ | ||
import { SDK_VERSION } from './version'; | ||
const XClientNameHeader = 'x-client-name'; | ||
const XClientVersionHeader = 'x-client-version'; | ||
export function createHeaders() { | ||
return { | ||
[XClientNameHeader]: 'dialect-sdk', | ||
[XClientVersionHeader]: SDK_VERSION, | ||
}; | ||
} | ||
export async function fetchAllDapps(baseUrl) { | ||
return fetch(`${baseUrl}/api/v1/dapps?verified=true`).then((it) => it.json()); | ||
return fetch(`${baseUrl}/api/v1/dapps?verified=true`, { | ||
headers: createHeaders(), | ||
}).then((it) => it.json()); | ||
} | ||
//# sourceMappingURL=api.js.map |
@@ -0,1 +1,5 @@ | ||
export declare function createHeaders(): { | ||
"x-client-name": string; | ||
"x-client-version": string; | ||
}; | ||
export interface Dapp { | ||
@@ -2,0 +6,0 @@ publicKey: string; |
{ | ||
"name": "@dialectlabs/identity-dialect-dapps", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0-beta.3", | ||
"repository": "git@github.com:dialectlabs/sdk.git", | ||
@@ -16,3 +16,5 @@ "author": "dialectlabs", | ||
"clean": "rm -rf lib", | ||
"build": "npm run clean && npm run build:cjs; npm run build:esm", | ||
"generate-version": "node ./prebuild.js", | ||
"postinstall": "chmod +x ./postinstall.sh && ./postinstall.sh", | ||
"build": "yarn generate-version && yarn clean && yarn build:cjs; yarn build:esm", | ||
"build:cjs": "tsc --project tsconfig.cjs.json", | ||
@@ -19,0 +21,0 @@ "build:cjs:watch": "concurrently \"tsc --project tsconfig.cjs.json --watch\"", |
@@ -0,1 +1,13 @@ | ||
import { SDK_VERSION } from './version'; | ||
const XClientNameHeader = 'x-client-name'; | ||
const XClientVersionHeader = 'x-client-version'; | ||
export function createHeaders() { | ||
return { | ||
[XClientNameHeader]: 'dialect-sdk', | ||
[XClientVersionHeader]: SDK_VERSION, | ||
}; | ||
} | ||
export interface Dapp { | ||
@@ -10,3 +22,5 @@ publicKey: string; | ||
export async function fetchAllDapps(baseUrl: string): Promise<Dapp[]> { | ||
return fetch(`${baseUrl}/api/v1/dapps?verified=true`).then((it) => it.json()); | ||
return fetch(`${baseUrl}/api/v1/dapps?verified=true`, { | ||
headers: createHeaders(), | ||
}).then((it) => it.json()); | ||
} |
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
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
18970
34
263
1
3