Commit Graph

12323 Commits (lynx)

Author SHA1 Message Date
Derek Pierre 07e13b9930
Merge pull request #3576 from derekpierre/eip1271-support
EIP1271 Support
2025-02-10 08:51:12 -05:00
derekpierre 50c9baface
Remove extra fixture parameter from test.
Co-authored-by: Manuel Montenegro <manuel@nucypher.com>
2025-02-10 08:09:49 -05:00
derekpierre 56ea9c1c12
Apply RFC from #3576. 2025-02-07 08:36:05 -05:00
derekpierre 268527eaf5
Fix linter errors. 2025-02-05 13:30:03 -05:00
derekpierre 4ccfe68c36
Apply RFC from #3576 that caught a bug.
Co-authored-by: vzotova <vikki.zta@gmail.com>
2025-02-05 13:30:03 -05:00
derekpierre a074f676ff
Add tests for ConditionProviderManager. 2025-02-05 13:30:03 -05:00
derekpierre 967b272a28
Improve exception message when RPC endpoints for a chain are available but can't be properly configured. 2025-02-05 13:30:03 -05:00
derekpierre f340e3b153
Simplify authentication logic for EIP1271. 2025-02-05 13:29:58 -05:00
derekpierre 75e49a603f
Sort list of chain ids returned by `/condition_chains` node endpoint.
Update test.
2025-02-05 13:29:58 -05:00
derekpierre 846cd931c7
Add assurance that the relevant EIP1271 contract address is provided for verifying the signature. 2025-02-05 13:29:58 -05:00
derekpierre 9123733ac1
Add feature newsfragment for #3576. 2025-02-05 13:29:58 -05:00
derekpierre 7e06339d5f
Fix bug in /condition_chains endpoint causing test failure. 2025-02-05 13:29:58 -05:00
derekpierre ac5da6ce7e
Add unit and acceptance tests for EIP1271 authentication. 2025-02-05 13:29:54 -05:00
derekpierre 278cf9f0d4
Add more robust logic for the case where there are faulty providers and therefore faulty w3 instances when calling EIP1271 contract.
Use chain as key within typedData instead of chain_id.
2025-02-05 13:29:54 -05:00
derekpierre 93ba45f48b
Initial implementation of EvmAuth for EIP1271.
Update use of provider manager across EvmAuth initerface and subsequent tests.
2025-02-05 13:29:47 -05:00
derekpierre dcd870d49e
Adjust tests to use ConditionProviderManager instead of the raw dictionary of providers.
Also adjust mocking since RPCCall no longer does the configuration of w3 instances; instead the ConditionProviderManager does it.
2025-02-05 13:11:29 -05:00
derekpierre 24d0669940
Add use of ConditionProviderManager across lingo evaluation / condition verification. 2025-02-05 13:11:29 -05:00
derekpierre 27a02837c4
Add ConnectionProviderManager utility to be eventually used for managing connection providers for conditions.
Raise separate exceptions for no connection vs invalid connection to blockchain - those are two different scenarios.
2025-02-05 13:11:29 -05:00
Derek Pierre 7c37929b32
Merge pull request #3578 from derekpierre/lingo-cleanup
Lingo Cleanup
2025-02-05 13:05:06 -05:00
derekpierre 470f95f9ce
Remove use of NuCypherToken contract and corresponding use of NuCypherTokenAgent from tests since NuCypherToken contract was removed from `nucypher-contracts` repos. 2025-02-05 12:00:12 -05:00
derekpierre 07c6355141
Add dev newsfragment for #3578. 2025-02-05 12:00:12 -05:00
derekpierre 78889274ce
Update lingo test file based on current schema and add test for all entries in the file. 2025-02-05 12:00:02 -05:00
derekpierre 97aa16cd6e
Update ConditionDict types to account for updated JsonApiCondition and JsonRpcCondition. 2025-02-05 10:43:34 -05:00
Manuel Montenegro dbac4f1c68
Merge pull request #3577 from manumonti/update-readme
Update README links to docs
2025-01-31 15:26:43 +01:00
Manuel Montenegro bb073ad2c6
Add newsfragment 2025-01-29 20:01:37 +01:00
Manuel Montenegro d1d0be03e3
Update SECURITY.md links to docs.taco.build 2025-01-29 20:01:00 +01:00
Manuel Montenegro c471721256
Update README links to docs 2025-01-29 20:00:53 +01:00
Derek Pierre ee26e9ecad
Merge pull request #3571 from derekpierre/non-evm-rpc
JsonRpcCondition (JSON RPC 2.0 specification)
2025-01-06 08:41:19 -05:00
derekpierre 74df16e015
Apply AI RFCs from #3571.
- Use random uuid4 as id for request
- Improve error handling in case code/message isn't available.
- Add to headers dictionary instead of recreating
- offchain -> off-chain
2025-01-02 10:04:15 -05:00
derekpierre f718a00ba1
Add common base condition class for JSON Api and Rpc for common verify method. 2024-12-29 20:58:58 -05:00
derekpierre 6553f6bd77
Ensure that result field is present in JSON RPC response before processing. 2024-12-29 20:42:41 -05:00
derekpierre cc1954cf04
Add acceptance test that showcases possible prototyping strategy for making RPC calls on non-evm blockchains. 2024-12-20 09:35:50 -05:00
derekpierre b7cb9375a7
Improve test coverage.
Minor code clean up.
2024-12-19 10:33:02 -05:00
derekpierre cd7a0de529
Add newsfragment for #3571. 2024-12-19 10:33:01 -05:00
derekpierre bc8ff993c8
Fix processing logic of json path query; proper exceptions are handled and raised. 2024-12-19 10:33:00 -05:00
derekpierre 834cd7dd69
Clean up repeated member variable from JsonRpcCondition. 2024-12-19 10:33:00 -05:00
derekpierre 258f5cd3ae
Use json parameter instead of data when using requests.post; also simplifies testing. 2024-12-19 10:32:59 -05:00
derekpierre 91779df1fb
Add unit tests for JsonRpcCondition. 2024-12-19 10:32:58 -05:00
derekpierre e51a02c26a
Split out JsonPathField tests into its own test module. 2024-12-19 10:32:57 -05:00
derekpierre 9440dd1820
Update exception error message for failed JSON rpc call. 2024-12-19 10:32:56 -05:00
derekpierre 3cade99a43
Fix incorrect naming. 2024-12-19 10:32:55 -05:00
derekpierre 504c2d0498
Update code based on limitations of python 3.9. `http.HTTPMethod` and `typing.override` are not available. 2024-12-19 10:32:54 -05:00
derekpierre a629f9b9a1
Allow authorization_token to be passed along.
Some code clean up.
2024-12-19 10:32:53 -05:00
derekpierre 4655d667e4
Initial functionality for JSON RPC conditions. These are split into two types: JsonRpcCondition (any json endpoint, where the endpoint is specified), NonEvmJsonRpcCondition where default RPC endpoints based on blockchain name are utilized.
JsonRpcCondition could be used as is for GraphQL type functionality.
NonEvmRpcCondition is specific to non-evm blockchains - unsure which we will support at the moment; at least "solana" and "bitcoin"...what does this mean for `:userAddress`...?
2024-12-19 10:32:52 -05:00
derekpierre 2a112005ff
Refactor JSON functionality into its own package.
JsonRequestCall is the base abstract class for all HTTPS JSON-based requests.
JsonApiCall subclasses JSONRequestCall for use with the JsonApiCondition.
Update imports and references accordingly.
2024-12-19 10:32:51 -05:00
Derek Pierre 254b0c54fb
Merge pull request #3569 from derekpierre/any-rpc
EVM Condition on "Any" (Major) EVM Chain (only `lynx` for now)
2024-12-19 08:36:17 -05:00
derekpierre 779a4534f7
Apply RFCs for #3569.
Co-authored-by: David Núñez <david@nucypher.com>
2024-12-18 10:27:45 -05:00
derekpierre 9494ede171
Apply RFCs - update variable name, and update associated log/exception messages. 2024-12-16 09:27:10 -05:00
derekpierre dde6c06b58
Apply RFC - rename CHAINLIST_URL constant. 2024-12-16 09:17:48 -05:00
James Campbell d1460a40ee
Remove commented line 2024-12-13 10:06:14 +01:00