
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
@ethsign/sign-sdk
Advanced tools
npm install @ethsign/sign-sdk
import { privateKeyToAccount } from 'viem/accounts';
import { SignClient } from '@ethsign/sign-sdk';
const privateKey = '0xxxxxx'; // eth private key
const tenantId = 'xxxx'; //sent us your publicKey to get it
const client = new SignClient({
account: privateKeyToAccount(privateKey),
tenantId: tenantId,
});
const contractId = 'xxxx'; // main contract id
const userAddress = '0xxxxxx'; // eth address
const contractInfo = await client.checkContractStatus(contractId, userAddress);
const contractId = contractInfo.contractId; // come from checkContractStatus response
const webApiKey = await client.generateWebApiKey(contractId);
import { SignWebClient } from '@ethsign/sign-sdk';
const webClient = new SignWebClient({
getApiKey: async () => {
return await getWebApiKey(); // request server side to get webApikey
},
});
const contractId = contractInfo.contractId; // come from checkContractStatus response
const password = 'xxx'; //optional,if contract is password protected
const previewUrl = await webClient.generatePreviewUrl(contractId, password);
const contractId = contractInfo.contractId; // come from checkContractStatus response
const password = 'xxx'; //optional,if contract is password protected
const res = await webClient.downloadContract(contractId, password);
import { generateFileEncrypted,hashSha256 } from '@ethsign/sign-sdk';
import { createWalletClient, custom , privateKeyToAccount } from 'viem';
const file: File=;
const userAddress: string='0xabc';
const password: string='xxx';
const privateKey: string='0xabcxxx';
const fileEncrypted = await generateFileEncrypted({
file,
recipients: [
{
address: userAddress,
chainType:'eth',
email: '',
x: 0,
y: 0,
page: 0,
width: 100,
},
],
password,
});
const message = await hashSha256(fileEncrypted);
const account = privateKeyToAccount(privateKey);
const signature = await account.signMessage({ message });
const res = await client.createContract({
creator: account.address,
fileEncrypted,
enableEncryption: !!password,
enableExpiration: false,
expireTime: 0,
signature,
title: file.name,
recipients: [
{
address: account.address,
email: '',
},
],
});
const timestamp = Date.now();
const account = privateKeyToAccount(privateKey); // owner of contract
const message = [contractId, timestamp].join(',');
const signature = await account.signMessage({ message });
const res = await client.createShareLink({
contractId,
timestamp,
signature,
});
console.log(res, 'res');
const timestamp = Date.now();
const account = privateKeyToAccount(privateKey);
const message = [contractId, timestamp].join(',');
const signature = await account.signMessage({ message });
const res = await client.getContractInfo({
contractId,
timestamp,
signature,
});
console.log(res, 'res');
FAQs
## Installation
We found that @ethsign/sign-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.