forked from coinbase/mesh-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
construction_preprocess_request.go
38 lines (35 loc) · 2.33 KB
/
construction_preprocess_request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2022 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. Metadata provided in this object should NEVER be a product
// of live data (i.e. the caller must follow some network-specific data fetching strategy outside of
// the Construction API to populate required Metadata). If live data is required for construction,
// it MUST be fetched in the call to `/construction/metadata`. The caller can provide a max fee they
// are willing to pay for a transaction. This is an array in the case fees must be paid in multiple
// currencies. The caller can also provide a suggested fee multiplier to indicate that the suggested
// fee should be scaled. This may be used to set higher fees for urgent transactions or to pay lower
// fees when there is less urgency. It is assumed that providing a very low multiplier (like 0.0001)
// will never lead to a transaction being created with a fee less than the minimum network fee (if
// applicable). In the case that the caller provides both a max fee and a suggested fee multiplier,
// the max fee will set an upper bound on the suggested fee (regardless of the multiplier provided).
type ConstructionPreprocessRequest struct {
NetworkIdentifier *NetworkIdentifier `json:"network_identifier"`
Operations []*Operation `json:"operations"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
MaxFee []*Amount `json:"max_fee,omitempty"`
SuggestedFeeMultiplier *float64 `json:"suggested_fee_multiplier,omitempty"`
}