Skip to content

Commit

Permalink
docs: fill in more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
qtbeee authored and janaakhterov committed Jul 24, 2020
1 parent 56b96b6 commit 450a19e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion account_balance_query_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package hedera

import (
"github.com/stretchr/testify/assert"
"os"
"strings"
"testing"

"github.com/stretchr/testify/assert"
)

func TestNewAccountBalanceQuery(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions consensus_message_submit_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

const chunkSize = 4096

// A ConsensusMessageSubmitTransaction is used for submitting a message to HCS.
type ConsensusMessageSubmitTransaction struct {
TransactionBuilder
pb *proto.ConsensusSubmitMessageTransactionBody
Expand Down
1 change: 1 addition & 0 deletions consensus_topic_create_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/hashgraph/hedera-sdk-go/proto"
)

// A ConsensusTopicCreateTransaction is for creating a new Topic on HCS.
type ConsensusTopicCreateTransaction struct {
TransactionBuilder
pb *proto.ConsensusCreateTopicTransactionBody
Expand Down
1 change: 1 addition & 0 deletions consensus_topic_delete_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/hashgraph/hedera-sdk-go/proto"
)

// A ConsensusTopicDeleteTransaction is for deleting a topic on HCS.
type ConsensusTopicDeleteTransaction struct {
TransactionBuilder
pb *proto.ConsensusDeleteTopicTransactionBody
Expand Down
3 changes: 2 additions & 1 deletion crypto_transfer_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (
"github.com/hashgraph/hedera-sdk-go/proto"
)

// Transfer hbar from some account balances to other account balances. The accounts list can contain up to 10 accounts.
// A CryptoTransferTransaction is for transferring hbar from some account balances to other account balances.
// The accounts list can contain up to 10 accounts.
// The amounts list must be the same length as the accounts list.
//
// This transaction must be signed by the
Expand Down
10 changes: 7 additions & 3 deletions file_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,34 @@ package hedera

import (
"fmt"

"github.com/hashgraph/hedera-sdk-go/proto"
)

// A FileID is the ID for a file on the network.
type FileID struct {
Shard uint64
Realm uint64
File uint64
}

// The public node address book for the current network
// FileIDForAddressBook returns the public node address book for the current network.
func FileIDForAddressBook() FileID {
return FileID{File: 102}
}

// The current fee schedule for the network
// FileIDForFeeSchedule returns the current fee schedule for the network.
func FileIDForFeeSchedule() FileID {
return FileID{File: 111}
}

// The current exchange rates of HBAR to USD
// FileIDForExchangeRate returns the current exchange rates of HBAR to USD.
func FileIDForExchangeRate() FileID {
return FileID{File: 112}
}

// FileIDFromString returns a FileID parsed from the given string.
// A malformatted string will cause this to return an error instead.
func FileIDFromString(s string) (FileID, error) {
shard, realm, num, err := idFromString(s)
if err != nil {
Expand Down

0 comments on commit 450a19e

Please sign in to comment.