Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
TypeScript library for running and deploying Pact code.
Download the latest version of Pact. See the Pact README for instructions.
import pactLang from 'pact-lang-api'
import PactApi, { IKeyPair, pactUtils } from 'ts-pact'
const keyPair = pactLang.crypto.genKeyPair()
const args = [
keyPair.publicKey, // Use public key as the account ID.
pactUtils.keyset('account-keyset'),
]
const code = pactUtils.makeExpr('accounts.create-account', args)
const data = pactUtils.keysetData(keyPair.publicKey, 'account-keyset')
return this.pactApi.eval({
code,
data,
keyPair,
})
This package comes with some utility scripts in src/scripts/
.
The scripts will look in the environmental variables for a Pact key and URL
to use when sending transactions, falling back to defaults if these are not available.
See src/scripts/config.ts
for details.
Compile scripts:
yarn compile
Open a REPL to a Pact node:
node dist/src/scripts/pactRepl.js
Deploy a contract or run a Pact script:
node dist/src/scripts/runFile.js
Example: deploy and initialize a set of smart contracts:
node dist/src/scripts/deployContracts.js
FAQs
TypeScript library for running and deploying Pact code.
The npm package ts-pact receives a total of 12 weekly downloads. As such, ts-pact popularity was classified as not popular.
We found that ts-pact demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.