
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
gws-server
Advanced tools
电子签章GWS SDK,调用前需确保已安装GZCA数字证书客户端并启动,支持TypeScript。
Install with npm
npm install gws-server --save
Install with yarn
yarn add gws-server
Install with pnpm
pnpm add gws-server
使用包管理器
import { GwsService } from "gws-server";
const gwsService = new GwsService(gwsServiceConfig);
import { createService } from "gws-server";
async function foo() {
const gwsService = await createService(gwsServiceConfig);
}
使用本地文件
import { GwsService } from "./index.es.js"; // SDK文件地址
const gzcaService = new GwsService(gwsServiceConfig);
import { createService } from "./index.es.js"; // SDK文件地址
async function foo() {
const gwsService = await createService(gwsServiceConfig);
}
<script src="./index.umd.js"></script>
const gzcaService = new GWS_SERVER.GwsService(gwsServiceConfig);
async function foo() {
const gwsService = await GWS_SERVER.createService(gwsServiceConfig);
}
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
appKey | 必填,appKey | String | -- |
secret | 必填,应用密钥 | String | -- |
baseUrl | 必填,服务器地址 | String | -- |
onOpen | 可选,socket连接成功回调 | (event: Event) => void | -- |
onError | 可选,socket错误时回调 | (event: Event) => void | -- |
onClose | 可选,socket关闭时回调 | (event: Event) => void | -- |
onMessage | 可选,socket收到消息时回调 | (data: Record<string, any>) => void | -- |
onUkeyChange | 可选,Ukey插入拔出时回调 | (data: Record<string, any>) => void | -- |
onRequestError | 可选,http请求错误时回调 | (data: Record<string, any>) => void | -- |
theme | 可选,弹窗主题色 | String | #409eff |
链式调用
// 位置签章
import { createService } from "gws-server";
createService(gwsServiceConfig).then((gwsService) => {
gzcaService
.positionSealing(params)
.then((res) => {
console.log("签章文件url", res);
})
.catch((error) => {
console.log("签章失败原因", error);
});
});
同步调用
// 位置签章
import { createService } from "gws-server";
async function positionSealing() {
try {
const gzcaService = await createService(gwsServiceConfig);
const res = await gzcaService.positionSealing(params);
console.log("签章文件url", res);
} catch (error) {
console.log("签章失败原因", error);
}
}
断开socket连接
destroy
type Destroy = () => void;
重新连接socket,可重新传入新配置
restart
type Restart = (config?: GwsServiceConfig) => void;
位置签章,返回签章文件url
positionSealing
type PositionSealing = (params: {
fileType: string;
fileData?: string;
filePath?: string;
page?: number;
height?: number;
width?: number;
x: number;
y: number;
}) => Promise<string>;
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
fileType | 必填,文件类型 | PDF | OFD | -- |
fileData | 可选,与filePath二选一,待签章文件(Base64) | String | -- |
filePath | 可选,与fileData二选一,签章系统能访问的URL地址 | String | -- |
page | 必填,位置签章页,第一页从0开始 | Number | -- |
height | 可选,图片高度(毫米) | Number | -- |
width | 可选,图片宽度(毫米) | Number | -- |
x | 必填,位置签章坐标,表示签章后的X的位置。起始点为左下角 | Number | -- |
y | 必填,位置签章坐标,表示签章后的Y的位置。起始点为左下角 | Number | -- |
关键字签章,返回签章文件url
keywordSealing
type KeywordSealing = (params: {
fileType: string;
fileData?: string;
filePath?: string;
height?: number;
width?: number;
keyword: string;
offX?: number;
offY?: number;
}) => Promise<string>;
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
fileType | 必填,文件类型 | PDF | OFD | -- |
fileData | 可选,与filePath二选一,待签章文件(Base64) | String | -- |
filePath | 可选,与fileData二选一,签章系统能访问的URL地址 | String | -- |
height | 可选,图片高度(毫米) | Number | -- |
width | 可选,图片宽度(毫米) | Number | -- |
keyword | 必填,关键字 | String | -- |
offX | 可选,关键字签章x偏移量,正数向右,负数向左 | Number | 0 |
offY | 可选,关键字签章y偏移量,正数向上,负数向下 | Number | 0 |
骑缝章签章,返回签章文件url
connectiveSealing
type ConnectiveSealing = (params: {
fileType: string;
fileData?: string;
filePath?: string;
height?: number;
width?: number;
connOff?: number;
}) => Promise<string>;
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
fileType | 必填,文件类型 | PDF | OFD | -- |
fileData | 可选,与filePath二选一,待签章文件(Base64) | String | -- |
filePath | 可选,与fileData二选一,签章系统能访问的URL地址 | String | -- |
height | 可选,图片高度(毫米) | Number | -- |
width | 可选,图片宽度(毫米) | Number | -- |
connOff | 可选,偏移量,正数向上,负数向下。默认在右侧的中心为0 | Number | 0 |
多处位置签章,返回签章文件url
multiplePositionSealing
type multiplePositionSealing = (params: {
fileType: string;
fileData?: string;
filePath?: string;
pictureList: PositionType[];
}) => Promise<string>;
type PositionType = {
height?: number;
width?: number;
page: number;
x: number;
y: number;
};
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
fileType | 必填,文件类型 | PDF | OFD | -- |
fileData | 可选,与filePath二选一,待签章文件(Base64) | String | -- |
filePath | 可选,与fileData二选一,签章系统能访问的URL地址 | String | -- |
pictureList | 必填,批量位置对象,对象内容如下 | PositionType[] | -- |
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
page | 必填,位置签章页,第一页从0开始 | Number | -- |
height | 可选,图片高度(毫米) | Number | -- |
width | 可选,图片宽度(毫米) | Number | -- |
x | 必填,位置签章坐标,表示签章后的X的位置。起始点为左下角 | Number | -- |
y | 必填,位置签章坐标,表示签章后的Y的位置。起始点为左下角 | Number | -- |
FAQs
gws server
The npm package gws-server receives a total of 12 weekly downloads. As such, gws-server popularity was classified as not popular.
We found that gws-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.