Skip to content

Commit

Permalink
chore: replace Hedera with Hiero name
Browse files Browse the repository at this point in the history
Signed-off-by: Ricky Saechao <ricky@launchbadge.com>
  • Loading branch information
RickyLB committed Feb 8, 2025
1 parent dc554ea commit 8bbee94
Show file tree
Hide file tree
Showing 582 changed files with 8,755 additions and 1,301 deletions.
6 changes: 3 additions & 3 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
included:
- Examples/
- Sources/Hedera/
- Sources/HederaTCK/
- Sources/Hiero/
- Sources/HieroTCK/
- Tests/

excluded:
- .build/
- Sources/Hedera/Status.swift
- Sources/Hiero/Status.swift

disabled_rules:
# TODO: re-enable once the project is deemed complete
Expand Down
34 changes: 26 additions & 8 deletions Examples/AccountAlias/main.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
// SPDX-License-Identifier: Apache-2.0

import Hedera
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Hiero
import SwiftDotenv

@main
Expand All @@ -11,12 +29,12 @@ internal enum Program {

client.setOperator(env.operatorAccountId, env.operatorKey)

// Hedera supports a form of auto account creation.
// Hiero supports a form of auto account creation.
//
// You can "create" an account by generating a private key, and then deriving the public key,
// without any need to interact with the Hedera network. The public key more or less acts as the user's
// without any need to interact with the Hiero network. The public key more or less acts as the user's
// account ID. This public key is an account's aliasKey: a public key that aliases (or will eventually alias)
// to a Hedera account.
// to a Hiero account.
//
// An AccountId takes one of two forms: a normal `AccountId` with no `aliasKey` takes the form 0.0.123,
// while an account ID with an `aliasKey` takes the form
Expand All @@ -28,9 +46,9 @@ internal enum Program {
// transactions, however most queries and transactions involving such an AccountId won't work until Hbar has
// been transferred to the aliasKey account.
//
// There is no record in the Hedera network of an account associated with a given `aliasKey`
// There is no record in the Hiero network of an account associated with a given `aliasKey`
// until an amount of Hbar is transferred to the account. The moment that Hbar is transferred to that `aliasKey`
// AccountId is the moment that that account actually begins to exist in the Hedera ledger.
// AccountId is the moment that that account actually begins to exist in the Hiero ledger.

print(#""Creating" a new account"#)

Expand Down
24 changes: 21 additions & 3 deletions Examples/AccountAllowance/main.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
// SPDX-License-Identifier: Apache-2.0

import Hedera
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Hiero
import SwiftDotenv

private struct Account {
Expand Down
12 changes: 7 additions & 5 deletions Examples/AddNftAllowance/main.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*
* ‌
* Hedera Swift SDK
*
* Copyright (C) 2022 - 2024 Hedera Hashgraph, LLC
*
*
* Copyright (C) 2022 - 2025 Hiero LLC
*
* 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
Expand All @@ -14,10 +15,11 @@
* 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.
* ‍
*/

import Foundation
import Hedera
import Hiero
import SwiftDotenv

@main
Expand Down Expand Up @@ -167,7 +169,7 @@ extension Environment {
PrivateKey(self["OPERATOR_KEY"]!.stringValue)!
}

/// The name of the Hedera network this example should run against.
/// The name of the Hiero network this example should run against.
internal var networkName: String {
self["HEDERA_NETWORK"]?.stringValue ?? "testnet"
}
Expand Down
24 changes: 21 additions & 3 deletions Examples/ConsensusPubSub/main.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
// SPDX-License-Identifier: Apache-2.0

import Hedera
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Hiero
import SwiftDotenv

@main
Expand Down
26 changes: 22 additions & 4 deletions Examples/ConsensusPubSubChunked/main.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
// SPDX-License-Identifier: Apache-2.0
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Foundation
import Hedera
import HederaExampleUtilities
import Hiero
import HieroExampleUtilities
import SwiftDotenv

@main
Expand Down Expand Up @@ -31,7 +49,7 @@ internal enum Program {
try await Task.sleep(nanoseconds: 1_000_000_000 * 10)

_ = Task {
let bigContents = try await HederaExampleUtilities.Resources.bigContents
let bigContents = try await HieroExampleUtilities.Resources.bigContents

print(
"about to prepare a transaction to send a message of \(bigContents.count) bytes"
Expand Down
24 changes: 21 additions & 3 deletions Examples/ConsensusPubSubWithSubmitKey/main.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
// SPDX-License-Identifier: Apache-2.0

import Hedera
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Hiero
import SwiftDotenv

@main
Expand Down
22 changes: 20 additions & 2 deletions Examples/CreateAccount/main.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
// SPDX-License-Identifier: Apache-2.0
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Hedera
import Hiero
import SwiftDotenv

@main
Expand Down
24 changes: 21 additions & 3 deletions Examples/CreateAccountThresholdKey/main.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
// SPDX-License-Identifier: Apache-2.0

import Hedera
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Hiero
import SwiftDotenv

@main
Expand Down
24 changes: 21 additions & 3 deletions Examples/CreateFile/main.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
// SPDX-License-Identifier: Apache-2.0
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Hedera
import Hiero
import SwiftDotenv

@main
Expand All @@ -15,7 +33,7 @@ internal enum Program {

// The file is required to be a byte array,
// you can easily use the bytes of a file instead.
let fileContents = "Hedera hashgraph is great!"
let fileContents = "Hiero is great!"

let response = try await FileCreateTransaction()
.keys([.single(env.operatorKey.publicKey)])
Expand Down
28 changes: 23 additions & 5 deletions Examples/CreateSimpleContract/main.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
// SPDX-License-Identifier: Apache-2.0

import Hedera
import HederaExampleUtilities
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Hiero
import HieroExampleUtilities
import SwiftDotenv

@main
Expand All @@ -12,7 +30,7 @@ internal enum Program {

client.setOperator(env.operatorAccountId, env.operatorKey)

let bytecode = try await HederaExampleUtilities.Resources.simpleContract
let bytecode = try await HieroExampleUtilities.Resources.simpleContract

// create the contract's bytecode file
let fileTransactionResponse = try await FileCreateTransaction()
Expand Down
28 changes: 23 additions & 5 deletions Examples/CreateStatefulContract/main.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
// SPDX-License-Identifier: Apache-2.0

import Hedera
import HederaExampleUtilities
/*
* ‌
* Hedera Swift SDK
* ​
* Copyright (C) 2022 - 2025 Hiero LLC
* ​
* 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.
* ‍
*/

import Hiero
import HieroExampleUtilities
import SwiftDotenv

@main
Expand All @@ -12,7 +30,7 @@ internal enum Program {

client.setOperator(env.operatorAccountId, env.operatorKey)

let bytecode = try await HederaExampleUtilities.Resources.statefulContract
let bytecode = try await HieroExampleUtilities.Resources.statefulContract

// create the contract's bytecode file
let fileTransactionResponse = try await FileCreateTransaction()
Expand Down
Loading

0 comments on commit 8bbee94

Please sign in to comment.