sigelo-contact 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  <!-- SPDX-License-Identifier: MIT -->
2
2
  # sigelo-contact
3
3
 
4
- Two agents swap a one-line code, then send each other end-to-end encrypted
4
+ Two agents swap a short code, then send each other end-to-end encrypted
5
5
  messages through a relay that holds them while one is offline and cannot read them. Each checks
6
6
  the other's sigelo chain offline; a key rotation keeps the contact. MIT; the relay,
7
7
  [sigelo-relay](https://github.com/csigelo/sigelo-relay), is AGPL-3.0.
8
8
 
9
9
  ```sh
10
- sigelo-agent invite --name bob # alice: one-time code, 24 hours
10
+ sigelo-agent invite --name bob # alice: K7F3-Q9ZP, once, 10 minutes
11
11
  sigelo-agent accept <code> --name alice # bob: checks alice offline, pairs
12
- sigelo-agent send bob "hello" # sent, or no_reader: bob away too long
12
+ sigelo-agent send bob "hello" # sent, or queued until bob's agent connects
13
13
  seq 3 | sigelo-agent send bob - --lines # one message a line, one login
14
14
  sigelo-agent inbox # what came since last time
15
15
  ```
@@ -0,0 +1,283 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // The BIP-39 English wordlist, 2048 words in their order (the order IS the encoding: never sort).
3
+ // Vendored from bitcoin/bips bip-0039/english.txt as trezor/python-mnemonic ships it, under that
4
+ // project's licence below. SHA-256 of the list one word a line, each line ending in "\n":
5
+ // BIP39_SHA256 (test-short.mjs checks it). Used for the four words of a pairing (short.mjs).
6
+ //
7
+ // The MIT License (MIT)
8
+ //
9
+ // Copyright (c) 2013 Pavol Rusnak
10
+ //
11
+ // Permission is hereby granted, free of charge, to any person obtaining a copy of this software
12
+ // and associated documentation files (the "Software"), to deal in the Software without
13
+ // restriction, including without limitation the rights to use, copy, modify, merge, publish,
14
+ // distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
15
+ // Software is furnished to do so, subject to the following conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be included in all copies or
18
+ // substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
21
+ // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
23
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
+ export const BIP39_SHA256 = '2f5eed53a4727b4bf8880d8f3f199efc90e58503646d9ff8eff3a2ed3b24dbda';
26
+ export const WORDS = Object.freeze(`
27
+ abandon ability able about above absent absorb abstract
28
+ absurd abuse access accident account accuse achieve acid
29
+ acoustic acquire across act action actor actress actual
30
+ adapt add addict address adjust admit adult advance
31
+ advice aerobic affair afford afraid again age agent
32
+ agree ahead aim air airport aisle alarm album
33
+ alcohol alert alien all alley allow almost alone
34
+ alpha already also alter always amateur amazing among
35
+ amount amused analyst anchor ancient anger angle angry
36
+ animal ankle announce annual another answer antenna antique
37
+ anxiety any apart apology appear apple approve april
38
+ arch arctic area arena argue arm armed armor
39
+ army around arrange arrest arrive arrow art artefact
40
+ artist artwork ask aspect assault asset assist assume
41
+ asthma athlete atom attack attend attitude attract auction
42
+ audit august aunt author auto autumn average avocado
43
+ avoid awake aware away awesome awful awkward axis
44
+ baby bachelor bacon badge bag balance balcony ball
45
+ bamboo banana banner bar barely bargain barrel base
46
+ basic basket battle beach bean beauty because become
47
+ beef before begin behave behind believe below belt
48
+ bench benefit best betray better between beyond bicycle
49
+ bid bike bind biology bird birth bitter black
50
+ blade blame blanket blast bleak bless blind blood
51
+ blossom blouse blue blur blush board boat body
52
+ boil bomb bone bonus book boost border boring
53
+ borrow boss bottom bounce box boy bracket brain
54
+ brand brass brave bread breeze brick bridge brief
55
+ bright bring brisk broccoli broken bronze broom brother
56
+ brown brush bubble buddy budget buffalo build bulb
57
+ bulk bullet bundle bunker burden burger burst bus
58
+ business busy butter buyer buzz cabbage cabin cable
59
+ cactus cage cake call calm camera camp can
60
+ canal cancel candy cannon canoe canvas canyon capable
61
+ capital captain car carbon card cargo carpet carry
62
+ cart case cash casino castle casual cat catalog
63
+ catch category cattle caught cause caution cave ceiling
64
+ celery cement census century cereal certain chair chalk
65
+ champion change chaos chapter charge chase chat cheap
66
+ check cheese chef cherry chest chicken chief child
67
+ chimney choice choose chronic chuckle chunk churn cigar
68
+ cinnamon circle citizen city civil claim clap clarify
69
+ claw clay clean clerk clever click client cliff
70
+ climb clinic clip clock clog close cloth cloud
71
+ clown club clump cluster clutch coach coast coconut
72
+ code coffee coil coin collect color column combine
73
+ come comfort comic common company concert conduct confirm
74
+ congress connect consider control convince cook cool copper
75
+ copy coral core corn correct cost cotton couch
76
+ country couple course cousin cover coyote crack cradle
77
+ craft cram crane crash crater crawl crazy cream
78
+ credit creek crew cricket crime crisp critic crop
79
+ cross crouch crowd crucial cruel cruise crumble crunch
80
+ crush cry crystal cube culture cup cupboard curious
81
+ current curtain curve cushion custom cute cycle dad
82
+ damage damp dance danger daring dash daughter dawn
83
+ day deal debate debris decade december decide decline
84
+ decorate decrease deer defense define defy degree delay
85
+ deliver demand demise denial dentist deny depart depend
86
+ deposit depth deputy derive describe desert design desk
87
+ despair destroy detail detect develop device devote diagram
88
+ dial diamond diary dice diesel diet differ digital
89
+ dignity dilemma dinner dinosaur direct dirt disagree discover
90
+ disease dish dismiss disorder display distance divert divide
91
+ divorce dizzy doctor document dog doll dolphin domain
92
+ donate donkey donor door dose double dove draft
93
+ dragon drama drastic draw dream dress drift drill
94
+ drink drip drive drop drum dry duck dumb
95
+ dune during dust dutch duty dwarf dynamic eager
96
+ eagle early earn earth easily east easy echo
97
+ ecology economy edge edit educate effort egg eight
98
+ either elbow elder electric elegant element elephant elevator
99
+ elite else embark embody embrace emerge emotion employ
100
+ empower empty enable enact end endless endorse enemy
101
+ energy enforce engage engine enhance enjoy enlist enough
102
+ enrich enroll ensure enter entire entry envelope episode
103
+ equal equip era erase erode erosion error erupt
104
+ escape essay essence estate eternal ethics evidence evil
105
+ evoke evolve exact example excess exchange excite exclude
106
+ excuse execute exercise exhaust exhibit exile exist exit
107
+ exotic expand expect expire explain expose express extend
108
+ extra eye eyebrow fabric face faculty fade faint
109
+ faith fall false fame family famous fan fancy
110
+ fantasy farm fashion fat fatal father fatigue fault
111
+ favorite feature february federal fee feed feel female
112
+ fence festival fetch fever few fiber fiction field
113
+ figure file film filter final find fine finger
114
+ finish fire firm first fiscal fish fit fitness
115
+ fix flag flame flash flat flavor flee flight
116
+ flip float flock floor flower fluid flush fly
117
+ foam focus fog foil fold follow food foot
118
+ force forest forget fork fortune forum forward fossil
119
+ foster found fox fragile frame frequent fresh friend
120
+ fringe frog front frost frown frozen fruit fuel
121
+ fun funny furnace fury future gadget gain galaxy
122
+ gallery game gap garage garbage garden garlic garment
123
+ gas gasp gate gather gauge gaze general genius
124
+ genre gentle genuine gesture ghost giant gift giggle
125
+ ginger giraffe girl give glad glance glare glass
126
+ glide glimpse globe gloom glory glove glow glue
127
+ goat goddess gold good goose gorilla gospel gossip
128
+ govern gown grab grace grain grant grape grass
129
+ gravity great green grid grief grit grocery group
130
+ grow grunt guard guess guide guilt guitar gun
131
+ gym habit hair half hammer hamster hand happy
132
+ harbor hard harsh harvest hat have hawk hazard
133
+ head health heart heavy hedgehog height hello helmet
134
+ help hen hero hidden high hill hint hip
135
+ hire history hobby hockey hold hole holiday hollow
136
+ home honey hood hope horn horror horse hospital
137
+ host hotel hour hover hub huge human humble
138
+ humor hundred hungry hunt hurdle hurry hurt husband
139
+ hybrid ice icon idea identify idle ignore ill
140
+ illegal illness image imitate immense immune impact impose
141
+ improve impulse inch include income increase index indicate
142
+ indoor industry infant inflict inform inhale inherit initial
143
+ inject injury inmate inner innocent input inquiry insane
144
+ insect inside inspire install intact interest into invest
145
+ invite involve iron island isolate issue item ivory
146
+ jacket jaguar jar jazz jealous jeans jelly jewel
147
+ job join joke journey joy judge juice jump
148
+ jungle junior junk just kangaroo keen keep ketchup
149
+ key kick kid kidney kind kingdom kiss kit
150
+ kitchen kite kitten kiwi knee knife knock know
151
+ lab label labor ladder lady lake lamp language
152
+ laptop large later latin laugh laundry lava law
153
+ lawn lawsuit layer lazy leader leaf learn leave
154
+ lecture left leg legal legend leisure lemon lend
155
+ length lens leopard lesson letter level liar liberty
156
+ library license life lift light like limb limit
157
+ link lion liquid list little live lizard load
158
+ loan lobster local lock logic lonely long loop
159
+ lottery loud lounge love loyal lucky luggage lumber
160
+ lunar lunch luxury lyrics machine mad magic magnet
161
+ maid mail main major make mammal man manage
162
+ mandate mango mansion manual maple marble march margin
163
+ marine market marriage mask mass master match material
164
+ math matrix matter maximum maze meadow mean measure
165
+ meat mechanic medal media melody melt member memory
166
+ mention menu mercy merge merit merry mesh message
167
+ metal method middle midnight milk million mimic mind
168
+ minimum minor minute miracle mirror misery miss mistake
169
+ mix mixed mixture mobile model modify mom moment
170
+ monitor monkey monster month moon moral more morning
171
+ mosquito mother motion motor mountain mouse move movie
172
+ much muffin mule multiply muscle museum mushroom music
173
+ must mutual myself mystery myth naive name napkin
174
+ narrow nasty nation nature near neck need negative
175
+ neglect neither nephew nerve nest net network neutral
176
+ never news next nice night noble noise nominee
177
+ noodle normal north nose notable note nothing notice
178
+ novel now nuclear number nurse nut oak obey
179
+ object oblige obscure observe obtain obvious occur ocean
180
+ october odor off offer office often oil okay
181
+ old olive olympic omit once one onion online
182
+ only open opera opinion oppose option orange orbit
183
+ orchard order ordinary organ orient original orphan ostrich
184
+ other outdoor outer output outside oval oven over
185
+ own owner oxygen oyster ozone pact paddle page
186
+ pair palace palm panda panel panic panther paper
187
+ parade parent park parrot party pass patch path
188
+ patient patrol pattern pause pave payment peace peanut
189
+ pear peasant pelican pen penalty pencil people pepper
190
+ perfect permit person pet phone photo phrase physical
191
+ piano picnic picture piece pig pigeon pill pilot
192
+ pink pioneer pipe pistol pitch pizza place planet
193
+ plastic plate play please pledge pluck plug plunge
194
+ poem poet point polar pole police pond pony
195
+ pool popular portion position possible post potato pottery
196
+ poverty powder power practice praise predict prefer prepare
197
+ present pretty prevent price pride primary print priority
198
+ prison private prize problem process produce profit program
199
+ project promote proof property prosper protect proud provide
200
+ public pudding pull pulp pulse pumpkin punch pupil
201
+ puppy purchase purity purpose purse push put puzzle
202
+ pyramid quality quantum quarter question quick quit quiz
203
+ quote rabbit raccoon race rack radar radio rail
204
+ rain raise rally ramp ranch random range rapid
205
+ rare rate rather raven raw razor ready real
206
+ reason rebel rebuild recall receive recipe record recycle
207
+ reduce reflect reform refuse region regret regular reject
208
+ relax release relief rely remain remember remind remove
209
+ render renew rent reopen repair repeat replace report
210
+ require rescue resemble resist resource response result retire
211
+ retreat return reunion reveal review reward rhythm rib
212
+ ribbon rice rich ride ridge rifle right rigid
213
+ ring riot ripple risk ritual rival river road
214
+ roast robot robust rocket romance roof rookie room
215
+ rose rotate rough round route royal rubber rude
216
+ rug rule run runway rural sad saddle sadness
217
+ safe sail salad salmon salon salt salute same
218
+ sample sand satisfy satoshi sauce sausage save say
219
+ scale scan scare scatter scene scheme school science
220
+ scissors scorpion scout scrap screen script scrub sea
221
+ search season seat second secret section security seed
222
+ seek segment select sell seminar senior sense sentence
223
+ series service session settle setup seven shadow shaft
224
+ shallow share shed shell sheriff shield shift shine
225
+ ship shiver shock shoe shoot shop short shoulder
226
+ shove shrimp shrug shuffle shy sibling sick side
227
+ siege sight sign silent silk silly silver similar
228
+ simple since sing siren sister situate six size
229
+ skate sketch ski skill skin skirt skull slab
230
+ slam sleep slender slice slide slight slim slogan
231
+ slot slow slush small smart smile smoke smooth
232
+ snack snake snap sniff snow soap soccer social
233
+ sock soda soft solar soldier solid solution solve
234
+ someone song soon sorry sort soul sound soup
235
+ source south space spare spatial spawn speak special
236
+ speed spell spend sphere spice spider spike spin
237
+ spirit split spoil sponsor spoon sport spot spray
238
+ spread spring spy square squeeze squirrel stable stadium
239
+ staff stage stairs stamp stand start state stay
240
+ steak steel stem step stereo stick still sting
241
+ stock stomach stone stool story stove strategy street
242
+ strike strong struggle student stuff stumble style subject
243
+ submit subway success such sudden suffer sugar suggest
244
+ suit summer sun sunny sunset super supply supreme
245
+ sure surface surge surprise surround survey suspect sustain
246
+ swallow swamp swap swarm swear sweet swift swim
247
+ swing switch sword symbol symptom syrup system table
248
+ tackle tag tail talent talk tank tape target
249
+ task taste tattoo taxi teach team tell ten
250
+ tenant tennis tent term test text thank that
251
+ theme then theory there they thing this thought
252
+ three thrive throw thumb thunder ticket tide tiger
253
+ tilt timber time tiny tip tired tissue title
254
+ toast tobacco today toddler toe together toilet token
255
+ tomato tomorrow tone tongue tonight tool tooth top
256
+ topic topple torch tornado tortoise toss total tourist
257
+ toward tower town toy track trade traffic tragic
258
+ train transfer trap trash travel tray treat tree
259
+ trend trial tribe trick trigger trim trip trophy
260
+ trouble truck true truly trumpet trust truth try
261
+ tube tuition tumble tuna tunnel turkey turn turtle
262
+ twelve twenty twice twin twist two type typical
263
+ ugly umbrella unable unaware uncle uncover under undo
264
+ unfair unfold unhappy uniform unique unit universe unknown
265
+ unlock until unusual unveil update upgrade uphold upon
266
+ upper upset urban urge usage use used useful
267
+ useless usual utility vacant vacuum vague valid valley
268
+ valve van vanish vapor various vast vault vehicle
269
+ velvet vendor venture venue verb verify version very
270
+ vessel veteran viable vibrant vicious victory video view
271
+ village vintage violin virtual virus visa visit visual
272
+ vital vivid vocal voice void volcano volume vote
273
+ voyage wage wagon wait walk wall walnut want
274
+ warfare warm warrior wash wasp waste water wave
275
+ way wealth weapon wear weasel weather web wedding
276
+ weekend weird welcome west wet whale what wheat
277
+ wheel when where whip whisper wide width wife
278
+ wild will win window wine wing wink winner
279
+ winter wire wisdom wise wish witness wolf woman
280
+ wonder wood wool word work world worry worth
281
+ wrap wreck wrestle wrist write wrong yard year
282
+ yellow you young youth zebra zero zone zoo
283
+ `.trim().split(/\s+/));