서버월렛API
ServerWallet API는 HTTP 프로토콜을 지원합니다. /wallet 경로를 사용합니다.
API 주소
Test Server : https://test-api.protx.io/wallet
createAddress
주소를 생성합니다. Server Wallet에 새로운 개인키를 생성한 후 Address, secretKey, mnemonic을 반환한다.
Parameters
Name | Type | Description |
---|---|---|
addInfo | String | 주소 정보. 이것은 getAddressInfo API를 사용하여 검색할 수 있습니다. 최대 길이 : 200 |
Return Value
Name | Type | Description |
---|---|---|
address | String | 주소 |
secretKey | String | Server Wallet에 SignData를 요청할 때 인증을 위해 사용합니다. 값을 다시 보거나 API를호출하여 다시 가져올수 없으므로 잘 보관해야 합니다. |
mnemonic | String | 필요한 경우 주소 복구시에 사용 |
ImportAddress가 호출되면 새 secretKey가 생성됩니다.
Example
getAddressInfo
주소 정보를 반환합니다.
Parameters
Name | Type | Description |
---|---|---|
address | String | 주소 |
Return Value
Name | Type | Description |
---|---|---|
address | String | 주소 |
addInfo | String | 주소 생성 시 저장되는 주소 정보. |
Example
exportAddress
주어진 주소의 니모닉을 반환합니다. hashKey가 정확하지 않으면 오류를 반환합니다.
Parameters
Name | Type | Description |
---|---|---|
address | String | 주소 |
languageType | String | 니모닉 언어(현재 "en"만 사용 가능) |
tempKey | String | tempKey for "exportAddress" |
hashKey | String | hash(tempKey | secretKey) |
Return Value
Name | Type | Description |
---|---|---|
mnemonic | String | 필요한 경우 주소 복구시에 사용 |
Example
importAddress
니모닉을 사용하여 주소를 가져옵니다. Private Key를 Server Wallet에 저장한다. Address, secretKey, mnemonic이 반환된다.
Parameters
Name | Type | Description |
---|---|---|
languageType | String | 니모닉 언어(현재 "en"만 사용 가능) |
mnemonic | String | 니모닉 문자열 |
addInfo | String | 주소 정보. 이것은 getAddressInfo API를 사용하여 검색할 수 있습니다. 최대 길이 : 200 |
Return Value
Name | Type | Description |
---|---|---|
address | String | 주소 |
secretKey | String | Server Wallet에 SignData를 요청할 때 인증을 위해 사용합니다. 값을 다시 보거나 API를호출하여 다시 가져올수 없으므로 잘 보관해야 합니다. |
mnemonic | String | 니모닉을 사용하여 주소를 복원할 수 있습니다. |
Example
importAddressWithPrivateKey
개인 키를 사용하여 주소를 가져옵니다. Private Key를 Server Wallet에 저장한다. 그리고 Address, secretKey를 반환한다. importAddress 와 달리 니모닉은 반환되지 않습니다..
Parameters
Name | Type | Description |
---|---|---|
privateKey | String | 개인 키 |
addInfo | String | 주소 정보. 이것은 getAddressInfo API를 사용하여 검색할 수 있습니다. 최대 길이 : 200 |
Return Value
Name | Type | Description |
---|---|---|
address | String | 주소 (0x....) |
secretKey | String | Server Wallet에 SignData를 요청할 때 인증을 위해 사용합니다. 값을 다시 보거나 API를호출하여 다시 가져올수 없으므로 잘 보관해야 합니다 |
mnemonic | String | empty. |
Example
getAddressTokenList
주소가 보유한 토큰 목록을 반환합니다.
Parameters
Name | Type | Description |
---|---|---|
address | String | 주소 |
Return Value
Name | Type | Description |
---|---|---|
address | String | 주소 |
contractAddress | String | 토큰의 컨트랙주소 |
symbol | String | 토큰의 심볼. |
tokenType | String | 토큰의 유형 "ERC20", "ERC721", "ERC1155" |
tokenId | BigInteger | ERC1155의 tokenId, ERC20, ERC721 토큰의 경우 공백입니다. |
balance | BigDecimal | 토큰 잔액. ERC1155 토큰의 경우 tokenId의 잔액입니다. |
Example
signData
트랜잭션을 수행하기 위해 address의 개인 키로 서명된 데이터를 반환합니다.
Parameters
Name | Type | Description |
---|---|---|
address | String | 주소 |
data | String | 서명할 데이터. 이것은 아마도 해시 값일 것입니다. |
tempKey | String | tempKey for "signData" |
hashKey | String | hash(tempKey | secretKey) |
Return Value
Name | Type | Description |
---|---|---|
signedData | String | 서명된 데이터 |
Example
Last updated