Skip to content

Commit

Permalink
Revert some pages
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-klaytn committed Feb 5, 2025
1 parent a266259 commit c5a4bf2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/build/tutorials/fee-delegation-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Let's skim through how fee delegation works.

`Sender` always should sign the transaction before sending a transaction.

To sign a transaction, use [keyringsign](../../references/sdk/caver-js/api/caver-wallet/keyring.md#keyringsign) which signs a transaction with given private key.
To sign a transaction, use [signTransaction](../../references/sdk/caver-js-1.4.1/api/caver.kaia.accounts.md#signtransaction) which signs a transaction with given private key.

```
// using the event emitter
Expand Down Expand Up @@ -59,7 +59,7 @@ Now, you need to send the `senderRawTransaction` to the fee payer. There will be

When `fee payer` receives the `senderRawTransaction`, `fee payer` signs the `senderRawTransaction` again with their private key and sends the transaction to Kaia. The below code snippet illustrates the process. `kaia.sendRawTransaction` method signs the transaction with the given account's private key before sending the transaction. Before running the code, please replace `"FEEPAYER_ADDRESS"` and `"PRIVATE_KEY"` with the actual values.

Note that when the `fee payer` submits the transaction to Kaia on behalf of the `sender`, the `senderRawTransaction` type must be a `FEE_DELEGATED` type of transaction. In the below example, [signAsFeePayer](../../references/sdk/caver-js/api/caver-wallet/caver-wallet.md#caverwalletsignasfeepayer) method is invoked, because the original `senderRawTransaction` generated by the sender was [TxTypeFeeDelegatedValueTransfer](../transactions/fee-delegation.md#txtypefeedelegatedvaluetransfer).
Note that when the `fee payer` submits the transaction to Kaia on behalf of the `sender`, the `senderRawTransaction` type must be a `FEE_DELEGATED` type of transaction. In the below example, [sendTransaction(FEE_DELEGATED_VALUE_TRANSFER)](../../references/sdk/caver-js-1.4.1/api/caver.kaia/transaction/sendtx-value-transfer.md#sendtransaction-fee_delegated_value_transfer) method is invoked, because the original `senderRawTransaction` generated by the sender was [TxTypeFeeDelegatedValueTransfer](../../learn/transactions/fee-delegation.md#txtypefeedelegatedvaluetransfer).

```
const feePayerAddress = "FEEPAYER_ADDRESS";
Expand Down Expand Up @@ -91,7 +91,7 @@ Let's write a simple server and client using above fee delegation code.

### 3.1 Environment setup <a href="#3-1-environment-setup" id="3-1-environment-setup"></a>

We will use `npm` and [caver-js](../../references/sdk/caver-js/get-started.md) to setup environment for this example as below.
We will use `npm` and [caver-js](../../references/sdk/caver-js-1.4.1/get-started-1.4.1.md) to setup environment for this example as below.

```
$ mkdir example
Expand Down Expand Up @@ -273,7 +273,7 @@ Received data from server: Tx hash is 0x1e6a019bb9c6cf156a6046ca33f0c810fb9fb6fd
Received data from server: Sender Tx hash is 0x7263d2dc5b36abc754726b220b7ad243dd789934109c6874e539ada5c7e9f193
```

It will sign a transaction with the `sender` private key and send the signed transaction to the fee delegated service (i.e., fee payer's server). Then it will receive the response from the fee delegate service including the `Fee payer` address, `Tx hash`, and `Sender Tx hash`. `Tx hash` is hash of a transaction submitted to the Kaia network, while `Sender Tx hash` is hash of a transaction without the fee payer's address and signature. For more details, please take a look at [SenderTxHash](../transactions/transactions.md#sendertxhash).
It will sign a transaction with the `sender` private key and send the signed transaction to the fee delegated service (i.e., fee payer's server). Then it will receive the response from the fee delegate service including the `Fee payer` address, `Tx hash`, and `Sender Tx hash`. `Tx hash` is hash of a transaction submitted to the Kaia network, while `Sender Tx hash` is hash of a transaction without the fee payer's address and signature. For more details, please take a look at [SenderTxHash](../../learn/transactions/transactions.md#sendertxhash).

### 4.3 Check `feepayer_server.js` <a href="#4-3-check-feepayer_server-js" id="4-3-check-feepayer_server-js"></a>

Expand Down
3 changes: 1 addition & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ const config = {

i18n: {
defaultLocale: 'en',
locales: ['en'],
//locales: ['en', 'ko', 'zh-CN', 'zh-TW', 'vi'],
locales: ['en', 'ko', 'zh-CN', 'zh-TW', 'vi'],
path: 'i18n',
localeConfigs: {
'en': {
Expand Down

0 comments on commit c5a4bf2

Please sign in to comment.