Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MYST-18 define client promise #32

Merged
merged 13 commits into from Sep 26, 2017

Conversation

Projects
None yet
3 participants
@interro
Copy link
Contributor

commented Sep 13, 2017

No description provided.

@interro interro requested review from Waldz and cirka Sep 13, 2017

@cirka
Copy link

left a comment

A minimal promise contains: issuer_id, benefiter_id, serial_number and amount.
Issuer's signature complements promise when send to benefiter.
benefiter compliments the promise and the issuer's signature with his own signature over promise when communicating with smart contract to clear the promise.
The actual data send depends on use case.

@cirka
Copy link

left a comment

Remove unneeded fields or provide rationale for inclusion.

"id": 1,
"proposal_id": 1,
"issuer_id": 1,
"amount": 5,

This comment has been minimized.

Copy link
@Waldz

Waldz Sep 15, 2017

Member

Should be Price structure

This comment has been minimized.

Copy link
@cirka

cirka Sep 15, 2017

amount of tokens promised is no scalar. It a very long int ..

@@ -0,0 +1,11 @@
{
"promise": {
"id": 1,

This comment has been minimized.

Copy link
@Waldz

Waldz Sep 15, 2017

Member

Should not be serial_number?

This comment has been minimized.

Copy link
@cirka

cirka Sep 15, 2017

It should be serial_number +

"proposal_id": 1,
"issuer_id": 1,
"amount": 5,
"date_created": "unix_timestamp"

This comment has been minimized.

Copy link
@Waldz

Waldz Sep 15, 2017

Member

What is format example? What about timezone?

This comment has been minimized.

Copy link
@cirka

cirka Sep 15, 2017

We do not need a timestamp in a promise structure at all.

SerialNumber int
IssuerId int
BenefiterId int
Amount int

This comment has been minimized.

Copy link
@Waldz

Waldz Sep 15, 2017

Member
  • Use type from service_discovery/dto/price.go
  • Rename Price -> Money
@@ -0,0 +1,8 @@
package dto

type ClientPromise struct {

This comment has been minimized.

Copy link
@Waldz

Waldz Sep 15, 2017

Member
  • Create structure type Signature string
  • Add field issuerSignature *Signature, test if is nil by default
  • Add field BenefiterSignature *Signature, test if is nil` by default
package dto

type Money struct {
Amount uint64

This comment has been minimized.

Copy link
@Waldz

Waldz Sep 26, 2017

Member

Some tests probably broke, check by running bin/test

@Waldz

Waldz approved these changes Sep 26, 2017

Fixed

@Waldz Waldz merged commit 77e7d0c into master Sep 26, 2017

@Waldz Waldz deleted the feature/MYST-18-client-promise branch Sep 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.