From bb081d370b74e5bd4dd06361b5517426ea5ac689 Mon Sep 17 00:00:00 2001 From: Varun Parthasarathy Date: Wed, 6 Jan 2021 17:14:53 -0800 Subject: [PATCH] Add types and assertions for Related Transactions (#289) * update codegen file * run codegen * add asserter for related transactions * add comment * fix gen * nits * nits * fix nil check --- asserter/block.go | 54 +++++++++++++++++++ asserter/block_test.go | 63 +++++++++++++++++++++++ asserter/errors.go | 2 + client/api_account.go | 2 +- client/api_block.go | 2 +- client/api_call.go | 2 +- client/api_construction.go | 2 +- client/api_events.go | 2 +- client/api_mempool.go | 2 +- client/api_network.go | 2 +- client/api_search.go | 2 +- client/client.go | 4 +- client/configuration.go | 2 +- client/response.go | 2 +- codegen.sh | 7 ++- server/api.go | 2 +- server/api_account.go | 2 +- server/api_block.go | 2 +- server/api_call.go | 2 +- server/api_construction.go | 2 +- server/api_events.go | 2 +- server/api_mempool.go | 2 +- server/api_network.go | 2 +- server/api_search.go | 2 +- server/logger.go | 2 +- server/routers.go | 2 +- types/account_balance_request.go | 2 +- types/account_balance_response.go | 2 +- types/account_coins_request.go | 2 +- types/account_coins_response.go | 2 +- types/account_identifier.go | 2 +- types/allow.go | 2 +- types/amount.go | 2 +- types/balance_exemption.go | 2 +- types/block.go | 2 +- types/block_event.go | 2 +- types/block_event_type.go | 2 +- types/block_identifier.go | 2 +- types/block_request.go | 2 +- types/block_response.go | 2 +- types/block_transaction.go | 2 +- types/block_transaction_request.go | 2 +- types/block_transaction_response.go | 2 +- types/call_request.go | 2 +- types/call_response.go | 2 +- types/coin.go | 2 +- types/coin_action.go | 2 +- types/coin_change.go | 2 +- types/coin_identifier.go | 2 +- types/construction_combine_request.go | 2 +- types/construction_combine_response.go | 2 +- types/construction_derive_request.go | 2 +- types/construction_hash_request.go | 2 +- types/construction_metadata_request.go | 2 +- types/construction_metadata_response.go | 2 +- types/construction_parse_request.go | 2 +- types/construction_payloads_request.go | 2 +- types/construction_payloads_response.go | 2 +- types/construction_preprocess_request.go | 2 +- types/construction_preprocess_response.go | 2 +- types/construction_submit_request.go | 2 +- types/currency.go | 2 +- types/curve_type.go | 2 +- types/direction.go | 29 +++++++++++ types/error.go | 2 +- types/events_blocks_request.go | 2 +- types/events_blocks_response.go | 2 +- types/exemption_type.go | 2 +- types/mempool_response.go | 2 +- types/mempool_transaction_request.go | 2 +- types/mempool_transaction_response.go | 2 +- types/metadata_request.go | 2 +- types/network_identifier.go | 2 +- types/network_list_response.go | 2 +- types/network_options_response.go | 2 +- types/network_request.go | 2 +- types/network_status_response.go | 2 +- types/operation.go | 2 +- types/operation_identifier.go | 2 +- types/operation_status.go | 2 +- types/operator.go | 2 +- types/partial_block_identifier.go | 2 +- types/peer.go | 2 +- types/public_key.go | 2 +- types/related_transaction.go | 26 ++++++++++ types/search_transactions_request.go | 2 +- types/search_transactions_response.go | 2 +- types/signature.go | 2 +- types/signature_type.go | 2 +- types/sub_account_identifier.go | 2 +- types/sub_network_identifier.go | 2 +- types/sync_status.go | 2 +- types/transaction.go | 3 +- types/transaction_identifier.go | 2 +- types/transaction_identifier_response.go | 2 +- types/types.go | 4 +- types/version.go | 2 +- 97 files changed, 273 insertions(+), 95 deletions(-) create mode 100644 types/direction.go create mode 100644 types/related_transaction.go diff --git a/asserter/block.go b/asserter/block.go index a8a49db9..fc951eae 100644 --- a/asserter/block.go +++ b/asserter/block.go @@ -354,6 +354,60 @@ func (a *Asserter) Transaction( ) } + if err := a.RelatedTransactions(transaction.RelatedTransactions); err != nil { + return fmt.Errorf( + "%w invalid related transaction in transaction %s", + err, + transaction.TransactionIdentifier.Hash, + ) + } + + return nil +} + +// RelatedTransactions returns an error if the related transactions array is non-null and non-empty +// and +// any of the related transactions contain invalid types, invalid network identifiers, +// invalid transaction identifiers, or a direction not defined by the enum. +func (a *Asserter) RelatedTransactions(relatedTransactions []*types.RelatedTransaction) error { + for i, relatedTransaction := range relatedTransactions { + if relatedTransaction.NetworkIdentifier != nil { + if err := NetworkIdentifier(relatedTransaction.NetworkIdentifier); err != nil { + return fmt.Errorf( + "%w invalid network identifier in related transaction at index %d", + err, + i, + ) + } + } + + if err := TransactionIdentifier(relatedTransaction.TransactionIdentifier); err != nil { + return fmt.Errorf( + "%w invalid transaction identifier in related transaction at index %d", + err, + i, + ) + } + + if err := a.Direction(relatedTransaction.Direction); err != nil { + return fmt.Errorf( + "%w invalid direction in related transaction at index %d", + err, + i, + ) + } + } + + return nil +} + +// Direction returns an error if the value passed is not types.Forward or types.Backward +func (a *Asserter) Direction(direction types.Direction) error { + if direction != types.Forward && + direction != types.Backward { + return ErrInvalidDirection + } + return nil } diff --git a/asserter/block_test.go b/asserter/block_test.go index 7f3248a9..933fbe40 100644 --- a/asserter/block_test.go +++ b/asserter/block_test.go @@ -553,6 +553,18 @@ func TestBlock(t *testing.T) { Amount: validAmount, }, }, + RelatedTransactions: []*types.RelatedTransaction{ + { + NetworkIdentifier: &types.NetworkIdentifier{ + Blockchain: "hello", + Network: "world", + }, + TransactionIdentifier: &types.TransactionIdentifier{ + Hash: "blah", + }, + Direction: types.Forward, + }, + }, } relatedToSelfTransaction := &types.Transaction{ TransactionIdentifier: &types.TransactionIdentifier{ @@ -673,6 +685,48 @@ func TestBlock(t *testing.T) { }, }, } + invalidRelatedTransaction := &types.Transaction{ + TransactionIdentifier: &types.TransactionIdentifier{ + Hash: "blah", + }, + Operations: []*types.Operation{ + { + OperationIdentifier: &types.OperationIdentifier{ + Index: int64(0), + }, + Type: "PAYMENT", + Status: types.String("SUCCESS"), + Account: validAccount, + Amount: validAmount, + }, + { + OperationIdentifier: &types.OperationIdentifier{ + Index: int64(1), + }, + RelatedOperations: []*types.OperationIdentifier{ + { + Index: int64(0), + }, + }, + Type: "PAYMENT", + Status: types.String("SUCCESS"), + Account: validAccount, + Amount: validAmount, + }, + }, + RelatedTransactions: []*types.RelatedTransaction{ + { + NetworkIdentifier: &types.NetworkIdentifier{ + Blockchain: "hello", + Network: "world", + }, + TransactionIdentifier: &types.TransactionIdentifier{ + Hash: "blah", + }, + Direction: "blah", + }, + }, + } var tests = map[string]struct { block *types.Block genesisIndex int64 @@ -845,6 +899,15 @@ func TestBlock(t *testing.T) { }, err: ErrTxIdentifierIsNil, }, + "invalid related transaction": { + block: &types.Block{ + BlockIdentifier: validBlockIdentifier, + ParentBlockIdentifier: validParentBlockIdentifier, + Timestamp: MinUnixEpoch + 1, + Transactions: []*types.Transaction{invalidRelatedTransaction}, + }, + err: ErrInvalidDirection, + }, } for name, test := range tests { diff --git a/asserter/errors.go b/asserter/errors.go index 96e8df52..7b9271b7 100644 --- a/asserter/errors.go +++ b/asserter/errors.go @@ -91,6 +91,7 @@ var ( ErrBlockIndexPrecedesParentBlockIndex = errors.New( "BlockIdentifier.Index <= ParentBlockIdentifier.Index", ) + ErrInvalidDirection = errors.New("invalid direction (must be 'forward' or 'backward')") BlockErrs = []error{ ErrAmountValueMissing, @@ -125,6 +126,7 @@ var ( ErrBlockIsNil, ErrBlockHashEqualsParentBlockHash, ErrBlockIndexPrecedesParentBlockIndex, + ErrInvalidDirection, } ) diff --git a/client/api_account.go b/client/api_account.go index 2de22018..adcbebc5 100644 --- a/client/api_account.go +++ b/client/api_account.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/client/api_block.go b/client/api_block.go index 53b7b85f..817ebf17 100644 --- a/client/api_block.go +++ b/client/api_block.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/client/api_call.go b/client/api_call.go index 7acaebcb..da2efaa9 100644 --- a/client/api_call.go +++ b/client/api_call.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/client/api_construction.go b/client/api_construction.go index 7ea8f560..55161b03 100644 --- a/client/api_construction.go +++ b/client/api_construction.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/client/api_events.go b/client/api_events.go index 07743c8f..9d1c1d37 100644 --- a/client/api_events.go +++ b/client/api_events.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/client/api_mempool.go b/client/api_mempool.go index f7a99697..d79e766f 100644 --- a/client/api_mempool.go +++ b/client/api_mempool.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/client/api_network.go b/client/api_network.go index fcb6a96c..c86db756 100644 --- a/client/api_network.go +++ b/client/api_network.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/client/api_search.go b/client/api_search.go index d3e1166b..5e15634a 100644 --- a/client/api_search.go +++ b/client/api_search.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/client/client.go b/client/client.go index a7a05d46..3df53a20 100644 --- a/client/client.go +++ b/client/client.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ var ( ErrRetriable = errors.New("retriable http status code received") ) -// APIClient manages communication with the Rosetta API v1.4.9 +// APIClient manages communication with the Rosetta API v1.4.10 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/client/configuration.go b/client/configuration.go index bb1dd0f6..0a873f5f 100644 --- a/client/configuration.go +++ b/client/configuration.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/client/response.go b/client/response.go index 51497211..a7ce1169 100644 --- a/client/response.go +++ b/client/response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/codegen.sh b/codegen.sh index b10d1ec4..c4dc6dea 100755 --- a/codegen.sh +++ b/codegen.sh @@ -53,7 +53,7 @@ done rm -rf tmp; # Download spec file from releases -ROSETTA_SPEC_VERSION=1.4.9 +ROSETTA_SPEC_VERSION=1.4.10 curl -L https://github.com/coinbase/rosetta-specifications/releases/download/v${ROSETTA_SPEC_VERSION}/api.json -o api.json; # Generate client + types code @@ -120,8 +120,9 @@ sed "${SED_IFLAG[@]}" 's/*SignatureType/SignatureType/g' client/* server/*; sed "${SED_IFLAG[@]}" 's/*CoinAction/CoinAction/g' client/* server/*; sed "${SED_IFLAG[@]}" 's/*ExemptionType/ExemptionType/g' client/* server/*; sed "${SED_IFLAG[@]}" 's/*BlockEventType/BlockEventType/g' client/* server/*; +sed "${SED_IFLAG[@]}" 's/*Direction/Direction/g' client/* server/*; -# Fix CurveTypes, SignatureTypes, CoinActions, ExemptionTypes +# Fix CurveTypes, SignatureTypes, CoinActions, ExemptionTypes, Direction sed "${SED_IFLAG[@]}" 's/SECP256K1/Secp256k1/g' client/* server/*; sed "${SED_IFLAG[@]}" 's/SECP256R1/Secp256r1/g' client/* server/*; sed "${SED_IFLAG[@]}" 's/EDWARDS25519/Edwards25519/g' client/* server/*; @@ -136,6 +137,8 @@ sed "${SED_IFLAG[@]}" 's/SPENT/CoinSpent/g' client/* server/*; sed "${SED_IFLAG[@]}" 's/GREATER_OR_EQUAL/BalanceGreaterOrEqual/g' client/* server/*; sed "${SED_IFLAG[@]}" 's/LESS_OR_EQUAL/BalanceLessOrEqual/g' client/* server/*; sed "${SED_IFLAG[@]}" 's/DYNAMIC/BalanceDynamic/g' client/* server/*; +sed "${SED_IFLAG[@]}" 's/FORWARD/Forward/g' client/* server/*; +sed "${SED_IFLAG[@]}" 's/BACKWARD/Backward/g' client/* server/*; # Convert HexBytes to Bytes sed "${SED_IFLAG[@]}" '/Hex-encoded public key bytes in the format specified by the CurveType/d' client/* server/*; diff --git a/server/api.go b/server/api.go index 2b5e7701..52beebbf 100644 --- a/server/api.go +++ b/server/api.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/api_account.go b/server/api_account.go index 0f447af7..b8726206 100644 --- a/server/api_account.go +++ b/server/api_account.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/api_block.go b/server/api_block.go index 0e2c3b5a..c95d1075 100644 --- a/server/api_block.go +++ b/server/api_block.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/api_call.go b/server/api_call.go index f76ee713..852505db 100644 --- a/server/api_call.go +++ b/server/api_call.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/api_construction.go b/server/api_construction.go index 0d5d6629..24ba277a 100644 --- a/server/api_construction.go +++ b/server/api_construction.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/api_events.go b/server/api_events.go index 8b0d4ea0..62a88aed 100644 --- a/server/api_events.go +++ b/server/api_events.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/api_mempool.go b/server/api_mempool.go index fffc54a8..9ba034bd 100644 --- a/server/api_mempool.go +++ b/server/api_mempool.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/api_network.go b/server/api_network.go index 9d4507d5..8cd3b5a5 100644 --- a/server/api_network.go +++ b/server/api_network.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/api_search.go b/server/api_search.go index eee79ac3..bf5f123d 100644 --- a/server/api_search.go +++ b/server/api_search.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/logger.go b/server/logger.go index 6720812e..59bf03b8 100644 --- a/server/logger.go +++ b/server/logger.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/server/routers.go b/server/routers.go index 8dde6564..57174d1d 100644 --- a/server/routers.go +++ b/server/routers.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/account_balance_request.go b/types/account_balance_request.go index 289b89df..43fd0c8f 100644 --- a/types/account_balance_request.go +++ b/types/account_balance_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/account_balance_response.go b/types/account_balance_response.go index 7ad1e817..81c99fd2 100644 --- a/types/account_balance_response.go +++ b/types/account_balance_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/account_coins_request.go b/types/account_coins_request.go index 81e44707..2e3784a9 100644 --- a/types/account_coins_request.go +++ b/types/account_coins_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/account_coins_response.go b/types/account_coins_response.go index ea4a2329..2d7e20d9 100644 --- a/types/account_coins_response.go +++ b/types/account_coins_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/account_identifier.go b/types/account_identifier.go index f977ef3f..795e78fd 100644 --- a/types/account_identifier.go +++ b/types/account_identifier.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/allow.go b/types/allow.go index 8b00f13c..09b37b3d 100644 --- a/types/allow.go +++ b/types/allow.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/amount.go b/types/amount.go index 89542922..7af1e242 100644 --- a/types/amount.go +++ b/types/amount.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/balance_exemption.go b/types/balance_exemption.go index f41ef219..298401d1 100644 --- a/types/balance_exemption.go +++ b/types/balance_exemption.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/block.go b/types/block.go index 9cb7d8c1..dc1edb3c 100644 --- a/types/block.go +++ b/types/block.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/block_event.go b/types/block_event.go index 035ec7ab..00a44d28 100644 --- a/types/block_event.go +++ b/types/block_event.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/block_event_type.go b/types/block_event_type.go index 163757ed..fa6f4918 100644 --- a/types/block_event_type.go +++ b/types/block_event_type.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/block_identifier.go b/types/block_identifier.go index debe27b4..d7a0d9cd 100644 --- a/types/block_identifier.go +++ b/types/block_identifier.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/block_request.go b/types/block_request.go index 01f3fe3c..d302c899 100644 --- a/types/block_request.go +++ b/types/block_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/block_response.go b/types/block_response.go index a4130df4..0fff2bba 100644 --- a/types/block_response.go +++ b/types/block_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/block_transaction.go b/types/block_transaction.go index 0a5f1d51..d5ee0707 100644 --- a/types/block_transaction.go +++ b/types/block_transaction.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/block_transaction_request.go b/types/block_transaction_request.go index 2d84fc20..81a18bb5 100644 --- a/types/block_transaction_request.go +++ b/types/block_transaction_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/block_transaction_response.go b/types/block_transaction_response.go index 02ae8070..9a9722e8 100644 --- a/types/block_transaction_response.go +++ b/types/block_transaction_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/call_request.go b/types/call_request.go index 6ddb8ae5..52f368ee 100644 --- a/types/call_request.go +++ b/types/call_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/call_response.go b/types/call_response.go index be2a4c16..ae1b680b 100644 --- a/types/call_response.go +++ b/types/call_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/coin.go b/types/coin.go index 26762c5a..201b8141 100644 --- a/types/coin.go +++ b/types/coin.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/coin_action.go b/types/coin_action.go index 18504284..25dc5917 100644 --- a/types/coin_action.go +++ b/types/coin_action.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/coin_change.go b/types/coin_change.go index 71385c66..c6d10501 100644 --- a/types/coin_change.go +++ b/types/coin_change.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/coin_identifier.go b/types/coin_identifier.go index 532d0840..57e74b58 100644 --- a/types/coin_identifier.go +++ b/types/coin_identifier.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_combine_request.go b/types/construction_combine_request.go index 0d9b198f..b1f3d706 100644 --- a/types/construction_combine_request.go +++ b/types/construction_combine_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_combine_response.go b/types/construction_combine_response.go index 40593260..4d6462c0 100644 --- a/types/construction_combine_response.go +++ b/types/construction_combine_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_derive_request.go b/types/construction_derive_request.go index df6dcea3..f8de738e 100644 --- a/types/construction_derive_request.go +++ b/types/construction_derive_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_hash_request.go b/types/construction_hash_request.go index 93f033a5..ac21eaf2 100644 --- a/types/construction_hash_request.go +++ b/types/construction_hash_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_metadata_request.go b/types/construction_metadata_request.go index c99a3cdc..8dd68348 100644 --- a/types/construction_metadata_request.go +++ b/types/construction_metadata_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_metadata_response.go b/types/construction_metadata_response.go index fcecd30c..6ccb9889 100644 --- a/types/construction_metadata_response.go +++ b/types/construction_metadata_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_parse_request.go b/types/construction_parse_request.go index 0f8b249b..08e87411 100644 --- a/types/construction_parse_request.go +++ b/types/construction_parse_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_payloads_request.go b/types/construction_payloads_request.go index 6d288693..60c7f065 100644 --- a/types/construction_payloads_request.go +++ b/types/construction_payloads_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_payloads_response.go b/types/construction_payloads_response.go index 0352dfd0..576766da 100644 --- a/types/construction_payloads_response.go +++ b/types/construction_payloads_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_preprocess_request.go b/types/construction_preprocess_request.go index 144a3214..29171021 100644 --- a/types/construction_preprocess_request.go +++ b/types/construction_preprocess_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_preprocess_response.go b/types/construction_preprocess_response.go index 42467cea..1b1a14e8 100644 --- a/types/construction_preprocess_response.go +++ b/types/construction_preprocess_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/construction_submit_request.go b/types/construction_submit_request.go index 2be49259..64388252 100644 --- a/types/construction_submit_request.go +++ b/types/construction_submit_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/currency.go b/types/currency.go index 6dd71651..7866051e 100644 --- a/types/currency.go +++ b/types/currency.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/curve_type.go b/types/curve_type.go index 8797aa19..a25b426c 100644 --- a/types/curve_type.go +++ b/types/curve_type.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/direction.go b/types/direction.go new file mode 100644 index 00000000..1b044a33 --- /dev/null +++ b/types/direction.go @@ -0,0 +1,29 @@ +// Copyright 2021 Coinbase, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated by: OpenAPI Generator (https://openapi-generator.tech) + +package types + +// Direction Used by RelatedTransaction to indicate the direction of the relation (i.e. +// cross-shard/cross-network sends may reference `backward` to an earlier transaction and async +// execution may reference `forward`). Can be used to indicate if a transaction relation is from +// child to parent or the reverse. +type Direction string + +// List of Direction +const ( + Forward Direction = "forward" + Backward Direction = "backward" +) diff --git a/types/error.go b/types/error.go index ed33e9e0..9b24a70e 100644 --- a/types/error.go +++ b/types/error.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/events_blocks_request.go b/types/events_blocks_request.go index 53071e99..cc1c9665 100644 --- a/types/events_blocks_request.go +++ b/types/events_blocks_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/events_blocks_response.go b/types/events_blocks_response.go index 6bd9ac94..b8ed8292 100644 --- a/types/events_blocks_response.go +++ b/types/events_blocks_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/exemption_type.go b/types/exemption_type.go index 8f1c083e..b6a58ea4 100644 --- a/types/exemption_type.go +++ b/types/exemption_type.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/mempool_response.go b/types/mempool_response.go index f33c2a64..463c8127 100644 --- a/types/mempool_response.go +++ b/types/mempool_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/mempool_transaction_request.go b/types/mempool_transaction_request.go index 52f476ed..d9f8cbf5 100644 --- a/types/mempool_transaction_request.go +++ b/types/mempool_transaction_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/mempool_transaction_response.go b/types/mempool_transaction_response.go index 7d8f036a..7848ca19 100644 --- a/types/mempool_transaction_response.go +++ b/types/mempool_transaction_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/metadata_request.go b/types/metadata_request.go index 127bfab6..f90f460e 100644 --- a/types/metadata_request.go +++ b/types/metadata_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/network_identifier.go b/types/network_identifier.go index bcb8e9df..ea3773c6 100644 --- a/types/network_identifier.go +++ b/types/network_identifier.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/network_list_response.go b/types/network_list_response.go index ad553483..a6645288 100644 --- a/types/network_list_response.go +++ b/types/network_list_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/network_options_response.go b/types/network_options_response.go index 82e874ed..8e8ef465 100644 --- a/types/network_options_response.go +++ b/types/network_options_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/network_request.go b/types/network_request.go index 2fe28e86..104d0567 100644 --- a/types/network_request.go +++ b/types/network_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/network_status_response.go b/types/network_status_response.go index d0d0104f..fd1e4faf 100644 --- a/types/network_status_response.go +++ b/types/network_status_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/operation.go b/types/operation.go index 64242cfa..da3447e3 100644 --- a/types/operation.go +++ b/types/operation.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/operation_identifier.go b/types/operation_identifier.go index 4501228d..82eed5a1 100644 --- a/types/operation_identifier.go +++ b/types/operation_identifier.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/operation_status.go b/types/operation_status.go index 46e6a363..204d7a81 100644 --- a/types/operation_status.go +++ b/types/operation_status.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/operator.go b/types/operator.go index 774a854a..dec93f0e 100644 --- a/types/operator.go +++ b/types/operator.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/partial_block_identifier.go b/types/partial_block_identifier.go index 9d957f0f..7d186c2c 100644 --- a/types/partial_block_identifier.go +++ b/types/partial_block_identifier.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/peer.go b/types/peer.go index dde3878c..88a0100f 100644 --- a/types/peer.go +++ b/types/peer.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/public_key.go b/types/public_key.go index 2db71fd5..0db24532 100644 --- a/types/public_key.go +++ b/types/public_key.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/related_transaction.go b/types/related_transaction.go new file mode 100644 index 00000000..cbe7c3cf --- /dev/null +++ b/types/related_transaction.go @@ -0,0 +1,26 @@ +// Copyright 2021 Coinbase, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Generated by: OpenAPI Generator (https://openapi-generator.tech) + +package types + +// RelatedTransaction The related_transaction allows implementations to link together multiple +// transactions. An unpopulated network identifier indicates that the related transaction is on the +// same network. +type RelatedTransaction struct { + NetworkIdentifier *NetworkIdentifier `json:"network_identifier,omitempty"` + TransactionIdentifier *TransactionIdentifier `json:"transaction_identifier"` + Direction Direction `json:"direction"` +} diff --git a/types/search_transactions_request.go b/types/search_transactions_request.go index 06d21301..cca686a1 100644 --- a/types/search_transactions_request.go +++ b/types/search_transactions_request.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/search_transactions_response.go b/types/search_transactions_response.go index ff8f3548..2d3b45ef 100644 --- a/types/search_transactions_response.go +++ b/types/search_transactions_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/signature.go b/types/signature.go index d195210a..95fd4bd3 100644 --- a/types/signature.go +++ b/types/signature.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/signature_type.go b/types/signature_type.go index 1c00238a..e42f0772 100644 --- a/types/signature_type.go +++ b/types/signature_type.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/sub_account_identifier.go b/types/sub_account_identifier.go index 730f0644..67f5bc70 100644 --- a/types/sub_account_identifier.go +++ b/types/sub_account_identifier.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/sub_network_identifier.go b/types/sub_network_identifier.go index c9839149..df54b8f0 100644 --- a/types/sub_network_identifier.go +++ b/types/sub_network_identifier.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/sync_status.go b/types/sync_status.go index d8e5ac03..5ded12c6 100644 --- a/types/sync_status.go +++ b/types/sync_status.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/transaction.go b/types/transaction.go index 63a2fcfb..6f1c0f74 100644 --- a/types/transaction.go +++ b/types/transaction.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package types type Transaction struct { TransactionIdentifier *TransactionIdentifier `json:"transaction_identifier"` Operations []*Operation `json:"operations"` + RelatedTransactions []*RelatedTransaction `json:"related_transactions,omitempty"` // Transactions that are related to other transactions (like a cross-shard transaction) should // include the tranaction_identifier of these transactions in the metadata. Metadata map[string]interface{} `json:"metadata,omitempty"` diff --git a/types/transaction_identifier.go b/types/transaction_identifier.go index e12281c7..4b93dc96 100644 --- a/types/transaction_identifier.go +++ b/types/transaction_identifier.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/transaction_identifier_response.go b/types/transaction_identifier_response.go index 1ddc59f0..d7945a58 100644 --- a/types/transaction_identifier_response.go +++ b/types/transaction_identifier_response.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/types/types.go b/types/types.go index 50298946..a1feb1ac 100644 --- a/types/types.go +++ b/types/types.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,5 +18,5 @@ const ( // RosettaAPIVersion is the version of the Rosetta API // specification used to generate code for this release // of the SDK. - RosettaAPIVersion = "1.4.9" + RosettaAPIVersion = "1.4.10" ) diff --git a/types/version.go b/types/version.go index e7184306..097c5f29 100644 --- a/types/version.go +++ b/types/version.go @@ -1,4 +1,4 @@ -// Copyright 2020 Coinbase, Inc. +// Copyright 2021 Coinbase, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.