@agirails/sdk 2.0.1-beta → 2.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/LICENSE +190 -0
- package/README.md +116 -108
- package/bin/actp +10 -0
- package/dist/ACTPClient.d.ts +456 -33
- package/dist/ACTPClient.d.ts.map +1 -1
- package/dist/ACTPClient.js +477 -93
- package/dist/ACTPClient.js.map +1 -1
- package/dist/abi/AgentRegistry.json +782 -0
- package/dist/abi/EscrowVault.json +106 -38
- package/dist/abi/IdentityRegistry.json +316 -0
- package/dist/adapters/BaseAdapter.d.ts +231 -0
- package/dist/adapters/BaseAdapter.d.ts.map +1 -0
- package/dist/adapters/BaseAdapter.js +393 -0
- package/dist/adapters/BaseAdapter.js.map +1 -0
- package/dist/adapters/BeginnerAdapter.d.ts +152 -0
- package/dist/adapters/BeginnerAdapter.d.ts.map +1 -0
- package/dist/adapters/BeginnerAdapter.js +168 -0
- package/dist/adapters/BeginnerAdapter.js.map +1 -0
- package/dist/adapters/IntermediateAdapter.d.ts +211 -0
- package/dist/adapters/IntermediateAdapter.d.ts.map +1 -0
- package/dist/adapters/IntermediateAdapter.js +260 -0
- package/dist/adapters/IntermediateAdapter.js.map +1 -0
- package/dist/adapters/index.d.ts +15 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +26 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/builders/DeliveryProofBuilder.d.ts +60 -1
- package/dist/builders/DeliveryProofBuilder.d.ts.map +1 -1
- package/dist/builders/DeliveryProofBuilder.js +81 -5
- package/dist/builders/DeliveryProofBuilder.js.map +1 -1
- package/dist/builders/QuoteBuilder.d.ts +101 -0
- package/dist/builders/QuoteBuilder.d.ts.map +1 -1
- package/dist/builders/QuoteBuilder.js +120 -3
- package/dist/builders/QuoteBuilder.js.map +1 -1
- package/dist/builders/index.d.ts +4 -0
- package/dist/builders/index.d.ts.map +1 -1
- package/dist/builders/index.js +4 -0
- package/dist/builders/index.js.map +1 -1
- package/dist/cli/commands/balance.d.ts +13 -0
- package/dist/cli/commands/balance.d.ts.map +1 -0
- package/dist/cli/commands/balance.js +89 -0
- package/dist/cli/commands/balance.js.map +1 -0
- package/dist/cli/commands/batch.d.ts +24 -0
- package/dist/cli/commands/batch.d.ts.map +1 -0
- package/dist/cli/commands/batch.js +424 -0
- package/dist/cli/commands/batch.js.map +1 -0
- package/dist/cli/commands/config.d.ts +13 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +192 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/init.d.ts +19 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +143 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/mint.d.ts +13 -0
- package/dist/cli/commands/mint.d.ts.map +1 -0
- package/dist/cli/commands/mint.js +91 -0
- package/dist/cli/commands/mint.js.map +1 -0
- package/dist/cli/commands/pay.d.ts +18 -0
- package/dist/cli/commands/pay.d.ts.map +1 -0
- package/dist/cli/commands/pay.js +87 -0
- package/dist/cli/commands/pay.js.map +1 -0
- package/dist/cli/commands/simulate.d.ts +32 -0
- package/dist/cli/commands/simulate.d.ts.map +1 -0
- package/dist/cli/commands/simulate.js +290 -0
- package/dist/cli/commands/simulate.js.map +1 -0
- package/dist/cli/commands/time.d.ts +29 -0
- package/dist/cli/commands/time.d.ts.map +1 -0
- package/dist/cli/commands/time.js +252 -0
- package/dist/cli/commands/time.js.map +1 -0
- package/dist/cli/commands/tx.d.ts +16 -0
- package/dist/cli/commands/tx.d.ts.map +1 -0
- package/dist/cli/commands/tx.js +379 -0
- package/dist/cli/commands/tx.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +20 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +160 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/index.d.ts +17 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +104 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/utils/client.d.ts +70 -0
- package/dist/cli/utils/client.d.ts.map +1 -0
- package/dist/cli/utils/client.js +240 -0
- package/dist/cli/utils/client.js.map +1 -0
- package/dist/cli/utils/config.d.ts +91 -0
- package/dist/cli/utils/config.d.ts.map +1 -0
- package/dist/cli/utils/config.js +240 -0
- package/dist/cli/utils/config.js.map +1 -0
- package/dist/cli/utils/output.d.ts +174 -0
- package/dist/cli/utils/output.d.ts.map +1 -0
- package/dist/cli/utils/output.js +380 -0
- package/dist/cli/utils/output.js.map +1 -0
- package/dist/config/networks.d.ts +28 -0
- package/dist/config/networks.d.ts.map +1 -1
- package/dist/config/networks.js +60 -12
- package/dist/config/networks.js.map +1 -1
- package/dist/errors/index.d.ts +165 -2
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +260 -2
- package/dist/errors/index.js.map +1 -1
- package/dist/index.d.ts +61 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +141 -36
- package/dist/index.js.map +1 -1
- package/dist/level0/Provider.d.ts +106 -0
- package/dist/level0/Provider.d.ts.map +1 -0
- package/dist/level0/Provider.js +10 -0
- package/dist/level0/Provider.js.map +1 -0
- package/dist/level0/ServiceDirectory.d.ts +74 -0
- package/dist/level0/ServiceDirectory.d.ts.map +1 -0
- package/dist/level0/ServiceDirectory.js +122 -0
- package/dist/level0/ServiceDirectory.js.map +1 -0
- package/dist/level0/index.d.ts +10 -0
- package/dist/level0/index.d.ts.map +1 -0
- package/dist/level0/index.js +15 -0
- package/dist/level0/index.js.map +1 -0
- package/dist/level0/provide.d.ts +51 -0
- package/dist/level0/provide.d.ts.map +1 -0
- package/dist/level0/provide.js +113 -0
- package/dist/level0/provide.js.map +1 -0
- package/dist/level0/request.d.ts +53 -0
- package/dist/level0/request.d.ts.map +1 -0
- package/dist/level0/request.js +462 -0
- package/dist/level0/request.js.map +1 -0
- package/dist/level1/Agent.d.ts +472 -0
- package/dist/level1/Agent.d.ts.map +1 -0
- package/dist/level1/Agent.js +1091 -0
- package/dist/level1/Agent.js.map +1 -0
- package/dist/level1/index.d.ts +10 -0
- package/dist/level1/index.d.ts.map +1 -0
- package/dist/level1/index.js +30 -0
- package/dist/level1/index.js.map +1 -0
- package/dist/level1/pricing/PriceCalculator.d.ts +62 -0
- package/dist/level1/pricing/PriceCalculator.d.ts.map +1 -0
- package/dist/level1/pricing/PriceCalculator.js +237 -0
- package/dist/level1/pricing/PriceCalculator.js.map +1 -0
- package/dist/level1/pricing/PricingStrategy.d.ts +179 -0
- package/dist/level1/pricing/PricingStrategy.d.ts.map +1 -0
- package/dist/level1/pricing/PricingStrategy.js +11 -0
- package/dist/level1/pricing/PricingStrategy.js.map +1 -0
- package/dist/level1/types/Job.d.ts +166 -0
- package/dist/level1/types/Job.d.ts.map +1 -0
- package/dist/level1/types/Job.js +11 -0
- package/dist/level1/types/Job.js.map +1 -0
- package/dist/level1/types/Options.d.ts +258 -0
- package/dist/level1/types/Options.d.ts.map +1 -0
- package/dist/level1/types/Options.js +8 -0
- package/dist/level1/types/Options.js.map +1 -0
- package/dist/level1/types/index.d.ts +8 -0
- package/dist/level1/types/index.d.ts.map +1 -0
- package/dist/level1/types/index.js +8 -0
- package/dist/level1/types/index.js.map +1 -0
- package/dist/protocol/ACTPKernel.d.ts +229 -2
- package/dist/protocol/ACTPKernel.d.ts.map +1 -1
- package/dist/protocol/ACTPKernel.js +367 -33
- package/dist/protocol/ACTPKernel.js.map +1 -1
- package/dist/protocol/AgentRegistry.d.ts +177 -0
- package/dist/protocol/AgentRegistry.d.ts.map +1 -0
- package/dist/protocol/AgentRegistry.js +449 -0
- package/dist/protocol/AgentRegistry.js.map +1 -0
- package/dist/protocol/DIDManager.d.ts +289 -0
- package/dist/protocol/DIDManager.d.ts.map +1 -0
- package/dist/protocol/DIDManager.js +481 -0
- package/dist/protocol/DIDManager.js.map +1 -0
- package/dist/protocol/DIDResolver.d.ts +236 -0
- package/dist/protocol/DIDResolver.d.ts.map +1 -0
- package/dist/protocol/DIDResolver.js +495 -0
- package/dist/protocol/DIDResolver.js.map +1 -0
- package/dist/protocol/EASHelper.d.ts +57 -2
- package/dist/protocol/EASHelper.d.ts.map +1 -1
- package/dist/protocol/EASHelper.js +230 -37
- package/dist/protocol/EASHelper.js.map +1 -1
- package/dist/protocol/EscrowVault.d.ts +93 -2
- package/dist/protocol/EscrowVault.d.ts.map +1 -1
- package/dist/protocol/EscrowVault.js +122 -33
- package/dist/protocol/EscrowVault.js.map +1 -1
- package/dist/protocol/EventMonitor.d.ts +45 -1
- package/dist/protocol/EventMonitor.d.ts.map +1 -1
- package/dist/protocol/EventMonitor.js +64 -8
- package/dist/protocol/EventMonitor.js.map +1 -1
- package/dist/protocol/MessageSigner.d.ts +116 -2
- package/dist/protocol/MessageSigner.d.ts.map +1 -1
- package/dist/protocol/MessageSigner.js +215 -9
- package/dist/protocol/MessageSigner.js.map +1 -1
- package/dist/protocol/ProofGenerator.d.ts +93 -0
- package/dist/protocol/ProofGenerator.d.ts.map +1 -1
- package/dist/protocol/ProofGenerator.js +194 -9
- package/dist/protocol/ProofGenerator.js.map +1 -1
- package/dist/protocol/QuoteBuilder.d.ts +8 -0
- package/dist/protocol/QuoteBuilder.d.ts.map +1 -1
- package/dist/protocol/QuoteBuilder.js +8 -0
- package/dist/protocol/QuoteBuilder.js.map +1 -1
- package/dist/runtime/BlockchainRuntime.d.ts +360 -0
- package/dist/runtime/BlockchainRuntime.d.ts.map +1 -0
- package/dist/runtime/BlockchainRuntime.js +767 -0
- package/dist/runtime/BlockchainRuntime.js.map +1 -0
- package/dist/runtime/IACTPRuntime.d.ts +271 -0
- package/dist/runtime/IACTPRuntime.d.ts.map +1 -0
- package/dist/runtime/IACTPRuntime.js +15 -0
- package/dist/runtime/IACTPRuntime.js.map +1 -0
- package/dist/runtime/MockRuntime.d.ts +445 -0
- package/dist/runtime/MockRuntime.d.ts.map +1 -0
- package/dist/runtime/MockRuntime.js +1065 -0
- package/dist/runtime/MockRuntime.js.map +1 -0
- package/dist/runtime/MockStateManager.d.ts +233 -0
- package/dist/runtime/MockStateManager.d.ts.map +1 -0
- package/dist/runtime/MockStateManager.js +533 -0
- package/dist/runtime/MockStateManager.js.map +1 -0
- package/dist/runtime/index.d.ts +14 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +42 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/types/MockState.d.ts +167 -0
- package/dist/runtime/types/MockState.d.ts.map +1 -0
- package/dist/runtime/types/MockState.js +43 -0
- package/dist/runtime/types/MockState.js.map +1 -0
- package/dist/types/agent.d.ts +76 -0
- package/dist/types/agent.d.ts.map +1 -0
- package/dist/types/agent.js +8 -0
- package/dist/types/agent.js.map +1 -0
- package/dist/types/did.d.ts +192 -0
- package/dist/types/did.d.ts.map +1 -0
- package/dist/types/did.js +38 -0
- package/dist/types/did.js.map +1 -0
- package/dist/types/eip712.d.ts +34 -0
- package/dist/types/eip712.d.ts.map +1 -1
- package/dist/types/eip712.js +31 -5
- package/dist/types/eip712.js.map +1 -1
- package/dist/types/escrow.d.ts +17 -10
- package/dist/types/escrow.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/message.d.ts +32 -0
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/message.js +4 -0
- package/dist/types/message.js.map +1 -1
- package/dist/types/state.d.ts +28 -0
- package/dist/types/state.d.ts.map +1 -1
- package/dist/types/state.js +37 -6
- package/dist/types/state.js.map +1 -1
- package/dist/types/transaction.d.ts +17 -0
- package/dist/types/transaction.d.ts.map +1 -1
- package/dist/utils/ErrorRecoveryGuide.d.ts +125 -0
- package/dist/utils/ErrorRecoveryGuide.d.ts.map +1 -0
- package/dist/utils/ErrorRecoveryGuide.js +579 -0
- package/dist/utils/ErrorRecoveryGuide.js.map +1 -0
- package/dist/utils/Helpers.d.ts +453 -0
- package/dist/utils/Helpers.d.ts.map +1 -0
- package/dist/utils/Helpers.js +623 -0
- package/dist/utils/Helpers.js.map +1 -0
- package/dist/utils/IPFSClient.d.ts +113 -0
- package/dist/utils/IPFSClient.d.ts.map +1 -1
- package/dist/utils/IPFSClient.js +128 -7
- package/dist/utils/IPFSClient.js.map +1 -1
- package/dist/utils/Logger.d.ts +195 -0
- package/dist/utils/Logger.d.ts.map +1 -0
- package/dist/utils/Logger.js +382 -0
- package/dist/utils/Logger.js.map +1 -0
- package/dist/utils/NonceManager.d.ts +234 -1
- package/dist/utils/NonceManager.d.ts.map +1 -1
- package/dist/utils/NonceManager.js +372 -7
- package/dist/utils/NonceManager.js.map +1 -1
- package/dist/utils/RateLimiter.d.ts +253 -0
- package/dist/utils/RateLimiter.d.ts.map +1 -0
- package/dist/utils/RateLimiter.js +424 -0
- package/dist/utils/RateLimiter.js.map +1 -0
- package/dist/utils/ReceivedNonceTracker.d.ts +175 -0
- package/dist/utils/ReceivedNonceTracker.d.ts.map +1 -1
- package/dist/utils/ReceivedNonceTracker.js +261 -5
- package/dist/utils/ReceivedNonceTracker.js.map +1 -1
- package/dist/utils/SDKLifecycle.d.ts +156 -0
- package/dist/utils/SDKLifecycle.d.ts.map +1 -0
- package/dist/utils/SDKLifecycle.js +347 -0
- package/dist/utils/SDKLifecycle.js.map +1 -0
- package/dist/utils/SecureNonce.d.ts +57 -0
- package/dist/utils/SecureNonce.d.ts.map +1 -0
- package/dist/utils/SecureNonce.js +80 -0
- package/dist/utils/SecureNonce.js.map +1 -0
- package/dist/utils/Semaphore.d.ts +123 -0
- package/dist/utils/Semaphore.d.ts.map +1 -0
- package/dist/utils/Semaphore.js +247 -0
- package/dist/utils/Semaphore.js.map +1 -0
- package/dist/utils/UsedAttestationTracker.d.ts +167 -0
- package/dist/utils/UsedAttestationTracker.d.ts.map +1 -0
- package/dist/utils/UsedAttestationTracker.js +309 -0
- package/dist/utils/UsedAttestationTracker.js.map +1 -0
- package/dist/utils/canonicalJson.d.ts +22 -0
- package/dist/utils/canonicalJson.d.ts.map +1 -1
- package/dist/utils/canonicalJson.js +26 -3
- package/dist/utils/canonicalJson.js.map +1 -1
- package/dist/utils/computeTypeHash.d.ts +14 -0
- package/dist/utils/computeTypeHash.d.ts.map +1 -1
- package/dist/utils/computeTypeHash.js +19 -2
- package/dist/utils/computeTypeHash.js.map +1 -1
- package/dist/utils/fsSafe.d.ts +14 -0
- package/dist/utils/fsSafe.d.ts.map +1 -0
- package/dist/utils/fsSafe.js +89 -0
- package/dist/utils/fsSafe.js.map +1 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +51 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/security.d.ts +147 -0
- package/dist/utils/security.d.ts.map +1 -0
- package/dist/utils/security.js +391 -0
- package/dist/utils/security.js.map +1 -0
- package/dist/utils/validation.d.ts +40 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +184 -7
- package/dist/utils/validation.js.map +1 -1
- package/package.json +54 -37
- package/src/ACTPClient.ts +692 -178
- package/src/abi/AgentRegistry.json +782 -0
- package/src/abi/EscrowVault.json +106 -38
- package/src/abi/IdentityRegistry.json +316 -0
- package/src/adapters/BaseAdapter.ts +473 -0
- package/src/adapters/BeginnerAdapter.ts +232 -0
- package/src/adapters/IntermediateAdapter.ts +316 -0
- package/src/adapters/index.ts +25 -0
- package/src/builders/DeliveryProofBuilder.ts +3 -2
- package/src/cli/commands/balance.ts +110 -0
- package/src/cli/commands/batch.ts +487 -0
- package/src/cli/commands/config.ts +231 -0
- package/src/cli/commands/init.ts +161 -0
- package/src/cli/commands/mint.ts +116 -0
- package/src/cli/commands/pay.ts +113 -0
- package/src/cli/commands/simulate.ts +345 -0
- package/src/cli/commands/time.ts +303 -0
- package/src/cli/commands/tx.ts +448 -0
- package/src/cli/commands/watch.ts +211 -0
- package/src/cli/index.ts +116 -0
- package/src/cli/utils/client.ts +249 -0
- package/src/cli/utils/config.ts +282 -0
- package/src/cli/utils/output.ts +465 -0
- package/src/config/networks.ts +32 -9
- package/src/errors/index.ts +298 -1
- package/src/index.ts +207 -71
- package/src/level0/Provider.ts +117 -0
- package/src/level0/ServiceDirectory.ts +131 -0
- package/src/level0/index.ts +10 -0
- package/src/level0/provide.ts +131 -0
- package/src/level0/request.ts +494 -0
- package/src/level1/Agent.ts +1432 -0
- package/src/level1/index.ts +10 -0
- package/src/level1/pricing/PriceCalculator.ts +255 -0
- package/src/level1/pricing/PricingStrategy.ts +198 -0
- package/src/level1/types/Job.ts +179 -0
- package/src/level1/types/Options.ts +291 -0
- package/src/level1/types/index.ts +8 -0
- package/src/protocol/ACTPKernel.ts +175 -23
- package/src/protocol/AgentRegistry.ts +559 -0
- package/src/protocol/DIDManager.ts +629 -0
- package/src/protocol/DIDResolver.ts +554 -0
- package/src/protocol/EASHelper.ts +230 -46
- package/src/protocol/EscrowVault.ts +68 -50
- package/src/protocol/EventMonitor.ts +44 -15
- package/src/protocol/MessageSigner.ts +193 -13
- package/src/protocol/ProofGenerator.ts +223 -4
- package/src/runtime/BlockchainRuntime.ts +993 -0
- package/src/runtime/IACTPRuntime.ts +284 -0
- package/src/runtime/MockRuntime.ts +1244 -0
- package/src/runtime/MockStateManager.ts +576 -0
- package/src/runtime/index.ts +25 -0
- package/src/runtime/types/MockState.ts +227 -0
- package/src/types/agent.ts +79 -0
- package/src/types/did.ts +223 -0
- package/src/types/escrow.ts +12 -11
- package/src/types/index.ts +5 -1
- package/src/types/state.ts +12 -3
- package/src/types/transaction.ts +4 -1
- package/src/utils/ErrorRecoveryGuide.ts +675 -0
- package/src/utils/Helpers.ts +688 -0
- package/src/utils/IPFSClient.ts +122 -5
- package/src/utils/Logger.ts +484 -0
- package/src/utils/NonceManager.ts +305 -8
- package/src/utils/RateLimiter.ts +534 -0
- package/src/utils/ReceivedNonceTracker.ts +170 -0
- package/src/utils/SDKLifecycle.ts +416 -0
- package/src/utils/SecureNonce.ts +78 -0
- package/src/utils/Semaphore.ts +276 -0
- package/src/utils/UsedAttestationTracker.ts +387 -0
- package/src/utils/fsSafe.ts +75 -0
- package/src/utils/index.ts +80 -0
- package/src/utils/security.ts +418 -0
- package/src/utils/validation.ts +164 -0
- package/src/__tests__/ProofGenerator.test.ts +0 -124
- package/src/__tests__/QuoteBuilder.test.ts +0 -516
- package/src/__tests__/StateMachine.test.ts +0 -82
- package/src/__tests__/builders/DeliveryProofBuilder.test.ts +0 -581
- package/src/__tests__/integration/ACTPClient.test.ts +0 -263
- package/src/__tests__/integration.test.ts +0 -289
- package/src/__tests__/protocol/EASHelper.test.ts +0 -472
- package/src/__tests__/protocol/EventMonitor.test.ts +0 -382
- package/src/__tests__/security/ACTPKernel.security.test.ts +0 -1167
- package/src/__tests__/security/EscrowVault.security.test.ts +0 -570
- package/src/__tests__/security/MessageSigner.security.test.ts +0 -286
- package/src/__tests__/security/NonceReplay.security.test.ts +0 -501
- package/src/__tests__/security/validation.security.test.ts +0 -376
- package/src/__tests__/utils/IPFSClient.test.ts +0 -262
- package/src/__tests__/utils/NonceManager.test.ts +0 -205
- package/src/__tests__/utils/canonicalJson.test.ts +0 -153
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EASHelper Test Suite
|
|
3
|
-
*
|
|
4
|
-
* Coverage Target: 80%+ (statements, functions, lines, branches)
|
|
5
|
-
*
|
|
6
|
-
* Test Categories:
|
|
7
|
-
* 1. Attestation Creation (3 tests)
|
|
8
|
-
* 2. Attestation Revocation (2 tests)
|
|
9
|
-
* 3. Attestation Retrieval (3 tests)
|
|
10
|
-
* 4. Attestation Verification (6 tests) - NEW: Security protection
|
|
11
|
-
*
|
|
12
|
-
* References:
|
|
13
|
-
* - EASHelper.ts implementation
|
|
14
|
-
* - Ethereum Attestation Service integration
|
|
15
|
-
* - Genetic Memory: EAS Uniqueness Model (HIGH severity)
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { Wallet, zeroPadValue, AbiCoder } from 'ethers';
|
|
19
|
-
import { EASHelper } from '../../protocol/EASHelper';
|
|
20
|
-
import { DeliveryProof } from '../../types';
|
|
21
|
-
|
|
22
|
-
// Test signer
|
|
23
|
-
const testPrivateKey = '0x' + '1'.repeat(64);
|
|
24
|
-
const testSigner = new Wallet(testPrivateKey);
|
|
25
|
-
|
|
26
|
-
// Mock EAS contract
|
|
27
|
-
const mockEASContract = {
|
|
28
|
-
attest: jest.fn(),
|
|
29
|
-
revoke: jest.fn(),
|
|
30
|
-
getAttestation: jest.fn(),
|
|
31
|
-
interface: {
|
|
32
|
-
parseLog: jest.fn()
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// Mock Contract constructor
|
|
37
|
-
jest.mock('ethers', () => {
|
|
38
|
-
const actual = jest.requireActual('ethers');
|
|
39
|
-
return {
|
|
40
|
-
...actual,
|
|
41
|
-
Contract: jest.fn().mockImplementation(() => mockEASContract)
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
// Test delivery proof
|
|
46
|
-
const testDeliveryProof: DeliveryProof = {
|
|
47
|
-
type: 'delivery.proof',
|
|
48
|
-
txId: '0x' + '1'.repeat(64),
|
|
49
|
-
contentHash: '0x' + '2'.repeat(64),
|
|
50
|
-
timestamp: Math.floor(Date.now() / 1000),
|
|
51
|
-
deliveryUrl: 'ipfs://QmTest123',
|
|
52
|
-
metadata: {
|
|
53
|
-
size: 1024,
|
|
54
|
-
mimeType: 'application/json'
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// Test EAS config
|
|
59
|
-
const testConfig = {
|
|
60
|
-
contractAddress: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
|
61
|
-
deliveryProofSchemaId: '0x' + '3'.repeat(64)
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
describe('EASHelper - Attestation Creation', () => {
|
|
65
|
-
let easHelper: EASHelper;
|
|
66
|
-
|
|
67
|
-
beforeEach(() => {
|
|
68
|
-
jest.clearAllMocks();
|
|
69
|
-
easHelper = new EASHelper(testSigner, testConfig);
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
it('should create attestation with default options', async () => {
|
|
73
|
-
const recipientAddress = '0x742d35cc6634c0532925a3b844bc9e7595f0beb0';
|
|
74
|
-
const mockAttestationUID = '0x' + '4'.repeat(64);
|
|
75
|
-
const mockTxHash = '0x' + '5'.repeat(64);
|
|
76
|
-
|
|
77
|
-
// Mock interface.parseLog to return uid
|
|
78
|
-
mockEASContract.interface.parseLog.mockReturnValue({
|
|
79
|
-
name: 'Attested',
|
|
80
|
-
args: {
|
|
81
|
-
uid: mockAttestationUID,
|
|
82
|
-
attester: testSigner.address,
|
|
83
|
-
schema: testConfig.deliveryProofSchemaId
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
mockEASContract.attest.mockResolvedValue({
|
|
88
|
-
wait: jest.fn().mockResolvedValue({
|
|
89
|
-
transactionHash: mockTxHash,
|
|
90
|
-
logs: [
|
|
91
|
-
{
|
|
92
|
-
// ethers v6: logs instead of events
|
|
93
|
-
topics: ['0x' + '6'.repeat(64)],
|
|
94
|
-
data: '0x'
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
})
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
const result = await easHelper.attestDeliveryProof(testDeliveryProof, recipientAddress);
|
|
101
|
-
|
|
102
|
-
expect(mockEASContract.attest).toHaveBeenCalledWith(
|
|
103
|
-
expect.objectContaining({
|
|
104
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
105
|
-
data: expect.objectContaining({
|
|
106
|
-
recipient: recipientAddress,
|
|
107
|
-
expirationTime: 0,
|
|
108
|
-
revocable: true,
|
|
109
|
-
refUID: testDeliveryProof.txId
|
|
110
|
-
})
|
|
111
|
-
})
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
expect(result).toEqual({
|
|
115
|
-
uid: mockAttestationUID,
|
|
116
|
-
transactionHash: mockTxHash
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it('should create attestation with custom options', async () => {
|
|
121
|
-
const recipientAddress = '0x742d35cc6634c0532925a3b844bc9e7595f0beb0';
|
|
122
|
-
const mockAttestationUID = '0x' + '4'.repeat(64);
|
|
123
|
-
const mockTxHash = '0x' + '5'.repeat(64);
|
|
124
|
-
const customExpirationTime = Math.floor(Date.now() / 1000) + 86400; // 24 hours
|
|
125
|
-
|
|
126
|
-
// Mock interface.parseLog to return uid
|
|
127
|
-
mockEASContract.interface.parseLog.mockReturnValue({
|
|
128
|
-
name: 'Attested',
|
|
129
|
-
args: {
|
|
130
|
-
uid: mockAttestationUID
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
mockEASContract.attest.mockResolvedValue({
|
|
135
|
-
wait: jest.fn().mockResolvedValue({
|
|
136
|
-
transactionHash: mockTxHash,
|
|
137
|
-
logs: [
|
|
138
|
-
{
|
|
139
|
-
// ethers v6: logs instead of events
|
|
140
|
-
topics: ['0x' + '6'.repeat(64)],
|
|
141
|
-
data: '0x'
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
})
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
const result = await easHelper.attestDeliveryProof(
|
|
148
|
-
testDeliveryProof,
|
|
149
|
-
recipientAddress,
|
|
150
|
-
{
|
|
151
|
-
expirationTime: customExpirationTime,
|
|
152
|
-
revocable: false
|
|
153
|
-
}
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
expect(mockEASContract.attest).toHaveBeenCalledWith(
|
|
157
|
-
expect.objectContaining({
|
|
158
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
159
|
-
data: expect.objectContaining({
|
|
160
|
-
recipient: recipientAddress,
|
|
161
|
-
expirationTime: customExpirationTime,
|
|
162
|
-
revocable: false,
|
|
163
|
-
refUID: testDeliveryProof.txId
|
|
164
|
-
})
|
|
165
|
-
})
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
expect(result.uid).toBe(mockAttestationUID);
|
|
169
|
-
expect(result.transactionHash).toBe(mockTxHash);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
it('should handle attestation creation with missing event', async () => {
|
|
173
|
-
const recipientAddress = '0x742d35cc6634c0532925a3b844bc9e7595f0beb0';
|
|
174
|
-
const mockTxHash = '0x' + '5'.repeat(64);
|
|
175
|
-
|
|
176
|
-
// Mock response with no Attested event (edge case)
|
|
177
|
-
mockEASContract.attest.mockResolvedValue({
|
|
178
|
-
wait: jest.fn().mockResolvedValue({
|
|
179
|
-
transactionHash: mockTxHash,
|
|
180
|
-
logs: [] // No logs
|
|
181
|
-
})
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
const result = await easHelper.attestDeliveryProof(testDeliveryProof, recipientAddress);
|
|
185
|
-
|
|
186
|
-
expect(result.uid).toBe(zeroPadValue('0x00', 32));
|
|
187
|
-
expect(result.transactionHash).toBe(mockTxHash);
|
|
188
|
-
});
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
describe('EASHelper - Attestation Revocation', () => {
|
|
192
|
-
let easHelper: EASHelper;
|
|
193
|
-
|
|
194
|
-
beforeEach(() => {
|
|
195
|
-
jest.clearAllMocks();
|
|
196
|
-
easHelper = new EASHelper(testSigner, testConfig);
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
it('should revoke attestation successfully', async () => {
|
|
200
|
-
const attestationUID = '0x' + '4'.repeat(64);
|
|
201
|
-
const mockTxHash = '0x' + '6'.repeat(64);
|
|
202
|
-
|
|
203
|
-
mockEASContract.revoke.mockResolvedValue({
|
|
204
|
-
wait: jest.fn().mockResolvedValue({
|
|
205
|
-
transactionHash: mockTxHash
|
|
206
|
-
})
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
const result = await easHelper.revokeAttestation(attestationUID);
|
|
210
|
-
|
|
211
|
-
expect(mockEASContract.revoke).toHaveBeenCalledWith({
|
|
212
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
213
|
-
uid: attestationUID
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
expect(result).toBe(mockTxHash);
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
it('should handle revocation errors', async () => {
|
|
220
|
-
const attestationUID = '0x' + '4'.repeat(64);
|
|
221
|
-
|
|
222
|
-
mockEASContract.revoke.mockRejectedValue(new Error('Attestation not found'));
|
|
223
|
-
|
|
224
|
-
await expect(easHelper.revokeAttestation(attestationUID)).rejects.toThrow('Attestation not found');
|
|
225
|
-
|
|
226
|
-
expect(mockEASContract.revoke).toHaveBeenCalledWith({
|
|
227
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
228
|
-
uid: attestationUID
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
describe('EASHelper - Attestation Retrieval', () => {
|
|
234
|
-
let easHelper: EASHelper;
|
|
235
|
-
|
|
236
|
-
beforeEach(() => {
|
|
237
|
-
jest.clearAllMocks();
|
|
238
|
-
easHelper = new EASHelper(testSigner, testConfig);
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
it('should get attestation data', async () => {
|
|
242
|
-
const attestationUID = '0x' + '4'.repeat(64);
|
|
243
|
-
const mockAttestationData = {
|
|
244
|
-
uid: attestationUID,
|
|
245
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
246
|
-
recipient: '0x742d35cc6634c0532925a3b844bc9e7595f0beb0',
|
|
247
|
-
attester: testSigner.address,
|
|
248
|
-
time: BigInt(Math.floor(Date.now() / 1000)),
|
|
249
|
-
expirationTime: BigInt(0),
|
|
250
|
-
revocable: true,
|
|
251
|
-
refUID: testDeliveryProof.txId,
|
|
252
|
-
data: '0x',
|
|
253
|
-
bump: 0
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
mockEASContract.getAttestation.mockResolvedValue(mockAttestationData);
|
|
257
|
-
|
|
258
|
-
const result = await easHelper.getAttestation(attestationUID);
|
|
259
|
-
|
|
260
|
-
expect(mockEASContract.getAttestation).toHaveBeenCalledWith(attestationUID);
|
|
261
|
-
expect(result).toEqual(mockAttestationData);
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
it('should handle non-existent attestation', async () => {
|
|
265
|
-
const attestationUID = '0x' + '4'.repeat(64);
|
|
266
|
-
|
|
267
|
-
mockEASContract.getAttestation.mockResolvedValue(null);
|
|
268
|
-
|
|
269
|
-
const result = await easHelper.getAttestation(attestationUID);
|
|
270
|
-
|
|
271
|
-
expect(result).toBeNull();
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
it('should verify attestation structure', async () => {
|
|
275
|
-
const attestationUID = '0x' + '4'.repeat(64);
|
|
276
|
-
const mockAttestationData = {
|
|
277
|
-
uid: attestationUID,
|
|
278
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
279
|
-
recipient: '0x742d35cc6634c0532925a3b844bc9e7595f0beb0',
|
|
280
|
-
attester: testSigner.address,
|
|
281
|
-
time: BigInt(Math.floor(Date.now() / 1000)),
|
|
282
|
-
expirationTime: BigInt(0),
|
|
283
|
-
revocable: true,
|
|
284
|
-
refUID: testDeliveryProof.txId,
|
|
285
|
-
data: '0x',
|
|
286
|
-
bump: 0
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
mockEASContract.getAttestation.mockResolvedValue(mockAttestationData);
|
|
290
|
-
|
|
291
|
-
const result = await easHelper.getAttestation(attestationUID);
|
|
292
|
-
|
|
293
|
-
expect(result).toHaveProperty('uid');
|
|
294
|
-
expect(result).toHaveProperty('schema');
|
|
295
|
-
expect(result).toHaveProperty('recipient');
|
|
296
|
-
expect(result).toHaveProperty('attester');
|
|
297
|
-
expect(result).toHaveProperty('time');
|
|
298
|
-
expect(result).toHaveProperty('expirationTime');
|
|
299
|
-
expect(result).toHaveProperty('revocable');
|
|
300
|
-
expect(result).toHaveProperty('refUID');
|
|
301
|
-
expect(result).toHaveProperty('data');
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
describe('EASHelper - Attestation Verification (Security)', () => {
|
|
306
|
-
let easHelper: EASHelper;
|
|
307
|
-
const validTxId = '0x' + '1'.repeat(64);
|
|
308
|
-
const validAttestationUID = '0x' + '4'.repeat(64);
|
|
309
|
-
|
|
310
|
-
beforeEach(() => {
|
|
311
|
-
jest.clearAllMocks();
|
|
312
|
-
easHelper = new EASHelper(testSigner, testConfig);
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
it('should verify valid attestation successfully', async () => {
|
|
316
|
-
// Properly encode attestation data matching the schema
|
|
317
|
-
const abiCoder = AbiCoder.defaultAbiCoder();
|
|
318
|
-
const encodedData = abiCoder.encode(
|
|
319
|
-
['bytes32', 'bytes32', 'uint256', 'string', 'uint256', 'string'],
|
|
320
|
-
[
|
|
321
|
-
validTxId, // txId - MUST match expected txId for verification to pass
|
|
322
|
-
'0x' + '2'.repeat(64), // contentHash
|
|
323
|
-
BigInt(Math.floor(Date.now() / 1000)), // timestamp
|
|
324
|
-
'ipfs://QmTest123', // deliveryUrl
|
|
325
|
-
BigInt(1024), // size
|
|
326
|
-
'application/json' // mimeType
|
|
327
|
-
]
|
|
328
|
-
);
|
|
329
|
-
|
|
330
|
-
const mockAttestationData = {
|
|
331
|
-
uid: validAttestationUID,
|
|
332
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
333
|
-
recipient: '0x742d35cc6634c0532925a3b844bc9e7595f0beb0',
|
|
334
|
-
attester: testSigner.address,
|
|
335
|
-
time: BigInt(Math.floor(Date.now() / 1000)),
|
|
336
|
-
expirationTime: BigInt(0), // No expiration
|
|
337
|
-
revocationTime: BigInt(0), // Not revoked
|
|
338
|
-
revocable: true,
|
|
339
|
-
refUID: testDeliveryProof.txId,
|
|
340
|
-
data: encodedData, // Properly encoded data
|
|
341
|
-
bump: 0
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
// Mock getAttestation to return valid data
|
|
345
|
-
mockEASContract.getAttestation.mockResolvedValue(mockAttestationData);
|
|
346
|
-
|
|
347
|
-
const result = await easHelper.verifyDeliveryAttestation(validTxId, validAttestationUID);
|
|
348
|
-
|
|
349
|
-
expect(result).toBe(true);
|
|
350
|
-
expect(mockEASContract.getAttestation).toHaveBeenCalledWith(validAttestationUID);
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
it('should throw error if attestation not found', async () => {
|
|
354
|
-
// Mock attestation with different UID (not found scenario)
|
|
355
|
-
const mockAttestationData = {
|
|
356
|
-
uid: '0x' + '9'.repeat(64), // Different UID
|
|
357
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
358
|
-
recipient: '0x742d35cc6634c0532925a3b844bc9e7595f0beb0',
|
|
359
|
-
attester: testSigner.address,
|
|
360
|
-
time: BigInt(Math.floor(Date.now() / 1000)),
|
|
361
|
-
expirationTime: BigInt(0),
|
|
362
|
-
revocationTime: BigInt(0),
|
|
363
|
-
revocable: true,
|
|
364
|
-
refUID: validTxId,
|
|
365
|
-
data: '0x',
|
|
366
|
-
bump: 0
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
mockEASContract.getAttestation.mockResolvedValue(mockAttestationData);
|
|
370
|
-
|
|
371
|
-
await expect(
|
|
372
|
-
easHelper.verifyDeliveryAttestation(validTxId, validAttestationUID)
|
|
373
|
-
).rejects.toThrow('Attestation not found');
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
it('should throw error if attestation is revoked', async () => {
|
|
377
|
-
const revokedTime = BigInt(Math.floor(Date.now() / 1000));
|
|
378
|
-
|
|
379
|
-
const mockAttestationData = {
|
|
380
|
-
uid: validAttestationUID,
|
|
381
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
382
|
-
recipient: '0x742d35cc6634c0532925a3b844bc9e7595f0beb0',
|
|
383
|
-
attester: testSigner.address,
|
|
384
|
-
time: BigInt(Math.floor(Date.now() / 1000)),
|
|
385
|
-
expirationTime: BigInt(0),
|
|
386
|
-
revocationTime: revokedTime, // REVOKED!
|
|
387
|
-
revocable: true,
|
|
388
|
-
refUID: validTxId,
|
|
389
|
-
data: '0x',
|
|
390
|
-
bump: 0
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
mockEASContract.getAttestation.mockResolvedValue(mockAttestationData);
|
|
394
|
-
|
|
395
|
-
await expect(
|
|
396
|
-
easHelper.verifyDeliveryAttestation(validTxId, validAttestationUID)
|
|
397
|
-
).rejects.toThrow(/Attestation has been revoked/);
|
|
398
|
-
});
|
|
399
|
-
|
|
400
|
-
it('should throw error if attestation has expired', async () => {
|
|
401
|
-
const pastTimestamp = BigInt(Math.floor(Date.now() / 1000) - 86400); // 24 hours ago
|
|
402
|
-
|
|
403
|
-
const mockAttestationData = {
|
|
404
|
-
uid: validAttestationUID,
|
|
405
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
406
|
-
recipient: '0x742d35cc6634c0532925a3b844bc9e7595f0beb0',
|
|
407
|
-
attester: testSigner.address,
|
|
408
|
-
time: BigInt(Math.floor(Date.now() / 1000)),
|
|
409
|
-
expirationTime: pastTimestamp, // EXPIRED!
|
|
410
|
-
revocationTime: BigInt(0),
|
|
411
|
-
revocable: true,
|
|
412
|
-
refUID: validTxId,
|
|
413
|
-
data: '0x',
|
|
414
|
-
bump: 0
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
mockEASContract.getAttestation.mockResolvedValue(mockAttestationData);
|
|
418
|
-
|
|
419
|
-
await expect(
|
|
420
|
-
easHelper.verifyDeliveryAttestation(validTxId, validAttestationUID)
|
|
421
|
-
).rejects.toThrow(/Attestation has expired/);
|
|
422
|
-
});
|
|
423
|
-
|
|
424
|
-
it('should throw error if attestation txId does not match (integration test required)', async () => {
|
|
425
|
-
// This test validates the CRITICAL security check: attestation.txId must match expected txId
|
|
426
|
-
// Testing this requires mocking AbiCoder.decode() to return a different txId
|
|
427
|
-
// This is covered by integration tests (scripts/test-eas-multiple-attestations.ts)
|
|
428
|
-
// where we create real attestations with different txIds and verify rejection
|
|
429
|
-
|
|
430
|
-
// SECURITY TEST: Provider attempting to use attestation from different transaction
|
|
431
|
-
// Expected behavior: verifyDeliveryAttestation() should throw:
|
|
432
|
-
// "Attestation txId mismatch: expected 0x111...111, got 0x777...777. Provider may be attempting..."
|
|
433
|
-
|
|
434
|
-
expect(true).toBe(true); // Placeholder - integration test validates this
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
it('should accept attestation with no expiration (expirationTime = 0)', async () => {
|
|
438
|
-
// Properly encode attestation data
|
|
439
|
-
const abiCoder = AbiCoder.defaultAbiCoder();
|
|
440
|
-
const encodedData = abiCoder.encode(
|
|
441
|
-
['bytes32', 'bytes32', 'uint256', 'string', 'uint256', 'string'],
|
|
442
|
-
[
|
|
443
|
-
validTxId, // txId
|
|
444
|
-
'0x' + '2'.repeat(64), // contentHash
|
|
445
|
-
BigInt(Math.floor(Date.now() / 1000)), // timestamp
|
|
446
|
-
'ipfs://QmTest456', // deliveryUrl
|
|
447
|
-
BigInt(2048), // size
|
|
448
|
-
'text/plain' // mimeType
|
|
449
|
-
]
|
|
450
|
-
);
|
|
451
|
-
|
|
452
|
-
const mockAttestationData = {
|
|
453
|
-
uid: validAttestationUID,
|
|
454
|
-
schema: testConfig.deliveryProofSchemaId,
|
|
455
|
-
recipient: '0x742d35cc6634c0532925a3b844bc9e7595f0beb0',
|
|
456
|
-
attester: testSigner.address,
|
|
457
|
-
time: BigInt(Math.floor(Date.now() / 1000)),
|
|
458
|
-
expirationTime: BigInt(0), // No expiration - valid forever
|
|
459
|
-
revocationTime: BigInt(0),
|
|
460
|
-
revocable: true,
|
|
461
|
-
refUID: validTxId,
|
|
462
|
-
data: encodedData, // Properly encoded
|
|
463
|
-
bump: 0
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
mockEASContract.getAttestation.mockResolvedValue(mockAttestationData);
|
|
467
|
-
|
|
468
|
-
const result = await easHelper.verifyDeliveryAttestation(validTxId, validAttestationUID);
|
|
469
|
-
|
|
470
|
-
expect(result).toBe(true);
|
|
471
|
-
});
|
|
472
|
-
});
|