Skip to content

Commit

Permalink
refactor(app-ws)!: simplify zome call signing (#295)
Browse files Browse the repository at this point in the history
* build: remove serialization pkg & add sha2 pkg

* refactor: zome call signing to match conductor api

* docs: add entry to changelog about zome call signing

* refactor! rename zome call unsigned type name

* ci: upgrade actions

* docs: rebuild

---------

Co-authored-by: Jost Schulte <[email protected]>
  • Loading branch information
jost-s and jost-s authored Nov 21, 2024
1 parent 4855813 commit c7cb501
Show file tree
Hide file tree
Showing 19 changed files with 130 additions and 93 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
uses: actions/checkout@v4

- name: Install nix
uses: cachix/install-nix-action@v27
uses: cachix/install-nix-action@v30
with:
install_url: https://releases.nixos.org/nix/nix-2.22.0/install
install_url: https://releases.nixos.org/nix/nix-2.24.9/install

- name: Set up cachix
uses: cachix/cachix-action@v14
uses: cachix/cachix-action@v15
with:
name: holochain-ci

Expand Down
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
- Zome call signing has been changed in Holochain to remove the requirement of imitating Holochain serialization. Signing is now a simplified process of serializing zome call parameters using MessagePack, then computing a SHA2 512-bit hash of the serialized bytes and signing the hash. The zome call payload consists of the serialized bytes and the signature.
### Removed

## 2024-11-12: v0.19.0-dev.2
Expand Down
56 changes: 34 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

```typescript
export type AppCallZomeRequest = NonProvenanceCallZomeRequest | RoleNameCallZomeRequest | CallZomeRequestSigned | RoleNameCallZomeRequestSigned;
export type AppCallZomeRequest = NonProvenanceCallZomeRequest | RoleNameCallZomeRequest | CallZomeRequest;
```
**References:** [NonProvenanceCallZomeRequest](./client.nonprovenancecallzomerequest.md)<!-- -->, [RoleNameCallZomeRequest](./client.rolenamecallzomerequest.md)<!-- -->, [CallZomeRequestSigned](./client.callzomerequestsigned.md)<!-- -->, [RoleNameCallZomeRequestSigned](./client.rolenamecallzomerequestsigned.md)
**References:** [NonProvenanceCallZomeRequest](./client.nonprovenancecallzomerequest.md)<!-- -->, [RoleNameCallZomeRequest](./client.rolenamecallzomerequest.md)<!-- -->, [CallZomeRequest](./client.callzomerequest.md)

2 changes: 1 addition & 1 deletion docs/client.callzomerequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
**Signature:**

```typescript
export type CallZomeRequest = CallZomeRequestGeneric<any>;
export type CallZomeRequest = CallZomeRequestGeneric<unknown>;
```
**References:** [CallZomeRequestGeneric](./client.callzomerequestgeneric.md)

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CallZomeRequestUnsigned](./client.callzomerequestunsigned.md) &gt; [cap\_secret](./client.callzomerequestunsigned.cap_secret.md)
[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CallZomeRequestParams](./client.callzomerequestparams.md) &gt; [cap\_secret](./client.callzomerequestparams.cap_secret.md)

## CallZomeRequestUnsigned.cap\_secret property
## CallZomeRequestParams.cap\_secret property

**Signature:**

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CallZomeRequestUnsigned](./client.callzomerequestunsigned.md) &gt; [expires\_at](./client.callzomerequestunsigned.expires_at.md)
[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CallZomeRequestParams](./client.callzomerequestparams.md) &gt; [expires\_at](./client.callzomerequestparams.expires_at.md)

## CallZomeRequestUnsigned.expires\_at property
## CallZomeRequestParams.expires\_at property

**Signature:**

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CallZomeRequestUnsigned](./client.callzomerequestunsigned.md)
[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CallZomeRequestParams](./client.callzomerequestparams.md)

## CallZomeRequestUnsigned interface
## CallZomeRequestParams interface


**Signature:**

```typescript
export interface CallZomeRequestUnsigned extends CallZomeRequest
export interface CallZomeRequestParams extends CallZomeRequest
```
**Extends:** [CallZomeRequest](./client.callzomerequest.md)
Expand Down Expand Up @@ -37,7 +37,7 @@ Description
</th></tr></thead>
<tbody><tr><td>
[cap\_secret](./client.callzomerequestunsigned.cap_secret.md)
[cap\_secret](./client.callzomerequestparams.cap_secret.md)
</td><td>
Expand All @@ -54,7 +54,7 @@ Description
</td></tr>
<tr><td>
[expires\_at](./client.callzomerequestunsigned.expires_at.md)
[expires\_at](./client.callzomerequestparams.expires_at.md)
</td><td>
Expand All @@ -71,7 +71,7 @@ number
</td></tr>
<tr><td>
[nonce](./client.callzomerequestunsigned.nonce.md)
[nonce](./client.callzomerequestparams.nonce.md)
</td><td>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CallZomeRequestUnsigned](./client.callzomerequestunsigned.md) &gt; [nonce](./client.callzomerequestunsigned.nonce.md)
[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CallZomeRequestParams](./client.callzomerequestparams.md) &gt; [nonce](./client.callzomerequestparams.nonce.md)

## CallZomeRequestUnsigned.nonce property
## CallZomeRequestParams.nonce property

**Signature:**

Expand Down
11 changes: 11 additions & 0 deletions docs/client.callzomerequestsigned.bytes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [CallZomeRequestSigned](./client.callzomerequestsigned.md) &gt; [bytes](./client.callzomerequestsigned.bytes.md)

## CallZomeRequestSigned.bytes property

**Signature:**

```typescript
bytes: Uint8Array;
```
20 changes: 18 additions & 2 deletions docs/client.callzomerequestsigned.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
**Signature:**

```typescript
export interface CallZomeRequestSigned extends CallZomeRequestUnsigned
export interface CallZomeRequestSigned
```
**Extends:** [CallZomeRequestUnsigned](./client.callzomerequestunsigned.md)

## Properties

Expand All @@ -37,6 +36,23 @@ Description
</th></tr></thead>
<tbody><tr><td>

[bytes](./client.callzomerequestsigned.bytes.md)


</td><td>


</td><td>

Uint8Array


</td><td>


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

[signature](./client.callzomerequestsigned.signature.md)


Expand Down
4 changes: 2 additions & 2 deletions docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ Description
</td></tr>
<tr><td>

[CallZomeRequestSigned](./client.callzomerequestsigned.md)
[CallZomeRequestParams](./client.callzomerequestparams.md)


</td><td>
Expand All @@ -604,7 +604,7 @@ Description
</td></tr>
<tr><td>

[CallZomeRequestUnsigned](./client.callzomerequestunsigned.md)
[CallZomeRequestSigned](./client.callzomerequestsigned.md)


</td><td>
Expand Down
20 changes: 10 additions & 10 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c7cb501

Please sign in to comment.