Skip to content

Commit a2a57c2

Browse files
committed
feat: add triaAuthAndBatchGenerateEncryptedKeys
1 parent 2c193d0 commit a2a57c2

File tree

8 files changed

+26
-1
lines changed

8 files changed

+26
-1
lines changed

local-tests/tests/wrapped-keys/util.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import type {
1515

1616
const emptyLitActionRepositoryCommon: LitActionCodeRepositoryCommon = {
1717
batchGenerateEncryptedKeys: '',
18+
triaAuthAndBatchGenerateEncryptedKeys: '',
1819
};
1920

2021
const emptyLitActionRepository: LitActionCodeRepository = {

packages/wrapped-keys-lit-actions/esbuild.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858
'./src/lib/self-executing-actions/ethereum/generateEncryptedEthereumPrivateKey.js',
5959
'./src/lib/self-executing-actions/common/exportPrivateKey.js',
6060
'./src/lib/self-executing-actions/common/batchGenerateEncryptedKeys.js',
61+
'./src/lib/self-executing-actions/common/triaAuthAndBatchGenerateEncryptedKeys.js',
6162
],
6263
bundle: true,
6364
minify: true,

packages/wrapped-keys-lit-actions/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as batchGenerateEncryptedKeys from './generated/common/batchGenerateEncryptedKeys';
2+
import * as triaAuthAndBatchGenerateEncryptedKeys from './generated/common/triaAuthAndBatchGenerateEncryptedKeys';
23
import * as exportPrivateKey from './generated/common/exportPrivateKey';
34
import * as generateEncryptedEthereumPrivateKey from './generated/ethereum/generateEncryptedEthereumPrivateKey';
45
import * as signMessageWithEthereumEncryptedKey from './generated/ethereum/signMessageWithEncryptedEthereumKey';
@@ -34,6 +35,7 @@ const litActionRepository: LitActionCodeRepository = {
3435

3536
const litActionRepositoryCommon: LitActionCodeRepositoryCommon = {
3637
batchGenerateEncryptedKeys: batchGenerateEncryptedKeys.code,
38+
triaAuthAndBatchGenerateEncryptedKeys: triaAuthAndBatchGenerateEncryptedKeys.code,
3739
};
3840

3941
export {
@@ -43,6 +45,7 @@ export {
4345

4446
// Individual exports to allow tree-shaking and only importing the lit actions you need
4547
batchGenerateEncryptedKeys,
48+
triaAuthAndBatchGenerateEncryptedKeys,
4649
exportPrivateKey,
4750
generateEncryptedEthereumPrivateKey,
4851
signMessageWithEthereumEncryptedKey,

packages/wrapped-keys-lit-actions/src/lib/raw-action-functions/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
const {
22
batchGenerateEncryptedKeys,
33
} = require('./common/batchGenerateEncryptedKeys');
4+
const {
5+
triaAuthAndBatchGenerateEncryptedKeys
6+
} = require('./common/triaAuthAndBatchGenerateEncryptedKeys');
47
const { exportPrivateKey } = require('./common/exportPrivateKey');
58
const {
69
generateEncryptedEthereumPrivateKey,
@@ -24,6 +27,7 @@ const {
2427
export const rawActionFunctions = {
2528
exportPrivateKey,
2629
batchGenerateEncryptedKeys,
30+
triaAuthAndBatchGenerateEncryptedKeys,
2731
generateEncryptedEthereumPrivateKey,
2832
signMessageWithEncryptedEthereumKey,
2933
signTransactionWithEncryptedEthereumKey,
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { litActionHandler } from '../../litActionHandler';
2+
import { triaAuthAndBatchGenerateEncryptedKeys } from '../../raw-action-functions/common/triaAuthAndBatchGenerateEncryptedKeys';
3+
4+
/* global actions accessControlConditions triaParams*/
5+
(async () =>
6+
litActionHandler(async () =>
7+
triaAuthAndBatchGenerateEncryptedKeys({
8+
actions,
9+
accessControlConditions,
10+
triaParams,
11+
})
12+
))();

packages/wrapped-keys/src/lib/lit-actions-client/code-repository.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ function setLitActionsCode(repository: LitActionCodeRepositoryInput) {
8989
*/
9090
const litActionCodeRepositoryCommon: LitActionCodeRepositoryCommon = {
9191
batchGenerateEncryptedKeys: '',
92+
triaAuthAndBatchGenerateEncryptedKeys: '',
9293
};
9394

9495
function assertIsLitActionKeyCommon(

packages/wrapped-keys/src/lib/lit-actions-client/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const LIT_ACTION_CID_REPOSITORY: LitCidRepository = Object.freeze({
2121

2222
const LIT_ACTION_CID_REPOSITORY_COMMON: LitCidRepositoryCommon = Object.freeze({
2323
batchGenerateEncryptedKeys: 'QmR8Zs7ctSEctxBrSnAYhMXFXCC1ub8K1xvMn5Js3NCSAA',
24+
triaAuthAndBatchGenerateEncryptedKeys: 'xxx',
2425
});
2526

2627
export { LIT_ACTION_CID_REPOSITORY, LIT_ACTION_CID_REPOSITORY_COMMON };

packages/wrapped-keys/src/lib/lit-actions-client/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ export type LitActionType =
66
| 'generateEncryptedKey'
77
| 'exportPrivateKey';
88

9-
export type LitActionTypeCommon = 'batchGenerateEncryptedKeys';
9+
export type LitActionTypeCommon =
10+
'batchGenerateEncryptedKeys' |
11+
'triaAuthAndBatchGenerateEncryptedKeys';
1012

1113
export type LitCidRepositoryEntry = Readonly<Record<Network, string>>;
1214

0 commit comments

Comments
 (0)