From d66c789f104958e494b0bd4e71bf9c3364ab04bb Mon Sep 17 00:00:00 2001 From: narendracode Date: Thu, 27 Jan 2022 12:33:48 +0800 Subject: [PATCH 1/3] updated page links --- README.md | 46 +++++++++++++++++----------------- TERMS-OF-USE.md | 2 +- packages/caver-rpc/src/klay.js | 42 +++++++++++++++---------------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 1b9a3cfa..f335d67d 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ You can add the keyring object created in the above example to the caver.wallet, ``` ### Submitting a Transaction -You can use caver-js to submit various types of transactions to a node. Please refer to the [caver.transaction](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.transaction/#class) to see how to create a transaction of each type. +You can use caver-js to submit various types of transactions to a node. Please refer to the [caver.transaction](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.transaction/#class) to see how to create a transaction of each type. You can sign the transaction using a keyring and send a signed transaction through `caver.rpc.klay.sendRawTransaction` as shown below, and the receipt is returned as a result. ``` @@ -206,24 +206,24 @@ caver-js provides the caver.utils.convertToPeb function for unit conversion. Ple ## Documentation -Documentation can be found at [Klaytn Docs-caver-js](https://docs.klaytn.com/bapp/sdk/caver-js). +Documentation can be found at [Klaytn Docs-caver-js](https://docs.klaytn.com/dapp/sdk/caver-js). ## API Specification The API lists of caver-js are described in folloinwg links: -* [caver.account](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.account) -* [caver.wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) -* [caver.wallet.keyring](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet/keyring) -* [caver.transaction](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.transaction) -* [caver.rpc.klay](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.rpc/klay) -* [caver.rpc.net](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.rpc/net) -* [caver.contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract) -* [caver.abi](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.abi) -* [caver.kct.kip7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) -* [caver.kct.kip17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) -* [caver.utils](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.utils) -* [caver.ipfs](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.ipfs) +* [caver.account](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.account) +* [caver.wallet](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet) +* [caver.wallet.keyring](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring) +* [caver.transaction](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.transaction) +* [caver.rpc.klay](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.rpc/klay) +* [caver.rpc.net](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.rpc/net) +* [caver.contract](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.contract) +* [caver.abi](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.abi) +* [caver.kct.kip7](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.kct/kip7) +* [caver.kct.kip17](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.kct/kip17) +* [caver.utils](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.utils) +* [caver.ipfs](https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.ipfs) ## Web3.js Similarity @@ -299,8 +299,8 @@ The meaning of error code can be found below: The BApp (Blockchain Application) Development sample projects using caver-js are the following: -* [Count BApp](https://docs.klaytn.com/bapp/tutorials/count-bapp) -* [Klaystagram](https://docs.klaytn.com/bapp/tutorials/klaystagram) +* [Count BApp](https://docs.klaytn.com/dapp/tutorials/count-bapp) +* [Klaystagram](https://docs.klaytn.com/dapp/tutorials/klaystagram) ## Trouble shooting and known issues @@ -362,10 +362,10 @@ More information on using react-app-rewired with create-react-app can be found [ [caver-java](https://github.com/klaytn/caver-java) for Java -[Keyring]: https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet/keyring -[caver.wallet.keyring]: https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet/keyring -[wallet]: https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet -[caver.wallet]: https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet -[SingleKeyring]: https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet/keyring#singlekeyring -[MultipleKeyring]: https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet/keyring#multiplekeyring -[RoleBasedKeyring]: https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet/keyring#rolebasedkeyring +[Keyring]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring +[caver.wallet.keyring]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring +[wallet]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet +[caver.wallet]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet +[SingleKeyring]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring#singlekeyring +[MultipleKeyring]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring#multiplekeyring +[RoleBasedKeyring]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring#rolebasedkeyring diff --git a/TERMS-OF-USE.md b/TERMS-OF-USE.md index db9405b0..2c8e8b21 100644 --- a/TERMS-OF-USE.md +++ b/TERMS-OF-USE.md @@ -10,7 +10,7 @@ These Terms shall be applied to users installing and utilizing the Software incl ## 3. Services provided by the Software -The Software provides users with services which enable them to interact with Klaytn blockchain and users may refer to details of such services at Klaytn docs (https://docs.klaytn.com/bapp/sdk/caver-js). +The Software provides users with services which enable them to interact with Klaytn blockchain and users may refer to details of such services at Klaytn docs (https://docs.klaytn.com/dapp/sdk/caver-js). ## 4. Software use and installation diff --git a/packages/caver-rpc/src/klay.js b/packages/caver-rpc/src/klay.js index 7a1b86dd..ab6fc576 100644 --- a/packages/caver-rpc/src/klay.js +++ b/packages/caver-rpc/src/klay.js @@ -51,14 +51,14 @@ class Klay { // overwrite package setRequestManager const setRequestManager = this.setRequestManager - this.setRequestManager = function(manager) { + this.setRequestManager = function (manager) { setRequestManager(manager) return true } // overwrite setProvider const setProvider = this.setProvider - this.setProvider = function(...arg) { + this.setProvider = function (...arg) { setProvider.apply(_this, arg) _this.setRequestManager(_this._requestManager) } @@ -323,7 +323,7 @@ class Klay { ] AbstractTransaction._klaytnCall = {} Validator._klaytnCall = {} - _.each(_klaytnCall, function(method) { + _.each(_klaytnCall, function (method) { method = new Method(method) method.attachToObject(AbstractTransaction._klaytnCall) method.attachToObject(Validator._klaytnCall) @@ -620,10 +620,10 @@ class Klay { }), /** * Generates signed data specific to the Klaytn. - * Refer to {@link https://docs.klaytn.com/bapp/json-rpc/api-references/klay/account#klay_sign|Klaytn Platform API - klay_sign} to know how the signature is generated + * Refer to {@link https://docs.klaytn.com/dapp/json-rpc/api-references/klay/account#klay_sign|Klaytn Platform API - klay_sign} to know how the signature is generated * - * This API provides the function to sign a message using an {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. - * The imported account in your node must be {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign the message. + * This API provides the function to sign a message using an {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. + * The imported account in your node must be {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign the message. * To sign a transaction with imported account in your Klaytn node, use {@link signTransaction|caver.rpc.klay.signTransaction}. * * @memberof Klay @@ -1242,7 +1242,7 @@ class Klay { * const result = await caver.rpc.klay.getStorageAt('0x407d73d8a49eeb85d32cf465507dd71d507100c1') * * @param {string} address The address to get the storage from. - * @param {number} position The index position of the storage. For more information on calculating the position, refer to {@link https://docs.klaytn.com/bapp/json-rpc/api-references/klay/block#klay_getstorageat|klay_getStorageAt}. + * @param {number} position The index position of the storage. For more information on calculating the position, refer to {@link https://docs.klaytn.com/dapp/json-rpc/api-references/klay/block#klay_getstorageat|klay_getStorageAt}. * @param {string|number} [blockNumber] A block number, or the string `latest` or `earliest`. If omitted, `latest` will be used. * @param {function} [callback] Optional callback, returns an error object as the first parameter and the result as the second. * @return {Promise} The value at this storage position. @@ -1625,8 +1625,8 @@ class Klay { /** * Signs a transaction as a transaction `sender` with an "imported account's private key" in your Klaytn Node and propagates the transaction to the Klaytn. * - * This API provides the function to sign a transaction using an {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. - * The imported account in your node must be {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign a transaction. + * This API provides the function to sign a transaction using an {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. + * The imported account in your node must be {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign a transaction. * * @memberof Klay * @method sendTransaction @@ -1656,8 +1656,8 @@ class Klay { * * Before using sendTransaction as a fee payer, the transaction sender must have signed with valid signature(s) and the `nonce` must have been defined. * - * This API provides the function to sign a transaction using an {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. - * The imported account in your node must be {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign a transaction. + * This API provides the function to sign a transaction using an {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. + * The imported account in your node must be {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign a transaction. * * @memberof Klay * @method sendTransactionAsFeePayer @@ -1724,8 +1724,8 @@ class Klay { /** * Signs a transaction as a transaction sender with an "imported account's private key" in your Klaytn Node. * - * This API provides the function to sign a transaction using an {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. - * The imported account in your node must be {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign a transaction. + * This API provides the function to sign a transaction using an {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. + * The imported account in your node must be {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign a transaction. * * @memberof Klay * @method signTransaction @@ -1753,8 +1753,8 @@ class Klay { /** * Signs a transaction as a transaction fee payer with an "imported account's private key" in your Klaytn Node. * - * This API provides the function to sign a transaction using an {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. - * The imported account in your node must be {@link https://docs.klaytn.com/bapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign a transaction. + * This API provides the function to sign a transaction using an {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_importrawkey|imported account} in your Klaytn node. + * The imported account in your node must be {@link https://docs.klaytn.com/dapp/json-rpc/api-references/personal#personal_unlockaccount|unlocked} to sign a transaction. * * @memberof Klay * @method signTransactionAsFeePayer @@ -2042,7 +2042,7 @@ class Klay { * To check if the state has changed, call {@link Klay#getFilterChanges|caver.rpc.klay.getFilterChanges}. * To obtain all logs matching the filter created by `newFilter`, call {@link Klay#getFilterLogs|caver.rpc.klay.getFilterLogs}. * - * For detailed information about the topics in the filter object, please see {@link https://docs.klaytn.com/bapp/json-rpc/api-references/klay/filter#klay_newfilter|Klaytn Platform API - klay_newFilter}. + * For detailed information about the topics in the filter object, please see {@link https://docs.klaytn.com/dapp/json-rpc/api-references/klay/filter#klay_newfilter|Klaytn Platform API - klay_newFilter}. * * @memberof Klay * @method newFilter @@ -2147,7 +2147,7 @@ class Klay { logs: { params: 1, inputFormatter: [formatters.inputLogFormatter], - subscriptionHandler: function(output) { + subscriptionHandler: function (output) { this.emit('data', output) if (_.isFunction(this.callback)) { @@ -2157,7 +2157,7 @@ class Klay { }, syncing: { params: 0, - subscriptionHandler: function(output) { + subscriptionHandler: function (output) { const _this = this /* eslint-disable-line no-shadow */ // fire TRUE at start @@ -2169,7 +2169,7 @@ class Klay { this.callback(null, _this._isSyncing, this) } - setTimeout(function() { + setTimeout(function () { _this.emit('data', output) if (_.isFunction(_this.callback)) { @@ -2186,7 +2186,7 @@ class Klay { // wait for some time before fireing the FALSE clearTimeout(this._isSyncingTimeout) - this._isSyncingTimeout = setTimeout(function() { + this._isSyncingTimeout = setTimeout(function () { if (output.currentBlock > output.highestBlock - 200) { _this._isSyncing = false _this.emit('changed', _this._isSyncing) @@ -2203,7 +2203,7 @@ class Klay { }), ] - methods.forEach(function(method) { + methods.forEach(function (method) { method.attachToObject(_this) method.setRequestManager(_this._requestManager) }) From 9f2ca29bb7579bd5f583de4eab326c226c4d237e Mon Sep 17 00:00:00 2001 From: narendracode Date: Thu, 27 Jan 2022 13:01:53 +0800 Subject: [PATCH 2/3] fix linting --- packages/caver-rpc/src/klay.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/caver-rpc/src/klay.js b/packages/caver-rpc/src/klay.js index ab6fc576..a8518bc3 100644 --- a/packages/caver-rpc/src/klay.js +++ b/packages/caver-rpc/src/klay.js @@ -51,14 +51,14 @@ class Klay { // overwrite package setRequestManager const setRequestManager = this.setRequestManager - this.setRequestManager = function (manager) { + this.setRequestManager = function(manager) { setRequestManager(manager) return true } // overwrite setProvider const setProvider = this.setProvider - this.setProvider = function (...arg) { + this.setProvider = function(...arg) { setProvider.apply(_this, arg) _this.setRequestManager(_this._requestManager) } @@ -323,7 +323,7 @@ class Klay { ] AbstractTransaction._klaytnCall = {} Validator._klaytnCall = {} - _.each(_klaytnCall, function (method) { + _.each(_klaytnCall, function(method) { method = new Method(method) method.attachToObject(AbstractTransaction._klaytnCall) method.attachToObject(Validator._klaytnCall) @@ -2147,7 +2147,7 @@ class Klay { logs: { params: 1, inputFormatter: [formatters.inputLogFormatter], - subscriptionHandler: function (output) { + subscriptionHandler: function(output) { this.emit('data', output) if (_.isFunction(this.callback)) { @@ -2157,7 +2157,7 @@ class Klay { }, syncing: { params: 0, - subscriptionHandler: function (output) { + subscriptionHandler: function(output) { const _this = this /* eslint-disable-line no-shadow */ // fire TRUE at start @@ -2169,7 +2169,7 @@ class Klay { this.callback(null, _this._isSyncing, this) } - setTimeout(function () { + setTimeout(function() { _this.emit('data', output) if (_.isFunction(_this.callback)) { @@ -2186,7 +2186,7 @@ class Klay { // wait for some time before fireing the FALSE clearTimeout(this._isSyncingTimeout) - this._isSyncingTimeout = setTimeout(function () { + this._isSyncingTimeout = setTimeout(function() { if (output.currentBlock > output.highestBlock - 200) { _this._isSyncing = false _this.emit('changed', _this._isSyncing) @@ -2203,7 +2203,7 @@ class Klay { }), ] - methods.forEach(function (method) { + methods.forEach(function(method) { method.attachToObject(_this) method.setRequestManager(_this._requestManager) }) From 7e8a4d81a3a3fe8c857d6931f5b1e116f7f8a2e1 Mon Sep 17 00:00:00 2001 From: narendracode Date: Fri, 28 Jan 2022 09:38:52 +0800 Subject: [PATCH 3/3] made small change in readme file to re-trigger ci --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f335d67d..5568121d 100644 --- a/README.md +++ b/README.md @@ -368,4 +368,4 @@ More information on using react-app-rewired with create-react-app can be found [ [caver.wallet]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet [SingleKeyring]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring#singlekeyring [MultipleKeyring]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring#multiplekeyring -[RoleBasedKeyring]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring#rolebasedkeyring +[RoleBasedKeyring]: https://docs.klaytn.com/dapp/sdk/caver-js/api-references/caver.wallet/keyring#rolebasedkeyring \ No newline at end of file