From 8895ea7a45d5af192c938fa3718ca2ebc0460899 Mon Sep 17 00:00:00 2001 From: gagdiez Date: Tue, 23 Jan 2024 15:22:13 +0100 Subject: [PATCH] fix: removed deprecated methods from README --- README.md | 550 +----------------------------------------------------- 1 file changed, 1 insertion(+), 549 deletions(-) diff --git a/README.md b/README.md index c25c5380..a773138d 100644 --- a/README.md +++ b/README.md @@ -785,561 +785,13 @@ Transaction guest-book.testnet:FY8hBam2iyQfdHkdR1dp6w5XEPJzJSosX1wUeVPyUvVK --- -## Validators - -### `near validators current` - -> Displays details of current validators. -> -> - amount staked -> - number of seats -> - percentage of uptime -> - expected block production -> - blocks actually produced - -- arguments: `current` -- options: `default` - -**Example:** - -```bash -near validators current -``` - -**Example for `mainnet`:** - -```bash -NEAR_ENV=mainnet near validators current -``` - -
-Example Response -

- -```bash -Validators (total: 49, seat price: 1,976,588): -.--------------------------------------------------------------------------------------------------------------------. -| Validator Id | Stake | Seats | % Online | Blocks produced | Blocks expected | -|----------------------------------------------|------------|-------|----------|-----------------|-----------------| -| cryptium.poolv1.near | 13,945,727 | 7 | 100% | 1143 | 1143 | -| astro-stakers.poolv1.near | 11,660,189 | 5 | 100% | 817 | 817 | -| blockdaemon.poolv1.near | 11,542,867 | 5 | 76.74% | 627 | 817 | -| zavodil.poolv1.near | 11,183,187 | 5 | 100% | 818 | 818 | -| bisontrails.poolv1.near | 10,291,696 | 5 | 99.38% | 810 | 815 | -| dokiacapital.poolv1.near | 7,906,352 | 3 | 99.54% | 650 | 653 | -| chorusone.poolv1.near | 7,480,508 | 3 | 100% | 490 | 490 | -| figment.poolv1.near | 6,931,070 | 3 | 100% | 489 | 489 | -| stardust.poolv1.near | 6,401,678 | 3 | 100% | 491 | 491 | -| anonymous.poolv1.near | 6,291,821 | 3 | 97.55% | 479 | 491 | -| d1.poolv1.near | 6,265,109 | 3 | 100% | 491 | 491 | -| near8888.poolv1.near | 6,202,968 | 3 | 99.38% | 486 | 489 | -| rekt.poolv1.near | 5,950,212 | 3 | 100% | 490 | 490 | -| epic.poolv1.near | 5,639,256 | 2 | 100% | 326 | 326 | -| fresh.poolv1.near | 5,460,410 | 2 | 100% | 327 | 327 | -| buildlinks.poolv1.near | 4,838,398 | 2 | 99.38% | 325 | 327 | -| jubi.poolv1.near | 4,805,921 | 2 | 100% | 326 | 326 | -| openshards.poolv1.near | 4,644,553 | 2 | 100% | 326 | 326 | -| jazza.poolv1.near | 4,563,432 | 2 | 100% | 327 | 327 | -| northernlights.poolv1.near | 4,467,978 | 2 | 99.39% | 326 | 328 | -| inotel.poolv1.near | 4,427,152 | 2 | 100% | 327 | 327 | -| baziliknear.poolv1.near | 4,261,142 | 2 | 100% | 328 | 328 | -| stakesabai.poolv1.near | 4,242,618 | 2 | 100% | 326 | 326 | -| everstake.poolv1.near | 4,234,552 | 2 | 100% | 327 | 327 | -| stakin.poolv1.near | 4,071,704 | 2 | 100% | 327 | 327 | -| certusone.poolv1.near | 3,734,505 | 1 | 100% | 164 | 164 | -| lux.poolv1.near | 3,705,394 | 1 | 100% | 163 | 163 | -| staked.poolv1.near | 3,683,365 | 1 | 100% | 164 | 164 | -| lunanova.poolv1.near | 3,597,231 | 1 | 100% | 163 | 163 | -| appload.poolv1.near | 3,133,163 | 1 | 100% | 163 | 163 | -| smart-stake.poolv1.near | 3,095,711 | 1 | 100% | 164 | 164 | -| artemis.poolv1.near | 3,009,462 | 1 | 99.39% | 163 | 164 | -| moonlet.poolv1.near | 2,790,296 | 1 | 100% | 163 | 163 | -| nearfans.poolv1.near | 2,771,137 | 1 | 100% | 163 | 163 | -| nodeasy.poolv1.near | 2,692,745 | 1 | 99.39% | 163 | 164 | -| erm.poolv1.near | 2,653,524 | 1 | 100% | 164 | 164 | -| zkv_staketosupportprivacy.poolv1.near | 2,548,343 | 1 | 99.39% | 163 | 164 | -| dsrvlabs.poolv1.near | 2,542,925 | 1 | 100% | 164 | 164 | -| 08investinwomen_runbybisontrails.poolv1.near | 2,493,123 | 1 | 100% | 163 | 163 | -| electric.poolv1.near | 2,400,532 | 1 | 99.39% | 163 | 164 | -| sparkpool.poolv1.near | 2,378,191 | 1 | 100% | 163 | 163 | -| hashquark.poolv1.near | 2,376,424 | 1 | 100% | 164 | 164 | -| masternode24.poolv1.near | 2,355,634 | 1 | 100% | 164 | 164 | -| sharpdarts.poolv1.near | 2,332,398 | 1 | 99.38% | 162 | 163 | -| fish.poolv1.near | 2,315,249 | 1 | 100% | 163 | 163 | -| ashert.poolv1.near | 2,103,327 | 1 | 97.56% | 160 | 164 | -| 01node.poolv1.near | 2,058,200 | 1 | 100% | 163 | 163 | -| finoa.poolv1.near | 2,012,304 | 1 | 100% | 163 | 163 | -| majlovesreg.poolv1.near | 2,005,032 | 1 | 100% | 164 | 164 | -'--------------------------------------------------------------------------------------------------------------------' -``` - -

-
- ---- - -### `near validators next` - -> Displays details for the next round of validators. -> -> - total number of seats available -> - seat price -> - amount staked -> - number of seats assigned per validator - -- arguments: `next` -- options: `default` - -**Example:** - -```bash -near validators next -``` - -**Example for `mainnet`:** - -```bash -NEAR_ENV=mainnet near validators next -``` - -
-Example Response -

- -```bash -Next validators (total: 49, seat price: 1,983,932): -.----------------------------------------------------------------------------------------------. -| Status | Validator | Stake | Seats | -|----------|----------------------------------------------|--------------------------|-------| -| Rewarded | cryptium.poolv1.near | 13,945,727 -> 14,048,816 | 7 | -| Rewarded | astro-stakers.poolv1.near | 11,660,189 -> 11,704,904 | 5 | -| Rewarded | blockdaemon.poolv1.near | 11,542,867 -> 11,545,942 | 5 | -| Rewarded | zavodil.poolv1.near | 11,183,187 -> 11,204,123 | 5 | -| Rewarded | bisontrails.poolv1.near | 10,291,696 -> 10,297,923 | 5 | -| Rewarded | dokiacapital.poolv1.near | 7,906,352 -> 8,097,275 | 4 | -| Rewarded | chorusone.poolv1.near | 7,480,508 -> 7,500,576 | 3 | -| Rewarded | figment.poolv1.near | 6,931,070 -> 6,932,916 | 3 | -| Rewarded | stardust.poolv1.near | 6,401,678 -> 6,449,363 | 3 | -| Rewarded | anonymous.poolv1.near | 6,291,821 -> 6,293,497 | 3 | -| Rewarded | d1.poolv1.near | 6,265,109 -> 6,266,777 | 3 | -| Rewarded | near8888.poolv1.near | 6,202,968 -> 6,204,620 | 3 | -| Rewarded | rekt.poolv1.near | 5,950,212 -> 5,951,797 | 2 | -| Rewarded | epic.poolv1.near | 5,639,256 -> 5,640,758 | 2 | -| Rewarded | fresh.poolv1.near | 5,460,410 -> 5,461,811 | 2 | -| Rewarded | buildlinks.poolv1.near | 4,838,398 -> 4,839,686 | 2 | -| Rewarded | jubi.poolv1.near | 4,805,921 -> 4,807,201 | 2 | -| Rewarded | openshards.poolv1.near | 4,644,553 -> 4,776,692 | 2 | -| Rewarded | jazza.poolv1.near | 4,563,432 -> 4,564,648 | 2 | -| Rewarded | northernlights.poolv1.near | 4,467,978 -> 4,469,168 | 2 | -| Rewarded | inotel.poolv1.near | 4,427,152 -> 4,428,331 | 2 | -| Rewarded | baziliknear.poolv1.near | 4,261,142 -> 4,290,338 | 2 | -| Rewarded | stakesabai.poolv1.near | 4,242,618 -> 4,243,748 | 2 | -| Rewarded | everstake.poolv1.near | 4,234,552 -> 4,235,679 | 2 | -| Rewarded | stakin.poolv1.near | 4,071,704 -> 4,072,773 | 2 | -| Rewarded | certusone.poolv1.near | 3,734,505 -> 3,735,500 | 1 | -| Rewarded | lux.poolv1.near | 3,705,394 -> 3,716,381 | 1 | -| Rewarded | staked.poolv1.near | 3,683,365 -> 3,684,346 | 1 | -| Rewarded | lunanova.poolv1.near | 3,597,231 -> 3,597,836 | 1 | -| Rewarded | appload.poolv1.near | 3,133,163 -> 3,152,302 | 1 | -| Rewarded | smart-stake.poolv1.near | 3,095,711 -> 3,096,509 | 1 | -| Rewarded | artemis.poolv1.near | 3,009,462 -> 3,010,265 | 1 | -| Rewarded | moonlet.poolv1.near | 2,790,296 -> 2,948,565 | 1 | -| Rewarded | nearfans.poolv1.near | 2,771,137 -> 2,771,875 | 1 | -| Rewarded | nodeasy.poolv1.near | 2,692,745 -> 2,693,463 | 1 | -| Rewarded | erm.poolv1.near | 2,653,524 -> 2,654,231 | 1 | -| Rewarded | dsrvlabs.poolv1.near | 2,542,925 -> 2,571,865 | 1 | -| Rewarded | zkv_staketosupportprivacy.poolv1.near | 2,548,343 -> 2,549,022 | 1 | -| Rewarded | 08investinwomen_runbybisontrails.poolv1.near | 2,493,123 -> 2,493,787 | 1 | -| Rewarded | masternode24.poolv1.near | 2,355,634 -> 2,456,226 | 1 | -| Rewarded | fish.poolv1.near | 2,315,249 -> 2,415,831 | 1 | -| Rewarded | electric.poolv1.near | 2,400,532 -> 2,401,172 | 1 | -| Rewarded | sparkpool.poolv1.near | 2,378,191 -> 2,378,824 | 1 | -| Rewarded | hashquark.poolv1.near | 2,376,424 -> 2,377,057 | 1 | -| Rewarded | sharpdarts.poolv1.near | 2,332,398 -> 2,332,948 | 1 | -| Rewarded | ashert.poolv1.near | 2,103,327 -> 2,103,887 | 1 | -| Rewarded | 01node.poolv1.near | 2,058,200 -> 2,058,760 | 1 | -| Rewarded | finoa.poolv1.near | 2,012,304 -> 2,015,808 | 1 | -| Rewarded | majlovesreg.poolv1.near | 2,005,032 -> 2,005,566 | 1 | -'----------------------------------------------------------------------------------------------' -``` - -

-
- ---- - -### `near proposals` - -> Displays validator proposals for [epoch](http://docs.near.org/docs/concepts/epoch) after next. -> -> - expected seat price -> - status of proposals -> - previous amount staked and new amount that _will_ be staked -> - amount of seats assigned per validator - -- arguments: `none` -- options: `default` - -**Example:** - -```bash -near proposals -``` - -**Example for `mainnet`:** - -```bash -NEAR_ENV=mainnet near proposals -``` - -
-Example Response -

- -```bash -Proposals for the epoch after next (new: 51, passing: 49, expected seat price = 1,983,932) -.--------------------------------------------------------------------------------------------------------. -| Status | Validator | Stake => New Stake | Seats | -|--------------------|----------------------------------------------|--------------------------|-------| -| Proposal(Accepted) | cryptium.poolv1.near | 13,945,727 => 14,041,766 | 7 | -| Proposal(Accepted) | astro-stakers.poolv1.near | 11,660,189 => 11,705,673 | 5 | -| Proposal(Accepted) | blockdaemon.poolv1.near | 11,542,867 => 11,545,942 | 5 | -| Proposal(Accepted) | zavodil.poolv1.near | 11,183,187 => 11,207,805 | 5 | -| Proposal(Accepted) | bisontrails.poolv1.near | 10,291,696 => 10,300,978 | 5 | -| Proposal(Accepted) | dokiacapital.poolv1.near | 7,906,352 => 8,097,275 | 4 | -| Proposal(Accepted) | chorusone.poolv1.near | 7,480,508 => 7,568,268 | 3 | -| Proposal(Accepted) | figment.poolv1.near | 6,931,070 => 6,932,916 | 3 | -| Proposal(Accepted) | stardust.poolv1.near | 6,401,678 => 6,449,363 | 3 | -| Proposal(Accepted) | anonymous.poolv1.near | 6,291,821 => 6,293,497 | 3 | -| Proposal(Accepted) | d1.poolv1.near | 6,265,109 => 6,266,777 | 3 | -| Proposal(Accepted) | near8888.poolv1.near | 6,202,968 => 6,204,620 | 3 | -| Proposal(Accepted) | rekt.poolv1.near | 5,950,212 => 5,951,797 | 2 | -| Proposal(Accepted) | epic.poolv1.near | 5,639,256 => 5,640,758 | 2 | -| Proposal(Accepted) | fresh.poolv1.near | 5,460,410 => 5,461,811 | 2 | -| Proposal(Accepted) | buildlinks.poolv1.near | 4,838,398 => 4,839,686 | 2 | -| Proposal(Accepted) | jubi.poolv1.near | 4,805,921 => 4,807,201 | 2 | -| Proposal(Accepted) | openshards.poolv1.near | 4,644,553 => 4,776,692 | 2 | -| Proposal(Accepted) | jazza.poolv1.near | 4,563,432 => 4,564,648 | 2 | -| Proposal(Accepted) | northernlights.poolv1.near | 4,467,978 => 4,469,168 | 2 | -| Proposal(Accepted) | inotel.poolv1.near | 4,427,152 => 4,428,331 | 2 | -| Proposal(Accepted) | baziliknear.poolv1.near | 4,261,142 => 4,290,891 | 2 | -| Proposal(Accepted) | stakesabai.poolv1.near | 4,242,618 => 4,243,748 | 2 | -| Proposal(Accepted) | everstake.poolv1.near | 4,234,552 => 4,235,679 | 2 | -| Proposal(Accepted) | stakin.poolv1.near | 4,071,704 => 4,072,773 | 2 | -| Proposal(Accepted) | certusone.poolv1.near | 3,734,505 => 3,735,500 | 1 | -| Proposal(Accepted) | lux.poolv1.near | 3,705,394 => 3,716,381 | 1 | -| Proposal(Accepted) | staked.poolv1.near | 3,683,365 => 3,684,346 | 1 | -| Proposal(Accepted) | lunanova.poolv1.near | 3,597,231 => 3,597,836 | 1 | -| Proposal(Accepted) | appload.poolv1.near | 3,133,163 => 3,152,302 | 1 | -| Proposal(Accepted) | smart-stake.poolv1.near | 3,095,711 => 3,096,509 | 1 | -| Proposal(Accepted) | artemis.poolv1.near | 3,009,462 => 3,010,265 | 1 | -| Proposal(Accepted) | moonlet.poolv1.near | 2,790,296 => 2,948,565 | 1 | -| Proposal(Accepted) | nearfans.poolv1.near | 2,771,137 => 2,771,875 | 1 | -| Proposal(Accepted) | nodeasy.poolv1.near | 2,692,745 => 2,693,463 | 1 | -| Proposal(Accepted) | erm.poolv1.near | 2,653,524 => 2,654,231 | 1 | -| Proposal(Accepted) | dsrvlabs.poolv1.near | 2,542,925 => 2,571,865 | 1 | -| Proposal(Accepted) | zkv_staketosupportprivacy.poolv1.near | 2,548,343 => 2,549,022 | 1 | -| Proposal(Accepted) | 08investinwomen_runbybisontrails.poolv1.near | 2,493,123 => 2,493,787 | 1 | -| Proposal(Accepted) | masternode24.poolv1.near | 2,355,634 => 2,456,226 | 1 | -| Proposal(Accepted) | fish.poolv1.near | 2,315,249 => 2,415,831 | 1 | -| Proposal(Accepted) | electric.poolv1.near | 2,400,532 => 2,401,172 | 1 | -| Proposal(Accepted) | sparkpool.poolv1.near | 2,378,191 => 2,378,824 | 1 | -| Proposal(Accepted) | hashquark.poolv1.near | 2,376,424 => 2,377,057 | 1 | -| Proposal(Accepted) | sharpdarts.poolv1.near | 2,332,398 => 2,332,948 | 1 | -| Proposal(Accepted) | ashert.poolv1.near | 2,103,327 => 2,103,887 | 1 | -| Proposal(Accepted) | 01node.poolv1.near | 2,058,200 => 2,059,314 | 1 | -| Proposal(Accepted) | finoa.poolv1.near | 2,012,304 => 2,015,808 | 1 | -| Proposal(Accepted) | majlovesreg.poolv1.near | 2,005,032 => 2,005,566 | 1 | -| Proposal(Declined) | huobipool.poolv1.near | 1,666,976 | 0 | -| Proposal(Declined) | hb436_pool.poolv1.near | 500,030 | 0 | -'--------------------------------------------------------------------------------------------------------' - -``` - -

-
- ---- - -## JS Contracts Enclave - -### `near js` -You can use `near js ` to be able to interact with JS enclaved contracts. Run `near js --help` for instructions. An optional `--jsvm ` argument can be supplied to the following `js` subcommands to point to a different JSVM enclave contract. The default is set to `jsvm.testnet` and `jsvm.near` respectively for testnet and mainnet. Note that anything changing state in the enclave will require a deposit to maintain storage of either the contract bytes or the state of the contract itself. - -### `near js deploy` - -> Deploys a smart contract to a given accountId on the JSVM enclave. - -- arguments: `accountId`, `base64File`, `deposit` -- options: `jsvm` - -**Note:** You will need a full access key for the account you are deploying the contract to. ([`near login`](http://docs.near.org/docs/tools/near-cli#near-login)) - - -**Example:** - -```bash -near deploy --accountId example-contract.testnet --base64File out/example.base64 --deposit 0.1 -``` - -
-Example Response -

- - Starting deployment. Account id: example-contract.testnet, node: https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file: out/example.base64, JSVM: jsvm.testnet - Transaction Id 4Nxsszgh2LaXPZph37peZKDqPZeJEErPih6n4jWcGDEB - To see the transaction in the transaction explorer, please open this url in your browser - https://testnet.nearblocks.io/txns/4Nxsszgh2LaXPZph37peZKDqPZeJEErPih6n4jWcGDEB - Done deploying to example-contract.testnet - -

-
- - -### `near js dev-deploy` - -> Creates a development account and deploys a smart contract to the enclave associated to the dev-account. No access keys needed. **_(`testnet` only)_** - -- arguments: `base64File` `deposit` -- options: `jsvm` - -**Example:** - -```bash -near js dev-deploy --base64File out/example.base64 --deposit 0.1 -``` - -
-Example Response -

- - Starting deployment. Account id: dev-1653005231830-15694723179173, node: https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file: out/example.base64, JSVM: jsvm.testnet - Transaction Id FTVd4TKzy9mrmWvok6qHaoX68cVZnUJp2VqUgH6Y446n - To see the transaction in the transaction explorer, please open this url in your browser - https://testnet.nearblocks.io/txns/FTVd4TKzy9mrmWvok6qHaoX68cVZnUJp2VqUgH6Y446n - Done deploying to dev-1653005231830-15694723179173 - -

-
- -### `near js call` - -> makes a contract call which can modify _or_ view state into the JSVM enclase - -**Note:** Contract calls require a transaction fee (gas) so you will need an access key for the `--accountId` that will be charged. ([`near login`](http://docs.near.org/docs/tools/near-cli#near-login)) - -- arguments: `contractName` `methodName` `{ args }` `--accountId` `--deposit` -- options: `--gas` `--jsvm` - -**Example:** - -```bash -near js call dev-1653005231830-15694723179173 set_status '["hello world"]' --deposit 0.1 --account-id dev-1653005231830-15694723179173 -``` - -
-Example Response -

- - Scheduling a call in JSVM[jsvm.testnet]: dev-1653005231830-15694723179173.set_status(["hello world"]) with attached 0.1 NEAR - Receipts: 5QUuNwSYrDcEPKuSnU7fKN7YCGfXmdmZR9m3zUSTek7P, 3YU4eFhqBruc4z8KKLZr1U1oY31A6Bfks45GLA2rq5GS - Log [jsvm.testnet]: dev-1653005231830-15694723179173 set_status with message hello world - Transaction Id sP8s9REgK9YcZzkudyccg8R968zYWDVGCNv4wxeZsUe - To see the transaction in the transaction explorer, please open this url in your browser - https://testnet.nearblocks.io/txns/sP8s9REgK9YcZzkudyccg8R968zYWDVGCNv4wxeZsUe - '' - -

-
- -### `near js view` - -> Makes a contract call which can **only** view state. _(Call is free of charge and does not require deposit)_ - -- arguments: `contractName` `method_name` `{ args }` -- options: `jsvm` - -**Example:** - -```bash -near js view dev-1653005231830-15694723179173 get_status '["dev-1653005231830-15694723179173"]' --accountId dev-1653005231830-15694723179173 -``` - -
-Example Response -

- - View call in JSVM[jsvm.testnet]: dev-1653005231830-15694723179173.get_status(["dev-1653005231830-15694723179173"]) - Log [jsvm.testnet]: get_status for account_id dev-1653005231830-15694723179173 - 'hello world' - -

-
- -### `near js remove` - -> Removes the contract on the JS enclase and refunds all the deposit to the actual account. - -- arguments: `accountId` -- options: `jsvm` - -```bash -near js remove --accountId dev-1653005231830-15694723179173 -``` - -
-Example Response -

- - Removing contract from enclave. Account id: dev-1653005231830-15694723179173, JSVM: jsvm.testnet - Transaction Id FGSfvoWmhS1fWb6ckpPMYvc7seNaGQ5MU7iSrY43ZWiG - To see the transaction in the transaction explorer, please open this url in your browser - https://testnet.nearblocks.io/txns/FGSfvoWmhS1fWb6ckpPMYvc7seNaGQ5MU7iSrY43ZWiG - -

-
- -## REPL - -### `near repl` - -> Launches NEAR [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) _(an interactive JavaScript programming invironment)_ connected to NEAR. - -- arguments: `none` -- options: `--accountId`, `--script` - -To launch, run: - -```bash -near repl -``` - -- You will then be shown a prompt `>` and can begin interacting with NEAR. -- Try typing the following into your prompt that converts NEAR (Ⓝ) into yoctoNEAR (10^-24): - -```bash -nearAPI.utils.format.parseNearAmount('1000') -``` - -> You can also use an `--accountId` with `near repl`. - -The `script` argument allows you to pass the path to a javascript/typescript file that exports a `main` function taking a [`Context`](./context/index.d.ts) as an argument. Anything passed after `--` is passed to the script as the `argv` argument. - -Note: you will need to add `near-cli` as a dependency in order to import the types. - -e.g. - -```ts -import { Context } from "near-cli/context"; -``` - -**Example:** - -```bash -near repl --accountId example-acct.testnet -``` - -- Then try console logging `account` after the `>` prompt. - -```bash -> console.log(account) -``` - -Or in a JS files -```bash -near repl --accountId example-acct.testnet --script print_account.js -``` - -```js -module.exports.main = async function main({account, near, nearAPI, argv}) { - console.log(account); -} -``` - -or TS - -```bash -near repl --accountId example-acct.testnet --script print_account.ts -``` - -```js -import { Context } from "near-cli/context" - -export async function main({account, near, nearAPI, argv}: Context) { - console.log(account); -} -``` - - -
-Example Response -

- -```json -Account { - accessKeyByPublicKeyCache: {}, - connection: Connection { - networkId: 'default', - provider: JsonRpcProvider { connection: [Object] }, - signer: InMemorySigner { keyStore: [MergeKeyStore] } - }, - accountId: 'example-acct.testnet', - _ready: Promise { undefined }, - _state: { - amount: '98786165075093615800000000', - locked: '0', - code_hash: '11111111111111111111111111111111', - storage_usage: 741, - storage_paid_at: 0, - block_height: 21661252, - block_hash: 'HbAj25dTzP3ssYjNRHov9BQ72UxpHGVqZK1mZwGdGNbo' - } -} -``` - -

-
- -> You can also get a private key's public key. - -- First, declare a `privateKey` variable: - -```js -const myPrivateKey = - "3fKM9Rr7LHyzhhzmmedXLvc59rayfh1oUYS3VfUcxwpAFQZtdx1G9aTY6i8hG9mQtYoycTEFTBtatgNKHRtYamrS"; -``` - -- Then run: - -```js -nearAPI.KeyPair.fromString(myPrivateKey).publicKey.toString(); -``` - -With NEAR REPL you have complete access to [`near-api-js`](https://github.com/near/near-api-js) to help you develop on the NEAR platform. - ---- - -## Options +## Global Options | Option | Description | |-----------------------------|-------------------------------------------------------------------------------------------------| | `--help` | Show help [boolean] | | `--version` | Show version number [boolean] | -| `--nodeUrl, --node_url` | NEAR node URL [string] [default: "https://rpc.testnet.near.org"] | -| `--networkId, --network_id` | NEAR network ID, allows using different keys based on network [string] [default: "testnet"] | -| `--helperUrl` | NEAR contract helper URL [string] | -| `--keyPath` | Path to master account key [string] | -| `--accountId, --account_id` | Unique identifier for the account [string] | -| `--useLedgerKey` | Use Ledger for signing with given HD key path [string] [default: "44'/397'/0'/0'/1'"] | -| `--seedPhrase` | Seed phrase mnemonic [string] | -| `--seedPath` | HD path derivation [string] [default: "m/44'/397'/0'"] | -| `--walletUrl` | Website for NEAR Wallet [string] | -| `--contractName` | Account name of contract [string] | -| `--masterAccount` | Master account used when creating new accounts [string] | -| `--helperAccount` | Expected top-level account for a network [string] | | `-v, --verbose` | Prints out verbose output [boolean] [default: false] | -| `-f, --force` | Forcefully execute the desired action even if it is unsafe to do so [boolean] [default: false] | - > Got a question? Ask it on StackOverflow!