<commit_before># bitshares

A Bitshares API consuming a websocket connection to an active full node or a RPC connection to your `cli_wallet`. 
Look for several examples in [examples](/examples) and [tests](/tests) folder. This is work in progress and may have breaking changes. 
No additional cgo dependencies for transaction signing required. 
Use it at your own risk. 

## install

```
go get -u github.com/denkhaus/bitshares
```

Install dev-dependencies with
```
make init
```

This API uses [ffjson](https://github.com/pquerna/ffjson). 
If you change types or operations you have to regenerate the required static `MarshalJSON` and `UnmarshalJSON` functions for the new/changed code.

```
make generate
```
If you encounter any errors, try: 

```
make generate_new
```
to generate ffjson helpers from scratch.


## generate operation samples
To generate op samples for testing, go to [gen](/gen) package.
Generated operation samples get injected automatically while running operation tests.

## testing

To test this stuff I use a combined Docker based MainNet/TestNet wallet, you can find [here](https://github.com/denkhaus/bitshares-docker).
Operations testing uses generated real blockchain sample code by [gen](/gen) package. To test run:
// func (suite *operationsAPITest) Test_WithdrawPermissionUpdateOperation() {
// 	suite.OpSamplesTest(&WithdrawPermissionUpdateOperation{})
// }
```
make test_operations
make test_api
```

or a long running block (deserialize/serialize/compare) range test.

```
make test_blocks
```

## code
<commit_msg>change readme<commit_after># bitshares

A Bitshares API consuming a websocket connection to an active full node or a RPC connection to your `cli_wallet`. 
Look for several examples in [examples](/examples) and [tests](/tests) folder. This is work in progress and may have breaking changes. 
No additional cgo dependencies for transaction signing required. 
Use it at your own risk. 

## install

```
go get -u github.com/denkhaus/bitshares
```

Install dev-dependencies with
```
make init
```

This API uses [ffjson](https://github.com/pquerna/ffjson). 
If you change types or operations you have to regenerate the required static `MarshalJSON` and `UnmarshalJSON` functions for the new/changed code.

```
make generate
```
If you encounter any errors, try: 

```
make generate_new
```
to generate ffjson helpers from scratch.

## generate operation samples
To generate op samples for testing, go to [gen](/gen) package.
Generated operation samples get injected automatically while running operation tests.

## testing
To test this stuff I use a combined docker based MainNet/TestNet wallet, you can find [here](https://github.com/denkhaus/bitshares-docker).
Operations testing uses generated real blockchain sample code by [gen](/gen) package. To test run:

```
make test_operations
make test_api
```

or a long running block (deserialize/serialize/compare) range test.

```
make test_blocks
```

## code

{'fraction_non_alphanumeric': 0.09026369168356999, 'fraction_numerical': 0.0, 'mean_word_length': 4.76803118908382, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4340924', 'n_tokens_mistral': 844, 'n_tokens_neox': 799, 'n_words': 354}