-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from rarimo/reg-request/add-metadata
added metadata in request and change docs
- Loading branch information
Showing
8 changed files
with
152 additions
and
117 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type: object | ||
x-go-is-request: true | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/RegistrationRequestData' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
type: object | ||
required: | ||
- tx_data | ||
- no_send | ||
properties: | ||
meta: | ||
type: object | ||
description: "Metadata if it is required" | ||
example: {"source": "web", "user_id": 123} | ||
tx_data: | ||
type: string | ||
no_send: | ||
type: bool | ||
description: Flag indicates whether transaction should be sent on-chain | ||
example: true | ||
destination: | ||
type: string | ||
example: "0xC0B09085Fa2ad3A8BbF96494B8d5cd10702FE20d" | ||
description: Address of registration smart contract | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* GENERATED. Do not modify. Your changes might be overwritten! | ||
*/ | ||
|
||
package resources | ||
|
||
type RegistrationRequest struct { | ||
Data RegistrationRequestData `json:"data"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* GENERATED. Do not modify. Your changes might be overwritten! | ||
*/ | ||
|
||
package resources | ||
|
||
type RegistrationRequestData struct { | ||
// Address of registration smart contract | ||
Destination *string `json:"destination,omitempty"` | ||
// Metadata if it is required | ||
Meta *map[string]interface{} `json:"meta,omitempty"` | ||
// Flag indicates whether transaction should be sent on-chain | ||
NoSend bool `json:"no_send"` | ||
TxData string `json:"tx_data"` | ||
} |