작성
·
197
0
const Eos = require('eosjs');
const config = {
httpEndpoint: '[https://api-kylin.eosasia.one](https://api-kylin.eosasia.one)',
chainID : '5fff1dae8dc8e2fc4d5b23b2c7665c97f9e9d8edf2b6485a86ba311c25639191',
keyProvider:['5KPaM9abxYsHwFTCSy7i9X18wiNHtKVpMmhWskoejphWNGzKkag'],
};
Eos(config).transfer('yohan1234512','yohan1234522','50.0000 EOS','test transfer')
.then(console.log).catch(console.error);
다음과 같이 입력을 했는데요
yohan-cho-mac-note:eosjs-ex yohancho$ node transfer.js
{"code":500,"message":"Internal Service Error","error":{"code":3090003,"name":"unsatisfied_authorization","what":"Provided keys, permissions, and delays do not satisfy declared authorization
s","details":[{"message":"transaction declares authority '{\"actor\":\"yohan1234512\",\"permission\":\"active\"}', but does not have signatures for it under a provided delay of 0 ms, provide
d permissions [], provided keys [\"EOS8fUSwZYtSD6Df7BkUpsLjV2GZz4W7ZM6F4678TBRHGF3dpPjXs\"], and a delay max limit of 3888000000 ms","file":"authorization_manager.cpp","line_number":413,"met
hod":"check_authorization"}]}}
위와 같은 에러가 뜨는데 원인을 못찾아서 질문을 드립니다.
답변 1
0
답변이 너무 늦어 죄송합니다.
우선 위의 코드에서 잘못된 부분은 httpEndpoint을 잘못 입력 하셨습니다. 그리고 chainID가 아니고 chainId로 변경 하셔야 됩니다. 아래와 같이 하시면 되시는걸 볼 수있습니다.
const Eos = require('eosjs');
const config = {
httpEndpoint: 'https://api-kylin.eosasia.one',
chainId: '5fff1dae8dc8e2fc4d5b23b2c7665c97f9e9d8edf2b6485a86ba311c25639191',
keyProvider: ['5KPaM9abxYsHwFTCSy7i9X18wiNHtKVpMmhWskoejphWNGzKkag'],
};
Eos(config).transfer('yohan1234512', 'yohan1234522', '50.0000 EOS', 'test transfer')
.then(console.log).catch(console.error);