Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
898d5f6
init in new python monorepo
rihp Oct 18, 2022
8b07786
wip readme
rihp Oct 18, 2022
30089f3
readme improvements
rihp Oct 18, 2022
19dae61
improved readme!
rihp Oct 18, 2022
749df0d
readme improvements
rihp Oct 18, 2022
cb85741
wip: adding big number tests
rihp Oct 18, 2022
c7b2cd6
more bignumber tests passing
rihp Oct 18, 2022
2d1add7
more bignumber tests
rihp Oct 18, 2022
860e7cd
more test cases for sha3 and big number
rihp Oct 18, 2022
560c6f6
including sha3 wrapper in the simple-invoke test cases
rihp Oct 18, 2022
17d6dab
created tests for SHA3, KECCAK, and SHAKE
rihp Oct 18, 2022
ed3462a
linting improvements on client module
rihp Oct 18, 2022
4a135fa
linting
rihp Oct 18, 2022
45fced9
linting
rihp Oct 18, 2022
f468a08
linting
rihp Oct 18, 2022
945162b
Merge pull request #1 from rihp/linting
rihp Oct 18, 2022
775cfd4
rollback_readme
rihp Oct 20, 2022
581bf98
rollback_readme
rihp Oct 20, 2022
a030781
cleanup bignumber tests file
rihp Oct 20, 2022
28ae103
cleanup bignumber tests file
rihp Oct 20, 2022
585e32f
feat: sha512 implemented
rihp Oct 20, 2022
14e1ae5
feat: sha384, sha256, sha224
rihp Oct 20, 2022
44258e2
adding assertions for sha3 test cases
rihp Oct 20, 2022
db420ef
adding assertions for sha3 test cases
rihp Oct 20, 2022
d4cddcd
sha3 tests
rihp Oct 20, 2022
2a0c0e4
init scaffolding
rihp Oct 20, 2022
25f434c
imports fix
rihp Oct 20, 2022
adac433
adding types for clientconfigbuilder
rihp Oct 20, 2022
dba9ba5
wip: clientconfigbuilder.add_env function
rihp Oct 21, 2022
5cd9959
wip: add_env
rihp Oct 21, 2022
c462d79
wip
rihp Oct 25, 2022
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
57 changes: 57 additions & 0 deletions packages/polywrap-client-config-builder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# TODO: update from JS client readme

# PolywrapClient Config Builder

A DSL for building the PolywrapClient config object.

Supports building configs using method chaining or imperatively.

```typescript=
import { ClientConfigBuilder } from "@polywrap/client-config-builder-js";
import { PolywrapClient } from "@polywrap/client-js";

const config = new ClientConfigBuilder()
.add({
envs: [/*...*/],
interfaces: [/*...*/],
plugins: [/*...*/],
redirects: [/*...*/],
uriResolvers: [/*...*/],
})
.add({/*...*/})
.build();

// ...

const builder = new ClientConfigBuilder();

builder.addDefaults();

builder.add({
plugins: [/*...*/]
});

builder.add({
envs: [/*...*/]
});

const config = builder.build();


// ...

let client = new PolywrapClient(config);
```

## Methods

The config builder currently supports 3 methods:

#### `add(config: Partial<ClientConfig>)`
Appends each property of the supplied config object to the corresponding array of the builder's config.

#### `addDefaults()`
Adds the `defaultClientConfig` object.

#### `build()`
Returns a sanitized config object from the builder's config.
Loading