본문으로 건너뛰기

Locus JSON-RPC

JSON RPC가 무엇일까요?

JSON-RPC는 클라이언트가 JSON 형식의 요청 메시지를 노드에 전송하여 노드는 이를 처리하고 결과를 JSON 형식의 응답 메시지로 반환합니다.

원격 프로시저 호출(Remote Procedure Call) 프로토콜의 약자로써, 통신을 위한 방식입니다.

로커스체인 RPC

Locus Chain 노드는 JSON-RPC API를 제공합니다. 개인이 실행하거나 몇몇의 공적인 서비스로 제공되는 노드를 통해 사용자는 쉽게 블록체인 네트워크의 정보를 조회할 수 있습니다.

호출

단순 조회용 RPC 호출

한 번의 호출로 결과를 받을 수 있습니다.

Tx를 생성하는 RPC 호출

파라메트에 'Sig'가 포함되어 있으면 Tx를 생성하는 RPC입니다. 동일한 RPC를 두 번 호출합니다.
아래와 같이 4단계로 진행하십시오.

  • [STEP1: 첫번째 호출] 노드에서 Tx와 Hash를 받습니다.
  • [STEP2: Tx 검증] 받은 Tx를 로커스 라이브러리의 VerifyTx 함수로 검증합니다.
  • [STEP3: 서명] Tx에 이상이 없으면 로커스 라이브러리나 지갑을 통해 서명을 합니다.
  • [STEP4: 두 번째 호출] 첫번째 호출 파라메트에 서명을 추가하여 두번째 호출을 하면 Tx가 생성됩니다.

RPC 호출 예시

{
"jsonrpc": "2.0",
"method": "locus_getAccountDetail",
"params": [{ "account": "D4YLP5B3NC3RWVXYDWFPCT6IG2ASCVP32ANLOAD73I" }],
"id": 1
}

공통 응답 형식

기본적인 응답값은 다음과 같은 형식을 가집니다.
호출된 Function에 따라 result 값이 변경됩니다.

성공

{
"jsonrpc": "2.0",
"id": 1, // int
"result": {} // any
}

실패

{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": 1, // int
"message": "" // string
}
}

함수 목록


locus_echo

RPC 호출에 대해 노드가 응답을 잘 하는지 확인하는 용도로 사용할 수 있습니다.
입력값에 현재 시간을 추가하여 응답합니다.

Request

KeyTypeDescription
strstring문자열

Response

KeyTypeDescription
-string입력 문자열 + 현재 시간

locus_getSyncState

노드의 현재 동기화 상태를 구합니다.

Request

[없음]

Response

KeyTypeDescription
syncStatestringNODE_STATE_IN_INIT
NODE_STATE_IN_SYNC
NODE_STATE_IN_RESYNC
NODE_STATE_SYNC_COMPLETE
NODE_STATE_STABLE
Unknown NodeState

locus_getGenesisAccount

제네시스 계정의 주소를 구합니다.

Request

[없음]

Response

KeyTypeDescription
genesisbase32제네시스 계정의 주소

locus_openAccount

계정을 로커스체인 네트워크에 등록합니다.

Request

KeyTypeDescription
accountbase32대상 계정 주소
senderbase32코인을 보낸 계정
indexint코인을 보낸 Tx의 height
args[]stringArguments
pkbase32Normal public key
keySignbase32Key signature
mpkbase32Master public key
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_becomeHost

지정한 계정을 해당 노드의 호스트로 설정합니다. 지정한 계정은 게스트가 없어야 하고, 해당 노드는 호스트가 없는 빈 노드여야 합니다.

Request

KeyTypeDescription
accountbase32호스트가 될 계정
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_becomeGuest

지정한 계정을 해당 노드의 게스트로 설정합니다. 지정한 계정은 게스트가 없어야 하고, 해당 노드는 호스트가 존재해야 합니다.

Request

KeyTypeDescription
accountbase32게스트가 될 계정
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_changeKey

계정의 노말키를 변경합니다.

Request

KeyTypeDescription
accountbase32키를 변경할 계정
masterPkeybase32Master public key
newNormalPkeybase32New Normal public key
signByMasterKeybase64New Normal public key를 Master public key로 서명한 값
signbase64서명
signedHeightint두번째 호출 파라미터에 포함될 tx height

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_transferCoin

코인을 다른 계정에 보냅니다.

Request

KeyTypeDescription
frombase32보내는 계정
tobase32받는 계정
amountstring보낼 수량
signbase64서명
signedHeightint1차 응답의 signedHeight
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_getTx

계정의 특정 Height의 Tx 정보를 구합니다.

Request

KeyTypeDescription
accountbase32계정
heightint계정의 Height

Response

KeyTypeDescription
txstringTx 정보

locus_getAccountHistory

계정의 Tx 목록을 구합니다.

Request

KeyTypeDescription
accountbase32계정
heightint구하고자 하는 시작 Height
Height가 -1이면, 최상위 Tx 부터.
countint구하고자 하는 Tx 갯수 (시작 위치에서 이전 몇개)

Response

KeyTypeDescription
txs[]stringTx string list

locus_getAccountDetail

계정의 상세정보를 구합니다.

Request

KeyTypeDescription
accountbase32계정

Response

KeyTypeDescription
identitystringHost : 해당 노드의 호스트 계정
Guest : 해당 노드의 게스트 계정
Neighbor : 해당 노드가 속한 샤드의 이웃 계정. 질의 당시의 상태이며, 동기 상태에 따라서 부정확한 값일 수도 있다.
no identity : 위의 것에 아무 것도 해당되지 않음, 즉 존재하지 않거나, 다른 샤드에 속했거나
fromNoAliveboolOpenAccount 를 했지만, 아직 합의에 포함되지 않은 경우에 이 flag 가 true 가 된다.
balancestring보유한 로커스 코인
unactBalancestring아직은 Activate 되지 않아 사용할 수 없는 Balance
representativebase32위임한 계정 (Host 계정)
grantuint64보유한 Grant
publicKeybase32계정의 Normal public key
txChainHeightint계정의 Height
txLinkstring마지막 Tx link

locus_getWorldRoundStatesList

World Round State (WRS) 목록을 구합니다.

Request

KeyTypeDescription
roundint구하고자 하는 시작 Round
countint구하고자 하는 갯수 (시작 위치에서 이전 몇개), Max 500.

Response

KeyTypeDescription
nextRoundList[]intWRS 목록

locus_getWorldRoundState

World Round State (WRS) 상세 정보를 구합니다.

Request

KeyTypeDescription
roundint구하고자 하는 Round

Response

KeyTypeDescription
nextRoundintRound
addShardRoundint0 : 샤드 분할 예정 없음.
1 : 샤드 분할해야 하는 상황이지만, 언제인지 정해지지 않았음.
2 이상 : 해당 Round에 샤드 분할 예정됨.
rootAcctHashstring
worldInfoHashstring
currentHashstring
prevLinkstring
prevNextRoundint
sigHashstring아래 서명 정보의 해시값. 아래의 서명 정보는 프루닝 될 수 있다.
validatorsWeightintValidator의 Weight 총합
validators[]types.Validator{Validator's Addr, Weight, Sign}

types.Validator

KeyTypeDescription
addrbase32검증자 주소
weightuint16가중치
signstring서명

locus_getInactiveTxList

계정의 아직 Activate되지 않은 Tx 목록을 구합니다.

Request

KeyTypeDescription
accountbase32계정

Response

KeyTypeDescription
timeOutTxs[]types.ListTx1차 Target 이 Activation 하지 않아, Time out 되어 들어온 Tx 목록.
txs[]types.ListTxSender 쪽의 합의가 완료된 Tx 목록.
unconfirmedTxs[]types.ListTxSender 쪽의 합의를 대기중인 Tx 목록.
pendingTxs[]types.ListTxPropose 된지 10초 미만의 Tx 목록.
unspreadTxs[]types.ListTxUnspread Tx 목록.
conflictedTxs[]types.ListTx충돌난 Tx 목록.
contractResultstypes.ContractResultsContract results

types.ListTx

KeyTypeDescription
senderbase32보낸 계정
indexint인덱스
txstringTx 내용
vtxobject상세 Tx 정보

types.ContractResults

KeyTypeDescription
pending[]types.ListTxPending 상태의 Tx 목록
conflicting[]types.ListTx충돌난 Tx 목록

locus_getMontInfoList

계정의 Mont(MOnitoring seNT) 목록을 구합니다. 노드의 호스트/게스트 계정의 것만 구할 수 있습니다.

Request

KeyTypeDescription
accountbase32계정

Response

KeyTypeDescription
proofedTxs[]types.MontTxSender 쪽의 합의가 완료된 Tx 목록.
pendingTxs[]types.MontTxPropose만 된 Tx 목록.

types.MontTx

KeyTypeDescription
indexint인덱스
txstringTx 내용

locus_createToken

시스템 토큰을 생성합니다.
계정당 하나의 시스템 토큰을 생성할 수 있습니다.

Request

KeyTypeDescription
accountbase32토큰을 생성할 계정
tokenBalancestring생성할 토큰 갯수
signbase64서명
signedHeightint1차 응답의 signedHeight
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_transferToken

토큰을 다른 계정에 보냅니다.

Request

KeyTypeDescription
frombase32토큰을 보내는 계정
tobase32토큰을 받을 계정
amountstring보낼 수량
tokenAmounts[]types.TokenAmount보낼 토큰 목록
signbase64서명
signedHeightint1차 응답의 signedHeight
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)
sourcetypes.SourceSource

types.TokenAmount

KeyTypeDescription
tokenIdstring토큰 ID
amountTokenstring토큰 수량

types.Source

KeyTypeDescription
ownerstring소유자
heightint높이

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_getAccountTokenList

계정이 소유한 토큰 목록과 Balance를 구합니다.

Request

KeyTypeDescription
accountbase32토큰을 생성할 계정

Response

KeyTypeDescription
tokenListmap[base32]string{"TokenID": Balance}

locus_hasSystemToken

계정이 생성한 시스템 토큰이 존재하는 여부와 존재하면 토큰 ID를 구합니다.

Request

KeyTypeDescription
accountbase32계정

Response

KeyTypeDescription
havingbool시스템 토큰이 존재하는지 여부
tokenIdstringHaving 이 true 이면, 시스템 토큰 ID를 돌린다.

locus_postData

데이터를 게시합니다.

Request

KeyTypeDescription
accountbase32계정
labelint체인 내에서 같은 라벨의 Tx끼리 링크됨.
해당 Tx에 대해 Proof를 Verify할 때 같은 라벨의 더 최신의 Tx가 있는지를 확인하는 용도로 사용됨.
database64게시할 데이터
signbase64서명
signedHeightint1차 응답의 signedHeight
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_readTxListWithProof

계정의 Tx 목록과 Proof를 함께 구합니다.

Request

KeyTypeDescription
accountbase32계정
baseHeightint시작 Height
countuint구하고자 하는 갯수 (시작 위치에서 이전 몇개)

Response

KeyTypeDescription
accountbase32계정
txs[]stringTx string 목록
proofstring요청한 Tx 목록의 Merkle Proof
checkRoundP1intProof 가 생성된 Round + 1

locus_verifyTxListWithProof

Tx 목록의 Proof를 검증합니다.

Request

KeyTypeDescription
accountbase32계정
txs[]string검증할 Tx 목록
proofMerkleProof검증할 Tx 목록의 Merkle Proof
checkRoundP1intproof 가 생성된 Round + 1

Response

KeyTypeDescription
-bool검증 성공 여부

locus_generateLatestStoredDataProof

특정 label의 TxPostData가 가장 최신인지 증명하는 Proof를 생성합니다.

Request

KeyTypeDescription
accountbase32계정
heightintProof를 생성할 첫번째 TxPostData의 height

Response

KeyTypeDescription
accountbase32계정
latestProofstringTx가 최신 StoredDataHash에 포함되어 있다는 Proof

locus_verifyLatestStoredDataProof

locus_generateLatestStoredDataProof RPC로 생성한 Proof를 검증합니다.

Request

KeyTypeDescription
accountbase32Tx 목록의 Proof를 생성할 계정
latestProofstringTx가 최신 StoredDataHash에 포함되어 있다는 Proof

Response

KeyTypeDescription
-bool검증 성공 여부

locus_lockStake

Stake를 Lock합니다.

Request

KeyTypeDescription
accountbase32계정
vmeIdbase32VME ID
lockAmountuint32Lock할 Stake 수량 (1 UnitStakeLock = 100 Locus)
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_unlockStake

Stake를 unlock합니다.

Request

KeyTypeDescription
accountbase32계정
vmeIdbase32VME ID
unlockAmountuint32Unlock할 Stake (1 UnitStakeLock = 100 Locus)
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_provideScript

Core Script를 배포합니다.

Request

KeyTypeDescription
providerbase32배포할 계정
targetbase32Time lock 이내에 Core script를 실행하여, provider가 send한 coin 이나 token을 activation할 계정
targetAfterTimeLockbase32Time lock 이후에 provider가 send한 coin 이나 token을 자동으로 activation할 계정
timeLockintTime lock 이 걸리는 round duration, 현재 Max = 30, Min = 3 으로 설정되어 있음.
args[]hexTarget이 provider의 script (ScriptSig)를 실행할 때, 사용될 아규먼트, 최대 4개까지 입력가능.
scriptProvidehexTarget이 실행할 provider의 script, 현재 MaxSize = 32 bytes
scriptAccepthexTarget이 실행할 target의 script, 현재 MaxSize = 32 bytes
amountstringTarget이 Core script 실행에 성공할 경우, activation 시킬 수 있는 coin amount
tokenAmounts[]types.TokenAmountTarget이 Core script 실행에 성공할 경우, activation 시킬 수 있는 token amounts
signbase64서명
signedHeightint1차 응답의 signedHeight

types.TokenAmount

KeyTypeDescription
tokenIdstring토큰 ID
amountTokenstring토큰 수량

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_acceptScript

Core Script를 실행합니다.

Request

KeyTypeDescription
acceptorbase32TxProvideScript에서 Target으로 지정된, Core Script를 activation 시킬 계정
Time lock 이내에만 activation이 가능함.
providerbase32TxProvideScript를 배포한 계정
indexintLeadTx(TxProvideScript)의 height
args[]hexTarget이 Target의 script (ScriptSig)를 실행할 때 사용될 아규먼트., 최대 4개까지 입력가능.
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_queryAddress

Key Address로 Full Address를 조회합니다.

Request

KeyTypeDescription
addrbase32Key Address

Response

KeyTypeDescription
addrbase32Full Address

locus_accountHeightsToDownload

동기화할 계정 블록 높이 목록 조회

Request

KeyTypeDescription
accountbase32계정
heightChunks[]types.HeightChunkHeight Chunk 목록

types.HeightChunk

KeyTypeDescription
bottomint하한
topint상한

Response

KeyTypeDescription
heightChunks[]types.HeightChunkHeight Chunk 목록

locus_accountHeightsToUpload

업로드할 계정 블록 높이 목록 조회

Request

KeyTypeDescription
accountbase32계정
heightChunks[]types.HeightChunkHeight Chunk 목록

types.HeightChunk

KeyTypeDescription
bottomint하한
topint상한

Response

KeyTypeDescription
heightChunks[]types.HeightChunkHeight Chunk 목록
validTopint유효한 Top
validBottomint유효한 Bottom

locus_calculateSpentByExpress

Express로 소비된 금액 계산

Request

KeyTypeDescription
accountbase32계정
senderbase32보낸 계정
sentHeightint보낸 Height

Response

KeyTypeDescription
amountstring수량

locus_changeVkey

검증자 키(VKey) 변경

Request

KeyTypeDescription
accountbase32계정
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_checkAddressExist

주소 존재 여부 확인

Request

KeyTypeDescription
keyAddrbase32Key 주소

Response

KeyTypeDescription
addrbase32Address
existbool존재 여부

locus_clientMessage

클라이언트 메시지 전송

Request

KeyTypeDescription
msgstring메시지

Response

KeyTypeDescription
-any결과

locus_closeAccount

계정 폐쇄

Request

KeyTypeDescription
frombase32From Account
tobase32To Account
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_createAssetObject

자산 객체 생성

Request

KeyTypeDescription
accountbase32계정
assetTypestring자산 타입
amountstring수량
operatorstring운영자
metaDatastring메타데이터
signbase64서명
signedHeightint1차 응답의 signedHeight
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_createVme

VME(Virtual Machine Environment) 생성

Request

KeyTypeDescription
accountbase32계정
sysIdbase32시스템 ID
sysTypestring시스템 타입
lockAmountstringLock 수량
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_downloadAccountTxs

계정 트랜잭션 다운로드

Request

KeyTypeDescription
accountbase32계정
heightChunks[]types.HeightChunkHeight Chunk 목록

types.HeightChunk

KeyTypeDescription
bottomint하한
topint상한
heights[]intHeights

Response

KeyTypeDescription
heights[]intHeight 목록
txs[]stringTx 목록

locus_findDuplicateSubscriber

중복 구독자 확인

Request

KeyTypeDescription
publishedstring게시자

Response

KeyTypeDescription
existbool존재 여부

locus_getAccountAssetList

계정 자산 목록 조회

Request

KeyTypeDescription
accountbase32계정
maxCountint최대 갯수

Response

KeyTypeDescription
assetList[]types.AccountAsset자산 목록

types.AccountAsset

KeyTypeDescription
assetIdstring자산 ID
amountstring수량
objects[]types.AssetObject자산 객체 목록
unactAmountstring비활성 수량
unactObjects[]types.AssetObject비활성 자산 객체 목록

types.AssetObject

KeyTypeDescription
idstring자산 객체 ID
valuestring
ownerbase32소유자
operatorbase32운영자
rentStartint임대 시작 Height
rentEndint임대 종료 Height

locus_getAccountAssetObject

계정 자산 객체 조회

Request

KeyTypeDescription
accountbase32계정
assetId[]string자산 ID 목록

Response

KeyTypeDescription
objects[]types.AssetObject객체 목록
unactObjects[]types.AssetObject비가용 객체 목록

types.AssetObject

KeyTypeDescription
idstring자산 객체 ID
valuestring
ownerbase32소유자
operatorbase32운영자
rentStartint임대 시작 Height
rentEndint임대 종료 Height

locus_getConciseNodeStatus

간략한 노드 상태 조회

Request

[없음]

Response

KeyTypeDescription
nodeIdbase32노드 ID
hostbase32호스트
reliableboolreliable 여부
roundint라운드
epochintEpoch
shardIdint샤드 ID
networkIdint네트워크 ID
totalHeightstring총 Height
intraPeerCountint내부 피어 수
interPeerCountint외부 피어 수
syncStatestring동기화 상태
detailStatestring상세 상태
presyncStatestring사전 동기화 상태
buildTimestring빌드 시간
rsNextRoundintRS 다음 라운드
wrsNextRoundintWRS 다음 라운드

locus_getNodeStatus

노드 상태 조회

Request

[없음]

Response

KeyTypeDescription
nodeIdbase32노드 ID
baseTimeint기준 시간
hostbase32호스트
reliableboolreliable 여부
roundTimeint라운드 시간
roundCycleint라운드 주기
prunedRoundintPruned 라운드
roundint라운드
epochintEpoch
shardIdint샤드 ID
homeShardIdint홈 샤드 ID
totalShardint총 샤드 수
networkIdint네트워크 ID
totalHeightstring총 Height
intraPeerCountint내부 피어 수
interPeerCountint외부 피어 수
syncStatestring동기화 상태
detailStatestring상세 상태
presyncStatestring사전 동기화 상태
buildTimestring빌드 시간
avgTxTimestring평균 Tx 시간
rsNextRoundintRS 다음 라운드
rsfintRSF
vmInfostringVM 정보
wrsNextRoundintWRS 다음 라운드
wrsHeightintWRS Height

locus_getOwnerBalance

소유자 잔액 조회

Request

[없음]

Response

KeyTypeDescription
-[]types.OwnerBalance소유자 잔액 목록

types.OwnerBalance

KeyTypeDescription
accountstring계정
balancestring잔액

locus_getRoundState

라운드 상태 조회

Request

KeyTypeDescription
roundintRound

Response

KeyTypeDescription
nextRoundint다음 라운드
prevNextRoundint이전 다음 라운드
hashstring해시
totalHeightint총 Height
proposerbase32제안자
validatorsWeightint검증자 가중치
validators[]types.VoteInfoRPC검증자 목록
incentiveExistbool인센티브 존재 여부
totalIncentivestring총 인센티브
startRoundint시작 라운드
endRoundint종료 라운드
newEpochint새로운 Epoch
newEpochRoundint새로운 Epoch 라운드

types.VoteInfoRPC

KeyTypeDescription
addrbase32검증자 주소
weightuint16가중치
signstring서명

locus_getRoundStatesList

라운드 상태 목록 조회

Request

KeyTypeDescription
roundintRound
countint갯수

Response

KeyTypeDescription
-[]types.RoundStateAbstract라운드 상태 목록

types.RoundStateAbstract

KeyTypeDescription
roundint라운드
hashstring해시
totalHeightint총 Height

locus_getShardOfAccount

계정의 샤드 정보 조회

Request

KeyTypeDescription
accountbase32계정

Response

KeyTypeDescription
shardint샤드
acceptablebool수용 가능 여부

locus_makeTxProof

트랜잭션 증명 생성

Request

KeyTypeDescription
accountbase32계정
txs[]stringTx 목록
countint갯수

Response

KeyTypeDescription
accountbase32계정
txs[]stringTx string 목록
proofstring요청한 Tx 목록의 Merkle Proof
checkRoundP1intProof 가 생성된 Round + 1

locus_requestDataTrade

데이터 거래 요청

Request

KeyTypeDescription
requesterbase32요청자
dataTypeint데이터 타입
reqHashstring요청 해시
rewardstring보상
keystring
traderbase32거래자
signbase64서명
signedHeightint1차 응답의 signedHeight

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)
keystring
targetstring타겟

locus_setHost

호스트 설정

Request

KeyTypeDescription
accountbase32계정
otpstringOTP

Response

KeyTypeDescription
-bool성공 여부

locus_subscribeAddress

구독

Request

KeyTypeDescription
publishedstring게시자
addbool추가 여부

Response

[없음]


locus_transferAssetObject

자산 객체 전송

Request

KeyTypeDescription
frombase32보내는 계정
tobase32받는 계정
assetIdstring자산 ID
amountstring수량
signbase64서명
signedHeightint1차 응답의 signedHeight
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_transferCoinExpress

Express 코인 전송

Request

KeyTypeDescription
frombase32보내는 계정
tobase32받는 계정
amountstring수량
signbase64서명
signedHeightint1차 응답의 signedHeight
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)
sourcetypes.Source자금 출처

types.Source

KeyTypeDescription
ownerstring소유자
heightint높이

Response

KeyTypeDescription
hashbase64Tx Hash
txobject생성된 Tx
successbool성공 여부
signedHeightint서명된 tx height
feeTypeint수수료 유형 (AUTO:0, GRANT_ONLY:1)

locus_uploadAccountTxs

계정 트랜잭션 업로드

Request

KeyTypeDescription
accountbase32계정
txs[]stringTx 목록

Response

KeyTypeDescription
-[]int결과