bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 33쪽 중 5쪽
------------ |
| [Sentio](https://app.sentio.xyz/) | [https://rpc.sentio.xyz/movement/v1](https://rpc.sentio.xyz/movement/v1) |
| [Hello Moon (API Key Required)](https://www.hellomoon.io/) | [https://movement.hellomoon.io/v1](https://movement.hellomoon.io/v1) |
| [BlockPi](https://blockpi.io/) | [https://movement.blockpi.network/rpc/v1/public/v1](https://movement.blockpi.network/rpc/v1/public/v1) |
| [Lava Network](https://www.lavanet.xyz/) | [https://movement.lava.build/](https://movement.lava.build/) |
| [Ankr](https://www.ankr.com/) | [https://rpc.ankr.com/http/movement\_mainnet/v1](https://rpc.ankr.com/http/movement_mainnet/v1) |
#### Partner Indexers
| Name | Indexer Endpoint |
| --------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [Sentio](https://app.sentio.xyz/) | [https://rpc.sentio.xyz/movement-indexer/v1/graphql](https://rpc.sentio.xyz/movement-indexer/v1/graphql) |
## Movement Testnet
**Chain ID: 250**
| Service | URL |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| RPC | [https://testnet.movementnetwork.xyz/v1](https://testnet.movementnetwork.xyz/v1) |
| Faucet endpoint | [https://faucet.testnet.movementnetwork.xyz/](https://faucet.testnet.movementnetwork.xyz/) |
| Faucet UI | [https://faucet.movementnetwork.xyz/](https://faucet.movementnetwork.xyz/) |
| Explorer | [https://explorer.movementnetwork.xyz/?network=bardock+testnet](https://explorer.movementnetwork.xyz/?network=bardock+testnet) |
| Indexer Explorer | [Explorer](https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.testnet.movementnetwork.xyz%2Fv1%2Fgraphql) |
| Indexer Endpoint | [https://hasura.testnet.movementnetwork.xyz/v1/graphql](https://hasura.testnet.movementnetwork.xyz/v1/graphql) |
## Network Properties
| | Testnet |
| -------------------- | ------------------------------------------------------------------------------- |
| Validators | Move Industries operated validators |
| Full Nodes | Permissionless + Move Industries operated nodes |
| Data Durability | Data wipes will be announced ahead of time. |
| Announcement Channel | [Discord](https://discord.com/channels/1101576619493167217/1259638014184001668) |
| Network Uptime | Constant uptime. |
# Oracles
URL: /devs/oracles
This document explains how to use real-time data from [Pyth Network](https://www.pyth.network/) in modules on the Movement Bardock testnet.
## Configuring the Move.toml file
Add the Pyth Contract to your project dependencies in the Move.toml file like so:
```
[dependencies]
Pyth = { git = "https://github.com/pyth-network/pyth-crosschain.git", subdir = "target_chains/aptos/contracts", rev = "main" }
```
The named addresses of `pyth`, `wormhole`, and `deployer` must be defined at compile time. These addresses are used to interact with the Pyth contract on Movement.
The Pyth smart contracts are deployed on the Movement Network on the following addresses:
| Name | Address |
| -------- | ------------------------------------------------------------------ |
| pyth | 0x9357e76fe965c9956a76181ee49f66d51b7f9c3800182a944ed96be86301e49f |
| wormhole | 0x9236893d6444b208b7e0b3e8d4be4ace90b6d17817ab7d1584e46a33ef5c50c9 |
| deployer | 0xa3ad2d9c8114b9a4fe97d45b7a9d3c731148d936b0f5dd396fc20a53a11a70da |
## Example Code
The code snippet below provides an example module fetching the BTC/USD price from Pyth price feeds:
```rust
module example::example {
use pyth::pyth;
use pyth::price::Price;
use pyth::price_identifier;
use aptos_framework::coin;
// Add the pyth_price_update argument to any method on your contract that needs to read the Pyth price.
// See https://docs.pyth.network/price-feeds/fetch-price-updates for more information on how to fetch the pyth_price_update.
public fun get_btc_usd_price(user: &signer, pyth_price_update: vector<vector<u8>>): Price {
// First update the Pyth price feeds
let coins = coin::withdraw(user, pyth::get_update_fee(&pyth_price_update));
pyth::update_price_feeds(pyth_price_update, coins);
// Read the current price from a price feed.
// Each price feed (e.g., BTC/USD) is identified by a price feed ID.
// The complete list of feed IDs is available at https://pyth.network/developers/price-feed-ids
// Note: Aptos uses the Pyth price feed ID without the `0x` prefix.
let btc_price_identifier = x"e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43";
let btc_usd_price_id = price_identifier::from_byte_vec(btc_price_identifier);
pyth::get_price(btc_usd_price_id)
}
}
```
The code snippet above does the following:
1. Call `pyth::get_update_fee` to get the fee required to update the Pyth price feeds.
2. Call `pyth::update_price_feeds` and pass pyth\_price\_update to update the Pyth price feeds.
3. Call `pyth::get_price to read` the current price, providing the price feed ID you wish to read.
## API Reference
The Pyth contract exposes a complete API for reading and updating price feeds; the Pyth Aptos integration is also compatible with Movement.
## Example Applications
[Minimal on-chain contract](https://github.com/pyth-network/pyth-examples/blob/main/price_feeds/aptos/fetch_btc_price/sources/example.move), which updates and returns the BTC/USD price from Pyth price feeds.
[Mint NFT](https://github.com/pyth-network/pyth-examples/tree/main/price_feeds/aptos/mint_nft), which uses Pyth price feeds to mint an NFT.
# Templates and Other Docs
URL: /devs/templates
Below you can find a list of templates and documentations for Wallet SDKs from many of our partnered wallets. In some cases you will have full templates for you to start from that can auto detect any Aptos Wallets, in other cases you will have documentation for you to implement their specific SDK into your dApp.
<Cards>
<MovementCard href="https://www.okx.com/web3/build/docs/sdks/app-connect-aptos" title="OKX Connect">
OKX Connect Documentation
</MovementCard>
<MovementCard href="https://movement-web3-template.nightly.app/" title="Nightly Connect">
Starter Template for Nightly Connect
</MovementCard>
</Cards>
# Getting Started
URL: /general
<Cards>
<MovementCard href="/general/l1/move-language" title="Why Move?">
High level overview of the Move Language
</MovementCard>
<MovementCard href="/general/networks/mainnet" title="Architecture">
How the Movement Network functions
</MovementCard>
<MovementCard href="/devs" title="Developers">
Start building apps on the Movement Network
</MovementCard>
<MovementCard href="/devs/firstMoveContract" title="Move Contracts">
Build your first Move Module
</MovementCard>
<MovementCard href="https://faucet.movementnetwork.xyz/" title="Faucet">
Get Testnet tokens
</MovementCard>
<MovementCard href="https://explorer.movementnetwork.xyz/" title="Explorer">
Our Block Explorer
</MovementCard>
</Cards>
# Encode submission
URL: /api/node/encode_submission
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
This endpoint accepts an EncodeSubmissionRequest, which internally is a
UserTransactionRequestInner (and optionally secondary signers) encoded
as JSON, validates the request format, and then returns that request
encoded in BCS. The client can then use this to create a transaction
signature to be used in a SubmitTransactionRequest, which it then
passes to the /transactions POST endpoint.
To be clear, this endpoint makes it possible to submit transaction
requests to the API from languages that do not have library support for
BCS. If you are using an SDK that has BCS support, such as the official
Rust, TypeScript, or Python SDKs, you do not need to use this endpoint.
To sign a message using the response from this endpoint:
* Decode the hex encoded string in the response to bytes.
* Sign the bytes to create the signature.
* Use that as the signature field in something like Ed25519Signature, which you then use to build a TransactionSignature.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/transactions/encode_submission","method":"post"}]} webhooks={[]} hasHead={false} />
# Estimate gas price
URL: /api/node/estimate_gas_price
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Gives an estimate of the gas unit price required to get a transaction on chain in a
reasonable amount of time. The gas unit price is the amount that each transaction commits to
pay for each unit of gas consumed in executing the transaction. The estimate is based on
recent history: it gives the minimum gas that would have been required to get into recent
blocks, for blocks that were full. (When blocks are not full, the estimate will match the
minimum gas unit price.)
The estimation is given in three values: de-prioritized (low), regular, and prioritized
(aggressive). Using a more aggressive value increases the likelihood that the transaction
will make it into the next block; more aggressive values are computed with a larger history
and higher percentile statistics. More details are in AIP-34.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/estimate_gas_price","method":"get"}]} webhooks={[]} hasHead={false} />
# Get account
URL: /api/node/get_account
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Return the authentication key and the sequence number for an account
address. Optionally, a ledger version can be specified. If the ledger
version is not specified in the request, the latest ledger version is used.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/accounts/{address}","method":"get"}]} webhooks={[]} hasHead={false} />
# Get account module
URL: /api/node/get_account_module
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Retrieves an individual module from a given account and at a specific ledger version. If the
ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/accounts/{address}/module/{module_name}","method":"get"}]} webhooks={[]} hasHead={false} />
# Get account modules
URL: /api/node/get_account_modules
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Retrieves all account modules' bytecode for a given account at a specific ledger version.
If the ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/accounts/{address}/modules","method":"get"}]} webhooks={[]} hasHead={false} />
# Get account resource
URL: /api/node/get_account_resource
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Retrieves an individual resource from a given account and at a specific ledger version. If the
ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/accounts/{address}/resource/{resource_type}","method":"get"}]} webhooks={[]} hasHead={false} />
# Get account resources
URL: /api/node/get_account_resources
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Retrieves all account resources for a given account and a specific ledger version. If the
ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/accounts/{address}/resources","method":"get"}]} webhooks={[]} hasHead={false} />
# Get account transactions
URL: /api/node/get_account_transactions
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Retrieves on-chain committed transactions from an account. If the start
version is too far in the past, a 410 will be returned.
If no start version is given, it will start at version 0.
To retrieve a pending transaction, use /transactions/by\_hash.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/accounts/{address}/transactions","method":"get"}]} webhooks={[]} hasHead={false} />
# Get blocks by height
URL: /api/node/get_block_by_height
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
This endpoint allows you to get the transactions in a block
and the corresponding block information.
Transactions are limited by max default transactions size. If not all transactions
are present, the user will need to query for the rest of the transactions via the
get transactions API.
If the block is pruned, it will return a 410
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/blocks/by_height/{block_height}","method":"get"}]} webhooks={[]} hasHead={false} />
# Get blocks by version
URL: /api/node/get_block_by_version
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
This endpoint allows you to get the transactions in a block
and the corresponding block information given a version in the block.
Transactions are limited by max default transactions size. If not all transactions
are present, the user will need to query for the rest of the transactions via the
get transactions API.
If the block has been pruned, it will return a 410
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/blocks/by_version/{version}","method":"get"}]} webhooks={[]} hasHead={false} />
# Get events by creation number
URL: /api/node/get_events_by_creation_number
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Event types are globally identifiable by an account `address` and
monotonically increasing `creation_number`, one per event type emitted
to the given account. This API returns events corresponding to that
that event type.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/accounts/{address}/events/{creation_number}","method":"get"}]} webhooks={[]} hasHead={false} />
# Get events by event handle
URL: /api/node/get_events_by_event_handle
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
This API uses the given account `address`, `eventHandle`, and `fieldName`
to build a key that can globally identify an event types. It then uses this
key to return events emitted to the given account matching that event type.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/accounts/{address}/events/{event_handle}/{field_name}","method":"get"}]} webhooks={[]} hasHead={false} />
# Get ledger info
URL: /api/node/get_ledger_info
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Get the latest ledger information, including data such as chain ID,
role type, ledger versions, epoch, etc.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/","method":"get"}]} webhooks={[]} hasHead={false} />
# Get raw table item
URL: /api/node/get_raw_table_item
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Get a table item at a specific ledger version from the table identified by `{table_handle}`
in the path and the "key" (RawTableItemRequest) provided in the request body.
The `get_raw_table_item` requires only a serialized key comparing to the full move type information
comparing to the `get_table_item` api, and can only return the query in the bcs format.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/tables/{table_handle}/raw_item","method":"post"}]} webhooks={[]} hasHead={false} />
# Get table item
URL: /api/node/get_table_item
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Get a table item at a specific ledger version from the table identified by `{table_handle}`
in the path and the "key" (TableItemRequest) provided in the request body.
This is a POST endpoint because the "key" for requesting a specific
table item (TableItemRequest) could be quite complex, as each of its
fields could themselves be composed of other structs. This makes it
impractical to express using query params, meaning GET isn't an option.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/tables/{table_handle}/item","method":"post"}]} webhooks={[]} hasHead={false} />
# Get transaction by hash
URL: /api/node/get_transaction_by_hash
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Look up a transaction by its hash. This is the same hash that is returned
by the API when submitting a transaction (see PendingTransaction).
When given a transaction hash, the server first looks for the transaction
in storage (on-chain, committed). If no on-chain transaction is found, it
looks the transaction up by hash in the mempool (pending, not yet committed).
To create a transaction hash by yourself, do the following:
1. Hash message bytes: "RawTransaction" bytes + BCS bytes of [Transaction](https://aptos-labs.github.io/aptos-core/aptos_types/transaction/enum.Transaction.html).
2. Apply hash algorithm `SHA3-256` to the hash message bytes.
3. Hex-encode the hash bytes with `0x` prefix.
<APIPage document={"https://docs.movementnetwork.xyz/spec.yaml"} operations={[{"path":"/transactions/by_hash/{txn_hash}","method":"get"}]} webhooks={[]} hasHead={false} />
# Get transaction by version
URL: /api/node/get_transaction_by_version
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
Retrieves a transaction by a given version. If the version has been
pruned, a 410 will be returned.
<APIPage 프로젝트로 돌아가기