@appliedblockchain/silentdatarollup-core 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BIZ7KJDG.mjs → chunk-XU34XEI3.mjs} +42 -12
- package/dist/index.d.mts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +42 -10
- package/dist/index.mjs +7 -1
- package/dist/tests.js +7 -0
- package/dist/tests.mjs +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,8 @@ var SIGN_RPC_METHODS = [
|
|
|
6
6
|
"eth_getTransactionByHash",
|
|
7
7
|
"eth_getTransactionCount",
|
|
8
8
|
"eth_getProof",
|
|
9
|
-
"eth_getTransactionReceipt"
|
|
9
|
+
"eth_getTransactionReceipt",
|
|
10
|
+
"eth_estimateGas"
|
|
10
11
|
];
|
|
11
12
|
var eip721Domain = {
|
|
12
13
|
name: "Silent Data [Rollup]",
|
|
@@ -495,20 +496,39 @@ var SilentDataRollupBase = class {
|
|
|
495
496
|
// src/contract.ts
|
|
496
497
|
import {
|
|
497
498
|
Contract as Contract2,
|
|
498
|
-
Interface
|
|
499
|
+
Interface,
|
|
500
|
+
assertArgument
|
|
499
501
|
} from "ethers";
|
|
500
502
|
var CustomContractRunner = class {
|
|
501
|
-
constructor(signer) {
|
|
502
|
-
this.provider =
|
|
503
|
+
constructor(provider, signer) {
|
|
504
|
+
this.provider = provider;
|
|
503
505
|
this.signer = signer;
|
|
504
506
|
}
|
|
505
507
|
async sendTransaction(tx) {
|
|
506
|
-
|
|
508
|
+
const signerAddress = await this.signer.getAddress();
|
|
509
|
+
const latestNonce = await this.provider.getTransactionCount(
|
|
510
|
+
signerAddress,
|
|
511
|
+
"latest"
|
|
512
|
+
);
|
|
513
|
+
tx.nonce = latestNonce;
|
|
507
514
|
return this.signer.sendTransaction(tx);
|
|
508
515
|
}
|
|
509
516
|
};
|
|
517
|
+
function getContractRunner(runner, provider) {
|
|
518
|
+
const runnerIsSigner = typeof runner.sendTransaction === "function";
|
|
519
|
+
if (!runnerIsSigner) {
|
|
520
|
+
return runner;
|
|
521
|
+
}
|
|
522
|
+
const runnerProviderConstructor = runner.provider?.constructor.name ?? "";
|
|
523
|
+
if (!runnerProviderConstructor.includes("SilentDataRollupProvider")) {
|
|
524
|
+
assertArgument(provider, "provider is mandatory", "provider", provider);
|
|
525
|
+
return new CustomContractRunner(provider, runner);
|
|
526
|
+
}
|
|
527
|
+
return new CustomContractRunner(runner.provider, runner);
|
|
528
|
+
}
|
|
510
529
|
var SilentDataRollupContract = class extends Contract2 {
|
|
511
|
-
constructor(
|
|
530
|
+
constructor(config) {
|
|
531
|
+
const { address, abi, runner, contractMethodsToSign, provider } = config;
|
|
512
532
|
const contractInterface = new Interface(abi);
|
|
513
533
|
contractMethodsToSign.forEach((method) => {
|
|
514
534
|
if (!contractInterface.hasFunction(method)) {
|
|
@@ -517,18 +537,25 @@ var SilentDataRollupContract = class extends Contract2 {
|
|
|
517
537
|
);
|
|
518
538
|
}
|
|
519
539
|
});
|
|
540
|
+
const contractRunner = getContractRunner(runner, provider);
|
|
541
|
+
super(address, abi, contractRunner);
|
|
520
542
|
const baseProvider = runner.baseProvider || runner.provider?.baseProvider;
|
|
521
|
-
const runnerIsSigner = typeof runner.sendTransaction === "function";
|
|
522
|
-
if (runnerIsSigner) {
|
|
523
|
-
runner = new CustomContractRunner(runner);
|
|
524
|
-
}
|
|
525
|
-
super(address, abi, runner);
|
|
526
543
|
if (typeof baseProvider?.setContract === "function") {
|
|
527
544
|
baseProvider.setContract(this, contractMethodsToSign);
|
|
528
545
|
}
|
|
529
546
|
}
|
|
530
547
|
};
|
|
531
548
|
|
|
549
|
+
// src/privateEvents.ts
|
|
550
|
+
import { keccak256, toUtf8Bytes } from "ethers";
|
|
551
|
+
var PRIVATE_EVENT_SIGNATURE = "PrivateEvent(address[],bytes32,bytes)";
|
|
552
|
+
var PRIVATE_EVENT_SIGNATURE_HASH = keccak256(
|
|
553
|
+
toUtf8Bytes(PRIVATE_EVENT_SIGNATURE)
|
|
554
|
+
);
|
|
555
|
+
function calculateEventTypeHash(eventSignature) {
|
|
556
|
+
return keccak256(toUtf8Bytes(eventSignature));
|
|
557
|
+
}
|
|
558
|
+
|
|
532
559
|
export {
|
|
533
560
|
SIGN_RPC_METHODS,
|
|
534
561
|
eip721Domain,
|
|
@@ -557,5 +584,8 @@ export {
|
|
|
557
584
|
defaultGetDelegate,
|
|
558
585
|
prepareTypedDataPayload,
|
|
559
586
|
SilentDataRollupBase,
|
|
560
|
-
SilentDataRollupContract
|
|
587
|
+
SilentDataRollupContract,
|
|
588
|
+
PRIVATE_EVENT_SIGNATURE,
|
|
589
|
+
PRIVATE_EVENT_SIGNATURE_HASH,
|
|
590
|
+
calculateEventTypeHash
|
|
561
591
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Signer, JsonRpcPayload,
|
|
1
|
+
import { Signer, JsonRpcPayload, InterfaceAbi, ContractRunner, Provider, Contract, TypedDataDomain, TypedDataField } from 'ethers';
|
|
2
2
|
|
|
3
3
|
declare const SIGN_RPC_METHODS: string[];
|
|
4
4
|
declare const eip721Domain: {
|
|
@@ -94,6 +94,13 @@ type DelegateHeaders = {
|
|
|
94
94
|
[HEADER_DELEGATE_SIGNATURE]?: string;
|
|
95
95
|
[HEADER_EIP712_DELEGATE_SIGNATURE]?: string;
|
|
96
96
|
};
|
|
97
|
+
type SilentDataRollupContractConfig = {
|
|
98
|
+
address: string;
|
|
99
|
+
abi: InterfaceAbi;
|
|
100
|
+
runner: ContractRunner;
|
|
101
|
+
contractMethodsToSign: string[];
|
|
102
|
+
provider?: Provider;
|
|
103
|
+
};
|
|
97
104
|
|
|
98
105
|
declare class SilentDataRollupBase {
|
|
99
106
|
config: BaseConfig;
|
|
@@ -158,7 +165,7 @@ declare class SilentDataRollupBase {
|
|
|
158
165
|
}
|
|
159
166
|
|
|
160
167
|
declare class SilentDataRollupContract extends Contract {
|
|
161
|
-
constructor(
|
|
168
|
+
constructor(config: SilentDataRollupContractConfig);
|
|
162
169
|
}
|
|
163
170
|
|
|
164
171
|
declare function getAuthEIP721Types(payload: JsonRpcPayload | JsonRpcPayload[]): {
|
|
@@ -202,4 +209,30 @@ declare function isSignableContractCall(payload: JsonRpcPayload, contractMethods
|
|
|
202
209
|
declare const defaultGetDelegate: (provider: any) => Promise<Signer>;
|
|
203
210
|
declare const prepareTypedDataPayload: (p: JsonRpcPayload) => AuthSignatureMessageRequest;
|
|
204
211
|
|
|
205
|
-
|
|
212
|
+
/**
|
|
213
|
+
* The standard signature for the PrivateEvent as emitted by contracts
|
|
214
|
+
*/
|
|
215
|
+
declare const PRIVATE_EVENT_SIGNATURE = "PrivateEvent(address[],bytes32,bytes)";
|
|
216
|
+
/**
|
|
217
|
+
* The keccak256 hash of the PrivateEvent signature
|
|
218
|
+
* Used for filtering logs by event signature
|
|
219
|
+
*/
|
|
220
|
+
declare const PRIVATE_EVENT_SIGNATURE_HASH: string;
|
|
221
|
+
/**
|
|
222
|
+
* Interface describing the shape of a PrivateEvent
|
|
223
|
+
*/
|
|
224
|
+
interface PrivateEvent {
|
|
225
|
+
allowedViewers: string[];
|
|
226
|
+
eventType: string;
|
|
227
|
+
payload: string;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Calculate the keccak256 hash of an event signature
|
|
231
|
+
* This is used to create the eventType parameter for PrivateEvent
|
|
232
|
+
*
|
|
233
|
+
* @param eventSignature - The event signature (e.g., "Transfer(address,address,uint256)")
|
|
234
|
+
* @returns The keccak256 hash of the event signature
|
|
235
|
+
*/
|
|
236
|
+
declare function calculateEventTypeHash(eventSignature: string): string;
|
|
237
|
+
|
|
238
|
+
export { type AuthHeaders, type AuthSignatureMessage, type AuthSignatureMessageRequest, type BaseConfig, ChainId, DEBUG_NAMESPACE, DEBUG_NAMESPACE_SILENTDATA_INTERCEPTOR, DEFAULT_DELEGATE_EXPIRES, DELEGATE_EXPIRATION_THRESHOLD_BUFFER, type DelegateConfig, type DelegateHeaders, type DelegateSignerMessage, HEADER_DELEGATE, HEADER_DELEGATE_SIGNATURE, HEADER_EIP712_DELEGATE_SIGNATURE, HEADER_EIP712_SIGNATURE, HEADER_SIGNATURE, HEADER_TIMESTAMP, NetworkName, PRIVATE_EVENT_SIGNATURE, PRIVATE_EVENT_SIGNATURE_HASH, type PrivateEvent, SIGN_RPC_METHODS, SignatureType, type SilentDataProviderOptions, SilentDataRollupBase, SilentDataRollupContract, type SilentDataRollupContractConfig, type SilentdataNetworkConfig, WHITELISTED_METHODS, calculateEventTypeHash, defaultGetDelegate, delegateEIP721Types, eip721Domain, getAuthEIP721Types, getAuthHeaders, isSignableContractCall, prepareTypedDataPayload, signAuthHeaderRawMessage, signAuthHeaderTypedData, signRawDelegateHeader, signTypedDelegateHeader };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Signer, JsonRpcPayload,
|
|
1
|
+
import { Signer, JsonRpcPayload, InterfaceAbi, ContractRunner, Provider, Contract, TypedDataDomain, TypedDataField } from 'ethers';
|
|
2
2
|
|
|
3
3
|
declare const SIGN_RPC_METHODS: string[];
|
|
4
4
|
declare const eip721Domain: {
|
|
@@ -94,6 +94,13 @@ type DelegateHeaders = {
|
|
|
94
94
|
[HEADER_DELEGATE_SIGNATURE]?: string;
|
|
95
95
|
[HEADER_EIP712_DELEGATE_SIGNATURE]?: string;
|
|
96
96
|
};
|
|
97
|
+
type SilentDataRollupContractConfig = {
|
|
98
|
+
address: string;
|
|
99
|
+
abi: InterfaceAbi;
|
|
100
|
+
runner: ContractRunner;
|
|
101
|
+
contractMethodsToSign: string[];
|
|
102
|
+
provider?: Provider;
|
|
103
|
+
};
|
|
97
104
|
|
|
98
105
|
declare class SilentDataRollupBase {
|
|
99
106
|
config: BaseConfig;
|
|
@@ -158,7 +165,7 @@ declare class SilentDataRollupBase {
|
|
|
158
165
|
}
|
|
159
166
|
|
|
160
167
|
declare class SilentDataRollupContract extends Contract {
|
|
161
|
-
constructor(
|
|
168
|
+
constructor(config: SilentDataRollupContractConfig);
|
|
162
169
|
}
|
|
163
170
|
|
|
164
171
|
declare function getAuthEIP721Types(payload: JsonRpcPayload | JsonRpcPayload[]): {
|
|
@@ -202,4 +209,30 @@ declare function isSignableContractCall(payload: JsonRpcPayload, contractMethods
|
|
|
202
209
|
declare const defaultGetDelegate: (provider: any) => Promise<Signer>;
|
|
203
210
|
declare const prepareTypedDataPayload: (p: JsonRpcPayload) => AuthSignatureMessageRequest;
|
|
204
211
|
|
|
205
|
-
|
|
212
|
+
/**
|
|
213
|
+
* The standard signature for the PrivateEvent as emitted by contracts
|
|
214
|
+
*/
|
|
215
|
+
declare const PRIVATE_EVENT_SIGNATURE = "PrivateEvent(address[],bytes32,bytes)";
|
|
216
|
+
/**
|
|
217
|
+
* The keccak256 hash of the PrivateEvent signature
|
|
218
|
+
* Used for filtering logs by event signature
|
|
219
|
+
*/
|
|
220
|
+
declare const PRIVATE_EVENT_SIGNATURE_HASH: string;
|
|
221
|
+
/**
|
|
222
|
+
* Interface describing the shape of a PrivateEvent
|
|
223
|
+
*/
|
|
224
|
+
interface PrivateEvent {
|
|
225
|
+
allowedViewers: string[];
|
|
226
|
+
eventType: string;
|
|
227
|
+
payload: string;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Calculate the keccak256 hash of an event signature
|
|
231
|
+
* This is used to create the eventType parameter for PrivateEvent
|
|
232
|
+
*
|
|
233
|
+
* @param eventSignature - The event signature (e.g., "Transfer(address,address,uint256)")
|
|
234
|
+
* @returns The keccak256 hash of the event signature
|
|
235
|
+
*/
|
|
236
|
+
declare function calculateEventTypeHash(eventSignature: string): string;
|
|
237
|
+
|
|
238
|
+
export { type AuthHeaders, type AuthSignatureMessage, type AuthSignatureMessageRequest, type BaseConfig, ChainId, DEBUG_NAMESPACE, DEBUG_NAMESPACE_SILENTDATA_INTERCEPTOR, DEFAULT_DELEGATE_EXPIRES, DELEGATE_EXPIRATION_THRESHOLD_BUFFER, type DelegateConfig, type DelegateHeaders, type DelegateSignerMessage, HEADER_DELEGATE, HEADER_DELEGATE_SIGNATURE, HEADER_EIP712_DELEGATE_SIGNATURE, HEADER_EIP712_SIGNATURE, HEADER_SIGNATURE, HEADER_TIMESTAMP, NetworkName, PRIVATE_EVENT_SIGNATURE, PRIVATE_EVENT_SIGNATURE_HASH, type PrivateEvent, SIGN_RPC_METHODS, SignatureType, type SilentDataProviderOptions, SilentDataRollupBase, SilentDataRollupContract, type SilentDataRollupContractConfig, type SilentdataNetworkConfig, WHITELISTED_METHODS, calculateEventTypeHash, defaultGetDelegate, delegateEIP721Types, eip721Domain, getAuthEIP721Types, getAuthHeaders, isSignableContractCall, prepareTypedDataPayload, signAuthHeaderRawMessage, signAuthHeaderTypedData, signRawDelegateHeader, signTypedDelegateHeader };
|
package/dist/index.js
CHANGED
|
@@ -42,11 +42,14 @@ __export(index_exports, {
|
|
|
42
42
|
HEADER_SIGNATURE: () => HEADER_SIGNATURE,
|
|
43
43
|
HEADER_TIMESTAMP: () => HEADER_TIMESTAMP,
|
|
44
44
|
NetworkName: () => NetworkName,
|
|
45
|
+
PRIVATE_EVENT_SIGNATURE: () => PRIVATE_EVENT_SIGNATURE,
|
|
46
|
+
PRIVATE_EVENT_SIGNATURE_HASH: () => PRIVATE_EVENT_SIGNATURE_HASH,
|
|
45
47
|
SIGN_RPC_METHODS: () => SIGN_RPC_METHODS,
|
|
46
48
|
SignatureType: () => SignatureType,
|
|
47
49
|
SilentDataRollupBase: () => SilentDataRollupBase,
|
|
48
50
|
SilentDataRollupContract: () => SilentDataRollupContract,
|
|
49
51
|
WHITELISTED_METHODS: () => WHITELISTED_METHODS,
|
|
52
|
+
calculateEventTypeHash: () => calculateEventTypeHash,
|
|
50
53
|
defaultGetDelegate: () => defaultGetDelegate,
|
|
51
54
|
delegateEIP721Types: () => delegateEIP721Types,
|
|
52
55
|
eip721Domain: () => eip721Domain,
|
|
@@ -69,7 +72,8 @@ var SIGN_RPC_METHODS = [
|
|
|
69
72
|
"eth_getTransactionByHash",
|
|
70
73
|
"eth_getTransactionCount",
|
|
71
74
|
"eth_getProof",
|
|
72
|
-
"eth_getTransactionReceipt"
|
|
75
|
+
"eth_getTransactionReceipt",
|
|
76
|
+
"eth_estimateGas"
|
|
73
77
|
];
|
|
74
78
|
var eip721Domain = {
|
|
75
79
|
name: "Silent Data [Rollup]",
|
|
@@ -558,17 +562,35 @@ var SilentDataRollupBase = class {
|
|
|
558
562
|
// src/contract.ts
|
|
559
563
|
var import_ethers2 = require("ethers");
|
|
560
564
|
var CustomContractRunner = class {
|
|
561
|
-
constructor(signer) {
|
|
562
|
-
this.provider =
|
|
565
|
+
constructor(provider, signer) {
|
|
566
|
+
this.provider = provider;
|
|
563
567
|
this.signer = signer;
|
|
564
568
|
}
|
|
565
569
|
async sendTransaction(tx) {
|
|
566
|
-
|
|
570
|
+
const signerAddress = await this.signer.getAddress();
|
|
571
|
+
const latestNonce = await this.provider.getTransactionCount(
|
|
572
|
+
signerAddress,
|
|
573
|
+
"latest"
|
|
574
|
+
);
|
|
575
|
+
tx.nonce = latestNonce;
|
|
567
576
|
return this.signer.sendTransaction(tx);
|
|
568
577
|
}
|
|
569
578
|
};
|
|
579
|
+
function getContractRunner(runner, provider) {
|
|
580
|
+
const runnerIsSigner = typeof runner.sendTransaction === "function";
|
|
581
|
+
if (!runnerIsSigner) {
|
|
582
|
+
return runner;
|
|
583
|
+
}
|
|
584
|
+
const runnerProviderConstructor = runner.provider?.constructor.name ?? "";
|
|
585
|
+
if (!runnerProviderConstructor.includes("SilentDataRollupProvider")) {
|
|
586
|
+
(0, import_ethers2.assertArgument)(provider, "provider is mandatory", "provider", provider);
|
|
587
|
+
return new CustomContractRunner(provider, runner);
|
|
588
|
+
}
|
|
589
|
+
return new CustomContractRunner(runner.provider, runner);
|
|
590
|
+
}
|
|
570
591
|
var SilentDataRollupContract = class extends import_ethers2.Contract {
|
|
571
|
-
constructor(
|
|
592
|
+
constructor(config) {
|
|
593
|
+
const { address, abi, runner, contractMethodsToSign, provider } = config;
|
|
572
594
|
const contractInterface = new import_ethers2.Interface(abi);
|
|
573
595
|
contractMethodsToSign.forEach((method) => {
|
|
574
596
|
if (!contractInterface.hasFunction(method)) {
|
|
@@ -577,17 +599,24 @@ var SilentDataRollupContract = class extends import_ethers2.Contract {
|
|
|
577
599
|
);
|
|
578
600
|
}
|
|
579
601
|
});
|
|
602
|
+
const contractRunner = getContractRunner(runner, provider);
|
|
603
|
+
super(address, abi, contractRunner);
|
|
580
604
|
const baseProvider = runner.baseProvider || runner.provider?.baseProvider;
|
|
581
|
-
const runnerIsSigner = typeof runner.sendTransaction === "function";
|
|
582
|
-
if (runnerIsSigner) {
|
|
583
|
-
runner = new CustomContractRunner(runner);
|
|
584
|
-
}
|
|
585
|
-
super(address, abi, runner);
|
|
586
605
|
if (typeof baseProvider?.setContract === "function") {
|
|
587
606
|
baseProvider.setContract(this, contractMethodsToSign);
|
|
588
607
|
}
|
|
589
608
|
}
|
|
590
609
|
};
|
|
610
|
+
|
|
611
|
+
// src/privateEvents.ts
|
|
612
|
+
var import_ethers3 = require("ethers");
|
|
613
|
+
var PRIVATE_EVENT_SIGNATURE = "PrivateEvent(address[],bytes32,bytes)";
|
|
614
|
+
var PRIVATE_EVENT_SIGNATURE_HASH = (0, import_ethers3.keccak256)(
|
|
615
|
+
(0, import_ethers3.toUtf8Bytes)(PRIVATE_EVENT_SIGNATURE)
|
|
616
|
+
);
|
|
617
|
+
function calculateEventTypeHash(eventSignature) {
|
|
618
|
+
return (0, import_ethers3.keccak256)((0, import_ethers3.toUtf8Bytes)(eventSignature));
|
|
619
|
+
}
|
|
591
620
|
// Annotate the CommonJS export names for ESM import in node:
|
|
592
621
|
0 && (module.exports = {
|
|
593
622
|
ChainId,
|
|
@@ -602,11 +631,14 @@ var SilentDataRollupContract = class extends import_ethers2.Contract {
|
|
|
602
631
|
HEADER_SIGNATURE,
|
|
603
632
|
HEADER_TIMESTAMP,
|
|
604
633
|
NetworkName,
|
|
634
|
+
PRIVATE_EVENT_SIGNATURE,
|
|
635
|
+
PRIVATE_EVENT_SIGNATURE_HASH,
|
|
605
636
|
SIGN_RPC_METHODS,
|
|
606
637
|
SignatureType,
|
|
607
638
|
SilentDataRollupBase,
|
|
608
639
|
SilentDataRollupContract,
|
|
609
640
|
WHITELISTED_METHODS,
|
|
641
|
+
calculateEventTypeHash,
|
|
610
642
|
defaultGetDelegate,
|
|
611
643
|
delegateEIP721Types,
|
|
612
644
|
eip721Domain,
|
package/dist/index.mjs
CHANGED
|
@@ -11,11 +11,14 @@ import {
|
|
|
11
11
|
HEADER_SIGNATURE,
|
|
12
12
|
HEADER_TIMESTAMP,
|
|
13
13
|
NetworkName,
|
|
14
|
+
PRIVATE_EVENT_SIGNATURE,
|
|
15
|
+
PRIVATE_EVENT_SIGNATURE_HASH,
|
|
14
16
|
SIGN_RPC_METHODS,
|
|
15
17
|
SignatureType,
|
|
16
18
|
SilentDataRollupBase,
|
|
17
19
|
SilentDataRollupContract,
|
|
18
20
|
WHITELISTED_METHODS,
|
|
21
|
+
calculateEventTypeHash,
|
|
19
22
|
defaultGetDelegate,
|
|
20
23
|
delegateEIP721Types,
|
|
21
24
|
eip721Domain,
|
|
@@ -27,7 +30,7 @@ import {
|
|
|
27
30
|
signAuthHeaderTypedData,
|
|
28
31
|
signRawDelegateHeader,
|
|
29
32
|
signTypedDelegateHeader
|
|
30
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-XU34XEI3.mjs";
|
|
31
34
|
export {
|
|
32
35
|
ChainId,
|
|
33
36
|
DEBUG_NAMESPACE,
|
|
@@ -41,11 +44,14 @@ export {
|
|
|
41
44
|
HEADER_SIGNATURE,
|
|
42
45
|
HEADER_TIMESTAMP,
|
|
43
46
|
NetworkName,
|
|
47
|
+
PRIVATE_EVENT_SIGNATURE,
|
|
48
|
+
PRIVATE_EVENT_SIGNATURE_HASH,
|
|
44
49
|
SIGN_RPC_METHODS,
|
|
45
50
|
SignatureType,
|
|
46
51
|
SilentDataRollupBase,
|
|
47
52
|
SilentDataRollupContract,
|
|
48
53
|
WHITELISTED_METHODS,
|
|
54
|
+
calculateEventTypeHash,
|
|
49
55
|
defaultGetDelegate,
|
|
50
56
|
delegateEIP721Types,
|
|
51
57
|
eip721Domain,
|
package/dist/tests.js
CHANGED
|
@@ -52,6 +52,13 @@ var log2 = (0, import_debug2.default)(DEBUG_NAMESPACE);
|
|
|
52
52
|
// src/contract.ts
|
|
53
53
|
var import_ethers2 = require("ethers");
|
|
54
54
|
|
|
55
|
+
// src/privateEvents.ts
|
|
56
|
+
var import_ethers3 = require("ethers");
|
|
57
|
+
var PRIVATE_EVENT_SIGNATURE = "PrivateEvent(address[],bytes32,bytes)";
|
|
58
|
+
var PRIVATE_EVENT_SIGNATURE_HASH = (0, import_ethers3.keccak256)(
|
|
59
|
+
(0, import_ethers3.toUtf8Bytes)(PRIVATE_EVENT_SIGNATURE)
|
|
60
|
+
);
|
|
61
|
+
|
|
55
62
|
// tests/utils/mocked-custom-grpc.ts
|
|
56
63
|
var import_http = __toESM(require("http"));
|
|
57
64
|
var currentPort = 3e3;
|
package/dist/tests.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appliedblockchain/silentdatarollup-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Core library for Silent Data [Rollup]",
|
|
5
5
|
"author": "Applied Blockchain",
|
|
6
6
|
"homepage": "https://github.com/appliedblockchain/silent-data-rollup-providers#readme",
|