17 Commits

Author SHA1 Message Date
Jürgen Eckel
b4ddc44044
* integrated ante-handler
* added two new config variables: reissuance-asset and validator-address

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2023-10-10 01:24:28 +02:00
Jürgen Eckel
ef52e51ec8
Merge branch 'main' into 124-propose-a-liquid-issuance-to-the-network-unsigned-transaction 2023-10-06 12:00:08 +02:00
Julian Strobl
ec77832ca1
Fix missing quotes
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-10-06 11:54:24 +02:00
Jürgen Eckel
b81cdb6dc9
Merge branch 'main' into 124-propose-a-liquid-issuance-to-the-network-unsigned-transaction
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2023-10-05 16:09:10 +02:00
Lorenz Herzberger
7a3ccccc7a
119 create dao msg to mint plmnt on demand (#122)
* 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>
2023-10-05 15:38:53 +02:00
Jürgen Eckel
4ad86048a5
initial reissue rddl proposal message
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2023-10-05 15:02:36 +02:00
Jürgen Eckel
f11f66e14f
112 direct call to issue2liquid (#121)
* removed IssueResponseHandler
* added asset-registration endpoint config
* added methods to locally issue the asset and register it
* added issue_service directory configuration
* removed obsolete configuration options
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

---------

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2023-10-05 12:38:35 +02:00
Lorenz Herzberger
c12a30c71a
2 trigger token reissuance on liquid including the distribution (#96)
* add pop epochs to config

* add config for triggering RDDL issuance

---------

Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-09-28 16:07:02 +02:00
Lorenz Herzberger
86a85913cf
add GetMachineByAddress capabilities
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-09-25 16:42:26 +02:00
Julian Strobl
2f2adb4543
Fix toml: incomplete number
```
$ go build -v ./cmd/planetmint-god/
$ rm -rf ~/.planetmint-go ~/.ignite
$ ignite chain init --check-dependencies --clear-cache
```

https://github.com/spf13/viper/issues/1434#issuecomment-1259326026

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-09-12 14:36:14 +02:00
Lorenz Herzberger
c58dda2034
add denoms to config
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-09-05 11:03:42 +02:00
Julian Strobl
3fe9c018cd
Introduce Liquid network parameters (#64)
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>
2023-08-11 12:05:58 +02:00
Julian Strobl
1383d0aaa6
Add extended public key as IssuerPlanetmint (#62)
* 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>
2023-08-11 09:14:52 +02:00
Jürgen Eckel
01ef2dbfd0
Improve communication to liquid issuance service (#58)
* added OSC response listener with logging

added Machine NFT issuance for each machine attestation process
added CID and Planetmint Issuer extPublicKey to the issuance process
removed type inconsistency

* added machine NFT creation criteria

* [toml] Parsing does not allow sub-structs

* made OSC listener port configurable

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>
2023-08-04 16:38:18 +02:00
Julian Strobl
4ba12f7b03
[config] Add planetmint section to app.toml
This patch extends `app.toml` and adds the following section with these
default values:

```
[planetmint]
watchmen-endpoint = "localhost"
watchmen-port = 7401
```

A global singleton `plmntConfig` is introduced to save and access the
values similar to how cosmos does it (see
vendor/github.com/cosmos/cosmos-sdk/types/config.go).

Different environments can be managed by changing the values in
`app.toml` and restarting the daemon.

// Closes #53

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-08-04 10:53:38 +02:00
Lorenz Herzberger
b92758268d
rename config and adjust osc call
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2023-07-31 08:21:28 +02:00
Lorenz Herzberger
238e68808b
add config for watchmen
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
2023-07-31 08:21:28 +02:00