런타임 API

외부 노드 구성 요소는 피어 탐색, 트랜잭션 풀링, 블록 및 트랜잭션 전파, 합의 메커니즘, 그리고 RPC 요청과 같은 대부분의 로직을 처리합니다. 어떤 경우에는 외부 구성 요소가 런타임 (Runtime)에서 제공하는 특정 데이터를 필요로 합니다. 따라서 런타임 API는 런타임과 외부 구성 요소가 서로 쉽게 통신할 수 있도록 합니다.

아래 API 정의는 바이프로스트 네트워크에서 지원하는 런타임 API입니다.

AccountNonceApi

accountNonce(accountId: AccountId): Index

  • interface: api.call.accountNonceApi.accountNonce

  • runtime: AccountNonceApi_account_nonce

  • summary: 계정 논스 (트랜잭션 인덱스)를 쿼리하는 API.

AuraApi

authorities(): Vec<AuthorityId>

  • interface: api.call.auraApi.authorities

  • runtime: AuraApi_authorities

  • summary: 현재 권한자 (authorities) 집합을 반환합니다.

slotDuration(): SlotDuration

  • interface: api.call.auraApi.slotDuration

  • runtime: AuraApi_slot_duration

  • summary: 오라 (Aura)의 슬롯 지속 시간을 반환합니다.

BlockBuilder

applyExtrinsic(extrinsic: Extrinsic): ApplyExtrinsicResult

  • interface: api.call.blockBuilder.applyExtrinsic

  • runtime: BlockBuilder_apply_extrinsic

  • summary: 주어진 익스트린식 (extrinsic)을 적용합니다.

checkInherents(block: Block, data: InherentData): CheckInherentsResult

  • interface: api.call.blockBuilder.checkInherents

  • runtime: BlockBuilder_check_inherents

  • summary: Inherents가 유효한지 확인합니다.

finalizeBlock(): Header

  • interface: api.call.blockBuilder.finalizeBlock

  • runtime: BlockBuilder_finalize_block

  • summary: 현재 블록을 완료합니다.

inherentExtrinsics(inherent: InherentData): Vec<Extrinsic>

  • interface: api.call.blockBuilder.inherentExtrinsics

  • runtime: BlockBuilder_inherent_extrinsics

  • summary: Inherent 익스트린식 (extrinsic)을 생성합니다.

ConvertTransactionRuntimeApi

convertTransaction(transaction: TransactionV2): Extrinsic

  • interface: api.call.convertTransactionRuntimeApi.convertTransaction

  • runtime: ConvertTransactionRuntimeApi_convert_transaction

  • summary: 이더리움 호환 트랜잭션을 익스트린식 (Extrinsic)으로 변환합니다.

Core

executeBlock(block: Block): Null

  • interface: api.call.core.executeBlock

  • runtime: Core_execute_block

  • summary: 주어진 블록을 실행합니다.

initializeBlock(header: Header): Null

  • interface: api.call.core.initializeBlock

  • runtime: Core_initialize_block

  • summary: 주어진 헤더로 블록을 초기화합니다.

version(): RuntimeVersion

  • interface: api.call.core.version

  • runtime: Core_version

  • summary: 런타임의 버전을 반환합니다.

DebugRuntimeApi

traceBlock(extrinsics: Vec<Extrinsic>, knownTransactions: Vec<H256>): Result<(), DispatchError>

  • interface: api.call.debugRuntimeApi.traceBlock

  • runtime: DebugRuntimeApi_trace_block

  • summary: 모든 블록 익스트린식을 추적합니다.

traceTransaction(extrinsics: Vec<Extrinsic>, transaction: EthTransaction): Result<(), DispatchError>

  • interface: api.call.debugRuntimeApi.traceTransaction

  • runtime: DebugRuntimeApi_trace_transaction

  • summary: 트랜잭션 익스트린식을 추적합니다.

EthereumRuntimeRPCApi

accountBasic(address: H160): EvmAccount

  • interface: api.call.ethereumRuntimeRPCApi.accountBasic

  • runtime: EthereumRuntimeRPCApi_account_basic

  • summary: pallet_evm::Accounts의 주소별 기본 정보를 반환합니다.

accountCodeAt(address: H160): Bytes

  • interface: api.call.ethereumRuntimeRPCApi.accountCodeAt

  • runtime: EthereumRuntimeRPCApi_account_code_at

  • summary: 주어진 계정 주소에 대한 pallet_evm::AccountCodes를 반환합니다.

author(): H160

  • interface: api.call.ethereumRuntimeRPCApi.author

  • runtime: EthereumRuntimeRPCApi_author

  • summary: FindAuthor::find_author 권한 ID를 변환하여 반환합니다.

call(from: H160, to: H160, data: Vec<u8>, value: U256, gasLimit: U256, maxFeePerGas: Option<U256>, maxPriorityFeePerGas: Option<U256>, nonce: Option<U256>, estimate: bool, accessList: Option<Vec<(H160, Vec<H256>)>>): Result<EvmCallInfo, DispatchError>

  • interface: api.call.ethereumRuntimeRPCApi.call

  • runtime: EthereumRuntimeRPCApi_call

  • summary: pallet_ethereum::call 응답을 반환합니다.

chainId(): u64

  • interface: api.call.ethereumRuntimeRPCApi.chainId

  • runtime: EthereumRuntimeRPCApi_chain_id

  • summary: 런타임에 정의된 pallet_evm::ChainId를 반환합니다.

create(from: H160, data: Vec<u8>, value: U256, gasLimit: U256, maxFeePerGas: Option<U256>, maxPriorityFeePerGas: Option<U256>, nonce: Option<U256>, estimate: bool, accessList: Option<Vec<(H160, Vec<H256>)>>): Result<EvmCreateInfo, DispatchError>

  • interface: api.call.ethereumRuntimeRPCApi.create

  • runtime: EthereumRuntimeRPCApi_create

  • summary: pallet_ethereum::call 응답을 반환합니다.

currentAll(): (Option<BlockV2>, Option<Vec<EthReceiptV3>>, Option<Vec<EthTransactionStatus>>)

  • interface: api.call.ethereumRuntimeRPCApi.currentAll

  • runtime: EthereumRuntimeRPCApi_current_all

  • summary: 단일 런타임 호출로 블록의 모든 현재 데이터를 반환합니다.

currentBlock(): BlockV2

  • interface: api.call.ethereumRuntimeRPCApi.currentBlock

  • runtime: EthereumRuntimeRPCApi_current_block

  • summary: 현재 블록을 반환합니다.

currentReceipts(): Option<Vec<EthReceiptV3>>

  • interface: api.call.ethereumRuntimeRPCApi.currentReceipts

  • runtime: EthereumRuntimeRPCApi_current_receipts

  • summary: 현재 Receipt를 반환합니다.

currentTransactionStatuses(): Option<Vec<EthTransactionStatus>>

  • interface: api.call.ethereumRuntimeRPCApi.currentTransactionStatuses

  • runtime: EthereumRuntimeRPCApi_current_transaction_statuses

  • summary: 현재 트랜잭션 상태를 반환합니다.

elasticity(): Option<Permill>

  • interface: api.call.ethereumRuntimeRPCApi.elasticity

  • runtime: EthereumRuntimeRPCApi_elasticity

  • summary: 탄력성 승수 (elasticity multiplier)를 반환합니다.

extrinsicFilter(xts: Vec<Extrinsic>): Vec<TransactionV2>

  • interface: api.call.ethereumRuntimeRPCApi.extrinsicFilter

  • runtime: EthereumRuntimeRPCApi_extrinsic_filter

  • summary: Vec<OpaqueExtrinsic>을 수신하여 모든 이더리움 트랜잭션을 필터링합니다.

gasPrice(): u256

  • interface: api.call.ethereumRuntimeRPCApi.gasPrice

  • runtime: EthereumRuntimeRPCApi_gas_price

  • summary: Returns FixedGasPrice::min_gas_price

storageAt(address: H160, index: u256): H256

  • interface: api.call.ethereumRuntimeRPCApi.storageAt

  • runtime: EthereumRuntimeRPCApi_storage_at

  • summary: 주어진 계정 주소와 인덱스에 대한 pallet_evm::AccountStorages를 반환합니다.

GrandpaApi

currentSetId(): SetId

  • interface: api.call.grandpaApi.currentSetId

  • runtime: GrandpaApi_current_set_id

  • summary: 현재 GRANDPA authority 집합의 ID를 리턴합니다.

generateKeyOwnershipProof(setId: SetId, authorityId: AuthorityId): Option<OpaqueKeyOwnershipProof>

  • interface: api.call.grandpaApi.generateKeyOwnershipProof

  • runtime: GrandpaApi_generate_key_ownership_proof

  • summary: 주어진 집합에 있는 특정 권한자 (authority)에 대한 키 소유 증명 (proof of key ownership)을 생성합니다.

grandpaAuthorities(): AuthorityList

  • interface: api.call.grandpaApi.grandpaAuthorities

  • runtime: GrandpaApi_grandpa_authorities

  • summary: 현재 GRANDPA 권한자 (authorities)와 가중치를 가져옵니다. 이는 변경이 예정되고 해당 지연 시간이 경과한 경우를 제외하고는 변경되지 않아야 합니다.

submitReportEquivocationUnsignedExtrinsic(equivocationProof: GrandpaEquivocationProof, keyOwnerProof: OpaqueKeyOwnershipProof): Option<Null>

  • interface: api.call.grandpaApi.submitReportEquivocationUnsignedExtrinsic

  • runtime: GrandpaApi_submit_report_equivocation_unsigned_extrinsic

  • summary: 지정된 익스트린식 (extrinsic)을 제출하여 이퀴보케이션 (equivocation, 동일한 블록 높이에서 서로 다른 두 개의 블록을 생성하는 행위)을 보고합니다.

Metadata

metadata(): OpaqueMetadata

  • interface: api.call.metadata.metadata

  • runtime: Metadata_metadata

  • summary: 런타임의 메타데이터를 반환합니다.

OffchainWorkerApi

offchainWorker(header: Header): Null

  • interface: api.call.offchainWorkerApi.offchainWorker

  • runtime: OffchainWorkerApi_offchain_worker

  • summary: 주어진 블록 헤더에 대한 오프체인 태스크를 시작합니다.

SessionKeys

decodeSessionKeys(encoded: Bytes): Option<Vec<(Bytes, KeyTypeId)>>

  • interface: api.call.sessionKeys.decodeSessionKeys

  • runtime: SessionKeys_decode_session_keys

  • summary: 주어진 공개 세션키를 디코딩합니다.

generateSessionKeys(seed: Option<Bytes>): Bytes

  • interface: api.call.sessionKeys.generateSessionKeys

  • runtime: SessionKeys_generate_session_keys

  • summary: 주어진 시드 (선택 사항)를 사용하여 세션 키 집합을 생성합니다.

TaggedTransactionQueue

validateTransaction(source: TransactionSource, tx: Extrinsic, blockHash: BlockHash): TransactionValidity

  • interface: api.call.taggedTransactionQueue.validateTransaction

  • runtime: TaggedTransactionQueue_validate_transaction

  • summary: 트랜잭션을 검증합니다.

TransactionPaymentApi

queryFeeDetails(uxt: Extrinsic, len: u32): FeeDetails

  • interface: api.call.transactionPaymentApi.queryFeeDetails

  • runtime: TransactionPaymentApi_query_fee_details

  • summary: 트랜잭션 Fee 정보를 리턴합니다.

queryInfo(uxt: Extrinsic, len: u32): RuntimeDispatchInfo

  • interface: api.call.transactionPaymentApi.queryInfo

  • runtime: TransactionPaymentApi_query_info

  • summary: 트랜잭션 정보를 리턴합니다.

Last updated