StakingV1
토큰 스테이킹 API는 HTTP 프로토콜을 지원합니다. staking V1_ 네임스페이스를 사용합니다.
stakingV1_create
스테이킹 V1 계약을 만듭니다.
Parameters
Name | Type | Description |
---|---|---|
sender | String | 발신인 주소 |
stakingToken | String | 스테이킹 주소 |
rewardToken | String | 리워드 주소 |
limitStakingTime | Long | 마감 소요 시간 epoch time value |
limitRewardTime | Long | 제한 reward time. second epoch time value |
rewardRate | BigInteger | 초당 보상률 PEI 값 |
tempKey | String | tempKey for "create" |
hashKey | String | 해쉬값(tempKey | secretKey) |
signature | String | 서명값( hash( sender | stakingToken | rewardToken | limitStakingTime | limitRewardTime | rewardRate | tempKey | hashKey ) ) by sender's privateKey using signData API |
거래를 수행하기 위해서는 소유자가 가스 비용에 대해 최소 4 GFEI의 잔액을 가지고 있어야 합니다.
Return Value
Name | Type | Description |
---|---|---|
transactionId | String | Transaction Id |
contractAddress | String | Token contract address |
트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. net_getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.
Example
stakingV1_stake
v1 계약 체결에 지분을 추가한다. 통화하기 전에 스테이킹 토큰의 금액을 스테이킹 계약으로 승인해야 합니다.
Parameters
Name | Type | Description |
---|---|---|
stakingAddress | String | 스테이킹 계약 주소 |
sender | String | 발신인 주소 |
amount | BigDecimal | 스테이킹 토큰량 |
comment | String | Comment Max length : 200 |
tempKey | String | tempKey for "stake" |
hashKey | String | 해쉬값(tempKey | secretKey) |
signature | String | 서명값( hash( stakingAddress | sender | amount | tempKey | hashKey ) ) by sender's privateKey using signData API |
거래를 수행하기 위해서는 소유자가 가스 비용에 대해 최소 400,000,000 PEI의 잔액을 가지고 있어야 합니다.
Return Value
Name | Type | Description |
---|---|---|
transactionId | String | Transaction Id |
트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. net_getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.
Example
stakingV1_withdraw
Withdraw staking.
Parameters
Name | Type | Description |
---|---|---|
stakingAddress | String | 스테이킹 계약 주소 |
sender | String | 요청 주소 철회 |
amount | BigDecimal | 인출할 토큰량. |
comment | String | Comment Max length : 200 |
tempKey | String | tempKey for "withdraw" |
hashKey | String | 해쉬값(tempKey | secretKey) |
signature | String | 서명값( hash( stakingAddress | sender | amount | tempKey | hashKey ) ) by sender's privateKey using signData API |
거래를 수행하기 위해서는 소유자가 가스 비용에 대해 최소 400 MFEI의 잔액을 가지고 있어야 합니다.
Return Value
Name | Type | Description |
---|---|---|
transactionId | String | Transaction Id |
트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. net_getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.
Example
stakingV1_claimReward
Claim reward. Sufficient reward tokens must be transferred to the staking address.
Parameters
Name | Type | Description |
---|---|---|
stakingAddress | String | 스테이킹 계약 주소 |
sender | String | 요청자 주소 . |
comment | String | Comment Max length : 200 |
tempKey | String | tempKey for "claimReward" |
hashKey | String | 해쉬값(tempKey | secretKey) |
signature | String | 서명값( hash( stakingAddress | sender | tempKey | hashKey ) ) by sender's privateKey using signData API |
거래를 수행하기 위해서는 소유자가 가스 비용에 대해 최소 400 MFEI의 잔액을 가지고 있어야 합니다.
Return Value
Name | Type | Description |
---|---|---|
transactionId | String | Transaction Id |
트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. net_getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.
Example
stakingV1_withdrawReward
보상 잔액을 계좌로 인출하십시오. 지분 계약 소유자만 할 수 있습니다.
Parameters
Name | Type | Description |
---|---|---|
stakingAddress | String | 스테이킹 계약 주소 |
sender | String | 요청자 주소 |
account | String | 수령보상잔액계정주소 |
amount | BigDecimal | 리워드 토큰의 금액 |
comment | String | Comment Max length : 200 |
tempKey | String | tempKey for "withdrawReward" |
hashKey | String | 해쉬값(tempKey | secretKey) |
signature | String | 서명값( hash( stakingAddress | owner | account | amount | tempKey | hashKey ) ) by sender's privateKey using signData API |
거래를 수행하기 위해서는 소유자가 가스 비용에 대해 최소 400 MFEI의 잔액을 가지고 있어야 합니다.
Return Value
Name | Type | Description |
---|---|---|
transactionId | String | Transaction Id |
트랜잭션 ID가 반환되지만 아직 블록에 추가되지 않았습니다. net_getTransactionStatus를 사용하여 상태가 1인지 확인해야 합니다.
Example
stakingV1_getStaked
차액을 돌려줍니다 .
Parameters
Name | Type | Description |
---|---|---|
stakingAddress | String | 스테이킹 계약 주소 |
address | String | 주소 |
Return Value
Name | Type | Description |
---|---|---|
balance | BigDecimal | 스테이킹 잔액 |
Example
stakingV1_getEarned
획득한 보상을 반환합니다.
Parameters
Name | Type | Description |
---|---|---|
stakingAddress | String | 스테이킹 계약 주소 |
address | String | 주소 |
Return Value
Name | Type | Description |
---|---|---|
balance | BigDecimal | 보상 토큰의 보상 잔액을 획득 |
Example
Last updated