@@ -83,12 +83,73 @@ import { testExecuteJsSignAndCombineEcdsa } from './tests/testExecuteJsSignAndCo
83
83
import { testExecutJsDecryptAndCombine } from './tests/testExecuteJsDecryptAndCombine' ;
84
84
import { testExecuteJsBroadcastAndCollect } from './tests/testExecuteJsBroadcastAndCollect' ;
85
85
86
+ import { testEthereumSignMessageGeneratedKey } from './tests/testEthereumSignMessageGeneratedKey' ;
87
+ import { testEthereumBroadcastTransactionGeneratedKey } from './tests/testEthereumBroadcastTransactionGeneratedKey' ;
88
+ import { testEthereumSignMessageWrappedKey } from './tests/testEthereumSignMessageWrappedKey' ;
89
+ import { testFailEthereumSignTransactionWrappedKeyInvalidDecryption } from './tests/testFailEthereumSignTransactionWrappedKeyInvalidDecryption' ;
90
+ import { testEthereumSignTransactionWrappedKey } from './tests/testEthereumSignTransactionWrappedKey' ;
91
+ import { testFailEthereumSignTransactionWrappedKeyWithInvalidParam } from './tests/testFailEthereumSignTransactionWrappedKeyWithInvalidParam' ;
92
+ import { testFailEthereumSignTransactionWrappedKeyWithMissingParam } from './tests/testFailEthereumSignTransactionWrappedKeyWithMissingParam' ;
93
+ import { testEthereumBroadcastTransactionWrappedKey } from './tests/testEthereumBroadcastTransactionWrappedKey' ;
94
+ import { testEthereumBroadcastWrappedKeyWithFetchGasParams } from './tests/testEthereumBroadcastWrappedKeyWithFetchGasParams' ;
95
+ import { testFailEthereumBroadcastTransactionWrappedKeysInsufficientFunds } from './tests/testFailEthereumBroadcastTransactionWrappedKeysInsufficientFunds' ;
96
+ import { testImportWrappedKey } from './tests/testImportWrappedKey' ;
97
+ import { testGenerateEthereumWrappedKey } from './tests/testGenerateEthereumWrappedKey' ;
98
+ import { testGenerateSolanaWrappedKey } from './tests/testGenerateSolanaWrappedKey' ;
99
+ import { testFailImportWrappedKeysWithSamePkp } from './tests/testFailImportWrappedKeysWithSamePkp' ;
100
+ import { testFailImportWrappedKeysWithSamePrivateKey } from './tests/testFailImportWrappedKeysWithSamePrivateKey' ;
101
+ import { testFailImportWrappedKeysWithEoaSessionSig } from './tests/testFailImportWrappedKeysWithEoaSessionSig' ;
102
+ import { testFailImportWrappedKeysWithMaxExpirySessionSig } from './tests/testFailImportWrappedKeysWithMaxExpirySessionSig' ;
103
+ import { testFailImportWrappedKeysWithInvalidSessionSig } from './tests/testFailImportWrappedKeysWithInvalidSessionSig' ;
104
+ import { testFailImportWrappedKeysWithExpiredSessionSig } from './tests/testFailImportWrappedKeysWithExpiredSessionSig' ;
105
+ import { testExportWrappedKey } from './tests/testExportWrappedKey' ;
106
+ import { testSignMessageWithSolanaEncryptedKey } from './tests/testSignMessageWithSolanaEncryptedKey' ;
107
+ import { testSignTransactionWithSolanaEncryptedKey } from './tests/testSignTransactionWithSolanaEncryptedKey' ;
108
+
86
109
( async ( ) => {
87
110
console . log ( '[𐬺🧪 Tinny𐬺] Running tests...' ) ;
88
111
const devEnv = new TinnyEnvironment ( ) ;
89
112
90
113
await devEnv . init ( ) ;
91
114
115
+ const wrappedKeysTests = {
116
+ // -- valid cases
117
+ testEthereumSignMessageGeneratedKey,
118
+ testEthereumBroadcastTransactionGeneratedKey,
119
+ testEthereumSignMessageWrappedKey,
120
+ testEthereumSignTransactionWrappedKey,
121
+ testEthereumBroadcastTransactionWrappedKey,
122
+ testEthereumBroadcastWrappedKeyWithFetchGasParams,
123
+
124
+ // -- generate wrapped keys
125
+ testGenerateEthereumWrappedKey,
126
+ testGenerateSolanaWrappedKey,
127
+
128
+ // -- import wrapped keys
129
+ testImportWrappedKey,
130
+
131
+ // -- export wrapped keys
132
+ testExportWrappedKey,
133
+
134
+ // -- solana wrapped keys
135
+ testSignMessageWithSolanaEncryptedKey,
136
+ testSignTransactionWithSolanaEncryptedKey,
137
+
138
+ // -- invalid cases
139
+ testFailEthereumSignTransactionWrappedKeyWithMissingParam,
140
+ testFailEthereumSignTransactionWrappedKeyWithInvalidParam,
141
+ testFailEthereumSignTransactionWrappedKeyInvalidDecryption,
142
+ testFailEthereumBroadcastTransactionWrappedKeysInsufficientFunds,
143
+
144
+ // -- import wrapped keys
145
+ testFailImportWrappedKeysWithSamePkp,
146
+ testFailImportWrappedKeysWithSamePrivateKey,
147
+ testFailImportWrappedKeysWithEoaSessionSig,
148
+ testFailImportWrappedKeysWithMaxExpirySessionSig,
149
+ testFailImportWrappedKeysWithInvalidSessionSig,
150
+ testFailImportWrappedKeysWithExpiredSessionSig,
151
+ } ;
152
+
92
153
const eoaSessionSigsTests = {
93
154
testUseEoaSessionSigsToExecuteJsSigning,
94
155
testUseEoaSessionSigsToPkpSign,
@@ -233,6 +294,8 @@ import { testExecuteJsBroadcastAndCollect } from './tests/testExecuteJsBroadcast
233
294
...litActionCombiningTests . broadcastAndCombine ,
234
295
...litActionCombiningTests . decryptAndCombine ,
235
296
...litActionCombiningTests . ecdsaSignAndCombine ,
297
+
298
+ ...wrappedKeysTests ,
236
299
} ,
237
300
devEnv,
238
301
} ;
0 commit comments