Skip to content

Commit cfb2ab0

Browse files
authored
Merge pull request #1979 from hirosystems/develop
Cut beta release
2 parents e8ff517 + 521d771 commit cfb2ab0

File tree

24 files changed

+141
-53
lines changed

24 files changed

+141
-53
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ jobs:
921921
type=ref,event=pr
922922
type=semver,pattern={{version}},value=${{ steps.semantic.outputs.new_release_version }},enable=${{ steps.semantic.outputs.new_release_version != '' }}
923923
type=semver,pattern={{major}}.{{minor}},value=${{ steps.semantic.outputs.new_release_version }},enable=${{ steps.semantic.outputs.new_release_version != '' }}
924-
type=raw,value=latest,enable={{is_default_branch}}
924+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
925925
926926
- name: Login to DockerHub
927927
uses: docker/login-action@v3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![CI](https://github.com/hirosystems/stacks-blockchain-api/actions/workflows/ci.yml/badge.svg)](https://github.com/hirosystems/stacks-blockchain-api/actions/workflows/ci.yml)
44
[![GitHub Releases](https://img.shields.io/github/v/release/hirosystems/stacks-blockchain-api?display_name=release)](https://github.com/hirosystems/stacks-blockchain-api/releases/latest)
5-
[![Docker Pulls](https://img.shields.io/docker/pulls/blockstack/stacks-blockchain-api-standalone)](https://hub.docker.com/r/hirosystems/stacks-blockchain-api-standalone/)
5+
[![Docker Pulls](https://img.shields.io/docker/pulls/blockstack/stacks-blockchain-api)](https://hub.docker.com/r/hirosystems/stacks-blockchain-api/)
66
[![NPM client package](https://img.shields.io/badge/npm-%40stacks%2Fblockchain--api--client-blue)](https://www.npmjs.org/package/@stacks/blockchain-api-client)
77

88
## Quick start

client/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,12 @@ await sub.unsubscribe();
4545
### Socket.io
4646

4747
```js
48-
import { io } from "socket.io-client";
49-
import * as stacks from '@stacks/blockchain-api-client';
48+
import { StacksApiSocketClient } from '@stacks/blockchain-api-client';
5049

51-
// for testnet, replace with https://api.testnet.hiro.so/
52-
const socketUrl = "https://api.mainnet.hiro.so/";
50+
// for testnet, replace with https://api.testnet.hiro.so
51+
const socketUrl = "https://api.mainnet.hiro.so";
5352

54-
const socket = io(socketUrl);
55-
const sc = new stacks.StacksApiSocketClient(socket);
53+
const sc = new StacksApiSocketClient({ url: socketUrl });
5654

5755
sc.subscribeAddressTransactions('ST3GQB6WGCWKDNFNPSQRV8DY93JN06XPZ2ZE9EVMA', (address, tx) => {
5856
console.log('address:', address);

client/src/socket-io/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ function createStacksApiSocket(opts?: StacksApiSocketConnectionOptions) {
4646
subscriptions: Array.from(new Set(opts?.subscriptions)).join(','),
4747
},
4848
};
49+
if (!socketOpts.transports) {
50+
socketOpts.transports = ['websocket'];
51+
}
4952
const socket: StacksApiSocket = io(getWsUrl(opts?.url ?? BASE_PATH).href, socketOpts);
5053
return socket;
5154
}

docker/docker-compose.dev.stacks-blockchain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.7'
22
services:
33
stacks-blockchain:
4-
image: 'hirosystems/stacks-api-e2e:stacks3.0-4d11d85'
4+
image: 'hirosystems/stacks-api-e2e:stacks3.0-0a2c0e2'
55
restart: on-failure
66
environment:
77
STACKS_EVENT_OBSERVER: host.docker.internal:3700

docker/docker-compose.dev.stacks-krypton.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.7'
22
services:
33
stacks-blockchain:
4-
image: 'hirosystems/stacks-api-e2e:stacks3.0-4d11d85'
4+
image: 'hirosystems/stacks-api-e2e:stacks3.0-0a2c0e2'
55
ports:
66
- '18443:18443' # bitcoin regtest JSON-RPC interface
77
- '18444:18444' # bitcoin regtest p2p

docs/api/rosetta/rosetta-network-status-response.schema.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"current_block_identifier",
77
"current_block_timestamp",
88
"genesis_block_identifier",
9-
"peers"
9+
"peers",
10+
"current_burn_block_height"
1011
],
1112
"properties": {
1213
"current_block_identifier": {
@@ -31,6 +32,10 @@
3132
"items": {
3233
"$ref": "./../../entities/rosetta/rosetta-network-peers.schema.json"
3334
}
35+
},
36+
"current_burn_block_height": {
37+
"type": "integer",
38+
"description": "The latest burn block height"
3439
}
3540
},
3641
"additionalProperties": false

docs/api/stacking/get-pox-cycle-signers.example.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@
55
"results": [
66
{
77
"signing_key": "0x038e3c4529395611be9abf6fa3b6987e81d402385e3d605a073f42f407565a4a3d",
8+
"signer_address": "STRYYQQ9M8KAF4NS7WNZQYY59X93XEKR31JP64CP",
89
"stacked_amount": "686251350000000000",
910
"stacked_amount_percent": 50,
1011
"weight": 5,
1112
"weight_percent": 55.55555555555556
1213
},
1314
{
1415
"signing_key": "0x029874497a7952483aa23890e9d0898696f33864d3df90939930a1f45421fe3b09",
16+
"signer_address": "STF9B75ADQAVXQHNEQ6KGHXTG7JP305J2GRWF3A2",
1517
"stacked_amount": "457500900000000000",
1618
"stacked_amount_percent": 33.333333333333336,
1719
"weight": 3,
1820
"weight_percent": 33.33333333333333
1921
},
2022
{
2123
"signing_key": "0x02dcde79b38787b72d8e5e0af81cffa802f0a3c8452d6b46e08859165f49a72736",
24+
"signer_address": "ST18MDW2PDTBSCR1ACXYRJP2JX70FWNM6YY2VX4SS",
2225
"stacked_amount": "228750450000000000",
2326
"stacked_amount_percent": 16.666666666666668,
2427
"weight": 1,

docs/entities/rosetta/rosetta-block.schema.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "object",
33
"title": "RosettaBlock",
44
"description": "Blocks contain an array of Transactions that occurred at a particular BlockIdentifier. A hard requirement for blocks returned by Rosetta implementations is that they MUST be inalterable: once a client has requested and received a block identified by a specific BlockIndentifier, all future calls for that same BlockIdentifier must return the same block contents.",
5-
"required": ["block_identifier", "parent_block_identifier", "timestamp", "transactions"],
5+
"required": ["block_identifier", "parent_block_identifier", "timestamp", "transactions", "metadata"],
66
"additionalProperties": false,
77
"properties": {
88
"block_identifier": {
@@ -25,14 +25,10 @@
2525
"metadata": {
2626
"type": "object",
2727
"description": "meta data",
28-
"required": ["transactions_root", "difficulty"],
28+
"required": ["burn_block_height"],
2929
"properties": {
30-
"transactions_root": {
31-
"type": "string",
32-
"description": ""
33-
},
34-
"difficulty": {
35-
"type": "string",
30+
"burn_block_height": {
31+
"type": "number",
3632
"description": ""
3733
}
3834
}

docs/entities/stacking/signer.example.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"signing_key": "0x038e3c4529395611be9abf6fa3b6987e81d402385e3d605a073f42f407565a4a3d",
3+
"signer_address": "STRYYQQ9M8KAF4NS7WNZQYY59X93XEKR31JP64CP",
34
"stacked_amount": "686251350000000000",
45
"stacked_amount_percent": 50,
56
"weight": 5,

0 commit comments

Comments
 (0)