@arkecosystem/typescript-crypto 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +23 -23
- package/.github/workflows/format.yml +80 -0
- package/.github/workflows/publish.yml +1 -1
- package/.prettierrc.json +8 -0
- package/dist/enums/ContractAbiType.d.ts.map +1 -1
- package/dist/exceptions/index.d.ts.map +1 -1
- package/dist/identities/PrivateKey.d.ts +2 -2
- package/dist/identities/PrivateKey.d.ts.map +1 -1
- package/dist/identities/PrivateKey.js +1 -1
- package/dist/identities/WIF.d.ts.map +1 -1
- package/dist/identities/WIF.js +2 -2
- package/dist/index.js +532 -627
- package/dist/networks/AbstractNetwork.d.ts +1 -1
- package/dist/networks/AbstractNetwork.d.ts.map +1 -1
- package/dist/networks/Mainnet.d.ts +1 -1
- package/dist/networks/Mainnet.d.ts.map +1 -1
- package/dist/networks/Mainnet.js +1 -1
- package/dist/networks/Testnet.d.ts +1 -1
- package/dist/networks/Testnet.d.ts.map +1 -1
- package/dist/networks/Testnet.js +1 -1
- package/dist/transactions/Deserializer.d.ts +5 -5
- package/dist/transactions/Deserializer.d.ts.map +1 -1
- package/dist/transactions/Deserializer.js +18 -18
- package/dist/transactions/Serializer.d.ts +0 -1
- package/dist/transactions/Serializer.d.ts.map +1 -1
- package/dist/transactions/Serializer.js +0 -3
- package/dist/transactions/builders/AbstractTransactionBuilder.d.ts +7 -6
- package/dist/transactions/builders/AbstractTransactionBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/AbstractTransactionBuilder.js +15 -8
- package/dist/transactions/builders/EvmCallBuilder.d.ts +3 -3
- package/dist/transactions/builders/EvmCallBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/MultipaymentBuilder.d.ts +5 -4
- package/dist/transactions/builders/MultipaymentBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/MultipaymentBuilder.js +6 -2
- package/dist/transactions/builders/TransferBuilder.d.ts +4 -3
- package/dist/transactions/builders/TransferBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/TransferBuilder.js +4 -0
- package/dist/transactions/builders/UnvoteBuilder.d.ts +3 -3
- package/dist/transactions/builders/UnvoteBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/UnvoteBuilder.js +1 -1
- package/dist/transactions/builders/UsernameRegistrationBuilder.d.ts +3 -3
- package/dist/transactions/builders/UsernameRegistrationBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/UsernameRegistrationBuilder.js +1 -1
- package/dist/transactions/builders/UsernameResignationBuilder.d.ts +3 -3
- package/dist/transactions/builders/UsernameResignationBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/UsernameResignationBuilder.js +1 -1
- package/dist/transactions/builders/ValidatorRegistrationBuilder.d.ts +3 -3
- package/dist/transactions/builders/ValidatorRegistrationBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/ValidatorRegistrationBuilder.js +1 -1
- package/dist/transactions/builders/ValidatorResignationBuilder.d.ts +3 -3
- package/dist/transactions/builders/ValidatorResignationBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/ValidatorResignationBuilder.js +1 -1
- package/dist/transactions/builders/VoteBuilder.d.ts +3 -3
- package/dist/transactions/builders/VoteBuilder.d.ts.map +1 -1
- package/dist/transactions/builders/VoteBuilder.js +1 -1
- package/dist/transactions/types/AbstractTransaction.d.ts +2 -5
- package/dist/transactions/types/AbstractTransaction.d.ts.map +1 -1
- package/dist/transactions/types/AbstractTransaction.js +13 -15
- package/dist/transactions/types/EvmCall.d.ts +0 -3
- package/dist/transactions/types/EvmCall.d.ts.map +1 -1
- package/dist/transactions/types/EvmCall.js +0 -8
- package/dist/transactions/types/Multipayment.d.ts +1 -3
- package/dist/transactions/types/Multipayment.d.ts.map +1 -1
- package/dist/transactions/types/Multipayment.js +1 -8
- package/dist/transactions/types/Transfer.d.ts +0 -3
- package/dist/transactions/types/Transfer.d.ts.map +1 -1
- package/dist/transactions/types/Transfer.js +0 -8
- package/dist/transactions/types/Unvote.d.ts +0 -3
- package/dist/transactions/types/Unvote.d.ts.map +1 -1
- package/dist/transactions/types/Unvote.js +0 -8
- package/dist/transactions/types/UsernameRegistration.d.ts +1 -3
- package/dist/transactions/types/UsernameRegistration.d.ts.map +1 -1
- package/dist/transactions/types/UsernameRegistration.js +0 -7
- package/dist/transactions/types/UsernameResignation.d.ts +0 -3
- package/dist/transactions/types/UsernameResignation.d.ts.map +1 -1
- package/dist/transactions/types/UsernameResignation.js +0 -7
- package/dist/transactions/types/ValidatorRegistration.d.ts +1 -3
- package/dist/transactions/types/ValidatorRegistration.d.ts.map +1 -1
- package/dist/transactions/types/ValidatorRegistration.js +0 -8
- package/dist/transactions/types/ValidatorResignation.d.ts +0 -3
- package/dist/transactions/types/ValidatorResignation.d.ts.map +1 -1
- package/dist/transactions/types/ValidatorResignation.js +0 -8
- package/dist/transactions/types/Vote.d.ts +1 -3
- package/dist/transactions/types/Vote.d.ts.map +1 -1
- package/dist/transactions/types/Vote.js +0 -8
- package/dist/types.d.ts +19 -19
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/Abi/ArgumentDecoder.js +6 -6
- package/dist/utils/Abi/json/Abi.Consensus.json +15 -45
- package/dist/utils/Abi/json/Abi.Usernames.json +9 -27
- package/dist/utils/AbiDecoder.d.ts.map +1 -1
- package/dist/utils/AbiDecoder.js +3 -0
- package/dist/utils/AbiEncoder.d.ts +1 -1
- package/dist/utils/AbiEncoder.d.ts.map +1 -1
- package/dist/utils/AbiEncoder.js +2 -1
- package/dist/utils/Message.d.ts +1 -1
- package/dist/utils/Message.d.ts.map +1 -1
- package/dist/utils/Message.js +1 -1
- package/dist/utils/TransactionUtils.d.ts +0 -1
- package/dist/utils/TransactionUtils.d.ts.map +1 -1
- package/dist/utils/TransactionUtils.js +15 -18
- package/dist/utils/UnitConverter.d.ts.map +1 -1
- package/dist/utils/UnitConverter.js +12 -12
- package/eslint.config.mjs +19 -0
- package/jest.config.ts +6 -6
- package/package.json +6 -2
- package/src/enums/Constants.ts +1 -1
- package/src/enums/ContractAbiType.ts +4 -4
- package/src/exceptions/index.ts +1 -1
- package/src/identities/PrivateKey.ts +3 -3
- package/src/identities/WIF.ts +2 -3
- package/src/networks/AbstractNetwork.ts +3 -3
- package/src/networks/Mainnet.ts +3 -3
- package/src/networks/Testnet.ts +1 -1
- package/src/transactions/Deserializer.ts +39 -30
- package/src/transactions/Serializer.ts +1 -5
- package/src/transactions/builders/AbstractTransactionBuilder.ts +20 -11
- package/src/transactions/builders/EvmCallBuilder.ts +3 -3
- package/src/transactions/builders/MultipaymentBuilder.ts +13 -6
- package/src/transactions/builders/TransferBuilder.ts +8 -3
- package/src/transactions/builders/UnvoteBuilder.ts +4 -4
- package/src/transactions/builders/UsernameRegistrationBuilder.ts +4 -4
- package/src/transactions/builders/UsernameResignationBuilder.ts +4 -4
- package/src/transactions/builders/ValidatorRegistrationBuilder.ts +4 -4
- package/src/transactions/builders/ValidatorResignationBuilder.ts +4 -4
- package/src/transactions/builders/VoteBuilder.ts +4 -4
- package/src/transactions/types/AbstractTransaction.ts +17 -24
- package/src/transactions/types/EvmCall.ts +0 -15
- package/src/transactions/types/Multipayment.ts +3 -15
- package/src/transactions/types/Transfer.ts +0 -15
- package/src/transactions/types/Unvote.ts +0 -15
- package/src/transactions/types/UsernameRegistration.ts +1 -13
- package/src/transactions/types/UsernameResignation.ts +0 -14
- package/src/transactions/types/ValidatorRegistration.ts +1 -14
- package/src/transactions/types/ValidatorResignation.ts +0 -15
- package/src/transactions/types/Vote.ts +1 -14
- package/src/types.ts +19 -19
- package/src/utils/Abi/ArgumentDecoder.ts +6 -6
- package/src/utils/Abi/json/Abi.Consensus.json +1641 -1671
- package/src/utils/Abi/json/Abi.Multipayment.json +108 -108
- package/src/utils/Abi/json/Abi.Usernames.json +880 -898
- package/src/utils/AbiBase.ts +1 -1
- package/src/utils/AbiDecoder.ts +6 -3
- package/src/utils/AbiEncoder.ts +3 -2
- package/src/utils/Message.ts +1 -1
- package/src/utils/TransactionUtils.ts +24 -28
- package/src/utils/UnitConverter.ts +29 -29
- package/tests/fixtures/global.json +4 -4
- package/tests/fixtures/identity.json +10 -10
- package/tests/fixtures/transactions/evm-sign.json +4 -4
- package/tests/fixtures/transactions/multipayment-empty.json +4 -4
- package/tests/fixtures/transactions/multipayment-single.json +4 -4
- package/tests/fixtures/transactions/multipayment.json +4 -4
- package/tests/fixtures/transactions/transfer-0.json +4 -4
- package/tests/fixtures/transactions/transfer-large-amount.json +4 -4
- package/tests/fixtures/transactions/transfer.json +4 -4
- package/tests/fixtures/transactions/unvote.json +4 -4
- package/tests/fixtures/transactions/username-registration.json +4 -4
- package/tests/fixtures/transactions/username-resignation.json +4 -4
- package/tests/fixtures/transactions/validator-registration.json +4 -4
- package/tests/fixtures/transactions/validator-resignation.json +4 -4
- package/tests/fixtures/transactions/vote.json +4 -4
- package/tests/unit/configuration/Network.test.ts +52 -0
- package/tests/unit/identities/Address.test.ts +4 -4
- package/tests/unit/identities/PrivateKey.test.ts +5 -5
- package/tests/unit/identities/PublicKey.test.ts +9 -9
- package/tests/unit/identities/WIF.test.ts +1 -1
- package/tests/unit/transactions/Deserializer.test.ts +81 -63
- package/tests/unit/transactions/Serializer.test.ts +11 -1
- package/tests/unit/transactions/builders/EvmCallBuilder.test.ts +76 -9
- package/tests/unit/transactions/builders/MultipaymentBuilder.test.ts +125 -17
- package/tests/unit/transactions/builders/TransferBuilder.test.ts +146 -47
- package/tests/unit/transactions/builders/UnvoteBuilder.test.ts +75 -8
- package/tests/unit/transactions/builders/UsernameRegistrationBuilder.test.ts +75 -8
- package/tests/unit/transactions/builders/UsernameResignationBuilder.test.ts +75 -8
- package/tests/unit/transactions/builders/ValidatorRegistrationBuilder.test.ts +79 -12
- package/tests/unit/transactions/builders/ValidatorResignationBuilder.test.ts +75 -8
- package/tests/unit/transactions/builders/VoteBuilder.test.ts +75 -8
- package/tests/unit/transactions/types/AbstractTransaction.test.ts +27 -30
- package/tests/unit/transactions/types/EvmCall.test.ts +22 -0
- package/tests/unit/transactions/types/Multipayment.test.ts +38 -0
- package/tests/unit/transactions/types/Transfer.test.ts +18 -0
- package/tests/unit/transactions/types/Unvote.test.ts +18 -0
- package/tests/unit/transactions/types/UsernameRegistration.test.ts +22 -0
- package/tests/unit/transactions/types/UsernameResignation.test.ts +18 -0
- package/tests/unit/transactions/types/ValidatorRegistration.test.ts +22 -0
- package/tests/unit/transactions/types/ValidatorResignation.test.ts +18 -0
- package/tests/unit/transactions/types/Vote.test.ts +20 -0
- package/tests/unit/utils/Abi/ArgumentDecoder.test.ts +17 -16
- package/tests/unit/utils/AbiEncoder.test.ts +2 -2
- package/tests/unit/utils/Message.test.ts +1 -1
- package/tests/unit/utils/TransactionUtils.test.ts +1 -5
- package/tests/unit/utils/UnitConverter.test.ts +81 -47
- package/tsconfig.json +1 -1
- package/.eslintrc.js +0 -12
- package/prettier.config.js +0 -8
package/src/utils/AbiBase.ts
CHANGED
@@ -13,7 +13,7 @@ export abstract class AbiBase {
|
|
13
13
|
this.interface = new Interface(JSON.parse(JSON.stringify(abi)).abi);
|
14
14
|
}
|
15
15
|
|
16
|
-
private contractAbi(type: ContractAbiType = ContractAbiType.CONSENSUS, customAbi?:
|
16
|
+
private contractAbi(type: ContractAbiType = ContractAbiType.CONSENSUS, customAbi?: unknown): object {
|
17
17
|
switch (type) {
|
18
18
|
case ContractAbiType.CONSENSUS:
|
19
19
|
return ConsensusContract;
|
package/src/utils/AbiDecoder.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { AbiResult } from "@/types";
|
2
2
|
import { AbiBase } from "./AbiBase";
|
3
|
-
import { Result } from "ethers";
|
4
3
|
|
5
4
|
export class AbiDecoder extends AbiBase {
|
6
5
|
decodeFunctionData(data: string): AbiResult {
|
@@ -11,9 +10,13 @@ export class AbiDecoder extends AbiBase {
|
|
11
10
|
const functionSelector = data.slice(0, 10);
|
12
11
|
const functionFragment = this.interface.getFunction(functionSelector);
|
13
12
|
|
13
|
+
if (!functionFragment) {
|
14
|
+
throw new Error("Function not found in ABI");
|
15
|
+
}
|
16
|
+
|
14
17
|
return {
|
15
|
-
functionName: functionFragment
|
16
|
-
args: this.interface.decodeFunctionData(functionFragment
|
18
|
+
functionName: functionFragment.name,
|
19
|
+
args: this.interface.decodeFunctionData(functionFragment, data),
|
17
20
|
};
|
18
21
|
}
|
19
22
|
}
|
package/src/utils/AbiEncoder.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { AbiBase } from "./AbiBase";
|
2
|
+
import { Helpers } from "./Helpers";
|
2
3
|
|
3
4
|
export class AbiEncoder extends AbiBase {
|
4
|
-
encodeFunctionCall(functionName: string, parameters:
|
5
|
-
return this.interface.encodeFunctionData(functionName, parameters);
|
5
|
+
encodeFunctionCall(functionName: string, parameters: unknown[]): string {
|
6
|
+
return Helpers.removeLeadingHexZero(this.interface.encodeFunctionData(functionName, parameters));
|
6
7
|
}
|
7
8
|
}
|
package/src/utils/Message.ts
CHANGED
@@ -3,41 +3,37 @@ import { Constants } from "@/enums/Constants";
|
|
3
3
|
import { TransactionData } from "@/types";
|
4
4
|
|
5
5
|
export class TransactionUtils {
|
6
|
-
public static toBuffer(transaction: TransactionData, skipSignature
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
fields.push(toBeArray(transaction[
|
23
|
-
fields.push(
|
24
|
-
fields.push(
|
6
|
+
public static toBuffer(transaction: TransactionData, skipSignature = false): Buffer {
|
7
|
+
const fields = [
|
8
|
+
toBeArray(transaction["network"] ?? 0),
|
9
|
+
toBeArray(transaction["nonce"] ? transaction["nonce"] : 0),
|
10
|
+
toBeArray(0),
|
11
|
+
toBeArray(transaction["gasPrice"] ?? 0),
|
12
|
+
toBeArray(transaction["gas"] ?? 0),
|
13
|
+
transaction["to"] ?? "0x",
|
14
|
+
toBeArray(transaction["value"] ? transaction["value"] : 0),
|
15
|
+
transaction["data"] && transaction["data"].startsWith("0x")
|
16
|
+
? transaction["data"]
|
17
|
+
: "0x" + (transaction["data"] ?? ""),
|
18
|
+
[],
|
19
|
+
];
|
20
|
+
|
21
|
+
if (!skipSignature && transaction["v"] && transaction["r"] && transaction["s"]) {
|
22
|
+
fields.push(toBeArray(transaction["v"] - Constants.ETHEREUM_RECOVERY_ID_OFFSET));
|
23
|
+
fields.push("0x" + transaction["r"]);
|
24
|
+
fields.push("0x" + transaction["s"]);
|
25
25
|
}
|
26
26
|
|
27
27
|
const encoded = encodeRlp(fields);
|
28
28
|
|
29
|
-
|
29
|
+
const payload = Constants.EIP_1559_PREFIX + encoded.substring(2);
|
30
30
|
|
31
|
-
|
31
|
+
return Buffer.from(payload, "hex");
|
32
32
|
}
|
33
33
|
|
34
|
-
public static toHash(transaction: TransactionData, skipSignature
|
35
|
-
|
36
|
-
|
37
|
-
return keccak256('0x' + encoding.toString('hex')).substring(2);
|
38
|
-
}
|
34
|
+
public static toHash(transaction: TransactionData, skipSignature = false): string {
|
35
|
+
const encoding = this.toBuffer(transaction, skipSignature);
|
39
36
|
|
40
|
-
|
41
|
-
return this.toHash(transaction, false);
|
37
|
+
return keccak256("0x" + encoding.toString("hex")).substring(2);
|
42
38
|
}
|
43
39
|
}
|
@@ -5,53 +5,53 @@ const GWEI_MULTIPLIER = 1000000000; // 1e9
|
|
5
5
|
const ARK_MULTIPLIER = 1000000000000000000; // 1e18
|
6
6
|
|
7
7
|
export class UnitConverter {
|
8
|
-
static parseUnits(value: number|string, unit
|
9
|
-
|
10
|
-
|
8
|
+
static parseUnits(value: number | string, unit = "ark"): BigNumber {
|
9
|
+
switch (unit.toLowerCase()) {
|
10
|
+
case "wei":
|
11
11
|
return BigNumber(value).multipliedBy(WEI_MULTIPLIER);
|
12
|
-
case
|
12
|
+
case "gwei":
|
13
13
|
return BigNumber(value).multipliedBy(GWEI_MULTIPLIER);
|
14
|
-
case
|
14
|
+
case "ark":
|
15
15
|
return BigNumber(value).multipliedBy(ARK_MULTIPLIER);
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
default:
|
17
|
+
throw new Error(`Unsupported unit: ${unit}. Supported units are 'wei', 'gwei', and 'ark'.`);
|
18
|
+
}
|
19
19
|
}
|
20
20
|
|
21
|
-
static formatUnits(value: string, unit
|
22
|
-
|
23
|
-
|
21
|
+
static formatUnits(value: string, unit = "ark"): number {
|
22
|
+
switch (unit.toLowerCase()) {
|
23
|
+
case "wei":
|
24
24
|
return BigNumber(value).dividedBy(WEI_MULTIPLIER).toNumber();
|
25
|
-
|
25
|
+
case "gwei":
|
26
26
|
return BigNumber(value).dividedBy(GWEI_MULTIPLIER).toNumber();
|
27
|
-
|
27
|
+
case "ark":
|
28
28
|
return BigNumber(value).dividedBy(ARK_MULTIPLIER).toNumber();
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
default:
|
30
|
+
throw new Error(`Unsupported unit: ${unit}. Supported units are 'wei', 'gwei', and 'ark'.`);
|
31
|
+
}
|
32
|
+
}
|
33
33
|
|
34
|
-
static weiToArk(value: number|string, suffix?: string): string {
|
35
|
-
const convertedValue = new BigNumber(this.formatUnits(this.parseUnits(value,
|
34
|
+
static weiToArk(value: number | string, suffix?: string): string {
|
35
|
+
const convertedValue = new BigNumber(this.formatUnits(this.parseUnits(value, "wei").toString(), "ark"))
|
36
36
|
.decimalPlaces(18)
|
37
37
|
.toFixed();
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
if (suffix) {
|
40
|
+
return convertedValue + " " + suffix;
|
41
|
+
}
|
42
42
|
|
43
|
-
|
43
|
+
return convertedValue;
|
44
44
|
}
|
45
45
|
|
46
|
-
static gweiToArk(value: number|string, suffix?: string): string {
|
47
|
-
const convertedValue = new BigNumber(this.formatUnits(this.parseUnits(value,
|
46
|
+
static gweiToArk(value: number | string, suffix?: string): string {
|
47
|
+
const convertedValue = new BigNumber(this.formatUnits(this.parseUnits(value, "gwei").toString(), "ark"))
|
48
48
|
.decimalPlaces(18)
|
49
49
|
.toFixed();
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
if (suffix) {
|
52
|
+
return convertedValue + " " + suffix;
|
53
|
+
}
|
54
54
|
|
55
|
-
|
55
|
+
return convertedValue;
|
56
56
|
}
|
57
57
|
}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
"passphrase": "found lobster oblige describe ready addict body brave live vacuum display salute lizard combine gift resemble race senior quality reunion proud tell adjust angle",
|
4
4
|
"secondPassphrase": "this is a top secret second passphrase",
|
5
5
|
"passphrases": [
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
"album pony urban cheap small blade cannon silent run reveal luxury glad predict excess fire beauty hollow reward solar egg exclude leaf sight degree",
|
7
|
+
"hen slogan retire boss upset blame rocket slender area arch broom bring elder few milk bounce execute page evoke once inmate pear marine deliver",
|
8
|
+
"top visa use bacon sun infant shrimp eye bridge fantasy chair sadness stable simple salad canoe raw hill target connect avoid promote spider category"
|
9
|
+
]
|
10
10
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
2
|
+
"data": {
|
3
|
+
"publicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
4
|
+
"privateKey": "50829dd3b7ffbe2df401d730b5e60cea7520ba3f3a18e5b1490707667fb43fae",
|
5
|
+
"address": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
6
|
+
"wif": "UZYnRZ8qpeQWTLeCNzw93guWSdKLmr2vHEWGG4sNv7TJofL7TZvy",
|
7
|
+
"validatorPublicKey": "b209f4a7454ae17c5808991dffbf204c747b851f351d2ce72a6e18903d0e2f609e0328ebbc3fb97cd4d3660b4bc156f1",
|
8
|
+
"validatorPrivateKey": "6ec4993df152b10e672567c1fdf854a4cee50708fa30986a7d9b259673099175"
|
9
|
+
},
|
10
|
+
"passphrase": "found lobster oblige describe ready addict body brave live vacuum display salute lizard combine gift resemble race senior quality reunion proud tell adjust angle"
|
11
|
+
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0xE536720791A7DaDBeBdBCD8c8546fb0791a11901",
|
8
8
|
"value": "0",
|
9
9
|
"data": "a9059cbb00000000000000000000000027fa7caffaae77ddb9ab232fdbda56d5e5af23930000000000000000000000000000000000000000000000000000000000000064",
|
10
10
|
"v": 28,
|
11
11
|
"r": "8cd7afafdfaaa6c4b6c97e49888dff89713c99f8b1324693ef4427ce88994bbe",
|
12
12
|
"s": "01c589bb8d3bc908aaee56d64ca35458f2cebf977bbc29180c574aba8bc12b0d",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "85cdc2ae6cd4569dd1b5b11df10fc409b3996864032d6acf87ff907286f40a03"
|
16
16
|
},
|
17
17
|
"serialized": "02f8af822710018085012a05f20083030d4094e536720791a7dadbebdbcd8c8546fb0791a1190180b844a9059cbb00000000000000000000000027fa7caffaae77ddb9ab232fdbda56d5e5af23930000000000000000000000000000000000000000000000000000000000000064c001a08cd7afafdfaaa6c4b6c97e49888dff89713c99f8b1324693ef4427ce88994bbea001c589bb8d3bc908aaee56d64ca35458f2cebf977bbc29180c574aba8bc12b0d"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0x00EFd0D4639191C49908A7BddbB9A11A994A8527",
|
8
8
|
"value": "0",
|
9
9
|
"data": "084ce7080000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
10
10
|
"v": 27,
|
11
11
|
"r": "cbec73e1cba1177789adf44fcd3cea797d132563635fae211c350acd7c328046",
|
12
12
|
"s": "216eabb6cd1eb5c0000e7eb74f66595bd5b688f43dd646f15f33e3827c8c966b",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "555fcaca65f9319c638ebb15c5ffdee0a5e41b7dc3b171aca3707bc43f40ed57"
|
16
16
|
},
|
17
17
|
"serialized": "02f8ef822710018085012a05f20083030d409400efd0d4639191c49908a7bddbb9a11a994a852780b884084ce7080000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c080a0cbec73e1cba1177789adf44fcd3cea797d132563635fae211c350acd7c328046a0216eabb6cd1eb5c0000e7eb74f66595bd5b688f43dd646f15f33e3827c8c966b"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0x00EFd0D4639191C49908A7BddbB9A11A994A8527",
|
8
8
|
"value": "100000",
|
9
9
|
"data": "084ce7080000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006f0182a0cc707b055322ccf6d4cb6a5aff1aeb22000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a0",
|
10
10
|
"v": 28,
|
11
11
|
"r": "e381eb89f21e450009706650346e3abfaee0c91c5685c8ec923d86b8212a2427",
|
12
12
|
"s": "5b3a7bfdec8ca69469e989805e7715f5d317bf62304f868a905224e7dabe7b37",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "1d0e3d567ffa39defba7904202941070b224f885f9399c817a58aeb36f4f3863"
|
16
16
|
},
|
17
17
|
"serialized": "02f90132822710018085012a05f20083030d409400efd0d4639191c49908a7bddbb9a11a994a8527830186a0b8c4084ce7080000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006f0182a0cc707b055322ccf6d4cb6a5aff1aeb22000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a0c001a0e381eb89f21e450009706650346e3abfaee0c91c5685c8ec923d86b8212a2427a05b3a7bfdec8ca69469e989805e7715f5d317bf62304f868a905224e7dabe7b37"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0x00EFd0D4639191C49908A7BddbB9A11A994A8527",
|
8
8
|
"value": "300000",
|
9
9
|
"data": "084ce708000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006f0182a0cc707b055322ccf6d4cb6a5aff1aeb22000000000000000000000000c3bbe9b1cee1ff85ad72b87414b0e9b7f2366763000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000000030d40",
|
10
10
|
"v": 27,
|
11
11
|
"r": "0c7cfc6e77249b44385decfd49b8d4deac3c4c49147a0a8d539d82d51da81581",
|
12
12
|
"s": "6af2959905394b401c87872f78ae321cf8cfdd03fe80a815a99bdd723cc90462",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "d2b7d9e8730de8ab788a37905974c11f6df1a7e5bea5f9a716bffbec17b1d3a8"
|
16
16
|
},
|
17
17
|
"serialized": "02f90173822710018085012a05f20083030d409400efd0d4639191c49908a7bddbb9a11a994a8527830493e0b90104084ce708000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006f0182a0cc707b055322ccf6d4cb6a5aff1aeb22000000000000000000000000c3bbe9b1cee1ff85ad72b87414b0e9b7f2366763000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000000030d40c080a00c7cfc6e77249b44385decfd49b8d4deac3c4c49147a0a8d539d82d51da81581a06af2959905394b401c87872f78ae321cf8cfdd03fe80a815a99bdd723cc90462"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "21000",
|
7
|
+
"to": "0x6F0182a0cc707b055322CcF6d4CB6a5Aff1aEb22",
|
8
8
|
"value": "0",
|
9
9
|
"data": "",
|
10
10
|
"v": 27,
|
11
11
|
"r": "2c42ef45cb01b01c0a59b61a7e82d37c8566e0fc0f0f47c2a2825d1cbc8abefc",
|
12
12
|
"s": "455bb2aec9d8d038db506d5a964728c78eaa4f237e0d40666742e4d5d686f576",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "241ce787680623dea7b9acf2951e2f8b8afac5f92b33b9909ab2bfbadf4be92c"
|
16
16
|
},
|
17
17
|
"serialized": "02f869822710018085012a05f200825208946f0182a0cc707b055322ccf6d4cb6a5aff1aeb228080c080a02c42ef45cb01b01c0a59b61a7e82d37c8566e0fc0f0f47c2a2825d1cbc8abefca0455bb2aec9d8d038db506d5a964728c78eaa4f237e0d40666742e4d5d686f576"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "21000",
|
7
|
+
"to": "0x6F0182a0cc707b055322CcF6d4CB6a5Aff1aEb22",
|
8
8
|
"value": "10000000000000000000",
|
9
9
|
"data": "",
|
10
10
|
"v": 27,
|
11
11
|
"r": "62666b937e4c3f55c87c44ee72b5a228c1377adbdad44264dd953b3c2b878734",
|
12
12
|
"s": "2d8670a69ce09018cfac5604d59a2b74bee18c99a91cbd14ac33c3ccfe96a35a",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "0d22ff14b09da9c5fa975d8fe79b93086853d223000cf88ff923a57650c93e4a"
|
16
16
|
},
|
17
17
|
"serialized": "02f871822710018085012a05f200825208946f0182a0cc707b055322ccf6d4cb6a5aff1aeb22888ac7230489e8000080c080a062666b937e4c3f55c87c44ee72b5a228c1377adbdad44264dd953b3c2b878734a02d8670a69ce09018cfac5604d59a2b74bee18c99a91cbd14ac33c3ccfe96a35a"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "21000",
|
7
|
+
"to": "0x6F0182a0cc707b055322CcF6d4CB6a5Aff1aEb22",
|
8
8
|
"value": "100000000",
|
9
9
|
"data": "",
|
10
10
|
"v": 28,
|
11
11
|
"r": "104665257d4dea61c4654e74c6c0f6cd0a398905781c3040bea67dc641a66da0",
|
12
12
|
"s": "46d718d04b2331f3b0561808549ed3f3f0d867a284acf6b334869078df7a9136",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "b7927d90b38cd1296351f26145b3d8b0674fdc9b8721bc1a10f71a12bcbccf60"
|
16
16
|
},
|
17
17
|
"serialized": "02f86d822710018085012a05f200825208946f0182a0cc707b055322ccf6d4cb6a5aff1aeb228405f5e10080c001a0104665257d4dea61c4654e74c6c0f6cd0a398905781c3040bea67dc641a66da0a046d718d04b2331f3b0561808549ed3f3f0d867a284acf6b334869078df7a9136"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0x535B3D7A252fa034Ed71F0C53ec0C6F784cB64E1",
|
8
8
|
"value": "0",
|
9
9
|
"data": "3174b689",
|
10
10
|
"v": 27,
|
11
11
|
"r": "bd7f932c18b49e05600cd1603808fd0a19701ee4af99035fc7b1a9159458d08d",
|
12
12
|
"s": "18a4420edfdc90fcff7c6e4d062ae11dae7a62a7ab53f6499862f3e79d67a252",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "ed937a96f4edc0fa89e7d6146b88f17a3de71f86fc200da49c73e7c93eabfea9"
|
16
16
|
},
|
17
17
|
"serialized": "02f86e822710018085012a05f20083030d4094535b3d7a252fa034ed71f0c53ec0c6f784cb64e180843174b689c080a0bd7f932c18b49e05600cd1603808fd0a19701ee4af99035fc7b1a9159458d08da018a4420edfdc90fcff7c6e4d062ae11dae7a62a7ab53f6499862f3e79d67a252"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0x2c1DE3b4Dbb4aDebEbB5dcECAe825bE2a9fc6eb6",
|
8
8
|
"value": "0",
|
9
9
|
"data": "36a94134000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000076669787475726500000000000000000000000000000000000000000000000000",
|
10
10
|
"v": 28,
|
11
11
|
"r": "4564cc1adbde3e8a309bf9d3eb76b45fecfae62fbdc0604f70483197de4d66b3",
|
12
12
|
"s": "4d4573a50c9a80221c21d11ce51b9b8bd196f9e1ab1a805b7d8b8e56fcfe2003",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "781979a58ac75475b91a1e401b50f9cc52465b21fe83e1c30e05676aaeb6a806"
|
16
16
|
},
|
17
17
|
"serialized": "02f8cf822710018085012a05f20083030d40942c1de3b4dbb4adebebb5dcecae825be2a9fc6eb680b86436a94134000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000076669787475726500000000000000000000000000000000000000000000000000c001a04564cc1adbde3e8a309bf9d3eb76b45fecfae62fbdc0604f70483197de4d66b3a04d4573a50c9a80221c21d11ce51b9b8bd196f9e1ab1a805b7d8b8e56fcfe2003"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0x2c1DE3b4Dbb4aDebEbB5dcECAe825bE2a9fc6eb6",
|
8
8
|
"value": "0",
|
9
9
|
"data": "ebed6dab",
|
10
10
|
"v": 27,
|
11
11
|
"r": "c786beafa03da8c6485bc15870ea8512db27427e3aa38654a7b8d534b30c48da",
|
12
12
|
"s": "78b2b4568f4d0f5d482c670001e6877b282ed6e16cdcbea6bd29195ca2bb036d",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "d1647fe630bcf63a23bda6015295dafe246356b0e7930cdc8a52f216fa4429a5"
|
16
16
|
},
|
17
17
|
"serialized": "02f86e822710018085012a05f20083030d40942c1de3b4dbb4adebebb5dcecae825be2a9fc6eb68084ebed6dabc080a0c786beafa03da8c6485bc15870ea8512db27427e3aa38654a7b8d534b30c48daa078b2b4568f4d0f5d482c670001e6877b282ed6e16cdcbea6bd29195ca2bb036d"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0x535B3D7A252fa034Ed71F0C53ec0C6F784cB64E1",
|
8
8
|
"value": "0",
|
9
9
|
"data": "602a9eee0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003030954f46d6097a1d314e900e66e11e0dad0a57cd03e04ec99f0dedd1c765dcb11e6d7fa02e22cf40f9ee23d9cc1c062400000000000000000000000000000000",
|
10
10
|
"v": 28,
|
11
11
|
"r": "57216346b5252f6db63a2c78b5bc0a3697d2247377e9d9ef1b67849a87eb2413",
|
12
12
|
"s": "66ea02477fc19671b3b626e3c4d33939a8ba43004f0a56e900efc1e580739d11",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "5064b50091b8e5d50ec1d1eb7c5b71cdcf9c7355bba18ee0efeaeacb0b1c95d5"
|
16
16
|
},
|
17
17
|
"serialized": "02f8ef822710018085012a05f20083030d4094535b3d7a252fa034ed71f0c53ec0c6f784cb64e180b884602a9eee0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003030954f46d6097a1d314e900e66e11e0dad0a57cd03e04ec99f0dedd1c765dcb11e6d7fa02e22cf40f9ee23d9cc1c062400000000000000000000000000000000c001a057216346b5252f6db63a2c78b5bc0a3697d2247377e9d9ef1b67849a87eb2413a066ea02477fc19671b3b626e3c4d33939a8ba43004f0a56e900efc1e580739d11"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0x535B3D7A252fa034Ed71F0C53ec0C6F784cB64E1",
|
8
8
|
"value": "0",
|
9
9
|
"data": "b85f5da2",
|
10
10
|
"v": 28,
|
11
11
|
"r": "5670e5d314906eeaf92da15b55eaeabbb92814874f2fe6c72bcbee7e13e7ff40",
|
12
12
|
"s": "32a34c8438e441d10e83180b5a8a84cf1bfb92fc0fe8b53cd23dc4105631b83d",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "2dc3b976d8dee25e2ecf341c1493670d9d087cc338ed63f764c0eb9e28869dc3"
|
16
16
|
},
|
17
17
|
"serialized": "02f86e822710018085012a05f20083030d4094535b3d7a252fa034ed71f0c53ec0c6f784cb64e18084b85f5da2c001a05670e5d314906eeaf92da15b55eaeabbb92814874f2fe6c72bcbee7e13e7ff40a032a34c8438e441d10e83180b5a8a84cf1bfb92fc0fe8b53cd23dc4105631b83d"
|
18
18
|
}
|
@@ -3,16 +3,16 @@
|
|
3
3
|
"network": 10000,
|
4
4
|
"nonce": "1",
|
5
5
|
"gasPrice": "5000000000",
|
6
|
-
"
|
7
|
-
"
|
6
|
+
"gas": "200000",
|
7
|
+
"to": "0x535B3D7A252fa034Ed71F0C53ec0C6F784cB64E1",
|
8
8
|
"value": "0",
|
9
9
|
"data": "6dd7d8ea000000000000000000000000c3bbe9b1cee1ff85ad72b87414b0e9b7f2366763",
|
10
10
|
"v": 27,
|
11
11
|
"r": "67734fadb38bd9cd584d39fc08af836f15dd6337b05511b312add11a3586451a",
|
12
12
|
"s": "08ba89cec57c38b1e1f488d3507b9cbe1a21aa3f441482e62bd9c1eef61d3bd9",
|
13
13
|
"senderPublicKey": "0243333347c8cbf4e3cbc7a96964181d02a2b0c854faa2fef86b4b8d92afcf473d",
|
14
|
-
"
|
15
|
-
"
|
14
|
+
"from": "0x1E6747BEAa5B4076a6A98D735DF8c35a70D18Bdd",
|
15
|
+
"hash": "351114ee096ad8a02ddb7abee6f4fe283b8dadceff17157722d7a8153de710c1"
|
16
16
|
},
|
17
17
|
"serialized": "02f88e822710018085012a05f20083030d4094535b3d7a252fa034ed71f0c53ec0c6f784cb64e180a46dd7d8ea000000000000000000000000c3bbe9b1cee1ff85ad72b87414b0e9b7f2366763c080a067734fadb38bd9cd584d39fc08af836f15dd6337b05511b312add11a3586451aa008ba89cec57c38b1e1f488d3507b9cbe1a21aa3f441482e62bd9c1eef61d3bd9"
|
18
18
|
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { Network } from "@/configuration/Network";
|
2
|
+
import { AbstractNetwork } from "@/networks/AbstractNetwork";
|
3
|
+
import { Mainnet } from "@/networks/Mainnet";
|
4
|
+
import { Testnet } from "@/networks/Testnet";
|
5
|
+
|
6
|
+
class CustomNetwork extends AbstractNetwork {
|
7
|
+
public chainId(): number {
|
8
|
+
return 10000;
|
9
|
+
}
|
10
|
+
|
11
|
+
public epoch(): string {
|
12
|
+
return "2017-01-01T13:00:00.000Z";
|
13
|
+
}
|
14
|
+
|
15
|
+
public wif(): string {
|
16
|
+
return "82";
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
it("should get_network", () => {
|
21
|
+
const network = Network.get();
|
22
|
+
|
23
|
+
expect(network.chainId()).toEqual(10000);
|
24
|
+
});
|
25
|
+
|
26
|
+
it("should set_network", () => {
|
27
|
+
Network.set(new Mainnet());
|
28
|
+
|
29
|
+
let network = Network.get();
|
30
|
+
|
31
|
+
expect(network.wif()).toEqual("ba");
|
32
|
+
expect(network.epoch()).toEqual("2017-03-21T13:00:00.000Z");
|
33
|
+
expect(network.chainId()).toEqual(10000);
|
34
|
+
|
35
|
+
Network.set(new Testnet());
|
36
|
+
|
37
|
+
network = Network.get();
|
38
|
+
|
39
|
+
expect(network.wif()).toEqual("ba");
|
40
|
+
expect(network.epoch()).toEqual("2017-03-21T13:00:00.000Z");
|
41
|
+
expect(network.chainId()).toEqual(10000);
|
42
|
+
});
|
43
|
+
|
44
|
+
it("should set_custom_network", () => {
|
45
|
+
Network.set(new CustomNetwork());
|
46
|
+
|
47
|
+
const network = Network.get();
|
48
|
+
|
49
|
+
expect(network.wif()).toEqual("82");
|
50
|
+
expect(network.epoch()).toEqual("2017-01-01T13:00:00.000Z");
|
51
|
+
expect(network.chainId()).toEqual(10000);
|
52
|
+
});
|
@@ -1,25 +1,25 @@
|
|
1
1
|
import fixture from "@tests/fixtures/identity.json";
|
2
2
|
import { Address } from "@/identities/Address";
|
3
3
|
|
4
|
-
it(
|
4
|
+
it("should get the address from passphrase", () => {
|
5
5
|
const actual = Address.fromPassphrase(fixture.passphrase);
|
6
6
|
|
7
7
|
expect(actual).toEqual(fixture.data.address);
|
8
8
|
});
|
9
9
|
|
10
|
-
it(
|
10
|
+
it("should get the address from public key", () => {
|
11
11
|
const actual = Address.fromPublicKey(fixture.data.publicKey);
|
12
12
|
|
13
13
|
expect(actual).toEqual(fixture.data.address);
|
14
14
|
});
|
15
15
|
|
16
|
-
it(
|
16
|
+
it("should get the address from private key", () => {
|
17
17
|
const actual = Address.fromPrivateKey(fixture.data.privateKey);
|
18
18
|
|
19
19
|
expect(actual).toEqual(fixture.data.address);
|
20
20
|
});
|
21
21
|
|
22
|
-
it(
|
22
|
+
it("should validate the address", () => {
|
23
23
|
const actual = Address.validate(fixture.data.address);
|
24
24
|
|
25
25
|
expect(actual).toBe(true);
|