Skip to content

Commit 61c45b5

Browse files
committed
chore: remove cosmos and solana related code, and general clean up
1 parent a8454cf commit 61c45b5

File tree

23 files changed

+44
-1338
lines changed

23 files changed

+44
-1338
lines changed

local-tests/setup/tinny-environment.ts

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
import { ProcessEnvs, TinnyEnvConfig } from './tinny-config';
2-
import { LitNodeClient } from '@lit-protocol/lit-node-client';
31
import { LitContracts } from '@lit-protocol/contracts-sdk';
2+
import { LitNodeClient } from '@lit-protocol/lit-node-client';
43
import {
54
AuthSig,
6-
CosmosAuthSig,
75
LitContractContext,
86
LitContractResolverContext,
9-
SolanaAuthSig,
107
} from '@lit-protocol/types';
8+
import { ProcessEnvs, TinnyEnvConfig } from './tinny-config';
119
import { TinnyPerson } from './tinny-person';
1210

13-
import { ethers, Signer } from 'ethers';
1411
import { createSiweMessage, generateAuthSig } from '@lit-protocol/auth-helpers';
15-
import { ShivaClient, TestnetClient } from './shiva-client';
16-
import { toErrorWithMessage } from './tinny-utils';
1712
import {
1813
CENTRALISATION_BY_NETWORK,
1914
LIT_NETWORK,
2015
LIT_NETWORK_VALUES,
2116
PRODUCT_IDS,
2217
RPC_URL_BY_NETWORK,
2318
} from '@lit-protocol/constants';
19+
import { ethers, Signer } from 'ethers';
20+
import { ShivaClient, TestnetClient } from './shiva-client';
21+
import { toErrorWithMessage } from './tinny-utils';
2422

2523
console.log('checking env', process.env['DEBUG']);
2624

@@ -90,21 +88,6 @@ export class TinnyEnvironment {
9088
public rpc: string;
9189
public superCapacityDelegationAuthSig: AuthSig;
9290
public bareEthAuthSig: AuthSig;
93-
public bareSolAuthSig: SolanaAuthSig = {
94-
sig: '706047fcab06ada3cbfeb6990617c1705d59bafb20f5f1c8103d764fb5eaec297328d164e2b891095866b28acc1ab2df288a8729cf026228ef3c4970238b190a',
95-
derivedVia: 'solana.signMessage',
96-
signedMessage:
97-
'I am creating an account to use Lit Protocol at 2024-05-08T16:39:44.481Z',
98-
address: 'F7r6ENi6dqH8SnMYZdK3YxWAQ4cwfSNXZyMzbea5fbS1',
99-
};
100-
101-
public bareCosmosAuthSig: CosmosAuthSig = {
102-
sig: 'dE7J8oaWa8zECuMpaI/IVfJXGpLAO1paGLho+/dmtaQkN7Sh1lmJLAdYqZchDyYhQcg+nqfaoEOzLig3CPlosg==',
103-
derivedVia: 'cosmos.signArbitrary',
104-
signedMessage:
105-
'8c857343720203e3f52606409e6818284186a614e74026998f89e7417eed4d4b',
106-
address: 'cosmos14wp2s5kv07lt220rzfae57k73yv9z2azrmulku',
107-
};
10891

10992
public testnet: TestnetClient | undefined;
11093
//=========== PRIVATE MEMBERS ===========

local-tests/test.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ import { testUseValidLitActionCodeGeneratedSessionSigsToExecuteJsClaimMultipleKe
4141
import { testUseValidLitActionCodeGeneratedSessionSigsToExecuteJsConsoleLog } from './tests/testUseValidLitActionCodeGeneratedSessionSigsToExecuteJsConsoleLog';
4242
import { testUseValidLitActionCodeGeneratedSessionSigsToExecuteJsJsonResponse } from './tests/testUseValidLitActionCodeGeneratedSessionSigsToExecuteJsJsonResponse';
4343
import { testUseValidLitActionIpfsCodeGeneratedSessionSigsToPkpSign } from './tests/testUseValidLitActionIpfsCodeGeneratedSessionSigsToPkpSign';
44-
45-
// DISABLED until NAGA supports bare authsig for encryption_sign endpoint
46-
// import { testSolAuthSigToEncryptDecryptString } from './tests/testSolAuthSigToEncryptDecryptString';
47-
// import { testCosmosAuthSigToEncryptDecryptString } from './tests/testCosmosAuthSigToEncryptDecryptString';
48-
// import { testKeccakEip1271AuthSigToEncryptDecryptString } from './tests/testKeccakEip1271AuthSigToEncryptDecryptString';
49-
// import { testShaEip1271AuthSigToEncryptDecryptString } from './tests/testShaEip1271AuthSigToEncryptDecryptString';
50-
// import { testEthAuthSigToEncryptDecryptString } from './tests/testEthAuthSigToEncryptDecryptString';
51-
5244
import { testPkpEthersWithEoaSessionSigsToEthSign } from './tests/testPkpEthersWithEoaSessionSigsToEthSign';
5345
import { testPkpEthersWithEoaSessionSigsToEthSignTransaction } from './tests/testPkpEthersWithEoaSessionSigsToEthSignTransaction';
5446
import { testPkpEthersWithEoaSessionSigsToPersonalSign } from './tests/testPkpEthersWithEoaSessionSigsToPersonalSign';
@@ -218,17 +210,6 @@ setLitActionsCodeToLocal();
218210
testUseInvalidLitActionCodeToGenerateSessionSigs,
219211
};
220212

221-
// DISABLED until Naga supports bare authSig only for encyption_sign endpoint
222-
const bareAuthSigTests = {
223-
// -- eth auth sig
224-
// testEthAuthSigToEncryptDecryptString,
225-
// -- solana auth sig
226-
// testSolAuthSigToEncryptDecryptString,
227-
//
228-
// // -- cosmos auth sig
229-
// testCosmosAuthSigToEncryptDecryptString,
230-
};
231-
232213
const eip1271AuthSigTests = {
233214
// testKeccakEip1271AuthSigToEncryptDecryptString,
234215
// testShaEip1271AuthSigToEncryptDecryptString,
@@ -294,7 +275,6 @@ setLitActionsCodeToLocal();
294275
...pkpSessionSigsTests,
295276
...litActionSessionSigsTests,
296277
...litActionIpfsIdSessionSigsTests,
297-
...bareAuthSigTests,
298278
...eip1271AuthSigTests,
299279

300280
...pkpEthersTest.eoaSessionSigs,

local-tests/tests.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ import { testUseValidLitActionCodeGeneratedSessionSigsToExecuteJsConsoleLog } fr
3030
import { testUseValidLitActionCodeGeneratedSessionSigsToEncryptDecryptFile } from './tests/testUseValidLitActionCodeGeneratedSessionSigsToEncryptDecryptFile';
3131
import { testUseValidLitActionIpfsCodeGeneratedSessionSigsToPkpSign } from './tests/testUseValidLitActionIpfsCodeGeneratedSessionSigsToPkpSign';
3232
import { testUseInvalidLitActionIpfsCodeToGenerateSessionSigs } from './tests/testUseInvalidLitActionIpfsCodeToGenerateSessionSigs';
33-
import { testSolAuthSigToEncryptDecryptString } from './tests/testSolAuthSigToEncryptDecryptString';
34-
import { testEthAuthSigToEncryptDecryptString } from './tests/testEthAuthSigToEncryptDecryptString';
35-
import { testCosmosAuthSigToEncryptDecryptString } from './tests/testCosmosAuthSigToEncryptDecryptString';
3633
import { testPkpEthersWithEoaSessionSigsToSignMessage } from './tests/testPkpEthersWithEoaSessionSigsToSignMessage';
3734
import { testPkpEthersWithEoaSessionSigsToSignWithAuthContext } from './tests/testPkpEthersWithEoaSessionSigsToSignWithAuthContext';
3835
import { testPkpEthersWithEoaSessionSigsToEthSign } from './tests/testPkpEthersWithEoaSessionSigsToEthSign';

local-tests/tests/testCosmosAuthSigToEncryptDecryptString.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

local-tests/tests/testEthAuthSigToEncryptDecryptString.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)