* removed some more code smell/error message aggregation
* removed obsolete/duplicate tests/code
* excluded TODOs (simulation) from being processed by sonarqube
* removed TODO code
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
---------
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
* aggregating error messages
* removed duplicate err msgs
* removed obsolete test (two times equal behaviour )
* added global error msg module
* refactored test utils to have sample types and sample objects by keepers separated
* excluded auto-generated code from sonarcube analysis
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
* extended AttestMachine FundAccount to support a given fee denominator
* renamed testutil/network/network.go to testutil/network/loader.go
* renamed new to Load
* integrated cosmos/testutil/network to planetmint-go/testutil/network
* changed to plmnt token tests only!
* removed obsolete variables
* fixed newest linter issues
---------
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
* feature: add ante handler to block non validators from sending restricted txs
* fix: add missing msg types and linter errors
* fix: staticcheck error
* refactor: use fallthrough on ante handle switch
* fix: set val address on machine attest test
---------
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
* [staticcheck] Fix comments on exported functions and structs
* [ci] Improve staticcheck setup
- Add global staticcheck.conf file
- Ignore: at least one file in a package should have a package comment (ST1000)
- Ignore deprecation warnings. They are reported by golangci-lint and
there we have a proper way to exclude generated files.
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* add mint address to config file
* ignite scaffold type mint-request beneficiary amount liquid-tx-hash --module dao
* add mintrequest stores
* rename mint_request.go
* add unit tests for mint request store
* ignite scaffold message mint-token mint-request:MintRequest --module dao
* add ante handler for mint address
* add msg validation for mint request
* fix staticcheck error
* ignite scaffold query get-mint-requests-by-hash hash --response mint-request:MintRequest --module dao
* add a query for mint request and additional validation for msg server
* add mock for mint unit testing
* add unit test for mint token msg server
* add unit tests for query mint requests by hash
* ignite scaffold query mint-requests-by-address address --response mint-requests:MintRequests --module dao
* implement query mint requests by address and unit tests
* add e2e test for token mint
---------
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
* initial asset notarization restructuring
* adjusted test cases, two are still failing
* removed obsolete data structures
---------
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This is the quasi-standard and fixes the error below:
```
$ go get -u github.com/planetmint/planetmint-go@v0.1.0
go: github.com/planetmint/planetmint-go@v0.1.0: parsing go.mod:
module declares its path as: planetmint-go
but was required as: github.com/planetmint/planetmint-go
```
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* added upper and lower case TA resolution testing
* added more detailed error reporting to the ValidateSignature method.
* extended test cases to test and verify these errs and their differences
* fixed CID attestation issue. CIDs are send in web compatible encoding that is not hex encoded and can be utilized without any further decoding on the server side.
* added checks and error handling for the Ta store object storage/loading
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
Up to know we just use the Bitcoin mainnet parameters
`chaincfg.MainNetParams` for Liquid. That's okay, because we use them
for creating and verifying extended private and public keys. Those only
depend on `HDPrivateKeyID` and `HDPublicKeyID`, which are the same for
Bitcoin and Liquid networks.
The only real difference is the `HDCoinType` used for key derivation,
which we want to use in the future. So it is a good idea to introduce
this value now.
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* Fix package and domain name
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* Add extended public key as `IssuerPlanetmint`
This patch introduces parts of the `chaincfg` for Planetmint and
especially the magic bytes that produces extended keys with the prefix
`pmpr` for a Planetmint extended private key and `pmpb` for a Planetmint
extended public key.
// Closes https://github.com/rddl-network/issues/issues/30
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* Validate Planetmint extended public key during machine attestation
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* [lint] Fix error return value is not checked
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
---------
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
* adjusted the default derivation path for the test cases to planetmint cointype
* [test] Update sample.PubKey
Changed due to updated derivation path.
* [test] Set comment for DefaultDerivationPath
---------
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
Co-authored-by: Julian Strobl <jmastr@mailbox.org>
removed not working hex.DecodeString(cid)
removed potential double hashing (hashing the hash with the same hash method)
removed the double hashing and the encoding issue from the serverside asset message verification code.
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>