github.com/hashgraph/hedera-sdk-go/v2@v2.48.0/client_all_test.go (about) 1 //go:build all || unit || e2e 2 // +build all unit e2e 3 4 package hedera 5 6 /*- 7 * 8 * Hedera Go SDK 9 * 10 * Copyright (C) 2020 - 2024 Hedera Hashgraph, LLC 11 * 12 * Licensed under the Apache License, Version 2.0 (the "License"); 13 * you may not use this file except in compliance with the License. 14 * You may obtain a copy of the License at 15 * 16 * http://www.apache.org/licenses/LICENSE-2.0 17 * 18 * Unless required by applicable law or agreed to in writing, software 19 * distributed under the License is distributed on an "AS IS" BASIS, 20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 * See the License for the specific language governing permissions and 22 * limitations under the License. 23 * 24 */ 25 26 const testClientJSONWithOperator string = `{ 27 "network": { 28 "35.237.200.180:50211": "0.0.3", 29 "35.186.191.247:50211": "0.0.4", 30 "35.192.2.25:50211": "0.0.5", 31 "35.199.161.108:50211": "0.0.6", 32 "35.203.82.240:50211": "0.0.7", 33 "35.236.5.219:50211": "0.0.8", 34 "35.197.192.225:50211": "0.0.9", 35 "35.242.233.154:50211": "0.0.10", 36 "35.240.118.96:50211": "0.0.11", 37 "35.204.86.32:50211": "0.0.12" 38 }, 39 "operator": { 40 "accountId": "0.0.3", 41 "privateKey": "302e020100300506032b657004220420db484b828e64b2d8f12ce3c0a0e93a0b8cce7af1bb8f39c97732394482538e10" 42 }, 43 "mirrorNetwork": "testnet" 44 }` 45 46 const testClientJSONWithoutMirrorNetwork string = `{ 47 "network": { 48 "35.237.200.180:50211": "0.0.3", 49 "35.186.191.247:50211": "0.0.4", 50 "35.192.2.25:50211": "0.0.5", 51 "35.199.161.108:50211": "0.0.6", 52 "35.203.82.240:50211": "0.0.7", 53 "35.236.5.219:50211": "0.0.8", 54 "35.197.192.225:50211": "0.0.9", 55 "35.242.233.154:50211": "0.0.10", 56 "35.240.118.96:50211": "0.0.11", 57 "35.204.86.32:50211": "0.0.12" 58 }, 59 "operator": { 60 "accountId": "0.0.3", 61 "privateKey": "302e020100300506032b657004220420db484b828e64b2d8f12ce3c0a0e93a0b8cce7af1bb8f39c97732394482538e10" 62 } 63 }` 64 65 const testClientJSONWrongTypeMirror string = `{ 66 "network": "testnet", 67 "operator": { 68 "accountId": "0.0.3", 69 "privateKey": "302e020100300506032b657004220420db484b828e64b2d8f12ce3c0a0e93a0b8cce7af1bb8f39c97732394482538e10" 70 }, 71 "mirrorNetwork": 5 72 }` 73 74 const testClientJSONWrongTypeNetwork string = `{ 75 "network": 1, 76 "operator": { 77 "accountId": "0.0.3", 78 "privateKey": "302e020100300506032b657004220420db484b828e64b2d8f12ce3c0a0e93a0b8cce7af1bb8f39c97732394482538e10" 79 }, 80 "mirrorNetwork": ["testnet.mirrornode.hedera.com:443"] 81 }` 82 83 const testClientJSONWrongAccountIDNetwork string = `{ 84 "network": {"35.237.200.180:50211": "0.0.3"}, 85 "operator": { 86 "accountId": "wrong", 87 "privateKey": "302e020100300506032b657004220420db484b828e64b2d8f12ce3c0a0e93a0b8cce7af1bb8f39c97732394482538e10" 88 }, 89 "mirrorNetwork": ["testnet.mirrornode.hedera.com:443"] 90 }`