Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt node-api to recurrent fees. #206

Merged
merged 5 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/client-node/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Logion Client SDK (browser)
# Logion Client SDK (node)

This project provides a JS/TypeScript SDK enabling an application running in a browser to interact with a logion network.
This project provides a JS/TypeScript SDK enabling an application running in a Node.js environment, to interact with a logion network.

## Installation

Use your favorite package manager (e.g. yarn) and install package `@logion/client-browser` in your JavaScript/TypeScript project.
Use your favorite package manager (e.g. yarn) and install package `@logion/client-node` in your JavaScript/TypeScript project.

## Usage

Expand Down
4 changes: 4 additions & 0 deletions packages/client-node/config/ipfs-cluster1/identity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"id": "12D3KooWHpQ7R7EHsm5KrnPfbEvYAp9C4AD9J42EosATYtEbGzMw",
"private_key": "CAESQESsX1Ey1mlZ64rayr54hxUPELHwEZKKMaMZt2gGpi2Rdt+xIu6KTbbikVMiT85ctUX4A2UnWkpIDticV8RRH5o="
}
168 changes: 168 additions & 0 deletions packages/client-node/config/ipfs-cluster1/service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
{
"cluster": {
"peername": "node1",
"secret": "2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b",
"leave_on_shutdown": false,
"listen_multiaddress": [
"/ip4/0.0.0.0/tcp/9096",
"/ip4/0.0.0.0/udp/9096/quic"
],
"enable_relay_hop": true,
"connection_manager": {
"high_water": 400,
"low_water": 100,
"grace_period": "2m0s"
},
"dial_peer_timeout": "3s",
"state_sync_interval": "5m0s",
"pin_recover_interval": "12m0s",
"replication_factor_min": -1,
"replication_factor_max": -1,
"monitor_ping_interval": "2s",
"peer_watch_interval": "5s",
"mdns_interval": "0",
"disable_repinning": false,
"peer_addresses": []
},
"consensus": {
"crdt": {
"cluster_name": "ipfs-cluster",
"trusted_peers": [
"*"
],
"batching": {
"max_batch_size": 0,
"max_batch_age": "0s"
},
"repair_interval": "1h0m0s"
}
},
"api": {
"ipfsproxy": {
"listen_multiaddress": "/ip4/127.0.0.1/tcp/9095",
"node_multiaddress": "/ip4/127.0.0.1/tcp/5001",
"log_file": "",
"read_timeout": "0s",
"read_header_timeout": "5s",
"write_timeout": "0s",
"idle_timeout": "1m0s",
"max_header_bytes": 4096
},
"restapi": {
"http_listen_multiaddress": "/ip4/0.0.0.0/tcp/9094",
"read_timeout": "0s",
"read_header_timeout": "5s",
"write_timeout": "0s",
"idle_timeout": "2m0s",
"max_header_bytes": 4096,
"basic_auth_credentials": null,
"http_log_file": "",
"headers": {},
"cors_allowed_origins": [
"*"
],
"cors_allowed_methods": [
"GET"
],
"cors_allowed_headers": [],
"cors_exposed_headers": [
"Content-Type",
"X-Stream-Output",
"X-Chunked-Output",
"X-Content-Length"
],
"cors_allow_credentials": true,
"cors_max_age": "0s"
}
},
"ipfs_connector": {
"ipfshttp": {
"node_multiaddress": "/dns4/client-node_ipfs1_1/tcp/5001",
"connect_swarms_delay": "30s",
"ipfs_request_timeout": "5m0s",
"pin_timeout": "2m0s",
"unpin_timeout": "3h0m0s",
"repogc_timeout": "24h0m0s",
"informer_trigger_interval": 0
}
},
"pin_tracker": {
"stateless": {
"concurrent_pins": 10,
"priority_pin_max_age": "24h0m0s",
"priority_pin_max_retries": 5
}
},
"monitor": {
"pubsubmon": {
"check_interval": "15s"
}
},
"allocator": {
"balanced": {
"allocate_by": [
"tag:group",
"freespace"
]
}
},
"informer": {
"disk": {
"metric_ttl": "30s",
"metric_type": "freespace"
},
"tags": {
"metric_ttl": "30s",
"tags": {
"group": "default"
}
}
},
"observations": {
"metrics": {
"enable_stats": false,
"prometheus_endpoint": "/ip4/127.0.0.1/tcp/8888",
"reporting_interval": "2s"
},
"tracing": {
"enable_tracing": false,
"jaeger_agent_endpoint": "/ip4/0.0.0.0/udp/6831",
"sampling_prob": 0.3,
"service_name": "cluster-daemon"
}
},
"datastore": {
"leveldb": {
"leveldb_options": {
"block_cache_capacity": 0,
"block_cache_evict_removed": false,
"block_restart_interval": 0,
"block_size": 0,
"compaction_expand_limit_factor": 0,
"compaction_gp_overlaps_factor": 0,
"compaction_l0_trigger": 0,
"compaction_source_limit_factor": 0,
"compaction_table_size": 0,
"compaction_table_size_multiplier": 0,
"compaction_table_size_multiplier_per_level": null,
"compaction_total_size": 0,
"compaction_total_size_multiplier": 0,
"compaction_total_size_multiplier_per_level": null,
"compression": 0,
"disable_buffer_pool": false,
"disable_block_cache": false,
"disable_compaction_backoff": false,
"disable_large_batch_transaction": false,
"iterator_sampling_rate": 0,
"no_sync": false,
"no_write_merge": false,
"open_files_cache_capacity": 0,
"read_only": false,
"strict": 0,
"write_buffer": 0,
"write_l0_pause_trigger": 0,
"write_l0_slowdown_trigger": 0
}
}
}
}
4 changes: 4 additions & 0 deletions packages/client-node/config/ipfs-cluster2/identity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"id": "12D3KooWGy66BfypN8Q1nGKvH92eAjYcx7ryvyhJoLHF8gHA7AGw",
"private_key": "CAESQHTuyPm35QRrSYxkQ5spp5SBn5FkYEaYhv2e2KiOp0wxaj3bCdfdEL0CdAQ1VmXuZQTIb1/O60hBVg7Fy54MnaA="
}
168 changes: 168 additions & 0 deletions packages/client-node/config/ipfs-cluster2/service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
{
"cluster": {
"peername": "node2",
"secret": "2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b",
"leave_on_shutdown": false,
"listen_multiaddress": [
"/ip4/0.0.0.0/tcp/9096",
"/ip4/0.0.0.0/udp/9096/quic"
],
"enable_relay_hop": true,
"connection_manager": {
"high_water": 400,
"low_water": 100,
"grace_period": "2m0s"
},
"dial_peer_timeout": "3s",
"state_sync_interval": "5m0s",
"pin_recover_interval": "12m0s",
"replication_factor_min": -1,
"replication_factor_max": -1,
"monitor_ping_interval": "2s",
"peer_watch_interval": "5s",
"mdns_interval": "0",
"disable_repinning": false,
"peer_addresses": ["/dns4/client-node_ipfs-cluster1_1/tcp/9096/p2p/12D3KooWHpQ7R7EHsm5KrnPfbEvYAp9C4AD9J42EosATYtEbGzMw"]
},
"consensus": {
"crdt": {
"cluster_name": "ipfs-cluster",
"trusted_peers": [
"*"
],
"batching": {
"max_batch_size": 0,
"max_batch_age": "0s"
},
"repair_interval": "1h0m0s"
}
},
"api": {
"ipfsproxy": {
"listen_multiaddress": "/ip4/127.0.0.1/tcp/9095",
"node_multiaddress": "/ip4/127.0.0.1/tcp/5001",
"log_file": "",
"read_timeout": "0s",
"read_header_timeout": "5s",
"write_timeout": "0s",
"idle_timeout": "1m0s",
"max_header_bytes": 4096
},
"restapi": {
"http_listen_multiaddress": "/ip4/0.0.0.0/tcp/9094",
"read_timeout": "0s",
"read_header_timeout": "5s",
"write_timeout": "0s",
"idle_timeout": "2m0s",
"max_header_bytes": 4096,
"basic_auth_credentials": null,
"http_log_file": "",
"headers": {},
"cors_allowed_origins": [
"*"
],
"cors_allowed_methods": [
"GET"
],
"cors_allowed_headers": [],
"cors_exposed_headers": [
"Content-Type",
"X-Stream-Output",
"X-Chunked-Output",
"X-Content-Length"
],
"cors_allow_credentials": true,
"cors_max_age": "0s"
}
},
"ipfs_connector": {
"ipfshttp": {
"node_multiaddress": "/dns4/client-node_ipfs2_1/tcp/5001",
"connect_swarms_delay": "30s",
"ipfs_request_timeout": "5m0s",
"pin_timeout": "2m0s",
"unpin_timeout": "3h0m0s",
"repogc_timeout": "24h0m0s",
"informer_trigger_interval": 0
}
},
"pin_tracker": {
"stateless": {
"concurrent_pins": 10,
"priority_pin_max_age": "24h0m0s",
"priority_pin_max_retries": 5
}
},
"monitor": {
"pubsubmon": {
"check_interval": "15s"
}
},
"allocator": {
"balanced": {
"allocate_by": [
"tag:group",
"freespace"
]
}
},
"informer": {
"disk": {
"metric_ttl": "30s",
"metric_type": "freespace"
},
"tags": {
"metric_ttl": "30s",
"tags": {
"group": "default"
}
}
},
"observations": {
"metrics": {
"enable_stats": false,
"prometheus_endpoint": "/ip4/127.0.0.1/tcp/8888",
"reporting_interval": "2s"
},
"tracing": {
"enable_tracing": false,
"jaeger_agent_endpoint": "/ip4/0.0.0.0/udp/6831",
"sampling_prob": 0.3,
"service_name": "cluster-daemon"
}
},
"datastore": {
"leveldb": {
"leveldb_options": {
"block_cache_capacity": 0,
"block_cache_evict_removed": false,
"block_restart_interval": 0,
"block_size": 0,
"compaction_expand_limit_factor": 0,
"compaction_gp_overlaps_factor": 0,
"compaction_l0_trigger": 0,
"compaction_source_limit_factor": 0,
"compaction_table_size": 0,
"compaction_table_size_multiplier": 0,
"compaction_table_size_multiplier_per_level": null,
"compaction_total_size": 0,
"compaction_total_size_multiplier": 0,
"compaction_total_size_multiplier_per_level": null,
"compression": 0,
"disable_buffer_pool": false,
"disable_block_cache": false,
"disable_compaction_backoff": false,
"disable_large_batch_transaction": false,
"iterator_sampling_rate": 0,
"no_sync": false,
"no_write_merge": false,
"open_files_cache_capacity": 0,
"read_only": false,
"strict": 0,
"write_buffer": 0,
"write_l0_pause_trigger": 0,
"write_l0_slowdown_trigger": 0
}
}
}
}
4 changes: 4 additions & 0 deletions packages/client-node/config/ipfs-cluster3/identity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"id": "12D3KooWEtFzvJiyfTCA6KNbM9gRrZ2vw5AheWbd36YmiVUr3Fpq",
"private_key": "CAESQHp9Oz0VWrs3Y/h/3vj45IXJWK67Y2itt/xL25ZOQy6dS0nIONpDDjWgwfMnqEs6qbR/fkbQ1Kpn6xX9FgKeMo4="
}
Loading
Loading