trustbloc / agent-sdk Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Based on latest updates in hyperledger-archives/aries-framework-go#3073
Currently when you start up agent-sdk with the SDS storage provider option, it uses JSIndexedDB as a local KMS provider.
MySQL support used to be there but was removed during the transition to the new Aries storage interface since a new implementation of MySQL wasn't available yet.
Update sidetree, did-method
Part of trustbloc/wallet#721
Once aries-framework-go is updated to allow for KMS storage to be separate from storage for other data, update the code here to use a persistent key.
agent-sdk/pkg/auth/zcapld/service.go
Line 63 in a54dfe5
SignHeader()
should accept the capability invocation's action as a parameter because only the caller can reliably set the appropriate action based on a shared understanding with the remote service. This is more evident with the implementation of zcapld authz in hub-kms where the allowedActions
cannot be derived solely from the http request's method.
This release adds the following features to the Agent SDK.
REST SDK
.TODO:
Timeout values were temporarily increased in #85 to accommodate testing of our EDV solution, which currently is very slow for various reasons. Once this is fixed, reduce this timeout.
Support kmsType argument instead of useRemoteKMS similar to storageType
agent-sdk/cmd/agent-js-worker/main.go
Line 125 in 3711fac
Refer: trustbloc/wallet#745
Add tests for wallet SDK for providing coverage as well as for demonstrating usage
When running make run-openapi-demo
I get the following error:
Generating Aries-Framework-Go Test PKI
Signature ok
subject=/C=CA/ST=ON/O=Example Inc.:Aries-Framework-Go/OU=Aries-Framework-Go/CN=*.example.com
Getting CA Private Key
done generating Agent SDK PKI
Generating and validating controller API specifications using Open API
Generating Open API spec
Validating generated spec
2021/05/04 08:12:35
The swagger spec at "build/rest/openapi/spec/openAPI.yml" showed up some valid but possibly unwanted constructs.
2021/05/04 08:12:35 See warnings below:
2021/05/04 08:12:35 - WARNING: definition "#/definitions/genericErrorBody" is not used anywhere
2021/05/04 08:12:35 - WARNING: definition "#/definitions/DIDArgs" is not used anywhere
The swagger spec at "build/rest/openapi/spec/openAPI.yml" is invalid against swagger specification 2.0.
See errors below:
make: *** [Makefile:91: generate-openapi-spec] Error 1
Rename tag 'purpose' to 'purposes' (used for creating did doc)
Need to add bdd tests for following bindings.
mediator connect
mediator reconnect all - moved to aries
mediator create invitation
mediator send create connection request
Update sidetree, did-method
Based on TODO
agent-sdk/pkg/auth/zcapld/service.go
Lines 161 to 162 in 2026a35
Currently, project uses golang v1.16.
This change will need to happen in aries-framework-go before the code here is updated.
Refer : trustbloc/wallet#478
At the end of our WASM command functions, we call command.WriteNillableResponse
before writing a success log message.
For instance, in pkg/controller/command/blindedrouting/command.go
there's a function called SendDIDDocRequest
. Near the end of the function is the following:
command.WriteNillableResponse(rw, &DIDDocResponse{resMsg}, logger)
logutil.LogDebug(logger, CommandName, SendDIDDocRequest, successString)
The problem here is that command.WriteNillableResponse
can have a failure, which gets logged inside that function. But the caller won't know that happened, and a success message gets logged regardless. In the event of an error, we shouldn't be logging a success message.
Currently, the wasm size is around 8.3MB and its built with go bin. We can look to use tinygo inorder to reduce the wasm size.
Currently, gocritic
disables whyNoLint
check. We need to enable it. See golangci.yml
.
Support for
LevelDB support used to be there but was removed during the transition to the new Aries storage interface since a new implementation of LevelDB wasn't available yet.
Update did-method
https://github.com/trustbloc/agent-sdk/pull/247/files#diff-6e52a164a6538e0375d37c39dee8dda38b2721b4dcd1d9b2ae6300869344d208R603 updates code to take a context provider url. I not provided, it fails during run time.
Currently we create our own and pass it in. This will require an update to aries-framework-go before this can be updated.
Idea is to create simplified APIs that can be used by sdk, browser(js/wasm binding), mobile native(gomobile), rest bindings for the business logic present in edge-agent (currently, it's written in Javascript). Instead of repeating these in individual bindings, we need to move the JS code to Golang code and expose them through different bindings.
The list includes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.