@agirails/sdk 2.0.0 → 2.0.1-beta
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/README.md +108 -116
- package/dist/ACTPClient.d.ts +33 -456
- package/dist/ACTPClient.d.ts.map +1 -1
- package/dist/ACTPClient.js +93 -477
- package/dist/ACTPClient.js.map +1 -1
- package/dist/abi/EscrowVault.json +38 -106
- package/dist/builders/DeliveryProofBuilder.d.ts +1 -60
- package/dist/builders/DeliveryProofBuilder.d.ts.map +1 -1
- package/dist/builders/DeliveryProofBuilder.js +5 -81
- package/dist/builders/DeliveryProofBuilder.js.map +1 -1
- package/dist/builders/QuoteBuilder.d.ts +0 -101
- package/dist/builders/QuoteBuilder.d.ts.map +1 -1
- package/dist/builders/QuoteBuilder.js +3 -120
- package/dist/builders/QuoteBuilder.js.map +1 -1
- package/dist/builders/index.d.ts +0 -4
- package/dist/builders/index.d.ts.map +1 -1
- package/dist/builders/index.js +0 -4
- package/dist/builders/index.js.map +1 -1
- package/dist/config/networks.d.ts +0 -28
- package/dist/config/networks.d.ts.map +1 -1
- package/dist/config/networks.js +12 -60
- package/dist/config/networks.js.map +1 -1
- package/dist/errors/index.d.ts +2 -165
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +2 -260
- package/dist/errors/index.js.map +1 -1
- package/dist/index.d.ts +13 -61
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -141
- package/dist/index.js.map +1 -1
- package/dist/protocol/ACTPKernel.d.ts +2 -229
- package/dist/protocol/ACTPKernel.d.ts.map +1 -1
- package/dist/protocol/ACTPKernel.js +33 -367
- package/dist/protocol/ACTPKernel.js.map +1 -1
- package/dist/protocol/EASHelper.d.ts +2 -57
- package/dist/protocol/EASHelper.d.ts.map +1 -1
- package/dist/protocol/EASHelper.js +37 -230
- package/dist/protocol/EASHelper.js.map +1 -1
- package/dist/protocol/EscrowVault.d.ts +2 -93
- package/dist/protocol/EscrowVault.d.ts.map +1 -1
- package/dist/protocol/EscrowVault.js +33 -122
- package/dist/protocol/EscrowVault.js.map +1 -1
- package/dist/protocol/EventMonitor.d.ts +1 -45
- package/dist/protocol/EventMonitor.d.ts.map +1 -1
- package/dist/protocol/EventMonitor.js +8 -64
- package/dist/protocol/EventMonitor.js.map +1 -1
- package/dist/protocol/MessageSigner.d.ts +2 -116
- package/dist/protocol/MessageSigner.d.ts.map +1 -1
- package/dist/protocol/MessageSigner.js +9 -215
- package/dist/protocol/MessageSigner.js.map +1 -1
- package/dist/protocol/ProofGenerator.d.ts +0 -93
- package/dist/protocol/ProofGenerator.d.ts.map +1 -1
- package/dist/protocol/ProofGenerator.js +9 -194
- package/dist/protocol/ProofGenerator.js.map +1 -1
- package/dist/protocol/QuoteBuilder.d.ts +0 -8
- package/dist/protocol/QuoteBuilder.d.ts.map +1 -1
- package/dist/protocol/QuoteBuilder.js +0 -8
- package/dist/protocol/QuoteBuilder.js.map +1 -1
- package/dist/types/eip712.d.ts +0 -34
- package/dist/types/eip712.d.ts.map +1 -1
- package/dist/types/eip712.js +5 -31
- package/dist/types/eip712.js.map +1 -1
- package/dist/types/escrow.d.ts +10 -17
- package/dist/types/escrow.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -8
- package/dist/types/index.js.map +1 -1
- package/dist/types/message.d.ts +0 -32
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/message.js +0 -4
- package/dist/types/message.js.map +1 -1
- package/dist/types/state.d.ts +0 -28
- package/dist/types/state.d.ts.map +1 -1
- package/dist/types/state.js +6 -37
- package/dist/types/state.js.map +1 -1
- package/dist/types/transaction.d.ts +0 -17
- package/dist/types/transaction.d.ts.map +1 -1
- package/dist/utils/IPFSClient.d.ts +0 -113
- package/dist/utils/IPFSClient.d.ts.map +1 -1
- package/dist/utils/IPFSClient.js +7 -128
- package/dist/utils/IPFSClient.js.map +1 -1
- package/dist/utils/NonceManager.d.ts +1 -234
- package/dist/utils/NonceManager.d.ts.map +1 -1
- package/dist/utils/NonceManager.js +7 -372
- package/dist/utils/NonceManager.js.map +1 -1
- package/dist/utils/ReceivedNonceTracker.d.ts +0 -175
- package/dist/utils/ReceivedNonceTracker.d.ts.map +1 -1
- package/dist/utils/ReceivedNonceTracker.js +5 -261
- package/dist/utils/ReceivedNonceTracker.js.map +1 -1
- package/dist/utils/canonicalJson.d.ts +0 -22
- package/dist/utils/canonicalJson.d.ts.map +1 -1
- package/dist/utils/canonicalJson.js +3 -26
- package/dist/utils/canonicalJson.js.map +1 -1
- package/dist/utils/computeTypeHash.d.ts +0 -14
- package/dist/utils/computeTypeHash.d.ts.map +1 -1
- package/dist/utils/computeTypeHash.js +2 -19
- package/dist/utils/computeTypeHash.js.map +1 -1
- package/dist/utils/validation.d.ts +0 -40
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +7 -184
- package/dist/utils/validation.js.map +1 -1
- package/package.json +37 -54
- package/src/ACTPClient.ts +178 -692
- package/src/__tests__/ProofGenerator.test.ts +124 -0
- package/src/__tests__/QuoteBuilder.test.ts +516 -0
- package/src/__tests__/StateMachine.test.ts +82 -0
- package/src/__tests__/builders/DeliveryProofBuilder.test.ts +581 -0
- package/src/__tests__/integration/ACTPClient.test.ts +263 -0
- package/src/__tests__/integration.test.ts +289 -0
- package/src/__tests__/protocol/EASHelper.test.ts +472 -0
- package/src/__tests__/protocol/EventMonitor.test.ts +382 -0
- package/src/__tests__/security/ACTPKernel.security.test.ts +1167 -0
- package/src/__tests__/security/EscrowVault.security.test.ts +570 -0
- package/src/__tests__/security/MessageSigner.security.test.ts +286 -0
- package/src/__tests__/security/NonceReplay.security.test.ts +501 -0
- package/src/__tests__/security/validation.security.test.ts +376 -0
- package/src/__tests__/utils/IPFSClient.test.ts +262 -0
- package/src/__tests__/utils/NonceManager.test.ts +205 -0
- package/src/__tests__/utils/canonicalJson.test.ts +153 -0
- package/src/abi/EscrowVault.json +38 -106
- package/src/builders/DeliveryProofBuilder.ts +2 -3
- package/src/config/networks.ts +9 -32
- package/src/errors/index.ts +1 -298
- package/src/index.ts +71 -207
- package/src/protocol/ACTPKernel.ts +23 -175
- package/src/protocol/EASHelper.ts +46 -230
- package/src/protocol/EscrowVault.ts +50 -68
- package/src/protocol/EventMonitor.ts +15 -44
- package/src/protocol/MessageSigner.ts +13 -193
- package/src/protocol/ProofGenerator.ts +4 -223
- package/src/types/escrow.ts +11 -12
- package/src/types/index.ts +1 -5
- package/src/types/state.ts +3 -12
- package/src/types/transaction.ts +1 -4
- package/src/utils/IPFSClient.ts +5 -122
- package/src/utils/NonceManager.ts +8 -305
- package/src/utils/ReceivedNonceTracker.ts +0 -170
- package/src/utils/validation.ts +0 -164
- package/LICENSE +0 -190
- package/bin/actp +0 -10
- package/dist/abi/AgentRegistry.json +0 -782
- package/dist/abi/IdentityRegistry.json +0 -316
- package/dist/adapters/BaseAdapter.d.ts +0 -231
- package/dist/adapters/BaseAdapter.d.ts.map +0 -1
- package/dist/adapters/BaseAdapter.js +0 -393
- package/dist/adapters/BaseAdapter.js.map +0 -1
- package/dist/adapters/BeginnerAdapter.d.ts +0 -152
- package/dist/adapters/BeginnerAdapter.d.ts.map +0 -1
- package/dist/adapters/BeginnerAdapter.js +0 -168
- package/dist/adapters/BeginnerAdapter.js.map +0 -1
- package/dist/adapters/IntermediateAdapter.d.ts +0 -211
- package/dist/adapters/IntermediateAdapter.d.ts.map +0 -1
- package/dist/adapters/IntermediateAdapter.js +0 -260
- package/dist/adapters/IntermediateAdapter.js.map +0 -1
- package/dist/adapters/index.d.ts +0 -15
- package/dist/adapters/index.d.ts.map +0 -1
- package/dist/adapters/index.js +0 -26
- package/dist/adapters/index.js.map +0 -1
- package/dist/cli/commands/balance.d.ts +0 -13
- package/dist/cli/commands/balance.d.ts.map +0 -1
- package/dist/cli/commands/balance.js +0 -89
- package/dist/cli/commands/balance.js.map +0 -1
- package/dist/cli/commands/batch.d.ts +0 -24
- package/dist/cli/commands/batch.d.ts.map +0 -1
- package/dist/cli/commands/batch.js +0 -424
- package/dist/cli/commands/batch.js.map +0 -1
- package/dist/cli/commands/config.d.ts +0 -13
- package/dist/cli/commands/config.d.ts.map +0 -1
- package/dist/cli/commands/config.js +0 -192
- package/dist/cli/commands/config.js.map +0 -1
- package/dist/cli/commands/init.d.ts +0 -19
- package/dist/cli/commands/init.d.ts.map +0 -1
- package/dist/cli/commands/init.js +0 -143
- package/dist/cli/commands/init.js.map +0 -1
- package/dist/cli/commands/mint.d.ts +0 -13
- package/dist/cli/commands/mint.d.ts.map +0 -1
- package/dist/cli/commands/mint.js +0 -91
- package/dist/cli/commands/mint.js.map +0 -1
- package/dist/cli/commands/pay.d.ts +0 -18
- package/dist/cli/commands/pay.d.ts.map +0 -1
- package/dist/cli/commands/pay.js +0 -87
- package/dist/cli/commands/pay.js.map +0 -1
- package/dist/cli/commands/simulate.d.ts +0 -32
- package/dist/cli/commands/simulate.d.ts.map +0 -1
- package/dist/cli/commands/simulate.js +0 -290
- package/dist/cli/commands/simulate.js.map +0 -1
- package/dist/cli/commands/time.d.ts +0 -29
- package/dist/cli/commands/time.d.ts.map +0 -1
- package/dist/cli/commands/time.js +0 -252
- package/dist/cli/commands/time.js.map +0 -1
- package/dist/cli/commands/tx.d.ts +0 -16
- package/dist/cli/commands/tx.d.ts.map +0 -1
- package/dist/cli/commands/tx.js +0 -379
- package/dist/cli/commands/tx.js.map +0 -1
- package/dist/cli/commands/watch.d.ts +0 -20
- package/dist/cli/commands/watch.d.ts.map +0 -1
- package/dist/cli/commands/watch.js +0 -160
- package/dist/cli/commands/watch.js.map +0 -1
- package/dist/cli/index.d.ts +0 -17
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -104
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/utils/client.d.ts +0 -70
- package/dist/cli/utils/client.d.ts.map +0 -1
- package/dist/cli/utils/client.js +0 -240
- package/dist/cli/utils/client.js.map +0 -1
- package/dist/cli/utils/config.d.ts +0 -91
- package/dist/cli/utils/config.d.ts.map +0 -1
- package/dist/cli/utils/config.js +0 -240
- package/dist/cli/utils/config.js.map +0 -1
- package/dist/cli/utils/output.d.ts +0 -174
- package/dist/cli/utils/output.d.ts.map +0 -1
- package/dist/cli/utils/output.js +0 -380
- package/dist/cli/utils/output.js.map +0 -1
- package/dist/level0/Provider.d.ts +0 -106
- package/dist/level0/Provider.d.ts.map +0 -1
- package/dist/level0/Provider.js +0 -10
- package/dist/level0/Provider.js.map +0 -1
- package/dist/level0/ServiceDirectory.d.ts +0 -74
- package/dist/level0/ServiceDirectory.d.ts.map +0 -1
- package/dist/level0/ServiceDirectory.js +0 -122
- package/dist/level0/ServiceDirectory.js.map +0 -1
- package/dist/level0/index.d.ts +0 -10
- package/dist/level0/index.d.ts.map +0 -1
- package/dist/level0/index.js +0 -15
- package/dist/level0/index.js.map +0 -1
- package/dist/level0/provide.d.ts +0 -51
- package/dist/level0/provide.d.ts.map +0 -1
- package/dist/level0/provide.js +0 -113
- package/dist/level0/provide.js.map +0 -1
- package/dist/level0/request.d.ts +0 -53
- package/dist/level0/request.d.ts.map +0 -1
- package/dist/level0/request.js +0 -462
- package/dist/level0/request.js.map +0 -1
- package/dist/level1/Agent.d.ts +0 -472
- package/dist/level1/Agent.d.ts.map +0 -1
- package/dist/level1/Agent.js +0 -1091
- package/dist/level1/Agent.js.map +0 -1
- package/dist/level1/index.d.ts +0 -10
- package/dist/level1/index.d.ts.map +0 -1
- package/dist/level1/index.js +0 -30
- package/dist/level1/index.js.map +0 -1
- package/dist/level1/pricing/PriceCalculator.d.ts +0 -62
- package/dist/level1/pricing/PriceCalculator.d.ts.map +0 -1
- package/dist/level1/pricing/PriceCalculator.js +0 -237
- package/dist/level1/pricing/PriceCalculator.js.map +0 -1
- package/dist/level1/pricing/PricingStrategy.d.ts +0 -179
- package/dist/level1/pricing/PricingStrategy.d.ts.map +0 -1
- package/dist/level1/pricing/PricingStrategy.js +0 -11
- package/dist/level1/pricing/PricingStrategy.js.map +0 -1
- package/dist/level1/types/Job.d.ts +0 -166
- package/dist/level1/types/Job.d.ts.map +0 -1
- package/dist/level1/types/Job.js +0 -11
- package/dist/level1/types/Job.js.map +0 -1
- package/dist/level1/types/Options.d.ts +0 -258
- package/dist/level1/types/Options.d.ts.map +0 -1
- package/dist/level1/types/Options.js +0 -8
- package/dist/level1/types/Options.js.map +0 -1
- package/dist/level1/types/index.d.ts +0 -8
- package/dist/level1/types/index.d.ts.map +0 -1
- package/dist/level1/types/index.js +0 -8
- package/dist/level1/types/index.js.map +0 -1
- package/dist/protocol/AgentRegistry.d.ts +0 -177
- package/dist/protocol/AgentRegistry.d.ts.map +0 -1
- package/dist/protocol/AgentRegistry.js +0 -449
- package/dist/protocol/AgentRegistry.js.map +0 -1
- package/dist/protocol/DIDManager.d.ts +0 -289
- package/dist/protocol/DIDManager.d.ts.map +0 -1
- package/dist/protocol/DIDManager.js +0 -481
- package/dist/protocol/DIDManager.js.map +0 -1
- package/dist/protocol/DIDResolver.d.ts +0 -236
- package/dist/protocol/DIDResolver.d.ts.map +0 -1
- package/dist/protocol/DIDResolver.js +0 -495
- package/dist/protocol/DIDResolver.js.map +0 -1
- package/dist/runtime/BlockchainRuntime.d.ts +0 -360
- package/dist/runtime/BlockchainRuntime.d.ts.map +0 -1
- package/dist/runtime/BlockchainRuntime.js +0 -767
- package/dist/runtime/BlockchainRuntime.js.map +0 -1
- package/dist/runtime/IACTPRuntime.d.ts +0 -271
- package/dist/runtime/IACTPRuntime.d.ts.map +0 -1
- package/dist/runtime/IACTPRuntime.js +0 -15
- package/dist/runtime/IACTPRuntime.js.map +0 -1
- package/dist/runtime/MockRuntime.d.ts +0 -445
- package/dist/runtime/MockRuntime.d.ts.map +0 -1
- package/dist/runtime/MockRuntime.js +0 -1065
- package/dist/runtime/MockRuntime.js.map +0 -1
- package/dist/runtime/MockStateManager.d.ts +0 -233
- package/dist/runtime/MockStateManager.d.ts.map +0 -1
- package/dist/runtime/MockStateManager.js +0 -533
- package/dist/runtime/MockStateManager.js.map +0 -1
- package/dist/runtime/index.d.ts +0 -14
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js +0 -42
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/types/MockState.d.ts +0 -167
- package/dist/runtime/types/MockState.d.ts.map +0 -1
- package/dist/runtime/types/MockState.js +0 -43
- package/dist/runtime/types/MockState.js.map +0 -1
- package/dist/types/agent.d.ts +0 -76
- package/dist/types/agent.d.ts.map +0 -1
- package/dist/types/agent.js +0 -8
- package/dist/types/agent.js.map +0 -1
- package/dist/types/did.d.ts +0 -192
- package/dist/types/did.d.ts.map +0 -1
- package/dist/types/did.js +0 -38
- package/dist/types/did.js.map +0 -1
- package/dist/utils/ErrorRecoveryGuide.d.ts +0 -125
- package/dist/utils/ErrorRecoveryGuide.d.ts.map +0 -1
- package/dist/utils/ErrorRecoveryGuide.js +0 -579
- package/dist/utils/ErrorRecoveryGuide.js.map +0 -1
- package/dist/utils/Helpers.d.ts +0 -453
- package/dist/utils/Helpers.d.ts.map +0 -1
- package/dist/utils/Helpers.js +0 -623
- package/dist/utils/Helpers.js.map +0 -1
- package/dist/utils/Logger.d.ts +0 -195
- package/dist/utils/Logger.d.ts.map +0 -1
- package/dist/utils/Logger.js +0 -382
- package/dist/utils/Logger.js.map +0 -1
- package/dist/utils/RateLimiter.d.ts +0 -253
- package/dist/utils/RateLimiter.d.ts.map +0 -1
- package/dist/utils/RateLimiter.js +0 -424
- package/dist/utils/RateLimiter.js.map +0 -1
- package/dist/utils/SDKLifecycle.d.ts +0 -156
- package/dist/utils/SDKLifecycle.d.ts.map +0 -1
- package/dist/utils/SDKLifecycle.js +0 -347
- package/dist/utils/SDKLifecycle.js.map +0 -1
- package/dist/utils/SecureNonce.d.ts +0 -57
- package/dist/utils/SecureNonce.d.ts.map +0 -1
- package/dist/utils/SecureNonce.js +0 -80
- package/dist/utils/SecureNonce.js.map +0 -1
- package/dist/utils/Semaphore.d.ts +0 -123
- package/dist/utils/Semaphore.d.ts.map +0 -1
- package/dist/utils/Semaphore.js +0 -247
- package/dist/utils/Semaphore.js.map +0 -1
- package/dist/utils/UsedAttestationTracker.d.ts +0 -167
- package/dist/utils/UsedAttestationTracker.d.ts.map +0 -1
- package/dist/utils/UsedAttestationTracker.js +0 -309
- package/dist/utils/UsedAttestationTracker.js.map +0 -1
- package/dist/utils/fsSafe.d.ts +0 -14
- package/dist/utils/fsSafe.d.ts.map +0 -1
- package/dist/utils/fsSafe.js +0 -89
- package/dist/utils/fsSafe.js.map +0 -1
- package/dist/utils/index.d.ts +0 -15
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -51
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/security.d.ts +0 -147
- package/dist/utils/security.d.ts.map +0 -1
- package/dist/utils/security.js +0 -391
- package/dist/utils/security.js.map +0 -1
- package/src/abi/AgentRegistry.json +0 -782
- package/src/abi/IdentityRegistry.json +0 -316
- package/src/adapters/BaseAdapter.ts +0 -473
- package/src/adapters/BeginnerAdapter.ts +0 -232
- package/src/adapters/IntermediateAdapter.ts +0 -316
- package/src/adapters/index.ts +0 -25
- package/src/cli/commands/balance.ts +0 -110
- package/src/cli/commands/batch.ts +0 -487
- package/src/cli/commands/config.ts +0 -231
- package/src/cli/commands/init.ts +0 -161
- package/src/cli/commands/mint.ts +0 -116
- package/src/cli/commands/pay.ts +0 -113
- package/src/cli/commands/simulate.ts +0 -345
- package/src/cli/commands/time.ts +0 -303
- package/src/cli/commands/tx.ts +0 -448
- package/src/cli/commands/watch.ts +0 -211
- package/src/cli/index.ts +0 -116
- package/src/cli/utils/client.ts +0 -249
- package/src/cli/utils/config.ts +0 -282
- package/src/cli/utils/output.ts +0 -465
- package/src/level0/Provider.ts +0 -117
- package/src/level0/ServiceDirectory.ts +0 -131
- package/src/level0/index.ts +0 -10
- package/src/level0/provide.ts +0 -131
- package/src/level0/request.ts +0 -494
- package/src/level1/Agent.ts +0 -1432
- package/src/level1/index.ts +0 -10
- package/src/level1/pricing/PriceCalculator.ts +0 -255
- package/src/level1/pricing/PricingStrategy.ts +0 -198
- package/src/level1/types/Job.ts +0 -179
- package/src/level1/types/Options.ts +0 -291
- package/src/level1/types/index.ts +0 -8
- package/src/protocol/AgentRegistry.ts +0 -559
- package/src/protocol/DIDManager.ts +0 -629
- package/src/protocol/DIDResolver.ts +0 -554
- package/src/runtime/BlockchainRuntime.ts +0 -993
- package/src/runtime/IACTPRuntime.ts +0 -284
- package/src/runtime/MockRuntime.ts +0 -1244
- package/src/runtime/MockStateManager.ts +0 -576
- package/src/runtime/index.ts +0 -25
- package/src/runtime/types/MockState.ts +0 -227
- package/src/types/agent.ts +0 -79
- package/src/types/did.ts +0 -223
- package/src/utils/ErrorRecoveryGuide.ts +0 -675
- package/src/utils/Helpers.ts +0 -688
- package/src/utils/Logger.ts +0 -484
- package/src/utils/RateLimiter.ts +0 -534
- package/src/utils/SDKLifecycle.ts +0 -416
- package/src/utils/SecureNonce.ts +0 -78
- package/src/utils/Semaphore.ts +0 -276
- package/src/utils/UsedAttestationTracker.ts +0 -387
- package/src/utils/fsSafe.ts +0 -75
- package/src/utils/index.ts +0 -80
- package/src/utils/security.ts +0 -418
|
@@ -3,98 +3,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ProofGenerator = void 0;
|
|
4
4
|
const ethers_1 = require("ethers");
|
|
5
5
|
const eip712_1 = require("../types/eip712");
|
|
6
|
-
/**
|
|
7
|
-
* Default URL validation config - SECURE by default
|
|
8
|
-
*/
|
|
9
|
-
const DEFAULT_URL_CONFIG = {
|
|
10
|
-
allowedProtocols: ['https:'],
|
|
11
|
-
allowLocalhost: false,
|
|
12
|
-
maxSize: 10 * 1024 * 1024, // 10MB
|
|
13
|
-
timeout: 30000, // 30 seconds
|
|
14
|
-
blockedHosts: [
|
|
15
|
-
'metadata.google.internal',
|
|
16
|
-
'169.254.169.254', // AWS/GCP metadata
|
|
17
|
-
'metadata.aws.internal',
|
|
18
|
-
'localhost',
|
|
19
|
-
'127.0.0.1',
|
|
20
|
-
'0.0.0.0',
|
|
21
|
-
'[::1]',
|
|
22
|
-
],
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* ProofGenerator - Content hashing and delivery proofs
|
|
26
|
-
* Reference: Yellow Paper §11.4.1
|
|
27
|
-
*
|
|
28
|
-
* SECURITY FIX (MEDIUM-2): Now includes URL validation for SSRF prevention
|
|
29
|
-
*/
|
|
30
6
|
class ProofGenerator {
|
|
31
|
-
/**
|
|
32
|
-
* Create ProofGenerator with optional URL validation config
|
|
33
|
-
*
|
|
34
|
-
* @param urlConfig - URL validation configuration for hashFromUrl()
|
|
35
|
-
*/
|
|
36
|
-
constructor(urlConfig) {
|
|
37
|
-
this.urlConfig = {
|
|
38
|
-
...DEFAULT_URL_CONFIG,
|
|
39
|
-
...urlConfig,
|
|
40
|
-
};
|
|
41
|
-
// If localhost is explicitly allowed, remove from blocked hosts
|
|
42
|
-
if (urlConfig?.allowLocalhost) {
|
|
43
|
-
this.urlConfig.blockedHosts = this.urlConfig.blockedHosts.filter((h) => !['localhost', '127.0.0.1', '0.0.0.0', '[::1]'].includes(h));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Hash deliverable content
|
|
48
|
-
* Uses Keccak256 per Yellow Paper §11.4.1
|
|
49
|
-
*/
|
|
50
7
|
hashContent(content) {
|
|
51
8
|
const buffer = typeof content === 'string' ? (0, ethers_1.toUtf8Bytes)(content) : content;
|
|
52
9
|
return (0, ethers_1.keccak256)(buffer);
|
|
53
10
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Generate delivery proof (AIP-4)
|
|
56
|
-
* Reference: Yellow Paper §8.2
|
|
57
|
-
* Complete schema with type field for AIP compliance
|
|
58
|
-
* Computed fields (size, mimeType) cannot be overwritten
|
|
59
|
-
*/
|
|
60
11
|
generateDeliveryProof(params) {
|
|
61
12
|
const { txId, deliverable, deliveryUrl, metadata = {} } = params;
|
|
62
13
|
const contentHash = this.hashContent(deliverable);
|
|
63
14
|
const size = typeof deliverable === 'string'
|
|
64
15
|
? Buffer.from(deliverable).length
|
|
65
16
|
: deliverable.length;
|
|
66
|
-
// Spread user metadata first, then enforce computed fields
|
|
67
|
-
// This prevents users from spoofing size/mimeType
|
|
68
17
|
const { size: _ignoredSize, mimeType: _ignoredMimeType, ...userMetadata } = metadata;
|
|
69
18
|
return {
|
|
70
|
-
type: 'delivery.proof',
|
|
19
|
+
type: 'delivery.proof',
|
|
71
20
|
txId,
|
|
72
21
|
contentHash,
|
|
73
22
|
timestamp: Date.now(),
|
|
74
|
-
deliveryUrl,
|
|
23
|
+
deliveryUrl,
|
|
75
24
|
metadata: {
|
|
76
|
-
...userMetadata,
|
|
77
|
-
size,
|
|
78
|
-
mimeType: metadata.mimeType || 'application/octet-stream'
|
|
25
|
+
...userMetadata,
|
|
26
|
+
size,
|
|
27
|
+
mimeType: metadata.mimeType || 'application/octet-stream'
|
|
79
28
|
}
|
|
80
29
|
};
|
|
81
30
|
}
|
|
82
|
-
/**
|
|
83
|
-
* Convert a generated delivery proof into typed EIP-712 data
|
|
84
|
-
*/
|
|
85
31
|
toDeliveryProofTypedData(proof) {
|
|
86
32
|
return (0, eip712_1.deliveryProofDataFromProof)(proof);
|
|
87
33
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Encode proof for on-chain submission
|
|
90
|
-
*/
|
|
91
34
|
encodeProof(proof) {
|
|
92
35
|
const abiCoder = ethers_1.AbiCoder.defaultAbiCoder();
|
|
93
36
|
return abiCoder.encode(['bytes32', 'bytes32', 'uint256'], [proof.txId, proof.contentHash, proof.timestamp]);
|
|
94
37
|
}
|
|
95
|
-
/**
|
|
96
|
-
* Decode proof from on-chain data
|
|
97
|
-
*/
|
|
98
38
|
decodeProof(proofData) {
|
|
99
39
|
const abiCoder = ethers_1.AbiCoder.defaultAbiCoder();
|
|
100
40
|
const [txId, contentHash, timestamp] = abiCoder.decode(['bytes32', 'bytes32', 'uint256'], proofData);
|
|
@@ -104,146 +44,21 @@ class ProofGenerator {
|
|
|
104
44
|
timestamp: Number(timestamp)
|
|
105
45
|
};
|
|
106
46
|
}
|
|
107
|
-
/**
|
|
108
|
-
* Verify deliverable matches expected hash
|
|
109
|
-
*/
|
|
110
47
|
verifyDeliverable(deliverable, expectedHash) {
|
|
111
48
|
const actualHash = this.hashContent(deliverable);
|
|
112
49
|
return actualHash.toLowerCase() === expectedHash.toLowerCase();
|
|
113
50
|
}
|
|
114
|
-
/**
|
|
115
|
-
* Generate content hash from URL (for IPFS/Arweave)
|
|
116
|
-
*
|
|
117
|
-
* SECURITY FIX (MEDIUM-2): Now includes:
|
|
118
|
-
* - Protocol validation (HTTPS only by default)
|
|
119
|
-
* - Hostname blocklist (prevents SSRF to internal services)
|
|
120
|
-
* - Size limits (prevents DoS via large responses)
|
|
121
|
-
* - Request timeout
|
|
122
|
-
*
|
|
123
|
-
* @param url - URL to fetch content from
|
|
124
|
-
* @returns Keccak256 hash of content
|
|
125
|
-
* @throws Error if URL is blocked, too large, or fetch fails
|
|
126
|
-
*/
|
|
127
51
|
async hashFromUrl(url) {
|
|
128
|
-
// SECURITY FIX (MEDIUM-2): Validate URL before fetching
|
|
129
|
-
this.validateUrl(url);
|
|
130
|
-
// In browser/Node.js environment with fetch
|
|
131
52
|
try {
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
const response = await fetch(url, {
|
|
137
|
-
signal: controller.signal,
|
|
138
|
-
// Prevent following redirects to blocked hosts
|
|
139
|
-
redirect: 'follow',
|
|
140
|
-
});
|
|
141
|
-
clearTimeout(timeoutId);
|
|
142
|
-
if (!response.ok) {
|
|
143
|
-
throw new Error(`HTTP error: ${response.status} ${response.statusText}`);
|
|
144
|
-
}
|
|
145
|
-
// SECURITY FIX (MEDIUM-2): Check Content-Length header first
|
|
146
|
-
const contentLength = response.headers.get('content-length');
|
|
147
|
-
if (contentLength) {
|
|
148
|
-
const size = parseInt(contentLength, 10);
|
|
149
|
-
if (size > this.urlConfig.maxSize) {
|
|
150
|
-
throw new Error(`Content too large: ${size} bytes exceeds maximum of ${this.urlConfig.maxSize} bytes`);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// SECURITY FIX (MEDIUM-2): Read response with size limit
|
|
154
|
-
const chunks = [];
|
|
155
|
-
let totalSize = 0;
|
|
156
|
-
const reader = response.body?.getReader();
|
|
157
|
-
if (!reader) {
|
|
158
|
-
throw new Error('Response body is not readable');
|
|
159
|
-
}
|
|
160
|
-
while (true) {
|
|
161
|
-
const { done, value } = await reader.read();
|
|
162
|
-
if (done)
|
|
163
|
-
break;
|
|
164
|
-
totalSize += value.length;
|
|
165
|
-
// Check size limit during streaming
|
|
166
|
-
if (totalSize > this.urlConfig.maxSize) {
|
|
167
|
-
reader.cancel();
|
|
168
|
-
throw new Error(`Content too large: ${totalSize}+ bytes exceeds maximum of ${this.urlConfig.maxSize} bytes`);
|
|
169
|
-
}
|
|
170
|
-
chunks.push(value);
|
|
171
|
-
}
|
|
172
|
-
// Concatenate chunks
|
|
173
|
-
const buffer = Buffer.concat(chunks.map(c => Buffer.from(c)));
|
|
174
|
-
return this.hashContent(buffer);
|
|
175
|
-
}
|
|
176
|
-
finally {
|
|
177
|
-
clearTimeout(timeoutId);
|
|
178
|
-
}
|
|
53
|
+
const response = await fetch(url);
|
|
54
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
55
|
+
const buffer = Buffer.from(arrayBuffer);
|
|
56
|
+
return this.hashContent(buffer);
|
|
179
57
|
}
|
|
180
58
|
catch (error) {
|
|
181
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
182
|
-
throw new Error(`Request timed out after ${this.urlConfig.timeout}ms for ${url}`);
|
|
183
|
-
}
|
|
184
59
|
throw new Error(`Failed to fetch content from ${url}: ${error}`);
|
|
185
60
|
}
|
|
186
61
|
}
|
|
187
|
-
/**
|
|
188
|
-
* SECURITY FIX (MEDIUM-2): Validate URL against security rules
|
|
189
|
-
*
|
|
190
|
-
* @param url - URL to validate
|
|
191
|
-
* @throws Error if URL is not allowed
|
|
192
|
-
*/
|
|
193
|
-
validateUrl(url) {
|
|
194
|
-
let parsed;
|
|
195
|
-
try {
|
|
196
|
-
parsed = new URL(url);
|
|
197
|
-
}
|
|
198
|
-
catch {
|
|
199
|
-
throw new Error(`Invalid URL: ${url}`);
|
|
200
|
-
}
|
|
201
|
-
// Check protocol
|
|
202
|
-
if (!this.urlConfig.allowedProtocols.includes(parsed.protocol)) {
|
|
203
|
-
throw new Error(`URL protocol "${parsed.protocol}" not allowed. ` +
|
|
204
|
-
`Allowed protocols: ${this.urlConfig.allowedProtocols.join(', ')}`);
|
|
205
|
-
}
|
|
206
|
-
// Check blocked hosts
|
|
207
|
-
const hostname = parsed.hostname.toLowerCase();
|
|
208
|
-
if (this.urlConfig.blockedHosts.includes(hostname)) {
|
|
209
|
-
throw new Error(`URL hostname "${hostname}" is blocked for security reasons. ` +
|
|
210
|
-
`This prevents SSRF attacks to internal services.`);
|
|
211
|
-
}
|
|
212
|
-
// Check for private IP ranges (additional SSRF protection)
|
|
213
|
-
if (this.isPrivateIP(hostname)) {
|
|
214
|
-
throw new Error(`URL hostname "${hostname}" resolves to a private IP address. ` +
|
|
215
|
-
`This is blocked for security reasons (SSRF prevention).`);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Check if hostname is a private IP address
|
|
220
|
-
*
|
|
221
|
-
* @param hostname - Hostname to check
|
|
222
|
-
* @returns true if hostname is a private IP
|
|
223
|
-
*/
|
|
224
|
-
isPrivateIP(hostname) {
|
|
225
|
-
// IPv4 private ranges
|
|
226
|
-
const ipv4PrivateRanges = [
|
|
227
|
-
/^10\./, // 10.0.0.0 - 10.255.255.255
|
|
228
|
-
/^172\.(1[6-9]|2[0-9]|3[0-1])\./, // 172.16.0.0 - 172.31.255.255
|
|
229
|
-
/^192\.168\./, // 192.168.0.0 - 192.168.255.255
|
|
230
|
-
/^127\./, // 127.0.0.0 - 127.255.255.255 (loopback)
|
|
231
|
-
/^169\.254\./, // 169.254.0.0 - 169.254.255.255 (link-local)
|
|
232
|
-
/^0\./, // 0.0.0.0/8
|
|
233
|
-
];
|
|
234
|
-
for (const range of ipv4PrivateRanges) {
|
|
235
|
-
if (range.test(hostname)) {
|
|
236
|
-
return true;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return false;
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Get the URL validation config (for testing/inspection)
|
|
243
|
-
*/
|
|
244
|
-
getUrlConfig() {
|
|
245
|
-
return { ...this.urlConfig };
|
|
246
|
-
}
|
|
247
62
|
}
|
|
248
63
|
exports.ProofGenerator = ProofGenerator;
|
|
249
64
|
//# sourceMappingURL=ProofGenerator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProofGenerator.js","sourceRoot":"","sources":["../../src/protocol/ProofGenerator.ts"],"names":[],"mappings":";;;AAAA,mCAAqE;AAErE,4CAAgF;
|
|
1
|
+
{"version":3,"file":"ProofGenerator.js","sourceRoot":"","sources":["../../src/protocol/ProofGenerator.ts"],"names":[],"mappings":";;;AAAA,mCAAqE;AAErE,4CAAgF;AAMhF,MAAa,cAAc;IAKzB,WAAW,CAAC,OAAwB;QAClC,MAAM,MAAM,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,oBAAW,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAE5E,OAAO,IAAA,kBAAS,EAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAQD,qBAAqB,CAAC,MAKrB;QACC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;QAEjE,MAAM,WAAW,GAAG,IAAI,CAAC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AC;IACJ,CAAC;IAKD,iBAAiB,CAAC,WAA4B,EAAE,YAAoB;QAClE,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC,WAAW,EAAE,CAAC;IACjE,CAAC;IAKD,KAAK,CAAC,WAAW,CAAC,GAAW;QAE3B,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;YAClC,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC;YACjD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACxC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,gCAAgC,GAAG,KAAK,KAAK,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;CACF;AA9GD,wCA8GC"}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* QuoteBuilder - AIP-2 Price Quote Construction
|
|
3
|
-
*
|
|
4
|
-
* This module re-exports the full QuoteBuilder implementation from builders/
|
|
5
|
-
* Reference: AIP-2 §6.1
|
|
6
|
-
*
|
|
7
|
-
* @deprecated Import from builders/QuoteBuilder directly
|
|
8
|
-
*/
|
|
9
1
|
export { QuoteBuilder, QuoteMessage, QuoteParams, AIP2QuoteTypes } from '../builders/QuoteBuilder';
|
|
10
2
|
//# sourceMappingURL=QuoteBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteBuilder.d.ts","sourceRoot":"","sources":["../../src/protocol/QuoteBuilder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QuoteBuilder.d.ts","sourceRoot":"","sources":["../../src/protocol/QuoteBuilder.ts"],"names":[],"mappings":"AASA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,cAAc,EACf,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* QuoteBuilder - AIP-2 Price Quote Construction
|
|
4
|
-
*
|
|
5
|
-
* This module re-exports the full QuoteBuilder implementation from builders/
|
|
6
|
-
* Reference: AIP-2 §6.1
|
|
7
|
-
*
|
|
8
|
-
* @deprecated Import from builders/QuoteBuilder directly
|
|
9
|
-
*/
|
|
10
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
3
|
exports.AIP2QuoteTypes = exports.QuoteBuilder = void 0;
|
|
12
4
|
var QuoteBuilder_1 = require("../builders/QuoteBuilder");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuoteBuilder.js","sourceRoot":"","sources":["../../src/protocol/QuoteBuilder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QuoteBuilder.js","sourceRoot":"","sources":["../../src/protocol/QuoteBuilder.ts"],"names":[],"mappings":";;;AASA,yDAKkC;AAJhC,4GAAA,YAAY,OAAA;AAGZ,8GAAA,cAAc,OAAA"}
|
package/dist/types/eip712.d.ts
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
import { DeliveryProof } from './message';
|
|
2
|
-
/**
|
|
3
|
-
* EIP-712 Type Definitions for ACTP Messages
|
|
4
|
-
* Reference: Yellow Paper §11.4.2
|
|
5
|
-
*
|
|
6
|
-
* Each AIP message has explicit typed data for cross-language compatibility
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* EIP-712 Domain for ACTP
|
|
10
|
-
*/
|
|
11
2
|
export interface EIP712Domain {
|
|
12
3
|
name: string;
|
|
13
4
|
version: string;
|
|
14
5
|
chainId: number;
|
|
15
6
|
verifyingContract: string;
|
|
16
7
|
}
|
|
17
|
-
/**
|
|
18
|
-
* QuoteRequest (AIP-2)
|
|
19
|
-
* Reference: Yellow Paper §4.2
|
|
20
|
-
*/
|
|
21
8
|
export declare const QuoteRequestTypes: {
|
|
22
9
|
QuoteRequest: {
|
|
23
10
|
name: string;
|
|
@@ -34,10 +21,6 @@ export interface QuoteRequestData {
|
|
|
34
21
|
deadline: number;
|
|
35
22
|
disputeWindow: number;
|
|
36
23
|
}
|
|
37
|
-
/**
|
|
38
|
-
* QuoteResponse (AIP-2)
|
|
39
|
-
* Reference: Yellow Paper §4.2
|
|
40
|
-
*/
|
|
41
24
|
export declare const QuoteResponseTypes: {
|
|
42
25
|
QuoteResponse: {
|
|
43
26
|
name: string;
|
|
@@ -55,10 +38,6 @@ export interface QuoteResponseData {
|
|
|
55
38
|
deliveryTime: number;
|
|
56
39
|
terms: string;
|
|
57
40
|
}
|
|
58
|
-
/**
|
|
59
|
-
* DeliveryProof (AIP-4) - DEPRECATED
|
|
60
|
-
* @deprecated Use AIP4DeliveryProofTypes instead (AIP-4 v1.1)
|
|
61
|
-
*/
|
|
62
41
|
export declare const DeliveryProofTypes: {
|
|
63
42
|
DeliveryProof: {
|
|
64
43
|
name: string;
|
|
@@ -74,10 +53,6 @@ export interface DeliveryProofData {
|
|
|
74
53
|
mimeType: string;
|
|
75
54
|
}
|
|
76
55
|
export declare function deliveryProofDataFromProof(proof: DeliveryProof): DeliveryProofData;
|
|
77
|
-
/**
|
|
78
|
-
* AIP-4 Delivery Proof (v1.1)
|
|
79
|
-
* Reference: AIP-4 §3.3
|
|
80
|
-
*/
|
|
81
56
|
export declare const AIP4DeliveryProofTypes: {
|
|
82
57
|
DeliveryProof: {
|
|
83
58
|
name: string;
|
|
@@ -95,18 +70,12 @@ export interface AIP4DeliveryProofData {
|
|
|
95
70
|
chainId: number;
|
|
96
71
|
nonce: number;
|
|
97
72
|
}
|
|
98
|
-
/**
|
|
99
|
-
* Generic ACTPMessage (fallback for custom AIPs)
|
|
100
|
-
*/
|
|
101
73
|
export declare const ACTPMessageTypes: {
|
|
102
74
|
ACTPMessage: {
|
|
103
75
|
name: string;
|
|
104
76
|
type: string;
|
|
105
77
|
}[];
|
|
106
78
|
};
|
|
107
|
-
/**
|
|
108
|
-
* Message type registry
|
|
109
|
-
*/
|
|
110
79
|
export declare const MESSAGE_TYPES: {
|
|
111
80
|
'quote.request': {
|
|
112
81
|
QuoteRequest: {
|
|
@@ -133,8 +102,5 @@ export declare const MESSAGE_TYPES: {
|
|
|
133
102
|
}[];
|
|
134
103
|
};
|
|
135
104
|
};
|
|
136
|
-
/**
|
|
137
|
-
* Get EIP-712 types for message type
|
|
138
|
-
*/
|
|
139
105
|
export declare function getMessageTypes(messageType: string): Record<string, any>;
|
|
140
106
|
//# sourceMappingURL=eip712.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eip712.d.ts","sourceRoot":"","sources":["../../src/types/eip712.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"eip712.d.ts","sourceRoot":"","sources":["../../src/types/eip712.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAY1C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAMD,eAAO,MAAM,iBAAiB;;;;;CAW7B,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAMD,eAAO,MAAM,kBA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-1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* Reference: Yellow Paper §4.2
|
|
7
|
-
*/
|
|
3
|
+
exports.MESSAGE_TYPES = exports.ACTPMessageTypes = exports.AIP4DeliveryProofTypes = exports.DeliveryProofTypes = exports.QuoteResponseTypes = exports.QuoteRequestTypes = void 0;
|
|
4
|
+
exports.deliveryProofDataFromProof = deliveryProofDataFromProof;
|
|
5
|
+
exports.getMessageTypes = getMessageTypes;
|
|
8
6
|
exports.QuoteRequestTypes = {
|
|
9
7
|
QuoteRequest: [
|
|
10
|
-
{ name: 'from', type: 'string' },
|
|
11
|
-
{ name: 'to', type: 'string' },
|
|
8
|
+
{ name: 'from', type: 'string' },
|
|
9
|
+
{ name: 'to', type: 'string' },
|
|
12
10
|
{ name: 'timestamp', type: 'uint256' },
|
|
13
11
|
{ name: 'nonce', type: 'bytes32' },
|
|
14
12
|
{ name: 'serviceType', type: 'string' },
|
|
@@ -17,10 +15,6 @@ exports.QuoteRequestTypes = {
|
|
|
17
15
|
{ name: 'disputeWindow', type: 'uint256' }
|
|
18
16
|
]
|
|
19
17
|
};
|
|
20
|
-
/**
|
|
21
|
-
* QuoteResponse (AIP-2)
|
|
22
|
-
* Reference: Yellow Paper §4.2
|
|
23
|
-
*/
|
|
24
18
|
exports.QuoteResponseTypes = {
|
|
25
19
|
QuoteResponse: [
|
|
26
20
|
{ name: 'from', type: 'string' },
|
|
@@ -34,10 +28,6 @@ exports.QuoteResponseTypes = {
|
|
|
34
28
|
{ name: 'terms', type: 'string' }
|
|
35
29
|
]
|
|
36
30
|
};
|
|
37
|
-
/**
|
|
38
|
-
* DeliveryProof (AIP-4) - DEPRECATED
|
|
39
|
-
* @deprecated Use AIP4DeliveryProofTypes instead (AIP-4 v1.1)
|
|
40
|
-
*/
|
|
41
31
|
exports.DeliveryProofTypes = {
|
|
42
32
|
DeliveryProof: [
|
|
43
33
|
{ name: 'txId', type: 'bytes32' },
|
|
@@ -58,11 +48,6 @@ function deliveryProofDataFromProof(proof) {
|
|
|
58
48
|
mimeType: proof.metadata.mimeType
|
|
59
49
|
};
|
|
60
50
|
}
|
|
61
|
-
exports.deliveryProofDataFromProof = deliveryProofDataFromProof;
|
|
62
|
-
/**
|
|
63
|
-
* AIP-4 Delivery Proof (v1.1)
|
|
64
|
-
* Reference: AIP-4 §3.3
|
|
65
|
-
*/
|
|
66
51
|
exports.AIP4DeliveryProofTypes = {
|
|
67
52
|
DeliveryProof: [
|
|
68
53
|
{ name: 'txId', type: 'bytes32' },
|
|
@@ -76,9 +61,6 @@ exports.AIP4DeliveryProofTypes = {
|
|
|
76
61
|
{ name: 'nonce', type: 'uint256' }
|
|
77
62
|
]
|
|
78
63
|
};
|
|
79
|
-
/**
|
|
80
|
-
* Generic ACTPMessage (fallback for custom AIPs)
|
|
81
|
-
*/
|
|
82
64
|
exports.ACTPMessageTypes = {
|
|
83
65
|
ACTPMessage: [
|
|
84
66
|
{ name: 'type', type: 'string' },
|
|
@@ -90,21 +72,13 @@ exports.ACTPMessageTypes = {
|
|
|
90
72
|
{ name: 'payload', type: 'bytes' }
|
|
91
73
|
]
|
|
92
74
|
};
|
|
93
|
-
/**
|
|
94
|
-
* Message type registry
|
|
95
|
-
*/
|
|
96
75
|
exports.MESSAGE_TYPES = {
|
|
97
76
|
'quote.request': exports.QuoteRequestTypes,
|
|
98
77
|
'quote.response': exports.QuoteResponseTypes,
|
|
99
78
|
'delivery.proof': exports.DeliveryProofTypes,
|
|
100
|
-
// Fallback for custom/future AIPs
|
|
101
79
|
default: exports.ACTPMessageTypes
|
|
102
80
|
};
|
|
103
|
-
/**
|
|
104
|
-
* Get EIP-712 types for message type
|
|
105
|
-
*/
|
|
106
81
|
function getMessageTypes(messageType) {
|
|
107
82
|
return exports.MESSAGE_TYPES[messageType] || exports.MESSAGE_TYPES.default;
|
|
108
83
|
}
|
|
109
|
-
exports.getMessageTypes = getMessageTypes;
|
|
110
84
|
//# sourceMappingURL=eip712.js.map
|
package/dist/types/eip712.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eip712.js","sourceRoot":"","sources":["../../src/types/eip712.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"eip712.js","sourceRoot":"","sources":["../../src/types/eip712.ts"],"names":[],"mappings":";;;AAqGA,gEASC;AA6DD,0CAEC;AAtJY,QAAA,iBAAiB,GAAG;IAC/B,YAAY,EAAE;QACZ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;QAChC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC9B,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;QACtC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;QAClC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;QACvC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE;QACxC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;QACrC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE;KAC3C;CACF,CAAC;AAiBW,QAAA,kBAAkB,GAAG;IAChC,aAAa,EAAE;QACb,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;QAChC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC9B,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;QACtC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;QAClC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;QACtC,EAAE,IAAI,EAAE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*/
|
|
4
1
|
export interface CreateEscrowParams {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
requester: string;
|
|
9
|
-
/** Provider who receives payout on settlement */
|
|
10
|
-
provider: string;
|
|
11
|
-
/** Amount locked in escrow (USDC wei, 6 decimals) */
|
|
2
|
+
kernelAddress: string;
|
|
3
|
+
txId: string;
|
|
4
|
+
token: string;
|
|
12
5
|
amount: bigint;
|
|
6
|
+
beneficiary: string;
|
|
13
7
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Escrow state (matches on-chain EscrowVault.EscrowData struct)
|
|
16
|
-
*/
|
|
17
8
|
export interface Escrow {
|
|
18
9
|
escrowId: string;
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
kernel: string;
|
|
11
|
+
txId: string;
|
|
12
|
+
token: string;
|
|
21
13
|
amount: bigint;
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
beneficiary: string;
|
|
15
|
+
createdAt: number;
|
|
16
|
+
released: boolean;
|
|
24
17
|
}
|
|
25
18
|
//# sourceMappingURL=escrow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../../src/types/escrow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../../src/types/escrow.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAKD,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type exports
|
|
3
|
-
*/
|
|
4
1
|
export * from './state';
|
|
5
2
|
export * from './transaction';
|
|
6
3
|
export * from './escrow';
|
|
7
4
|
export * from './message';
|
|
8
5
|
export * from './eip712';
|
|
9
|
-
export * from './agent';
|
|
10
|
-
export * from './did';
|
|
11
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Type exports
|
|
4
|
-
*/
|
|
5
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
3
|
if (k2 === undefined) k2 = k;
|
|
7
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -22,9 +19,4 @@ __exportStar(require("./transaction"), exports);
|
|
|
22
19
|
__exportStar(require("./escrow"), exports);
|
|
23
20
|
__exportStar(require("./message"), exports);
|
|
24
21
|
__exportStar(require("./eip712"), exports);
|
|
25
|
-
__exportStar(require("./agent"), exports);
|
|
26
|
-
__exportStar(require("./did"), exports);
|
|
27
|
-
// Note: storage and archive types are not yet implemented in this version
|
|
28
|
-
// export * from './storage';
|
|
29
|
-
// export * from './archive';
|
|
30
22
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,0CAAwB;AACxB,gDAA8B;AAC9B,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB"}
|
package/dist/types/message.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ACTP Message Types
|
|
3
|
-
* Reference: Yellow Paper §4-10 (AIPs)
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Base ACTP message structure
|
|
7
|
-
*/
|
|
8
1
|
export interface ACTPMessage {
|
|
9
2
|
type: string;
|
|
10
3
|
version: string;
|
|
@@ -15,10 +8,6 @@ export interface ACTPMessage {
|
|
|
15
8
|
signature?: string;
|
|
16
9
|
[key: string]: any;
|
|
17
10
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Quote Request (AIP-2)
|
|
20
|
-
* Reference: Yellow Paper §6.2.1
|
|
21
|
-
*/
|
|
22
11
|
export interface QuoteRequest extends ACTPMessage {
|
|
23
12
|
type: 'quote.request';
|
|
24
13
|
serviceRequest: {
|
|
@@ -35,10 +24,6 @@ export interface QuoteRequest extends ACTPMessage {
|
|
|
35
24
|
};
|
|
36
25
|
expiresAt: string;
|
|
37
26
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Quote Response (AIP-2)
|
|
40
|
-
* Reference: Yellow Paper §6.2.2
|
|
41
|
-
*/
|
|
42
27
|
export interface QuoteResponse extends ACTPMessage {
|
|
43
28
|
type: 'quote.response';
|
|
44
29
|
inResponseTo: string;
|
|
@@ -58,10 +43,6 @@ export interface QuoteResponse extends ACTPMessage {
|
|
|
58
43
|
};
|
|
59
44
|
expiresAt: string;
|
|
60
45
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Delivery Proof (AIP-4) - DEPRECATED
|
|
63
|
-
* @deprecated Use DeliveryProofMessage instead (AIP-4 v1.1)
|
|
64
|
-
*/
|
|
65
46
|
export interface DeliveryProof {
|
|
66
47
|
type: 'delivery.proof';
|
|
67
48
|
txId: string;
|
|
@@ -74,11 +55,6 @@ export interface DeliveryProof {
|
|
|
74
55
|
[key: string]: any;
|
|
75
56
|
};
|
|
76
57
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Delivery Proof Message (AIP-4 v1.1)
|
|
79
|
-
* Reference: AIP-4 §3.2, §8.1
|
|
80
|
-
* Complete schema for delivery proofs with EAS attestations
|
|
81
|
-
*/
|
|
82
58
|
export interface DeliveryProofMessage {
|
|
83
59
|
type: 'agirails.delivery.v1';
|
|
84
60
|
version: string;
|
|
@@ -99,9 +75,6 @@ export interface DeliveryProofMessage {
|
|
|
99
75
|
nonce: number;
|
|
100
76
|
signature: string;
|
|
101
77
|
}
|
|
102
|
-
/**
|
|
103
|
-
* EAS Attestation Data for delivery proofs
|
|
104
|
-
*/
|
|
105
78
|
export interface EASAttestationData {
|
|
106
79
|
schema: string;
|
|
107
80
|
recipient: string;
|
|
@@ -110,11 +83,6 @@ export interface EASAttestationData {
|
|
|
110
83
|
refUID: string;
|
|
111
84
|
data: string;
|
|
112
85
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Quote Message (AIP-2 v1.0)
|
|
115
|
-
* Reference: AIP-2 §2.1, §2.2
|
|
116
|
-
* Price quote submitted by provider for negotiated transactions
|
|
117
|
-
*/
|
|
118
86
|
export interface QuoteMessageV2 {
|
|
119
87
|
type: 'agirails.quote.v1';
|
|
120
88
|
version: '1.0.0';
|