🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@lit-protocol/contracts-sdk

Package Overview
Dependencies
Maintainers
4
Versions
530
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lit-protocol/contracts-sdk - npm Package Compare versions

Comparing version

to
0.1.101

19

package.json
{
"name": "@lit-protocol/contracts-sdk",
"version": "0.1.100",
"version": "0.1.101",
"type": "commonjs",

@@ -15,4 +15,5 @@ "scripts": {},

"ethers": "^5.7.1",
"@lit-protocol/misc": "0.1.100",
"@lit-protocol/constants": "0.1.100",
"@lit-protocol/pkp-ethers.js-node": "^5.7.47",
"@lit-protocol/misc": "0.1.101",
"@lit-protocol/constants": "0.1.101",
"tslib": "^2.3.0"

@@ -26,11 +27,3 @@ },

"typings": "./src/index.d.ts",
"dependencies": {
"bs58": "^5.0.0",
"date-and-time": "^2.4.1",
"multiformats": "^9.7.1",
"ethers": "^5.7.1",
"@lit-protocol/misc": "0.1.100",
"@lit-protocol/constants": "0.1.100",
"tslib": "^2.3.0"
}
}
"dependencies": {}
}

@@ -137,5 +137,5 @@ # Lit Protocol Contracts SDK (Typescript)

## gen-code.mjs
## fetch-contracts.mjs
This script automatically generates a `contracts-sdk.ts`. It does this by reading the file names from a specified directory, generating import statements and declarations based on those file names, and replacing certain sections of the contracts-sdk.ts file with the generated content.
This script fetches and processes ABI files for a set of deployed contracts. It writes the ABI files and contract data to the file system and runs a command to generate additional files based on the ABIs.

@@ -146,8 +146,8 @@ ```js

## fetch-contracts.mjs
## gen-code.mjs
This script fetches and processes ABI files for a set of deployed contracts. It writes the ABI files and contract data to the file system and runs a command to generate additional files based on the ABIs.
This script automatically generates a `contracts-sdk.ts`. It does this by reading the file names from a specified directory, generating import statements and declarations based on those file names, and replacing certain sections of the contracts-sdk.ts file with the generated content.
```js
node ./packages/contracts-sdk/tools.mjs --gen
```
```

@@ -27,2 +27,3 @@ import { ethers } from 'ethers';

signer: ethers.Signer;
privateKey: string | undefined;
accessControlConditionsContract: accessControlConditionsContract.ContractContext;

@@ -40,2 +41,3 @@ litTokenContract: litTokenContract.ContractContext;

signer?: ethers.Signer | any;
privateKey?: string | undefined;
});

@@ -42,0 +44,0 @@ /**

@@ -641,2 +641,3 @@ "use strict";

this.signer = args?.signer;
this.privateKey = args?.privateKey;
this.provider;

@@ -654,3 +655,3 @@ // if rpc is not specified, use the default rpc

// generate random private key
const privateKey = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.randomBytes(32));
const privateKey = this.privateKey ?? ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.randomBytes(32));
this.provider = new ethers_1.ethers.providers.JsonRpcProvider(this.rpc);

@@ -657,0 +658,0 @@ this.signer = new ethers_1.ethers.Wallet(privateKey, this.provider);

Sorry, the diff of this file is not supported yet