74 Commits

Author SHA1 Message Date
Jarvis Carroll
4f1958b210 use lists:unzip/1
Just a little thing I noticed could be improved.
2026-01-13 01:19:29 +00:00
Jarvis Carroll
3da9bd570b split coerce/3 into two functions
Also renamed coerce_bindings to erlang_args_to_fate, to match.
2026-01-09 04:39:58 +00:00
Jarvis Carroll
d2163c1ff8 split AACI out of hz.erl
So far the interface to hz.erl is mostly unchanged, apart from prepare_aaci/1

Maybe prepare_aaci should be re-exported, but using it is exactly in line with the
'inconvenient but more flexible primitives' that hz_aaci.erl is meant to represent,
so, maybe that is a fine place to have to go for it, dunno.
2026-01-07 09:40:55 +00:00
af1639d47b Fix missed version doodoo and patch 2025-12-23 13:55:11 +09:00
cb36bad74b Verup patch 2025-12-23 13:50:50 +09:00
a35118db7a Add naked reads to read/1 2025-12-23 13:48:12 +09:00
8b6085dee8 Make edoc happy 2025-12-22 11:52:29 +09:00
ebb84b39a1 Verup 2025-12-22 11:17:01 +09:00
2f93c4d503 Fix docs 2025-12-22 11:14:13 +09:00
b542205c0e Merge branch 'master' into formatters 2025-12-22 10:09:21 +09:00
d1cae68ce7 Merge pull request 'grids2' (#11) from grids2 into master
Reviewed-on: #11
2025-12-22 10:04:37 +09:00
e10ef8a460 Remember to wrap final values 2025-12-20 20:38:14 +09:00
79eb881208 Formatters work. Still need to write random testers. 2025-12-20 20:22:20 +09:00
9ac442ffb4 WIP 2025-12-20 17:26:46 +09:00
401f8dec7a WIP 2025-12-20 04:52:42 +09:00
81fef99d9c WIP 2025-12-20 04:23:34 +09:00
23137a677e WIP 2025-12-20 01:50:15 +09:00
b219d0f784 Add "metric" formatting 2025-12-20 00:56:13 +09:00
f5e955b583 Allow for a 'none' amount to prompt users for an amount. 2025-12-19 21:34:06 +09:00
1978ca59b3 Update specs 2025-12-18 10:37:06 +09:00
4ee6609111 Add lookup interface in hz 2025-12-18 09:06:53 +09:00
aeb78eab38 Add AACI caching 2025-12-18 09:03:21 +09:00
88c6f6dcc7 Spend/Transfer URLs 2025-12-18 04:13:01 +09:00
d5ff77b278 WIP 2025-12-12 09:53:24 +09:00
5a145207da WIP 2025-12-11 17:13:02 +09:00
11730de24a WIP 2025-12-05 17:38:57 +09:00
975325db14 WIP 2025-12-02 19:40:33 +09:00
beed46a38b WIP: omg stuff 2025-12-02 15:22:13 +09:00
e4e6e35bf8 WIP: Fix remaining cases 2025-12-01 18:36:50 +09:00
7393a02de2 WIP: Moving formatters to HZ 2025-12-01 12:06:05 +09:00
751c099a44 Merge branch 'master' into bin_sig 2025-10-29 15:53:03 +09:00
be0607f7c1 Remove dinkus file 2025-10-29 15:52:36 +09:00
c5349f5736 Fix silly nodes report bug 2025-10-29 15:35:05 +09:00
7252ecd40b spacing 2025-10-25 13:52:05 +09:00
e8febcf8d5 Finally implement the "sticky" chain node 2025-10-25 13:45:40 +09:00
8a42f4a7a3 verup 2025-10-25 12:49:29 +09:00
a305bf3511 Merge branch 'master' into bin_sig 2025-10-25 12:42:03 +09:00
f2fa83c215 Add binary signatures 2025-10-25 12:29:49 +09:00
4c09490f8a Remove zx lib calls 2025-10-14 16:40:42 +09:00
39b92996aa verup 2025-10-14 10:48:20 +09:00
d23196e746 Remove final logger include 2025-10-14 10:47:02 +09:00
e9b1bccf57 Make hz friendlier to non-zx projects 2025-10-14 10:45:04 +09:00
7c2db6eab7 Patch verup and fix TTL typespec 2025-10-11 10:10:39 +09:00
Jarvis Carroll
f770bc299e add {raw, binary()} case for all chain objects 2025-10-09 09:46:45 +11:00
Jarvis Carroll
c934510859 Complete AACI definition
This commit combines 13 separate commits:

add more atoms to AACI

serialize signatures

This took a surprising number of goose chases to work out... I had to
find out
- what is the gmser prefix for a signature (sg_)
- what is the gmb wrapper for a signature (none)
- what errors gmser can report when a signature is invalid
- what an example of a valid signature is
- what that example signature serializes to

coerce stringy booleans

coerce bytes

coerce bits

The thing to remember about bits is that they are actually integers...
It is tempting to present bits as binaries, but that hides the nuance of
the infinite leading zeroes, the potential for infinite leading ones,
etc.

coerce character

It's really just an integer... Should we flatten it to an integer
instead? I don't know.

Also coerce unicode strings to FATE

This is mainly so that gajudesk can pass text box content to hz as-is,
but also allows users to pass utf8 binaries in, if they want to, for
some reason.

Coerce binaries as-is

Sophia accepts both sg_... and #... as signatures, so we should probably
accept binaries as signatures directly. People might expect to be able
to put the listy string "#..." in too, but that is more complex to do.

coerce hashes

It turns out there are a lot of types that, like option, should only be
valid as an opaque/normalized type, but should be substituted for
something different in the flat representation. If we restructure things
a little then we can implement all of these in one go.

Refactor type normalization

Some of these checks were redundant, and we probably don't actually need
substitution to wrap success/failure, since it isn't expected to fail
anyway... Now the logic is much simpler, and adding more built-in type
definitions should be easy.

Add a map for builtin types

This makes it much easier to implement all these standard library
things.

In doing so I changed the convention for option, hash, unit, to be
stringy rather than atoms.

Also I changed some error messages based on what was more helpful during
debugging of the unit tests.

Add more builtin types

We probably should extract these from the standard library instead of
cherry picking the ones that are needed by the chain? e.g. Chain.tx
still doesn't work.

remaining types

`tx` isn't defined in all the same places that pointee, name, base_tx,
fr, fp are defined, but actually it is the only one not in the list I
was looking at, so we are all good. As demonstration, there is also a
test case for Set.set, despite Set.set not being defined as a builtin
type.
2025-09-30 16:14:11 +10:00
b13af3d082 Add dict 2025-04-16 16:07:45 +09:00
676117760e Adjust keymaster 2025-03-31 15:56:31 +09:00
468da93eda Add keymaster 2025-03-31 15:47:09 +09:00
4dea4b766c Add message signing 2025-03-31 15:44:21 +09:00
aa2d1adefd Update gmserialization dependency 2025-03-23 17:32:32 +09:00