forked from coinbase/mesh-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
deafbd6
commit 880e03e
Showing
27 changed files
with
447 additions
and
17 deletions.
There are no files selected for viewing
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,26 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionCombineRequest ConstructionCombineRequest is the input to the `/construction/combine` | ||
// endpoint. It contains the unsigned transaction blob returned by `/construction/payloads` and all | ||
// required signatures to create a network transaction. | ||
type ConstructionCombineRequest struct { | ||
NetworkIdentifier *NetworkIdentifier `json:"network_identifier"` | ||
UnsignedTransaction string `json:"unsigned_transaction"` | ||
Signatures []*Signature `json:"signatures"` | ||
} |
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,23 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionCombineResponse ConstructionCombineResponse is returned by `/construction/combine`. | ||
// The network payload will be sent directly to the `construction/submit` endpoint. | ||
type ConstructionCombineResponse struct { | ||
SignedTransaction string `json:"signed_transaction"` | ||
} |
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,27 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionDeriveRequest ConstructionDeriveRequest is passed to the `/construction/derive` | ||
// endpoint. Network is provided in the request because some blockchains have different address | ||
// formats for different networks. Metadata is provided in the request because some blockchains | ||
// allow for multiple address types (i.e. different address for validators vs normal accounts). | ||
type ConstructionDeriveRequest struct { | ||
NetworkIdentifier *NetworkIdentifier `json:"network_identifier"` | ||
PublicKey *PublicKey `json:"public_key"` | ||
Metadata map[string]interface{} `json:"metadata,omitempty"` | ||
} |
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,25 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionDeriveResponse ConstructionDeriveResponse is returned by the `/construction/derive` | ||
// endpoint. | ||
type ConstructionDeriveResponse struct { | ||
// Address in network-specific format. | ||
Address string `json:"address"` | ||
Metadata map[string]interface{} `json:"metadata,omitempty"` | ||
} |
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,23 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionHashResponse ConstructionHashResponse is the output of the `/construction/hash` | ||
// endpoint. | ||
type ConstructionHashResponse struct { | ||
TransactionHash string `json:"transaction_hash"` | ||
} |
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,28 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionParseRequest ConstructionParseRequest is the input to the `/construction/parse` | ||
// endpoint. It allows the caller to parse either an unsigned or signed transaction. | ||
type ConstructionParseRequest struct { | ||
NetworkIdentifier *NetworkIdentifier `json:"network_identifier"` | ||
// Signed is a boolean indicating whether the transaction is signed. | ||
Signed bool `json:"signed"` | ||
// This must be either the unsigned transaction blob returned by `/construction/payloads` or the | ||
// signed transaction blob returned by `/construction/combine`. | ||
Transaction string `json:"transaction"` | ||
} |
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,27 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionParseResponse ConstructionParseResponse contains an array of operations that occur in | ||
// a transaction blob. This should match the array of operations provided to | ||
// `/construction/preprocess` and `/construction/payloads`. | ||
type ConstructionParseResponse struct { | ||
Operations []*Operation `json:"operations"` | ||
// All signers of a particular transaction. If the transaction is unsigned, it should be empty. | ||
Signers []string `json:"signers"` | ||
Metadata map[string]interface{} `json:"metadata,omitempty"` | ||
} |
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,26 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionPayloadsRequest ConstructionPayloadsRequest is the request to | ||
// `/construction/payloads`. It contains the network, a slice of operations, and arbitrary metadata | ||
// that was returned by the call to `/construction/metadata`. | ||
type ConstructionPayloadsRequest struct { | ||
NetworkIdentifier *NetworkIdentifier `json:"network_identifier"` | ||
Operations []*Operation `json:"operations"` | ||
Metadata map[string]interface{} `json:"metadata,omitempty"` | ||
} |
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,26 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionPayloadsResponse ConstructionTransactionResponse is returned by | ||
// `/construction/payloads`. It contains an unsigned transaction blob (that is usually needed to | ||
// construct the a network transaction from a collection of signatures) and an array of payloads | ||
// that must be signed by the caller. | ||
type ConstructionPayloadsResponse struct { | ||
UnsignedTransaction string `json:"unsigned_transaction"` | ||
Payloads []*SigningPayload `json:"payloads"` | ||
} |
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,26 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionPreprocessRequest ConstructionPreprocessRequest is passed to the | ||
// `/construction/preprocess` endpoint so that a Rosetta implementation can determine which metadata | ||
// it needs to request for construction. | ||
type ConstructionPreprocessRequest struct { | ||
NetworkIdentifier *NetworkIdentifier `json:"network_identifier"` | ||
Operations []*Operation `json:"operations"` | ||
Metadata map[string]interface{} `json:"metadata,omitempty"` | ||
} |
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,25 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// ConstructionPreprocessResponse ConstructionPreprocessResponse contains the request that will be | ||
// sent directly to `/construction/metadata`. If it is not necessary to make a request to | ||
// `/construction/metadata`, options should be null. | ||
type ConstructionPreprocessResponse struct { | ||
// The options that will be sent directly to `/construction/metadata` by the caller. | ||
Options map[string]interface{} `json:"options,omitempty"` | ||
} |
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,28 @@ | ||
// Copyright 2020 Coinbase, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
|
||
package types | ||
|
||
// CurveType CurveType is the type of cryptographic curve associated with a PublicKey. * secp256k1: | ||
// SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * edwards25519: `y | ||
// (255-bits) || x-sign-bit (1-bit)` - `32 bytes` (https://ed25519.cr.yp.to/ed25519-20110926.pdf) | ||
type CurveType string | ||
|
||
// List of CurveType | ||
const ( | ||
Secp256k1 CurveType = "secp256k1" | ||
Edwards25519 CurveType = "edwards25519" | ||
) |
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
Oops, something went wrong.