diff --git a/gen/client/.openapi-generator/FILES b/gen/client/.openapi-generator/FILES index 0752365..8321885 100644 --- a/gen/client/.openapi-generator/FILES +++ b/gen/client/.openapi-generator/FILES @@ -13,6 +13,7 @@ api_trades.go api_transfers.go api_users.go api_validators.go +api_wallet_stake.go api_wallets.go api_webhooks.go client.go @@ -88,9 +89,11 @@ docs/UsersAPI.md docs/Validator.md docs/ValidatorDetails.md docs/ValidatorList.md +docs/ValidatorStatus.md docs/ValidatorsAPI.md docs/Wallet.md docs/WalletList.md +docs/WalletStakeAPI.md docs/WalletsAPI.md docs/Webhook.md docs/WebhookEventFilter.md @@ -159,6 +162,7 @@ model_user.go model_validator.go model_validator_details.go model_validator_list.go +model_validator_status.go model_wallet.go model_wallet_list.go model_webhook.go diff --git a/gen/client/README.md b/gen/client/README.md index e946e3b..0fdc0bf 100644 --- a/gen/client/README.md +++ b/gen/client/README.md @@ -97,14 +97,11 @@ Class | Method | HTTP request | Description *ServerSignersAPI* | [**ListServerSigners**](docs/ServerSignersAPI.md#listserversigners) | **Get** /v1/server_signers | List server signers for the current project *ServerSignersAPI* | [**SubmitServerSignerSeedEventResult**](docs/ServerSignersAPI.md#submitserversignerseedeventresult) | **Post** /v1/server_signers/{server_signer_id}/seed_event_result | Submit the result of a server signer event *ServerSignersAPI* | [**SubmitServerSignerSignatureEventResult**](docs/ServerSignersAPI.md#submitserversignersignatureeventresult) | **Post** /v1/server_signers/{server_signer_id}/signature_event_result | Submit the result of a server signer event -*StakeAPI* | [**BroadcastStakingOperation**](docs/StakeAPI.md#broadcaststakingoperation) | **Post** /v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}/broadcast | Broadcast a staking operation *StakeAPI* | [**BuildStakingOperation**](docs/StakeAPI.md#buildstakingoperation) | **Post** /v1/stake/build | Build a new staking operation -*StakeAPI* | [**CreateStakingOperation**](docs/StakeAPI.md#createstakingoperation) | **Post** /v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations | Create a new staking operation for an address *StakeAPI* | [**FetchHistoricalStakingBalances**](docs/StakeAPI.md#fetchhistoricalstakingbalances) | **Get** /v1/networks/{network_id}/addresses/{address_id}/stake/balances | Fetch historical staking balances *StakeAPI* | [**FetchStakingRewards**](docs/StakeAPI.md#fetchstakingrewards) | **Post** /v1/stake/rewards/search | Fetch staking rewards *StakeAPI* | [**GetExternalStakingOperation**](docs/StakeAPI.md#getexternalstakingoperation) | **Get** /v1/networks/{network_id}/addresses/{address_id}/staking_operations/{staking_operation_id} | Get the latest state of a staking operation *StakeAPI* | [**GetStakingContext**](docs/StakeAPI.md#getstakingcontext) | **Post** /v1/stake/context | Get staking context -*StakeAPI* | [**GetStakingOperation**](docs/StakeAPI.md#getstakingoperation) | **Get** /v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id} | Get the latest state of a staking operation *TradesAPI* | [**BroadcastTrade**](docs/TradesAPI.md#broadcasttrade) | **Post** /v1/wallets/{wallet_id}/addresses/{address_id}/trades/{trade_id}/broadcast | Broadcast a trade *TradesAPI* | [**CreateTrade**](docs/TradesAPI.md#createtrade) | **Post** /v1/wallets/{wallet_id}/addresses/{address_id}/trades | Create a new trade for an address *TradesAPI* | [**GetTrade**](docs/TradesAPI.md#gettrade) | **Get** /v1/wallets/{wallet_id}/addresses/{address_id}/trades/{trade_id} | Get a trade by ID @@ -116,6 +113,9 @@ Class | Method | HTTP request | Description *UsersAPI* | [**GetCurrentUser**](docs/UsersAPI.md#getcurrentuser) | **Get** /v1/users/me | Get current user *ValidatorsAPI* | [**GetValidator**](docs/ValidatorsAPI.md#getvalidator) | **Get** /v1/networks/{network_id}/assets/{asset_id}/validators/{validator_id} | Get a validator belonging to the CDP project *ValidatorsAPI* | [**ListValidators**](docs/ValidatorsAPI.md#listvalidators) | **Get** /v1/networks/{network_id}/assets/{asset_id}/validators | List validators belonging to the CDP project +*WalletStakeAPI* | [**BroadcastStakingOperation**](docs/WalletStakeAPI.md#broadcaststakingoperation) | **Post** /v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}/broadcast | Broadcast a staking operation +*WalletStakeAPI* | [**CreateStakingOperation**](docs/WalletStakeAPI.md#createstakingoperation) | **Post** /v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations | Create a new staking operation for an address +*WalletStakeAPI* | [**GetStakingOperation**](docs/WalletStakeAPI.md#getstakingoperation) | **Get** /v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id} | Get the latest state of a staking operation *WalletsAPI* | [**CreateWallet**](docs/WalletsAPI.md#createwallet) | **Post** /v1/wallets | Create a new wallet *WalletsAPI* | [**GetWallet**](docs/WalletsAPI.md#getwallet) | **Get** /v1/wallets/{wallet_id} | Get wallet by ID *WalletsAPI* | [**GetWalletBalance**](docs/WalletsAPI.md#getwalletbalance) | **Get** /v1/wallets/{wallet_id}/balances/{asset_id} | Get the balance of an asset in the wallet @@ -190,6 +190,7 @@ Class | Method | HTTP request | Description - [Validator](docs/Validator.md) - [ValidatorDetails](docs/ValidatorDetails.md) - [ValidatorList](docs/ValidatorList.md) + - [ValidatorStatus](docs/ValidatorStatus.md) - [Wallet](docs/Wallet.md) - [WalletList](docs/WalletList.md) - [Webhook](docs/Webhook.md) @@ -221,5 +222,5 @@ Each of these functions takes a value of the given basic type and returns a poin ## Author -yuga.cohler@coinbase.com + diff --git a/gen/client/api_addresses.go b/gen/client/api_addresses.go index 83f9564..bb86901 100644 --- a/gen/client/api_addresses.go +++ b/gen/client/api_addresses.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_assets.go b/gen/client/api_assets.go index 2bc7e18..7ac266e 100644 --- a/gen/client/api_assets.go +++ b/gen/client/api_assets.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_contract_events.go b/gen/client/api_contract_events.go index 73669b1..9971412 100644 --- a/gen/client/api_contract_events.go +++ b/gen/client/api_contract_events.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_external_addresses.go b/gen/client/api_external_addresses.go index 08bebe6..d6a1565 100644 --- a/gen/client/api_external_addresses.go +++ b/gen/client/api_external_addresses.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_networks.go b/gen/client/api_networks.go index cc941fb..16566c5 100644 --- a/gen/client/api_networks.go +++ b/gen/client/api_networks.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_server_signers.go b/gen/client/api_server_signers.go index 02ad7e6..7c9cfe0 100644 --- a/gen/client/api_server_signers.go +++ b/gen/client/api_server_signers.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_stake.go b/gen/client/api_stake.go index c02428f..ea5f69f 100644 --- a/gen/client/api_stake.go +++ b/gen/client/api_stake.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,23 +23,6 @@ import ( type StakeAPI interface { - /* - BroadcastStakingOperation Broadcast a staking operation - - Broadcast a staking operation. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param walletId The ID of the wallet the address belongs to. - @param addressId The ID of the address the staking operation belongs to. - @param stakingOperationId The ID of the staking operation to broadcast. - @return ApiBroadcastStakingOperationRequest - */ - BroadcastStakingOperation(ctx context.Context, walletId string, addressId string, stakingOperationId string) ApiBroadcastStakingOperationRequest - - // BroadcastStakingOperationExecute executes the request - // @return StakingOperation - BroadcastStakingOperationExecute(r ApiBroadcastStakingOperationRequest) (*StakingOperation, *http.Response, error) - /* BuildStakingOperation Build a new staking operation @@ -55,22 +37,6 @@ type StakeAPI interface { // @return StakingOperation BuildStakingOperationExecute(r ApiBuildStakingOperationRequest) (*StakingOperation, *http.Response, error) - /* - CreateStakingOperation Create a new staking operation for an address - - Create a new staking operation. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param walletId The ID of the wallet the address belongs to. - @param addressId The ID of the address to create the staking operation for. - @return ApiCreateStakingOperationRequest - */ - CreateStakingOperation(ctx context.Context, walletId string, addressId string) ApiCreateStakingOperationRequest - - // CreateStakingOperationExecute executes the request - // @return StakingOperation - CreateStakingOperationExecute(r ApiCreateStakingOperationRequest) (*StakingOperation, *http.Response, error) - /* FetchHistoricalStakingBalances Fetch historical staking balances @@ -131,158 +97,11 @@ type StakeAPI interface { // GetStakingContextExecute executes the request // @return StakingContext GetStakingContextExecute(r ApiGetStakingContextRequest) (*StakingContext, *http.Response, error) - - /* - GetStakingOperation Get the latest state of a staking operation - - Get the latest state of a staking operation. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param walletId The ID of the wallet the address belongs to - @param addressId The ID of the address to fetch the staking operation for. - @param stakingOperationId The ID of the staking operation. - @return ApiGetStakingOperationRequest - */ - GetStakingOperation(ctx context.Context, walletId string, addressId string, stakingOperationId string) ApiGetStakingOperationRequest - - // GetStakingOperationExecute executes the request - // @return StakingOperation - GetStakingOperationExecute(r ApiGetStakingOperationRequest) (*StakingOperation, *http.Response, error) } // StakeAPIService StakeAPI service type StakeAPIService service -type ApiBroadcastStakingOperationRequest struct { - ctx context.Context - ApiService StakeAPI - walletId string - addressId string - stakingOperationId string - broadcastStakingOperationRequest *BroadcastStakingOperationRequest -} - -func (r ApiBroadcastStakingOperationRequest) BroadcastStakingOperationRequest(broadcastStakingOperationRequest BroadcastStakingOperationRequest) ApiBroadcastStakingOperationRequest { - r.broadcastStakingOperationRequest = &broadcastStakingOperationRequest - return r -} - -func (r ApiBroadcastStakingOperationRequest) Execute() (*StakingOperation, *http.Response, error) { - return r.ApiService.BroadcastStakingOperationExecute(r) -} - -/* -BroadcastStakingOperation Broadcast a staking operation - -Broadcast a staking operation. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param walletId The ID of the wallet the address belongs to. - @param addressId The ID of the address the staking operation belongs to. - @param stakingOperationId The ID of the staking operation to broadcast. - @return ApiBroadcastStakingOperationRequest -*/ -func (a *StakeAPIService) BroadcastStakingOperation(ctx context.Context, walletId string, addressId string, stakingOperationId string) ApiBroadcastStakingOperationRequest { - return ApiBroadcastStakingOperationRequest{ - ApiService: a, - ctx: ctx, - walletId: walletId, - addressId: addressId, - stakingOperationId: stakingOperationId, - } -} - -// Execute executes the request -// @return StakingOperation -func (a *StakeAPIService) BroadcastStakingOperationExecute(r ApiBroadcastStakingOperationRequest) (*StakingOperation, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *StakingOperation - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StakeAPIService.BroadcastStakingOperation") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}/broadcast" - localVarPath = strings.Replace(localVarPath, "{"+"wallet_id"+"}", url.PathEscape(parameterValueToString(r.walletId, "walletId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"address_id"+"}", url.PathEscape(parameterValueToString(r.addressId, "addressId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"staking_operation_id"+"}", url.PathEscape(parameterValueToString(r.stakingOperationId, "stakingOperationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.broadcastStakingOperationRequest == nil { - return localVarReturnValue, nil, reportError("broadcastStakingOperationRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.broadcastStakingOperationRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - type ApiBuildStakingOperationRequest struct { ctx context.Context ApiService StakeAPI @@ -401,132 +220,6 @@ func (a *StakeAPIService) BuildStakingOperationExecute(r ApiBuildStakingOperatio return localVarReturnValue, localVarHTTPResponse, nil } -type ApiCreateStakingOperationRequest struct { - ctx context.Context - ApiService StakeAPI - walletId string - addressId string - createStakingOperationRequest *CreateStakingOperationRequest -} - -func (r ApiCreateStakingOperationRequest) CreateStakingOperationRequest(createStakingOperationRequest CreateStakingOperationRequest) ApiCreateStakingOperationRequest { - r.createStakingOperationRequest = &createStakingOperationRequest - return r -} - -func (r ApiCreateStakingOperationRequest) Execute() (*StakingOperation, *http.Response, error) { - return r.ApiService.CreateStakingOperationExecute(r) -} - -/* -CreateStakingOperation Create a new staking operation for an address - -Create a new staking operation. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param walletId The ID of the wallet the address belongs to. - @param addressId The ID of the address to create the staking operation for. - @return ApiCreateStakingOperationRequest -*/ -func (a *StakeAPIService) CreateStakingOperation(ctx context.Context, walletId string, addressId string) ApiCreateStakingOperationRequest { - return ApiCreateStakingOperationRequest{ - ApiService: a, - ctx: ctx, - walletId: walletId, - addressId: addressId, - } -} - -// Execute executes the request -// @return StakingOperation -func (a *StakeAPIService) CreateStakingOperationExecute(r ApiCreateStakingOperationRequest) (*StakingOperation, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *StakingOperation - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StakeAPIService.CreateStakingOperation") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations" - localVarPath = strings.Replace(localVarPath, "{"+"wallet_id"+"}", url.PathEscape(parameterValueToString(r.walletId, "walletId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"address_id"+"}", url.PathEscape(parameterValueToString(r.addressId, "addressId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.createStakingOperationRequest == nil { - return localVarReturnValue, nil, reportError("createStakingOperationRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.createStakingOperationRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - type ApiFetchHistoricalStakingBalancesRequest struct { ctx context.Context ApiService StakeAPI @@ -1078,122 +771,3 @@ func (a *StakeAPIService) GetStakingContextExecute(r ApiGetStakingContextRequest return localVarReturnValue, localVarHTTPResponse, nil } - -type ApiGetStakingOperationRequest struct { - ctx context.Context - ApiService StakeAPI - walletId string - addressId string - stakingOperationId string -} - -func (r ApiGetStakingOperationRequest) Execute() (*StakingOperation, *http.Response, error) { - return r.ApiService.GetStakingOperationExecute(r) -} - -/* -GetStakingOperation Get the latest state of a staking operation - -Get the latest state of a staking operation. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param walletId The ID of the wallet the address belongs to - @param addressId The ID of the address to fetch the staking operation for. - @param stakingOperationId The ID of the staking operation. - @return ApiGetStakingOperationRequest -*/ -func (a *StakeAPIService) GetStakingOperation(ctx context.Context, walletId string, addressId string, stakingOperationId string) ApiGetStakingOperationRequest { - return ApiGetStakingOperationRequest{ - ApiService: a, - ctx: ctx, - walletId: walletId, - addressId: addressId, - stakingOperationId: stakingOperationId, - } -} - -// Execute executes the request -// @return StakingOperation -func (a *StakeAPIService) GetStakingOperationExecute(r ApiGetStakingOperationRequest) (*StakingOperation, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *StakingOperation - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StakeAPIService.GetStakingOperation") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}" - localVarPath = strings.Replace(localVarPath, "{"+"wallet_id"+"}", url.PathEscape(parameterValueToString(r.walletId, "walletId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"address_id"+"}", url.PathEscape(parameterValueToString(r.addressId, "addressId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"staking_operation_id"+"}", url.PathEscape(parameterValueToString(r.stakingOperationId, "stakingOperationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/gen/client/api_trades.go b/gen/client/api_trades.go index 7d92cb5..7bf5b2e 100644 --- a/gen/client/api_trades.go +++ b/gen/client/api_trades.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_transfers.go b/gen/client/api_transfers.go index 513bcee..edbcbdc 100644 --- a/gen/client/api_transfers.go +++ b/gen/client/api_transfers.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_users.go b/gen/client/api_users.go index dc9b335..25e98be 100644 --- a/gen/client/api_users.go +++ b/gen/client/api_users.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_validators.go b/gen/client/api_validators.go index 2f755be..904c577 100644 --- a/gen/client/api_validators.go +++ b/gen/client/api_validators.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -184,13 +183,13 @@ type ApiListValidatorsRequest struct { ApiService ValidatorsAPI networkId string assetId string - status *string + status *ValidatorStatus limit *int32 page *string } // A filter to list validators based on a status. -func (r ApiListValidatorsRequest) Status(status string) ApiListValidatorsRequest { +func (r ApiListValidatorsRequest) Status(status ValidatorStatus) ApiListValidatorsRequest { r.status = &status return r } diff --git a/gen/client/api_wallet_stake.go b/gen/client/api_wallet_stake.go new file mode 100644 index 0000000..38ca7da --- /dev/null +++ b/gen/client/api_wallet_stake.go @@ -0,0 +1,452 @@ +/* +Coinbase Platform API + +This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. + +API version: 0.0.1-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +type WalletStakeAPI interface { + + /* + BroadcastStakingOperation Broadcast a staking operation + + Broadcast a staking operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param walletId The ID of the wallet the address belongs to. + @param addressId The ID of the address the staking operation belongs to. + @param stakingOperationId The ID of the staking operation to broadcast. + @return ApiBroadcastStakingOperationRequest + */ + BroadcastStakingOperation(ctx context.Context, walletId string, addressId string, stakingOperationId string) ApiBroadcastStakingOperationRequest + + // BroadcastStakingOperationExecute executes the request + // @return StakingOperation + BroadcastStakingOperationExecute(r ApiBroadcastStakingOperationRequest) (*StakingOperation, *http.Response, error) + + /* + CreateStakingOperation Create a new staking operation for an address + + Create a new staking operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param walletId The ID of the wallet the address belongs to. + @param addressId The ID of the address to create the staking operation for. + @return ApiCreateStakingOperationRequest + */ + CreateStakingOperation(ctx context.Context, walletId string, addressId string) ApiCreateStakingOperationRequest + + // CreateStakingOperationExecute executes the request + // @return StakingOperation + CreateStakingOperationExecute(r ApiCreateStakingOperationRequest) (*StakingOperation, *http.Response, error) + + /* + GetStakingOperation Get the latest state of a staking operation + + Get the latest state of a staking operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param walletId The ID of the wallet the address belongs to + @param addressId The ID of the address to fetch the staking operation for. + @param stakingOperationId The ID of the staking operation. + @return ApiGetStakingOperationRequest + */ + GetStakingOperation(ctx context.Context, walletId string, addressId string, stakingOperationId string) ApiGetStakingOperationRequest + + // GetStakingOperationExecute executes the request + // @return StakingOperation + GetStakingOperationExecute(r ApiGetStakingOperationRequest) (*StakingOperation, *http.Response, error) +} + +// WalletStakeAPIService WalletStakeAPI service +type WalletStakeAPIService service + +type ApiBroadcastStakingOperationRequest struct { + ctx context.Context + ApiService WalletStakeAPI + walletId string + addressId string + stakingOperationId string + broadcastStakingOperationRequest *BroadcastStakingOperationRequest +} + +func (r ApiBroadcastStakingOperationRequest) BroadcastStakingOperationRequest(broadcastStakingOperationRequest BroadcastStakingOperationRequest) ApiBroadcastStakingOperationRequest { + r.broadcastStakingOperationRequest = &broadcastStakingOperationRequest + return r +} + +func (r ApiBroadcastStakingOperationRequest) Execute() (*StakingOperation, *http.Response, error) { + return r.ApiService.BroadcastStakingOperationExecute(r) +} + +/* +BroadcastStakingOperation Broadcast a staking operation + +Broadcast a staking operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param walletId The ID of the wallet the address belongs to. + @param addressId The ID of the address the staking operation belongs to. + @param stakingOperationId The ID of the staking operation to broadcast. + @return ApiBroadcastStakingOperationRequest +*/ +func (a *WalletStakeAPIService) BroadcastStakingOperation(ctx context.Context, walletId string, addressId string, stakingOperationId string) ApiBroadcastStakingOperationRequest { + return ApiBroadcastStakingOperationRequest{ + ApiService: a, + ctx: ctx, + walletId: walletId, + addressId: addressId, + stakingOperationId: stakingOperationId, + } +} + +// Execute executes the request +// @return StakingOperation +func (a *WalletStakeAPIService) BroadcastStakingOperationExecute(r ApiBroadcastStakingOperationRequest) (*StakingOperation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StakingOperation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WalletStakeAPIService.BroadcastStakingOperation") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}/broadcast" + localVarPath = strings.Replace(localVarPath, "{"+"wallet_id"+"}", url.PathEscape(parameterValueToString(r.walletId, "walletId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"address_id"+"}", url.PathEscape(parameterValueToString(r.addressId, "addressId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"staking_operation_id"+"}", url.PathEscape(parameterValueToString(r.stakingOperationId, "stakingOperationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.broadcastStakingOperationRequest == nil { + return localVarReturnValue, nil, reportError("broadcastStakingOperationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.broadcastStakingOperationRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateStakingOperationRequest struct { + ctx context.Context + ApiService WalletStakeAPI + walletId string + addressId string + createStakingOperationRequest *CreateStakingOperationRequest +} + +func (r ApiCreateStakingOperationRequest) CreateStakingOperationRequest(createStakingOperationRequest CreateStakingOperationRequest) ApiCreateStakingOperationRequest { + r.createStakingOperationRequest = &createStakingOperationRequest + return r +} + +func (r ApiCreateStakingOperationRequest) Execute() (*StakingOperation, *http.Response, error) { + return r.ApiService.CreateStakingOperationExecute(r) +} + +/* +CreateStakingOperation Create a new staking operation for an address + +Create a new staking operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param walletId The ID of the wallet the address belongs to. + @param addressId The ID of the address to create the staking operation for. + @return ApiCreateStakingOperationRequest +*/ +func (a *WalletStakeAPIService) CreateStakingOperation(ctx context.Context, walletId string, addressId string) ApiCreateStakingOperationRequest { + return ApiCreateStakingOperationRequest{ + ApiService: a, + ctx: ctx, + walletId: walletId, + addressId: addressId, + } +} + +// Execute executes the request +// @return StakingOperation +func (a *WalletStakeAPIService) CreateStakingOperationExecute(r ApiCreateStakingOperationRequest) (*StakingOperation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StakingOperation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WalletStakeAPIService.CreateStakingOperation") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations" + localVarPath = strings.Replace(localVarPath, "{"+"wallet_id"+"}", url.PathEscape(parameterValueToString(r.walletId, "walletId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"address_id"+"}", url.PathEscape(parameterValueToString(r.addressId, "addressId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createStakingOperationRequest == nil { + return localVarReturnValue, nil, reportError("createStakingOperationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createStakingOperationRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetStakingOperationRequest struct { + ctx context.Context + ApiService WalletStakeAPI + walletId string + addressId string + stakingOperationId string +} + +func (r ApiGetStakingOperationRequest) Execute() (*StakingOperation, *http.Response, error) { + return r.ApiService.GetStakingOperationExecute(r) +} + +/* +GetStakingOperation Get the latest state of a staking operation + +Get the latest state of a staking operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param walletId The ID of the wallet the address belongs to + @param addressId The ID of the address to fetch the staking operation for. + @param stakingOperationId The ID of the staking operation. + @return ApiGetStakingOperationRequest +*/ +func (a *WalletStakeAPIService) GetStakingOperation(ctx context.Context, walletId string, addressId string, stakingOperationId string) ApiGetStakingOperationRequest { + return ApiGetStakingOperationRequest{ + ApiService: a, + ctx: ctx, + walletId: walletId, + addressId: addressId, + stakingOperationId: stakingOperationId, + } +} + +// Execute executes the request +// @return StakingOperation +func (a *WalletStakeAPIService) GetStakingOperationExecute(r ApiGetStakingOperationRequest) (*StakingOperation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StakingOperation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WalletStakeAPIService.GetStakingOperation") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/wallets/{wallet_id}/addresses/{address_id}/staking_operations/{staking_operation_id}" + localVarPath = strings.Replace(localVarPath, "{"+"wallet_id"+"}", url.PathEscape(parameterValueToString(r.walletId, "walletId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"address_id"+"}", url.PathEscape(parameterValueToString(r.addressId, "addressId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"staking_operation_id"+"}", url.PathEscape(parameterValueToString(r.stakingOperationId, "stakingOperationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/gen/client/api_wallets.go b/gen/client/api_wallets.go index 8448e30..21b1cad 100644 --- a/gen/client/api_wallets.go +++ b/gen/client/api_wallets.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/api_webhooks.go b/gen/client/api_webhooks.go index 6248c8d..1bfd09e 100644 --- a/gen/client/api_webhooks.go +++ b/gen/client/api_webhooks.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/client.go b/gen/client/client.go index 7846667..c15e03e 100644 --- a/gen/client/client.go +++ b/gen/client/client.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -72,6 +71,8 @@ type APIClient struct { ValidatorsAPI ValidatorsAPI + WalletStakeAPI WalletStakeAPI + WalletsAPI WalletsAPI WebhooksAPI WebhooksAPI @@ -104,6 +105,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.TransfersAPI = (*TransfersAPIService)(&c.common) c.UsersAPI = (*UsersAPIService)(&c.common) c.ValidatorsAPI = (*ValidatorsAPIService)(&c.common) + c.WalletStakeAPI = (*WalletStakeAPIService)(&c.common) c.WalletsAPI = (*WalletsAPIService)(&c.common) c.WebhooksAPI = (*WebhooksAPIService)(&c.common) diff --git a/gen/client/configuration.go b/gen/client/configuration.go index cee3b83..4d16c51 100644 --- a/gen/client/configuration.go +++ b/gen/client/configuration.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_address.go b/gen/client/model_address.go index 8c7b10e..c6c3a1b 100644 --- a/gen/client/model_address.go +++ b/gen/client/model_address.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_address_balance_list.go b/gen/client/model_address_balance_list.go index b9dcb5a..33d2a9a 100644 --- a/gen/client/model_address_balance_list.go +++ b/gen/client/model_address_balance_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_address_historical_balance_list.go b/gen/client/model_address_historical_balance_list.go index 77954e6..fb87714 100644 --- a/gen/client/model_address_historical_balance_list.go +++ b/gen/client/model_address_historical_balance_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_address_list.go b/gen/client/model_address_list.go index a6d81bd..8dc1c0d 100644 --- a/gen/client/model_address_list.go +++ b/gen/client/model_address_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_asset.go b/gen/client/model_asset.go index 4d5f0ec..30ccad2 100644 --- a/gen/client/model_asset.go +++ b/gen/client/model_asset.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_balance.go b/gen/client/model_balance.go index 41a785b..2a491aa 100644 --- a/gen/client/model_balance.go +++ b/gen/client/model_balance.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_broadcast_staking_operation_request.go b/gen/client/model_broadcast_staking_operation_request.go index febfd5b..89ebc87 100644 --- a/gen/client/model_broadcast_staking_operation_request.go +++ b/gen/client/model_broadcast_staking_operation_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_broadcast_trade_request.go b/gen/client/model_broadcast_trade_request.go index 8d49d48..8423cf8 100644 --- a/gen/client/model_broadcast_trade_request.go +++ b/gen/client/model_broadcast_trade_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_broadcast_transfer_request.go b/gen/client/model_broadcast_transfer_request.go index 804af0e..5d41b30 100644 --- a/gen/client/model_broadcast_transfer_request.go +++ b/gen/client/model_broadcast_transfer_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_build_staking_operation_request.go b/gen/client/model_build_staking_operation_request.go index fd07028..5da1d7e 100644 --- a/gen/client/model_build_staking_operation_request.go +++ b/gen/client/model_build_staking_operation_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_contract_event.go b/gen/client/model_contract_event.go index 8cf97f7..b4907fe 100644 --- a/gen/client/model_contract_event.go +++ b/gen/client/model_contract_event.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_contract_event_list.go b/gen/client/model_contract_event_list.go index c29a454..3adae49 100644 --- a/gen/client/model_contract_event_list.go +++ b/gen/client/model_contract_event_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_create_address_request.go b/gen/client/model_create_address_request.go index e447920..a2a94a3 100644 --- a/gen/client/model_create_address_request.go +++ b/gen/client/model_create_address_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_create_server_signer_request.go b/gen/client/model_create_server_signer_request.go index cff92de..7dc64e4 100644 --- a/gen/client/model_create_server_signer_request.go +++ b/gen/client/model_create_server_signer_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_create_staking_operation_request.go b/gen/client/model_create_staking_operation_request.go index 18a6a98..4bed474 100644 --- a/gen/client/model_create_staking_operation_request.go +++ b/gen/client/model_create_staking_operation_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_create_trade_request.go b/gen/client/model_create_trade_request.go index e7e46d9..8627503 100644 --- a/gen/client/model_create_trade_request.go +++ b/gen/client/model_create_trade_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_create_transfer_request.go b/gen/client/model_create_transfer_request.go index f48c342..9278fb8 100644 --- a/gen/client/model_create_transfer_request.go +++ b/gen/client/model_create_transfer_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_create_wallet_request.go b/gen/client/model_create_wallet_request.go index 1a0b649..5c12402 100644 --- a/gen/client/model_create_wallet_request.go +++ b/gen/client/model_create_wallet_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_create_wallet_request_wallet.go b/gen/client/model_create_wallet_request_wallet.go index 576f229..3221063 100644 --- a/gen/client/model_create_wallet_request_wallet.go +++ b/gen/client/model_create_wallet_request_wallet.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_create_webhook_request.go b/gen/client/model_create_webhook_request.go index 15b5416..1d38f29 100644 --- a/gen/client/model_create_webhook_request.go +++ b/gen/client/model_create_webhook_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_error.go b/gen/client/model_error.go index 9afe53f..eaaeee7 100644 --- a/gen/client/model_error.go +++ b/gen/client/model_error.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_ethereum_validator_metadata.go b/gen/client/model_ethereum_validator_metadata.go index 8e8b2f9..a9258ae 100644 --- a/gen/client/model_ethereum_validator_metadata.go +++ b/gen/client/model_ethereum_validator_metadata.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -27,7 +26,7 @@ type EthereumValidatorMetadata struct { // The public key of the validator. PublicKey string `json:"public_key"` // The address to which the validator's rewards are sent. - WithdrawlAddress string `json:"withdrawl_address"` + WithdrawalAddress string `json:"withdrawal_address"` // Whether the validator has been slashed. Slashed bool `json:"slashed"` // The epoch at which the validator was activated. @@ -46,11 +45,11 @@ type _EthereumValidatorMetadata EthereumValidatorMetadata // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewEthereumValidatorMetadata(index string, publicKey string, withdrawlAddress string, slashed bool, activationEpoch string, exitEpoch string, withdrawableEpoch string, balance Balance, effectiveBalance Balance) *EthereumValidatorMetadata { +func NewEthereumValidatorMetadata(index string, publicKey string, withdrawalAddress string, slashed bool, activationEpoch string, exitEpoch string, withdrawableEpoch string, balance Balance, effectiveBalance Balance) *EthereumValidatorMetadata { this := EthereumValidatorMetadata{} this.Index = index this.PublicKey = publicKey - this.WithdrawlAddress = withdrawlAddress + this.WithdrawalAddress = withdrawalAddress this.Slashed = slashed this.ActivationEpoch = activationEpoch this.ExitEpoch = exitEpoch @@ -116,28 +115,28 @@ func (o *EthereumValidatorMetadata) SetPublicKey(v string) { o.PublicKey = v } -// GetWithdrawlAddress returns the WithdrawlAddress field value -func (o *EthereumValidatorMetadata) GetWithdrawlAddress() string { +// GetWithdrawalAddress returns the WithdrawalAddress field value +func (o *EthereumValidatorMetadata) GetWithdrawalAddress() string { if o == nil { var ret string return ret } - return o.WithdrawlAddress + return o.WithdrawalAddress } -// GetWithdrawlAddressOk returns a tuple with the WithdrawlAddress field value +// GetWithdrawalAddressOk returns a tuple with the WithdrawalAddress field value // and a boolean to check if the value has been set. -func (o *EthereumValidatorMetadata) GetWithdrawlAddressOk() (*string, bool) { +func (o *EthereumValidatorMetadata) GetWithdrawalAddressOk() (*string, bool) { if o == nil { return nil, false } - return &o.WithdrawlAddress, true + return &o.WithdrawalAddress, true } -// SetWithdrawlAddress sets field value -func (o *EthereumValidatorMetadata) SetWithdrawlAddress(v string) { - o.WithdrawlAddress = v +// SetWithdrawalAddress sets field value +func (o *EthereumValidatorMetadata) SetWithdrawalAddress(v string) { + o.WithdrawalAddress = v } // GetSlashed returns the Slashed field value @@ -296,7 +295,7 @@ func (o EthereumValidatorMetadata) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["index"] = o.Index toSerialize["public_key"] = o.PublicKey - toSerialize["withdrawl_address"] = o.WithdrawlAddress + toSerialize["withdrawal_address"] = o.WithdrawalAddress toSerialize["slashed"] = o.Slashed toSerialize["activationEpoch"] = o.ActivationEpoch toSerialize["exitEpoch"] = o.ExitEpoch @@ -313,7 +312,7 @@ func (o *EthereumValidatorMetadata) UnmarshalJSON(data []byte) (err error) { requiredProperties := []string{ "index", "public_key", - "withdrawl_address", + "withdrawal_address", "slashed", "activationEpoch", "exitEpoch", diff --git a/gen/client/model_faucet_transaction.go b/gen/client/model_faucet_transaction.go index 3aaf4f4..e4c37b5 100644 --- a/gen/client/model_faucet_transaction.go +++ b/gen/client/model_faucet_transaction.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_feature_set.go b/gen/client/model_feature_set.go index f0873d7..249b8e1 100644 --- a/gen/client/model_feature_set.go +++ b/gen/client/model_feature_set.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_fetch_historical_staking_balances_200_response.go b/gen/client/model_fetch_historical_staking_balances_200_response.go index afdee88..ae071d3 100644 --- a/gen/client/model_fetch_historical_staking_balances_200_response.go +++ b/gen/client/model_fetch_historical_staking_balances_200_response.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_fetch_staking_rewards_200_response.go b/gen/client/model_fetch_staking_rewards_200_response.go index bb37643..fb17da1 100644 --- a/gen/client/model_fetch_staking_rewards_200_response.go +++ b/gen/client/model_fetch_staking_rewards_200_response.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_fetch_staking_rewards_request.go b/gen/client/model_fetch_staking_rewards_request.go index bd2a9bd..f459175 100644 --- a/gen/client/model_fetch_staking_rewards_request.go +++ b/gen/client/model_fetch_staking_rewards_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_get_staking_context_request.go b/gen/client/model_get_staking_context_request.go index 9d4acc2..6ab6b7d 100644 --- a/gen/client/model_get_staking_context_request.go +++ b/gen/client/model_get_staking_context_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_historical_balance.go b/gen/client/model_historical_balance.go index 6591f05..6d4d380 100644 --- a/gen/client/model_historical_balance.go +++ b/gen/client/model_historical_balance.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_network.go b/gen/client/model_network.go index 9420814..876b40f 100644 --- a/gen/client/model_network.go +++ b/gen/client/model_network.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -33,6 +32,8 @@ type Network struct { IsTestnet bool `json:"is_testnet"` NativeAsset Asset `json:"native_asset"` FeatureSet FeatureSet `json:"feature_set"` + // The BIP44 path prefix for the network + AddressPathPrefix *string `json:"address_path_prefix,omitempty"` } type _Network Network @@ -229,6 +230,38 @@ func (o *Network) SetFeatureSet(v FeatureSet) { o.FeatureSet = v } +// GetAddressPathPrefix returns the AddressPathPrefix field value if set, zero value otherwise. +func (o *Network) GetAddressPathPrefix() string { + if o == nil || IsNil(o.AddressPathPrefix) { + var ret string + return ret + } + return *o.AddressPathPrefix +} + +// GetAddressPathPrefixOk returns a tuple with the AddressPathPrefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Network) GetAddressPathPrefixOk() (*string, bool) { + if o == nil || IsNil(o.AddressPathPrefix) { + return nil, false + } + return o.AddressPathPrefix, true +} + +// HasAddressPathPrefix returns a boolean if a field has been set. +func (o *Network) HasAddressPathPrefix() bool { + if o != nil && !IsNil(o.AddressPathPrefix) { + return true + } + + return false +} + +// SetAddressPathPrefix gets a reference to the given string and assigns it to the AddressPathPrefix field. +func (o *Network) SetAddressPathPrefix(v string) { + o.AddressPathPrefix = &v +} + func (o Network) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -246,6 +279,9 @@ func (o Network) ToMap() (map[string]interface{}, error) { toSerialize["is_testnet"] = o.IsTestnet toSerialize["native_asset"] = o.NativeAsset toSerialize["feature_set"] = o.FeatureSet + if !IsNil(o.AddressPathPrefix) { + toSerialize["address_path_prefix"] = o.AddressPathPrefix + } return toSerialize, nil } diff --git a/gen/client/model_network_identifier.go b/gen/client/model_network_identifier.go index 58d6543..4f92e85 100644 --- a/gen/client/model_network_identifier.go +++ b/gen/client/model_network_identifier.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_seed_creation_event.go b/gen/client/model_seed_creation_event.go index a7d5e45..f953a23 100644 --- a/gen/client/model_seed_creation_event.go +++ b/gen/client/model_seed_creation_event.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_seed_creation_event_result.go b/gen/client/model_seed_creation_event_result.go index b70756f..21f8391 100644 --- a/gen/client/model_seed_creation_event_result.go +++ b/gen/client/model_seed_creation_event_result.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_server_signer.go b/gen/client/model_server_signer.go index af0bff4..08292f6 100644 --- a/gen/client/model_server_signer.go +++ b/gen/client/model_server_signer.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_server_signer_event.go b/gen/client/model_server_signer_event.go index ee6f5d9..44155bc 100644 --- a/gen/client/model_server_signer_event.go +++ b/gen/client/model_server_signer_event.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_server_signer_event_event.go b/gen/client/model_server_signer_event_event.go index 846e26c..59afee5 100644 --- a/gen/client/model_server_signer_event_event.go +++ b/gen/client/model_server_signer_event_event.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_server_signer_event_list.go b/gen/client/model_server_signer_event_list.go index 6f93c8c..0404c06 100644 --- a/gen/client/model_server_signer_event_list.go +++ b/gen/client/model_server_signer_event_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_server_signer_list.go b/gen/client/model_server_signer_list.go index 8b57afd..322d0fd 100644 --- a/gen/client/model_server_signer_list.go +++ b/gen/client/model_server_signer_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_signature_creation_event.go b/gen/client/model_signature_creation_event.go index 1ff48c4..3d360b1 100644 --- a/gen/client/model_signature_creation_event.go +++ b/gen/client/model_signature_creation_event.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_signature_creation_event_result.go b/gen/client/model_signature_creation_event_result.go index e437399..6a14d6f 100644 --- a/gen/client/model_signature_creation_event_result.go +++ b/gen/client/model_signature_creation_event_result.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_signed_voluntary_exit_message_metadata.go b/gen/client/model_signed_voluntary_exit_message_metadata.go index e9ace76..a0c4992 100644 --- a/gen/client/model_signed_voluntary_exit_message_metadata.go +++ b/gen/client/model_signed_voluntary_exit_message_metadata.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_sponsored_send.go b/gen/client/model_sponsored_send.go index 5c6e9bf..d960e2c 100644 --- a/gen/client/model_sponsored_send.go +++ b/gen/client/model_sponsored_send.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_staking_balance.go b/gen/client/model_staking_balance.go index 09e1f47..693ca7c 100644 --- a/gen/client/model_staking_balance.go +++ b/gen/client/model_staking_balance.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_staking_context.go b/gen/client/model_staking_context.go index 7227647..082745c 100644 --- a/gen/client/model_staking_context.go +++ b/gen/client/model_staking_context.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_staking_context_context.go b/gen/client/model_staking_context_context.go index e578bcb..b53eaa5 100644 --- a/gen/client/model_staking_context_context.go +++ b/gen/client/model_staking_context_context.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_staking_operation.go b/gen/client/model_staking_operation.go index 575c854..c149d0f 100644 --- a/gen/client/model_staking_operation.go +++ b/gen/client/model_staking_operation.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_staking_operation_metadata.go b/gen/client/model_staking_operation_metadata.go index 97840f3..78c3aaa 100644 --- a/gen/client/model_staking_operation_metadata.go +++ b/gen/client/model_staking_operation_metadata.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_staking_reward.go b/gen/client/model_staking_reward.go index f07af4f..fd603f1 100644 --- a/gen/client/model_staking_reward.go +++ b/gen/client/model_staking_reward.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_staking_reward_format.go b/gen/client/model_staking_reward_format.go index 639ccf5..97e21ef 100644 --- a/gen/client/model_staking_reward_format.go +++ b/gen/client/model_staking_reward_format.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_staking_reward_usd_value.go b/gen/client/model_staking_reward_usd_value.go index d1c72bf..e76ca0c 100644 --- a/gen/client/model_staking_reward_usd_value.go +++ b/gen/client/model_staking_reward_usd_value.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_trade.go b/gen/client/model_trade.go index 519edbf..cf0a4ed 100644 --- a/gen/client/model_trade.go +++ b/gen/client/model_trade.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_trade_list.go b/gen/client/model_trade_list.go index 13feebc..583b5bc 100644 --- a/gen/client/model_trade_list.go +++ b/gen/client/model_trade_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_transaction.go b/gen/client/model_transaction.go index dacc71f..7a0d23c 100644 --- a/gen/client/model_transaction.go +++ b/gen/client/model_transaction.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_transaction_type.go b/gen/client/model_transaction_type.go index 9cac08d..434c1d3 100644 --- a/gen/client/model_transaction_type.go +++ b/gen/client/model_transaction_type.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_transfer.go b/gen/client/model_transfer.go index 518b246..9ac61f5 100644 --- a/gen/client/model_transfer.go +++ b/gen/client/model_transfer.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_transfer_list.go b/gen/client/model_transfer_list.go index ffff469..2d0befb 100644 --- a/gen/client/model_transfer_list.go +++ b/gen/client/model_transfer_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_update_webhook_request.go b/gen/client/model_update_webhook_request.go index 5b5d2d4..c79f3d4 100644 --- a/gen/client/model_update_webhook_request.go +++ b/gen/client/model_update_webhook_request.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_user.go b/gen/client/model_user.go index 0ae44dd..9b86233 100644 --- a/gen/client/model_user.go +++ b/gen/client/model_user.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_validator.go b/gen/client/model_validator.go index 2e1423d..1a388c3 100644 --- a/gen/client/model_validator.go +++ b/gen/client/model_validator.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -28,8 +27,7 @@ type Validator struct { NetworkId string `json:"network_id"` // The ID of the asset that the validator helps stake. AssetId string `json:"asset_id"` - // The status of the validator. - Status string `json:"status"` + Status ValidatorStatus `json:"status"` Details *ValidatorDetails `json:"details,omitempty"` } @@ -39,7 +37,7 @@ type _Validator Validator // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewValidator(validatorId string, networkId string, assetId string, status string) *Validator { +func NewValidator(validatorId string, networkId string, assetId string, status ValidatorStatus) *Validator { this := Validator{} this.ValidatorId = validatorId this.NetworkId = networkId @@ -129,9 +127,9 @@ func (o *Validator) SetAssetId(v string) { } // GetStatus returns the Status field value -func (o *Validator) GetStatus() string { +func (o *Validator) GetStatus() ValidatorStatus { if o == nil { - var ret string + var ret ValidatorStatus return ret } @@ -140,7 +138,7 @@ func (o *Validator) GetStatus() string { // GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. -func (o *Validator) GetStatusOk() (*string, bool) { +func (o *Validator) GetStatusOk() (*ValidatorStatus, bool) { if o == nil { return nil, false } @@ -148,7 +146,7 @@ func (o *Validator) GetStatusOk() (*string, bool) { } // SetStatus sets field value -func (o *Validator) SetStatus(v string) { +func (o *Validator) SetStatus(v ValidatorStatus) { o.Status = v } diff --git a/gen/client/model_validator_details.go b/gen/client/model_validator_details.go index ff071a3..5571be6 100644 --- a/gen/client/model_validator_details.go +++ b/gen/client/model_validator_details.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_validator_list.go b/gen/client/model_validator_list.go index a667d13..14ed9fa 100644 --- a/gen/client/model_validator_list.go +++ b/gen/client/model_validator_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_validator_status.go b/gen/client/model_validator_status.go new file mode 100644 index 0000000..4987f1a --- /dev/null +++ b/gen/client/model_validator_status.go @@ -0,0 +1,133 @@ +/* +Coinbase Platform API + +This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. + +API version: 0.0.1-alpha +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" + "fmt" +) + +// ValidatorStatus The status of the validator. +type ValidatorStatus string + +// List of ValidatorStatus +const ( + VALIDATORSTATUS_UNKNOWN ValidatorStatus = "unknown" + VALIDATORSTATUS_PROVISIONING ValidatorStatus = "provisioning" + VALIDATORSTATUS_PROVISIONED ValidatorStatus = "provisioned" + VALIDATORSTATUS_DEPOSITED ValidatorStatus = "deposited" + VALIDATORSTATUS_PENDING_ACTIVATION ValidatorStatus = "pending_activation" + VALIDATORSTATUS_ACTIVE ValidatorStatus = "active" + VALIDATORSTATUS_EXITING ValidatorStatus = "exiting" + VALIDATORSTATUS_EXITED ValidatorStatus = "exited" + VALIDATORSTATUS_WITHDRAWAL_AVAILABLE ValidatorStatus = "withdrawal_available" + VALIDATORSTATUS_WITHDRAWAL_COMPLETE ValidatorStatus = "withdrawal_complete" + VALIDATORSTATUS_ACTIVE_SLASHED ValidatorStatus = "active_slashed" + VALIDATORSTATUS_EXITED_SLASHED ValidatorStatus = "exited_slashed" + VALIDATORSTATUS_REAPED ValidatorStatus = "reaped" +) + +// All allowed values of ValidatorStatus enum +var AllowedValidatorStatusEnumValues = []ValidatorStatus{ + "unknown", + "provisioning", + "provisioned", + "deposited", + "pending_activation", + "active", + "exiting", + "exited", + "withdrawal_available", + "withdrawal_complete", + "active_slashed", + "exited_slashed", + "reaped", +} + +func (v *ValidatorStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ValidatorStatus(value) + for _, existing := range AllowedValidatorStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ValidatorStatus", value) +} + +// NewValidatorStatusFromValue returns a pointer to a valid ValidatorStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewValidatorStatusFromValue(v string) (*ValidatorStatus, error) { + ev := ValidatorStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ValidatorStatus: valid values are %v", v, AllowedValidatorStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ValidatorStatus) IsValid() bool { + for _, existing := range AllowedValidatorStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ValidatorStatus value +func (v ValidatorStatus) Ptr() *ValidatorStatus { + return &v +} + +type NullableValidatorStatus struct { + value *ValidatorStatus + isSet bool +} + +func (v NullableValidatorStatus) Get() *ValidatorStatus { + return v.value +} + +func (v *NullableValidatorStatus) Set(val *ValidatorStatus) { + v.value = val + v.isSet = true +} + +func (v NullableValidatorStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableValidatorStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidatorStatus(val *ValidatorStatus) *NullableValidatorStatus { + return &NullableValidatorStatus{value: val, isSet: true} +} + +func (v NullableValidatorStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidatorStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/gen/client/model_wallet.go b/gen/client/model_wallet.go index 96fe525..a651a1f 100644 --- a/gen/client/model_wallet.go +++ b/gen/client/model_wallet.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_wallet_list.go b/gen/client/model_wallet_list.go index 7b319bc..eb3f416 100644 --- a/gen/client/model_wallet_list.go +++ b/gen/client/model_wallet_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_webhook.go b/gen/client/model_webhook.go index 743facc..4e83b16 100644 --- a/gen/client/model_webhook.go +++ b/gen/client/model_webhook.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_webhook_event_filter.go b/gen/client/model_webhook_event_filter.go index eb05fb3..895bf70 100644 --- a/gen/client/model_webhook_event_filter.go +++ b/gen/client/model_webhook_event_filter.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_webhook_event_type.go b/gen/client/model_webhook_event_type.go index c7fb5f5..52b9ade 100644 --- a/gen/client/model_webhook_event_type.go +++ b/gen/client/model_webhook_event_type.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/model_webhook_list.go b/gen/client/model_webhook_list.go index 077f325..ae16275 100644 --- a/gen/client/model_webhook_list.go +++ b/gen/client/model_webhook_list.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/response.go b/gen/client/response.go index 220fcf6..9e54bfc 100644 --- a/gen/client/response.go +++ b/gen/client/response.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/gen/client/utils.go b/gen/client/utils.go index 1ca1616..36af627 100644 --- a/gen/client/utils.go +++ b/gen/client/utils.go @@ -4,7 +4,6 @@ Coinbase Platform API This is the OpenAPI 3.0 specification for the Coinbase Platform APIs, used in conjunction with the Coinbase Platform SDKs. API version: 0.0.1-alpha -Contact: yuga.cohler@coinbase.com */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/pkg/coinbase/validator.go b/pkg/coinbase/validator.go index 8ccffb9..b1bbc21 100644 --- a/pkg/coinbase/validator.go +++ b/pkg/coinbase/validator.go @@ -21,7 +21,7 @@ func (v Validator) ID() string { return v.validator.ValidatorId } -func (v Validator) Status() string { +func (v Validator) Status() client.ValidatorStatus { return v.validator.Status }