Skip to content

Commit fcc5757

Browse files
committed
feat: building fixes and cleanup
1 parent e0b7b66 commit fcc5757

File tree

17 files changed

+956
-563
lines changed

17 files changed

+956
-563
lines changed

local-tests/setup/tinny-environment.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1+
import { ethers, Signer } from 'ethers';
2+
3+
import {
4+
CENTRALISATION_BY_NETWORK,
5+
LIT_NETWORK,
6+
LIT_NETWORK_VALUES,
7+
RPC_URL_BY_NETWORK,
8+
} from '@lit-protocol/constants';
19
import { LitContracts } from '@lit-protocol/contracts-sdk';
210
import { LitNodeClient } from '@lit-protocol/lit-node-client';
311
import {
412
AuthSig,
13+
PRODUCT_IDS,
514
LitContractContext,
615
LitContractResolverContext,
716
} from '@lit-protocol/types';
8-
import { ProcessEnvs, TinnyEnvConfig } from './tinny-config';
9-
import { TinnyPerson } from './tinny-person';
1017

11-
import { createSiweMessage, generateAuthSig } from '@lit-protocol/auth-helpers';
12-
import {
13-
CENTRALISATION_BY_NETWORK,
14-
LIT_NETWORK,
15-
LIT_NETWORK_VALUES,
16-
PRODUCT_IDS,
17-
RPC_URL_BY_NETWORK,
18-
} from '@lit-protocol/constants';
19-
import { ethers, Signer } from 'ethers';
2018
import { ShivaClient, TestnetClient } from './shiva-client';
19+
import { ProcessEnvs, TinnyEnvConfig } from './tinny-config';
20+
import { TinnyPerson } from './tinny-person';
2121
import { toErrorWithMessage } from './tinny-utils';
2222

2323
console.log('checking env', process.env['DEBUG']);
@@ -49,7 +49,7 @@ export class TinnyEnvironment {
4949
DEBUG: process.env['DEBUG'] === 'true',
5050
REQUEST_PER_KILOSECOND:
5151
parseInt(process.env['REQUEST_PER_KILOSECOND']) ||
52-
(process.env['NETWORK'] as LIT_NETWORK_VALUES) === 'datil-dev'
52+
(process.env['NETWORK'] as LIT_NETWORK_VALUES) === LIT_NETWORK.NagaDev
5353
? 1
5454
: 200,
5555
LIT_RPC_URL: process.env['LIT_RPC_URL'],

local-tests/tests/testUseEoaSessionSigsToPkpSign.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ export const testUseEoaSessionSigsToPkpSign = async (
103103

104104
for (const signingSchemeConfig of signingSchemeConfigs) {
105105
try {
106-
107106
const signingScheme = signingSchemeConfig.signingScheme;
108107
log(`Checking testUseEoaSessionSigsToPkpSign for ${signingSchemeConfig}`);
109108
// const eoaSessionSigs = await getEoaSessionSigs(devEnv, alice);
@@ -187,7 +186,9 @@ export const testUseEoaSessionSigsToPkpSign = async (
187186
}
188187
}
189188

190-
const messageHash = signingSchemeConfig.hashesMessage ? hashLitMessage(signingScheme, alice.loveLetter) : alice.loveLetter;
189+
const messageHash = signingSchemeConfig.hashesMessage
190+
? hashLitMessage(signingScheme, alice.loveLetter)
191+
: alice.loveLetter;
191192
const messageHashHex = Buffer.from(messageHash).toString('hex');
192193
if (pkpSignature.signedData.replace('0x', '') !== messageHashHex) {
193194
throw new Error(

packages/constants/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export * from './lib/version';
33

44
// ----------- Constants -----------
55
export * from './lib/constants/constants';
6+
export * from './lib/constants/mappers';
67
export * from './lib/constants/endpoints';
78
export * from './lib/constants/curves';
89

packages/constants/src/lib/constants/mappers.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,3 @@ export const GLOBAL_OVERWRITE_IPFS_CODE_BY_NETWORK: {
2323
'naga-dev': false,
2424
custom: false,
2525
} as const;
26-
27-
/**
28-
* Product IDs used for price feed and node selection
29-
*
30-
* - DECRYPTION (0): Used for decryption operations
31-
* - SIGN (1): Used for signing operations
32-
* - LA (2): Used for Lit Actions execution
33-
*/
34-
export const PRODUCT_IDS = {
35-
DECRYPTION: 0, // For decryption operations
36-
SIGN: 1, // For signing operations
37-
LIT_ACTION: 2, // For Lit Actions execution
38-
} as const;

packages/contracts-sdk/src/lib/price-feed-info-manager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// import * as util from 'node:util'; // For inspecting bigInt payloads for pricing data
22

3-
import { HTTP, HTTPS, PRODUCT_IDS } from '@lit-protocol/constants';
3+
import { HTTP, HTTPS } from '@lit-protocol/constants';
44
import {
55
LIT_NETWORKS_KEYS,
66
LitContractContext,
77
LitContractResolverContext,
8+
PRODUCT_IDS,
89
} from '@lit-protocol/types';
910

1011
import { LitContracts } from './contracts-sdk';

packages/crypto/src/lib/crypto.spec.ts

Lines changed: 362 additions & 45 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)