diff --git a/documentation/index.yaml b/documentation/index.yaml index a4115fa66..584a86249 100644 --- a/documentation/index.yaml +++ b/documentation/index.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/admin.yaml b/documentation/namespaces/admin.yaml index cecc7826a..fa11e6cfe 100644 --- a/documentation/namespaces/admin.yaml +++ b/documentation/namespaces/admin.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/debug.yaml b/documentation/namespaces/debug.yaml index f36817982..d3e0d1c1e 100644 --- a/documentation/namespaces/debug.yaml +++ b/documentation/namespaces/debug.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/eth.yaml b/documentation/namespaces/eth.yaml index 3fe39e11d..523b4a2a1 100644 --- a/documentation/namespaces/eth.yaml +++ b/documentation/namespaces/eth.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/governance.yaml b/documentation/namespaces/governance.yaml index 87e39b058..186ca2727 100644 --- a/documentation/namespaces/governance.yaml +++ b/documentation/namespaces/governance.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/kaia.yaml b/documentation/namespaces/kaia.yaml index e8c0fabac..666db504e 100644 --- a/documentation/namespaces/kaia.yaml +++ b/documentation/namespaces/kaia.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/klay.yaml b/documentation/namespaces/klay.yaml index fc2fc890d..37f32962f 100644 --- a/documentation/namespaces/klay.yaml +++ b/documentation/namespaces/klay.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/mainbridge.yaml b/documentation/namespaces/mainbridge.yaml index 30b321cf5..9b02664f0 100644 --- a/documentation/namespaces/mainbridge.yaml +++ b/documentation/namespaces/mainbridge.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/net.yaml b/documentation/namespaces/net.yaml index 81c126075..227572a11 100644 --- a/documentation/namespaces/net.yaml +++ b/documentation/namespaces/net.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/personal.yaml b/documentation/namespaces/personal.yaml index 10c9b998d..fc350785b 100644 --- a/documentation/namespaces/personal.yaml +++ b/documentation/namespaces/personal.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/subbridge.yaml b/documentation/namespaces/subbridge.yaml index 44e8f352f..37095de7f 100644 --- a/documentation/namespaces/subbridge.yaml +++ b/documentation/namespaces/subbridge.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/namespaces/txpool.yaml b/documentation/namespaces/txpool.yaml index ac33246b7..061f25ec0 100644 --- a/documentation/namespaces/txpool.yaml +++ b/documentation/namespaces/txpool.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/documentation/redocly.yaml b/documentation/redocly.yaml index 2fca79516..39f745c06 100644 --- a/documentation/redocly.yaml +++ b/documentation/redocly.yaml @@ -1,5 +1,5 @@ # See https://redocly.com/docs/cli/configuration/ for more information. -organization: klaytn.foundation +organization: kaia.io apis: index@v1.0.0: root: ./index.yaml diff --git a/ethers-ext/README.md b/ethers-ext/README.md index ed116de22..9d2173ca3 100644 --- a/ethers-ext/README.md +++ b/ethers-ext/README.md @@ -1,11 +1,11 @@ -# Ethers.js Extension for Klaytn +# Ethers.js Extension for Kaia -Ethers.js Extension for Klaytn offers: +Ethers.js Extension for Kaia offers: -- Drop-in replacement to `ethers.Wallet` that handles both Ethereum and Klaytn transaction types +- Drop-in replacement to `ethers.Wallet` that handles both Ethereum and Kaia transaction types involving AccountKey and TxTypes. - Drop-in replacement to `ethers.providers.JsonRpcProvider` that provides accesses to both Ethereum RPCs and - Klaytn-specific RPCs. + Kaia-specific RPCs. - Drop-in replacement to `ethers.Web3Provider` to work with both MetaMask (`window.ethereum`) and Kaikas (`window.klaytn`) ## Note for ethers v6 @@ -31,7 +31,7 @@ Ethers.js Extension for Klaytn offers: ```js const ethers = require("ethers"); // ethers v5 - const { Wallet } = require("@klaytn/ethers-ext/v5"); + const { Wallet } = require("@kaiachain/ethers-ext/v5"); const provider = new ethers.providers.JsonRpcProvider( "https://public-en-kairos.node.kaia.io" @@ -43,7 +43,7 @@ Ethers.js Extension for Klaytn offers: ```js const ethers = require("ethers"); // ethers v6 - const { Wallet } = require("@klaytn/ethers-ext/v6"); + const { Wallet } = require("@kaiachain/ethers-ext/v6"); const provider = new ethers.JsonRpcProvider( "https://public-en-kairos.node.kaia.io" @@ -73,21 +73,21 @@ Ethers.js Extension for Klaytn offers: - ESM or TypeScript ```ts - import { Wallet, JsonRpcProvider } from "@klaytn/ethers-ext"; + import { Wallet, JsonRpcProvider } from "@kaiachain/ethers-ext"; // esm // v5 - import { v5 } from "@klaytn/ethers-ext"; + import { v5 } from "@kaiachain/ethers-ext"; const { Wallet, JsonRpcProvider } = v5; // v6 - import { v6 } from "@klaytn/ethers-ext"; + import { v6 } from "@kaiachain/ethers-ext"; const { Wallet, JsonRpcProvider } = v6; // esm subpath import. If using typescript, add "moduleResolution": "nodenext" to tsconfig.json // v5 - import { Wallet, JsonRpcProvider } from "@klaytn/ethers-ext/v5"; + import { Wallet, JsonRpcProvider } from "@kaiachain/ethers-ext/v5"; // v6 - import { Wallet, JsonRpcProvider } from "@klaytn/ethers-ext/v6"; + import { Wallet, JsonRpcProvider } from "@kaiachain/ethers-ext/v6"; const provider = new JsonRpcProvider("https://public-en-kairos.node.kaia.io"); const wallet = new Wallet("", provider); @@ -97,12 +97,12 @@ Ethers.js Extension for Klaytn offers: ```js // v5 - const { Wallet, JsonRpcProvider } = require("@klaytn/ethers-ext"); - const { Wallet, JsonRpcProvider } = require("@klaytn/ethers-ext").v5; - const { Wallet, JsonRpcProvider } = require("@klaytn/ethers-ext/v5"); + const { Wallet, JsonRpcProvider } = require("@kaiachain/ethers-ext"); + const { Wallet, JsonRpcProvider } = require("@kaiachain/ethers-ext").v5; + const { Wallet, JsonRpcProvider } = require("@kaiachain/ethers-ext/v5"); // v6 - const { Wallet, JsonRpcProvider } = require("@klaytn/ethers-ext").v6; - const { Wallet, JsonRpcProvider } = require("@klaytn/ethers-ext/v6"); + const { Wallet, JsonRpcProvider } = require("@kaiachain/ethers-ext").v6; + const { Wallet, JsonRpcProvider } = require("@kaiachain/ethers-ext/v6"); const provider = new JsonRpcProvider("https://public-en-kairos.node.kaia.io"); const wallet = new Wallet("", provider); diff --git a/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyLegacy.js b/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyLegacy.js index 3f11b6569..3bb52d75a 100644 --- a/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyLegacy.js +++ b/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyLegacy.js @@ -1,5 +1,5 @@ // AccountKeyLegacy -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyPublic.js b/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyPublic.js index 8d1c16976..638c5a100 100644 --- a/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyPublic.js +++ b/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyPublic.js @@ -1,5 +1,5 @@ // AccountKeyPublic -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyRoleBased.js b/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyRoleBased.js index 13be7739e..89f549a49 100644 --- a/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyRoleBased.js +++ b/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyRoleBased.js @@ -1,5 +1,5 @@ // AccountKeyRoleBased -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyWeightedMultiSig.js b/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyWeightedMultiSig.js index 39f31d406..84e7c2b3c 100644 --- a/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyWeightedMultiSig.js +++ b/ethers-ext/example/v5/accountKey/sign_msg_AccountKeyWeightedMultiSig.js @@ -1,5 +1,5 @@ // AccountKeyWeightedMultiSig -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyLegacy.js b/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyLegacy.js index 461fe6e18..2fdccd526 100644 --- a/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyLegacy.js +++ b/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyLegacy.js @@ -1,5 +1,5 @@ // AccountKeyLegacy -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyPublic.js b/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyPublic.js index 6b39f0bd4..aaa8ed2cf 100644 --- a/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyPublic.js +++ b/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyPublic.js @@ -1,5 +1,5 @@ // AccountKeyPublic -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyRoleBased.js b/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyRoleBased.js index 32eead388..6ce0629a8 100644 --- a/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyRoleBased.js +++ b/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyRoleBased.js @@ -1,5 +1,5 @@ // AccountKeyRoleBased -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyWeightedMultiSig.js b/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyWeightedMultiSig.js index 140e21dc3..0f043e947 100644 --- a/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyWeightedMultiSig.js +++ b/ethers-ext/example/v5/accountKey/sign_tx_AccountKeyWeightedMultiSig.js @@ -1,5 +1,5 @@ // AccountKeyWeightedMultiSig -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/update_AccountKeyLegacy.js b/ethers-ext/example/v5/accountKey/update_AccountKeyLegacy.js index aa3338382..99c2b24b5 100644 --- a/ethers-ext/example/v5/accountKey/update_AccountKeyLegacy.js +++ b/ethers-ext/example/v5/accountKey/update_AccountKeyLegacy.js @@ -1,5 +1,5 @@ // AccountKeyLegacy -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/update_AccountKeyPublic.js b/ethers-ext/example/v5/accountKey/update_AccountKeyPublic.js index cae6abc5d..06333ed04 100644 --- a/ethers-ext/example/v5/accountKey/update_AccountKeyPublic.js +++ b/ethers-ext/example/v5/accountKey/update_AccountKeyPublic.js @@ -1,5 +1,5 @@ // AccountKeyPublic -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/update_AccountKeyRoleBased.js b/ethers-ext/example/v5/accountKey/update_AccountKeyRoleBased.js index c1e4db7ad..e58eb7f36 100644 --- a/ethers-ext/example/v5/accountKey/update_AccountKeyRoleBased.js +++ b/ethers-ext/example/v5/accountKey/update_AccountKeyRoleBased.js @@ -1,5 +1,5 @@ // AccountKeyRoleBased -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/accountKey/update_AccountKeyWeightedMultiSig.js b/ethers-ext/example/v5/accountKey/update_AccountKeyWeightedMultiSig.js index e5a1090b1..4d9fdd683 100644 --- a/ethers-ext/example/v5/accountKey/update_AccountKeyWeightedMultiSig.js +++ b/ethers-ext/example/v5/accountKey/update_AccountKeyWeightedMultiSig.js @@ -1,5 +1,5 @@ // AccountKeyWeightedMultiSig -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers5"); diff --git a/ethers-ext/example/v5/rpc/rpc.js b/ethers-ext/example/v5/rpc/rpc.js index 8c526b484..d1572713f 100644 --- a/ethers-ext/example/v5/rpc/rpc.js +++ b/ethers-ext/example/v5/rpc/rpc.js @@ -4,7 +4,7 @@ async function main() { let provider = new JsonRpcProvider("https://public-en-kairos.node.kaia.io/"); // The full list of JSON-RPC is available at: - // https://docs.klaytn.foundation/content/dapp/json-rpc/api-references + // https://docs.kaia.io/references/json-rpc/references const num = await provider.klay.blockNumber(); console.log("klay.blockNumber", num); diff --git a/ethers-ext/example/v5/transactions/Basic_08_TxTypeValueTransfer.js b/ethers-ext/example/v5/transactions/Basic_08_TxTypeValueTransfer.js index eb38bdabc..1330dce5c 100644 --- a/ethers-ext/example/v5/transactions/Basic_08_TxTypeValueTransfer.js +++ b/ethers-ext/example/v5/transactions/Basic_08_TxTypeValueTransfer.js @@ -1,5 +1,5 @@ // TxTypeValueTransfer -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/Basic_10_TxTypeValueTransferMemo.js b/ethers-ext/example/v5/transactions/Basic_10_TxTypeValueTransferMemo.js index 8d02ff887..6abbaf93f 100644 --- a/ethers-ext/example/v5/transactions/Basic_10_TxTypeValueTransferMemo.js +++ b/ethers-ext/example/v5/transactions/Basic_10_TxTypeValueTransferMemo.js @@ -1,5 +1,5 @@ // TxTypeValueTransferMemo -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/Basic_20_TxTypeAccountUpdate.js b/ethers-ext/example/v5/transactions/Basic_20_TxTypeAccountUpdate.js index 56228b4e5..30145c4d0 100644 --- a/ethers-ext/example/v5/transactions/Basic_20_TxTypeAccountUpdate.js +++ b/ethers-ext/example/v5/transactions/Basic_20_TxTypeAccountUpdate.js @@ -1,5 +1,5 @@ // TxTypeAccountUpdate -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/Basic_28_TxTypeSmartContractDeploy.js b/ethers-ext/example/v5/transactions/Basic_28_TxTypeSmartContractDeploy.js index 8c264f960..a78a41e08 100644 --- a/ethers-ext/example/v5/transactions/Basic_28_TxTypeSmartContractDeploy.js +++ b/ethers-ext/example/v5/transactions/Basic_28_TxTypeSmartContractDeploy.js @@ -1,5 +1,5 @@ // TxTypeSmartContractDeploy -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/Basic_30_TxTypeSmartContractExecution.js b/ethers-ext/example/v5/transactions/Basic_30_TxTypeSmartContractExecution.js index 0b3394e71..72c085fcb 100644 --- a/ethers-ext/example/v5/transactions/Basic_30_TxTypeSmartContractExecution.js +++ b/ethers-ext/example/v5/transactions/Basic_30_TxTypeSmartContractExecution.js @@ -1,5 +1,5 @@ // TxTypeSmartContractExecution -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/Basic_38_TxTypeCancel.js b/ethers-ext/example/v5/transactions/Basic_38_TxTypeCancel.js index 687a88239..2a1fe16b1 100644 --- a/ethers-ext/example/v5/transactions/Basic_38_TxTypeCancel.js +++ b/ethers-ext/example/v5/transactions/Basic_38_TxTypeCancel.js @@ -1,5 +1,5 @@ // TxTypeCancel -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js b/ethers-ext/example/v5/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js index 98da6fd52..b48a7254f 100644 --- a/ethers-ext/example/v5/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js +++ b/ethers-ext/example/v5/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js @@ -1,5 +1,5 @@ // TxtypeFeeDelegatedValueTransfer -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js b/ethers-ext/example/v5/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js index fa44fc6f3..dcbddcb6c 100644 --- a/ethers-ext/example/v5/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js +++ b/ethers-ext/example/v5/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransferMemo -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js b/ethers-ext/example/v5/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js index 7dde086cb..a36936c64 100644 --- a/ethers-ext/example/v5/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js +++ b/ethers-ext/example/v5/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedAccountUpdate -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js b/ethers-ext/example/v5/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js index 103f41c40..dbc44092c 100644 --- a/ethers-ext/example/v5/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js +++ b/ethers-ext/example/v5/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractDeploy -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js b/ethers-ext/example/v5/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js index 361cbb26d..57fba79d4 100644 --- a/ethers-ext/example/v5/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js +++ b/ethers-ext/example/v5/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractExecution -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js b/ethers-ext/example/v5/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js index e82dd5724..33d01bdbb 100644 --- a/ethers-ext/example/v5/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js +++ b/ethers-ext/example/v5/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedCancel -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js b/ethers-ext/example/v5/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js index aca5c817c..90b206998 100644 --- a/ethers-ext/example/v5/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js +++ b/ethers-ext/example/v5/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransferWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js b/ethers-ext/example/v5/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js index 5f3bf6faa..179aa8936 100644 --- a/ethers-ext/example/v5/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js +++ b/ethers-ext/example/v5/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransferMemoWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js b/ethers-ext/example/v5/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js index a8b438fb6..1c47d985a 100644 --- a/ethers-ext/example/v5/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js +++ b/ethers-ext/example/v5/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedAccountUpdateWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js b/ethers-ext/example/v5/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js index e6c6f5ec4..aa317c0b0 100644 --- a/ethers-ext/example/v5/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js +++ b/ethers-ext/example/v5/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractDeployWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js b/ethers-ext/example/v5/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js index d93bdb159..d1107ff95 100644 --- a/ethers-ext/example/v5/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js +++ b/ethers-ext/example/v5/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractExecutionWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js b/ethers-ext/example/v5/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js index a173c6a1c..3544ac38a 100644 --- a/ethers-ext/example/v5/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js +++ b/ethers-ext/example/v5/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedCancelWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/transactions/legacy.js b/ethers-ext/example/v5/transactions/legacy.js index 0eea8ea65..15df3ac8e 100644 --- a/ethers-ext/example/v5/transactions/legacy.js +++ b/ethers-ext/example/v5/transactions/legacy.js @@ -1,5 +1,5 @@ // Legacy -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers5"); diff --git a/ethers-ext/example/v5/utils/keystoreV4_multi.js b/ethers-ext/example/v5/utils/keystoreV4_multi.js index 890969337..55a3211b2 100644 --- a/ethers-ext/example/v5/utils/keystoreV4_multi.js +++ b/ethers-ext/example/v5/utils/keystoreV4_multi.js @@ -2,7 +2,7 @@ const { Wallet } = require("@kaiachain/ethers-ext/v5"); -// Klaytn V4 with multiple role-based keys. https://toolkit.klaytn.foundation/misc/generateKeystore +// Klaytn V4 with multiple role-based keys. https://toolkit.kaia.io/misc/generateKeystore const encryptedKey = `{ "version": 4, "id":"2d7ad5c1-880f-4920-9b8e-51f852c4802c", diff --git a/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyLegacy.js b/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyLegacy.js index 5758ac5f9..54a9c6e91 100644 --- a/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyLegacy.js +++ b/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyLegacy.js @@ -1,5 +1,5 @@ // AccountKeyLegacy -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyPublic.js b/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyPublic.js index 4fdb09dbb..d03633387 100644 --- a/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyPublic.js +++ b/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyPublic.js @@ -1,5 +1,5 @@ // AccountKeyPublic -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyRoleBased.js b/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyRoleBased.js index 8768c92a9..a17f74b2c 100644 --- a/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyRoleBased.js +++ b/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyRoleBased.js @@ -1,5 +1,5 @@ // AccountKeyRoleBased -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyWeightedMultiSig.js b/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyWeightedMultiSig.js index a254e9295..19048c9b1 100644 --- a/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyWeightedMultiSig.js +++ b/ethers-ext/example/v6/accountKey/sign_msg_AccountKeyWeightedMultiSig.js @@ -1,5 +1,5 @@ // AccountKeyWeightedMultiSig -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyLegacy.js b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyLegacy.js index 784b57d16..ad1cb48c3 100644 --- a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyLegacy.js +++ b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyLegacy.js @@ -1,5 +1,5 @@ // AccountKeyLegacy -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyPublic.js b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyPublic.js index d7217864c..5743a7b3e 100644 --- a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyPublic.js +++ b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyPublic.js @@ -1,5 +1,5 @@ // AccountKeyPublic -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyRoleBased.js b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyRoleBased.js index 24f67b16d..3d46f5c9c 100644 --- a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyRoleBased.js +++ b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyRoleBased.js @@ -1,5 +1,5 @@ // AccountKeyRoleBased -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyWeightedMultiSig.js b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyWeightedMultiSig.js index 86ed459a8..15cb8987f 100644 --- a/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyWeightedMultiSig.js +++ b/ethers-ext/example/v6/accountKey/sign_tx_AccountKeyWeightedMultiSig.js @@ -1,5 +1,5 @@ // AccountKeyWeightedMultiSig -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/update_AccountKeyLegacy.js b/ethers-ext/example/v6/accountKey/update_AccountKeyLegacy.js index bfcb02bfa..516424205 100644 --- a/ethers-ext/example/v6/accountKey/update_AccountKeyLegacy.js +++ b/ethers-ext/example/v6/accountKey/update_AccountKeyLegacy.js @@ -1,5 +1,5 @@ // AccountKeyLegacy -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/update_AccountKeyPublic.js b/ethers-ext/example/v6/accountKey/update_AccountKeyPublic.js index 3aff06d6a..4f48f65f0 100644 --- a/ethers-ext/example/v6/accountKey/update_AccountKeyPublic.js +++ b/ethers-ext/example/v6/accountKey/update_AccountKeyPublic.js @@ -1,5 +1,5 @@ // AccountKeyPublic -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/update_AccountKeyRoleBased.js b/ethers-ext/example/v6/accountKey/update_AccountKeyRoleBased.js index ae2074434..de311f7d2 100644 --- a/ethers-ext/example/v6/accountKey/update_AccountKeyRoleBased.js +++ b/ethers-ext/example/v6/accountKey/update_AccountKeyRoleBased.js @@ -1,5 +1,5 @@ // AccountKeyRoleBased -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/accountKey/update_AccountKeyWeightedMultiSig.js b/ethers-ext/example/v6/accountKey/update_AccountKeyWeightedMultiSig.js index b065b6784..401635e66 100644 --- a/ethers-ext/example/v6/accountKey/update_AccountKeyWeightedMultiSig.js +++ b/ethers-ext/example/v6/accountKey/update_AccountKeyWeightedMultiSig.js @@ -1,5 +1,5 @@ // AccountKeyWeightedMultiSig -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { ethers } = require("ethers6"); diff --git a/ethers-ext/example/v6/rpc/rpc.js b/ethers-ext/example/v6/rpc/rpc.js index 004830c94..0eeeb1721 100644 --- a/ethers-ext/example/v6/rpc/rpc.js +++ b/ethers-ext/example/v6/rpc/rpc.js @@ -4,7 +4,7 @@ async function main() { let provider = new JsonRpcProvider("https://public-en-kairos.node.kaia.io/"); // The full list of JSON-RPC is available at: - // https://docs.klaytn.foundation/content/dapp/json-rpc/api-references + // https://docs.kaia.io/references/json-rpc/references const num = await provider.klay.blockNumber(); console.log("klay.blockNumber", num); diff --git a/ethers-ext/example/v6/transactions/Basic_08_TxTypeValueTransfer.js b/ethers-ext/example/v6/transactions/Basic_08_TxTypeValueTransfer.js index d587c36ec..11d852db9 100644 --- a/ethers-ext/example/v6/transactions/Basic_08_TxTypeValueTransfer.js +++ b/ethers-ext/example/v6/transactions/Basic_08_TxTypeValueTransfer.js @@ -1,5 +1,5 @@ // TxTypeValueTransfer -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/Basic_10_TxTypeValueTransferMemo.js b/ethers-ext/example/v6/transactions/Basic_10_TxTypeValueTransferMemo.js index 42ff991e2..91faa2cb0 100644 --- a/ethers-ext/example/v6/transactions/Basic_10_TxTypeValueTransferMemo.js +++ b/ethers-ext/example/v6/transactions/Basic_10_TxTypeValueTransferMemo.js @@ -1,5 +1,5 @@ // TxTypeValueTransferMemo -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/Basic_20_TxTypeAccountUpdate.js b/ethers-ext/example/v6/transactions/Basic_20_TxTypeAccountUpdate.js index 6bed5ce5c..b0b1ecdea 100644 --- a/ethers-ext/example/v6/transactions/Basic_20_TxTypeAccountUpdate.js +++ b/ethers-ext/example/v6/transactions/Basic_20_TxTypeAccountUpdate.js @@ -1,5 +1,5 @@ // TxTypeAccountUpdate -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/Basic_28_TxTypeSmartContractDeploy.js b/ethers-ext/example/v6/transactions/Basic_28_TxTypeSmartContractDeploy.js index e12448a57..691a2e66d 100644 --- a/ethers-ext/example/v6/transactions/Basic_28_TxTypeSmartContractDeploy.js +++ b/ethers-ext/example/v6/transactions/Basic_28_TxTypeSmartContractDeploy.js @@ -1,5 +1,5 @@ // TxTypeSmartContractDeploy -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/Basic_30_TxTypeSmartContractExecution.js b/ethers-ext/example/v6/transactions/Basic_30_TxTypeSmartContractExecution.js index 64c82caf7..cd85727e2 100644 --- a/ethers-ext/example/v6/transactions/Basic_30_TxTypeSmartContractExecution.js +++ b/ethers-ext/example/v6/transactions/Basic_30_TxTypeSmartContractExecution.js @@ -1,5 +1,5 @@ // TxTypeSmartContractExecution -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/Basic_38_TxTypeCancel.js b/ethers-ext/example/v6/transactions/Basic_38_TxTypeCancel.js index 5cbbf6f9b..6e9a9e8e5 100644 --- a/ethers-ext/example/v6/transactions/Basic_38_TxTypeCancel.js +++ b/ethers-ext/example/v6/transactions/Basic_38_TxTypeCancel.js @@ -1,5 +1,5 @@ // TxTypeCancel -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js b/ethers-ext/example/v6/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js index 67d0593f2..68ed9a228 100644 --- a/ethers-ext/example/v6/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js +++ b/ethers-ext/example/v6/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js @@ -1,5 +1,5 @@ // TxtypeFeeDelegatedValueTransfer -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js b/ethers-ext/example/v6/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js index 990b1d910..f5c57fb35 100644 --- a/ethers-ext/example/v6/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js +++ b/ethers-ext/example/v6/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransferMemo -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js b/ethers-ext/example/v6/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js index 33a0be1d2..574200920 100644 --- a/ethers-ext/example/v6/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js +++ b/ethers-ext/example/v6/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedAccountUpdate -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js b/ethers-ext/example/v6/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js index 274b34316..5e55d2ed4 100644 --- a/ethers-ext/example/v6/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js +++ b/ethers-ext/example/v6/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractDeploy -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js b/ethers-ext/example/v6/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js index 715c90713..561498c1b 100644 --- a/ethers-ext/example/v6/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js +++ b/ethers-ext/example/v6/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractExecution -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js b/ethers-ext/example/v6/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js index 5e3b9c776..0b8ae4472 100644 --- a/ethers-ext/example/v6/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js +++ b/ethers-ext/example/v6/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedCancel -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js b/ethers-ext/example/v6/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js index 52fedee5d..c4b046981 100644 --- a/ethers-ext/example/v6/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js +++ b/ethers-ext/example/v6/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransferWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js b/ethers-ext/example/v6/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js index 62833e945..f702ea8b9 100644 --- a/ethers-ext/example/v6/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js +++ b/ethers-ext/example/v6/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransferMemoWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js b/ethers-ext/example/v6/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js index 4f7b70a41..c0f0e88e2 100644 --- a/ethers-ext/example/v6/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js +++ b/ethers-ext/example/v6/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedAccountUpdateWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js b/ethers-ext/example/v6/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js index 9e77e7467..f12160dea 100644 --- a/ethers-ext/example/v6/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js +++ b/ethers-ext/example/v6/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractDeployWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js b/ethers-ext/example/v6/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js index df5f58a98..307853f76 100644 --- a/ethers-ext/example/v6/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js +++ b/ethers-ext/example/v6/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractExecutionWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js b/ethers-ext/example/v6/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js index 3d2a1fb0d..f9cdf2404 100644 --- a/ethers-ext/example/v6/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js +++ b/ethers-ext/example/v6/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedCancelWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/transactions/legacy.js b/ethers-ext/example/v6/transactions/legacy.js index 2be615fee..8b0c528d6 100644 --- a/ethers-ext/example/v6/transactions/legacy.js +++ b/ethers-ext/example/v6/transactions/legacy.js @@ -1,5 +1,5 @@ // Legacy -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const ethers = require("ethers6"); diff --git a/ethers-ext/example/v6/utils/keystoreV4_multi.js b/ethers-ext/example/v6/utils/keystoreV4_multi.js index ee5f596a7..3b3e3d9a9 100644 --- a/ethers-ext/example/v6/utils/keystoreV4_multi.js +++ b/ethers-ext/example/v6/utils/keystoreV4_multi.js @@ -2,7 +2,7 @@ const { Wallet } = require("@kaiachain/ethers-ext/v6"); -// Klaytn V4 with multiple role-based keys. https://toolkit.klaytn.foundation/misc/generateKeystore +// Klaytn V4 with multiple role-based keys. https://toolkit.kaia.io/misc/generateKeystore const encryptedKey = `{ "version": 4, "id":"2d7ad5c1-880f-4920-9b8e-51f852c4802c", diff --git a/ethers-ext/package.json b/ethers-ext/package.json index ddd5498b9..a495cf37f 100644 --- a/ethers-ext/package.json +++ b/ethers-ext/package.json @@ -1,6 +1,6 @@ { "name": "@kaiachain/ethers-ext", - "version": "1.0.1", + "version": "1.1.0", "license": "MIT", "description": "ethers.js extension for kaia blockchain", "keywords": [ diff --git a/ethers-ext/src/v5/signer.ts b/ethers-ext/src/v5/signer.ts index 2bc07e9ec..6a999ae30 100644 --- a/ethers-ext/src/v5/signer.ts +++ b/ethers-ext/src/v5/signer.ts @@ -323,7 +323,7 @@ export class JsonRpcSigner extends EthersSigner implements EthersJsonRpcSigner { // If underlying EIP-1193 provider is Kaikas, return the KIP-97 signed message in which // the message is prefixed with "\x19Klaytn Signed Message:\n" + len(message) before signing. - // https://kips.klaytn.foundation/KIPs/kip-97 + // https://kips.kaia.io/KIPs/kip-97 // // Otherwise, return the ERC-191 signed message in which the message is prefixed with // "\x19Ethereum Signed Message:\n" + len(message) before signing. diff --git a/ethers-ext/src/v6/signer.ts b/ethers-ext/src/v6/signer.ts index 7d6b25baf..e79316785 100644 --- a/ethers-ext/src/v6/signer.ts +++ b/ethers-ext/src/v6/signer.ts @@ -330,7 +330,7 @@ export class JsonRpcSigner extends EthersJsonRpcSigner { // If underlying EIP-1193 provider is Kaikas, return the KIP-97 signed message in which // the message is prefixed with "\x19Klaytn Signed Message:\n" + len(message) before signing. - // https://kips.klaytn.foundation/KIPs/kip-97 + // https://kips.kaia.io/KIPs/kip-97 // // Otherwise, return the ERC-191 signed message in which the message is prefixed with // "\x19Ethereum Signed Message:\n" + len(message) before signing. diff --git a/ethers-ext/test/v5/keystore.spec.ts b/ethers-ext/test/v5/keystore.spec.ts index 054dc6314..b053f40dc 100644 --- a/ethers-ext/test/v5/keystore.spec.ts +++ b/ethers-ext/test/v5/keystore.spec.ts @@ -24,7 +24,7 @@ describe("keystore v5", () => { ], }, { - // Klaytn V4 with multiple role-based keys. https://toolkit.klaytn.foundation/misc/generateKeystore + // Klaytn V4 with multiple role-based keys. https://toolkit.kaia.io/misc/generateKeystore json: '{"version":4,"id":"2d7ad5c1-880f-4920-9b8e-51f852c4802c","address":"0x17226c9b4e130551c258eb7b1cdc927c13998cd6","keyring":[[{"ciphertext":"eb9bd884ac3cc8bf92e6b0082e9d07198bfc4c1223ccc6e5edf7452ad612b2b5","cipherparams":{"iv":"47faf7b0991a051eef698c73fc246f78"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"ba0a3e8dc49a04f8e590f8df5a590bc6e134b031ce10f46d73d4c459aa4c08f8","n":4096,"r":8,"p":1},"mac":"4978d7325e1b9b3ec9fdfd1ec709a5a86fdfade0297ea9ddeeb8c3a7a62ae898"}],[{"ciphertext":"1a80c8666bea1a8dfa3082b001ff64c818fb14cf4e02017785e0edcc7a277af4","cipherparams":{"iv":"eafbecc65ccc177a5579bf56d5f4ed31"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"6472845219e11e4de094cac8c32a6a4d13e69cd4507780a7a37f5e411e1d895d","n":4096,"r":8,"p":1},"mac":"86379236d2fd6e9bb3f99f7eebaa3325b51e9fa5ec150ade7a461555c0a14ca3"},{"ciphertext":"0071c41d2956b12be5ebc08a9a5b3a9684b9e410fe2de91d614be977fb2a0bdb","cipherparams":{"iv":"1492dfb771030d3d9c9d996c193c03e5"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"f8145aa907a649866e0fbff86011244584ddc86559cf4901f8f69b670c234fd7","n":4096,"r":8,"p":1},"mac":"eacc58c1ad717ca375697c9fcc80f463a26600f5da1b21327715bf3efa047be5"}],[{"ciphertext":"68ffc1e2800a7288ba7baba0f0f8049daeed05379fabfdd3bc017fa85c49ab50","cipherparams":{"iv":"17f22d7b8aa1a8a2948fd3629f0b89ed"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"ff5e577ec8294320cfe59ef7b1b01ee44d4c9f19c8fbc31f333059c74eb8c6d2","n":4096,"r":8,"p":1},"mac":"de65d669be044df5e39e678b099424a8692a2da6f3746832862cf2e5d6ada612"},{"ciphertext":"fd4810ee850f0aa5f61a2eafbfc5ca36cfebb42df5c2465cc8ae5188029b188b","cipherparams":{"iv":"b00ead13b38e449c268d09fced80ce49"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"af5dbbfb7383045dc7f8a3bfc56cccfc22a5150a1f87e454d40893a4b6fea9a1","n":4096,"r":8,"p":1},"mac":"6234352852eb18246b94f28f3c3454103289ecf2faaa91115927c53729bb0805"},{"ciphertext":"03b758de6372aa6bedde513ccb282bf8af32bca227c258f3e0fc85ce454d72a4","cipherparams":{"iv":"5c20f3e96d0802eaf56670e57fbe3e98"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"b5ec4e40f5a09a59e90317ce45eb7bcd73a2a9afe70f6f2e32548fd38ed2da3b","n":4096,"r":8,"p":1},"mac":"99b7f59855f0aa04531cc4a24c7923f75ed8052084de9ec49a2794e3899c3274"}]]}', password: "password", address: "0x17226c9B4e130551c258Eb7B1Cdc927c13998cd6", diff --git a/ethers-ext/test/v6/keystore.spec.ts b/ethers-ext/test/v6/keystore.spec.ts index de1666427..738a98b31 100644 --- a/ethers-ext/test/v6/keystore.spec.ts +++ b/ethers-ext/test/v6/keystore.spec.ts @@ -24,7 +24,7 @@ describe("keystore v6", () => { ], }, { - // Klaytn V4 with multiple role-based keys. https://toolkit.klaytn.foundation/misc/generateKeystore + // Klaytn V4 with multiple role-based keys. https://toolkit.kaia.io/misc/generateKeystore json: '{"version":4,"id":"2d7ad5c1-880f-4920-9b8e-51f852c4802c","address":"0x17226c9b4e130551c258eb7b1cdc927c13998cd6","keyring":[[{"ciphertext":"eb9bd884ac3cc8bf92e6b0082e9d07198bfc4c1223ccc6e5edf7452ad612b2b5","cipherparams":{"iv":"47faf7b0991a051eef698c73fc246f78"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"ba0a3e8dc49a04f8e590f8df5a590bc6e134b031ce10f46d73d4c459aa4c08f8","n":4096,"r":8,"p":1},"mac":"4978d7325e1b9b3ec9fdfd1ec709a5a86fdfade0297ea9ddeeb8c3a7a62ae898"}],[{"ciphertext":"1a80c8666bea1a8dfa3082b001ff64c818fb14cf4e02017785e0edcc7a277af4","cipherparams":{"iv":"eafbecc65ccc177a5579bf56d5f4ed31"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"6472845219e11e4de094cac8c32a6a4d13e69cd4507780a7a37f5e411e1d895d","n":4096,"r":8,"p":1},"mac":"86379236d2fd6e9bb3f99f7eebaa3325b51e9fa5ec150ade7a461555c0a14ca3"},{"ciphertext":"0071c41d2956b12be5ebc08a9a5b3a9684b9e410fe2de91d614be977fb2a0bdb","cipherparams":{"iv":"1492dfb771030d3d9c9d996c193c03e5"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"f8145aa907a649866e0fbff86011244584ddc86559cf4901f8f69b670c234fd7","n":4096,"r":8,"p":1},"mac":"eacc58c1ad717ca375697c9fcc80f463a26600f5da1b21327715bf3efa047be5"}],[{"ciphertext":"68ffc1e2800a7288ba7baba0f0f8049daeed05379fabfdd3bc017fa85c49ab50","cipherparams":{"iv":"17f22d7b8aa1a8a2948fd3629f0b89ed"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"ff5e577ec8294320cfe59ef7b1b01ee44d4c9f19c8fbc31f333059c74eb8c6d2","n":4096,"r":8,"p":1},"mac":"de65d669be044df5e39e678b099424a8692a2da6f3746832862cf2e5d6ada612"},{"ciphertext":"fd4810ee850f0aa5f61a2eafbfc5ca36cfebb42df5c2465cc8ae5188029b188b","cipherparams":{"iv":"b00ead13b38e449c268d09fced80ce49"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"af5dbbfb7383045dc7f8a3bfc56cccfc22a5150a1f87e454d40893a4b6fea9a1","n":4096,"r":8,"p":1},"mac":"6234352852eb18246b94f28f3c3454103289ecf2faaa91115927c53729bb0805"},{"ciphertext":"03b758de6372aa6bedde513ccb282bf8af32bca227c258f3e0fc85ce454d72a4","cipherparams":{"iv":"5c20f3e96d0802eaf56670e57fbe3e98"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"b5ec4e40f5a09a59e90317ce45eb7bcd73a2a9afe70f6f2e32548fd38ed2da3b","n":4096,"r":8,"p":1},"mac":"99b7f59855f0aa04531cc4a24c7923f75ed8052084de9ec49a2794e3899c3274"}]]}', password: "password", address: "0x17226c9B4e130551c258Eb7B1Cdc927c13998cd6", diff --git a/js-ext-core/package.json b/js-ext-core/package.json index 8ce4adf55..e54b9e88a 100644 --- a/js-ext-core/package.json +++ b/js-ext-core/package.json @@ -1,6 +1,6 @@ { "name": "@kaiachain/js-ext-core", - "version": "1.0.1", + "version": "1.1.0", "license": "MIT", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/js-ext-core/src/accountkey/accountkey.ts b/js-ext-core/src/accountkey/accountkey.ts index 64256770a..1b0a5995d 100644 --- a/js-ext-core/src/accountkey/accountkey.ts +++ b/js-ext-core/src/accountkey/accountkey.ts @@ -5,7 +5,7 @@ import { AccountKeyType, HexStr, RLP } from "../util"; import { AccountKey } from "./factory"; -// https://docs.klaytn.foundation/content/klaytn/design/accounts#accountkeynil +// https://docs.kaia.io/learn/accounts/#accountkeynil- export class AccountKeyNil extends AccountKey { static type = AccountKeyType.Nil; static typeName = "AccountKeyNil"; @@ -25,7 +25,7 @@ export class AccountKeyNil extends AccountKey { } } -// https://docs.klaytn.foundation/content/klaytn/design/accounts#accountkeylegacy +// https://docs.kaia.io/learn/accounts/#accountkeylegacy- export class AccountKeyLegacy extends AccountKey { static type = AccountKeyType.Legacy; static typeName = "AccountKeyLegacy"; @@ -45,7 +45,7 @@ export class AccountKeyLegacy extends AccountKey { } } -// https://docs.klaytn.foundation/content/klaytn/design/accounts#accountkeypublic +// https://docs.kaia.io/learn/accounts/#accountkeypublic- export class AccountKeyPublic extends AccountKey { static type = AccountKeyType.Public; static typeName = "AccountKeyPublic"; @@ -72,7 +72,7 @@ export class AccountKeyPublic extends AccountKey { } } -// https://docs.klaytn.foundation/content/klaytn/design/accounts#accountkeyfail +// https://docs.kaia.io/learn/accounts/#accountkeyfail- export class AccountKeyFail extends AccountKey { static type = AccountKeyType.Fail; static typeName = "AccountKeyFail"; @@ -92,7 +92,7 @@ export class AccountKeyFail extends AccountKey { } } -// https://docs.klaytn.foundation/content/klaytn/design/accounts#accountkeyweightedmultisig +// https://docs.kaia.io/learn/accounts/#accountkeyweightedmultisig- export class AccountKeyWeightedMultiSig extends AccountKey { static type = AccountKeyType.WeightedMultiSig; static typeName = "AccountKeyWeightedMultiSig"; @@ -124,7 +124,7 @@ export class AccountKeyWeightedMultiSig extends AccountKey { } -// https://docs.klaytn.foundation/content/klaytn/design/accounts#accountkeyrolebased +// https://docs.kaia.io/learn/accounts/#accountkeyrolebased- export class AccountKeyRoleBased extends AccountKey { static type = AccountKeyType.RoleBased; static typeName = "AccountKeyRoleBased"; diff --git a/js-ext-core/src/accountkey/factory.ts b/js-ext-core/src/accountkey/factory.ts index 4b7d04f27..a63f88d40 100644 --- a/js-ext-core/src/accountkey/factory.ts +++ b/js-ext-core/src/accountkey/factory.ts @@ -3,8 +3,8 @@ import { hexValue } from "@ethersproject/bytes"; import { FieldSet, FieldSetFactory, Fields } from "../field"; import { AccountKeyType, HexStr, RLP, getTypePrefix, isKlaytnAccountKeyType } from "../util"; -// A typed AccountKey for Klatyn is a FieldSet. -// https://docs.klaytn.foundation/content/klaytn/design/accounts +// A typed AccountKey for Kaia is a FieldSet. +// https://docs.kaia.io/learn/accounts/ export abstract class AccountKey extends FieldSet { // RLP encoding for constructing AccountUpdate transactions. abstract toRLP(): string; diff --git a/js-ext-core/src/field/account.ts b/js-ext-core/src/field/account.ts index d49176949..ece9c4832 100644 --- a/js-ext-core/src/field/account.ts +++ b/js-ext-core/src/field/account.ts @@ -39,17 +39,17 @@ export const FieldTypeWeightedPublicKeys = new class implements FieldType { return [ HexStr.fromNumber(tuple[0]), getCompressedPublicKey(tuple[1]) - ]; + ] as WeightedPublicKey; } else if (_.has(tupleOrObject, "weight") && _.has(tupleOrObject, "key")) { const object = tupleOrObject; return [ HexStr.fromNumber(object.weight), getCompressedPublicKey(object.key) - ]; + ] as WeightedPublicKey; } else { throw new Error("Malformed WeightedPublicKeys"); } - }); + }) ; } emptyValue(): WeightedPublicKey[] { return []; } diff --git a/js-ext-core/src/tx/basic.ts b/js-ext-core/src/tx/basic.ts index 7762852de..eb2ea2745 100644 --- a/js-ext-core/src/tx/basic.ts +++ b/js-ext-core/src/tx/basic.ts @@ -12,7 +12,7 @@ import { TxType } from "../util"; import { KlaytnTx } from "./factory"; -// https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypevaluetransfer +// https://docs.kaia.io/learn/transactions/basic#txtypevaluetransfer- export class TxTypeValueTransfer extends KlaytnTx { static type = TxType.ValueTransfer; static typeName = "TxTypeValueTransfer"; @@ -48,7 +48,7 @@ export class TxTypeValueTransfer extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypevaluetransfermemo +// https://docs.kaia.io/learn/transactions/basic#txtypevaluetransfermemo- export class TxTypeValueTransferMemo extends KlaytnTx { static type = TxType.ValueTransferMemo; static typeName = "TxTypeValueTransferMemo"; @@ -85,7 +85,7 @@ export class TxTypeValueTransferMemo extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypesmartcontractdeploy +// https://docs.kaia.io/learn/transactions/basic#txtypesmartcontractdeploy- export class TxTypeSmartContractDeploy extends KlaytnTx { static type = TxType.SmartContractDeploy; static typeName = "TxTypeSmartContractDeploy"; @@ -124,7 +124,7 @@ export class TxTypeSmartContractDeploy extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypesmartcontractexecution +// https://docs.kaia.io/learn/transactions/basic#txtypesmartcontractexecution- export class TxTypeSmartContractExecution extends KlaytnTx { static type = TxType.SmartContractExecution; static typeName = "TxTypeSmartContractExecution"; @@ -161,7 +161,7 @@ export class TxTypeSmartContractExecution extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypeaccountupdate +// https://docs.kaia.io/learn/transactions/basic#txtypeaccountupdate- export class TxTypeAccountUpdate extends KlaytnTx { static type = TxType.AccountUpdate; static typeName = "TxTypeAccountUpdate"; @@ -196,7 +196,7 @@ export class TxTypeAccountUpdate extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypecancel +// https://docs.kaia.io/learn/transactions/basic#txtypecancel- export class TxTypeCancel extends KlaytnTx { static type = TxType.Cancel; static typeName = "TxTypeCancel"; diff --git a/js-ext-core/src/tx/feedelegated.ts b/js-ext-core/src/tx/feedelegated.ts index 49f3d1928..b1c9e0753 100644 --- a/js-ext-core/src/tx/feedelegated.ts +++ b/js-ext-core/src/tx/feedelegated.ts @@ -12,7 +12,7 @@ import { RLP, TxType } from "../util"; import { KlaytnTx } from "./factory"; -// https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedvaluetransfer +// https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedvaluetransfer- export class TxTypeFeeDelegatedValueTransfer extends KlaytnTx { static type = TxType.FeeDelegatedValueTransfer; static typeName = "TxTypeFeeDelegatedValueTransfer"; @@ -65,7 +65,7 @@ export class TxTypeFeeDelegatedValueTransfer extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedvaluetransfermemo +// https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedvaluetransfermemo- export class TxTypeFeeDelegatedValueTransferMemo extends KlaytnTx { static type = TxType.FeeDelegatedValueTransferMemo; static typeName = "TxTypeFeeDelegatedValueTransferMemo"; @@ -119,7 +119,7 @@ export class TxTypeFeeDelegatedValueTransferMemo extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedsmartcontractdeploy +// https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedsmartcontractdeploy- export class TxTypeFeeDelegatedSmartContractDeploy extends KlaytnTx { static type = TxType.FeeDelegatedSmartContractDeploy; static typeName = "TxTypeFeeDelegatedSmartContractDeploy"; @@ -176,7 +176,7 @@ export class TxTypeFeeDelegatedSmartContractDeploy extends KlaytnTx { } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedsmartcontractexecution +// https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedsmartcontractexecution- export class TxTypeFeeDelegatedSmartContractExecution extends KlaytnTx { static type = TxType.FeeDelegatedSmartContractExecution; static typeName = "TxTypeFeeDelegatedSmartContractExecution"; @@ -230,7 +230,7 @@ export class TxTypeFeeDelegatedSmartContractExecution extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedaccountupdate +// https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedaccountupdate- export class TxTypeFeeDelegatedAccountUpdate extends KlaytnTx { static type = TxType.FeeDelegatedAccountUpdate; static typeName = "TxTypeFeeDelegatedAccountUpdate"; @@ -282,7 +282,7 @@ export class TxTypeFeeDelegatedAccountUpdate extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedcancel +// https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedcancel- export class TxTypeFeeDelegatedCancel extends KlaytnTx { static type = TxType.FeeDelegatedCancel; static typeName = "TxTypeFeeDelegatedCancel"; diff --git a/js-ext-core/src/tx/partialfeedelegated.ts b/js-ext-core/src/tx/partialfeedelegated.ts index 679aae438..e138058f7 100644 --- a/js-ext-core/src/tx/partialfeedelegated.ts +++ b/js-ext-core/src/tx/partialfeedelegated.ts @@ -13,7 +13,7 @@ import { RLP, TxType } from "../util"; import { KlaytnTx } from "./factory"; -// https://docs.klaytn.foundation/content/klaytn/design/transactions/partial-fee-delegation#txtypefeedelegatedvaluetransferwithratio +// https://docs.kaia.io/learn/transactions/partial-fee-delegation#txtypefeedelegatedvaluetransferwithratio- export class TxTypeFeeDelegatedValueTransferWithRatio extends KlaytnTx { static type = TxType.FeeDelegatedValueTransferWithRatio; static typeName = "TxTypeFeeDelegatedValueTransferWithRatio"; @@ -67,7 +67,7 @@ export class TxTypeFeeDelegatedValueTransferWithRatio extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/partial-fee-delegation#txtypefeedelegatedvaluetransfermemowithratio +// https://docs.kaia.io/learn/transactions/partial-fee-delegation#txtypefeedelegatedvaluetransfermemowithratio- export class TxTypeFeeDelegatedValueTransferMemoWithRatio extends KlaytnTx { static type = TxType.FeeDelegatedValueTransferMemoWithRatio; static typeName = "TxTypeFeeDelegatedValueTransferMemoWithRatio"; @@ -122,7 +122,7 @@ export class TxTypeFeeDelegatedValueTransferMemoWithRatio extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/partial-fee-delegation#txtypefeedelegatedsmartcontractdeploywithratio +// https://docs.kaia.io/learn/transactions/partial-fee-delegation#txtypefeedelegatedsmartcontractdeploywithratio- export class TxTypeFeeDelegatedSmartContractDeployWithRatio extends KlaytnTx { static type = TxType.FeeDelegatedSmartContractDeployWithRatio; static typeName = "TxTypeFeeDelegatedSmartContractDeployWithRatio"; @@ -179,7 +179,7 @@ export class TxTypeFeeDelegatedSmartContractDeployWithRatio extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/partial-fee-delegation#txtypefeedelegatedsmartcontractexecutionwithratio +// https://docs.kaia.io/learn/transactions/partial-fee-delegation#txtypefeedelegatedsmartcontractexecutionwithratio- export class TxTypeFeeDelegatedSmartContractExecutionWithRatio extends KlaytnTx { static type = TxType.FeeDelegatedSmartContractExecutionWithRatio; static typeName = "TxTypeFeeDelegatedSmartContractExecutionWithRatio"; @@ -235,7 +235,7 @@ export class TxTypeFeeDelegatedSmartContractExecutionWithRatio extends KlaytnTx } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/partial-fee-delegation#txtypefeedelegatedaccountupdatewithratio +// https://docs.kaia.io/learn/transactions/partial-fee-delegation#txtypefeedelegatedaccountupdatewithratio- export class TxTypeFeeDelegatedAccountUpdateWithRatio extends KlaytnTx { static type = TxType.FeeDelegatedAccountUpdateWithRatio; static typeName = "TxTypeFeeDelegatedAccountUpdateWithRatio"; @@ -288,7 +288,7 @@ export class TxTypeFeeDelegatedAccountUpdateWithRatio extends KlaytnTx { } } -// https://docs.klaytn.foundation/content/klaytn/design/transactions/partial-fee-delegation#txtypefeedelegatedcancelwithratio +// https://docs.kaia.io/learn/transactions/partial-fee-delegation#txtypefeedelegatedcancelwithratio- export class TxTypeFeeDelegatedCancelWithRatio extends KlaytnTx { static type = TxType.FeeDelegatedCancelWithRatio; static typeName = "TxTypeFeeDelegatedCancelWithRatio"; diff --git a/js-ext-core/test/tx.spec.ts b/js-ext-core/test/tx.spec.ts index 34cb4312b..8112842e5 100644 --- a/js-ext-core/test/tx.spec.ts +++ b/js-ext-core/test/tx.spec.ts @@ -40,7 +40,7 @@ interface TestCase { txHashRLP: string, } -// Test cases from https://docs.klaytn.foundation/content/klaytn/design/transactions +// Test cases from https://docs.kaia.io/learn/transactions- const testcases: TestCase[] = [ { clazz: TxTypeValueTransfer, diff --git a/js-ext-core/test/util.spec.ts b/js-ext-core/test/util.spec.ts index 284be0371..b04a79bbe 100644 --- a/js-ext-core/test/util.spec.ts +++ b/js-ext-core/test/util.spec.ts @@ -404,7 +404,7 @@ describe("util", () => { assert.equal(v3.address, "ec5eaa07b4d3cbafe7bf437a1ea9a898209f617c"); // KIP-3 wallet with multiple keys. - // https://toolkit.klaytn.foundation/misc/generateKeystore + // https://toolkit.kaia.io/misc/generateKeystore json = '{"version":4,"id":"2d7ad5c1-880f-4920-9b8e-51f852c4802c","address":"0x17226c9b4e130551c258eb7b1cdc927c13998cd6","keyring":[[{"ciphertext":"eb9bd884ac3cc8bf92e6b0082e9d07198bfc4c1223ccc6e5edf7452ad612b2b5","cipherparams":{"iv":"47faf7b0991a051eef698c73fc246f78"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"ba0a3e8dc49a04f8e590f8df5a590bc6e134b031ce10f46d73d4c459aa4c08f8","n":4096,"r":8,"p":1},"mac":"4978d7325e1b9b3ec9fdfd1ec709a5a86fdfade0297ea9ddeeb8c3a7a62ae898"}],[{"ciphertext":"1a80c8666bea1a8dfa3082b001ff64c818fb14cf4e02017785e0edcc7a277af4","cipherparams":{"iv":"eafbecc65ccc177a5579bf56d5f4ed31"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"6472845219e11e4de094cac8c32a6a4d13e69cd4507780a7a37f5e411e1d895d","n":4096,"r":8,"p":1},"mac":"86379236d2fd6e9bb3f99f7eebaa3325b51e9fa5ec150ade7a461555c0a14ca3"},{"ciphertext":"0071c41d2956b12be5ebc08a9a5b3a9684b9e410fe2de91d614be977fb2a0bdb","cipherparams":{"iv":"1492dfb771030d3d9c9d996c193c03e5"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"f8145aa907a649866e0fbff86011244584ddc86559cf4901f8f69b670c234fd7","n":4096,"r":8,"p":1},"mac":"eacc58c1ad717ca375697c9fcc80f463a26600f5da1b21327715bf3efa047be5"}],[{"ciphertext":"68ffc1e2800a7288ba7baba0f0f8049daeed05379fabfdd3bc017fa85c49ab50","cipherparams":{"iv":"17f22d7b8aa1a8a2948fd3629f0b89ed"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"ff5e577ec8294320cfe59ef7b1b01ee44d4c9f19c8fbc31f333059c74eb8c6d2","n":4096,"r":8,"p":1},"mac":"de65d669be044df5e39e678b099424a8692a2da6f3746832862cf2e5d6ada612"},{"ciphertext":"fd4810ee850f0aa5f61a2eafbfc5ca36cfebb42df5c2465cc8ae5188029b188b","cipherparams":{"iv":"b00ead13b38e449c268d09fced80ce49"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"af5dbbfb7383045dc7f8a3bfc56cccfc22a5150a1f87e454d40893a4b6fea9a1","n":4096,"r":8,"p":1},"mac":"6234352852eb18246b94f28f3c3454103289ecf2faaa91115927c53729bb0805"},{"ciphertext":"03b758de6372aa6bedde513ccb282bf8af32bca227c258f3e0fc85ce454d72a4","cipherparams":{"iv":"5c20f3e96d0802eaf56670e57fbe3e98"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"b5ec4e40f5a09a59e90317ce45eb7bcd73a2a9afe70f6f2e32548fd38ed2da3b","n":4096,"r":8,"p":1},"mac":"99b7f59855f0aa04531cc4a24c7923f75ed8052084de9ec49a2794e3899c3274"}]]}'; jsons = splitKeystoreKIP3(json, false); assert.equal(jsons.length, 6); diff --git a/web3j-ext/web3j-ext/build.gradle b/web3j-ext/web3j-ext/build.gradle index febb8c765..f4f1abead 100644 --- a/web3j-ext/web3j-ext/build.gradle +++ b/web3j-ext/web3j-ext/build.gradle @@ -7,7 +7,7 @@ plugins { } group 'io.kaia' -version 'v1.0.1' +version 'v1.1.0' repositories { mavenCentral() diff --git a/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/PublicKeyUtilsExample.java b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/PublicKeyUtilsExample.java new file mode 100644 index 000000000..f93a63046 --- /dev/null +++ b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/PublicKeyUtilsExample.java @@ -0,0 +1,17 @@ +package org.web3j.example.utils; + +import org.web3j.crypto.transaction.account.AccountKeyPublic; +import org.web3j.utils.AccountKeyPublicUtils; + + +public class PublicKeyUtilsExample { + public static void main(String[] args) { + + System.out.println("From compressed public key to AccountKeyPublic"); + System.out.println(AccountKeyPublicUtils.decompressKey("03dc9dccbd788c00fa98f7f4082f2f714e799bc0c29d63f04d48b54fe6250453cd")); + + System.out.println("From x,y to compressed public key"); + AccountKeyPublic publicKey= AccountKeyPublic.create("0xdc9dccbd788c00fa98f7f4082f2f714e799bc0c29d63f04d48b54fe6250453cd","0xaf06ca34ae8714cf3dae06bacdb78c7c2d4054bd38961d40853cd5f15955da79"); + System.out.println(AccountKeyPublicUtils.toCompressedPublicKey(publicKey.getPublicKey())); + } +} diff --git a/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/SignatureUtilsExample.java b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/SignatureUtilsExample.java new file mode 100644 index 000000000..33845b32b --- /dev/null +++ b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/SignatureUtilsExample.java @@ -0,0 +1,37 @@ +package org.web3j.example.utils; + + +import org.web3j.crypto.KaiaSignatureData; +import org.web3j.crypto.Sign; +import org.web3j.utils.Numeric; + +public class SignatureUtilsExample { + public static void main(String[] args) { + // convert from {r, s, v} signature to string + byte[] r = Numeric.hexStringToByteArray("0xbaabb5a43a047e75e41a77b88fa7a5bf89e5227f1c8e40bfdfbcceb8164521ed"); + byte[] s = Numeric.hexStringToByteArray("0x678f3a7b600169b800828065cda112aa28291311a5dbb729480444a2b905f6e6"); + byte[] v = Numeric.hexStringToByteArray("0x0"); + Sign.SignatureData obj = new Sign.SignatureData(v, r, s); + String signature = KaiaSignatureData.getSignatureString(obj); + + System.out.println("From {r, s, v} to string " + signature); + + // convert from signature string to {r, s, v} + byte[] signatureBytes = Numeric.hexStringToByteArray("0xbaabb5a43a047e75e41a77b88fa7a5bf89e5227f1c8e40bfdfbcceb8164521ed678f3a7b600169b800828065cda112aa28291311a5dbb729480444a2b905f6e600"); + + byte[] convertedR = new byte[32]; + byte[] convertedS = new byte[32]; + byte[] convertedV= new byte[1]; + + // r is the first 32 bytes + System.arraycopy(signatureBytes, 0, convertedR, 0, 32); + // s is the next 32 bytes + System.arraycopy(signatureBytes, 32, convertedS, 0, 32); + // v is the last byte + convertedV[0] = signatureBytes[64]; + + System.out.println("Converted R " + Numeric.toHexString(convertedR)); + System.out.println("Converted S " + Numeric.toHexString(convertedS)); + System.out.println("Converted V " + Numeric.toHexString(convertedV)); + } +} diff --git a/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/UnitConvertExample.java b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/UnitConvertExample.java new file mode 100644 index 000000000..7ee17773f --- /dev/null +++ b/web3j-ext/web3j-ext/src/main/java/org/web3j/example/utils/UnitConvertExample.java @@ -0,0 +1,12 @@ +package org.web3j.example.utils; + +import org.web3j.utils.KaiaConvert; + +public class UnitConvertExample { + public static void main(String[] args) { + System.out.println("Convert from kei to kaia " + KaiaConvert.fromKei("1000000000000000000", KaiaConvert.Unit.KAIA)); + System.out.println("Convert from Gkei to kaia " + KaiaConvert.fromKei("1000000000", KaiaConvert.Unit.GKEI)); + + System.out.println("Convert from kaia to kei " + KaiaConvert.toKei("1", KaiaConvert.Unit.KAIA)); + } +} diff --git a/web3js-ext/README.md b/web3js-ext/README.md index 82cdc6b3e..f6757ec7a 100644 --- a/web3js-ext/README.md +++ b/web3js-ext/README.md @@ -58,7 +58,7 @@ See [DESIGN](./DESIGN.md) for source code organization. account.signTransaction(obj or rlp) account.signTransactionAsFeePayer(obj or rlp) ``` -- Following functions can handle the [KIP-3 Klaytn keystore format v4](https://kips.klaytn.foundation/KIPs/kip-3) +- Following functions can handle the [KIP-3 Klaytn keystore format v4](https://kips.kaia.io/KIPs/kip-3) ```js web3.eth.accounts.decrypt(keystore) web3.eth.accounts.decryptList(keystore) diff --git a/web3js-ext/example/accountKey/sign_msg_AccountKeyLegacy.js b/web3js-ext/example/accountKey/sign_msg_AccountKeyLegacy.js index 0b70d12ff..8057fb590 100644 --- a/web3js-ext/example/accountKey/sign_msg_AccountKeyLegacy.js +++ b/web3js-ext/example/accountKey/sign_msg_AccountKeyLegacy.js @@ -1,5 +1,5 @@ // AccountKeyLegacy -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3 } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/sign_msg_AccountKeyPublic.js b/web3js-ext/example/accountKey/sign_msg_AccountKeyPublic.js index 160140c18..cbc85cdea 100644 --- a/web3js-ext/example/accountKey/sign_msg_AccountKeyPublic.js +++ b/web3js-ext/example/accountKey/sign_msg_AccountKeyPublic.js @@ -1,5 +1,5 @@ // AccountKeyPublic -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3 } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/sign_msg_AccountKeyRoleBased.js b/web3js-ext/example/accountKey/sign_msg_AccountKeyRoleBased.js index ad433911f..33ae0d5c2 100644 --- a/web3js-ext/example/accountKey/sign_msg_AccountKeyRoleBased.js +++ b/web3js-ext/example/accountKey/sign_msg_AccountKeyRoleBased.js @@ -1,5 +1,5 @@ // AccountKeyRoleBased -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3 } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/sign_msg_AccountKeyWeightedMultiSig.js b/web3js-ext/example/accountKey/sign_msg_AccountKeyWeightedMultiSig.js index 77e06ba12..74a30ea61 100644 --- a/web3js-ext/example/accountKey/sign_msg_AccountKeyWeightedMultiSig.js +++ b/web3js-ext/example/accountKey/sign_msg_AccountKeyWeightedMultiSig.js @@ -1,5 +1,5 @@ // AccountKeyWeightedMultiSig -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3, TxType, AccountKeyType, toPeb, getPublicKeyFromPrivate } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/sign_tx_AccountKeyLegacy.js b/web3js-ext/example/accountKey/sign_tx_AccountKeyLegacy.js index 4bceeb3f2..19daa6a12 100644 --- a/web3js-ext/example/accountKey/sign_tx_AccountKeyLegacy.js +++ b/web3js-ext/example/accountKey/sign_tx_AccountKeyLegacy.js @@ -1,5 +1,5 @@ // AccountKeyLegacy -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/sign_tx_AccountKeyPublic.js b/web3js-ext/example/accountKey/sign_tx_AccountKeyPublic.js index dd672ddd2..7df638735 100644 --- a/web3js-ext/example/accountKey/sign_tx_AccountKeyPublic.js +++ b/web3js-ext/example/accountKey/sign_tx_AccountKeyPublic.js @@ -1,5 +1,5 @@ // AccountKeyPublic -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/sign_tx_AccountKeyRoleBased.js b/web3js-ext/example/accountKey/sign_tx_AccountKeyRoleBased.js index 8cfc7fe1a..fcaa3079a 100644 --- a/web3js-ext/example/accountKey/sign_tx_AccountKeyRoleBased.js +++ b/web3js-ext/example/accountKey/sign_tx_AccountKeyRoleBased.js @@ -1,5 +1,5 @@ // AccountKeyRoleBased -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/sign_tx_AccountKeyWeightedMultiSig.js b/web3js-ext/example/accountKey/sign_tx_AccountKeyWeightedMultiSig.js index 8fc3dd01e..dfd6aaee6 100644 --- a/web3js-ext/example/accountKey/sign_tx_AccountKeyWeightedMultiSig.js +++ b/web3js-ext/example/accountKey/sign_tx_AccountKeyWeightedMultiSig.js @@ -1,5 +1,5 @@ // AccountKeyWeightedMultiSig -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/update_AccountKeyLegacy.js b/web3js-ext/example/accountKey/update_AccountKeyLegacy.js index aea949d46..3f03a3d27 100644 --- a/web3js-ext/example/accountKey/update_AccountKeyLegacy.js +++ b/web3js-ext/example/accountKey/update_AccountKeyLegacy.js @@ -1,5 +1,5 @@ // AccountKeyLegacy -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3, TxType, AccountKeyType, getPublicKeyFromPrivate } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/update_AccountKeyPublic.js b/web3js-ext/example/accountKey/update_AccountKeyPublic.js index 10836375a..ad939810b 100644 --- a/web3js-ext/example/accountKey/update_AccountKeyPublic.js +++ b/web3js-ext/example/accountKey/update_AccountKeyPublic.js @@ -1,5 +1,5 @@ // AccountKeyPublic -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3, TxType, AccountKeyType, toPeb, getPublicKeyFromPrivate } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/update_AccountKeyRoleBased.js b/web3js-ext/example/accountKey/update_AccountKeyRoleBased.js index bf67a9f61..7aa4295fe 100644 --- a/web3js-ext/example/accountKey/update_AccountKeyRoleBased.js +++ b/web3js-ext/example/accountKey/update_AccountKeyRoleBased.js @@ -1,5 +1,5 @@ // AccountKeyRoleBased -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3, TxType, AccountKeyType, getPublicKeyFromPrivate } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/accountKey/update_AccountKeyWeightedMultiSig.js b/web3js-ext/example/accountKey/update_AccountKeyWeightedMultiSig.js index 1e85bc28e..29783b6ba 100644 --- a/web3js-ext/example/accountKey/update_AccountKeyWeightedMultiSig.js +++ b/web3js-ext/example/accountKey/update_AccountKeyWeightedMultiSig.js @@ -1,5 +1,5 @@ // AccountKeyWeightedMultiSig -// https://docs.klaytn.foundation/docs/learn/accounts/ +// https://docs.kaia.io/docs/learn/accounts/ const { Web3, TxType, AccountKeyType, getPublicKeyFromPrivate } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/rpc/rpc.js b/web3js-ext/example/rpc/rpc.js index fcdc78e8e..fdb44945a 100644 --- a/web3js-ext/example/rpc/rpc.js +++ b/web3js-ext/example/rpc/rpc.js @@ -5,7 +5,7 @@ const web3 = new Web3(provider); async function main() { // The full list of JSON-RPC is available at: - // https://docs.klaytn.foundation/content/dapp/json-rpc/api-references + // https://docs.kaia.io/references/json-rpc/references const num = await web3.klay.blockNumber(); console.log("klay.blockNumber", num); diff --git a/web3js-ext/example/transactions/Basic_08_TxTypeValueTransfer.js b/web3js-ext/example/transactions/Basic_08_TxTypeValueTransfer.js index 687961e3d..29312db84 100644 --- a/web3js-ext/example/transactions/Basic_08_TxTypeValueTransfer.js +++ b/web3js-ext/example/transactions/Basic_08_TxTypeValueTransfer.js @@ -1,5 +1,5 @@ // TxTypeValueTransfer -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/Basic_10_TxTypeValueTransferMemo.js b/web3js-ext/example/transactions/Basic_10_TxTypeValueTransferMemo.js index bc6022986..969a0f960 100644 --- a/web3js-ext/example/transactions/Basic_10_TxTypeValueTransferMemo.js +++ b/web3js-ext/example/transactions/Basic_10_TxTypeValueTransferMemo.js @@ -1,5 +1,5 @@ // TxTypeValueTransferMemo -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/Basic_20_TxTypeAccountUpdate.js b/web3js-ext/example/transactions/Basic_20_TxTypeAccountUpdate.js index ccf14ebab..1adb249f2 100644 --- a/web3js-ext/example/transactions/Basic_20_TxTypeAccountUpdate.js +++ b/web3js-ext/example/transactions/Basic_20_TxTypeAccountUpdate.js @@ -1,5 +1,5 @@ // TxTypeAccountUpdate -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, AccountKeyType, getPublicKeyFromPrivate } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/Basic_28_TxTypeSmartContractDeploy.js b/web3js-ext/example/transactions/Basic_28_TxTypeSmartContractDeploy.js index ef557474d..3d8b6d7b6 100644 --- a/web3js-ext/example/transactions/Basic_28_TxTypeSmartContractDeploy.js +++ b/web3js-ext/example/transactions/Basic_28_TxTypeSmartContractDeploy.js @@ -1,5 +1,5 @@ // TxTypeSmartContractDeploy -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/Basic_30_TxTypeSmartContractExecution.js b/web3js-ext/example/transactions/Basic_30_TxTypeSmartContractExecution.js index 54a4d66d8..cb379fe63 100644 --- a/web3js-ext/example/transactions/Basic_30_TxTypeSmartContractExecution.js +++ b/web3js-ext/example/transactions/Basic_30_TxTypeSmartContractExecution.js @@ -1,5 +1,5 @@ // TxTypeSmartContractExecution -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/Basic_38_TxTypeCancel.js b/web3js-ext/example/transactions/Basic_38_TxTypeCancel.js index 9f7a184d8..54e26d43c 100644 --- a/web3js-ext/example/transactions/Basic_38_TxTypeCancel.js +++ b/web3js-ext/example/transactions/Basic_38_TxTypeCancel.js @@ -1,5 +1,5 @@ // TxTypeCancel -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js b/web3js-ext/example/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js index e58c17d48..96614636d 100644 --- a/web3js-ext/example/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js +++ b/web3js-ext/example/transactions/FeeDel_09_TxTypeFeeDelegatedValueTransfer.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransfer -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js b/web3js-ext/example/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js index 42bdd6d62..62ab7ea52 100644 --- a/web3js-ext/example/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js +++ b/web3js-ext/example/transactions/FeeDel_11_TxTypeFeeDelegatedValueTransferMemo.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransferMemo -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); const senderAddr = "0xa2a8854b1802d8cd5de631e690817c253d6a9153"; diff --git a/web3js-ext/example/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js b/web3js-ext/example/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js index 11d2eab98..e40df0d54 100644 --- a/web3js-ext/example/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js +++ b/web3js-ext/example/transactions/FeeDel_21_TxTypeFeeDelegatedAccountUpdate.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedAccountUpdate -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, AccountKeyType, getPublicKeyFromPrivate } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js b/web3js-ext/example/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js index df6d0723a..1edb86b96 100644 --- a/web3js-ext/example/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js +++ b/web3js-ext/example/transactions/FeeDel_29_TxTypeFeeDelegatedSmartContractDeploy.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractDeploy -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js b/web3js-ext/example/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js index e74cf8eee..de04a7d6e 100644 --- a/web3js-ext/example/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js +++ b/web3js-ext/example/transactions/FeeDel_31_TxTypeFeeDelegatedSmartContractExecution.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractExecution -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js b/web3js-ext/example/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js index 81a3ac2f8..2f9a8e5e1 100644 --- a/web3js-ext/example/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js +++ b/web3js-ext/example/transactions/FeeDel_39_TxTypeFeeDelegatedCancel.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedCancel -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js b/web3js-ext/example/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js index 85bcec4c5..4316d5b0b 100644 --- a/web3js-ext/example/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js +++ b/web3js-ext/example/transactions/PartialFeeDel_0a_TxTypeFeeDelegatedValueTransferWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransferWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js b/web3js-ext/example/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js index 1601c8b53..6373039bb 100644 --- a/web3js-ext/example/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js +++ b/web3js-ext/example/transactions/PartialFeeDel_12_TxTypeFeeDelegatedValueTransferMemoWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedValueTransferMemoWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js b/web3js-ext/example/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js index b7c4916f0..614d5626c 100644 --- a/web3js-ext/example/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js +++ b/web3js-ext/example/transactions/PartialFeeDel_22_TxTypeFeeDelegatedAccountUpdateWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedAccountUpdateWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, AccountKeyType, getPublicKeyFromPrivate } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js b/web3js-ext/example/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js index 9db843e9f..bb8943a64 100644 --- a/web3js-ext/example/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js +++ b/web3js-ext/example/transactions/PartialFeeDel_2a_TxTypeFeeDelegatedSmartContractDeployWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractDeployWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js b/web3js-ext/example/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js index 26502a9ce..b15ec911f 100644 --- a/web3js-ext/example/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js +++ b/web3js-ext/example/transactions/PartialFeeDel_32_TxTypeFeeDelegatedSmartContractExecutionWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedSmartContractExecutionWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js b/web3js-ext/example/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js index 61ae41a2c..3f95d4f58 100644 --- a/web3js-ext/example/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js +++ b/web3js-ext/example/transactions/PartialFeeDel_3a_TxTypeFeeDelegatedCancelWithRatio.js @@ -1,5 +1,5 @@ // TxTypeFeeDelegatedCancelWithRatio -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/transactions/legacy.js b/web3js-ext/example/transactions/legacy.js index 13172daeb..66697d5af 100644 --- a/web3js-ext/example/transactions/legacy.js +++ b/web3js-ext/example/transactions/legacy.js @@ -1,5 +1,5 @@ // Legacy -// https://docs.klaytn.foundation/docs/learn/transactions/ +// https://docs.kaia.io/docs/learn/transactions/ const { Web3, TxType, toPeb } = require("@kaiachain/web3js-ext"); diff --git a/web3js-ext/example/utils/keystoreV4_multi.js b/web3js-ext/example/utils/keystoreV4_multi.js index f305ea2e5..7b0d19cb8 100644 --- a/web3js-ext/example/utils/keystoreV4_multi.js +++ b/web3js-ext/example/utils/keystoreV4_multi.js @@ -3,7 +3,7 @@ const { Web3 } = require("@kaiachain/web3js-ext"); const provider = new Web3.providers.HttpProvider("https://public-en-kairos.node.kaia.io"); const web3 = new Web3(provider); -// Klaytn V4 with multiple role-based keys. https://toolkit.klaytn.foundation/misc/generateKeystore +// Klaytn V4 with multiple role-based keys. https://toolkit.kaia.io/misc/generateKeystore const encryptedKey = `{ "version": 4, "id":"2d7ad5c1-880f-4920-9b8e-51f852c4802c", diff --git a/web3js-ext/example/utils/utils.js b/web3js-ext/example/utils/utils.js new file mode 100644 index 000000000..2aeb9ecd0 --- /dev/null +++ b/web3js-ext/example/utils/utils.js @@ -0,0 +1,61 @@ +const { + TxType, + AccountKeyType, + getCompressedPublicKey, + getSignatureTuple, + formatKlayUnits, + parseKlayUnits, + formatKlay, + parseKlay, +} = require("@kaiachain/web3js-ext"); + +async function main() { + // Transaction and AccountKey types + console.log("TxTypeValueTransfer =", TxType.ValueTransfer); + console.log("AccountKeyWeightedMultiSig =", AccountKeyType.WeightedMultiSig); + + // ECDSA public key + console.log( + "pubkey from { x, y } object =", + getCompressedPublicKey({ + x: "0xdc9dccbd788c00fa98f7f4082f2f714e799bc0c29d63f04d48b54fe6250453cd", + y: "0xaf06ca34ae8714cf3dae06bacdb78c7c2d4054bd38961d40853cd5f15955da79", + }) + ); + console.log( + "pubkey from uncompressed format =", + getCompressedPublicKey( + "0x04dc9dccbd788c00fa98f7f4082f2f714e799bc0c29d63f04d48b54fe6250453cdaf06ca34ae8714cf3dae06bacdb78c7c2d4054bd38961d40853cd5f15955da79" + ) + ); + + // ECDSA signature + console.log( + "signature from { v, r, s } object =", + getSignatureTuple({ + v: 27, + r: "0x66809fb130a6ea4ae4e823baa92573a5f1bfb4e88e64048aecfb18a2b4012b99", + s: "0x75c2c3e5f7b0a182c767137c488649cd5104a5e747371fd922d618e328e5c508", + }) + ); + console.log( + "signature from compact 65 bytes =", + getSignatureTuple( + "0x66809fb130a6ea4ae4e823baa92573a5f1bfb4e88e64048aecfb18a2b4012b9975c2c3e5f7b0a182c767137c488649cd5104a5e747371fd922d618e328e5c5081b" + ) + ); + + // Currency units + console.log( + "example basefee in ston =", + formatKlayUnits("0x5d21dba00", "ston") + ); + console.log("transfer amount in klay =", formatKlay("1230000000000000000")); + console.log( + "example gas price in peb =", + parseKlayUnits("50", "ston").toString() + ); + console.log("transfer amount in peb =", parseKlay("9.87").toString()); +} + +main(); diff --git a/web3js-ext/package.json b/web3js-ext/package.json index 92c4f7fdf..dfac88dd7 100644 --- a/web3js-ext/package.json +++ b/web3js-ext/package.json @@ -1,6 +1,6 @@ { "name": "@kaiachain/web3js-ext", - "version": "1.0.1", + "version": "1.1.0", "license": "MIT", "description": "web3.js extension for kaiachain blockchain", "keywords": [ diff --git a/web3js-ext/test/account.spec.ts b/web3js-ext/test/account.spec.ts index 5a11903c0..8c8f4a080 100644 --- a/web3js-ext/test/account.spec.ts +++ b/web3js-ext/test/account.spec.ts @@ -40,7 +40,7 @@ const keystores = [ address: "0xEc5eAa07b4d3CbAfe7bf437a1Ea9A898209F617c", keys: ["0x4062512193ef1dab8ccf3e3d7a4862e3c740bdf11d852954ed48bc73643e354f"], }, - { // Klaytn V4 with multiple role-based keys. https://toolkit.klaytn.foundation/misc/generateKeystore + { // Klaytn V4 with multiple role-based keys. https://toolkit.kaia.io/misc/generateKeystore json: '{"version":4,"id":"2d7ad5c1-880f-4920-9b8e-51f852c4802c","address":"0x17226c9b4e130551c258eb7b1cdc927c13998cd6","keyring":[[{"ciphertext":"eb9bd884ac3cc8bf92e6b0082e9d07198bfc4c1223ccc6e5edf7452ad612b2b5","cipherparams":{"iv":"47faf7b0991a051eef698c73fc246f78"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"ba0a3e8dc49a04f8e590f8df5a590bc6e134b031ce10f46d73d4c459aa4c08f8","n":4096,"r":8,"p":1},"mac":"4978d7325e1b9b3ec9fdfd1ec709a5a86fdfade0297ea9ddeeb8c3a7a62ae898"}],[{"ciphertext":"1a80c8666bea1a8dfa3082b001ff64c818fb14cf4e02017785e0edcc7a277af4","cipherparams":{"iv":"eafbecc65ccc177a5579bf56d5f4ed31"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"6472845219e11e4de094cac8c32a6a4d13e69cd4507780a7a37f5e411e1d895d","n":4096,"r":8,"p":1},"mac":"86379236d2fd6e9bb3f99f7eebaa3325b51e9fa5ec150ade7a461555c0a14ca3"},{"ciphertext":"0071c41d2956b12be5ebc08a9a5b3a9684b9e410fe2de91d614be977fb2a0bdb","cipherparams":{"iv":"1492dfb771030d3d9c9d996c193c03e5"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"f8145aa907a649866e0fbff86011244584ddc86559cf4901f8f69b670c234fd7","n":4096,"r":8,"p":1},"mac":"eacc58c1ad717ca375697c9fcc80f463a26600f5da1b21327715bf3efa047be5"}],[{"ciphertext":"68ffc1e2800a7288ba7baba0f0f8049daeed05379fabfdd3bc017fa85c49ab50","cipherparams":{"iv":"17f22d7b8aa1a8a2948fd3629f0b89ed"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"ff5e577ec8294320cfe59ef7b1b01ee44d4c9f19c8fbc31f333059c74eb8c6d2","n":4096,"r":8,"p":1},"mac":"de65d669be044df5e39e678b099424a8692a2da6f3746832862cf2e5d6ada612"},{"ciphertext":"fd4810ee850f0aa5f61a2eafbfc5ca36cfebb42df5c2465cc8ae5188029b188b","cipherparams":{"iv":"b00ead13b38e449c268d09fced80ce49"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"af5dbbfb7383045dc7f8a3bfc56cccfc22a5150a1f87e454d40893a4b6fea9a1","n":4096,"r":8,"p":1},"mac":"6234352852eb18246b94f28f3c3454103289ecf2faaa91115927c53729bb0805"},{"ciphertext":"03b758de6372aa6bedde513ccb282bf8af32bca227c258f3e0fc85ce454d72a4","cipherparams":{"iv":"5c20f3e96d0802eaf56670e57fbe3e98"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"b5ec4e40f5a09a59e90317ce45eb7bcd73a2a9afe70f6f2e32548fd38ed2da3b","n":4096,"r":8,"p":1},"mac":"99b7f59855f0aa04531cc4a24c7923f75ed8052084de9ec49a2794e3899c3274"}]]}', password: "password", address: "0x17226c9B4e130551c258Eb7B1Cdc927c13998cd6", diff --git a/web3py-ext/setup.py b/web3py-ext/setup.py index 00092560f..3ebf0c824 100644 --- a/web3py-ext/setup.py +++ b/web3py-ext/setup.py @@ -2,7 +2,7 @@ import pathlib NAME = "web3py_ext" -VERSION = "1.0.3" +VERSION = "1.1.0" with open("./README.md") as readme: long_description = readme.read() diff --git a/web3py-ext/web3py_ext/example/account/v3_keystore.py b/web3py-ext/web3py_ext/example/account/v3_keystore.py index eb0a23e58..690923dde 100644 --- a/web3py-ext/web3py_ext/example/account/v3_keystore.py +++ b/web3py-ext/web3py_ext/example/account/v3_keystore.py @@ -27,4 +27,12 @@ with open('keystore') as f: pk = Account.decrypt(f.read(), 'password') acc = Account.from_key(pk) + print(acc.address, acc.key.hex()) + + # create a new keystore with other password + new_keystore=Account.encrypt(acc.key.hex(),'password1') + + new_pk = Account.decrypt(new_keystore, 'password1') + acc = Account.from_key(pk) + print("New keystore") print(acc.address, acc.key.hex()) \ No newline at end of file diff --git a/web3py-ext/web3py_ext/example/account/v4_keystore.py b/web3py-ext/web3py_ext/example/account/v4_keystore.py index 5a5e11046..a01c8b80a 100644 --- a/web3py-ext/web3py_ext/example/account/v4_keystore.py +++ b/web3py-ext/web3py_ext/example/account/v4_keystore.py @@ -2,108 +2,74 @@ from eth_account import Account v4_keystore_str = '''{ - "version": 4, - "id": "c903083c-a42c-4774-8cea-f4c5a7962732", - "address": "0x17226c9b4e130551c258eb7b1cdc927c13998cd6", - "keyring": [ - [ - { - "ciphertext": "e341cf7fb7f19031374a61abb7f2d5d643ca6408bc1e8398de4ac9dd3e0697c1", - "cipherparams": { "iv": "fb46dcc6521dc880b54f78891b479dc3" }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "f48e0cd5625e55f62d831d12378fad49ff1a715d490e5996d4a5a275f6a277c2", - "n": 4096, - "r": 8, - "p": 1 - }, - "mac": "a03c2c7b6dff1ad793d2ede88a679d82c734e266fcd40bb875d765e50955edb1" - }, - { - "ciphertext": "668b1a501bbf756016647397078982e6a413a89ed45e8eefd85fb5de52ea5c10", - "cipherparams": { "iv": "ad52c6deefe8fd64ae41dd445c966e08" }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "31cd14d3d15f902989db0f0f9b839a420384252eb7daf7c93ebe1c19c11b0ff2", - "n": 4096, - "r": 8, - "p": 1 - }, - "mac": "36b47e3cc20656349ca2477b28ed04585eb5712691ea724437d77c7a876faacd" - } - ], - [ - { - "ciphertext": "6b0f9f13bb721aa97e7eda08cbaaeb873c0ec41f1707b5cd58b8f4932b252067", - "cipherparams": { "iv": "755c7b650ac384e45d1825f5e73a7bae" }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "b9e984fe8f8630638aefaf7ad4d112c47acb56ef2b36fb2aaaa29cf149ad32f1", - "n": 4096, - "r": 8, - "p": 1 - }, - "mac": "f1bec38f3c815f09d4a4244596b0514c0e24a837979f70773b313c3a873d7b9b" - } - ], - [ - { - "ciphertext": "4ca2438538f560570efe0a862d384d6822513d92fb00503b0cf5f20d5ed959af", - "cipherparams": { "iv": "6d578196eff13d42a71d61b54a7a56ac" }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "3a5521134feb81fdd47e91165fc391a2f52984a5fd65b15807843b9bbed3d6dc", - "n": 4096, - "r": 8, - "p": 1 - }, - "mac": "b7db297d0a8f7e2044ff7a88da3a27af4a4a3489a210b34911a5c87399075873" - }, - { - "ciphertext": "91a2d31625ec96fedf58f0ee48987cf39f6e517103b25d5d0afeac5674c62752", - "cipherparams": { "iv": "26821451fdaf5215c028eaea756c2797" }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "a958903f3d1e0065bab28a3c5fb14a2b78804869e1f82a93aabecdc4beded6fd", - "n": 4096, - "r": 8, - "p": 1 - }, - "mac": "e9e004e310fa6648b82839c8ace5e215866ef4ae6db9a4b9987678de5817d533" - }, - { - "ciphertext": "7ab47009dd5762dd10990f5182228a01cfaef00e8b581c51908de296bbb10cb2", - "cipherparams": { "iv": "65d76971b9fae3eca2ff18fca4b23097" }, - "cipher": "aes-128-ctr", - "kdf": "scrypt", - "kdfparams": { - "dklen": 32, - "salt": "288ea98e079125403157a9e9f0546cb1db234637e8d65550dfab607e2e65d065", - "n": 4096, - "r": 8, - "p": 1 - }, - "mac": "0a60b6b58b7f6bb50aed38b738deffbe7a9cee593829342ebbd57083a80ac508" - } - ] - ] - }''' + "version": 4, + "id": "15f20a72-3719-4f10-b63d-2dbd2658a3ca", + "address": "0x17226c9b4e130551c258eb7b1cdc927c13998cd6", + "keyring": [ + { + "ciphertext": "07162b797dcb32dd96686be249f9b3c357642bf5f5454d0fcbefedb265667f37", + "cipherparams": { + "iv": "8611384aaa8147ef54cbca175d2e818c" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "d7cb1f18d9fb7aa81042f61a61de9c456f829f2dc8b46cb6290d1bb9de89b791", + "n": 4096, + "r": 8, + "p": 1 + }, + "mac": "ed0a57bbb11d512f7e3c3025e6dc497c15a2fa3aad1fe558b4cad53f887e06d8" + }, + { + "ciphertext": "394200b0c8abae159e7f19c3eee55409ec789ac77a970e4c3f6bc1839a4afbfc", + "cipherparams": { + "iv": "3013456d71996e32e231923f289f5c78" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "fca63eb0670a9bffcc67cb77f43525a8c93d49e0b24acbf7d2a98bff8a5a5cf1", + "n": 4096, + "r": 8, + "p": 1 + }, + "mac": "880fa7e1240c1deb18898edea28a2baeb57a0c250971c5fea333033a92a958f7" + }, + { + "ciphertext": "e04e0c8c4eaf5a22a037c0771f41e5e3c6e09cf624832a340d1c962ac5aa03cb", + "cipherparams": { + "iv": "8777c8e5c244190b026c54b4a2474bf0" + }, + "cipher": "aes-128-ctr", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "salt": "e4b4d5b664f6722a5ad41a1b46249204326c952b3a4ac255ae4a0b5128e4803a", + "n": 4096, + "r": 8, + "p": 1 + }, + "mac": "c618020675a344b3e13dfe9c605115faf32dc80a7d24081b264ebf04fe5db1dd" + } + ] +}''' with open('keystore', 'w') as f: f.write(v4_keystore_str) with open('keystore') as f: - pk = Account.v4_decrypt(f.read(), "Klaytn") + pk = Account.v4_decrypt(f.read(), "Kaia") accs = list(map(lambda acc: Account.from_key_pair(acc['address'], acc['private_key']), pk)) + print("Original Keystores") for acc in accs: - print(acc.address, acc.key.hex()) \ No newline at end of file + print(acc.address, acc.key.hex()) + print("New Keystores") + # kaia-sdk only supports encrypting keystore v3 + for acc in accs: + new_keystore=Account.encrypt(acc.key.hex(),'password1') + new_pk = Account.decrypt(new_keystore, 'password1') + new_acc = Account.from_key(new_pk) + print(new_acc.address,new_acc.key.hex()) \ No newline at end of file diff --git a/web3py-ext/web3py_ext/example/utils/compress_key.py b/web3py-ext/web3py_ext/example/utils/compress_key.py new file mode 100644 index 000000000..78c8f2824 --- /dev/null +++ b/web3py-ext/web3py_ext/example/utils/compress_key.py @@ -0,0 +1,16 @@ +from eth_account import Account +from web3py_ext.klaytn_account.utils import compressed_key_from_xy, address_from_private_key, compressed_key, \ + compressed_key_and_address_from_xy + + +def main(): + private_key=Account.from_key("0x0e4ca6d38096ad99324de0dde108587e5d7c600165ae4cd6c2462c597458c2b8") + print("Public key from private key",address_from_private_key(private_key)) + print("Compress key from private key",compressed_key(private_key)) + + x = "0xdc9dccbd788c00fa98f7f4082f2f714e799bc0c29d63f04d48b54fe6250453cd" + y = "0xaf06ca34ae8714cf3dae06bacdb78c7c2d4054bd38961d40853cd5f15955da79" + print("Compress public key from x,y", compressed_key_from_xy(x, y)) + print("Compress public key and address from x,y", compressed_key_and_address_from_xy(x, y)) + +main() diff --git a/web3py-ext/web3py_ext/example/utils/signature_convert.py b/web3py-ext/web3py_ext/example/utils/signature_convert.py new file mode 100644 index 000000000..4572661c4 --- /dev/null +++ b/web3py-ext/web3py_ext/example/utils/signature_convert.py @@ -0,0 +1,26 @@ +from web3py_ext.utils.klaytn_utils import bytes_to_hex_str, hex_str_to_bytes + +def rsv_to_signature_string(r, s, v): + # Concatenate r, s, and v to form a 65-byte signature + signature = r + s + v + return bytes_to_hex_str(signature) +def signature_string_to_rsv(signature_str): + # Convert the signature string to bytes (remove '0x' if present) + signature = hex_str_to_bytes(signature_str) + # Extract r (first 32 bytes), s (next 32 bytes), and v (last byte) + r = signature[:32] + s = signature[32:64] + v = signature[64] + return bytes_to_hex_str(r), bytes_to_hex_str(s), hex(v) + +def main(): + # convert {r,s,v} signature to string + r = hex_str_to_bytes('0x678f3a7b600169b800828065cda112aa28291311a5dbb729480444a2b905f6e6') + s = hex_str_to_bytes('0xbaabb5a43a047e75e41a77b88fa7a5bf89e5227f1c8e40bfdfbcceb8164521ed') + v = hex_str_to_bytes("0x1b") + print("From r,s,v to string",rsv_to_signature_string(r,s,v)) + + # convert string signature to rsv + signature_str="0x66809fb130a6ea4ae4e823baa92573a5f1bfb4e88e64048aecfb18a2b4012b9975c2c3e5f7b0a182c767137c488649cd5104a5e747371fd922d618e328e5c5081b" + print("From string to r,s,v",signature_string_to_rsv(signature_str)) +main() diff --git a/web3py-ext/web3py_ext/example/utils/unit_convert.py b/web3py-ext/web3py_ext/example/utils/unit_convert.py new file mode 100644 index 000000000..c0e95e9bf --- /dev/null +++ b/web3py-ext/web3py_ext/example/utils/unit_convert.py @@ -0,0 +1,11 @@ +from web3py_ext import extend +from web3 import Web3 + +def main(): + # convert from (kei/Gkei/kaia/KAIA) to kei + print("From Kaia to Kei", Web3.to_kei(1, 'kei')) + + # convert from kei to (kei/Gkei/kaia/KAIA) + print('From Kei to Kaia',Web3.from_kei(1000000000000000000,'kaia')) + +main() diff --git a/web3py-ext/web3py_ext/transaction/basic/account_update_transaction.py b/web3py-ext/web3py_ext/transaction/basic/account_update_transaction.py index ffb31fd91..4a4504447 100644 --- a/web3py-ext/web3py_ext/transaction/basic/account_update_transaction.py +++ b/web3py-ext/web3py_ext/transaction/basic/account_update_transaction.py @@ -96,7 +96,7 @@ class AccountUpdateTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypeaccountupdate + https://docs.kaia.io/learn/transactions/basic#txtypeaccountupdate- """ transaction_type = 32 # '0x08' @@ -251,7 +251,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#rlp-encoding-for-sendertxhash-5 + https://docs.kaia.io/learn/transactions/basic#rlp-encoding-for-sendertxhash-5- """ if "key" not in self.dictionary: raise KeyError("not found key field in AccountUpdateTransaction") diff --git a/web3py-ext/web3py_ext/transaction/basic/cancel_transaction.py b/web3py-ext/web3py_ext/transaction/basic/cancel_transaction.py index d9ec270b1..1a3748eee 100644 --- a/web3py-ext/web3py_ext/transaction/basic/cancel_transaction.py +++ b/web3py-ext/web3py_ext/transaction/basic/cancel_transaction.py @@ -96,7 +96,7 @@ class CancelTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypecancel + https://docs.kaia.io/learn/transactions/basic#txtypecancel- """ transaction_type = 56 # '0x38' @@ -240,7 +240,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#rlp-encoding-for-signature-1 + https://docs.kaia.io/learn/transactions/basic#rlp-encoding-for-signature-1- """ # Remove signature and chainId fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "chainId") diff --git a/web3py-ext/web3py_ext/transaction/basic/chaindata_anchoring_transaction.py b/web3py-ext/web3py_ext/transaction/basic/chaindata_anchoring_transaction.py index 202222b6a..8b7d48053 100644 --- a/web3py-ext/web3py_ext/transaction/basic/chaindata_anchoring_transaction.py +++ b/web3py-ext/web3py_ext/transaction/basic/chaindata_anchoring_transaction.py @@ -97,7 +97,7 @@ class ChaindataAnchoringTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypechaindataanchoring + https://docs.kaia.io/learn/transactions/basic#txtypechaindataanchoring- """ transaction_type = 72 # '0x48' @@ -246,7 +246,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#rlp-encoding-for-signature-1 + https://docs.kaia.io/learn/transactions/basic#rlp-encoding-for-signature-1- """ # Remove signature and chainId fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "chainId") diff --git a/web3py-ext/web3py_ext/transaction/basic/smart_contract_deploy_transaction.py b/web3py-ext/web3py_ext/transaction/basic/smart_contract_deploy_transaction.py index 4be488a73..ccc08ff59 100644 --- a/web3py-ext/web3py_ext/transaction/basic/smart_contract_deploy_transaction.py +++ b/web3py-ext/web3py_ext/transaction/basic/smart_contract_deploy_transaction.py @@ -108,7 +108,7 @@ class SmartContractDeployTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypevaluetransfer + https://docs.kaia.io/learn/transactions/basic#txtypevaluetransfer- """ transaction_type = 40 # '0x28' @@ -266,7 +266,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#rlp-encoding-for-sendertxhash-3 + https://docs.kaia.io/learn/transactions/basic#rlp-encoding-for-sendertxhash-3- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "chainId") diff --git a/web3py-ext/web3py_ext/transaction/basic/smart_contract_execution_transaction.py b/web3py-ext/web3py_ext/transaction/basic/smart_contract_execution_transaction.py index 2879072dd..2f5a9bcae 100644 --- a/web3py-ext/web3py_ext/transaction/basic/smart_contract_execution_transaction.py +++ b/web3py-ext/web3py_ext/transaction/basic/smart_contract_execution_transaction.py @@ -101,7 +101,7 @@ class SmartContractExecutionTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypevaluetransfermemo + https://docs.kaia.io/learn/transactions/basic#txtypevaluetransfermemo- """ transaction_type = 48 # '0x30' @@ -259,7 +259,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#rlp-encoding-for-sendertxhash-4 + https://docs.kaia.io/learn/transactions/basic#rlp-encoding-for-sendertxhash-4- """ # Remove signature and chainId fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "chainId") diff --git a/web3py-ext/web3py_ext/transaction/basic/value_transfer_transaction.py b/web3py-ext/web3py_ext/transaction/basic/value_transfer_transaction.py index c832bde99..fd0d22fc1 100644 --- a/web3py-ext/web3py_ext/transaction/basic/value_transfer_transaction.py +++ b/web3py-ext/web3py_ext/transaction/basic/value_transfer_transaction.py @@ -95,7 +95,7 @@ class ValueTransferTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypevaluetransfer + https://docs.kaia.io/learn/transactions/basic#txtypevaluetransfer- """ transaction_type = 8 # '0x08' @@ -243,7 +243,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#rlp-encoding-for-signature-1 + https://docs.kaia.io/learn/transactions/basic#rlp-encoding-for-signature-1- """ # Remove signature and chainId fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "chainId") diff --git a/web3py-ext/web3py_ext/transaction/basic/value_transfer_with_memo_transaction.py b/web3py-ext/web3py_ext/transaction/basic/value_transfer_with_memo_transaction.py index ce50522c6..7f925e4af 100644 --- a/web3py-ext/web3py_ext/transaction/basic/value_transfer_with_memo_transaction.py +++ b/web3py-ext/web3py_ext/transaction/basic/value_transfer_with_memo_transaction.py @@ -98,7 +98,7 @@ class ValueTransferWithMemoTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypevaluetransfermemo + https://docs.kaia.io/learn/transactions/basic#txtypevaluetransfermemo- """ transaction_type = 16 # '0x10' @@ -251,7 +251,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#rlp-encoding-for-sendertxhash-2 + https://docs.kaia.io/learn/transactions/basic#rlp-encoding-for-sendertxhash-2- """ # Remove signature and chainId fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "chainId") diff --git a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_account_update_transaction.py b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_account_update_transaction.py index d1b653d33..b4bfa94cb 100644 --- a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_account_update_transaction.py +++ b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_account_update_transaction.py @@ -111,7 +111,7 @@ class FeeDelegatedAccountUpdateTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedvaluetransfermemo + https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedvaluetransfermemo- """ transaction_type = 33 # '0x21' @@ -283,7 +283,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender- """ # encode account key in forms of rlp key = self.dictionary["key"] @@ -305,7 +305,7 @@ def hash(self) -> bytes: def feepayer_hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer- """ # encode account key in forms of rlp key = self.dictionary["key"] diff --git a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_cancel_transaction.py b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_cancel_transaction.py index 246cb0754..445154eb4 100644 --- a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_cancel_transaction.py +++ b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_cancel_transaction.py @@ -109,7 +109,7 @@ class FeeDelegatedCancelTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedvaluetransfer + https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedvaluetransfer- """ transaction_type = 57 # '0x39' @@ -270,7 +270,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") @@ -286,7 +286,7 @@ def hash(self) -> bytes: def feepayer_hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") diff --git a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_chaindata_anchoring_transaction.py b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_chaindata_anchoring_transaction.py index e52cc66f2..66d16435e 100644 --- a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_chaindata_anchoring_transaction.py +++ b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_chaindata_anchoring_transaction.py @@ -111,7 +111,7 @@ class FeeDelegatedChaindataAnchoringTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedvaluetransfermemo + https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedvaluetransfermemo- """ transaction_type = 73 # '0x49' @@ -276,7 +276,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") @@ -292,7 +292,7 @@ def hash(self) -> bytes: def feepayer_hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") diff --git a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_smart_contract_deploy_transaction.py b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_smart_contract_deploy_transaction.py index 3e6e0ab8c..aa0a74ca9 100644 --- a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_smart_contract_deploy_transaction.py +++ b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_smart_contract_deploy_transaction.py @@ -117,7 +117,7 @@ class FeeDelegatedSmartContractDeployTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypevaluetransfer + https://docs.kaia.io/learn/transactions/basic#txtypevaluetransfer- """ transaction_type = 41 # '0x29' @@ -310,7 +310,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#rlp-encoding-for-sendertxhash-3 + https://docs.kaia.io/learn/transactions/basic#rlp-encoding-for-sendertxhash-3- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") @@ -326,7 +326,7 @@ def hash(self) -> bytes: def feepayer_hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedsmartcontractdeploy + https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedsmartcontractdeploy- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") diff --git a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_smart_contract_execution_transaction.py b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_smart_contract_execution_transaction.py index 868a0b6a5..73e391840 100644 --- a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_smart_contract_execution_transaction.py +++ b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_smart_contract_execution_transaction.py @@ -109,7 +109,7 @@ class FeeDelegatedSmartContractExecutionTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#txtypevaluetransfermemo + https://docs.kaia.io/learn/transactions/basic#txtypevaluetransfermemo- """ transaction_type = 49 # '0x31' @@ -293,7 +293,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/basic#rlp-encoding-for-sendertxhash-4 + https://docs.kaia.io/learn/transactions/basic#rlp-encoding-for-sendertxhash-4- """ # Remove signature and chainId fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") @@ -309,7 +309,7 @@ def hash(self) -> bytes: def feepayer_hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedsmartcontractexecution + https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedsmartcontractexecution- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") diff --git a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_value_transfer_transaction.py b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_value_transfer_transaction.py index 72efee9d7..cc0cd7f33 100644 --- a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_value_transfer_transaction.py +++ b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_value_transfer_transaction.py @@ -109,7 +109,7 @@ class FeeDelegatedValueTransferTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedvaluetransfer + https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedvaluetransfer- """ transaction_type = 9 # '0x09' @@ -278,7 +278,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") @@ -294,7 +294,7 @@ def hash(self) -> bytes: def feepayer_hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") diff --git a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_value_transfer_with_memo_transaction.py b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_value_transfer_with_memo_transaction.py index c4ff5168e..5e8483704 100644 --- a/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_value_transfer_with_memo_transaction.py +++ b/web3py-ext/web3py_ext/transaction/fee_delegation/fee_delegated_value_transfer_with_memo_transaction.py @@ -113,7 +113,7 @@ class FeeDelegatedValueTransferWithMemoTransaction(_TypedTransactionImplementation): """ Represents a klaytn value transafer transaction type. - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#txtypefeedelegatedvaluetransfermemo + https://docs.kaia.io/learn/transactions/fee-delegation#txtypefeedelegatedvaluetransfermemo- """ transaction_type = 17 # '0x11' @@ -283,7 +283,7 @@ def as_dict(self) -> Dict[str, Any]: def hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-sender- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") @@ -299,7 +299,7 @@ def hash(self) -> bytes: def feepayer_hash(self) -> bytes: """ - https://docs.klaytn.foundation/content/klaytn/design/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer + https://docs.kaia.io/learn/transactions/fee-delegation#rlp-encoding-for-signature-of-the-fee-payer- """ # Remove signature fields. transaction_without_signature_fields = dissoc(self.dictionary, "signatures", "feePayerSignatures", "chainId", "feePayer") diff --git a/web3rpc/rpc-specs/code-samples/curl/debug/vMTracing/traceBlockFromFile.sh b/web3rpc/rpc-specs/code-samples/curl/debug/vMTracing/traceBlockFromFile.sh index 8923f946c..09cf93121 100644 --- a/web3rpc/rpc-specs/code-samples/curl/debug/vMTracing/traceBlockFromFile.sh +++ b/web3rpc/rpc-specs/code-samples/curl/debug/vMTracing/traceBlockFromFile.sh @@ -6,5 +6,5 @@ curl -X 'POST' \ "method": "debug_traceBlockFromFile", "id": 1, "jsonrpc": "2.0", - "params": ["/home/sotatek/block.rlp"] + "params": ["/home/kaia/block.rlp"] }' diff --git a/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/constant/UrlConstants.java b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/constant/UrlConstants.java index 69842bece..fb8ff9346 100644 --- a/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/constant/UrlConstants.java +++ b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/constant/UrlConstants.java @@ -10,7 +10,7 @@ private UrlConstants() {} public static final String LOCAL_URL = "http://localhost:8551"; - public static final String SERVER_URL = "https://dev.api.klaytn.sotatek.works"; + public static final String SERVER_URL = "https://public-en-kairos.node.kaia.io"; public static final String TEST_URL = "https://public-en-kairos.node.kaia.io"; } diff --git a/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceBlockFromFileExample.java b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceBlockFromFileExample.java index d052d5c07..9c324b04c 100644 --- a/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceBlockFromFileExample.java +++ b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceBlockFromFileExample.java @@ -7,7 +7,7 @@ public class DebugTraceBlockFromFileExample { private Web3j w3 = Web3j.build(new HttpService("https://public-en-kairos.node.kaia.io")); void whenRequestValid_ThenCall200ResponseReturns() throws IOException { - String fileName = "/home/sotatek/block.rlp"; + String fileName = "/home/kaia/block.rlp"; DebugTraceBlockFromFileResponse response = w3.debugTraceBlockFromFile(fileName, null).send(); response.getResult(); diff --git a/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceCallExample.java b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceCallExample.java index aba6ece54..8e1d5559b 100644 --- a/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceCallExample.java +++ b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceCallExample.java @@ -4,7 +4,7 @@ import java.io.IOException; -public class DebugTraceBadBlockExample { +public class DebugTraceCallExample { private Web3j w3 = Web3j.build(new HttpService("https://public-en-kairos.node.kaia.io")); void debugTraceCallExample() throws IOException { diff --git a/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceChainExample.java b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceChainExample.java new file mode 100644 index 000000000..678ae1d86 --- /dev/null +++ b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceChainExample.java @@ -0,0 +1,18 @@ +import org.web3j.protocol.kaia.core.method.response.DebugTraceBadBlockResponse; +import org.web3j.protocol.http.HttpService; +import org.web3j.protocol.kaia.Web3j; + +import java.io.IOException; + +public class DebugTraceChainExample { + private Web3j w3 = Web3j.build(new HttpService("https://public-en-kairos.node.kaia.io")); + + void debugTraceChainExample() throws IOException { + String startBlockNumber = "1000"; + String endBlockNumber = "1001"; + Object traceObject = {"tracer":"revertTracer"} + DebugTraceCallResponse response = w3.debugTraceChain(startBlockNumber, endBlockNumber,traceObject , null).send(); + + response.getResult(); + } +} diff --git a/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/personal/PersonalOpenWalletExample.java b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/personal/PersonalOpenWalletExample.java index cb5ed0562..85f06139d 100644 --- a/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/personal/PersonalOpenWalletExample.java +++ b/web3rpc/rpc-specs/code-samples/java/src/main/java/opensdk/sdk/apis/personal/PersonalOpenWalletExample.java @@ -8,7 +8,7 @@ public class PersonalOpenWalletExample { private Web3j w3 = Web3j.build(new HttpService("https://public-en-kairos.node.kaia.io")); void personalOpenWalletExample() throws IOException { - String url = "keystore:///home/sotatek/klay-node/kcn-v1.10.2-0-linux-amd64/kcn-linux-amd64/data/keystore/UTC--2" + + String url = "keystore:///home/kaia/klay-node/kcn-v1.10.2-0-linux-amd64/kcn-linux-amd64/data/keystore/UTC--2" + "023-04-13T03-23-36.992476555Z--8cd4b6b24f2cd0b83d49876f932254823e875547"; String passphrase = "passphrase"; PersonalOpenWalletResponse response = w3.personalOpenWallet(url, passphrase).send(); diff --git a/web3rpc/rpc-specs/code-samples/javascript/admin/nodeConfig.js b/web3rpc/rpc-specs/code-samples/javascript/admin/nodeConfig.js index 921a2b2c5..261bd6ac5 100644 --- a/web3rpc/rpc-specs/code-samples/javascript/admin/nodeConfig.js +++ b/web3rpc/rpc-specs/code-samples/javascript/admin/nodeConfig.js @@ -4,7 +4,7 @@ const { JsonRpcProvider } = require("@kaiachain/ethers-ext"); const provider = new JsonRpcProvider("https://public-en-kairos.node.kaia.io"); // The full list of JSON-RPC is available at: - // https://docs.klaytn.foundation/content/dapp/json-rpc/api-references + // https://docs.kaia.io/references/json-rpc/references const data = await provider.admin.nodeConfig(); console.log("Node config", data); })(); diff --git a/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceBlockFromFile.js b/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceBlockFromFile.js index edc044fcd..26f0a7586 100644 --- a/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceBlockFromFile.js +++ b/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceBlockFromFile.js @@ -1,7 +1,7 @@ const { JsonRpcProvider } = require("@kaiachain/ethers-ext"); (() => { const provider = new JsonRpcProvider("https://public-en-kairos.node.kaia.io"); - const fileName = "/home/sotatek/block.rlp"; + const fileName = "/home/kaia/block.rlp"; provider.debug .traceBlockFromFile(fileName, {}, (err, data, response) => {}) diff --git a/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceCall.js b/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceCall.js index be665534d..a574fe648 100644 --- a/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceCall.js +++ b/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceCall.js @@ -10,7 +10,7 @@ const { JsonRpcProvider } = require("@kaiachain/ethers-ext"); const options = { tracer: "revertTracer" }; // The full list of JSON-RPC is available at: - // https://docs.klaytn.foundation/content/dapp/json-rpc/api-references + // https://docs.kaia.io/references/json-rpc/references const data = await provider.debug.traceCall( tracerCallObject, blockNumber, diff --git a/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceChain.js b/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceChain.js new file mode 100644 index 000000000..2a9a82cee --- /dev/null +++ b/web3rpc/rpc-specs/code-samples/javascript/debug/vMTracing/traceChain.js @@ -0,0 +1,21 @@ +const { JsonRpcProvider } = require("@kaiachain/ethers-ext"); + +(async () => { + const provider = new JsonRpcProvider("https://public-en-kairos.node.kaia.io"); + + const startBlock = "1000"; + const endBlock = "1001"; + const options = { tracer: "revertTracer" }; + // The full list of JSON-RPC is available at: + // https://docs.kaia.io/references/json-rpc/references + provider.debug.traceChain( + startBlock, + endBlock, + options, + null, + (err, data, response) => { + + console.log("Trace chain", data); + } + ); +})(); diff --git a/web3rpc/rpc-specs/code-samples/javascript/eth/block/getBlockReceipts.js b/web3rpc/rpc-specs/code-samples/javascript/eth/block/getBlockReceipts.js index f6bf1b439..97f31b441 100644 --- a/web3rpc/rpc-specs/code-samples/javascript/eth/block/getBlockReceipts.js +++ b/web3rpc/rpc-specs/code-samples/javascript/eth/block/getBlockReceipts.js @@ -6,7 +6,7 @@ const { JsonRpcProvider } = require("@kaiachain/ethers-ext"); "0xba647d41423faeebe8a7c64737d284fc2eba6f0388a3e1ebf6243db509ec1577"; // The full list of JSON-RPC is available at: - // https://docs.klaytn.foundation/content/dapp/json-rpc/api-references + // https://docs.kaia.io/references/json-rpc/references const data = await provider.eth.getBlockReceipts(blockHash); console.log("Block receipts", data); })(); diff --git a/web3rpc/rpc-specs/code-samples/python/debug/others/getModifiedStorageNodesByNumber.py b/web3rpc/rpc-specs/code-samples/python/debug/others/getModifiedStorageNodesByNumber.py index 7f8f16bf2..77548bf58 100644 --- a/web3rpc/rpc-specs/code-samples/python/debug/others/getModifiedStorageNodesByNumber.py +++ b/web3rpc/rpc-specs/code-samples/python/debug/others/getModifiedStorageNodesByNumber.py @@ -1,7 +1,7 @@ from web3 import Web3 from web3py_ext import extend -host = "https://dev.api.klaytn.sotatek.works" +host = "https://public-en-kairos.node.kaia.io" address = "0x73a7d19d14f7dfac5b799e405e22133b2adc57a6" startBlockNum = 100 diff --git a/web3rpc/rpc-specs/code-samples/python/debug/vMTracing/traceBlockFromFile.py b/web3rpc/rpc-specs/code-samples/python/debug/vMTracing/traceBlockFromFile.py index cf6c15a80..97558e079 100644 --- a/web3rpc/rpc-specs/code-samples/python/debug/vMTracing/traceBlockFromFile.py +++ b/web3rpc/rpc-specs/code-samples/python/debug/vMTracing/traceBlockFromFile.py @@ -3,7 +3,7 @@ host = "https://public-en-kairos.node.kaia.io" -fileName = "/home/sotatek/block.rlp"; +fileName = "/home/kaia/block.rlp"; w3 = Web3(Web3.HTTPProvider(host)) debug_response = w3.debug.trace_block_from_file(fileName) diff --git a/web3rpc/rpc-specs/code-samples/python/debug/vMTracing/traceChain.py b/web3rpc/rpc-specs/code-samples/python/debug/vMTracing/traceChain.py new file mode 100644 index 000000000..8889afff2 --- /dev/null +++ b/web3rpc/rpc-specs/code-samples/python/debug/vMTracing/traceChain.py @@ -0,0 +1,12 @@ +from web3 import Web3 +from web3py_ext import extend + +host = "https://public-en-kairos.node.kaia.io" + +startBlock = "10000" +endBlock = "10001" +options = {"tracer":"revertTracer"} +w3 = Web3(Web3.HTTPProvider(host)) +debug_response = w3.debug.trace_call(startBlock, endBlock,options) + +print(debug_response) diff --git a/web3rpc/rpc-specs/components/schemas/common/Common.yaml b/web3rpc/rpc-specs/components/schemas/common/Common.yaml index 17ea682ed..dbe1e962d 100644 --- a/web3rpc/rpc-specs/components/schemas/common/Common.yaml +++ b/web3rpc/rpc-specs/components/schemas/common/Common.yaml @@ -2041,3 +2041,25 @@ components: "transactionsRoot": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "voteData": "0x" } + StateOverrideSet: + type: object + description: The state override set is an optional address-to-state mapping, where each entry specifies some state to be ephemerally overridden prior to executing the call. + properties: + balance: + type: integer + format: int64 + description: (optional) Fake balance to set for the account before executing the call. + nonce: + type: integer + format: int64 + description: (optional) Fake nonce to set for the account before executing the call. + code: + type: string + format: DATA + description: (optional) Fake EVM bytecode to inject into the account before executing the call. + state: + type: object + description: (optional) Fake key-value mapping to override all slots in the account storage before executing the call. + stateDiff: + type: object + description: (optional) Fake key-value mapping to override individual slots in the account storage before executing the call. diff --git a/web3rpc/rpc-specs/paths/admin/index.yaml b/web3rpc/rpc-specs/paths/admin/index.yaml index 418377486..fc3eff8d0 100644 --- a/web3rpc/rpc-specs/paths/admin/index.yaml +++ b/web3rpc/rpc-specs/paths/admin/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/admin/nodeConfig.yaml b/web3rpc/rpc-specs/paths/admin/nodeConfig.yaml index 27d2a77a9..cf189a699 100644 --- a/web3rpc/rpc-specs/paths/admin/nodeConfig.yaml +++ b/web3rpc/rpc-specs/paths/admin/nodeConfig.yaml @@ -134,7 +134,7 @@ components: "NumFetcherPrefetchWorker": 32, "UseSnapshotForPrefetch": false, "LocalCacheSizeMiB": 0, - "FastCacheFileDir": "/klaytn/fastcache", + "FastCacheFileDir": "/kaia/fastcache", "FastCacheSavePeriod": 0, "RedisEndpoints": null, "RedisClusterEnable": false, @@ -152,7 +152,7 @@ components: "NoLocals": false, "AllowLocalAnchorTx": false, "DenyRemoteTx": false, - "Journal": "/klaytn/klay/transactions.rlp", + "Journal": "/kaia/klay/transactions.rlp", "JournalInterval": 3600000000000, "PriceLimit": 1, "PriceBump": 10, @@ -193,7 +193,7 @@ components: "IsPrivate": true, "AutoRestartFlag": true, "RestartTimeOutFlag": 900000000000, - "DaemonPathFlag": "/klaytn-docker-pkg/bin/kcnd", + "DaemonPathFlag": "/kaia-docker-pkg/bin/kcnd", "RPCGasCap": null, "RPCEVMTimeout": 5000000000, "RPCTxFeeCap": 0, diff --git a/web3rpc/rpc-specs/paths/admin/startHTTP.yaml b/web3rpc/rpc-specs/paths/admin/startHTTP.yaml index 0e45d8329..a713d5170 100644 --- a/web3rpc/rpc-specs/paths/admin/startHTTP.yaml +++ b/web3rpc/rpc-specs/paths/admin/startHTTP.yaml @@ -45,7 +45,7 @@ paths: - name: apis schema: type: string - description: (optional) API modules to offer over this interface (default "klay,net,rpc"). + description: (optional) API modules to offer over this interface (default "kaia,net,rpc"). in: query requestBody: @@ -114,9 +114,9 @@ components: APIs: type: string title: Apis - description: (optional) API modules to offer over this interface (default "klay,net,rpc"). + description: (optional) API modules to offer over this interface (default "kaia,net,rpc"). example: - ["127.0.0.1", 8551, "", "klay"] + ["127.0.0.1", 8551, "", "kaia"] StartHTTPResp: type: object diff --git a/web3rpc/rpc-specs/paths/admin/startWS.yaml b/web3rpc/rpc-specs/paths/admin/startWS.yaml index 70102bb3e..5809f65da 100644 --- a/web3rpc/rpc-specs/paths/admin/startWS.yaml +++ b/web3rpc/rpc-specs/paths/admin/startWS.yaml @@ -43,7 +43,7 @@ paths: - name: apis schema: type: string - description: (optional) API modules to offer over this interface (default "klay,net,rpc"). + description: (optional) API modules to offer over this interface (default "kaia,net,rpc"). in: query requestBody: @@ -112,9 +112,9 @@ components: Apis: type: string title: Apis - description: (optional) API modules to offer over this interface (default "klay,net,rpc"). + description: (optional) API modules to offer over this interface (default "kaia,net,rpc"). example: - ["127.0.0.1", 8552, "", "klay"] + ["127.0.0.1", 8552, "", "kaia"] StartWSResp: type: object diff --git a/web3rpc/rpc-specs/paths/all-except-eth/index.yaml b/web3rpc/rpc-specs/paths/all-except-eth/index.yaml index 7491544f1..37ab3510b 100644 --- a/web3rpc/rpc-specs/paths/all-except-eth/index.yaml +++ b/web3rpc/rpc-specs/paths/all-except-eth/index.yaml @@ -4,7 +4,7 @@ info: version: "0.9.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/debug/index.yaml b/web3rpc/rpc-specs/paths/debug/index.yaml index 7e5c33749..0b8a8f607 100644 --- a/web3rpc/rpc-specs/paths/debug/index.yaml +++ b/web3rpc/rpc-specs/paths/debug/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/debug/runtimeDebugging/stacks.yaml b/web3rpc/rpc-specs/paths/debug/runtimeDebugging/stacks.yaml index 17146853c..3613370f2 100644 --- a/web3rpc/rpc-specs/paths/debug/runtimeDebugging/stacks.yaml +++ b/web3rpc/rpc-specs/paths/debug/runtimeDebugging/stacks.yaml @@ -75,7 +75,7 @@ components: result: type: string description: The structured metrics collected by the node.The stack information of all goroutines. - example: "goroutine 76176 [running]:\ngithub.com/klaytn/klaytn/api/debug.(*HandlerT).Stacks(0xc0002ce050, 0x0, 0x0)\n\t/private/tmp/klaytn-20181001-13887-zbyv2z/build/_workspace/src/github.com/klaytn/klaytn/api/debug/api.go:173 +0x74\nreflect.Value.call(0xc01867c660, 0xc000231bd8, 0x13, 0x4b26ca7, 0x4, 0xc008d8b7c0, 0x1, 0x1, 0x30, 0xc0323211d0 ..." + example: "goroutine 76176 [running]:\ngithub.com/kaiachain/kaia/api/debug.(*HandlerT).Stacks(0xc0002ce050, 0x0, 0x0)\n\t/private/tmp/kaia-20241001-13887-zbyv2z/build/_workspace/src/github.com/kaiachain/kaia/api/debug/api.go:173 +0x74\nreflect.Value.call(0xc01867c660, 0xc000231bd8, 0x13, 0x4b26ca7, 0x4, 0xc008d8b7c0, 0x1, 0x1, 0x30, 0xc0323211d0 ..." diff --git a/web3rpc/rpc-specs/paths/debug/vMTracing/traceChain.yaml b/web3rpc/rpc-specs/paths/debug/vMTracing/traceChain.yaml index ac6f6dcc9..53b49b743 100644 --- a/web3rpc/rpc-specs/paths/debug/vMTracing/traceChain.yaml +++ b/web3rpc/rpc-specs/paths/debug/vMTracing/traceChain.yaml @@ -66,18 +66,18 @@ paths: label: "Curl" source: $ref: "../../../code-samples/curl/debug/vMTracing/traceChain.sh" - # - lang: "Java" - # label: "Java" - # source: - # $ref: "../../../code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceChainExample.java" - # - lang: "JavaScript" - # label: "Javascript" - # source: - # $ref: "../../../code-samples/javascript/debug/vMTracing/traceChain.js" - # - lang: "Python" - # label: "Python" - # source: - # $ref: "../../../code-samples/python/klaytnDebug/vMTracing/traceChain.py" + - lang: "Java" + label: "Java" + source: + $ref: "../../../code-samples/java/src/main/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceChainExample.java" + - lang: "JavaScript" + label: "Javascript" + source: + $ref: "../../../code-samples/javascript/debug/vMTracing/traceChain.js" + - lang: "Python" + label: "Python" + source: + $ref: "../../../code-samples/python/debug/vMTracing/traceChain.py" components: schemas: diff --git a/web3rpc/rpc-specs/paths/eth/gas/feeHistory.yaml b/web3rpc/rpc-specs/paths/eth/gas/feeHistory.yaml index 5c6e9c2d3..2adcf6f6c 100644 --- a/web3rpc/rpc-specs/paths/eth/gas/feeHistory.yaml +++ b/web3rpc/rpc-specs/paths/eth/gas/feeHistory.yaml @@ -119,7 +119,7 @@ components: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BaseFeePerGas" gasUsedRatio: type: array - description: An array of block gas used ratios. Measures the network congestion level. These are calculated as the ratio of block gas used and [KIP-71 MAX_BLOCK_GAS_USED_FOR_BASE_FEE](https://kips.klaytn.foundation/KIPs/kip-71). If the ratio is above 1, then 1 is returned. + description: An array of block gas used ratios. Measures the network congestion level. These are calculated as the ratio of block gas used and [KIP-71 MAX_BLOCK_GAS_USED_FOR_BASE_FEE](https://kips.kaia.io/KIPs/kip-71). If the ratio is above 1, then 1 is returned. items: type: number format: float diff --git a/web3rpc/rpc-specs/paths/eth/index.yaml b/web3rpc/rpc-specs/paths/eth/index.yaml index cd6153432..e09c3f78f 100644 --- a/web3rpc/rpc-specs/paths/eth/index.yaml +++ b/web3rpc/rpc-specs/paths/eth/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/eth/transaction/call.yaml b/web3rpc/rpc-specs/paths/eth/transaction/call.yaml index c7b1b5e1c..a53dbafd1 100644 --- a/web3rpc/rpc-specs/paths/eth/transaction/call.yaml +++ b/web3rpc/rpc-specs/paths/eth/transaction/call.yaml @@ -39,7 +39,7 @@ paths: description: The state override set is an optional address-to-state mapping, where each entry specifies some state to be ephemerally overridden prior to executing the call. required: false schema: - $ref: "#/components/schemas/StateOverrideSet" + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" requestBody: content: @@ -96,32 +96,9 @@ components: BlockNumberOrTag: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrTag" StateOverrideSet: - $ref: "#/components/schemas/StateOverrideSet" + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" example: [{"from": "0xca7a99380131e6c76cfa622396347107aeedca2d", "to": "0xbE3892d33620bE5aca8c75D39e7401871194d290", "input": "0x2e64cec1"}, "latest", {"0xbE3892d33620bE5aca8c75D39e7401871194d290": {"code":"0x6080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e64cec114604e5780636057361d146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a9565b005b60008054905090565b80600081905550505600a165627a7a723058207783dba41884f73679e167576362b7277f88458815141651f48ca38c25b498f80029"}}] - StateOverrideSet: - type: object - description: The state override set is an optional address-to-state mapping, where each entry specifies some state to be ephemerally overridden prior to executing the call. - properties: - balance: - type: integer - format: int64 - description: (optional) Fake balance to set for the account before executing the call. - nonce: - type: integer - format: int64 - description: (optional) Fake nonce to set for the account before executing the call. - code: - type: string - format: DATA - description: (optional) Fake EVM bytecode to inject into the account before executing the call. - state: - type: object - description: (optional) Fake key-value mapping to override all slots in the account storage before executing the call. - stateDiff: - type: object - description: (optional) Fake key-value mapping to override individual slots in the account storage before executing the call. - KlayCallResp: type: object properties: diff --git a/web3rpc/rpc-specs/paths/eth/transaction/estimateGas.yaml b/web3rpc/rpc-specs/paths/eth/transaction/estimateGas.yaml index b4022fe31..5d75032bb 100644 --- a/web3rpc/rpc-specs/paths/eth/transaction/estimateGas.yaml +++ b/web3rpc/rpc-specs/paths/eth/transaction/estimateGas.yaml @@ -28,6 +28,12 @@ paths: required: true schema: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/EthCallObject" + - name: BlockNumberOrHashOrTag + in: query + required: false + schema: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" + requestBody: content: @@ -74,15 +80,28 @@ components: properties: method: type: string - default: 'eth_estimateGas' + default: "eth_estimateGas" params: type: array items: properties: - EthCallObject: - description: The transaction call object. See the next table for the object's properties. - $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/EthCallObject" - example: [{"from": "0x3f71029af4e252b25b9ab999f77182f0cd3bc085", "to": "0x87ac99835e67168d4f9a40580f8f5c33550ba88b", "gas": "0x100000", "gasPrice": "0x5d21dba00", "value": "0x0", "input": "0x8ada066e"}] + CallObject: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" + BlockNumberOrHashOrTag: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" + StateOverrideSet: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" + example: + [ + { + "from": "0x3f71029af4e252b25b9ab999f77182f0cd3bc085", + "to": "0x87ac99835e67168d4f9a40580f8f5c33550ba88b", + "gas": "0x100000", + "gasPrice": "0x5d21dba00", + "value": "0x0", + "input": "0x8ada066e", + }, + ] EthEstimateGasResp: type: object @@ -92,4 +111,3 @@ components: format: hex description: The amount of gas used. example: "0x5208" - diff --git a/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml b/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml index 9eb5d807a..2c4ffd8ac 100644 --- a/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml +++ b/web3rpc/rpc-specs/paths/governance/getChainConfig.yaml @@ -19,6 +19,12 @@ paths: **NOTE:** In versions earlier than Kaia v1.10.0, this API returned the initial chain configuration. However, due to its confusing name, it is updated since Kaia v1.10.0. To query the initial chain configuration, use getChainConfigAt(0) instead. + NOTE: If the requested block has Kore hardfork enabled, the value of `governance.reward.useGiniCoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `governance.reward.proposerUpdateInterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `governance.reward.stakingUpdateInterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `governance_getChainConfig` tags: diff --git a/web3rpc/rpc-specs/paths/governance/getParams.yaml b/web3rpc/rpc-specs/paths/governance/getParams.yaml index c951eb5de..a5990a84e 100644 --- a/web3rpc/rpc-specs/paths/governance/getParams.yaml +++ b/web3rpc/rpc-specs/paths/governance/getParams.yaml @@ -23,6 +23,12 @@ paths: **NOTE:** The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future governance parameters are subject to change via additional governance votes or GovParam contract state changes. + NOTE: If the requested block has Kore hardfork enabled, the value of `reward.useginicoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `reward.proposerupdateinterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `reward.stakingupdateinterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `governance_getParams` tags: diff --git a/web3rpc/rpc-specs/paths/governance/index.yaml b/web3rpc/rpc-specs/paths/governance/index.yaml index f35676d48..2883e2ef7 100644 --- a/web3rpc/rpc-specs/paths/governance/index.yaml +++ b/web3rpc/rpc-specs/paths/governance/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/governance/vote.yaml b/web3rpc/rpc-specs/paths/governance/vote.yaml index 04de82b83..d751dcb12 100644 --- a/web3rpc/rpc-specs/paths/governance/vote.yaml +++ b/web3rpc/rpc-specs/paths/governance/vote.yaml @@ -18,6 +18,26 @@ paths: The vote method submits a new vote. If the node has the right to vote based on governance mode, the vote can be placed. If not, an error message will be returned and the vote will be ignored. **JSONRPC:** `governance_vote` + The vote method submits a new vote. If the node has the right to vote based on governance mode, the vote can be placed. If not, an error message will be returned and the vote will be ignored. + + You can vote for the parameters listed in kaia_getParams, except immutable items. Immutable items are first decided at the genesis configuration and remain unchanged. + + In addition to the parameters described in kaia_getParams, you can vote for validator council changes using the values below. + + + + + + + + + + + + + + +
Key<Value
governance.addvalidatorADDRESS. An address or comma-separated list of addresses of a new validator candidate. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2, 0xf39fd6e51aad88f6f4ce6a88827279cFfB92266
governance.removevalidatorADDRESS. An address or comma-separated list of addresses of a current validator to be removed. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
tags: - governance @@ -100,97 +120,6 @@ components: schemas: Value: type: string - description: | - Various types of value for each key. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyDescription
"governance.governancemode"STRING. One of the three governance modes. "none", "single", "ballot"
"governance.governingnode"ADDRESS. Designated governing node's address. It only works if the governance mode is "single" e.g.,"0xe733cb4d279da696f30d470f8c04decb54fcb0d2"
"governance.unitprice"NUMBER. Price of unit gas. e.g., 25000000000
"governance.addvalidator"ADDRESS. Address of a new validator candidate. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
"governance.removevalidator"ADDRESS. Address of a current validator which need to be removed. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
"governance.deriveshaimpl"NUMBER. Policy to generate the transaction hash and receipt hash in a block header. See here for available options. e.g., 2 (DeriveShaConcat)
"governance.govparamcontract"ADDRESS. Address of the GovParam contract. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
"istanbul.epoch"NUMBER. A period in which votes are gathered in blocks. When an epoch end, all votes which haven't been passed will be cleared. e.g., 86400
"istanbul.committeesize"NUMBER. The number of validators in a committee.(sub in chain configuration) e.g., 7
"reward.mintingamount"STRING. Amount of Peb minted when a block is generated. Double quotation marks are needed for a value. e.g., "9600000000000000000"
"reward.ratio"STRING. Distribution rate for a CN/KGF/KIR separated by "/". The sum of all values has to be 100. e.g., "50/40/10" meaning CN 50%, KGF 40%, KIR 10%
"reward.kip82ratio"STRING. Distribution ratio of the block proposer to stakers separated by "/". The sum of all values has to be "100". See KIP-82 for further details. e.g., "20/80" means that the proposer takes 20% while stakers take 80%.
"reward.useginicoeff"BOOL. Use the Gini coefficient or not. true, false
"reward.deferredtxfee"BOOL. The way of giving transaction fee to a proposer. If true, it means the tx fee will be summed up with block reward and distributed to the proposer, KIR and KGF. If not, all tx fee will be given to the proposer. true, false
"reward.minimumstake"STRING. Amount of Kaia required to be a CN (Consensus Node). Double quotation marks are needed for a value. e.g., "5000000"
"kip71.lowerboundbasefee"NUMBER. The lowest possible base fee. See KIP-71 for further details. e.g., 25000000000
"kip71.upperboundbasefee"NUMBER. The highest possible base fee. e.g., 750000000000
"kip71.gastarget"NUMBER. The block gas that base fee wants to achieve. The base fee increases when parent block contains more than gas target, and decreases when parent block contains less than gas target. e.g., 30000000
"kip71.basefeedenominator"NUMBER. Controls how fast base fee changes. e.g., 20
"kip71.maxblockgasusedforbasefee"NUMBER. The maximum block gas perceived in base fee calculation. e.g., 60000000
+ description: Various types of value for each key. \ No newline at end of file diff --git a/web3rpc/rpc-specs/paths/kaia/configuration/getChainConfig.yaml b/web3rpc/rpc-specs/paths/kaia/configuration/getChainConfig.yaml index 3fda6b855..6ef81b9b8 100644 --- a/web3rpc/rpc-specs/paths/kaia/configuration/getChainConfig.yaml +++ b/web3rpc/rpc-specs/paths/kaia/configuration/getChainConfig.yaml @@ -15,8 +15,18 @@ paths: operationId: ..getChainConfig summary: "[Configuration] kaia_getChainConfig" description: | - Returns the configuration of the chain. + Returns the chain configuration at the given block number. + See kaia_getParams for the list of parameters. + + NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + NOTE: If the requested block has Kore hardfork enabled, the value of `governance.reward.useGiniCoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `governance.reward.proposerUpdateInterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `governance.reward.stakingUpdateInterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `kaia_getChainConfig` tags: - kaia diff --git a/web3rpc/rpc-specs/paths/kaia/configuration/getParams.yaml b/web3rpc/rpc-specs/paths/kaia/configuration/getParams.yaml index 91b417319..65fd9ea56 100644 --- a/web3rpc/rpc-specs/paths/kaia/configuration/getParams.yaml +++ b/web3rpc/rpc-specs/paths/kaia/configuration/getParams.yaml @@ -19,6 +19,118 @@ paths: NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyValue
governance.governancemodeSTRING. One of the three governance modes, "none", "single", "ballot". this parameter is immutable.
governance.governingnodeADDRESS. Designated governing node's address. Only works with "single" governance mode. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
governance.unitpriceNUMBER. Pre-Magma fixed gas price in kei. e.g., 25000000000 (25 gkei/gas)
governance.addvalidatorADDRESS. Address or comma-separated list of addresses of a new validator candidate. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2,0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
governance.removevalidatorADDRESS. Address or comma-separated list of addresses of a current validator which need to be removed. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
governance.deriveshaimplNUMBER. One of the three methods for generating the transaction hash and receipt hash in a block header. 0 (Original), 1 (Simple), 2 (Concat).
governance.govparamcontractADDRESS. (since Kore) Address of the GovParam contract. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
istanbul.epochNUMBER. The voting period in header-based governance. This parameter is immutable. e.g., 86400
istanbul.committeesizeNUMBER. The maximum number of validators in a committee. (also known as istanbul.sub in ChainConfig)
istanbul.policyNUMBER. One of three proposer selection policies, 0 (RoundRobin), 1 (Sticky), 2 (WeightedRandom). This parameter is immutable.
reward.mintingamountSTRING. Minted rewards per block in kei. Note that it must be in string type because the number can be too big for JavaScript to handle. e.g., 9600000000000000000 (9.6 KAIA/block)
reward.ratioSTRING. Reward distribution ratio among GC/KIF/KEF. Three integers separated by "/" that adds up to 100. e.g., 50/40/10
reward.kip82ratioSTRING. (Since Kore) Reward distribution between block proposer and stakers. Two integers separated by "/" that adds up to 100. e.g., 20/80.
reward.useginicoeffBOOL. (Before Kore) If true, proposer selection algorithm adjusts the staking amounts using Gini coefficient. This parameter is immutable. This parameter is no longer used since Kore, so false is displayed in the APIs. e.g., true
reward.deferredtxfeeBOOL. If false, transaction fees sent to the proposer after executing each transaction. If true, transaction fees are summed up with other rewards and given to the proposer after executing all transactions. This field is immutable.
reward.minimumstakeSTRING. Minimum staking amount in KAIA to be a validator (i.e. CN). This parameter is immutable. Note that it must be in string type because the number can be too big for JavaScript to handle. e.g., 5000000 (5 million KAIA)
reward.proposerupdateintervalNUMBER. (Before Randao) Size of the proposer selection batch. This parameter is immutable. This parameter is no longer used since Kore, so 1 is displayed in the APIs. e.g., 3600
reward.stakingupdateintervalNUMBER. (Before Kaia) The block interval in which staking information is updated. This parameter is immutable. This parameter is no longer used since Kaia, so 1 is displayed in the APIs. e.g., 86400
kip71.lowerboundbasefeeNUMBER. The lowest possible base fee in kei. e.g., 25000000000
kip71.upperboundbasefeeNUMBER. The highest possible base fee in kei. e.g., 750000000000
kip71.gastargetNUMBER. The target, or neutral, block gasUsed. The base fee increases when parent block contains more than gas target, and decreases when parent block contains less than gas target. e.g., 30000000
kip71.basefeedenominatorNUMBER. Controls how fast the base fee changes. e.g., 20
kip71.maxblockgasusedforbasefeeNUMBER. The maximum block gas recognized in base fee calculation. e.g., 60000000
+ + + NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + NOTE: If the requested block has Kore hardfork enabled, the value of `reward.useginicoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `reward.proposerupdateinterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `reward.stakingupdateinterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `kaia_getParams` tags: @@ -103,4 +215,4 @@ paths: - lang: "Python" label: "Python" source: - $ref: "../../../code-samples/python/kaia/configuration/getParams.py" + $ref: "../../../code-samples/python/kaia/configuration/getParams.py" \ No newline at end of file diff --git a/web3rpc/rpc-specs/paths/kaia/index.yaml b/web3rpc/rpc-specs/paths/kaia/index.yaml index c7d1810b1..ada487a54 100644 --- a/web3rpc/rpc-specs/paths/kaia/index.yaml +++ b/web3rpc/rpc-specs/paths/kaia/index.yaml @@ -13,7 +13,7 @@ tags: description: API for kaia namespace servers: - url: http://localhost:7151 - - url: https://api.baobab.kaiatn.net:8651 + - url: https://public-en-kairos.node.kaia.io - url: https://public-en-cypress.kaiatn.net paths: # kaia/account diff --git a/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml b/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml index cd1d80159..49c510bb2 100644 --- a/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml +++ b/web3rpc/rpc-specs/paths/kaia/transaction/estimateGas.yaml @@ -28,7 +28,11 @@ paths: required: true schema: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" - + - name: BlockNumberOrHashOrTag + in: query + required: false + schema: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" requestBody: content: application/json: @@ -36,6 +40,7 @@ paths: allOf: - $ref: "../../../components/requests/JsonRpcRequest.yaml#/components/schemas/JsonRpcRequest" - $ref: "#/components/schemas/KaiaEstimateGasReq" + responses: 200: @@ -46,6 +51,7 @@ paths: allOf: - $ref: "../../../components/responses/JsonRpcResponse.yaml#/components/schemas/JsonRpcResponse" - $ref: "#/components/schemas/KaiaEstimateGasResp" + x-codeSamples: - lang: "Shell" @@ -79,9 +85,13 @@ components: params: type: array items: - allOf: - - title: callObject - - $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" + properties: + CallObject: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" + BlockNumberOrHashOrTag: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" + StateOverrideSet: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" example: [{"from": "0x3f71029af4e252b25b9ab999f77182f0cd3bc085", "to": "0x87ac99835e67168d4f9a40580f8f5c33550ba88b", "gas": "0x100000", "gasPrice": "0x5d21dba00", "value": "0x0", "input": "0x8ada066e"}] KaiaEstimateGasResp: diff --git a/web3rpc/rpc-specs/paths/klay/configuration/getChainConfig.yaml b/web3rpc/rpc-specs/paths/klay/configuration/getChainConfig.yaml index e87bfa31d..296a7d36b 100644 --- a/web3rpc/rpc-specs/paths/klay/configuration/getChainConfig.yaml +++ b/web3rpc/rpc-specs/paths/klay/configuration/getChainConfig.yaml @@ -16,7 +16,15 @@ paths: summary: "[Configuration] klay_getChainConfig" description: | Returns the configuration of the chain. + + See klay_getParams for the list of parameters. + NOTE: If the requested block has Kore hardfork enabled, the value of `governance.reward.useGiniCoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `governance.reward.proposerUpdateInterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `governance.reward.stakingUpdateInterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `klay_getChainConfig` tags: - klay diff --git a/web3rpc/rpc-specs/paths/klay/configuration/getParams.yaml b/web3rpc/rpc-specs/paths/klay/configuration/getParams.yaml index 1afd59bc4..4da82e681 100644 --- a/web3rpc/rpc-specs/paths/klay/configuration/getParams.yaml +++ b/web3rpc/rpc-specs/paths/klay/configuration/getParams.yaml @@ -15,10 +15,122 @@ paths: operationId: $getParams summary: "klay_getParams" description: | - Returns the governance parameters effective at the given block. + Returns the governance parameters effective at the given block. NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyValue
governance.governancemodeSTRING. One of the three governance modes, "none", "single", "ballot". this parameter is immutable.
governance.governingnodeADDRESS. Designated governing node's address. Only works with "single" governance mode. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
governance.unitpriceNUMBER. Pre-Magma fixed gas price in kei. e.g., 25000000000 (25 gkei/gas)
governance.addvalidatorADDRESS. Address or comma-separated list of addresses of a new validator candidate. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2,0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
governance.removevalidatorADDRESS. Address or comma-separated list of addresses of a current validator which need to be removed. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
governance.deriveshaimplNUMBER. One of the three methods for generating the transaction hash and receipt hash in a block header. 0 (Original), 1 (Simple), 2 (Concat).
governance.govparamcontractADDRESS. (since Kore) Address of the GovParam contract. e.g., 0xe733cb4d279da696f30d470f8c04decb54fcb0d2
istanbul.epochNUMBER. The voting period in header-based governance. This parameter is immutable. e.g., 86400
istanbul.committeesizeNUMBER. The maximum number of validators in a committee. (also known as istanbul.sub in ChainConfig)
istanbul.policyNUMBER. One of three proposer selection policies, 0 (RoundRobin), 1 (Sticky), 2 (WeightedRandom). This parameter is immutable.
reward.mintingamountSTRING. Minted rewards per block in kei. Note that it must be in string type because the number can be too big for JavaScript to handle. e.g., 9600000000000000000 (9.6 KAIA/block)
reward.ratioSTRING. Reward distribution ratio among GC/KIF/KEF. Three integers separated by "/" that adds up to 100. e.g., 50/40/10
reward.kip82ratioSTRING. (Since Kore) Reward distribution between block proposer and stakers. Two integers separated by "/" that adds up to 100. e.g., 20/80.
reward.useginicoeffBOOL. (Before Kore) If true, proposer selection algorithm adjusts the staking amounts using Gini coefficient. This parameter is immutable. This parameter is no longer used since Kore, so false is displayed in the APIs. e.g., true
reward.deferredtxfeeBOOL. If false, transaction fees sent to the proposer after executing each transaction. If true, transaction fees are summed up with other rewards and given to the proposer after executing all transactions. This field is immutable.
reward.minimumstakeSTRING. Minimum staking amount in KAIA to be a validator (i.e. CN). This parameter is immutable. Note that it must be in string type because the number can be too big for JavaScript to handle. e.g., 5000000 (5 million KAIA)
reward.proposerupdateintervalNUMBER. (Before Randao) Size of the proposer selection batch. This parameter is immutable. This parameter is no longer used since Kore, so 1 is displayed in the APIs. e.g., 3600
reward.stakingupdateintervalNUMBER. (Before Kaia) The block interval in which staking information is updated. This parameter is immutable. This parameter is no longer used since Kaia, so 1 is displayed in the APIs. e.g., 86400
kip71.lowerboundbasefeeNUMBER. The lowest possible base fee in kei. e.g., 25000000000
kip71.upperboundbasefeeNUMBER. The highest possible base fee in kei. e.g., 750000000000
kip71.gastargetNUMBER. The target, or neutral, block gasUsed. The base fee increases when parent block contains more than gas target, and decreases when parent block contains less than gas target. e.g., 30000000
kip71.basefeedenominatorNUMBER. Controls how fast the base fee changes. e.g., 20
kip71.maxblockgasusedforbasefeeNUMBER. The maximum block gas recognized in base fee calculation. e.g., 60000000
+ + + NOTE: The block number can be larger than the latest block number, in which case the API returns the tentative value based on the current chain state. The future kaia parameters are subject to change via additional governance votes or GovParam contract state changes. + + NOTE: If the requested block has Kore hardfork enabled, the value of `reward.useginicoeff` will be `false` because all council members have an equal chance of being elected as a block proposer and thus Gini coefficient is not relevant. + + NOTE: If the requested block has Randao hardfork enabled, the value of `reward.proposerupdateinterval` will be `1` because proposers are no longer selected at batch. + + NOTE: If the requested block has Kaia hardfork enabled, the value of `reward.stakingupdateinterval` will be `1` because staking information is every block, effectively deprecating the interval. + **JSONRPC:** `klay_getParams` tags: diff --git a/web3rpc/rpc-specs/paths/klay/gas/feeHistory.yaml b/web3rpc/rpc-specs/paths/klay/gas/feeHistory.yaml index d38a366ca..f99a96617 100644 --- a/web3rpc/rpc-specs/paths/klay/gas/feeHistory.yaml +++ b/web3rpc/rpc-specs/paths/klay/gas/feeHistory.yaml @@ -124,7 +124,7 @@ components: items: type: number format: float - description: An array of block gas used ratios. Measures the network congestion level. These are calculated as the ratio of block gas used and [KIP-71 MAX_BLOCK_GAS_USED_FOR_BASE_FEE](https://kips.klaytn.foundation/KIPs/kip-71). If the ratio is above 1, then 1 is returned. + description: An array of block gas used ratios. Measures the network congestion level. These are calculated as the ratio of block gas used and [KIP-71 MAX_BLOCK_GAS_USED_FOR_BASE_FEE](https://kips.kaia.io/KIPs/kip-71). If the ratio is above 1, then 1 is returned. reward: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/Reward" example: diff --git a/web3rpc/rpc-specs/paths/klay/index.yaml b/web3rpc/rpc-specs/paths/klay/index.yaml index 2a5ddc424..b0d06fffd 100644 --- a/web3rpc/rpc-specs/paths/klay/index.yaml +++ b/web3rpc/rpc-specs/paths/klay/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml b/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml index 066462cd1..a44166815 100644 --- a/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml +++ b/web3rpc/rpc-specs/paths/klay/transaction/estimateGas.yaml @@ -28,7 +28,11 @@ paths: required: true schema: $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KlayCallObject" - + - name: BlockNumberOrHashOrTag + in: query + required: false + schema: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" requestBody: content: application/json: @@ -79,9 +83,13 @@ components: params: type: array items: - allOf: - - title: callObject - - $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KlayCallObject" + properties: + CallObject: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/KaiaCallObject" + BlockNumberOrHashOrTag: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/BlockNumberOrHashOrTag" + StateOverrideSet: + $ref: "../../../components/schemas/common/Common.yaml#/components/schemas/StateOverrideSet" example: [{"from": "0x3f71029af4e252b25b9ab999f77182f0cd3bc085", "to": "0x87ac99835e67168d4f9a40580f8f5c33550ba88b", "gas": "0x100000", "gasPrice": "0x5d21dba00", "value": "0x0", "input": "0x8ada066e"}] KlayEstimateGasResp: diff --git a/web3rpc/rpc-specs/paths/mainbridge/index.yaml b/web3rpc/rpc-specs/paths/mainbridge/index.yaml index 4d658d201..a4f4f2cf2 100644 --- a/web3rpc/rpc-specs/paths/mainbridge/index.yaml +++ b/web3rpc/rpc-specs/paths/mainbridge/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/net/index.yaml b/web3rpc/rpc-specs/paths/net/index.yaml index 3c27c3e99..cdaaa8bff 100644 --- a/web3rpc/rpc-specs/paths/net/index.yaml +++ b/web3rpc/rpc-specs/paths/net/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/net/networkID.yaml b/web3rpc/rpc-specs/paths/net/networkID.yaml index 1aabff911..f1d8a67f3 100644 --- a/web3rpc/rpc-specs/paths/net/networkID.yaml +++ b/web3rpc/rpc-specs/paths/net/networkID.yaml @@ -46,7 +46,7 @@ paths: result: type: string format: hex - description: The integer of the network identifier. "1001" Kaia Baobab testnet."8217" Kaia Cypress mainnet. + description: The integer of the network identifier. "1001" Kaia Kairos testnet."8217" Kaia Cypress mainnet. example: "1001" x-codeSamples: diff --git a/web3rpc/rpc-specs/paths/net/version.yaml b/web3rpc/rpc-specs/paths/net/version.yaml index 52f130b50..8817fe492 100644 --- a/web3rpc/rpc-specs/paths/net/version.yaml +++ b/web3rpc/rpc-specs/paths/net/version.yaml @@ -45,7 +45,7 @@ paths: result: type: string format: hex - description: The integer of the kaia protocol version. "1001" Kaia Baobab testnet."8217" Kaia Cypress mainnet. + description: The integer of the kaia protocol version. "1001" Kaia Kairos testnet."8217" Kaia Cypress mainnet. example: "1001" x-codeSamples: diff --git a/web3rpc/rpc-specs/paths/personal/index.yaml b/web3rpc/rpc-specs/paths/personal/index.yaml index c556197bb..5fd3b6132 100644 --- a/web3rpc/rpc-specs/paths/personal/index.yaml +++ b/web3rpc/rpc-specs/paths/personal/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/personal/listAccounts.yaml b/web3rpc/rpc-specs/paths/personal/listAccounts.yaml index 80bbee9d8..8c4d5cbb6 100644 --- a/web3rpc/rpc-specs/paths/personal/listAccounts.yaml +++ b/web3rpc/rpc-specs/paths/personal/listAccounts.yaml @@ -49,7 +49,7 @@ paths: type: array items: type: string - description: The list of all the Klaytn account addresses + description: The list of all the Kaia account addresses example: ["0x5e97870f263700f46aa00d967821199b9bc5a120", "0x3d80b31a78c30fc628f20b2c89d7ddbf6e53cedc"] x-codeSamples: diff --git a/web3rpc/rpc-specs/paths/subbridge/index.yaml b/web3rpc/rpc-specs/paths/subbridge/index.yaml index 18c567827..9b8b90263 100644 --- a/web3rpc/rpc-specs/paths/subbridge/index.yaml +++ b/web3rpc/rpc-specs/paths/subbridge/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/paths/txpool/index.yaml b/web3rpc/rpc-specs/paths/txpool/index.yaml index cfd0cb39d..82a77daaf 100644 --- a/web3rpc/rpc-specs/paths/txpool/index.yaml +++ b/web3rpc/rpc-specs/paths/txpool/index.yaml @@ -1,10 +1,10 @@ openapi: "3.0.2" info: - title: KLAYTN OPEN API + title: KAIA OPEN API version: "1.10.0" contact: name: API support - url: https://forum.klaytn.foundation/ + url: https://devforum.kaia.io/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/web3rpc/rpc-specs/redocly.yaml b/web3rpc/rpc-specs/redocly.yaml index 052b7e692..57cce0b7d 100644 --- a/web3rpc/rpc-specs/redocly.yaml +++ b/web3rpc/rpc-specs/redocly.yaml @@ -1,5 +1,5 @@ # See https://redocly.com/docs/cli/configuration/ for more information. -organization: klaytn.foundation +organization: kaia.io apis: eth@v1.0.0: root: ./paths/eth/index.yaml diff --git a/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/constant/UrlConstants.java b/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/constant/UrlConstants.java index 6c5ba2071..6ae59e8e2 100644 --- a/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/constant/UrlConstants.java +++ b/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/constant/UrlConstants.java @@ -6,11 +6,11 @@ private UrlConstants() {} public static final String BAOBAB_RPC = System.getenv().getOrDefault("BAOBAB_RPC", "https://public-en-kairos.node.kaia.io"); - public static final String RPC = System.getenv().getOrDefault("RPC", "https://dev.api.klaytn.sotatek.works"); + public static final String RPC = System.getenv().getOrDefault("RPC", "https://public-en-kairos.node.kaia.io"); public static final String CN_RPC = System.getenv().getOrDefault("CN_RPC", "https://public-node-api.klaytnapi.com/v1/cypress"); - public static final String GOVERNANCE_RPC= System.getenv().getOrDefault("GOVERNANCE_RPC", "https://dev.api.kcn191.klaytn.sotatek.works"); + public static final String GOVERNANCE_RPC= System.getenv().getOrDefault("GOVERNANCE_RPC", "https://public-en-kairos.node.kaia.io"); public static final String PN_RPC = System.getenv().getOrDefault("PN_RPC", "http://172.16.1.223:8561"); public static final String KEN_RPC="http://3.39.84.202:8651/"; diff --git a/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceBlockFromFileTest.java b/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceBlockFromFileTest.java index dfa73ce50..ec30ae03e 100644 --- a/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceBlockFromFileTest.java +++ b/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/debug/vMTracing/DebugTraceBlockFromFileTest.java @@ -19,7 +19,7 @@ public class DebugTraceBlockFromFileTest { @Test @DisplayName("RPC debug_traceBlockFromFile") void whenRequestValid_ThenCall200ResponseReturns() throws IOException { - String fileName = "/home/sotatek/block.rlp"; + String fileName = "/home/kaia/block.rlp"; DebugTraceBlockFromFileResponse response = w3.debugTraceBlockFromFile(fileName, null).send(); diff --git a/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/personal/PersonalOpenWalletTest.java b/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/personal/PersonalOpenWalletTest.java index 1f1b75df2..72aae22eb 100644 --- a/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/personal/PersonalOpenWalletTest.java +++ b/web3rpc/sdk/client/java/openapi-test/src/test/java/opensdk/sdk/apis/personal/PersonalOpenWalletTest.java @@ -20,7 +20,7 @@ public class PersonalOpenWalletTest { @Test @DisplayName("RPC personal_openWallet") void whenRequestValid_ThenCall200ResponseReturns() throws IOException { - String url = "keystore:///home/sotatek/klay-node/kcn-v1.10.2-0-linux-amd64/kcn-linux-amd64/data/keystore/UTC--2" + + String url = "keystore:///home/kaia/klay-node/kcn-v1.10.2-0-linux-amd64/kcn-linux-amd64/data/keystore/UTC--2" + "023-04-13T03-23-36.992476555Z--8cd4b6b24f2cd0b83d49876f932254823e875547"; String passphrase = "passphrase"; PersonalOpenWalletResponse response = w3.personalOpenWallet(url, passphrase).send(); diff --git a/web3rpc/sdk/client/javascript/.env b/web3rpc/sdk/client/javascript/.env index 226714d56..703e86594 100644 --- a/web3rpc/sdk/client/javascript/.env +++ b/web3rpc/sdk/client/javascript/.env @@ -1,5 +1,5 @@ BAOBAB_RPC=https://public-en-kairos.node.kaia.io -RPC=https://dev.api.klaytn.sotatek.works +RPC=https://public-en-kairos.node.kaia.io CN_RPC=https://public-node-api.klaytnapi.com/v1/cypress -GOVERNANCE_RPC=https://dev.api.kcn191.klaytn.sotatek.works -PN_RPC=https://dev.api.kpn.klaytn.sotatek.works \ No newline at end of file +GOVERNANCE_RPC=https://public-en-kairos.node.kaia.io +PN_RPC=https://public-en-kairos.node.kaia.io \ No newline at end of file diff --git a/web3rpc/sdk/client/javascript/openapi-test/test/constant.js b/web3rpc/sdk/client/javascript/openapi-test/test/constant.js index c485946e2..cfb98f4c2 100644 --- a/web3rpc/sdk/client/javascript/openapi-test/test/constant.js +++ b/web3rpc/sdk/client/javascript/openapi-test/test/constant.js @@ -2,9 +2,9 @@ const path = require('path'); require('dotenv').config({ path: path.resolve('../.env') }); const BAOBAB_RPC=process.env.BAOBAB_RPC || 'https://public-en-kairos.node.kaia.io' -const RPC=process.env.RPC || 'https://dev.api.klaytn.sotatek.works' +const RPC=process.env.RPC || 'https://public-en-kairos.node.kaia.io' const CN_RPC=process.env.CN_RPC || 'https://public-node-api.klaytnapi.com/v1/cypress' -const GOVERNANCE_RPC=process.env.GOVERNANCE_RPC || 'https://dev.api.kcn191.klaytn.sotatek.works' -const PN_RPC=process.env.PN_RPC || 'https://dev.api.kpn.klaytn.sotatek.works' +const GOVERNANCE_RPC=process.env.GOVERNANCE_RPC || 'https://public-en-kairos.node.kaia.io' +const PN_RPC=process.env.PN_RPC || 'https://public-en-kairos.node.kaia.io' module.exports={RPC, CN_RPC, BAOBAB_RPC, GOVERNANCE_RPC, PN_RPC} \ No newline at end of file diff --git a/web3rpc/sdk/client/javascript/openapi-test/test/debug/vMTracing/DebugTraceBlockFromFile.test.js b/web3rpc/sdk/client/javascript/openapi-test/test/debug/vMTracing/DebugTraceBlockFromFile.test.js index 118ef3d30..81ec31596 100644 --- a/web3rpc/sdk/client/javascript/openapi-test/test/debug/vMTracing/DebugTraceBlockFromFile.test.js +++ b/web3rpc/sdk/client/javascript/openapi-test/test/debug/vMTracing/DebugTraceBlockFromFile.test.js @@ -18,7 +18,7 @@ describe('debug_traceBlockFromFile API', () => { done(); }; - const fileName = "/home/sotatek/block.rlp"; + const fileName = "/home/kaia/block.rlp"; sdk.debug.traceBlockFromFile(fileName, {}, callbackOne); }); diff --git a/web3rpc/sdk/client/javascript/openapi-test/test/personal/PersonalOpenWallet.test.js b/web3rpc/sdk/client/javascript/openapi-test/test/personal/PersonalOpenWallet.test.js index 8e0da0916..eb68ac058 100644 --- a/web3rpc/sdk/client/javascript/openapi-test/test/personal/PersonalOpenWallet.test.js +++ b/web3rpc/sdk/client/javascript/openapi-test/test/personal/PersonalOpenWallet.test.js @@ -13,7 +13,7 @@ describe('personal_openWallet API', () => { done(); }; - const url = "keystore:///home/sotatek/klay-node/kcn-v1.10.2-0-linux-amd64/kcn-linux-amd64/data/keystore/UTC--2023-04-13T03-23-36.992476555Z--8cd4b6b24f2cd0b83d49876f932254823e875547" + const url = "keystore:///home/kaia/klay-node/kcn-v1.10.2-0-linux-amd64/kcn-linux-amd64/data/keystore/UTC--2023-04-13T03-23-36.992476555Z--8cd4b6b24f2cd0b83d49876f932254823e875547" const passphrase = "hello@1234" sdk.personal.openWallet(url, passphrase, {}, callbackOne); diff --git a/web3rpc/sdk/client/python/openapi-test/base/.env b/web3rpc/sdk/client/python/openapi-test/base/.env index 626bbb542..6136f90bf 100644 --- a/web3rpc/sdk/client/python/openapi-test/base/.env +++ b/web3rpc/sdk/client/python/openapi-test/base/.env @@ -1,6 +1,6 @@ -RPC = "https://dev.api.klaytn.sotatek.works" +RPC = "https://public-en-kairos.node.kaia.io" BAOBAB_RPC = "https://public-en-kairos.node.kaia.io" -GOVERNANCE_RPC = "https://dev.api.kcn191.klaytn.sotatek.works" +GOVERNANCE_RPC = "https://public-en-kairos.node.kaia.io" PN_RPC = "http://172.16.1.223:8561" HTTP_200_OK = 200 ERROR_CODE_INCORRECT_METHOD = -32601 diff --git a/web3rpc/sdk/client/python/openapi-test/base/constants.py b/web3rpc/sdk/client/python/openapi-test/base/constants.py index 3e3d95f89..9e0f6c851 100644 --- a/web3rpc/sdk/client/python/openapi-test/base/constants.py +++ b/web3rpc/sdk/client/python/openapi-test/base/constants.py @@ -1,6 +1,6 @@ import os -KLAYTN_URL = os.environ.get("RPC", "https://dev.api.klaytn.sotatek.works") +KLAYTN_URL = os.environ.get("RPC", "https://public-en-kairos.node.kaia.io") BAOBAB_URL = os.environ.get("BAOBAB_RPC", 'https://public-en-kairos.node.kaia.io') -GOVERNANCE_RPC = os.environ.get("GOVERNANCE_RPC", "https://dev.api.kcn191.klaytn.sotatek.works") +GOVERNANCE_RPC = os.environ.get("GOVERNANCE_RPC", "https://public-en-kairos.node.kaia.io") PN_RPC = os.environ.get("PN_RPC", "http://172.16.1.223:8561") diff --git a/web3rpc/sdk/client/python/openapi-test/test/debug/vMTracing/test_trace_block_from_file.py b/web3rpc/sdk/client/python/openapi-test/test/debug/vMTracing/test_trace_block_from_file.py index ff3bfd52f..835a2e81d 100644 --- a/web3rpc/sdk/client/python/openapi-test/test/debug/vMTracing/test_trace_block_from_file.py +++ b/web3rpc/sdk/client/python/openapi-test/test/debug/vMTracing/test_trace_block_from_file.py @@ -5,7 +5,7 @@ class TestTraceBlockFromFile(KlaytnBaseTesting): def setUp(self) -> None: super().setUp() - self.fileName = "/home/sotatek/block.rlp" + self.fileName = "/home/kaia/block.rlp" def test_post(self): self.response = self.w3.debug.trace_block_from_file( diff --git a/web3rpc/sdk/client/python/openapi-test/test/personal/test_open_wallet.py b/web3rpc/sdk/client/python/openapi-test/test/personal/test_open_wallet.py index 66e0d9120..7a8b6da62 100644 --- a/web3rpc/sdk/client/python/openapi-test/test/personal/test_open_wallet.py +++ b/web3rpc/sdk/client/python/openapi-test/test/personal/test_open_wallet.py @@ -5,7 +5,7 @@ class TestOpenWallet(KlaytnBaseTesting): def setUp(self) -> None: super().setUp() - self.url = "keystore:///home/sotatek/klay-node/kcn-v1.10.2-0-linux-amd64/kcn-linux-amd64/data/keystore/UTC--2023-04-13T03-23-36.992476555Z--8cd4b6b24f2cd0b83d49876f932254823e875547" + self.url = "keystore:///home/kaia/klay-node/kcn-v1.10.2-0-linux-amd64/kcn-linux-amd64/data/keystore/UTC--2023-04-13T03-23-36.992476555Z--8cd4b6b24f2cd0b83d49876f932254823e875547" self.passphrase = "passphrase" def test_post(self):