Skip to content

Commit

Permalink
refactor(app-ws)!: simplify zome call parameters (#297)
Browse files Browse the repository at this point in the history
* refactor(app-ws)!: simplify zome call parameters

* fix: delete missing export

* docs: rebuild

---------

Co-authored-by: Jost Schulte <[email protected]>
  • Loading branch information
jost-s and jost-s authored Nov 21, 2024
1 parent de866af commit 23e2553
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 292 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Added
### Fixed
### Changed
- Simplify zome call parameters. `cap_secret`, `provenance` and `payload` are optional parameters of a `CallZomeRequest`. If implicit zome call signing is used, which happens when calling a zome with a `CallZomeRequest`, `provenance` and `cap_secret` are automatically set with the authorized signing credentials. It is still possible to call a cell by its role name instead of its cell id. Alternatively to passing in a `CallZomeRequest`, `callZome` can be invoked with a signed request `CallZomeRequestSigned`, where the zome call parameters have already been serialized and signed.
### Removed

## 2024-11-21: v0.19.0-dev.4
Expand Down
14 changes: 0 additions & 14 deletions docs/client.appcallzomerequest.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/client.appclient.callzome.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Signature:**

```typescript
callZome(args: AppCallZomeRequest, timeout?: number): Promise<any>;
callZome(args: CallZomeRequest | RoleNameCallZomeRequest, timeout?: number): Promise<any>;
```

## Parameters
Expand Down Expand Up @@ -35,7 +35,7 @@ args

</td><td>

[AppCallZomeRequest](./client.appcallzomerequest.md)
[CallZomeRequest](./client.callzomerequest.md) \| [RoleNameCallZomeRequest](./client.rolenamecallzomerequest.md)


</td><td>
Expand Down
4 changes: 2 additions & 2 deletions docs/client.appwebsocket.callzome.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Call a zome.
**Signature:**

```typescript
callZome<ReturnType>(request: AppCallZomeRequest, timeout?: number): Promise<ReturnType>;
callZome<ReturnType>(request: CallZomeRequest | RoleNameCallZomeRequest, timeout?: number): Promise<ReturnType>;
```

## Parameters
Expand Down Expand Up @@ -37,7 +37,7 @@ request

</td><td>

[AppCallZomeRequest](./client.appcallzomerequest.md)
[CallZomeRequest](./client.callzomerequest.md) \| [RoleNameCallZomeRequest](./client.rolenamecallzomerequest.md)


</td><td>
Expand Down
11 changes: 0 additions & 11 deletions docs/client.callzomerequestallparams.cap_secret.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/client.callzomerequestallparams.expires_at.md

This file was deleted.

89 changes: 0 additions & 89 deletions docs/client.callzomerequestallparams.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/client.callzomerequestallparams.nonce.md

This file was deleted.

9 changes: 6 additions & 3 deletions docs/client.callzomerequestgeneric.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ export type CallZomeRequestGeneric<Payload> = {
cell_id: CellId;
zome_name: ZomeName;
fn_name: FunctionName;
payload: Payload;
provenance: AgentPubKey;
provenance?: AgentPubKey;
payload?: Payload;
cap_secret?: CapSecret;
nonce?: Nonce256Bit;
expires_at?: number;
};
```
**References:** [CellId](./client.cellid.md)<!-- -->, [ZomeName](./client.zomename.md)<!-- -->, [FunctionName](./client.functionname.md)<!-- -->, [AgentPubKey](./client.agentpubkey.md)
**References:** [CellId](./client.cellid.md)<!-- -->, [ZomeName](./client.zomename.md)<!-- -->, [FunctionName](./client.functionname.md)<!-- -->, [AgentPubKey](./client.agentpubkey.md)<!-- -->, [CapSecret](./client.capsecret.md)<!-- -->, [Nonce256Bit](./client.nonce256bit.md)

40 changes: 0 additions & 40 deletions docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,16 +591,6 @@ Description



</td></tr>
<tr><td>

[CallZomeRequestAllParams](./client.callzomerequestallparams.md)


</td><td>



</td></tr>
<tr><td>

Expand Down Expand Up @@ -1442,16 +1432,6 @@ This type is meant to be opaque



</td></tr>
<tr><td>

[AppCallZomeRequest](./client.appcallzomerequest.md)


</td><td>



</td></tr>
<tr><td>

Expand Down Expand Up @@ -2524,16 +2504,6 @@ An internal link type index within the DNA, from 0 to 255.



</td></tr>
<tr><td>

[NonProvenanceCallZomeRequest](./client.nonprovenancecallzomerequest.md)


</td><td>



</td></tr>
<tr><td>

Expand Down Expand Up @@ -2748,16 +2718,6 @@ If the key could not be deleted from all cells, the call [RevokeAgentKeyRequest]



</td></tr>
<tr><td>

[RoleNameCallZomeRequestSigned](./client.rolenamecallzomerequestsigned.md)


</td><td>



</td></tr>
<tr><td>

Expand Down
14 changes: 0 additions & 14 deletions docs/client.nonprovenancecallzomerequest.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/client.rolenamecallzomerequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
**Signature:**

```typescript
export type RoleNameCallZomeRequest = Omit<NonProvenanceCallZomeRequest, "cell_id"> & {
export type RoleNameCallZomeRequest = Omit<CallZomeRequest, "cell_id"> & {
role_name: RoleName;
};
```
**References:** [NonProvenanceCallZomeRequest](./client.nonprovenancecallzomerequest.md)<!-- -->, [RoleName](./client.rolename.md)
**References:** [CallZomeRequest](./client.callzomerequest.md)<!-- -->, [RoleName](./client.rolename.md)

16 changes: 0 additions & 16 deletions docs/client.rolenamecallzomerequestsigned.md

This file was deleted.

Loading

0 comments on commit 23e2553

Please sign in to comment.