Skip to content

Commit 5a1170f

Browse files
committed
finished solana
1 parent 67b76ff commit 5a1170f

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ logs
55
node_modules
66
out
77
.DS_Store
8+
cache

src/runtime.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,25 @@ export default class Bitcoin implements IRuntime {
1313
const headers = await this.generateCoinbaseCloudHeaders(core);
1414

1515
try {
16-
hash = await fetchBlockHash(core.poolConfig.rpc, +key, headers);
16+
hash = await fetchBlockHash(
17+
"https://proxy.alpha.kyve.network/bitcoin",
18+
+key,
19+
headers
20+
);
1721
} catch (err) {
22+
console.log(err);
1823
// The only time this should fail is if the height is out of range.
1924
throw err;
2025
}
2126

2227
try {
23-
block = await fetchBlock(core.poolConfig.rpc, hash, headers);
28+
block = await fetchBlock(
29+
"https://proxy.alpha.kyve.network/bitcoin",
30+
hash,
31+
headers
32+
);
2433
} catch (err) {
34+
console.log(err);
2535
throw err;
2636
}
2737

@@ -49,7 +59,7 @@ export default class Bitcoin implements IRuntime {
4959
return {
5060
"Content-Type": "application/json",
5161
Signature: signature,
52-
"Public-Key": pub_key,
62+
"Public-Key": pub_key.value,
5363
"Pool-ID": poolId,
5464
Timestamp: timestamp,
5565
};

0 commit comments

Comments
 (0)