Skip to content

Commit 0aa2d97

Browse files
authored
feat(1768): add support for remove signatures (#1774)
Signed-off-by: Rado M <radkomih@gmail.com> Signed-off-by: radkomih <radkomih@gmail.com>
1 parent 58775dd commit 0aa2d97

16 files changed

Lines changed: 825 additions & 43 deletions

examples/generate_key_with_mnemonic/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func main() {
1919
fmt.Printf("Generated 24-word mnemonic: %v\n", mnemonic24)
2020

2121
fmt.Println("Recovering an ECDSA private key from the 24-word mnemonic phrase above...")
22-
privateKey24, err := mnemonic24.ToStandardECDSAsecp256k1PrivateKey( /* passphrase */ "", /* index */ 0)
22+
privateKey24, err := mnemonic24.ToStandardECDSAsecp256k1PrivateKey( /* passphrase */ "" /* index */, 0)
2323
if err != nil {
2424
panic(fmt.Sprintf("%v : error converting 24 word mnemonic to PrivateKey", err))
2525
}
@@ -39,7 +39,7 @@ func main() {
3939
fmt.Printf("Generated 12-word mnemonic: %v\n", mnemonic12)
4040

4141
fmt.Println("Recovering an ECDSA private key from the 12-word mnemonic phrase above...")
42-
privateKey12, err := mnemonic12.ToStandardECDSAsecp256k1PrivateKey( /* passphrase */ "", /* index */ 0)
42+
privateKey12, err := mnemonic12.ToStandardECDSAsecp256k1PrivateKey( /* passphrase */ "" /* index */, 0)
4343
if err != nil {
4444
panic(fmt.Sprintf("%v : error converting 12 word mnemonic to PrivateKey", err))
4545
}

sdk/account_allowance_approve_transaction_unit_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,4 +368,3 @@ func TestUnitDeleteTokenNftAllowanceAllSerialsAppendsPerCall(t *testing.T) {
368368
require.Equal(t, d.CryptoApproveAllowance.NftAllowances, []*services.NftAllowance{revoke, revoke})
369369
}
370370
}
371-

sdk/account_create_transaction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ func (tx AccountCreateTransaction) buildScheduled() (*services.SchedulableTransa
417417
body.Data = &services.SchedulableTransactionBody_CryptoCreateAccount{
418418
CryptoCreateAccount: tx.buildProtoBody(),
419419
}
420-
420+
421421
return body, nil
422422
}
423423

sdk/block_node_service_endpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (e *BlockNodeServiceEndpoint) SetEndpointApis(apis []BlockNodeApi) *BlockNo
4646

4747
// AddEndpointApi adds a block node API kind to this endpoint.
4848
func (e *BlockNodeServiceEndpoint) AddEndpointApi(api BlockNodeApi) *BlockNodeServiceEndpoint {
49-
e.endpointApis = append(e.endpointApis,api)
49+
e.endpointApis = append(e.endpointApis, api)
5050
return e
5151
}
5252

sdk/errors.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ var errNodeIdIsRequired = errors.New("nodeID is required")
3838
var errEvmAddressIsNotALongZeroAddress = errors.New("EVM address is not a correct long zero address")
3939
var errEvmAddressIsNotCorrectSize = errors.New("EVM address is not the correct size")
4040
var errInvalidChunkSize = errors.New("chunk size must be greater than 0")
41+
var errPublicKeyHasNotSigned = errors.New("the public key has not signed this transaction")
4142

4243
// Endpoint validation errors
4344
var errEndpointMustHaveAddressOrDomainName = errors.New("endpoint must have either address or domain name")

sdk/hook_creation_details.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const (
1616
type HookCreationDetails struct {
1717
extensionPoint HookExtensionPoint
1818
hookId int64
19-
evmHook EvmHook
19+
evmHook EvmHook
2020
adminKey Key
2121
}
2222

@@ -77,7 +77,7 @@ func hookCreationDetailsFromProtobuf(pb *services.HookCreationDetails) HookCreat
7777
return HookCreationDetails{
7878
extensionPoint: HookExtensionPoint(pb.GetExtensionPoint()),
7979
hookId: pb.GetHookId(),
80-
evmHook: evmHookFromProtobuf(pb.GetEvmHook()),
80+
evmHook: evmHookFromProtobuf(pb.GetEvmHook()),
8181
adminKey: key,
8282
}
8383
}

sdk/mock_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ package hiero
44

55
// SPDX-License-Identifier: Apache-2.0
66

7-
87
import (
98
"context"
109
"errors"

sdk/node_create_transaction_e2e_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ func TestIntegrationNodeCreateTransactionCanExecute(t *testing.T) {
8888
resp, err = tx.Sign(adminKey).Execute(client)
8989
require.NoError(t, err)
9090

91-
9291
receipt, err = resp.GetReceipt(client)
9392
require.NoError(t, err)
9493
t.Log(receipt.NodeID)

sdk/registered_node_address_book_query.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,4 +403,3 @@ func generalServiceEndpointFromJSON(base registeredEndpointBase, raw *generalSer
403403
}
404404
return endpoint
405405
}
406-

sdk/registered_node_delete_transaction_unit_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,3 @@ func TestUnitRegisteredNodeDeleteTransactionScheduleProtobuf(t *testing.T) {
288288
require.NoError(t, err)
289289
require.NotNil(t, scheduled.GetRegisteredNodeDelete())
290290
}
291-

0 commit comments

Comments
 (0)