diff --git a/.github/actions/glob/Dockerfile b/.github/actions/glob/Dockerfile index 4071c47429..28fc457106 100644 --- a/.github/actions/glob/Dockerfile +++ b/.github/actions/glob/Dockerfile @@ -1,4 +1,4 @@ -FROM jaredtobin/janeway:v0.13.4 +FROM jaredtobin/janeway:v0.15.2 COPY entrypoint.sh /entrypoint.sh EXPOSE 22/tcp ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/glob/entrypoint.sh b/.github/actions/glob/entrypoint.sh index cd9ecea225..7428213a5b 100755 --- a/.github/actions/glob/entrypoint.sh +++ b/.github/actions/glob/entrypoint.sh @@ -10,10 +10,10 @@ chmod 600 service-account chmod 600 id_ssh chmod 600 id_ssh.pub -janeway release glob --dev --no-pill \ +janeway release glob-all --dev --no-pill \ --credentials service-account \ --ssh-key id_ssh \ - --do-it-live \ + --ci \ | bash SHORTHASH=$(git rev-parse --short HEAD) @@ -21,12 +21,12 @@ SHORTHASH=$(git rev-parse --short HEAD) janeway release prepare-ota arvo-glob-"$SHORTHASH" "$1" \ --credentials service-account \ --ssh-key id_ssh \ - --do-it-live \ + --ci \ | bash janeway release perform-ota "$1" \ --credentials service-account \ --ssh-key id_ssh \ - --do-it-live \ + --ci \ | bash diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml new file mode 100644 index 0000000000..92a8774e0f --- /dev/null +++ b/.github/workflows/chromatic.yml @@ -0,0 +1,27 @@ +name: Chromatic Deployment + +on: + pull_request: + paths: + - 'pkg/interface/**' + push: + paths: + - 'pkg/interface/**' + branches: + - 'release/next-userspace' + +jobs: + chromatic-deployment: + runs-on: ubuntu-latest + name: "Deploy Chromatic" + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - run: cd 'pkg/interface' && npm i + - name: Publish to Chromatic + uses: chromaui/action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + workingDir: pkg/interface diff --git a/.github/workflows/glob.yml b/.github/workflows/glob.yml index 3aabb75c9f..ba67d98cb8 100644 --- a/.github/workflows/glob.yml +++ b/.github/workflows/glob.yml @@ -2,7 +2,7 @@ name: glob on: push: branches: - - 'release/next-js' + - 'release/next-userspace' jobs: glob: runs-on: ubuntu-latest diff --git a/.github/workflows/merge-master.yml b/.github/workflows/merge-master.yml index 627d9e802d..48d0abf9fb 100644 --- a/.github/workflows/merge-master.yml +++ b/.github/workflows/merge-master.yml @@ -6,13 +6,13 @@ on: jobs: merge-to-next-js: runs-on: ubuntu-latest - name: "Merge master to release/next-js" + name: "Merge master to release/next-userspace" steps: - uses: actions/checkout@v2 - uses: devmasx/merge-branch@v1.3.1 with: type: now - target_branch: release/next-js + target_branch: release/next-userspace github_token: ${{ secrets.JANEWAY_BOT_TOKEN }} merge-to-group-timer: diff --git a/.github/workflows/typescript-check.yml b/.github/workflows/typescript-check.yml new file mode 100644 index 0000000000..6ad913bba4 --- /dev/null +++ b/.github/workflows/typescript-check.yml @@ -0,0 +1,14 @@ +name: typescript-check + +on: + pull_request: + paths: + - 'pkg/interface/**' + +jobs: + typescript-check: + runs-on: ubuntu-latest + name: "Check pkg/interface types" + steps: + - uses: actions/checkout@v2 + - run: cd 'pkg/interface' && npm i && npm run tsc diff --git a/.gitignore b/.gitignore index e79759dc67..14e61e6a84 100644 --- a/.gitignore +++ b/.gitignore @@ -76,4 +76,4 @@ pkg/interface/link-webext/web-ext-artifacts *.xz # Logs -*.log \ No newline at end of file +*.log diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 78b2eda4a9..eaca1e7bda 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -309,9 +309,9 @@ the new binary, and restarting the pier with it. #### Continuous deployment A subset of release branches are deployed continuously to the network. Thus far -this only includes `release/next-js`, which deploys livenet-compatible -JavaScript changes to select QA ships. Any push to master will automatically -merge master into `release/next-js` to keep the streams at parity. +this only includes `release/next-userspace`, which deploys livenet-compatible +changes to select QA ships. Any push to master will automatically +merge master into `release/next-userspace` to keep the streams at parity. ### Announce the update diff --git a/bin/ivory.pill b/bin/ivory.pill index dca958f7f4..9f9071cf92 100644 --- a/bin/ivory.pill +++ b/bin/ivory.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5758d6cd7f5a36b9f45e988bf032951e40711541d9edbf9d2d85efba1e959257 -size 4080881 +oid sha256:063cb7928607fd3e3882e46a369047e3304e1635ee7761e2daa1fe611eb74ca7 +size 7130416 diff --git a/bin/solid.pill b/bin/solid.pill index c6b1ca9148..afdacd3ef5 100644 --- a/bin/solid.pill +++ b/bin/solid.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:04e24541db4fad200778dc4ea67e2658844d5460f244cb62779332a0079a4e32 -size 9654865 +oid sha256:6d654c8c49f9836102b1db7dec7e625d5e8100ab7db4baa31b4184751c73c009 +size 15337032 diff --git a/pkg/arvo/app/acme.hoon b/pkg/arvo/app/acme.hoon index bbb53b8eb4..7d64a69f3f 100644 --- a/pkg/arvo/app/acme.hoon +++ b/pkg/arvo/app/acme.hoon @@ -1394,8 +1394,6 @@ ^+ this ?: =(~ dom) ~|(%acme-empty-certificate-order !!) - ?: ?=(?(%earl %pawn) (clan:title our.bow)) - this =. ..emit (queue-next-order 1 | dom) =. ..emit cancel-current-order :: notify %dill diff --git a/pkg/arvo/app/aggregator-rpc.hoon b/pkg/arvo/app/aggregator-rpc.hoon new file mode 100644 index 0000000000..777c0701da --- /dev/null +++ b/pkg/arvo/app/aggregator-rpc.hoon @@ -0,0 +1,262 @@ +:: Aggregator JSON-RPC API +:: +/- rpc=json-rpc, *dice +/+ naive, + azimuth-rpc, + json-rpc, + *server, + default-agent, + verb, + dbug, + version, + agentio +|% +:: ++$ card card:agent:gall +:: ++$ state-0 [%0 ~] +-- +:: +%+ verb | +%- agent:dbug +:: +=| state-0 +=* state - +:: +^- agent:gall +=< + |_ =bowl:gall + +* this . + do ~(. +> bowl) + def ~(. (default-agent this %|) bowl) + :: + ++ on-init + ^- (quip card _this) + ~& > 'init' + :_ this + [%pass /bind %arvo %e %connect [~ /v1/roller] dap.bowl]~ + :: + ++ on-save !>(state) + ++ on-load + |= old=vase + ^- (quip card _this) + [~ this(state !<(state-0 old))] + :: + ++ on-poke + |= [=mark =vase] + ^- (quip card _this) + |^ + ?> (team:title our.bowl src.bowl) + ?+ mark (on-poke:def mark vase) + %handle-http-request + =+ !<([id=@ta req=inbound-request:eyre] vase) + :_ this + (handle-http-request id req) + :: + %azimuth-action + =+ !<([%disconnect bind=binding:eyre] vase) + ~& >>> "disconnecting at {}" + :_ this + [%pass /bind %arvo %e %disconnect bind]~ + == + :: + ++ handle-http-request + |= [id=@ta =inbound-request:eyre] + ^- (list card) + |^ + =* req request.inbound-request + =* headers header-list.req + =/ req-line (parse-request-line url.req) + ?. =(method.req %'POST') + :: TODO: method not supported + :: + (give-simple-payload:app id not-found:gen) + ?~ rpc-request=(validate-request:json-rpc body.req) + :: TODO: malformed request + :: + (give-simple-payload:app id not-found:gen) + =/ [data=(list cage) response=simple-payload:http] + (process-rpc-request:do u.rpc-request) + %+ weld + (give-simple-payload:app id response) + |- + ?~ data ~ + :_ $(data t.data) + ^- card + [%pass / %agent [our.bowl %aggregator] %poke i.data] + -- + -- + :: + ++ on-watch + |= =path + ^- (quip card _this) + ?> (team:title our.bowl src.bowl) + ?+ path (on-watch:def path) + [%http-response *] [~ this] + == + :: + ++ on-arvo + |= [=wire =sign-arvo] + ^- (quip card _this) + ?+ sign-arvo (on-arvo:def wire sign-arvo) + [%eyre %bound *] + ~? !accepted.sign-arvo + [dap.bowl 'bind rejected!' binding.sign-arvo] + [~ this] + == + :: + ++ on-leave on-leave:def + ++ on-peek on-peek:def + ++ on-agent on-agent:def + ++ on-fail on-fail:def + -- +:: +|_ =bowl:gall +++ process-rpc-request + |= req=batch-request:rpc + ^- [(list cage) simple-payload:http] + |^ + ?- -.req + %o + =/ [data=(unit cage) =response:rpc] + (process p.req) + [(drop data) (render response)] + :: + %a + =| data=(list cage) + =| resp=(list response:rpc) + |- + ?~ p.req + [(flop data) (render %batch (flop resp))] + =/ [dat=(unit cage) res=response:rpc] + (process i.p.req) + =? data ?=(^ dat) [u.dat data] + $(p.req t.p.req, resp [res resp]) + == + :: + ++ render + |= res=response:rpc + %- json-response:gen + (response-to-json:json-rpc res) + :: + ++ process + |= request:rpc + =, azimuth-rpc + ?. ?=([%map *] params) + [~ ~(parse error:json-rpc id)] + =/ method=@tas (enkebab method) + ?: ?=(l2-tx method) + (process-rpc id +.params method) + ?+ method [~ ~(method error:json-rpc id)] + %get-point `(get-point id +.params point:scry) + %get-ships `(get-ships id +.params points:scry) + %cancel-transaction (cancel-tx id +.params) + %get-spawned `(get-spawned id +.params spawned:scry) + %get-all-pending `(all:pending id +.params all:pending:scry) + %get-pending-by-ship `(ship:pending id +.params ship:pending:scry) + %get-pending-by-address `(addr:pending id +.params addr:pending:scry) + %get-transaction-status `(status id +.params tx-status:scry) + %when-next-batch `(next-batch id +.params next-batch:scry) + %get-nonce `(nonce id +.params nonce:scry) + %get-history `(history id +.params addr:history:scry) + %get-roller-config `(get-config id +.params config:scry) + %hash-transaction `(hash-transaction id +.params chain-id:scry) + == + -- +:: +++ scry + |% + ++ point + |= =ship + .^ (unit point:naive) + %gx + (~(scry agentio bowl) %aggregator /point/(scot %p ship)/noun) + == + :: + ++ points + |= =address:naive + .^ (list ship) + %gx + (~(scry agentio bowl) %aggregator /points/(scot %ux address)/noun) + == + :: + ++ spawned + |= =ship + .^ (list [@p @ux]) + %gx + (~(scry agentio bowl) %aggregator /spawned/(scot %p ship)/noun) + == + :: + ++ pending + |% + ++ all + .^ (list pend-tx) + %gx + (~(scry agentio bowl) %aggregator /pending/noun) + == + :: + ++ ship + |= =^ship + .^ (list pend-tx) + %gx + (~(scry agentio bowl) %aggregator /pending/(scot %p ship)/noun) + == + :: + ++ addr + |= =address:naive + .^ (list pend-tx) + %gx + %+ ~(scry agentio bowl) %aggregator + /pending/[(scot %ux address)]/noun + == + -- + :: + ++ history + |% + ++ addr + |= =address:naive + .^ (list roller-tx) + %gx + (~(scry agentio bowl) %aggregator /history/(scot %ux address)/noun) + == + -- + :: + ++ tx-status + |= keccak=@ux + .^ ^tx-status + %gx + (~(scry agentio bowl) %aggregator /tx/(scot %ux keccak)/status/noun) + == + :: + ++ next-batch + .^ time + %gx + (~(scry agentio bowl) %aggregator /next-batch/noun) + == + :: + ++ nonce + |= [=ship =proxy:naive] + .^ (unit @) + %gx + %+ ~(scry agentio bowl) + %aggregator + /nonce/(scot %p ship)/[proxy]/noun + == + :: + ++ config + .^ roller-config + %gx + %+ ~(scry agentio bowl) + %aggregator + /config/noun + == + :: + ++ chain-id + .^ @ + %gx + %+ ~(scry agentio bowl) + %aggregator + /chain-id/noun + == + -- +-- diff --git a/pkg/arvo/app/aggregator.hoon b/pkg/arvo/app/aggregator.hoon index 6250ef2dca..e8d45a738b 100644 --- a/pkg/arvo/app/aggregator.hoon +++ b/pkg/arvo/app/aggregator.hoon @@ -16,79 +16,90 @@ :: when retrying, only do so if l2 txs remain in the "frozen" txs group. :: on %tx diff from naive, remove the matching tx from the frozen group. :: -::TODO remaining general work: -:: - hook up subscription to azimuth for %tx diffs -:: - hook up thread updates/results -:: - hook up timer callbacks -:: - cache state, upate after every azimuth %fact -:: - properly support private key changes -:: ::TODO questions: :: - it's a bit weird how we just assume the raw and tx in raw-tx to match... :: -/+ naive, default-agent, ethereum, dbug, verb -/= ttttt /tests/lib/naive ::TODO use new lib +/- *dice +/+ azimuth, + naive, + dice, + lib=naive-transactions, + default-agent, + ethereum, + dbug, + verb :: -::TODO /sur file for public types |% +$ state-0 $: %0 :: pending: the next l2 txs to be sent :: sending: the l2 txs currently sending/awaiting l2 confirmation - ::TODO should maybe key by [address nonce] instead. same for wires :: finding: raw-tx-hash reverse lookup for sending map + :: history: status of l2 txs by ethereum address + :: transfers: index that keeps track of transfer-proxy changes :: next-nonce: next l1 nonce to use + :: next-batch: when then next l2 batch will be sent + :: pre: predicted l2 state + :: own: ownership of azimuth points + :: derive-p: flag (derive predicted state) + :: derive-o: flag (derive ownership state) :: pending=(list pend-tx) - sending=(map nonce:naive [next-gas-price=@ud txs=(list raw-tx:naive)]) - finding=(map keccak $?(%confirmed %failed l1-tx-pointer)) - next-nonce=@ud + :: + $= sending + %+ map l1-tx-pointer + [next-gas-price=@ud txs=(list raw-tx:naive)] + :: + finding=(map keccak ?(%confirmed %failed l1-tx-pointer)) + history=(jug address:ethereum roller-tx) + transfers=(map ship address:ethereum) + next-nonce=(unit @ud) + next-batch=time + pre=^state:naive + own=owners + derive-p=? + derive-o=? :: :: pk: private key to send the roll :: frequency: time to wait between sending batches (TODO fancier) :: endpoint: ethereum rpc endpoint to use + :: contract: ethereum contract address + :: chain-id: mainnet, ropsten, local (https://chainid.network/) :: pk=@ frequency=@dr - endpoint=@t + endpoint=(unit @t) + contract=@ux + chain-id=@ == :: -+$ keccak @ux ++$ init [nas=^state:naive own=owners] :: -+$ tx-status - $: status=?(%unknown %pending %sending %confirmed %failed) - pointer=(unit l1-tx-pointer) - == -:: -+$ l1-tx-pointer - $: =address:ethereum - nonce=@ud - == -:: -::TODO cache sender address? -+$ pend-tx [force=? =raw-tx:naive] -:: -+$ part-tx - $% [%raw raw=octs] - [%don =tx:naive] - [%ful raw=octs =tx:naive] ::TODO redundant? ++$ config + $% [%frequency frequency=@dr] + [%setkey pk=@] + [%endpoint endpoint=@t] + [%network net=?(%mainnet %ropsten %local)] == :: +$ action - $% [%submit force=? sig=@ tx=part-tx] - [%cancel sig=@ keccak=@] - :: + $% :: we need to include the address in submit so pending txs show up + :: in the tx history, but because users can send the wrong + :: address, in +apply-tx:predicted state, we just replace + :: the provided address, with the one used when the message was signed; + :: + :: we need to do it there to know the correct nonce that the signed + :: message should have included. + :: + [%submit force=? =address:naive sig=@ tx=part-tx] + [%cancel sig=@ keccak=@ =l2-tx =ship] [%commit ~] ::TODO maybe pk=(unit @) later - [%config frequency=@dr] - [%setkey pk=@] - ::TODO configure endpoint, contract address, chain..? + [%config config] == :: +$ card card:agent:gall :: -::TODO config? -++ contract 0xb581.01cd.3bbb.cc6f.a40b.cdb0.4bb7.1623.b5c7.d39b -++ chain-id '1' +:: TODO: add to config :: ++ resend-time ~m5 :: @@ -110,9 +121,14 @@ :: ++ on-init ^- (quip card _this) - ::TODO set default frequency and endpoint? =. frequency ~h1 - [~ this] + =. contract naive:local-contracts:azimuth + =. chain-id chain-id:local-contracts:azimuth + =^ card next-batch set-timer + :_ this + :~ card + [%pass /azimuth-events %agent [our.bowl %azimuth] %watch /event] + == :: ++ on-save !>(state) ++ on-load @@ -125,28 +141,46 @@ ^- (quip card _this) =^ cards state ?+ mark (on-poke:def mark vase) - %aggregator-action + %aggregator-action =+ !<(poke=action vase) (on-action:do poke) == [cards this] :: +on-peek: scry paths - ::TODO reevaluate wrt recent flow changes :: :: /x/pending -> %noun (list pend-tx) :: /x/pending/[~ship] -> %noun (list pend-tx) :: /x/pending/[0xadd.ress] -> %noun (list pend-tx) :: /x/tx/[0xke.ccak]/status -> %noun tx-status - :: /x/nonce/[~ship]/[0xadd.ress] -> %atom @ + :: /x/history/[0xadd.ress] -> %noun (list roller-tx) + :: /x/nonce/[~ship]/[proxy] -> %noun (unit @) + :: /x/spawned/[~ship] -> %noun (list [ship address]) + :: /x/next-batch -> %atom time + :: /x/point/[~ship] -> %noun point:naive + :: /x/points/[0xadd.ress] -> %noun (list [ship point:naive]) + :: /x/config -> %noun config + :: /x/chain-id -> %atom @ :: ++ on-peek |= =path ^- (unit (unit cage)) + |^ ?+ path ~ - [%x %pending ~] ``noun+!>(pending) + [%x %pending ~] ``noun+!>(pending) + [%x %pending @ ~] (pending-by i.t.t.path) + [%x %tx @ %status ~] (status i.t.t.path) + [%x %history @ ~] (history i.t.t.path) + [%x %nonce @ @ ~] (nonce i.t.t.path i.t.t.t.path) + [%x %spawned @ ~] (spawned i.t.t.path) + [%x %next-batch ~] ``atom+!>(next-batch) + [%x %point @ ~] (point i.t.t.path) + [%x %points @ ~] (points i.t.t.path) + [%x %config ~] config + [%x %chain-id ~] ``atom+!>(chain-id) + == :: - [%x %pending @ ~] - =* wat i.t.t.path + ++ pending-by + |= wat=@t ?~ who=(slaw %p wat) :: by-address :: @@ -156,8 +190,7 @@ ``noun+!>(pending) %+ skim pending |= pend-tx - ::TODO deduce address from sig.raw-tx ? - !! + =(u.wer (need (get-l1-address tx.raw-tx pre))) :: by-ship :: =; pending=(list pend-tx) @@ -166,8 +199,9 @@ |= pend-tx =(u.who ship.from.tx.raw-tx) :: - [%x %tx @ %status ~] - ?~ keccak=(slaw %ux i.t.t.path) + ++ status + |= wat=@t + ?~ keccak=(slaw %ux wat) [~ ~] :+ ~ ~ :- %noun @@ -179,27 +213,107 @@ =; known=? [?:(known %pending %unknown) ~] %+ lien pending - |= [* raw-tx:naive] - =(u.keccak (hash-tx raw)) + |= pend-tx + =(u.keccak (hash-tx:lib raw.raw-tx)) :: - [%x %nonce @ @ ~] - ?~ who=(slaw %p i.t.t.path) + ++ history + |= wat=@t + :+ ~ ~ + :- %noun + !> ^- (list roller-tx) + ?~ addr=(slaw %ux wat) ~ + %~ tap in + (~(get ju ^history) u.addr) + :: + ++ nonce + |= [who=@t proxy=@t] + ?~ who=(slaw %p who) [~ ~] - =+ proxy=i.t.t.t.path ?. ?=(proxy:naive proxy) [~ ~] - =/ [* nas=^state:naive] pending-state:do - ::TODO or should we ~ when !(~(has by points.nas) who) ? - =/ =point:naive (~(gut by points.nas) u.who *point:naive) - =+ (proxy-from-point:naive proxy point) - ``atom+!>(nonce) - == + :+ ~ ~ + :- %noun + !> ^- (unit @) + ?~ point=(get:orm:naive points.pre u.who) + ~ + =< `nonce + (proxy-from-point:naive proxy u.point) + :: + ++ spawned + |= wat=@t + :+ ~ ~ + :- %noun + !> ^- (list [=^ship =address:ethereum]) + ?~ star=(slaw %p wat) ~ + =/ range + %+ lot:orm:naive points.pre + :: range exclusive [star next-star-first-planet-] + :: TODO: make range inclusive ([first-planet last-planet])? + :: + [`u.star `(cat 3 +(u.star) 0x1)] + %+ turn (tap:orm:naive range) + |= [=ship =point:naive] + ^- [=^ship =address:ethereum] + :- ship + address:(proxy-from-point:naive %own point) + :: + ++ point + |= wat=@t + ?~ ship=(rush wat ;~(pfix sig fed:ag)) + ``noun+!>(*(unit point:naive)) + ``noun+!>((get:orm:naive points.pre u.ship)) + :: + ++ points + |= wat=@t + :+ ~ ~ + :- %noun + !> ^- (list ship) + ?~ addr=(slaw %ux wat) + ~ + %~ tap in + (~(get ju own) u.addr) + :: + ++ config + :+ ~ ~ + :- %noun + !> ^- roller-config + :* next-batch + frequency + resend-time + contract + chain-id + == + -- :: ++ on-arvo |= [=wire =sign-arvo] ^- (quip card _this) - ?+ +<.sign-arvo (on-arvo:def wire sign-arvo) - %wake =^(cards state on-timer:do [cards this]) + ?+ wire (on-arvo:def wire sign-arvo) + [%timer ~] + ?+ +<.sign-arvo (on-arvo:def wire sign-arvo) + %wake =^(cards state on-timer:do [cards this]) + == + :: + [%predict ~] + ?+ +<.sign-arvo (on-arvo:def wire sign-arvo) + %wake + =. state (predicted-state canonical-state):do + `this(derive-p &) + == + :: + [%owners ~] + ?+ +<.sign-arvo (on-arvo:def wire sign-arvo) + %wake + =. own.state canonical-owners:do + `this(derive-o &) + == + :: + [%resend @ @ ~] + =/ [address=@ux nonce=@ud] + [(slav %ux i.t.wire) (rash i.t.t.wire dem)] + ?+ +<.sign-arvo (on-arvo:def wire sign-arvo) + %wake [(send-roll:do address nonce) this] + == == :: ++ on-fail @@ -209,7 +323,120 @@ :: ++ on-watch on-watch:def ++ on-leave on-leave:def - ++ on-agent on-agent:def + ++ on-agent + |= [=wire =sign:agent:gall] + ^- (quip card _this) + |^ + ?+ wire (on-agent:def wire sign) + [%send @ @ *] (send-batch i.t.wire i.t.t.wire sign) + [%azimuth-events ~] (azimuth-event sign) + [%nonce ~] (nonce sign) + == + :: + ++ send-batch + |= [address=@t nonce=@t =sign:agent:gall] + ^- (quip card _this) + =/ [address=@ux nonce=@ud] + [(slav %ux address) (rash nonce dem)] + ?- -.sign + %poke-ack + ?~ p.sign + %- (slog leaf+"Send batch thread started successfully" ~) + [~ this] + %- (slog leaf+"{(trip dap.bowl)} couldn't start thread" u.p.sign) + :_ this + [(leave:spider:do wire)]~ + :: + %watch-ack + ?~ p.sign + [~ this] + =/ =tank leaf+"{(trip dap.bowl)} couldn't start listen to thread" + %- (slog tank u.p.sign) + [~ this] + :: + %kick + [~ this] + :: + %fact + ?+ p.cage.sign (on-agent:def wire sign) + %thread-fail + =+ !<([=term =tang] q.cage.sign) + %- (slog leaf+"{(trip dap.bowl)} failed" leaf+ tang) + =^ cards state + (on-batch-result:do address nonce %.n^'thread failed') + [cards this] + :: + %thread-done + =+ !<(result=(each @ud @t) q.cage.sign) + =^ cards state + (on-batch-result:do address nonce result) + [cards this] + == + == + :: + ++ azimuth-event + |= =sign:agent:gall + ^- (quip card _this) + ?+ -.sign [~ this] + %watch-ack + ?~ p.sign [~ this] + =/ =tank leaf+"{(trip dap.bowl)} couldn't start listen to %azimuth" + %- (slog tank u.p.sign) + [~ this] + :: + %fact + ?+ p.cage.sign (on-agent:def wire sign) + %naive-diffs + =+ !<(=diff:naive q.cage.sign) + =^ cards state + (on-naive-diff:do diff) + [cards this] + :: + %naive-state + ~& > %received-azimuth-state + :: cache naive and ownership state + :: + =^ nas own.state !<(init q.cage.sign) + =. state (predicted-state:do nas) + `this + == + == + :: + ++ nonce + |= =sign:agent:gall + ^- (quip card _this) + ?- -.sign + %poke-ack + ?~ p.sign + %- (slog leaf+"Nonce thread started successfully" ~) + [~ this] + %- (slog leaf+"{(trip dap.bowl)} couldn't start thread" u.p.sign) + :_ this + [(leave:spider:do wire)]~ + :: + %watch-ack + ?~ p.sign + [~ this] + =/ =tank leaf+"{(trip dap.bowl)} couldn't start listen to thread" + %- (slog tank u.p.sign) + [~ this] + :: + %kick + [~ this] + :: + %fact + ?+ p.cage.sign (on-agent:def wire sign) + %thread-fail + =+ !<([=term =tang] q.cage.sign) + %- (slog leaf+"{(trip dap.bowl)} failed" leaf+ tang) + [~ this] + :: + %thread-done + =+ !<(nonce=@ud q.cage.sign) + [~ this(next-nonce `nonce)] + == + == + -- -- :: |_ =bowl:gall @@ -231,176 +458,333 @@ |= [=wire thread=term arg=vase] ^- (list card) =/ tid=@ta (rap 3 thread '--' (scot %uv eny.bowl) ~) - :~ (poke wire %spider-start !>([~ `tid thread arg])) - (watch wire %spider-start /thread-result/[tid]) + =/ args [~ `tid thread arg] + :~ [%pass wire %agent [our.bowl %spider] %watch /thread-result/[tid]] + [%pass wire %agent [our.bowl %spider] %poke %spider-start !>(args)] == :: - ++ poke - |= [=path =cage] - ^- card - [%pass path %agent [our.bowl %spider] %poke cage] - :: - ++ watch - |= [=path =sub=path] - ^- card - [%pass path %agent [our.bowl %spider] %watch sub-path] - :: ++ leave |= =path ^- card [%pass path %agent [our.bowl %spider] %leave ~] -- :: -++ hash-tx keccak-256:keccak:crypto -:: -++ hash-raw-tx - |= =raw-tx:naive - (hash-tx raw.raw-tx) -:: ++ part-tx-to-full |= =part-tx ^- [octs tx:naive] - ?+ -.part-tx !! - :: %raw [+.part-tx (decode-tx:naive +.part-tx)] - :: %don [(encode-tx:naive +.part-tx) +.part-tx] + ?- -.part-tx + %raw + ?~ batch=(parse-raw-tx:naive q.raw.part-tx) + ~& %parse-failed + :: TODO: maybe return a unit if parsing fails? + :: + !! + [raw tx]:-.u.batch + :: + %don [(gen-tx-octs:lib +.part-tx) +.part-tx] %ful +.part-tx == -:: +pending-state +:: +canonical-state: current l2 state from /app/azimuth :: -:: derives tentative state from pending txs and canonical state, -:: discarding invalid pending txs in the process. +++ canonical-state + .^ ^state:naive + %gx + (scot %p our.bowl) + %azimuth + (scot %da now.bowl) + /nas/noun + == +:: +canonical-owners: current azimuth point ownership :: -::TODO maybe want to cache locally, refresh on %fact from azimuth? +++ canonical-owners + .^ owners + %gx + (scot %p our.bowl) + %azimuth + (scot %da now.bowl) + /own/noun + == +:: +predicted-state :: -++ pending-state - ^- (quip pend-tx ^state:naive) - :: load current, canonical state - :: - =+ .^ nas=^state:naive - %gx - (scot %p our.bowl) - %azimuth - (scot %da now.bowl) - /nas/nas - == - :: apply our pending transactions - ::TODO should also apply txs from sending map! - :: - =| valid=_pending - |- ^+ [valid nas] - ?~ pending [(flop valid) nas] - :: - =^ gud=? nas (try-apply nas i.pending) - =? valid gud [i.pending valid] - $(pending t.pending) -:: +try-apply: +:: derives predicted state from applying pending/sending txs to +:: the canonical state, discarding invalid txs in the process. :: -++ try-apply - |= [nas=^state:naive force=? =raw-tx:naive] - ^- [success=? _nas] - ?. (verify-sig-and-nonce:naive verifier:ttttt chain-id nas raw-tx) - [force nas] +++ predicted-state + |= nas=^state:naive + ^+ state + =. pre.state nas + |^ + =^ nes state apply-sending + =^ nep state apply-pending + state(sending nes, pending nep) :: - =^ out points.nas (increment-nonce:naive nas from.tx.raw-tx) + ++ apply-pending + (apply-txs pending %pending) :: - ?~ nex=(receive-tx:naive nas tx.raw-tx) - [force nas] - [& +.u.nex] + ++ apply-sending + =| valid=_sending + =+ sending=~(tap by sending) + |- ^+ [valid state] + ?~ sending [valid state] + :: + =* key p.i.sending + =* val q.i.sending + =^ new-valid state + %+ apply-txs + (turn txs.val |=(=raw-tx:naive [| 0x0 raw-tx])) + %sending + =. valid + %+ ~(put by valid) key + val(txs (turn new-valid (cork tail tail))) + $(sending t.sending) + :: + ++ apply-txs + |= [txs=(list pend-tx) type=?(%pending %sending)] + =/ valid=_txs ~ + :: =| local=(set keccak) + |- ^+ [valid state] + ?~ txs [valid state] + :: + =* tx i.txs + =* raw-tx raw-tx.i.txs + =* ship ship.from.tx.raw-tx.i.txs + =/ hash=@ux (hash-raw-tx:lib raw-tx) + :: TODO: add tests to validate if this is necessary + :: + :: ?: (~(has in local) hash) + :: :: if tx was already seen here, skip + :: :: + :: $(txs t.txs) + =/ sign-address=(unit @ux) + (extract-address:lib raw-tx pre.state chain-id) + =^ gud=? state + (try-apply pre.state force.tx raw-tx) + :: TODO: only replace address if !=(address.tx sign-address)? + :: + =? tx &(gud ?=(^ sign-address)) + tx(address u.sign-address) + =? valid gud (snoc valid tx) + =? finding.state !gud + (~(put by finding.state) [hash %failed]) + =? history.state !gud + =/ =roller-tx + [ship type hash (l2-tx +<.tx.raw-tx)] + %. [address.tx roller-tx(status %failed)] + ~(put ju (~(del ju history.state) address.tx roller-tx)) + :: $(txs t.txs, local (~(put in local) hash)) + $(txs t.txs) + :: + ++ try-apply + |= [nas=^state:naive force=? =raw-tx:naive] + ^- [? _state] + =/ [success=? predicted=_nas owners=_own] + (apply-raw-tx:dice force raw-tx nas own chain-id) + :- success + state(pre predicted, own owners) + -- +:: +++ get-l1-address + |= [=tx:naive nas=^state:naive] + ^- (unit address:ethereum) + ?~ point=(get:orm:naive points.nas ship.from.tx) ~ + =< `address + (proxy-from-point:naive proxy.from.tx u.point) :: ++ on-action |= =action ^- (quip card _state) ?- -.action - %commit !! :: TODO send-roll - %config [~ state(frequency frequency.action)] - %setkey [~ state(pk pk.action)] ::TODO what about existing sending entries? + %commit on-timer + %config (on-config +.action) + %cancel (cancel-tx +.action) :: %submit - =^ success state - ^- [? _state] - %^ take-tx - force.action - sig.action - (part-tx-to-full tx.action) - :: TODO: consider failure case - ?> success - [~ state] - :: - %cancel - !! ::TODO + %- take-tx + :^ force.action + address.action + sig.action + (part-tx-to-full tx.action) == +:: +++ on-config + |= =config + ^- (quip card _state) + ?- -.config + %frequency [~ state(frequency frequency.config)] + %endpoint [~ state(endpoint `endpoint.config)] + :: + %network + :- ~ + =/ [contract=@ux chain-id=@] + =< [naive chain-id] + =, azimuth + ?- net.config + %mainnet mainnet-contracts + %ropsten ropsten-contracts + %local local-contracts + == + state(contract contract, chain-id chain-id) + :: + %setkey + ?~ pk=(de:base16:mimes:html pk.config) + `state + [(get-nonce q.u.pk) state(pk q.u.pk)] + == +:: TODO: move address to state? +:: +++ get-address + ^- address:ethereum + (address-from-prv:key:ethereum pk) +:: +cancel-tx: cancel a pending transaction +:: +++ cancel-tx + |= [sig=@ =keccak =l2-tx =ship] + ^- (quip card _state) + ?^ status=(~(get by finding) keccak) + ~? lverb [dap.bowl %tx-not-pending status+u.status] + [~ state] + :: "cancel: 0x1234abcd" + :: + =/ message=octs + %: cad:naive 3 + 8^'cancel: ' + :: + =; hash=@t + (met 3 hash)^hash + (crip "0x{((x-co:co 20) keccak)}") + :: + ~ + == + ?~ addr=(verify-sig:lib sig message) + ~? lverb [dap.bowl %cancel-sig-fail] + [~ state] + :: TODO: mark as failed instead? add a %cancelled to tx-status? + :: + =. history + %+ ~(del ju history) u.addr + [ship %pending keccak l2-tx] + =. pending + %+ skip pending + |= pend-tx + =(keccak (hash-raw-tx:lib raw-tx)) + [~ state] :: +take-tx: accept submitted l2 tx into the :pending list -::TODO rewrite :: ++ take-tx - |= [force=? =raw-tx:naive] - ^- [success=? _state] - =/ [nep=_pending nas=^state:naive] pending-state - =| success=? - :: TODO: actually use try-apply when proper Tx signing in place + |= pend-tx + ^- (quip card _state) + =/ hash=@ux (hash-raw-tx:lib raw-tx) + :: TODO: what if this hash/tx is already in the history? + :: e.g. if previously failed, but now it will go through + :: a) check in :finding that hash doesn't exist and if so, skip ? + :: b) extract the status from :finding, use it to delete + :: the entry in :history, and then insert it as %pending ? :: - :: =^ success nas - :: (try-apply nas force raw-tx) - ::TODO want to notify about dropped pendings, or no? client prolly polls... - =? pending success (snoc nep [force raw-tx]) - ::TODO cache nas? - [success state] + :: =/ not-sent=? !(~(has by finding) hash) + :: =? pending not-sent + =. pending (snoc pending [force address raw-tx]) + :: =? history not-sent + =. history + %+ ~(put ju history) address + [ship.from.tx.raw-tx %pending hash (l2-tx +<.tx.raw-tx)] + =? transfers =(%transfer-point (l2-tx +<.tx.raw-tx)) + (~(put by transfers) ship.from.tx.raw-tx address) + :: ?. not-sent ~& "skip" [~ state] + :: toggle flush flag + :: + :_ state(derive-p ?:(derive-p | derive-p)) + ?. derive-p ~ + :: derive predicted state in 5m. + :: + [(wait:b:sys /predict (add ~m5 now.bowl))]~ :: +set-timer: %wait until next whole :frequency :: ++ set-timer - ^- card - %+ wait:b:sys /timer - (mul +((div now.bowl frequency)) frequency) + ^- [=card =time] + =+ time=(mul +((div now.bowl frequency)) frequency) + [(wait:b:sys /timer time) time] :: +on-timer: every :frequency, freeze :pending txs roll and start sending it :: ++ on-timer ^- (quip card _state) + =. state (predicted-state canonical-state) =^ cards state - ?~ pending [~ state] - =/ nonce=@ud next-nonce - =: :: FIXME: what's up with this? `pending ~` also fails - :: pending *(list pend-tx) - next-nonce +(next-nonce) + ?: =(~ pending) [~ state] + ?~ next-nonce + ~&([dap.bowl %no-nonce] [~ state]) + =/ nonce=@ud u.next-nonce + =: pending ~ + derive-p & + next-nonce `+(u.next-nonce) :: sending - %+ ~(put by sending) nonce - [0 (turn pending tail)] + %+ ~(put by sending) + [get-address nonce] + [0 (turn pending (cork tail tail))] + :: + finding + %- ~(gas by finding) + %+ turn pending + |= pend-tx + (hash-raw-tx:lib raw-tx)^[address nonce] + :: + history + %+ roll pending + |= [pend-tx hist=_history] + =/ tx=roller-tx + :^ ship.from.tx.raw-tx + %pending + (hash-raw-tx:lib raw-tx) + (l2-tx +<.tx.raw-tx) + %+ ~(put ju (~(del ju hist) address tx)) + address + tx(status %sending) == - [(send-roll nonce) state] - [[set-timer cards] state] + [(send-roll get-address nonce) state] + =^ card next-batch set-timer + [[card cards] state] +:: +get-nonce: retrieves the latest nonce +:: +++ get-nonce + |= pk=@ + ^- (list card) + ?~ endpoint ~&([dap.bowl %no-endpoint] ~) + (start-thread:spider /nonce [%aggregator-nonce !>([u.endpoint pk])]) +:: :: +send-roll: start thread to submit roll from :sending to l1 :: ++ send-roll - |= nonce=@ud + |= [=address:ethereum nonce=@ud] ^- (list card) :: if this nonce isn't in the sending queue anymore, it's done :: - ?. (~(has by sending) nonce) - ~? lverb [dap.bowl %done-sending nonce] + ?. (~(has by sending) [address nonce]) + ~? lverb [dap.bowl %done-sending [address nonce]] ~ :: start the thread, passing in the l2 txs to use :: + ?~ endpoint ~&([dap.bowl %no-endpoint] ~) ::TODO should go ahead and set resend timer in case thread hangs, or nah? %+ start-thread:spider - /send/(scot %ud nonce) + /send/(scot %ux address)/(scot %ud nonce) :- %aggregator-send - !> - :* endpoint + !> ^- rpc-send-roll + :* u.endpoint contract chain-id - 0x1234.5678 + pk nonce - (~(got by sending) nonce) + (~(got by sending) [address nonce]) == -:: +on-thread-result: await resend after thread success or failure +:: +on-batch-result: await resend after thread success or failure :: -++ on-thread-result - |= [nonce=@ud result=(each @ud term)] +++ on-batch-result + |= [=address:ethereum nonce=@ud result=(each @ud @t)] ^- (quip card _state) :: update gas price for this tx in state :: =? sending ?=(%& -.result) - %+ ~(jab by sending) nonce + %+ ~(jab by sending) [address nonce] (cork tail (lead p.result)) :: print error if there was one :: @@ -408,15 +792,24 @@ :: resend the l1 tx in five minutes :: :_ state - [(wait:b:sys /resend/(scot %ud nonce) (add resend-time now.bowl))]~ + :_ ~ + %+ wait:b:sys + /resend/(scot %ux address)/(scot %ud nonce) + (add resend-time now.bowl) :: +on-naive-diff: process l2 tx confirmations :: ++ on-naive-diff |= =diff:naive ^- (quip card _state) + ?: ?=(%point -.diff) + :_ state(derive-o ?:(derive-o | derive-o)) + ?. derive-o ~ + :: calculate ownership in 5m. + :: + [(wait:b:sys /owners (add ~m5 now.bowl))]~ ?. ?=(%tx -.diff) [~ state] - =/ =keccak (hash-raw-tx raw-tx.diff) + =/ =keccak (hash-raw-tx:lib raw-tx.diff) ?~ wer=(~(get by finding) keccak) [~ state] :: if we had already seen the tx, no-op @@ -426,10 +819,11 @@ [dap.bowl %weird-double-confirm from.tx.raw-tx.diff] [~ state] =* nonce nonce.u.wer + =* ship ship.from.tx.raw-tx.diff :: remove the tx from the sending map :: =. sending - ?~ sen=(~(get by sending) nonce) + ?~ sen=(~(get by sending) [get-address nonce]) ~& [dap.bowl %weird-double-remove] sending ?~ nin=(find [raw-tx.diff]~ txs.u.sen) @@ -437,9 +831,9 @@ sending =. txs.u.sen (oust [u.nin 1] txs.u.sen) ?~ txs.u.sen - ~? lverb [dap.bowl %done-with-nonce nonce] - (~(del by sending) nonce) - (~(put by sending) nonce u.sen) + ~? lverb [dap.bowl %done-with-nonce [get-address nonce]] + (~(del by sending) [get-address nonce]) + (~(put by sending) [get-address nonce] u.sen) :: update the finding map with the new status :: =. finding @@ -449,6 +843,27 @@ :: unexpected tx failures here. would that be useful? probably not? :: ~? !forced [dap.bowl %aggregated-tx-failed-anyway err.diff] %failed - [~ state] + :: + =. history + =/ l2-tx (l2-tx +<.tx.raw-tx.diff) + =/ tx=roller-tx [ship %sending keccak l2-tx] + ?~ addr=(get-l1-address tx.raw-tx.diff pre) + history + =/ =address:ethereum + ?. =(%transfer-point l2-tx) + u.addr + :: TODO: delete this ship from the transfer? + :: + (~(got by transfers) ship) + %+ ~(put ju (~(del ju history) address tx)) + address + %_ tx + status ?~(err.diff %confirmed %failed) + == + :_ state(derive-p ?:(derive-p | derive-p)) + ?. derive-p ~ + :: derive predicted state in 5m. + :: + [(wait:b:sys /predict (add ~m5 now.bowl))]~ :: -- diff --git a/pkg/arvo/app/azimuth-rpc.hoon b/pkg/arvo/app/azimuth-rpc.hoon index c7f7c8869b..fce3723705 100644 --- a/pkg/arvo/app/azimuth-rpc.hoon +++ b/pkg/arvo/app/azimuth-rpc.hoon @@ -11,14 +11,6 @@ version, agentio |% -:: FIXME: import tx-status, pend-tx from aggregator -:: -+$ tx-status - $: status=?(%unknown %pending %sent %confirmed %failed) - tx=(unit @ux) - == -:: -+$ pend-tx [force=? =raw-tx:naive] :: +$ card card:agent:gall :: @@ -42,7 +34,7 @@ ^- (quip card _this) ~& > 'init' :_ this - [%pass /bind %arvo %e %connect [~ [%v1 %azimuth ~]] dap.bowl]~ + [%pass /bind %arvo %e %connect [~ /v1/azimuth] dap.bowl]~ :: ++ on-save !>(state) ++ on-load @@ -65,7 +57,7 @@ =+ !<([%disconnect bind=binding:eyre] vase) ~& >>> "disconnecting at {}" :_ this - [[%pass /bind %arvo %e %disconnect bind]]~ + [%pass /bind %arvo %e %disconnect bind]~ == :: ++ handle-http-request @@ -79,22 +71,19 @@ :: TODO: method not supported :: (give-simple-payload:app id not-found:gen) - ?~ rpc-request=(validate-request:json-rpc body.req parse-method) + ?~ rpc-request=(validate-request:json-rpc body.req) :: TODO: malformed request :: (give-simple-payload:app id not-found:gen) - =/ [data=(unit cage) response=simple-payload:http] + =/ [data=(list cage) response=simple-payload:http] (process-rpc-request:do u.rpc-request) %+ weld (give-simple-payload:app id response) + |- ?~ data ~ - :_ ~ + :_ $(data t.data) ^- card - [%pass / %agent [our.bowl %aggregator] %poke u.data] - :: TODO: validate that format is e.g. 'getPoint' - :: TODO: maybe use getPoint and translate to %get-point - :: - ++ parse-method |=(t=@t `term`t) + [%pass / %agent [our.bowl %azimuth] %poke i.data] -- -- :: @@ -124,34 +113,43 @@ :: |_ =bowl:gall ++ process-rpc-request - |= request:rpc - ^- [(unit cage) simple-payload:http] - =; [data=(unit cage) =response:rpc] - :- data + |= req=batch-request:rpc + ^- [(list cage) simple-payload:http] + |^ + ?- -.req + %o + =/ [data=(unit cage) =response:rpc] + (process p.req) + [(drop data) (render response)] + :: + %a + =| data=(list cage) + =| resp=(list response:rpc) + |- + ?~ p.req + [(flop data) (render %batch (flop resp))] + =/ [dat=(unit cage) res=response:rpc] + (process i.p.req) + =? data ?=(^ dat) [u.dat data] + $(p.req t.p.req, resp [res resp]) + == + :: + ++ render + |= res=response:rpc %- json-response:gen - (response-to-json:json-rpc response) - =, azimuth-rpc - ?. ?=([%map *] params) - [~ ~(parse error id)] - ?+ method [~ ~(method error id)] - %get-point [~ (get-point id +.params point:scry)] - %transfer-point (transfer-point id +.params) - %configure-keys (configure-keys id +.params) - %spawn (spawn id +.params) - %escape (escape id +.params method) - %cancel-escape (cancel-escape id +.params method) - %adopt (adopt id +.params method) - %detach (detach id +.params method) - %reject (reject id +.params method) - %set-management-proxy (management-proxy id +.params method) - %set-spawn-proxy (spawn-proxy id +.params method) - %set-transfer-proxy (transfer-proxy id +.params method) - %pending [~ (all:pending id +.params all:pending:scry)] - %pending-by-ship [~ (ship:pending id +.params ship:pending:scry)] - %pending-by-address [~ (addr:pending id +.params addr:pending:scry)] - %status [~ (status id +.params tx-status:scry)] - :: %history [~ (history id +.params all:history:scry)] - == + (response-to-json:json-rpc res) + :: + ++ process + |= request:rpc + =, azimuth-rpc + ?. ?=([%map *] params) + [~ ~(parse error:json-rpc id)] + =/ method=@tas (enkebab method) + ?+ method [~ ~(method error:json-rpc id)] + %get-point `(get-point id +.params point:scry) + %get-dns `(get-dns id +.params dns:scry) + == + -- :: ++ scry |% @@ -159,77 +157,15 @@ |= =ship .^ (unit point:naive) %gx - (~(scry agentio bowl) %azimuth /nas/[(scot %p ship)]/noun) + (~(scry agentio bowl) %azimuth /point/(scot %p ship)/noun) == :: - ++ pending - |% - ++ all - .^ (list pend-tx) - %gx - (~(scry agentio bowl) %aggregator /pending/noun) - == - :: - ++ ship - |= =^ship - .^ (list pend-tx) - %gx - (~(scry agentio bowl) %aggregator /pending/[(scot %p ship)]/noun) - == - :: - ++ addr - |= =address:naive - .^ (list pend-tx) - %gx - %+ ~(scry agentio bowl) %aggregator - /pending/[(scot %ux address)]/noun - == - -- - :: - ++ history - |% - ++ all - :: FIXME: use proper type from aggregator/index - :: - .^ (list tx:naive) - %gx - (~(scry agentio bowl) %aggregator /history/noun) - == - :: - ++ ship - |= =^ship - :: FIXME: use proper type from aggregator/index - :: - .^ (list tx:naive) - %gx - (~(scry agentio bowl) %aggregator /history/[(scot %p ship)]/noun) - == - :: - ++ addr - |= =address:naive - :: FIXME: use proper type from aggregator/index - :: - .^ (list tx:naive) - %gx - (~(scry agentio bowl) %aggregator /history/[(scot %ux address)]/noun) - == - -- - :: - ++ tx-status - |= keccak=@ux - .^ ^tx-status - %gx - (~(scry agentio bowl) %aggregator /tx/[(scot %ux keccak)]/status/noun) - == - :: - ++ nonce - |= [=ship =address:naive] - :: FIXME: use proper type from aggregator/index - .^ @ + ++ dns + .^ (list @t) %gx %+ ~(scry agentio bowl) - %aggregator - /nonce/[(scot %p ship)]/[(scot %ux address)]/atom + %azimuth + /dns/noun == -- -- diff --git a/pkg/arvo/app/azimuth.hoon b/pkg/arvo/app/azimuth.hoon index 45e165469b..94bb90e630 100644 --- a/pkg/arvo/app/azimuth.hoon +++ b/pkg/arvo/app/azimuth.hoon @@ -1,5 +1,11 @@ -/- eth-watcher -/+ ethereum, azimuth, naive, default-agent, verb, dbug +/- eth-watcher, *dice +/+ ethereum, + azimuth, + naive, + dice, + default-agent, + verb, + dbug /* snap %eth-logs /app/azimuth/logs/eth-logs :: =/ last-snap :: maybe just use the last one? @@ -12,10 +18,11 @@ =, jael |% ++ app-state - $: %2 + $: %3 url=@ta whos=(set ship) nas=^state:naive + own=owners logs=(list =event-log:rpc:ethereum) == +$ poke-data @@ -27,9 +34,17 @@ [%watch url=@ta] == +$ tagged-diff [=id:block diff:naive] +:: ++$ network ?(%mainnet %ropsten %local) -- :: |% +++ net + ^- network + :: TODO: add poke action to allow switching? + :: eth snapshot could also be considered + :: + %local :: TODO: maybe flop the endianness here so metamask signs it in normal :: order? :: @@ -61,39 +76,42 @@ (hex-to-num:ethereum data) :: ++ run-logs - |= [nas=^state:naive logs=(list event-log:rpc:ethereum)] - ^- [(list tagged-diff) ^state:naive] + |= [state=app-state logs=(list event-log:rpc:ethereum)] + ^- (quip tagged-diff _state) + =/ [contract=@ux * chain-id=@ *] (get-network net) ?~ logs - `nas + `state ?~ mined.i.logs $(logs t.logs) - =^ raw-effects nas + =/ [raw-effects=effects:naive new-nas=_nas.state] =/ =^input:naive - ?: =(azimuth:contracts:azimuth address.i.logs) + ?: =(contract address.i.logs) =/ data (data-to-hex data.i.logs) =/ =event-log:naive [address.i.logs data topics.i.logs] [%log event-log] ?~ input.u.mined.i.logs [%bat *@] - =/ len (met 3 u.input.u.mined.i.logs) - =/ fun - (rsh [3 (sub len 4)] u.input.u.mined.i.logs) - ?. =(0x2688.7f26 fun) - [%bat *@] - [%bat (end [3 (sub len 4)] u.input.u.mined.i.logs)] + [%bat u.input.u.mined.i.logs] =/ res %- mule - |.((%*(. naive lac |) verifier chain-id:contracts:azimuth nas input)) + |.((%*(. naive lac |) verifier chain-id nas.state input)) ?- -.res %& p.res - %| ((slog 'naive-fail' p.res) `nas) + %| ((slog 'naive-fail' p.res) `nas.state) == + =. own.state + =, dice + ?. =(contract address.i.logs) + =< own + (apply-effects raw-effects nas.state own.state chain-id) + (update-ownership raw-effects nas.state new-nas own.state) + =. nas.state new-nas =/ effects-1 =/ =id:block [block-hash block-number]:u.mined.i.logs (turn raw-effects |=(=diff:naive [id diff])) - =^ effects-2 nas $(logs t.logs) - [(welp effects-1 effects-2) nas] + =^ effects-2 state $(logs t.logs) + [(welp effects-1 effects-2) state] :: ++ to-udiffs |= effects=(list tagged-diff) @@ -125,16 +143,39 @@ :- [%give %fact ~[path] %azimuth-udiffs !>(~[i.udiffs])] $(udiffs t.udiffs) :: -++ start - |= [state=app-state our=ship dap=term] +++ event-update + |= effects=(list tagged-diff) + ^- (list card:agent:gall) + %+ murn effects + |= tag=tagged-diff + ^- (unit card:agent:gall) + ?. |(?=(%tx +<.tag) ?=(%point +<.tag)) ~ + %- some ^- card:agent:gall + [%give %fact ~[/event] %naive-diffs !>(+.tag)] +:: +++ get-network + |= =network + ^- [@ux @ux @ @] + =< [azimuth naive chain-id launch] + =, azimuth + ?- network + %mainnet mainnet-contracts + %ropsten ropsten-contracts + %local local-contracts + == +:: +++ start + |= [state=app-state =network our=ship dap=term] + ^- card:agent:gall + =/ [azimuth=@ux naive=@ux * launch=@ud] (get-network network) =/ args=vase !> :+ %watch /[dap] ^- config:eth-watcher :* url.state =(%czar (clan:title our)) ~m5 ~h30 - (max launch:contracts:azimuth last-snap) - ~[azimuth:contracts:azimuth] - ~[naive:contracts:azimuth] + (max launch last-snap) + ~[azimuth] + ~[naive] (topics whos.state) == [%pass /wa %agent [our %eth-watcher] %poke %eth-watcher-poke args] @@ -172,14 +213,28 @@ - %2 nas *^state:naive == - `this(state ?>(?=(%2 -.old-state) old-state)) + =? old-state ?=(%2 -.old-state) + %= old-state + - %3 + own *owners + == + `this(state ?>(?=(%3 -.old-state) old-state)) :: - ++ app-states $%(app-state-0 app-state-1 app-state) + ++ app-states $%(app-state-0 app-state-1 app-state-2 app-state) + ++ app-state-2 + $: %2 + url=@ta + whos=(set ship) + nas=^state:naive + own=* + logs=(list =event-log:rpc:ethereum) + == ++ app-state-1 $: %1 url=@ta whos=(set ship) nas=* + own=* logs=(list =event-log:rpc:ethereum) == ++ app-state-0 @@ -187,6 +242,7 @@ url=@ta whos=(set ship) nas=* + own=* logs=(list =event-log-0) == :: @@ -212,7 +268,7 @@ ?+ q.vase !! %rerun ~& [%rerunning (lent logs.state)] - =^ effects nas.state (run-logs *^state:naive logs.state) + =^ effects state (run-logs state logs.state) `this :: %resub @@ -235,39 +291,36 @@ %listen [[%pass /lo %arvo %j %listen (silt whos.poke) source.poke]~ this] %watch =. url.state url.poke - [[(start state [our dap]:bowl) ~] this] + [[(start state net [our dap]:bowl) ~] this] == :: ++ on-watch |= =path ^- (quip card:agent:gall _this) ?< =(/sole/drum path) - ?> ?=(?(~ [@ ~]) path) + ?: =(/event path) + :_ this + [%give %fact ~ %naive-state !>([nas.state own.state])]~ =/ who=(unit ship) ?~ path ~ + ?: ?=([@ ~] path) ~ `(slav %p i.path) =. whos.state ?~ who ~ (~(put in whos.state) u.who) :_ this :_ ~ - (start state [our dap]:bowl) + (start state net [our dap]:bowl) :: ++ on-leave on-leave:def ++ on-peek |= =path ^- (unit (unit cage)) ?+ path (on-peek:def path) - [%x %logs ~] - ``logs+!>(logs.state) - :: - [%x %nas ~] - ``nas+!>(nas.state) - :: - [%x %nas @t ~] - ?~ ship=(rush i.t.t.path ;~(pfix sig fed:ag)) - ``noun+!>(*(unit point:naive)) - ``noun+!>((~(get by points.nas.state) u.ship)) + [%x %logs ~] ``noun+!>(logs.state) + [%x %nas ~] ``noun+!>(nas.state) + [%x %dns ~] ``noun+!>(dns.nas.state) + [%x %own ~] ``noun+!>(own.state) == :: ++ on-agent @@ -289,16 +342,12 @@ %logs (welp logs.state loglist.diff) == =? nas.state ?=(%history -.diff) *^state:naive - =^ effects nas.state - %+ run-logs - ?- -.diff - :: %history *^state:naive - %history nas.state - %logs nas.state - == - loglist.diff + =^ effects state (run-logs state loglist.diff) :: - [(jael-update (to-udiffs effects)) this] + :_ this + %+ weld + (event-update effects) + (jael-update (to-udiffs effects)) :: ++ on-arvo on-arvo:def ++ on-fail on-fail:def diff --git a/pkg/arvo/app/btc-provider.hoon b/pkg/arvo/app/btc-provider.hoon new file mode 100644 index 0000000000..e88fe55a4e --- /dev/null +++ b/pkg/arvo/app/btc-provider.hoon @@ -0,0 +1,355 @@ +:: btc-provider.hoon +:: Proxy that serves a BTC full node and ElectRS address indexer +:: +:: Subscriptions: none +:: To Subscribers: /clients +:: current connection state +:: results/errors of RPC calls +:: +:: Scrys +:: x/is-whitelisted/SHIP: bool, whether ship is whitelisted +:: +/- *bitcoin, json-rpc, *btc-provider +/+ dbug, default-agent, bl=btc, groupl=group, resource +|% ++$ versioned-state + $% state-0 + == +:: ++$ state-0 [%0 =host-info =whitelist] +:: ++$ card card:agent:gall +:: +-- +%- agent:dbug +=| state-0 +=* state - +^- agent:gall +=< +|_ =bowl:gall ++* this . + def ~(. (default-agent this %|) bowl) + hc ~(. +> bowl) +:: +++ on-init + ^- (quip card _this) + ~& > '%btc-provider initialized successfully' + =| wl=^whitelist + :- ~ + %_ this + host-info + ['' connected=%.n %main block=0 clients=*(set ship)] + whitelist wl(public %.n, kids %.n) + == +:: +++ on-save + ^- vase + !>(state) +:: +++ on-load + |= old-state=vase + ^- (quip card _this) + ~& > '%btc-provider recompiled successfully ' + `this(state !<(versioned-state old-state)) +:: +++ on-poke + |= [=mark =vase] + ^- (quip card _this) + ?> ?|((team:title our.bowl src.bowl) (is-client:hc src.bowl)) + =^ cards state + ?+ mark (on-poke:def mark vase) + %btc-provider-command + ?> (team:title our.bowl src.bowl) + (handle-command:hc !<(command vase)) + %btc-provider-action + (handle-action:hc !<(action vase)) + == + [cards this] +:: +++ on-watch + |= pax=path + ^- (quip card _this) + :: checking provider permissions before trying to subscribe + :: terrible hack until we have cross-ship scries + :: + ?: ?=([%permitted @ ~] pax) + :_ this + =/ jon=json + %+ frond:enjs:format + %'providerStatus' + %- pairs:enjs:format + :~ provider+s+(scot %p our.bowl) + permitted+b+(is-whitelisted:hc src.bowl) + == + [%give %fact ~ %json !>(jon)]~ + :: + ?> ?=([%clients *] pax) + ?. (is-whitelisted:hc src.bowl) + ~& >>> "btc-provider: blocked client {}" + [~[[%give %kick ~ ~]] this] + ~& > "btc-provider: accepted client {}" + :- [do-ping:hc]~ + this(clients.host-info (~(put in clients.host-info) src.bowl)) +:: +++ on-arvo + |= [=wire =sign-arvo] + ^- (quip card _this) + :: check for connectivity every 30 seconds + :: + ?: ?=([%ping-timer *] wire) + :_ this + :~ do-ping:hc + (start-ping-timer:hc ~s30) + == + =^ cards state + ?+ +<.sign-arvo (on-arvo:def wire sign-arvo) + %http-response + (handle-rpc-response:hc wire client-response.sign-arvo) + == + [cards this] +:: +++ on-peek + |= pax=path + ^- (unit (unit cage)) + ?+ pax (on-peek:def pax) + [%x %is-whitelisted @t ~] + ``noun+!>((is-whitelisted:hc (ship (slav %p +>-.pax)))) + :: + [%x %is-client @t ~] + ``noun+!>((is-client (ship (slav %p +>-.pax)))) +== +:: +++ on-leave on-leave:def +++ on-agent on-agent:def +++ on-fail on-fail:def +-- +:: helper core +|_ =bowl:gall +++ handle-command + |= comm=command + ^- (quip card _state) + ?- -.comm + %set-credentials + :- :~ do-ping + (start-ping-timer ~s30) + == + %= state + host-info + [api-url.comm connected=%.n network.comm block=0 clients=*(set ship)] + == + :: + %add-whitelist + ?- -.wt.comm + %public + `state(public.whitelist %.y) + :: + %kids + `state(kids.whitelist %.y) + :: + %users + `state(users.whitelist (~(uni in users.whitelist) users.wt.comm)) + :: + %groups + `state(groups.whitelist (~(uni in groups.whitelist) groups.wt.comm)) + == + :: + %remove-whitelist + =. state + ?- -.wt.comm + %public + state(public.whitelist %.n) + :: + %kids + state(kids.whitelist %.n) + :: + %users + state(users.whitelist (~(dif in users.whitelist) users.wt.comm)) + :: + %groups + state(groups.whitelist (~(dif in groups.whitelist) groups.wt.comm)) + == + clean-client-list + == +:: if not connected, only %ping action is allowed +:: +++ handle-action + |= act=action + ^- (quip card _state) + ?. ?|(connected.host-info ?=(%ping -.act)) + ~& >>> "Not connected to RPC" + [~[(send-update [%| %not-connected 500])] state] + :: + =/ ract=action:rpc-types + ?- -.act :: ~|("Invalid action" !!) + %address-info + [%get-address-info address.act] + :: + %tx-info + [%get-tx-vals txid.act] + :: + %raw-tx + [%get-raw-tx txid.act] + :: + %broadcast-tx + [%broadcast-tx rawtx.act] + :: + %ping + [%get-block-info ~] + == + [~[(req-card act ract)] state] +:: +++ req-card + |= [act=action ract=action:rpc-types] + =| out=outbound-config:iris + =/ req=request:http + (gen-request:bl host-info ract) + [%pass (rpc-wire act) %arvo %i %request req out] +:: wire structure: /action-tas/now +:: +++ rpc-wire + |= act=action ^- wire + /[-.act]/[(scot %ux (cut 3 [0 20] eny.bowl))] +:: +++ kick-client + |= client=ship + ^- (quip card _state) + ~& >>> "dropping client {}" + :- ~[[%give %kick ~[/clients] `client]] + state(clients.host-info (~(dif in clients.host-info) (silt ~[client]))) +:: +:: Handles HTTP responses from RPC servers. Parses for errors, then handles response. +:: For actions that require collating multiple RPC calls, uses req-card to call out +:: to RPC again if more information is required. +:: +++ handle-rpc-response + |= [=wire response=client-response:iris] + ^- (quip card _state) + ?. ?=(%finished -.response) `state + =* status status-code.response-header.response + :: handle error types: connection errors, RPC errors (in order) + :: + =^ conn-err state + (connection-error status) + ?^ conn-err + :_ state(connected.host-info %.n) + ~[(send-status [%disconnected ~]) (send-update [%| u.conn-err])] + :: + %+ handle-rpc-result wire + %- parse-result:rpc:bl + (get-rpc-response:bl response) +:: +++ connection-error + |= status=@ud + ^- [(unit error) _state] + ?+ status [`[%rpc-error ~] state] + %200 + [~ state] + %400 + [`[%bad-request status] state] + %401 + [`[%no-auth status] state(connected.host-info %.n)] + %502 + [`[%not-connected status] state(connected.host-info %.n)] + %504 + [`[%not-connected status] state(connected.host-info %.n)] + == +:: +++ handle-rpc-result + |= [=wire r=result:rpc-types] + ^- (quip card _state) + ?+ -.wire ~|("Unexpected HTTP response" !!) + %address-info + ?> ?=([%get-address-info *] r) + :_ state + ~[(send-update [%.y %address-info +.r])] + :: + %tx-info + ?> ?=([%get-tx-vals *] r) + :_ state + ~[(send-update [%.y %tx-info +.r])] + :: + %raw-tx + ?> ?=([%get-raw-tx *] r) + :_ state + ~[(send-update [%.y %raw-tx +.r])] + :: + %broadcast-tx + ?> ?=([%broadcast-tx *] r) + :_ state + ~[(send-update [%.y %broadcast-tx +.r])] + :: + %ping + ?> ?=([%get-block-info *] r) + :_ state(connected.host-info %.y, block.host-info block.r) + ?: =(block.host-info block.r) + ~[(send-status [%connected network.host-info block.r fee.r])] + ~[(send-status [%new-block network.host-info block.r fee.r blockhash.r blockfilter.r])] + == +:: +++ send-status + |= =status ^- card + %- ?: ?=(%new-block -.status) + ~&(>> "%new-block: {}" same) + same + [%give %fact ~[/clients] %btc-provider-status !>(status)] +:: +++ send-update + |= =update + ^- card + =+ c=[%give %fact ~[/clients] %btc-provider-update !>(update)] + ?: ?=(%.y -.update) +:: ~& >> "prov. update: {}" + c + ~& >> "prov. err: {}" + c +:: +++ is-whitelisted + |= user=ship ^- ? + |^ + ?| public.whitelist + =(our.bowl user) + ?&(kids.whitelist is-kid) + (~(has in users.whitelist) user) + in-group + == + ++ is-kid + =(our.bowl (sein:title our.bowl now.bowl user)) + ++ in-group + =/ gs ~(tap in groups.whitelist) + |- + ?~ gs %.n + ?: (~(is-member groupl bowl) user i.gs) + %.y + $(gs t.gs) + :: .^((unit group:g) %gx ;:(weld /=group-store=/groups p /noun)) + -- +:: +clean-client-list: remove clients who are no longer whitelisted +:: called after a whitelist change +:: +++ clean-client-list + ^- (quip card _state) + =/ to-kick=(set ship) + %- silt + %+ murn ~(tap in clients.host-info) + |= c=ship ^- (unit ship) + ?:((is-whitelisted c) ~ `c) + :_ state(clients.host-info (~(dif in clients.host-info) to-kick)) + %+ turn ~(tap in to-kick) + |=(c=ship [%give %kick ~[/clients] `c]) +:: +++ is-client + |= user=ship ^- ? + (~(has in clients.host-info) user) +:: +++ start-ping-timer + |= interval=@dr ^- card + [%pass /ping-timer %arvo %b %wait (add now.bowl interval)] +:: +++ do-ping + ^- card + =/ act=action [%ping ~] + :* %pass /ping/[(scot %da now.bowl)] %agent + [our.bowl %btc-provider] %poke + %btc-provider-action !>(act) + == +-- diff --git a/pkg/arvo/app/btc-wallet.hoon b/pkg/arvo/app/btc-wallet.hoon new file mode 100644 index 0000000000..bd46aad8d7 --- /dev/null +++ b/pkg/arvo/app/btc-wallet.hoon @@ -0,0 +1,1161 @@ +:: btc-wallet +:: +:: Scrys +:: x/scanned: (list xpub) of all scanned wallets +:: x/balance/xpub: balance (in sats) of wallet +/- *btc-wallet, bp=btc-provider, file-server, launch-store +/+ dbug, default-agent, bl=btc, bc=bitcoin, bip32 +|% +++ defaults + |% + ++ params + :* batch-size=20 + fam-limit=10 + piym-limit=3 + == + ++ confs 6 + ++ fee 100 + -- +:: ++$ versioned-state + $% state-0 + state-1 + == +:: ++$ state-0 + $: %0 + prov=(unit provider) + walts=(map xpub:bc walt-0) + =btc-state + =history + curr-xpub=(unit xpub:bc) + =scans + =params + feybs=(map ship sats) + =piym + =poym + ahistorical-txs=(set txid) + == +:: ++$ state-1 + $: %1 + prov=(unit provider) + walts=(map xpub:bc walt) + =btc-state + =history + curr-xpub=(unit xpub:bc) + =scans + =params + feybs=(map ship sats) + =piym + =poym + ahistorical-txs=(set txid) + == +:: ++$ card card:agent:gall +:: +-- +=| state-1 +=* state - +%- agent:dbug +^- agent:gall +=< +|_ =bowl:gall ++* this . + def ~(. (default-agent this %|) bowl) + hc ~(. +> bowl) +:: +++ on-init +^- (quip card _this) + ~& > '%btc-wallet initialized' + =/ file + [%file-server-action !>([%serve-dir /'~btc' /app/btc-wallet %.n %.y])] + =/ tile + :- %launch-action + !> :+ %add + %btc-wallet + [[%custom `'/~btc' `'/~btc/img/tile.svg'] %.y] + =/ warning [%settings-event !>([%put-entry %btc-wallet %warning %b %.y])] + =/ currency + [%settings-event !>([%put-entry %btc-wallet %currency %s 'USD'])] + :- :~ [%pass /btc-wallet-server %agent [our.bowl %file-server] %poke file] + [%pass /btc-wallet-tile %agent [our.bowl %launch] %poke tile] + [%pass /warn %agent [our.bowl %settings-store] %poke warning] + [%pass /warn %agent [our.bowl %settings-store] %poke currency] + == + %_ this + state + :* %1 + ~ + *(map xpub:bc walt) + *^btc-state + *^history + ~ + *^scans + params:defaults + *(map ship sats) + *^piym + *^poym + ~ + == + == +:: +++ on-save + ^- vase + !>(state) +:: +++ on-load + |= old-state=vase + ^- (quip card _this) + ~& > '%btc-wallet recompiled' + =/ ver !<(versioned-state old-state) + =| cards=(list card) + |- + ?- -.ver + %1 + [cards this(state ver)] + :: + %0 + =/ new-walts=(map xpub:bc walt) + %- ~(run by walts.ver) + |= old-walt=walt-0 + ^- walt + old-walt(wilt +6:wilt.old-walt) + $(ver [%1 +.ver(walts new-walts)]) + == +:: +++ on-poke + |= [=mark =vase] + ^- (quip card _this) + =^ cards state + ?+ mark (on-poke:def mark vase) + %btc-wallet-command + ?> =(our.bowl src.bowl) + (handle-command:hc !<(command vase)) + :: + %btc-wallet-action + ?< =(our.bowl src.bowl) + (handle-action:hc !<(action vase)) + :: + %btc-wallet-internal + ?> =(our.bowl src.bowl) + (handle-internal:hc !<(internal vase)) + == + [cards this] +++ on-peek + |= pax=path + ^- (unit (unit cage)) + ?+ pax (on-peek:def pax) + [%x %configured ~] + =/ provider=json + ?~ prov ~ + [%s (scot %p host.u.prov)] + =/ result=json + %- pairs:enjs:format + :~ [%'provider' provider] + [%'hasWallet' b+?=(^ walts)] + == + ``json+!>(result) + :: + [%x %scanned ~] + ``noun+!>(scanned-wallets) + :: + [%x %balance @ ~] + ``noun+!>((balance:hc (xpub:bc +>-.pax))) + == +++ on-agent + |= [=wire =sign:agent:gall] + ^- (quip card _this) + ?+ -.sign (on-agent:def wire sign) + %kick + ~& >>> "kicked from prov {}" + ?~ prov `this + ?: ?& ?=(%set-provider -.wire) + =(host.u.prov src.bowl) + == + `this(prov ~) + `this + :: + %fact + =^ cards state + ?+ p.cage.sign `state + %btc-provider-status + (handle-provider-status:hc !<(status:bp q.cage.sign)) + :: + %btc-provider-update + (handle-provider-update:hc !<(update:bp q.cage.sign)) + :: + %json + ?+ wire `state + [%check-payee @ ~] + =/ who (slav %p i.t.wire) + :_ state + :~ [%give %fact ~[/all] cage.sign] + [%pass wire %agent [who %btc-wallet] %leave ~] + == + :: + [%permitted @ ~] + =/ who (slav %p i.t.wire) + :_ state + :~ [%give %fact ~[/all] cage.sign] + [%pass wire %agent [who %btc-provider] %leave ~] + == + == + == + [cards this] + == +:: +++ on-watch + |= =path + ^- (quip card _this) + ?+ path (on-watch:def path) + [%check-payee @ ~] + =/ who (slav %p i.t.path) + ?> =(who our.bowl) + =/ response=json + %+ frond:enjs:format 'checkPayee' + %- pairs:enjs:format + :~ ['hasWallet' b+?=(^ curr-xpub)] + ['payee' (ship:enjs:format our.bowl)] + == + :_ this + [%give %fact ~ %json !>(response)]~ + :: + [%all ~] + ?> (team:title our.bowl src.bowl) + :_ this + [give-initial:hc]~ + == +:: +++ on-leave on-leave:def +++ on-arvo on-arvo:def +++ on-fail on-fail:def +-- +|_ =bowl:gall +++ handle-command + |= comm=command + ^- (quip card _state) + ?> (team:title our.bowl src.bowl) + ?- -.comm + %set-provider + |^ + ?~ provider.comm + ?~ prov `state + :_ state(prov ~) + :~ (leave-provider host.u.prov) + (give-update %change-provider ~) + == + :_ state(prov [~ u.provider.comm %.n]) + ?~ prov + [(watch-provider u.provider.comm)]~ + :~ (leave-provider host.u.prov) + (watch-provider u.provider.comm) + (give-update %change-provider `[u.provider.comm %.n]) + == + :: + ++ watch-provider + |= who=@p + ^- card + :* %pass /set-provider/[(scot %p who)] %agent [who %btc-provider] + %watch /clients + == + ++ leave-provider + |= who=@p + ^- card + :* %pass /set-provider/[(scot %p who)] %agent [who %btc-provider] + %leave ~ + == + -- + :: + %check-provider + =/ pax /permitted/(scot %p provider.comm) + :_ state + [%pass pax %agent [provider.comm %btc-provider] %watch pax]~ + :: + %check-payee + =/ pax /check-payee/(scot %p payee.comm) + :_ state + [%pass pax %agent [payee.comm %btc-wallet] %watch pax]~ + :: + %set-current-wallet + (set-curr-xpub xpub.comm) + :: + %add-wallet + ?~ (~(has by walts) xpub.comm) + ((slog ~[leaf+"xpub already in wallet"]) `state) + =/ w=walt (from-xpub:bl +.comm) + =. walts (~(put by walts) xpub.comm w) + =^ c1 state (init-batches xpub.comm (dec max-gap.w)) + =^ c2 state (set-curr-xpub xpub.comm) + [(weld c1 c2) state] + :: + %delete-wallet + =* cw curr-xpub.state + =? cw ?&(?=(^ cw) =(u.cw xpub.comm)) + ~ + =. scans (~(del by scans) [xpub.comm %0]) + =. scans (~(del by scans) [xpub.comm %1]) + =. walts (~(del by walts) xpub.comm) + =. history + %- ~(rep by history) + |= [[=txid =hest] out=_history] + ?: =(xpub.hest xpub.comm) + (~(del by out) txid) + out + :_ state + [give-initial]~ + :: + %init-payment-external + ?: is-broadcasting + %- (slog ~[leaf+"broadcasting a transaction"]) + [[(give-update %error %tx-being-signed)]~ state] + ?~ curr-xpub ~|("btc-wallet: no curr-xpub set" !!) + ?: (is-dust value.comm address.comm) + %- (slog ~[leaf+"sending dust"]) + [[(give-update %error %no-dust)]~ state] + :: + =/ uw (~(get by walts) u.curr-xpub) + ?: ?|(?=(~ uw) ?!(scanned.u.uw)) + ~|("no wallet with xpub or wallet not scanned yet" !!) + =/ [tb=(unit txbu) chng=(unit sats)] + %~ with-change sut:bl + [u.uw eny.bowl block.btc-state ~ feyb.comm ~[[address.comm value.comm ~]]] + ?~ tb + %- (slog ~[leaf+"insufficient balance or not enough confirmed balance"]) + [[(give-update %error %insufficient-balance)]~ state] + =^ tb=(unit txbu) state + ?~ chng `state + =/ [addr=address =idx w=walt] + ~(nixt-address wad:bl u.uw %1) + :- `(~(add-output txb:bl u.tb) addr u.chng `(~(hdkey wad:bl w %1) idx)) + state(walts (~(put by walts) u.curr-xpub w)) + =/ po=^poym ?~(tb [~ ~] [tb note.comm]) + :_ state(poym po) + ?~ tb ~ + %+ turn txis.u.tb + |= =txi + (poke-provider %raw-tx txid.utxo.txi) + :: + :: overwrites any payment being built in poym + :: + %init-payment + ?: =(src.bowl payee.comm) + %- (slog ~[leaf+"can't pay ourselves"]) + [[(give-update %error %cant-pay-ourselves)]~ state] + ?: ?=(%pawn (clan:title payee.comm)) + %- (slog ~[leaf+"no comets"]) + [[(give-update %error %no-comets)]~ state] + ?: is-broadcasting + %- (slog ~[leaf+"broadcasting a transaction"]) + [[(give-update %error %tx-being-signed)]~ state] + :_ state(poym [~ note.comm], feybs (~(put by feybs) payee.comm feyb.comm)) + ~[(poke-peer payee.comm [%gen-pay-address value.comm note.comm])] + :: + %broadcast-tx + ?~ prov ~|("Provider not connected" !!) + =+ signed=(from-cord:hxb:bc txhex.comm) + =/ tx-match=? + ?~ txbu.poym %.n + =((get-id:txu:bc (decode:txu:bc signed)) ~(get-txid txb:bl u.txbu.poym)) + :- ?. tx-match + %- (slog leaf+"txid didn't match txid in wallet") + [(give-update %error %broadcast-fail)]~ + ~[(poke-provider [%broadcast-tx signed])] + ?. tx-match state + ?~ txbu.poym state + state(signed-tx.u.txbu.poym `signed) + :: + %gen-new-address + ?~ curr-xpub ~|("btc-wallet: no curr-xpub set" !!) + =/ uw=(unit walt) (~(get by walts) u.curr-xpub) + ?: ?|(?=(~ uw) ?!(scanned.u.uw)) + ~|("no wallet with xpub or wallet not scanned yet" !!) + =/ [addr=address =idx w=walt] + ~(gen-address wad:bl u.uw %0) + :_ state(walts (~(put by walts) u.curr-xpub w)) + [(give-update %new-address addr)]~ + == +:: +++ handle-action + |= act=action + ^- (quip card _state) + ?- -.act + :: comets can't pay (could spam address requests) + :: reuses payment address for ship if ship in piym already + :: + %gen-pay-address + ~| "no comets" + ?< ?=(%pawn (clan:title src.bowl)) + ?~ curr-xpub ~|("btc-wallet: no curr-xpub set" !!) + |^ + =^ cards state reuse-address + ?^ cards [cards state] :: if cards returned, means we already have an address + =+ f=(fam:bl our.bowl now.bowl src.bowl) + =+ n=(~(gut by num-fam.piym) f 0) + ?: (gte n fam-limit.params) + ~|("More than {} addresses for moons + planet" !!) + =. state state(num-fam.piym (~(put by num-fam.piym) f +(n))) + =^ a=address state + (generate-address u.curr-xpub %0) + :- ~[(poke-peer src.bowl [%give-pay-address a value.act])] + %= state + ps.piym + %+ ~(put by ps.piym) src.bowl + [~ u.curr-xpub a src.bowl value.act note.act] + == + :: + ++ generate-address + |= [=xpub:bc =chyg] + =/ uw=(unit walt) (~(get by walts) xpub) + ?: ?|(?=(~ uw) ?!(scanned.u.uw)) + ~|("no wallet with xpub or wallet not scanned yet" !!) + =/ [addr=address =idx w=walt] + ~(gen-address wad:bl u.uw chyg) + [addr state(walts (~(put by walts) xpub w))] + :: + ++ reuse-address + ^- (quip card _state) + =* payer src.bowl + =+ p=(~(get by ps.piym) payer) + ?~ p `state + ?^ pend.u.p ~|("%gen-address: {} already has pending payment to us" !!) + =+ newp=u.p(value value.act) + :_ state(ps.piym (~(put by ps.piym) payer newp)) + ~[(poke-peer payer [%give-pay-address address.newp value.act])] + -- + :: + %give-pay-address + ?: =(src.bowl our.bowl) ~|("Can't pay ourselves" !!) + ?: is-broadcasting ~|("Broadcasting a transaction" !!) + ?~ curr-xpub ~|("btc-wallet-hook: no curr-xpub set" !!) + ?: (is-dust value.act address.act) + %- (slog ~[leaf+"sending dust"]) + [[(give-update %error %no-dust)]~ state] + :: + =+ feyb=(~(gut by feybs) src.bowl ?~(fee.btc-state fee:defaults u.fee.btc-state)) + |^ + =^ tb=(unit txbu) state + (generate-txbu u.curr-xpub `src.bowl feyb ~[[address.act value.act ~]]) + =/ po=^poym ?~(tb [~ ~] [tb note.poym]) + :_ state(poym po) + ?~ tb [(give-update %error %insufficient-balance)]~ + %+ turn txis.u.tb + |=(=txi (poke-provider [%raw-tx txid.utxo.txi])) + :: + ++ generate-txbu + |= [=xpub:bc payee=(unit ship) feyb=sats txos=(list txo)] + ^- [(unit txbu) _state] + =/ uw (~(get by walts) xpub) + ?: ?|(?=(~ uw) ?!(scanned.u.uw)) + ~|("no wallet with xpub or wallet not scanned yet" !!) + =/ [tb=(unit txbu) chng=(unit sats)] + %~ with-change sut:bl + [u.uw eny.bowl block.btc-state payee feyb txos] + ?~ tb ((slog ~[leaf+"insufficient balance or not enough confirmed balance"]) [tb state]) + :: if no change, return txbu; else add change output to txbu + :: + ?~ chng [tb state] + =/ [addr=address =idx w=walt] + ~(nixt-address wad:bl u.uw %1) + :- `(~(add-output txb:bl u.tb) addr u.chng `(~(hdkey wad:bl w %1) idx)) + state(walts (~(put by walts) xpub w)) + -- + :: + :: %expect-payment + :: - check that payment is in piym + :: - replace pend.payment with incoming txid (lock) + :: - add txid to pend.piym + :: - request tx-info from provider + :: + %expect-payment + |^ + =+ pay=(~(get by ps.piym) src.bowl) + ~| "%expect-payment: matching payment not in piym" + ?~ pay !! + ?> (piym-matches u.pay) + :_ (update-pend-piym txid.act u.pay(pend `txid.act)) + ?~ prov ~ + ~[(poke-provider [%tx-info txid.act])] + :: + ++ piym-matches + |= p=payment + ?& =(payer.p src.bowl) + =(value.p value.act) + == + :: + ++ update-pend-piym + |= [txid=hexb p=payment] + ^- _state + ?~ pend.p ~|("update-pend-piym: no pending payment" !!) + %= state + ps.piym (~(put by ps.piym) payer.p p) + pend.piym (~(put by pend.piym) txid p) + == + -- + == +:: +++ handle-internal + |= intr=internal + ^- (quip card _state) + ?- -.intr + %add-poym-raw-txi + |^ + ?> =(src.bowl our.bowl) + ?~ txbu.poym `state + =. txis.u.txbu.poym + (update-poym-txis txis.u.txbu.poym +.intr) + :_ state + =+ pb=~(to-psbt txb:bl u.txbu.poym) + ?~ pb ~ + =+ vb=~(vbytes txb:bl u.txbu.poym) + =+ fee=~(fee txb:bl u.txbu.poym) + ~& >> "{} vbytes, {<(div fee vb)>} sats/byte, {} sats fee" + %- (slog [%leaf "PSBT: {}"]~) + [(give-update [%psbt u.pb fee])]~ + :: update outgoing payment with a rawtx, if the txid is in poym's txis + :: + ++ update-poym-txis + |= [txis=(list txi) txid=hexb rawtx=hexb] + ^- (list txi) + =| i=@ + |- ?: (gte i (lent txis)) txis + =/ ith=txi (snag i txis) + =? txis =(txid txid.utxo.ith) + (snap txis i `txi`ith(rawtx `rawtx)) + $(i +(i)) + -- + :: delete an incoming/outgoing payment when we see it included in a tx + :: + %close-pym + ?> =(src.bowl our.bowl) + |^ + =^ cards state + ?. included.ti.intr + `state + ?: (~(has by pend.piym) txid.ti.intr) + (piym-to-history ti.intr) + ?: (poym-has-txid txid.ti.intr) + (poym-to-history ti.intr) + `state + =^ cards2 state + (handle-tx-info ti.intr) + :_ state + (weld cards cards2) + :: + ++ poym-has-txid + |= txid=hexb + ^- ? + ?~ txbu.poym %.n + ?~ signed-tx.u.txbu.poym %.n + =(txid (get-id:txu:bc (decode:txu:bc u.signed-tx.u.txbu.poym))) + :: - checks whether poym has a signed tx + :: - checks whether the txid matches that signed tx, if not, skip + :: - clears poym + :: - returns card that adds hest to history + :: + ++ poym-to-history + |= ti=info:tx + ^- (quip card _state) + |^ + ?~ txbu.poym `state + ?~ signed-tx.u.txbu.poym `state + ?. (poym-has-txid txid.ti) + `state + =+ vout=(get-vout txos.u.txbu.poym) + ?~ vout ~|("poym-to-history: poym should always have an output" !!) + =/ new-hest=hest + (mk-hest ti xpub.u.txbu.poym our.bowl payee.u.txbu.poym u.vout note.poym) + :- [(give-update %new-tx new-hest)]~ + %= state + poym [~ ~] + history (~(put by history) txid.ti new-hest) + == + :: + ++ get-vout + |= txos=(list txo) + ^- (unit @ud) + =| idx=@ud + |- ?~ txos ~ + ?~ hk.i.txos `idx + $(idx +(idx), txos t.txos) + -- + :: - checks whether txid in pend.piym + :: - checks whether ti has a matching value output to piym + :: - if no match found, just deletes pend.piym with this tx + :: stops peer from spamming txids + :: - returns card that adds hest to history + :: + ++ piym-to-history + |= ti=info:tx + |^ ^- (quip card _state) + =+ pay=(~(get by pend.piym) txid.ti) + ?~ pay `state + :: if no matching output in piym, delete from pend.piym to stop DDOS of txids + :: + =+ vout=(get-vout value.u.pay) + ?~ vout + `(del-pend-piym txid.ti) + =/ new-hest (mk-hest ti xpub.u.pay payer.u.pay `our.bowl u.vout note.u.pay) + =. state (del-all-piym txid.ti payer.u.pay) + :- [(give-update %new-tx new-hest)]~ + %= state + history (~(put by history) txid.ti new-hest) + == + :: + ++ get-vout + |= value=sats + ^- (unit @ud) + =| idx=@ud + =+ os=outputs.ti + |- ?~ os ~ + ?: =(value.i.os value) + `idx + $(os t.os, idx +(idx)) + :: + ++ del-pend-piym + |= txid=hexb + ^- _state + state(pend.piym (~(del by pend.piym) txid.ti)) + :: + ++ del-all-piym + |= [txid=hexb payer=ship] + ^- _state + =+ nf=(~(gut by num-fam.piym) payer 1) + %= state + pend.piym (~(del by pend.piym) txid) + ps.piym (~(del by ps.piym) payer) + num-fam.piym (~(put by num-fam.piym) payer (dec nf)) + == + -- + :: + ++ mk-hest + |= $: ti=info:tx + =xpub:bc + payer=ship + payee=(unit ship) + vout=@ud + note=(unit @t) + == + ^- hest + :* xpub + txid.ti + confs.ti + recvd.ti + (turn inputs.ti |=(i=val:tx [i `payer])) + %+ turn outputs.ti + |= o=val:tx + ?: =(pos.o vout) :: check whether this is the output that went to payee + [o payee] + [o `payer] + note + == + -- + :: + %fail-broadcast-tx + ?> =(src.bowl our.bowl) + ~& >>> "%fail-broadcast-tx" + :_ state(poym [~ ~]) + [(give-update %error %broadcast-fail)]~ + :: + %succeed-broadcast-tx + ?> =(src.bowl our.bowl) + ~& > "%succeed-broadcast-tx" + :_ state + :- (give-update %broadcast-success ~) + ?~ prov ~ + :- (poke-provider [%tx-info txid.intr]) + ?~ txbu.poym ~ + ?~ payee.u.txbu.poym ~ + :_ ~ + %- poke-peer + :* u.payee.u.txbu.poym + %expect-payment + txid.intr + value:(snag 0 txos.u.txbu.poym) + == + == +:: +:: +handle-provider-status: handle connectivity updates from provider +:: - retry pend.piym on any %connected event, since we're checking mempool +:: - if status is %connected, retry all pending address lookups +:: - only retry all if previously disconnected +:: - if block is updated, retry all address reqs +:: - if provider's network doesn't match network in our state, leave +:: +++ handle-provider-status + |= s=status:bp + ^- (quip card _state) + |^ + =^ cards state + ?~ prov `state + ?. =(host.u.prov src.bowl) `state + ?- -.s + %new-block + (on-connected u.prov network.s block.s fee.s `blockhash.s `blockfilter.s) + :: + %connected + (on-connected u.prov network.s block.s fee.s ~ ~) + :: + %disconnected + `state(prov `u.prov(connected %.n)) + == + :_ state + :* (give-update %btc-state btc-state) + (give-update %change-provider prov) + cards + == + :: + ++ on-connected + |= $: p=provider + =network + block=@ud + fee=(unit sats) + blockhash=(unit hexb) + blockfilter=(unit hexb) + == + ^- (quip card _state) + :_ %_ state + prov `p(connected %.y) + btc-state [block fee now.bowl] + == + ?: ?|(?!(connected.p) (lth block.btc-state block)) + ;: weld + (retry-pend-piym network) + (retry-poym network) + (retry-addrs network) + (retry-txs network) + (retry-scans network) + retry-ahistorical-txs + == + ;: weld +:: (retry-addrs network) + retry-ahistorical-txs + (retry-pend-piym network) + == + :: + ++ retry-ahistorical-txs + ^- (list card) + %+ turn ~(tap in ahistorical-txs) + |= =txid + (poke-provider [%tx-info txid]) + + :: + ++ retry-scans + |= =network + ^- (list card) + %- zing + %+ murn ~(tap by scans) + |= [[=xpub:bc =chyg] =batch] + ?. =(network network:(~(got by walts) xpub)) ~ + `-:(req-scan batch xpub chyg) + :: +retry-addrs: get info on addresses with unconfirmed UTXOs + :: + ++ retry-addrs + |= =network + ^- (list card) + %- zing + %+ murn ~(val by walts) + |= w=walt + ?. =(network network.w) ~ + ^- (unit (list card)) + :- ~ + %+ turn ~(tap by wach.w) + |= [a=address *] + (poke-provider [%address-info a]) + :: +retry-txs: get info on txs without enough confirmations + :: + ++ retry-txs + |= =network + ^- (list card) + %+ murn ~(tap by history) + |= [=txid =hest] + =/ w (~(get by walts) xpub.hest) + ?~ w ~ + ?. =(network network.u.w) ~ + ?: (gte confs.hest confs.u.w) ~ + `(poke-provider [%tx-info txid]) + :: + ++ retry-poym + |= =network + ^- (list card) + ?~ txbu.poym ~ + =/ w (~(get by walts) xpub.u.txbu.poym) + ?~ w ~ + ?. =(network network.u.w) ~ + %+ weld + ?~ signed-tx.u.txbu.poym ~ + ~[(poke-provider [%broadcast-tx u.signed-tx.u.txbu.poym])] + %+ turn txis.u.txbu.poym + |= =txi + (poke-provider [%raw-tx ~(get-txid txb:bl u.txbu.poym)]) + :: +retry-pend-piym: check whether txids in pend-piym are in mempool + :: + ++ retry-pend-piym + |= =network + ^- (list card) + %+ murn ~(tap by pend.piym) + |= [=txid p=payment] + =/ w (~(get by walts) xpub.p) + ?~ w ~ + ?. =(network network.u.w) ~ + `(poke-provider [%tx-info txid]) + -- +:: +++ handle-provider-update + |= upd=update:bp + ^- (quip card _state) + ?~ prov `state + ?. =(host.u.prov src.bowl) `state + ?. ?=(%.y -.upd) `state + ?- -.p.upd + %address-info + :: located in the helper in Scan Logic to keep all of that unified + :: + (handle-address-info address.p.upd utxos.p.upd used.p.upd) + :: + %tx-info + =/ [cards=(list card) sty=state-1] + (handle-tx-info info.p.upd) + :_ sty + [(poke-internal [%close-pym info.p.upd]) cards] + :: + %raw-tx + :_ state + ~[(poke-internal [%add-poym-raw-txi +.p.upd])] + :: + %broadcast-tx + ?~ txbu.poym `state + ?. =(~(get-txid txb:bl u.txbu.poym) txid.p.upd) + `state + :_ state + ?: ?|(broadcast.p.upd included.p.upd) + ~[(poke-internal [%succeed-broadcast-tx txid.p.upd])] + :~ (poke-internal [%fail-broadcast-tx txid.p.upd]) + (give-update %cancel-tx txid.p.upd) + == + == +:: +++ handle-tx-info + |= ti=info:tx + ^- (quip card _state) + |^ + =/ h (~(get by history) txid.ti) + =. ahistorical-txs (~(del in ahistorical-txs) txid.ti) + =/ our-inputs=(set address) + %- silt + %+ skim + %+ turn inputs.ti + |=(=val:tx address.val) + is-our-address + =/ our-outputs=(set address) + %- silt + %+ skim + %+ turn outputs.ti + |=(=val:tx address.val) + is-our-address + =/ our-addrs=(set address) :: all our addresses in inputs/outputs of tx + (~(uni in our-inputs) our-outputs) + :: + =/ addr-info-cards=(list card) + %+ turn ~(tap in our-addrs) + |= a=address + ^- card + (poke-provider [%address-info a]) + ?: =(0 ~(wyt in our-addrs)) `state + =/ =xpub + xpub.w:(need (address-coords:bl (snag 0 ~(tap in our-addrs)) ~(val by walts))) + ?~ h :: addresses in wallets, but tx not in history + =/ new-hest=hest (mk-hest xpub our-inputs our-outputs) + =. history (~(put by history) txid.ti new-hest) + :_ state + :_ :_ addr-info-cards + (give-update %new-tx new-hest) + (give-update %balance current-balance) + ?. included.ti :: tx in history, but not in mempool/blocks + :_ state(history (~(del by history) txid.ti)) + :_ :_ addr-info-cards + (give-update %cancel-tx txid.ti) + (give-update %balance current-balance) + =/ new-hest u.h(confs confs.ti, recvd recvd.ti) + =. history (~(put by history) txid.ti new-hest) + :_ state + :_ :_ addr-info-cards + (give-update %new-tx new-hest) + (give-update %balance current-balance) + :: + ++ mk-hest + :: has tx-info + |= [=xpub:bc our-inputs=(set address) our-outputs=(set address)] + ^- hest + :* xpub + txid.ti + confs.ti + recvd.ti + (turn inputs.ti |=(v=val:tx (is-our-ship our-inputs v))) + (turn outputs.ti |=(v=val:tx (is-our-ship our-outputs v))) + ~ + == + :: + ++ is-our-ship + |= [as=(set address) v=val:tx] + ^- [=val:tx s=(unit ship)] + [v ?:((~(has in as) address.v) `our.bowl ~)] + :: + ++ is-our-address + |=(a=address ?=(^ (address-coords:bl a ~(val by walts)))) + -- +++ set-curr-xpub + |= =xpub + ^- (quip card _state) + ?~ (find ~[xpub] scanned-wallets) `state + =. curr-xpub `xpub + :_ state + [give-initial]~ +:: +:: +:: Scan Logic +:: +:: Algorithm +:: Initiate a batch for each chyg, with max-gap idxs in it +:: Watch all of the addresses made from idxs +:: Request info on all addresses from provider +:: When an %address-info comes back: +:: - remove that idx from todo.batch +:: - run check-scan to check whether that chyg is done +:: - if it isn't, refill it with max-gap idxs to scan +:: +:: +handle-address-info: updates scans and wallet with address info +:: +++ handle-address-info + |= [=address utxos=(set utxo) used=?] + ^- (quip card _state) + =/ ac (address-coords:bl address ~(val by walts)) + ?~ ac + `state + =/ [w=walt =chyg =idx] u.ac + =. walts + %+ ~(put by walts) xpub.w + %+ ~(update-address wad:bl w chyg) + address + [used chyg idx utxos] + :: if transactions haven't made it into history, request transaction info + :: + =^ cards=(list card) ahistorical-txs + %+ roll ~(tap in utxos) + |= [u=utxo cad=(list card) ah=(set txid)] + ^- [(list card) (set txid)] + ?: (~(has by history) txid.u) + [cad ah] + :- [(poke-provider [%tx-info txid.u]) cad] + (~(put by ah) txid.u) + :: if the wallet+chyg is being scanned, update the scan batch + :: + =/ b (~(get by scans) [xpub.w chyg]) + ?~ b + [cards state] + =. scans + (del-scanned u.b(has-used ?|(used has-used.u.b)) xpub.w chyg idx) + ?: empty:(scan-status xpub.w chyg) + =^ scan-cards=(list card) state + (check-scan xpub.w) + [(weld scan-cards cards) state] + :: + [cards state] +:: +req-scan +:: - adds addresses in batch to wallet's watch map as un-used addresses +:: - returns provider %address-info request cards +:: +++ req-scan + |= [b=batch =xpub:bc =chyg] + ^- (quip card _state) + =/ w=walt (~(got by walts) xpub) + =/ as=(list [address [? ^chyg idx (set utxo)]]) + %+ turn ~(tap in todo.b) + |=(=idx [(~(mk-address wad:bl w chyg) idx) [%.n chyg idx *(set utxo)]]) + =. w + |- ?~ as w + $(as t.as, w (~(update-address wad:bl w chyg) -.i.as +.i.as)) + :- (turn as |=([a=address *] (poke-provider [%address-info a]))) + %= state + scans + (~(put by scans) [xpub chyg] b) + walts + (~(put by walts) xpub w) + == +:: +++ scan-status + |= [=xpub:bc =chyg] + ^- [empty=? done=?] + =/ b=batch (~(got by scans) [xpub chyg]) + =/ empty=? =(0 ~(wyt in todo.b)) + :- empty + ?&(empty ?!(has-used.b)) +:: +++ init-batches + |= [=xpub:bc endpoint=idx] + ^- (quip card _state) + =/ b=batch + [(silt (gulf 0 endpoint)) endpoint %.n] + =^ cards0 state (req-scan b xpub %0) + =^ cards1 state (req-scan b xpub %1) + [(weld cards0 cards1) state] +:: +bump-batch +:: if the batch is done but the wallet isn't done scanning, +:: returns new address requests and updated batch +:: +++ bump-batch + |= [=xpub:bc =chyg] + ^- (quip card _state) + =/ b=batch (~(got by scans) xpub chyg) + =/ s (scan-status xpub chyg) + ?. ?&(empty.s ?!(done.s)) + `state + =/ w=walt (~(got by walts) xpub) + =/ newb=batch + :* (silt (gulf +(endpoint.b) (add endpoint.b max-gap.w))) + (add endpoint.b max-gap.w) + %.n + == + (req-scan newb xpub chyg) +:: +del-scanned: delete scanned idxs +:: +++ del-scanned + |= [b=batch =xpub:bc =chyg to-delete=idx] + ^- ^scans + %+ ~(put by scans) [xpub chyg] + b(todo (~(del in todo.b) to-delete)) +:: delete the xpub from scans and set wallet to scanned +:: +++ end-scan + |= [=xpub:bc] + ^- (quip card _state) + =/ w=walt (~(got by walts) xpub) + =. scans (~(del by scans) [xpub %0]) + =. scans (~(del by scans) [xpub %1]) + %- (slog ~[leaf+"Scanned xpub {}"]) + =. state state(walts (~(put by walts) xpub w(scanned %.y))) + (set-curr-xpub xpub) +:: +check-scan: initiate a scan if one hasn't started +:: check status of scan if one is running +:: +++ check-scan + |= =xpub:bc + ^- (quip card _state) + =/ s0 (scan-status xpub %0) + =/ s1 (scan-status xpub %1) + ?: ?&(empty.s0 done.s0 empty.s1 done.s1) + (end-scan xpub) + =^ cards0=(list card) state + (bump-batch xpub %0) + =^ cards1=(list card) state + (bump-batch xpub %1) + [(weld cards0 cards1) state] +:: +:: +:: +++ poke-provider + |= [act=action:bp] + ^- card + ?~ prov ~|("provider not set" !!) + :* %pass /[(scot %da now.bowl)] + %agent [host.u.prov %btc-provider] + %poke %btc-provider-action !>([act]) + == +:: +++ poke-peer + |= [target=ship act=action] + ^- card + :* %pass /[(scot %da now.bowl)] %agent + [target %btc-wallet] %poke + %btc-wallet-action !>(act) + == +++ poke-internal + |= [intr=internal] + ^- card + :* %pass /[(scot %da now.bowl)] %agent + [our.bowl %btc-wallet] %poke + %btc-wallet-internal !>(intr) + == +:: +++ give-update + |= upd=update + ^- card + [%give %fact ~[/all] %btc-wallet-update !>(upd)] +:: +++ give-initial + ^- card + =^ a=(unit address) state + ?~ curr-xpub `state + =/ uw=(unit walt) (~(get by walts) u.curr-xpub) + ?: ?|(?=(~ uw) ?!(scanned.u.uw)) + ~|("no wallet with xpub or wallet not scanned yet" !!) + =/ [addr=address =idx w=walt] + ~(gen-address wad:bl u.uw %0) + [`addr state(walts (~(put by walts) u.curr-xpub w))] + =/ initial=update + :* %initial + prov + curr-xpub + current-balance + current-history + btc-state + a + == + (give-update initial) +:: +++ is-dust + |= [=sats =address] + ^- ? + %+ lth sats + (mul 3 (input-weight:bc (get-bipt:adr:bc address))) +:: +++ is-broadcasting + ^- ? + ?~ txbu.poym %.n + ?=(^ signed-tx.u.txbu.poym) +:: +:: Scry Helpers +:: +++ scanned-wallets + ^- (list xpub:bc) + %+ murn ~(tap by walts) + |= [=xpub:bc w=walt] + ^- (unit xpub:bc) + ?:(scanned.w `xpub ~) +:: +++ balance + |= =xpub:bc + ^- (unit [sats sats]) + =/ w (~(get by walts) xpub) + ?~ w ~ + =/ values=(list [confirmed=sats unconfirmed=sats]) + %+ turn ~(val by wach.u.w) + |= =addi ^- [sats sats] + %+ roll + %+ turn ~(tap by utxos.addi) + |= =utxo + ^- [sats sats] + ?: (~(spendable sut:bl [u.w eny.bowl block.btc-state ~ 0 ~]) utxo) + [value.utxo 0] + [0 value.utxo] + |= [[a=sats b=sats] out=[p=sats q=sats]] + [(add a p.out) (add b q.out)] + :- ~ + %+ roll values + |= [[a=sats b=sats] out=[p=sats q=sats]] + [(add a p.out) (add b q.out)] + :: +:: +++ current-balance + ^- (unit [sats sats]) + ?~ curr-xpub ~ + (balance u.curr-xpub) +:: +++ current-history + ^- ^history + ?~ curr-xpub ~ + %- ~(gas by *^history) + %+ skim ~(tap by history) + |= [txid =hest] + =(u.curr-xpub xpub.hest) +-- diff --git a/pkg/arvo/app/btc-wallet/img/tile.svg b/pkg/arvo/app/btc-wallet/img/tile.svg new file mode 100644 index 0000000000..ac70f15314 --- /dev/null +++ b/pkg/arvo/app/btc-wallet/img/tile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/pkg/arvo/app/btc-wallet/index.html b/pkg/arvo/app/btc-wallet/index.html new file mode 100644 index 0000000000..fefd5f7b18 --- /dev/null +++ b/pkg/arvo/app/btc-wallet/index.html @@ -0,0 +1,31 @@ + + + + Wallet + + + + + + + + + +
+
+ + + + + diff --git a/pkg/arvo/app/chat-cli.hoon b/pkg/arvo/app/chat-cli.hoon index b297103502..c13141a96d 100644 --- a/pkg/arvo/app/chat-cli.hoon +++ b/pkg/arvo/app/chat-cli.hoon @@ -169,7 +169,7 @@ :: %fact ?+ p.cage.sign ~|([dap.bowl %bad-sub-mark wire p.cage.sign] !!) - %graph-update-1 + %graph-update-2 %- on-graph-update:tc !<(update:graph q.cage.sign) == @@ -401,12 +401,16 @@ :: +read-post: add envelope to state and show it to user :: ++ read-post - |= [=target =index:post =post:post] + |= [=target =index:post =maybe-post:graph] ^- (quip card _session) - :- (show-post:sh-out target post) - %_ session - history [[target index] history.session] - count +(count.session) + ?- -.maybe-post + %| [~ session] + %& + :- (show-post:sh-out target p.maybe-post) + %_ session + history [[target index] history.session] + count +(count.session) + == == :: ++ notice-remove @@ -734,7 +738,8 @@ :: ?. (is-chat-graph target) [[(note:sh-out "no such chat")]~ put-ses] - =. viewing (~(put in viewing) target) + =. audience target + =. viewing (~(put in viewing) target) =^ cards state ?: (~(has by bound) target) [~ state] @@ -758,15 +763,15 @@ ::TODO move creation into lib? %^ act %out-message %graph-push-hook - :- %graph-update-1 + :- %graph-update-2 !> ^- update:graph :- now.bowl :+ %add-nodes audience %- ~(put by *(map index:post node:graph)) :- ~[now.bowl] :_ *internal-graph:graph - ^- post:post - [our-self ~[now.bowl] now.bowl [msg]~ ~ ~] + ^- maybe-post:graph + [%& `post:post`[our-self ~[now.bowl] now.bowl [msg]~ ~ ~]] :: +eval: run hoon, send code and result as message :: :: this double-virtualizes and clams to disable .^ for security reasons @@ -890,10 +895,12 @@ =/ =uid:post (snag index history) =/ =node:graph (got-node:libgraph uid) =. audience resource.uid + ?: ?=(%| -.post.node) + [~ state] :_ put-ses ^- (list card) :~ (print:sh-out ['?' ' ' number]) - (effect:sh-out ~(render-activate mr resource.uid post.node)) + (effect:sh-out ~(render-activate mr resource.uid p.post.node)) prompt:sh-out == -- diff --git a/pkg/arvo/app/chat-hook.hoon b/pkg/arvo/app/chat-hook.hoon index 906e30b4ec..ce44a73ea5 100644 --- a/pkg/arvo/app/chat-hook.hoon +++ b/pkg/arvo/app/chat-hook.hoon @@ -154,7 +154,7 @@ ++ poke-graph-store |= =update:graph-store ^- card - (poke-our %graph-store %graph-update-1 !>(update)) + (poke-our %graph-store %graph-update-2 !>(update)) :: ++ nobody ^- @p diff --git a/pkg/arvo/app/chat-store.hoon b/pkg/arvo/app/chat-store.hoon index 782cf0422a..9406360b47 100644 --- a/pkg/arvo/app/chat-store.hoon +++ b/pkg/arvo/app/chat-store.hoon @@ -1,334 +1,28 @@ -:: chat-store [landscape]: +:: chat-store [landscape]: deprecated :: -:: data store that holds linear sequences of chat messages -:: -/- *group, store=chat-store -/+ default-agent, verb, dbug, group-store, - graph-store, resource, *migrate, grpl=group, mdl=metadata -~% %chat-store-top ..part ~ +/- store=chat-store +/+ default-agent |% +$ card card:agent:gall -+$ versioned-state - $% state-0 - state-1 - state-2 - state-3 - state-4 - == -:: -+$ state-0 [%0 =inbox:store] -+$ state-1 [%1 =inbox:store] -+$ state-2 [%2 =inbox:store] -+$ state-3 [%3 =inbox:store] -+$ state-4 [%4 =inbox:store] -+$ admin-action - $% [%trim ~] - [%migrate-graph ~] - == -- :: -=| state-4 -=* state - -:: -%- agent:dbug -%+ verb | ^- agent:gall -=< - ~% %chat-store-agent-core ..peek-x-envelopes ~ - |_ =bowl:gall - +* this . - chat-core +> - cc ~(. chat-core bowl) - def ~(. (default-agent this %|) bowl) - :: - ++ on-init on-init:def - ++ on-save !>(state) - ++ on-load - |= old-vase=vase - ^- (quip card _this) - |^ - =/ old !<(versioned-state old-vase) - =| cards=(list card) - |- - ^- (quip card _this) - ?- -.old - %4 [cards this(state old)] - :: - %3 - =. cards :_(cards (poke-admin %migrate-graph ~)) - $(old [%4 inbox.old]) - :: - %2 - =/ =inbox:store - (migrate-path-map:group-store inbox.old) - =/ kick-paths - %~ tap in - %+ roll - ~(val by sup.bowl) - |= [[=ship sub=path] subs=(set path)] - ^- (set path) - ?. ?=([@ @ *] sub) - subs - ?. &(=(%mailbox i.sub) =('~' i.t.sub)) - subs - (~(put in subs) sub) - =? cards ?=(^ kick-paths) - :_ cards - [%give %kick kick-paths ~] - $(old [%3 inbox]) - :: - ?(%0 %1) $(old (old-to-2 inbox.old)) - :: - == - ++ poke-admin - |= =admin-action - ^- card - [%pass / %agent [our dap]:bowl %poke noun+!>(admin-action)] - :: - ++ old-to-2 - |= =inbox:store - ^- state-2 - :- %2 - %- ~(run by inbox) - |= =mailbox:store - ^- mailbox:store - [config.mailbox (flop envelopes.mailbox)] - -- - :: - ++ on-poke - ~/ %chat-store-poke - |= [=mark =vase] - ^- (quip card _this) - ?> (team:title our.bowl src.bowl) - =^ cards state - ?+ mark (on-poke:def mark vase) - %noun (poke-noun:cc !<(admin-action vase)) - %import (poke-import:cc q.vase) - == - [cards this] - :: - ++ on-watch on-watch:def - ++ on-leave on-leave:def - ++ on-peek - ~/ %chat-store-peek - |= =path - ^- (unit (unit cage)) - ?+ path (on-peek:def path) - [%x %all ~] ``noun+!>(inbox) - [%x %keys ~] ``noun+!>(~(key by inbox)) - [%x %envelopes *] (peek-x-envelopes:cc t.t.path) - [%x %mailbox *] - ?~ t.t.path - ~ - ``noun+!>((~(get by inbox) t.t.path)) - :: - [%x %config *] - ?~ t.t.path - ~ - =/ mailbox (~(get by inbox) t.t.path) - ?~ mailbox - ~ - ``noun+!>(config.u.mailbox) - :: - [%x %export ~] - ``noun+!>(state) - == - :: - ++ on-agent on-agent:def - ++ on-arvo on-arvo:def - ++ on-fail on-fail:def - -- +|_ =bowl:gall ++* this . + def ~(. (default-agent this %|) bowl) :: -~% %chat-store-library ..card ~ -|_ bol=bowl:gall -++ met ~(. mdl bol) -++ grp ~(. grpl bol) +++ on-init on-init:def +++ on-save !>(~) +++ on-load + |= old-vase=vase + ^- (quip card _this) + [~ this] :: -++ peek-x-envelopes - |= pax=path - ^- (unit (unit [%noun vase])) - ?+ pax ~ - [@ @ *] - =/ mail-path t.t.pax - =/ mailbox (~(get by inbox) mail-path) - ?~ mailbox - [~ ~ %noun !>(~)] - =* envelopes envelopes.u.mailbox - =/ sign-test=[?(%neg %pos) @] - %- need - %+ rush i.pax - ;~ pose - %+ cook - |= n=@ - [%neg n] - ;~(pfix hep dem:ag) - :: - %+ cook - |= n=@ - [%pos n] - dem:ag - == - =* length length.config.u.mailbox - =* start +.sign-test - ?: =(-.sign-test %neg) - ?: (gth start length) - [~ ~ %noun !>(envelopes)] - [~ ~ %noun !>((swag [(sub length start) start] envelopes))] - :: - =/ end (slav %ud i.t.pax) - ?. (lte start end) - ~ - =. end ?:((lth end length) end length) - [~ ~ %noun !>((swag [start (sub end start)] envelopes))] - == -:: -++ poke-noun - |= nou=admin-action - ^- (quip card _state) - ?: ?=([%migrate-graph ~] nou) - :_ state - (migrate-inbox inbox) - ~& %trimming-chat-store - :- ~ - %_ state - inbox - %- ~(urn by inbox) - |= [=path mailbox:store] - ^- mailbox:store - =/ [a=* out=(list envelope:store)] - %+ roll envelopes - |= $: =envelope:store - o=[[hav=(set serial:store) curr=@] out=(list envelope:store)] - == - ?: (~(has in hav.o) uid.envelope) - [[hav.o curr.o] out.o] - :- - ^- [(set serial:store) @] - [(~(put in hav.o) uid.envelope) +(curr.o)] - ^- (list envelope:store) - [envelope(number curr.o) out.o] - =/ len (lent out) - ~? !=(len (lent envelopes)) [path [%old (lent envelopes)] [%new len]] - [[len len] (flop out)] - == -:: -++ poke-import - |= arc=* - ^- (quip card _state) - =/ sty=state-4 [%4 (remake-map ;;((tree [path mailbox:store]) +.arc))] - :_ sty - (migrate-inbox inbox.sty) -:: -++ update-subscribers - |= [pax=path =update:store] - ^- (list card) - [%give %fact ~[pax] %chat-update !>(update)]~ -:: -++ send-diff - |= [pax=path upd=update:store] - ^- (list card) - %- zing - :~ (update-subscribers /all upd) - (update-subscribers /updates upd) - (update-subscribers [%mailbox pax] upd) - ?. |(|(=(%read -.upd) =(%message -.upd)) =(%messages -.upd)) - ~ - ?. |(=(%create -.upd) =(%delete -.upd)) - ~ - (update-subscribers /keys upd) - == -:: -++ migrate-inbox - |= =inbox:store - ^- (list card) - %- zing - (turn ~(tap by inbox) mailbox-to-updates) -:: -++ add-graph - |= [rid=resource =mailbox:store] - %- poke-graph-store - :- now.bol - :+ %add-graph rid - :- (mailbox-to-graph mailbox) - [`%graph-validator-chat %.y] -:: -++ archive-graph - |= rid=resource - %- poke-graph-store - [now.bol %archive-graph rid] -:: -++ nobody - ^- @p - (bex 128) -:: -++ path-to-resource - |= =path - ^- resource - ?. ?=([@ @ ~] path) - nobody^(spat path) - =/ m-ship=(unit ship) - (slaw %p i.path) - ?~ m-ship - nobody^(spat path) - [u.m-ship i.t.path] -:: -++ mailbox-to-updates - |= [=path =mailbox:store] - ^- (list card) - =/ app-rid=resource - (path-to-resource path) - =/ group-rid=resource - (fall (peek-group:met %graph app-rid) [nobody %bad-group]) - =/ group=(unit group) - (scry-group:grp group-rid) - :- (add-graph app-rid mailbox) - ?~ group (archive-graph app-rid)^~ - ?. &(=(~ members.u.group) hidden.u.group) ~ - ~& >>> "archiving {}" - :~ (archive-graph app-rid) - (remove-group group-rid) - == -:: -++ remove-group - |= group=resource - ^- card - =- [%pass / %agent [our.bol %group-store] %poke -] - group-update-0+!>([%remove-group group ~]) -:: -++ poke-graph-store - |= =update:graph-store - ^- card - [%pass / %agent [our.bol %graph-store] %poke %graph-update-1 !>(update)] -:: -++ letter-to-contents - |= =letter:store - ^- (list content:graph-store) - :_ ~ - ?. ?=(%me -.letter) - letter - [%text narrative.letter] -:: -++ envelope-to-node - |= =envelope:store - ^- [atom:graph-store node:graph-store] - =/ contents=(list content:graph-store) - (letter-to-contents letter.envelope) - =/ =index:graph-store - [when.envelope ~] - =, envelope - :- when.envelope - :_ [%empty ~] - ^- post:graph-store - :* author - index - when - contents - ~ ~ - == -:: -++ mailbox-to-graph - |= =mailbox:store - ^- graph:graph-store - %+ gas:orm:graph-store *graph:graph-store - (turn envelopes.mailbox envelope-to-node) +++ on-poke on-poke:def +++ on-watch on-watch:def +++ on-leave on-leave:def +++ on-peek on-peek:def +++ on-agent on-agent:def +++ on-arvo on-arvo:def +++ on-fail on-fail:def -- diff --git a/pkg/arvo/app/contact-push-hook.hoon b/pkg/arvo/app/contact-push-hook.hoon index ed2d4660bd..bb8a1a5262 100644 --- a/pkg/arvo/app/contact-push-hook.hoon +++ b/pkg/arvo/app/contact-push-hook.hoon @@ -70,10 +70,11 @@ :: ++ transform-proxy-update |= vas=vase - ^- (unit vase) + ^- (quip card (unit vase)) :: TODO: should check if user is allowed to %add, %remove, %edit :: contact =/ =update:store !<(update:store vas) + :- ~ ?- -.update %initial ~ %add `vas diff --git a/pkg/arvo/app/demo-push-hook.hoon b/pkg/arvo/app/demo-push-hook.hoon index 4dcd47737f..988a31b2a4 100644 --- a/pkg/arvo/app/demo-push-hook.hoon +++ b/pkg/arvo/app/demo-push-hook.hoon @@ -43,8 +43,8 @@ :: ++ transform-proxy-update |= vas=vase - ^- (unit vase) - `vas + ^- (quip card (unit vase)) + ``vas :: ++ resource-for-update |= =vase diff --git a/pkg/arvo/app/dm-hook.hoon b/pkg/arvo/app/dm-hook.hoon new file mode 100644 index 0000000000..2ceca38ea4 --- /dev/null +++ b/pkg/arvo/app/dm-hook.hoon @@ -0,0 +1,319 @@ +:: dm-hook [landscape]: receive and send DMs +:: +/+ default-agent, dbug, store=graph-store, graphlib=graph, agentio, resource +/+ sig=signatures, hook=dm-hook +:: +|% +:: ++$ base-state-0 + $: screening=? + screened=(jug ship [=index:store =node:store]) + pending=(jar ship atom) + == +:: ++$ state-0 [%0 base-state-0] ++$ state-1 [%1 base-state-0] ++$ versioned-state + $% state-0 + state-1 + == ++$ card card:agent:gall ++$ nodes (map index:store node:store) +++ orm orm:store +-- +:: +=| state-1 +=* state - +%- agent:dbug +^- agent:gall +:: +|_ =bowl:gall ++* this . + def ~(. (default-agent this %|) bowl) + gra ~(. graphlib bowl) + io ~(. agentio bowl) + pass pass:io +:: +++ on-init + :_ this + :_ ~ + =/ dms=(list resource) + ?. .^(? %gu (scry:io %graph-store ~)) + ~ + %+ skim ~(tap in get-keys:gra) + |=([ship name=term] ?=(^ (rush name ;~(pfix (jest 'dm--') fed:ag)))) + |^ + %+ poke-our:pass %graph-store + %+ update:cg:gra now.bowl + :+ %add-graph [our.bowl %dm-inbox] + [graph `%graph-validator-dm %.n] + :: + ++ dm-parser + ;~(pfix (jest 'dm--') fed:ag) + :: + ++ counterparty + |= rid=resource + =/ =ship (rash name.rid dm-parser) + ?. =(our.bowl ship) ship + entity.rid + :: + ++ update-indices + |= [pfix=index:store =graph:store] + =* loop $ + ^- graph:store + %+ gas:orm *graph:store + %+ turn (tap:orm graph) + |= [=atom =node:store] + ^- [^atom node:store] + =/ =index:store (snoc pfix atom) + :- atom + =. children.node + ?: ?=(%empty -.children.node) children.node + [%graph loop(pfix index, graph p.children.node)] + ?: ?=(%| -.post.node) node + node(index.p.post index) + :: + ++ graph + %+ roll dms + |= [rid=resource =graph:store] + ^- graph:store + =/ =ship (counterparty rid) + =| =post:store + =: author.post our.bowl + index.post [ship ~] + time-sent.post now.bowl + == + =/ dm=graph:store + (update-indices ~[ship] (get-graph-mop:gra rid)) + (put:orm:store graph `@`ship [%& post] %graph dm) + -- +:: +++ on-save !>(state) +++ on-load + |= =vase + ^- (quip card _this) + =+ !<(old=versioned-state vase) + ?: ?=(%1 -.old) `this(state old) + :_ this(state [%1 +.old]) + (poke-self:pass noun+!>(%reinit))^~ +:: +++ on-poke + |= [=mark =vase] + ^- (quip card _this) + |^ + ?+ mark (on-poke:def mark vase) + %noun + ?+ q.vase !! + %reinit + ?: (~(has in get-keys:gra) [our.bowl %dm-inbox]) + `this + on-init + == + :: + %dm-hook-action + =+ !<(=action:hook vase) + =^ cards state + ?+ -.action !! + %accept (accept-screen ship.action) + %decline (decline-screen ship.action) + %screen (set-screen screen.action) + == + [cards this] + :: + %graph-update-2 + =+ !<(=update:store vase) + ?+ -.q.update !! + %add-nodes + ?> ?=([@ %dm-inbox] resource.q.update) + =^ cards state + ?: =(our.bowl src.bowl) + (outgoing-add (hash-and-sign nodes.q.update)) + ?: &(screening !(dm-exists src.bowl)) + (screen-add nodes.q.update) + (incoming-add nodes.q.update) + [cards this] + == + == + :: + ++ hash-and-sign + |= =nodes + %- ~(gas by *^nodes) + %+ turn ~(tap by nodes) + |= [=index:store =node:store] + ^- [index:store node:store] + :- index + ?> ?=(%& -.post.node) + =* p post.node + =/ =hash:store + `@ux`(sham [~ author time-sent contents]:p.p) + %_ node + hash.p.post `hash + :: + signatures.p.post + %- ~(gas in *signatures:store) + [(sign:sig our.bowl now.bowl hash)]~ + == + :: + ++ give + |= =action:hook + ^- card + (fact:io dm-hook-action+!>(action) ~[/updates]) + :: + ++ accept-screen + |= =ship + ^- (quip card _state) + =/ unscreened=nodes + %- ~(gas by *nodes) + ~(tap in (~(get ju screened) ship)) + :_ state(screened (~(del by screened) ship)) + %+ welp (add-missing-root ship) + :~ %+ poke-our:pass %graph-store + (update:cg:gra now.bowl %add-nodes [our.bowl %dm-inbox] unscreened) + :: + (give %accept ship) + == + :: + ++ set-screen + |= screen=? + :_ state(screening screen) + (give %screen screen)^~ + :: + ++ decline-screen + |= =ship + ^- (quip card _state) + :_ state(screened (~(del by screened) ship)) + (give %decline ship)^~ + :: + ++ screen-add + |= =nodes + ?> =(1 ~(wyt by nodes)) + =/ ship-screen (~(get ju screened) src.bowl) + =. ship-screen (~(uni in ship-screen) (normalize-incoming nodes)) + `state(screened (~(put by screened) src.bowl ship-screen)) + :: + ++ dm-exists + |= =ship + =/ =index:store + [ship ~] + (check-node-existence:gra [our.bowl %dm-inbox] index) + :: + ++ add-node + |= [=index:store =node:store] + ^- update:store + :^ now.bowl %add-nodes [our.bowl %dm-inbox] + (~(gas by *nodes) [index node] ~) + :: + ++ add-missing-root + |= =ship + ^- (list card) + ?: (dm-exists ship) ~ + =/ =index:store + [ship ~] + =| =post:store + =: author.post our.bowl + index.post index + time-sent.post now.bowl + == + =/ =node:store + [%&^post %empty ~] + (poke-our:pass %graph-store (update:cg:gra (add-node index node)))^~ + :: + ++ outgoing-add + |= =nodes + ^- (quip card _state) + =/ nodes=(list [=index:store =node:store]) + ~(tap by nodes) + =| cards=(list card) + |- ^- (quip card _state) + ?~ nodes [cards state] + ?> ?=([@ @ ~] index.i.nodes) + =/ =ship i.index.i.nodes + =/ =dock [ship %dm-hook] + =/ =wire /dm/(scot %p ship) + =/ =cage + (update:cg:gra (add-node [index node]:i.nodes)) + %= $ + nodes t.nodes + pending (~(add ja pending) ship now.bowl) + :: + cards + ;: welp + cards + :: + (add-missing-root ship) + :: + :- (poke-our:pass %graph-store cage) + ?: =(our.bowl ship) ~ + (~(poke pass wire) dock cage)^~ + == + == + :: + ++ normalize-incoming + |= =nodes + ^- ^nodes + %- ~(gas by *^nodes) + %+ turn ~(tap by nodes) + |= [=index:store =node:store] + ?> ?=([@ @ ~] index) + ?> ?=(%empty -.children.node) + ?> ?=(%& -.post.node) + =/ new-index=index:store + [src.bowl now.bowl ~] + =. index.p.post.node + new-index + [new-index node] + :: + ++ incoming-add + |= =nodes + ^- (quip card _state) + :_ state + ?> =(1 ~(wyt by nodes)) + =* ship src.bowl + %+ snoc (add-missing-root ship) + %+ poke-our:pass %graph-store + %+ update:cg:gra now.bowl + [%add-nodes [our.bowl %dm-inbox] (normalize-incoming nodes)] + -- +:: +++ on-watch + |= =path + ?. ?=([%updates ~] path) + (on-watch:def path) + :_ this + :~ (fact-init:io dm-hook-action+!>([%pendings ~(key by screened)])) + (fact-init:io dm-hook-action+!>([%screen screening])) + == +:: +++ on-peek on-peek:def +++ on-leave on-leave:def +++ on-agent + |= [=wire =sign:agent:gall] + ^- (quip card _this) + |^ + ?. ?=([%dm @ ~] wire) + (on-agent:def wire sign) + ?> ?=(%poke-ack -.sign) + =/ =ship + (slav %p i.t.wire) + =^ acked=atom state + (remove-pending ship) + ?~ p.sign + `this + :_ this + :_ ~ + =+ indices=(~(gas in *(set index:store)) ~[ship acked] ~) + %+ poke-our:pass %graph-store + (update:cg:gra now.bowl %remove-posts [our.bowl %dm-inbox] indices) + :: + ++ remove-pending + |= =ship + ^- [atom _state] + =/ pend-ship=(list atom) + (flop (~(get ja pending) ship)) + ?> ?=(^ pend-ship) + [i.pend-ship state(pending (~(put by pending) ship (flop t.pend-ship)))] + -- + +++ on-arvo on-arvo:def +++ on-fail on-fail:def +-- diff --git a/pkg/arvo/app/dojo.hoon b/pkg/arvo/app/dojo.hoon index c06b86e50e..a8a9b5dd1a 100644 --- a/pkg/arvo/app/dojo.hoon +++ b/pkg/arvo/app/dojo.hoon @@ -875,7 +875,7 @@ %ge (dy-run-generator (dy-cage p.p.p.bil) q.p.bil) %sa =+ .^(=dais:clay cb+(en-beam he-beak /[p.bil])) - (dy-hand p.bil bunt:dais) + (dy-hand p.bil *vale:dais) :: %as =/ cag=cage (dy-cage p.q.bil) @@ -1162,6 +1162,7 @@ %import !! %export-all !! %import-all !! + %cancel !! %as :* %as mar.source.com $(num +(num), source.com next.source.com) diff --git a/pkg/arvo/app/file-server.hoon b/pkg/arvo/app/file-server.hoon index 8bff63cc79..f2b910f44b 100644 --- a/pkg/arvo/app/file-server.hoon +++ b/pkg/arvo/app/file-server.hoon @@ -188,8 +188,11 @@ ?: ?=([%'~landscape' %js %session ~] site.req-line) %+ require-authorization-simple:app inbound-request - %- js-response:gen - (as-octt:mimes:html "window.ship = '{+:(scow %p our.bowl)}';") + %. %- as-octs:mimes:html + (rap 3 'window.ship = "' (rsh 3 (scot %p our.bowl)) '";' ~) + %* . js-response:gen + cache %.n + == :: =/ [payload=simple-payload:http public=?] (get-file req-line is-file) ?: public payload @@ -222,6 +225,8 @@ [~ %js] (js-response:gen file) [~ %css] (css-response:gen file) [~ %png] (png-response:gen file) + [~ %svg] (svg-response:gen file) + [~ %ico] (ico-response:gen file) :: [~ %html] %. file @@ -238,11 +243,9 @@ [not-found:gen %.n] :_ public.u.content =/ mime-type=@t (rsh 3 (crip )) - :: Should maybe inspect to see how long cache should hold - :: =/ headers :~ content-type+mime-type - max-1-da:gen + max-1-wk:gen 'service-worker-allowed'^'/' == [[200 headers] `q.u.data] @@ -271,7 +274,10 @@ ++ match-content-path |= [pax=path =^serving is-file=?] ^- (unit [content path ?]) - %- ~(rep by serving) + %+ roll + %+ sort ~(tap by serving) + |= [[a=path *] [b=path *]] + (gth (lent a) (lent b)) |= $: [url-base=path =content public=? spa=?] out=(unit [content path ?]) == diff --git a/pkg/arvo/app/glob.hoon b/pkg/arvo/app/glob.hoon index 0fb9ffa4a6..0dc73742ff 100644 --- a/pkg/arvo/app/glob.hoon +++ b/pkg/arvo/app/glob.hoon @@ -2,13 +2,16 @@ :: :: prompts content delivery and Gall state storage for Landscape JS blob :: -/- glob +/- glob, *resource /+ default-agent, verb, dbug |% -++ hash 0v3.g6u13.haedt.jt4hd.61ek5.6t30q +++ landscape-hash 0v2.i41hn.un6g3.jucd7.rhrah.n0qmv +++ btc-wallet-hash 0v2.3qak4.al612.8m1ig.kg03r.mfide +$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))] ++$ state-1 [%1 =globs:glob] +$ all-states $% state-0 + state-1 == +$ card card:agent:gall -- @@ -19,12 +22,12 @@ [%pass [%timer path] %arvo %b %wait (add now ~m30)] :: ++ wait-start - |= now=@da + |= [now=@da =path] ^- card - [%pass /start %arvo %b %wait now] + [%pass [%start path] %arvo %b %wait now] :: ++ poke-file-server - |= [our=@p =cage] + |= [our=@p hash=@uv =cage] ^- card [%pass /serving/(scot %uv hash) %agent [our %file-server] %poke cage] :: @@ -43,9 +46,12 @@ ^- card [%pass [%running path] %agent [our %spider] %leave ~] -- -=| state=state-0 -=. hash.state hash -=/ serve-path=path /'~landscape'/js/bundle +=| state=state-1 +=. globs.state + (~(put by globs.state) /'~landscape'/js/bundle landscape-hash ~) +=. globs.state + (~(put by globs.state) /'~btc'/js/bundle btc-wallet-hash ~) +:: ^- agent:gall %+ verb | %- agent:dbug @@ -56,77 +62,121 @@ ++ on-init ^- (quip card _this) :: delay through timer to make sure %spider has started - [[(wait-start now.bowl) ~] this] + :_ this + %+ turn ~(tap by ~(key by globs.state)) + |=(=path (wait-start now.bowl path)) :: ++ on-save !>(state) ++ on-load |= old-state=vase ^- (quip card _this) =+ !<(old=all-states old-state) - ?> ?=(%0 -.old) - ?~ glob.old - on-init - ?: ?=(%& -.u.glob.old) - ?: =(hash.old hash.state) - `this(state old) - on-init - =/ cancel-cards - =/ args [tid.p.u.glob.old &] - :~ (leave-spider /(scot %uv hash.old) our.bowl) - (poke-spider /(scot %uv hash.old) our.bowl %spider-stop !>(args)) + =| cards=(list card) + =/ upgrading=? %.n + |- + ?- -.old + %1 + =/ [cards-1=(list card) =globs:glob] + %- ~(rep by globs.old) + |= $: [=serve=path =glob-details:glob] + cards=(list card) + globs=_globs.state + == + ^- [(list card) globs:glob] + =/ new-glob-details (~(get by globs) serve-path) + ?~ new-glob-details + [cards globs] + ?~ glob.glob-details + :_ globs + [(wait-start now.bowl serve-path) cards] + ?: ?=(%& -.u.glob.glob-details) + ?: =(hash.u.new-glob-details hash.glob-details) + [cards (~(put by globs) serve-path glob-details)] + :_ globs + [(wait-start now.bowl serve-path) cards] + ?: upgrading + :_ globs + [(wait-start now.bowl serve-path) cards] + =/ args [tid.p.u.glob.glob-details &] + =/ spider-wire [(scot %uv hash.glob-details) serve-path] + :_ globs + :* (leave-spider spider-wire our.bowl) + (poke-spider spider-wire our.bowl %spider-stop !>(args)) + (wait-start now.bowl serve-path) + cards + == + :- (weld cards cards-1) + this(globs.state globs) + :: + %0 + =/ globs + (~(put by globs.state) /'~landscape'/js/bundle [hash.old glob.old]) + %= $ + old [%1 globs] + :: + cards + ?~ glob.old ~ + ?: =(%& -.u.glob.old) ~ + ?> ?=(%| -.u.glob.old) + =/ args [tid.p.u.glob.old &] + :~ (leave-spider /(scot %uv hash.old) our.bowl) + (poke-spider /(scot %uv hash.old) our.bowl %spider-stop !>(args)) + == + :: + upgrading %.y == - =^ init-cards this on-init - [(weld cancel-cards init-cards) this] + == :: ++ on-poke |= [=mark =vase] ^- (quip card _this) ?+ mark (on-poke:def mark vase) %glob-make + =+ !<(dir=path vase) :_ this =/ home=path /(scot %p our.bowl)/home/(scot %da now.bowl) + =+ .^(paths=(list path) %ct (weld home dir)) =+ .^(=js=tube:clay %cc (weld home /js/mime)) =+ .^(=map=tube:clay %cc (weld home /map/mime)) - =+ .^(arch %cy (weld home /app/landscape/js/bundle)) - =/ bundle-hash=@t - %- need - ^- (unit @t) - %- ~(rep by dir) - |= [[file=@t ~] out=(unit @t)] - ?^ out out - ?. ?& =((end [3 6] file) 'index.') - !=('sj.' (end [3 3] (swp 3 file))) - == - out - ``@t`(rsh [3 6] file) - =/ js-name - (cat 3 'index.' bundle-hash) - =/ map-name - (cat 3 js-name '.js') - =+ .^(js=@t %cx :(weld home /app/landscape/js/bundle /[js-name]/js)) - =+ .^(map=@t %cx :(weld home /app/landscape/js/bundle /[map-name]/map)) - =+ .^(sw=@t %cx :(weld home /app/landscape/js/bundle /serviceworker/js)) - =+ !<(=js=mime (js-tube !>(js))) - =+ !<(=sw=mime (js-tube !>(sw))) - =+ !<(=map=mime (map-tube !>(map))) =/ =glob:glob %- ~(gas by *glob:glob) - :~ /[js-name]/js^js-mime - /[map-name]/map^map-mime - /serviceworker/js^sw-mime + %+ turn paths + |= pax=path + ^- [path mime] + =+ .^(file=@t %cx (weld home pax)) + =/ mar (snag 0 (flop pax)) + :- (slag (lent dir) pax) + ?+ mar ~|(unsupported-glob-type+mar !!) + %js !<(mime (js-tube !>(file))) + %map !<(mime (map-tube !>(file))) == =/ =path /(cat 3 'glob-' (scot %uv (sham glob)))/glob + ~& globbed+`(set ^path)`~(key by glob) [%pass /make %agent [our.bowl %hood] %poke %drum-put !>([path (jam glob)])]~ :: %noun - ?: =(%kick q.vase) - (on-load !>(state(hash *@uv))) + ?: =(%kick -.q.vase) + =+ !<([%kick =path] vase) + =/ glob-details (~(get by globs.state) path) + ?~ glob-details + ~& no-such-glob+path + `this + =/ new-state + state(globs (~(put by globs.state) path *@uv glob.u.glob-details)) + (on-load !>(new-state)) (on-poke:def mark vase) == :: ++ on-watch on-watch:def ++ on-leave on-leave:def -++ on-peek on-peek:def +:: +++ on-peek + |= =path + ^- (unit (unit cage)) + ?+ path (on-peek:def path) + [%x %btc-wallet ~] ``noun+!>(btc-wallet-hash) + == +:: ++ on-agent |= [=wire =sign:agent:gall] ^- (quip card _this) @@ -134,83 +184,109 @@ (on-agent:def wire sign) ?: ?=([%make ~] wire) (on-agent:def wire sign) - ?. ?=([%running @ ~] wire) + ?. ?=([%running @ *] wire) %- (slog leaf+"glob: strange on-agent! {}" ~) (on-agent:def wire sign) + :: + =/ produced-hash (slav %uv i.t.wire) + =* serve-path t.t.wire + =/ glob-details (~(get by globs.state) serve-path) + ?~ glob-details + [~ this] + ?. =(hash.u.glob-details produced-hash) + [~ this] ?- -.sign %poke-ack ?~ p.sign [~ this] %- (slog leaf+"glob: couldn't start thread; will retry" u.p.sign) - :_ this(glob.state ~) :_ ~ - (leave-spider t.wire our.bowl) + :_ this(globs.state (~(put by globs.state) serve-path produced-hash ~)) + [(leave-spider t.wire our.bowl)]~ :: %watch-ack ?~ p.sign [~ this] %- (slog leaf+"glob: couldn't listen to thread; will retry" u.p.sign) - [~ this(glob.state ~)] + [~ this(globs.state (~(put by globs.state) serve-path produced-hash ~))] :: %kick - =? glob.state ?=([~ %| *] glob.state) - ~ - `this + ?. ?=([~ %| *] glob.u.glob-details) + `this + [~ this(globs.state (~(put by globs.state) serve-path produced-hash ~))] :: %fact - =/ produced-hash (slav %uv i.t.wire) - ?. =(hash.state produced-hash) - [~ this] ?+ p.cage.sign (on-agent:def wire sign) %thread-fail =+ !<([=term =tang] q.cage.sign) %- (slog leaf+"glob: thread failed; will retry" leaf+ tang) - [~ this(glob.state ~)] + :- ~ + this(globs.state (~(put by globs.state) serve-path produced-hash ~)) :: %thread-done =+ !<(=glob:glob q.cage.sign) - ?. =(hash.state (sham glob)) + ?. =(hash.u.glob-details (sham glob)) %: mean leaf+"glob: hash doesn't match!" - >expected=hash.state< + >expected=hash.u.glob-details< >got=(sham glob)< ~ == - :_ this(glob.state `[%& glob]) :_ ~ - %+ poke-file-server our.bowl - [%file-server-action !>([%serve-glob serve-path glob %&])] + =. globs.state + (~(put by globs.state) serve-path produced-hash `[%& glob]) + :_ this :_ ~ + %: poke-file-server + our.bowl + produced-hash + %file-server-action + !>([%serve-glob serve-path glob %&]) + == == == :: ++ on-arvo |= [=wire =sign-arvo] ^- (quip card _this) - ?: ?=([%start ~] wire) - =/ new-tid=@ta (cat 3 'glob--' (scot %uv eny.bowl)) - =/ args [~ `new-tid %glob !>([~ hash.state])] - =/ action !>([%unserve-dir serve-path]) - :_ this(glob.state `[%| new-tid]) - :~ (poke-file-server our.bowl %file-server-action action) - (wait-timeout /[new-tid] now.bowl) - (watch-spider /(scot %uv hash.state) our.bowl /thread-result/[new-tid]) - (poke-spider /(scot %uv hash.state) our.bowl %spider-start !>(args)) + ?: ?=([%start *] wire) + =* serve-path t.wire + =/ glob-details (~(get by globs.state) serve-path) + ?~ glob-details + [~ this] + =/ new-tid=@ta (cat 3 'glob--' (scot %uv (sham eny.bowl serve-path))) + =/ args [~ `new-tid %glob !>([~ hash.u.glob-details])] + =/ action=cage [%file-server-action !>([%unserve-dir serve-path])] + =/ spider-wire [(scot %uv hash.u.glob-details) serve-path] + =. globs.state + (~(put by globs.state) serve-path hash.u.glob-details `[%| new-tid]) + :_ this + :~ (poke-file-server our.bowl hash.u.glob-details action) + (wait-timeout [new-tid serve-path] now.bowl) + (watch-spider spider-wire our.bowl /thread-result/[new-tid]) + (poke-spider spider-wire our.bowl %spider-start !>(args)) == - ?. ?=([%timer @ ~] wire) + :: + ?. ?=([%timer @ *] wire) %- (slog leaf+"glob: strange on-arvo wire: {}" ~) `this ?. ?=(%wake +<.sign-arvo) %- (slog leaf+"glob: strange on-arvo sign: {}" ~) `this - ?: ?=([~ %& *] glob.state) + =* serve-path t.wire + =/ glob-details (~(get by globs.state) serve-path) + ?~ glob-details `this - ?. ?| ?=(~ glob.state) - =(i.t.wire tid.p.u.glob.state) + ?: ?=([~ %& *] glob.u.glob-details) + `this + ?. ?| ?=(~ glob.u.glob-details) + =(i.t.wire tid.p.u.glob.u.glob-details) == `this ?^ error.sign-arvo %- (slog leaf+"glob: timer handling failed; will retry" ~) [[(wait-timeout t.wire now.bowl)]~ this] %- (slog leaf+"glob: timed out; retrying" ~) - (on-load !>(state(hash *@uv))) + =/ new-details u.glob-details(hash *@uv) + =/ new-state state(globs (~(put by globs.state) serve-path new-details)) + (on-load !>(new-state)) :: ++ on-fail on-fail:def -- diff --git a/pkg/arvo/app/graph-pull-hook.hoon b/pkg/arvo/app/graph-pull-hook.hoon index 54031f9892..1f9f9fc0e4 100644 --- a/pkg/arvo/app/graph-pull-hook.hoon +++ b/pkg/arvo/app/graph-pull-hook.hoon @@ -9,7 +9,7 @@ update:store %graph-update %graph-push-hook - 1 1 + 2 2 %.n == -- @@ -41,7 +41,7 @@ %- (slog leaf+"nacked {}" tang) :_ this ?. (~(has in get-keys:gra) resource) ~ - =- [%pass /pull-nack %agent [our.bowl %graph-store] %poke %graph-update-1 -]~ + =- [%pass /pull-nack %agent [our.bowl %graph-store] %poke %graph-update-2 -]~ !> ^- update:store [now.bowl [%archive-graph resource]] :: diff --git a/pkg/arvo/app/graph-push-hook.hoon b/pkg/arvo/app/graph-push-hook.hoon index 94780bf582..853828d891 100644 --- a/pkg/arvo/app/graph-push-hook.hoon +++ b/pkg/arvo/app/graph-push-hook.hoon @@ -1,6 +1,6 @@ /- *group, metadata=metadata-store /+ store=graph-store, mdl=metadata, res=resource, graph, group, default-agent, - dbug, verb, push-hook + dbug, verb, push-hook, agentio :: ~% %graph-push-hook-top ..part ~ |% @@ -12,16 +12,44 @@ update:store %graph-update %graph-pull-hook - 1 1 + 2 2 == :: +$ agent (push-hook:push-hook config) :: +$ state-null ~ +$ state-zero [%0 marks=(set mark)] ++$ state-one [%1 ~] +$ versioned-state $@ state-null - state-zero + $% state-zero + state-one + == +:: ++$ cached-transform + $-([index:store post:store atom ?] [index:store post:store]) +:: ++$ cached-permission + $-(indexed-post:store $-(vip-metadata:metadata permissions:store)) +:: +:: TODO: come back to this and potentially use send a %t +:: to be notified of validator changes ++$ cache + $: graph-to-mark=(map resource:res (unit mark)) + perm-marks=(map [mark @tas] cached-permission) + transform-marks=(map mark cached-transform) + == +:: ++$ inflated-state + $: state-one + cache + == +:: ++$ cache-action + $% [%graph-to-mark (pair resource:res (unit mark))] + [%perm-marks (pair (pair mark @tas) cached-permission)] + [%transform-marks (pair mark cached-transform)] + == -- :: %- agent:dbug @@ -30,26 +58,48 @@ %- (agent:push-hook config) ^- agent =- -=| state-zero +~% %graph-push-hook-agent ..scry.hook-core ~ +=| inflated-state =* state - |_ =bowl:gall +* this . def ~(. (default-agent this %|) bowl) grp ~(. group bowl) gra ~(. graph bowl) - hc ~(. hook-core bowl) + met ~(. mdl bowl) + hc ~(. hook-core bowl +.state) + io ~(. agentio bowl) :: ++ on-init on-init:def -++ on-save !>(state) +++ on-save !>(-.state) ++ on-load |= =vase =+ !<(old=versioned-state vase) =? old ?=(~ old) [%0 ~] - ?> ?=(%0 -.old) - `this(state old) + =? old ?=(%0 -.old) + [%1 ~] + ?> ?=(%1 -.old) + `this(-.state old, +.state *cache) +:: +++ on-poke + |= [=mark =vase] + ^- (quip card _this) + ?. =(mark %graph-cache-hook) + [~ this] + =/ a=cache-action !<(cache-action vase) + =* c +.state + =* graph-to-mark graph-to-mark.c + =* perm-marks perm-marks.c + =* transform-marks transform-marks.c + =. c + ?- -.a + %graph-to-mark c(graph-to-mark (~(put by graph-to-mark) p.a q.a)) + %perm-marks c(perm-marks (~(put by perm-marks) p.a q.a)) + %transform-marks c(transform-marks (~(put by transform-marks) p.a q.a)) + == + [~ this(+.state c)] :: -++ on-poke on-poke:def ++ on-agent on-agent:def ++ on-watch on-watch:def ++ on-leave on-leave:def @@ -58,47 +108,77 @@ |= [=wire =sign-arvo] ^- (quip card _this) ?+ wire (on-arvo:def wire sign-arvo) + :: XX: no longer necessary :: - [%perms @ @ ~] - ?> ?=(?(%add %remove) i.t.t.wire) - =* mark i.t.wire - :_ this - (build-permissions:hc mark i.t.t.wire %next)^~ - :: - [%transform-add @ ~] - =* mark i.t.wire - :_ this - (build-transform-add:hc mark %next)^~ + [%perms @ @ ~] [~ this] + [%transform-add @ ~] [~ this] == :: ++ on-fail on-fail:def ++ transform-proxy-update + ~/ %transform-proxy-update |= vas=vase - ^- (unit vase) + ^- (quip card (unit vase)) =/ =update:store !<(update:store vas) =* rid resource.q.update =. p.update now.bowl ?- -.q.update %add-nodes - ?. (is-allowed-add:hc rid nodes.q.update) - ~ - =/ mark (get-mark:gra rid) - ?~ mark `vas - |^ - =/ transform - !< $-([index:store post:store atom ?] [index:store post:store]) - %. !>(*indexed-post:store) - .^(tube:clay (scry:hc %cc %home /[u.mark]/transform-add-nodes)) - =/ [* result=(list [index:store node:store])] - %+ roll - (flatten-node-map ~(tap by nodes.q.update)) - (transform-list transform) - =. nodes.q.update - %- ~(gas by *(map index:store node:store)) - result - [~ !>(update)] + =| cards=(list card) + ?: ?=(^ (rush name.rid ;~(pfix (jest 'dm--') fed:ag))) + :: block new DM messages + [~ ~] + =^ allowed cards (is-allowed-add:hc rid nodes.q.update) + ?. allowed + [cards ~] + =/ mark-cached (~(has by graph-to-mark) rid) + =/ mark + ?: mark-cached + (~(got by graph-to-mark) rid) + (get-mark:gra rid) + ?~ mark + [cards `vas] + =< $ + ~% %transform-add-nodes ..transform-proxy-update ~ + |% + ++ $ + ^- (quip card (unit vase)) + =/ transform-cached (~(has by transform-marks) u.mark) + =/ transform=cached-transform + ?: transform-cached + (~(got by transform-marks) u.mark) + =/ =tube:clay + .^(tube:clay (scry:hc %cc %home /[u.mark]/transform-add-nodes)) + !< cached-transform + %. !>(*indexed-post:store) + tube + =/ [* result=(list [index:store node:store])] + %+ roll + (flatten-node-map ~(tap by nodes.q.update)) + (transform-list transform) + =. nodes.q.update + %- ~(gas by *(map index:store node:store)) + result + :_ :- ~ + !> ^- update:store + update + %+ weld cards + %- zing + :~ ?: mark-cached ~ + :_ ~ + %+ poke-self:pass:io %graph-cache-hook + !> ^- cache-action + [%graph-to-mark rid mark] + :: + ?: transform-cached ~ + :_ ~ + %+ poke-self:pass:io %graph-cache-hook + !> ^- cache-action + [%transform-marks u.mark transform] + == :: ++ flatten-node-map + ~/ %flatten-node-map |= lis=(list [index:store node:store]) ^- (list [index:store node:store]) |^ @@ -130,10 +210,13 @@ -- :: ++ transform-list + ~/ %transform-list |= transform=$-([index:store post:store atom ?] [index:store post:store]) |= $: [=index:store =node:store] [indices=(set index:store) lis=(list [index:store node:store])] == + ~| "cannot put a deleted post into %add-nodes {}" + ?> ?=(%& -.post.node) =/ l (lent index) =/ parent-modified=? %- ~(rep in indices) @@ -144,36 +227,42 @@ %.n =((swag [0 k] index) i) =/ [ind=index:store =post:store] - (transform index post.node now.bowl parent-modified) + (transform index p.post.node now.bowl parent-modified) :- (~(put in indices) index) - (snoc lis [ind node(post post)]) + (snoc lis [ind node(p.post post)]) -- :: - %remove-nodes - ?. (is-allowed-remove:hc resource.q.update indices.q.update) + %remove-posts + =| cards=(list card) + =^ allowed cards + (is-allowed-remove:hc rid indices.q.update) + :- cards + ?. allowed ~ `vas :: - %add-graph ~ - %remove-graph ~ - %add-signatures ~ - %remove-signatures ~ - %archive-graph ~ - %unarchive-graph ~ - %add-tag ~ - %remove-tag ~ - %keys ~ - %tags ~ - %tag-queries ~ - %run-updates ~ + %add-graph [~ ~] + %remove-graph [~ ~] + %add-signatures [~ ~] + %remove-signatures [~ ~] + %archive-graph [~ ~] + %unarchive-graph [~ ~] + %add-tag [~ ~] + %remove-tag [~ ~] + %keys [~ ~] + %tags [~ ~] + %tag-queries [~ ~] + %run-updates [~ ~] == :: ++ resource-for-update resource-for-update:gra :: ++ initial-watch + ~/ %initial-watch |= [=path =resource:res] ^- vase - ?> (is-allowed:hc resource) + |^ + ?> (is-allowed resource) !> ^- update:store ?~ path :: new subscribe @@ -186,22 +275,19 @@ =/ =time (slav %da i.path) =/ =update-log:store (get-update-log-subset:gra resource time) [now.bowl [%run-updates resource update-log]] + :: + ++ is-allowed + |= =resource:res + =/ group-res=resource:res + (need (peek-group:met %graph resource)) + (is-member:grp src.bowl group-res) + -- :: ++ take-update |= =vase ^- [(list card) agent] =/ =update:store !<(update:store vase) ?+ -.q.update [~ this] - %add-graph - ?~ mark.q.update `this - =* mark u.mark.q.update - ?: (~(has in marks) mark) `this - :_ this(marks (~(put in marks) mark)) - :~ (build-permissions:hc mark %add %sing) - (build-permissions:hc mark %remove %sing) - (build-transform-add:hc mark %sing) - == - :: %remove-graph :_ this [%give %kick ~[resource+(en-path:res resource.q.update)] ~]~ @@ -211,11 +297,14 @@ [%give %kick ~[resource+(en-path:res resource.q.update)] ~]~ == -- -^| ^= hook-core -|_ =bowl:gall +:: +~% %graph-push-hook-helper ..card.hook-core ~ +^= hook-core +|_ [=bowl:gall =cache] +* grp ~(. group bowl) met ~(. mdl bowl) gra ~(. graph bowl) + io ~(. agentio bowl) :: ++ scry |= [care=@t desk=@t =path] @@ -223,28 +312,43 @@ /[care]/(scot %p our.bowl)/[desk]/(scot %da now.bowl) path :: -++ perm-mark-name - |= perm=@t - ^- @t - (cat 3 'graph-permissions-' perm) -:: ++ perm-mark |= [=resource:res perm=@t vip=vip-metadata:metadata =indexed-post:store] - ^- permissions:store - =- (check vip) - !< check=$-(vip-metadata:metadata permissions:store) - %. !>(indexed-post) - =/ mark (get-mark:gra resource) - ?~ mark |=(=vase !>([%no %no %no])) - .^(tube:clay (scry %cc %home /[u.mark]/(perm-mark-name perm))) -:: -++ add-mark - |= [=resource:res vip=vip-metadata:metadata =indexed-post:store] - (perm-mark resource %add vip indexed-post) -:: -++ remove-mark - |= [=resource:res vip=vip-metadata:metadata =indexed-post:store] - (perm-mark resource %remove vip indexed-post) + ^- [permissions:store (list card)] + |^ + =/ mark-cached (~(has by graph-to-mark.cache) resource) + =/ mark + ?: mark-cached + (~(got by graph-to-mark.cache) resource) + (get-mark:gra resource) + ?~ mark + [[%no %no %no] ~] + =/ key [u.mark (perm-mark-name perm)] + =/ perms-cached (~(has by perm-marks.cache) key) + =/ convert + ?: perms-cached + (~(got by perm-marks.cache) key) + .^(cached-permission (scry %cf %home /[u.mark]/(perm-mark-name perm))) + :- ((convert indexed-post) vip) + %- zing + :~ ?: mark-cached ~ + :_ ~ + %+ poke-self:pass:io %graph-cache-hook + !> ^- cache-action + [%graph-to-mark resource mark] + :: + ?: perms-cached ~ + :_ ~ + %+ poke-self:pass:io %graph-cache-hook + !> ^- cache-action + [%perm-marks [u.mark (perm-mark-name perm)] convert] + == + :: + ++ perm-mark-name + |= perm=@t + ^- @t + (cat 3 'graph-permissions-' perm) + -- :: ++ get-permission |= [=permissions:store is-admin=? writers=(set ship)] @@ -257,22 +361,23 @@ writer.permissions reader.permissions :: -++ is-allowed - |= =resource:res - =/ group-res=resource:res - (need (peek-group:met %graph resource)) - (is-member:grp src.bowl group-res) -:: ++ get-roles-writers-variation + ~/ %get-roles-writers-variation |= =resource:res ^- (unit [is-admin=? writers=(set ship) vip=vip-metadata:metadata]) =/ assoc=(unit association:metadata) - (peek-association:met %graph resource) + (peek-association:met %graph resource) ?~ assoc ~ + =/ group=(unit group:grp) + (scry-group:grp group.u.assoc) + ?~ group ~ =/ role=(unit (unit role-tag)) - (role-for-ship:grp group.u.assoc src.bowl) + (role-for-ship-with-group:grp u.group group.u.assoc src.bowl) =/ writers=(set ship) - (get-tagged-ships:grp group.u.assoc [%graph resource %writers]) + %^ get-tagged-ships-with-group:grp + u.group + group.u.assoc + [%graph resource %writers] ?~ role ~ =/ is-admin=? ?=(?([~ %admin] [~ %moderator]) u.role) @@ -281,74 +386,111 @@ ++ node-to-indexed-post |= =node:store ^- indexed-post:store - =* index index.post.node - [(snag (dec (lent index)) index) post.node] + ?> ?=(%& -.post.node) + =* index index.p.post.node + [(snag (dec (lent index)) index) p.post.node] :: ++ is-allowed-add + ~/ %is-allowed-add |= [=resource:res nodes=(map index:store node:store)] - ^- ? - %- (bond |.(%.n)) + ^- [? (list card)] + |^ + %- (bond |.([%.n ~])) %+ biff (get-roles-writers-variation resource) |= [is-admin=? writers=(set ship) vip=vip-metadata:metadata] + ^- (unit [? (list card)]) %- some - %+ levy ~(tap by nodes) - |= [=index:store =node:store] - =/ parent-index=index:store - (scag (dec (lent index)) index) - ?: (~(has by nodes) parent-index) %.y - ?. =(author.post.node src.bowl) - %.n - =/ =permissions:store - %^ add-mark resource vip - (node-to-indexed-post node) - =/ =permission-level:store - (get-permission permissions is-admin writers) - ?- permission-level - %yes %.y - %no %.n - :: - %self - =/ parent-node=node:store - (got-node:gra resource parent-index) - =(author.post.parent-node src.bowl) - == + =/ a ~(tap by nodes) + =| cards=(list card) + |- ^- [? (list card)] + ?~ a [& cards] + =/ c (check i.a is-admin writers vip) + ?. -.c + [| (weld cards +.c)] + $(a t.a, cards (weld cards +.c)) + :: + ++ check + |= $: [=index:store =node:store] + is-admin=? + writers=(set ship) + vip=vip-metadata:metadata + == + ^- [? (list card)] + =/ parent-index=index:store + (scag (dec (lent index)) index) + ?: (~(has by nodes) parent-index) + [%.y ~] + ?: ?=(%| -.post.node) + [%.n ~] + ?. =(author.p.post.node src.bowl) + [%.n ~] + =/ added + %^ add-mark resource vip + (node-to-indexed-post node) + =* permissions -.added + =* cards +.added + =/ =permission-level:store + (get-permission permissions is-admin writers) + :_ cards + ?- permission-level + %yes %.y + %no %.n + :: + %self + =/ parent-node=node:store + (got-node:gra resource parent-index) + ?: ?=(%| -.post.parent-node) + %.n + =(author.p.post.parent-node src.bowl) + == + :: + ++ add-mark + |= [=resource:res vip=vip-metadata:metadata =indexed-post:store] + (perm-mark resource %add vip indexed-post) + -- :: ++ is-allowed-remove + ~/ %is-allowed-remove |= [=resource:res indices=(set index:store)] - ^- ? - %- (bond |.(%.n)) + ^- [? (list card)] + |^ + %- (bond |.([%.n ~])) %+ biff (get-roles-writers-variation resource) |= [is-admin=? writers=(set ship) vip=vip-metadata:metadata] - %- some - %+ levy ~(tap by indices) - |= =index:store - =/ =node:store - (got-node:gra resource index) - =/ =permissions:store - %^ remove-mark resource vip - (node-to-indexed-post node) - =/ =permission-level:store - (get-permission permissions is-admin writers) - ?- permission-level - %yes %.y - %no %.n - %self =(author.post.node src.bowl) - == -:: -++ build-permissions - |= [=mark kind=?(%add %remove) mode=?(%sing %next)] - ^- card - =/ =wire /perms/[mark]/[kind] - =/ =mood:clay [%c da+now.bowl /[mark]/(perm-mark-name kind)] - =/ =rave:clay ?:(?=(%sing mode) [mode mood] [mode mood]) - [%pass wire %arvo %c %warp our.bowl %home `rave] -:: -++ build-transform-add - |= [=mark mode=?(%sing %next)] - ^- card - =/ =wire /transform-add/[mark] - =/ =mood:clay [%c da+now.bowl /[mark]/transform-add-nodes] - =/ =rave:clay ?:(?=(%sing mode) [mode mood] [mode mood]) - [%pass wire %arvo %c %warp our.bowl %home `rave] + %- some + =/ a ~(tap by indices) + =| cards=(list card) + |- ^- [? (list card)] + ?~ a [& cards] + =/ c (check i.a is-admin writers vip) + ?. -.c + [| (weld cards +.c)] + $(a t.a, cards (weld cards +.c)) + :: + ++ check + |= [=index:store is-admin=? writers=(set ship) vip=vip-metadata:metadata] + ^- [? (list card)] + =/ =node:store + (got-node:gra resource index) + ?: ?=(%| -.post.node) + [%.n ~] + =/ removed + %^ remove-mark resource vip + (node-to-indexed-post node) + =* permissions -.removed + =* cards +.removed + =/ =permission-level:store + (get-permission permissions is-admin writers) + :_ cards + ?- permission-level + %yes %.y + %no %.n + %self =(author.p.post.node src.bowl) + == + :: + ++ remove-mark + |= [=resource:res vip=vip-metadata:metadata =indexed-post:store] + (perm-mark resource %remove vip indexed-post) + -- -- diff --git a/pkg/arvo/app/graph-store.hoon b/pkg/arvo/app/graph-store.hoon index 684cfdf097..cf9e84ea47 100644 --- a/pkg/arvo/app/graph-store.hoon +++ b/pkg/arvo/app/graph-store.hoon @@ -1,29 +1,36 @@ :: graph-store [landscape] :: -:: -/+ store=graph-store, sigs=signatures, res=resource, default-agent, dbug, verb, - *migrate +/+ store=graph-store, sigs=signatures, res=resource, default-agent, dbug, verb ~% %graph-store-top ..part ~ |% +$ card card:agent:gall +$ versioned-state - $% state-0 - state-1 - state-2 - state-3 + $% [%0 network:zero:store] + [%1 network:zero:store] + [%2 network:zero:store] + [%3 network:one:store] + [%4 network:store] + state-5 == :: -+$ state-0 [%0 network:zero:store] -+$ state-1 [%1 network:zero:store] -+$ state-2 [%2 network:zero:store] -+$ state-3 [%3 network:store] -:: ++$ state-5 [%5 network:store] ++ orm orm:store ++ orm-log orm-log:store +$ debug-input [%validate-graph =resource:store] +:: ++$ cache + $: validators=(map mark $-(indexed-post:store indexed-post:store)) + == +:: +:: TODO: come back to this and potentially use ford runes or otherwise +:: send a %t to be notified of validator changes ++$ inflated-state + $: state-5 + cache + == -- :: -=| state-3 +=| inflated-state =* state - :: %- agent:dbug @@ -35,25 +42,24 @@ def ~(. (default-agent this %|) bowl) :: ++ on-init [~ this] -++ on-save !>(state) +++ on-save !>(-.state) ++ on-load |= =old=vase ^- (quip card _this) =+ !<(old=versioned-state old-vase) =| cards=(list card) - |^ + |- ?- -.old - %0 + %0 + =* zro zero-load:upgrade:store %_ $ -.old %1 - cards cards - validators.old validators.old :: graphs.old %- ~(run by graphs.old) |= [=graph:zero:store q=(unit mark)] ^- [graph:zero:store (unit mark)] - :- (convert-unix-timestamped-graph:zero-load graph) + :- (convert-unix-timestamped-graph:zro graph) ?^ q q `%graph-validator-link :: @@ -63,138 +69,57 @@ == :: %1 + =* zro zero-load:upgrade:store %_ $ -.old %2 - graphs.old (~(run by graphs.old) change-revision-graph:zero-load) + graphs.old (~(run by graphs.old) change-revision-graph:zro) :: update-logs.old %- ~(run by update-logs.old) |=(a=* *update-log:zero:store) == :: - %2 + %2 + =* upg upgrade:store %_ $ -.old %3 - update-logs.old (~(run by update-logs.old) update-log-to-one:store) - graphs.old (~(run by graphs.old) marked-graph-to-one:store) - archive.old (~(run by archive.old) marked-graph-to-one:store) + update-logs.old (~(run by update-logs.old) update-log-to-one:upg) + graphs.old (~(run by graphs.old) marked-graph-to-one:upg) + archive.old (~(run by archive.old) marked-graph-to-one:upg) == :: - %3 [cards this(state old)] - == + %3 + =* upg upgrade:store + %_ $ + -.old %4 + graphs.old (~(run by graphs.old) marked-graph-to-two:upg) + archive.old (~(run by archive.old) marked-graph-to-two:upg) + tag-queries.old *tag-queries:store + validators.old ~ + :: + update-logs.old + %- ~(run by update-logs.old) + |=(a=* *update-log:store) + == :: - ++ zero-load - :: =* infinitely recurses - =, store=zero:store - =, orm=orm:zero:store - =, orm-log=orm-log:zero:store - |% - ++ change-revision-graph - |= [=graph:store q=(unit mark)] - ^- [graph:store (unit mark)] - |^ - :_ q - ?+ q graph - [~ %graph-validator-link] convert-links - [~ %graph-validator-publish] convert-publish - == - :: - ++ convert-links - %+ gas:orm *graph:store - %+ turn (tap:orm graph) - |= [=atom =node:store] - ^- [^atom node:store] - :: top-level - :: - :+ atom post.node - ?: ?=(%empty -.children.node) - [%empty ~] - :- %graph - %+ gas:orm *graph:store - %+ turn (tap:orm p.children.node) - |= [=^atom =node:store] - ^- [^^atom node:store] - :: existing comments get turned into containers for revisions - :: - :^ atom - post.node(contents ~, hash ~) - %graph - %+ gas:orm *graph:store - :_ ~ :- %0 - :_ [%empty ~] - post.node(index (snoc index.post.node atom), hash ~) - :: - ++ convert-publish - %+ gas:orm *graph:store - %+ turn (tap:orm graph) - |= [=atom =node:store] - ^- [^atom node:store] - :: top-level - :: - :+ atom post.node - ?: ?=(%empty -.children.node) - [%empty ~] - :- %graph - %+ gas:orm *graph:store - %+ turn (tap:orm p.children.node) - |= [=^atom =node:store] - ^- [^^atom node:store] - :: existing container for publish note revisions - :: - ?+ atom !! - %1 [atom node] - %2 - :+ atom post.node - ?: ?=(%empty -.children.node) - [%empty ~] - :- %graph - %+ gas:orm *graph:store - %+ turn (tap:orm p.children.node) - |= [=^^atom =node:store] - ^- [^^^atom node:store] - :+ atom post.node(contents ~, hash ~) - :- %graph - %+ gas:orm *graph:store - :_ ~ :- %1 - :_ [%empty ~] - post.node(index (snoc index.post.node atom), hash ~) - == - -- - :: - ++ maybe-unix-to-da - |= =atom - ^- @ - :: (bex 127) is roughly 226AD - ?. (lte atom (bex 127)) - atom - (add ~1970.1.1 (div (mul ~s1 atom) 1.000)) + %4 + %_ $ + -.old %5 :: - ++ convert-unix-timestamped-node - |= =node:store - ^- node:store - =. index.post.node - (convert-unix-timestamped-index index.post.node) - ?. ?=(%graph -.children.node) - node - :+ post.node - %graph - (convert-unix-timestamped-graph p.children.node) - :: - ++ convert-unix-timestamped-index - |= =index:store - (turn index maybe-unix-to-da) - :: - ++ convert-unix-timestamped-graph - |= =graph:store - %+ gas:orm *graph:store - %+ turn - (tap:orm graph) - |= [=atom =node:store] - ^- [^atom node:store] - :- (maybe-unix-to-da atom) - (convert-unix-timestamped-node node) - -- - -- + update-logs.old + %- ~(gas by *update-logs:store) + %+ turn ~(tap by graphs.old) + |= [=resource:store =graph:store mar=(unit mark)] + :- resource + =/ log (~(got by update-logs.old) resource) + ?. =(~ log) log + =/ =logged-update:store + [now.bowl %add-graph resource graph mar %.y] + (gas:orm-log ~ [now.bowl logged-update] ~) + == + :: + %5 [cards this(-.state old, +.state *cache)] + == :: ++ on-watch ~/ %graph-store-watch @@ -213,7 +138,7 @@ ++ give |= =action:store ^- (list card) - [%give %fact ~ [%graph-update-1 !>([now.bowl action])]]~ + [%give %fact ~ [%graph-update-2 !>([now.bowl action])]]~ -- :: ++ on-poke @@ -224,7 +149,7 @@ ?> (team:title our.bowl src.bowl) =^ cards state ?+ mark (on-poke:def mark vase) - %graph-update-1 (graph-update !<(update:store vase)) + %graph-update-2 (graph-update !<(update:store vase)) %noun (debug !<(debug-input vase)) %import (poke-import q.vase) == @@ -239,7 +164,7 @@ %add-graph (add-graph p.update +.q.update) %remove-graph (remove-graph +.q.update) %add-nodes (add-nodes p.update +.q.update) - %remove-nodes (remove-nodes p.update +.q.update) + %remove-posts (remove-posts p.update +.q.update) %add-signatures (add-signatures p.update +.q.update) %remove-signatures (remove-signatures p.update +.q.update) %add-tag (add-tag +.q.update) @@ -265,7 +190,9 @@ !(~(has by graphs) resource) == == ~| "validation of graph {} failed using mark {}" - ?> (validate-graph graph mark) + =^ is-valid state + (validate-graph graph mark) + ?> is-valid =/ =logged-update:store [time %add-graph resource graph mark overwrite] =/ =update-log:store @@ -302,6 +229,10 @@ (~(got by graphs) resource) ~| "cannot add duplicate nodes to {}" ?< (check-for-duplicates graph ~(key by nodes)) + ~| "validation of nodes failed using mark {}" + =^ is-valid state + (check-validity ~(tap by nodes) mark) + ?> is-valid =/ =update-log:store (~(got by update-logs) resource) =. update-log (put:orm-log update-log time [time [%add-nodes resource nodes]]) @@ -316,30 +247,41 @@ (add-node-list resource graph mark (sort-nodes nodes)) == :: + ++ check-validity + |= [lis=(list (pair index:store node:store)) mark=(unit ^mark)] + ^- [? _state] + |- + ?~ lis [& state] + =^ is-valid state + (validate-graph (gas:orm ~ [(rear p.i.lis) q.i.lis]~) mark) + ?. is-valid + [| state] + $(lis t.lis) + :: ++ check-for-duplicates |= [=graph:store nodes=(set index:store)] ^- ? - =/ node-list ~(tap in nodes) - |- - ?~ node-list %.n - ?: (has-node graph i.node-list) %.y - $(node-list t.node-list) - :: - ++ has-node - |= [=graph:store =index:store] - ^- ? - =/ node=(unit node:store) ~ - |- - ?~ index - ?=(^ node) - ?~ t.index - ?=(^ (get:orm graph i.index)) - =. node (get:orm graph i.index) - ?~ node %.n - ?- -.children.u.node - %empty %.n - %graph $(graph p.children.u.node, index t.index) - == + |^ + %+ lien ~(tap in nodes) + |= =index:store + (has-node graph index) + :: + ++ has-node + |= [=graph:store =index:store] + ^- ? + =/ node=(unit node:store) ~ + |- + ?~ index + ?=(^ node) + ?~ t.index + ?=(^ (get:orm graph i.index)) + =. node (get:orm graph i.index) + ?~ node %.n + ?- -.children.u.node + %empty %.n + %graph $(graph p.children.u.node, index t.index) + == + -- :: ++ sort-nodes |= nodes=(map index:store node:store) @@ -359,6 +301,11 @@ ?~ node-list graph =* index -.i.node-list =* node +.i.node-list + ~| "cannot add deleted post" + ?> ?=(%& -.post.node) + =* p p.post.node + ~| "graph indexes must match" + ?> =(index index.p) %_ $ node-list t.node-list graph (add-node-at-index graph index node mark) @@ -373,8 +320,6 @@ == ^- graph:store ?< ?=(~ index) - ~| "validation of node failed using mark {}" - ?> (validate-graph (gas:orm ~ [i.index node]~) mark) =* atom i.index %^ put:orm graph @@ -382,8 +327,10 @@ :: add child :: ?~ t.index - =* p post.node - ?~ hash.p node(signatures.post *signatures:store) + ~| "cannot add deleted post" + ?> ?=(%& -.post.node) + =* p p.post.node + ?~ hash.p node(signatures.p.post *signatures:store) =/ =validated-portion:store [parent-hash author.p time-sent.p contents.p] =/ =hash:store `@ux`(sham validated-portion) @@ -402,8 +349,14 @@ ^- internal-graph:store :- %graph %_ $ - index t.index - parent-hash hash.post.parent + index t.index + :: + parent-hash + ?- -.post.parent + %| `p.post.parent + %& hash.p.post.parent + == + :: graph ?: ?=(%graph -.children.parent) p.children.parent @@ -412,7 +365,7 @@ == -- :: - ++ remove-nodes + ++ remove-posts |= [=time =resource:store indices=(set index:store)] ^- (quip card _state) |^ @@ -420,82 +373,83 @@ (~(got by graphs) resource) =/ =update-log:store (~(got by update-logs) resource) =. update-log - (put:orm-log update-log time [time [%remove-nodes resource indices]]) - =/ [affected-indices=(set index:store) new-graph=graph:store] - (remove-indices resource graph (sort ~(tap in indices) by-lent)) - :: - :- (give [/updates]~ [%remove-nodes resource (~(uni in indices) affected-indices)]) + (put:orm-log update-log time [time [%remove-posts resource indices]]) + :- (give [/updates]~ [%remove-posts resource indices]) %_ state - update-logs (~(put by update-logs) resource update-log) + update-logs (~(put by update-logs) resource update-log) + :: graphs %+ ~(put by graphs) resource - [new-graph mark] + :_ mark + %^ remove-indices + resource + graph + (sort ~(tap in indices) by-lent) == :: - :: we always want to remove the deepest node first, - :: so we don't remove parents before children ++ by-lent |* [a=(list) b=(list)] ^- ? (gth (lent a) (lent b)) :: ++ remove-indices - =| affected=(set index:store) |= [=resource:store =graph:store indices=(list index:store)] - ^- [(set index:store) graph:store] - ?~ indices [affected graph] - =^ new-affected graph - (remove-index graph i.indices) + ^- graph:store + ?~ indices graph %_ $ - indices t.indices - affected (~(uni in affected) new-affected) - == - :: - ++ get-descendants - |= =graph:store - =| indices=(list index:store) - =/ nodes (tap:orm:store graph) - %- ~(gas in *(set index:store)) - |- =* tap-nodes $ - ^+ indices - %- zing - %+ turn nodes - |= [atom =node:store] - ^- (list index:store) - %+ welp - index.post.node^~ - ?. ?=(%graph -.children.node) - ~ - %_ tap-nodes - nodes (tap:orm p.children.node) + indices t.indices + graph (remove-index graph i.indices) == :: ++ remove-index - =| indices=(set index:store) + =| parent-hash=(unit hash:store) |= [=graph:store =index:store] - ^- [(set index:store) graph:store] - ?~ index [indices graph] + ^- graph:store + ?~ index graph =* atom i.index + %^ put:orm + graph + atom :: last index in list :: ?~ t.index - =^ rm-node graph (del:orm graph atom) - ?~ rm-node `graph - ?. ?=(%graph -.children.u.rm-node) - `graph - =/ new-indices - (get-descendants p.children.u.rm-node) - [(~(uni in indices) new-indices) graph] - =/ =node:store + =/ =node:store + ~| "cannot remove index that does not exist {}" + (need (get:orm graph atom)) + %_ node + post + ~| "cannot remove post that has already been removed" + ?> ?=(%& -.post.node) + =* p p.post.node + ^- maybe-post:store + :- %| + ?~ hash.p + =/ =validated-portion:store + [parent-hash author.p time-sent.p contents.p] + `@ux`(sham validated-portion) + u.hash.p + == + :: recurse children + :: + =/ parent=node:store ~| "parent index does not exist to remove a node from!" (need (get:orm graph atom)) ~| "child index does not exist to remove a node from!" - ?> ?=(%graph -.children.node) - =^ new-indices p.children.node - $(graph p.children.node, index t.index) - :- (~(uni in indices) new-indices) - (put:orm graph atom node) + ?> ?=(%graph -.children.parent) + %_ parent + p.children + %_ $ + index t.index + graph p.children.parent + :: + parent-hash + ?- -.post.parent + %| `p.post.parent + %& hash.p.post.parent + == + == + == -- :: ++ add-signatures @@ -531,11 +485,13 @@ graph atom ?~ t.index + ~| "cannot add signatures to a deleted post" + ?> ?=(%& -.post.node) ~| "cannot add signatures to a node missing a hash" - ?> ?=(^ hash.post.node) + ?> ?=(^ hash.p.post.node) ~| "signatures did not match public keys!" - ?> (are-signatures-valid:sigs our.bowl signatures u.hash.post.node now.bowl) - node(signatures.post (~(uni in signatures) signatures.post.node)) + ?> (are-signatures-valid:sigs our.bowl signatures u.hash.p.post.node now.bowl) + node(signatures.p.post (~(uni in signatures) signatures.p.post.node)) ~| "child graph does not exist to add signatures to!" ?> ?=(%graph -.children.node) node(p.children $(graph p.children.node, index t.index)) @@ -576,28 +532,29 @@ graph atom ?~ t.index - node(signatures.post (~(dif in signatures) signatures.post.node)) + ~| "cannot add signatures to a deleted post" + ?> ?=(%& -.post.node) + node(signatures.p.post (~(dif in signatures) signatures.p.post.node)) ~| "child graph does not exist to add signatures to!" ?> ?=(%graph -.children.node) node(p.children $(graph p.children.node, index t.index)) -- :: ++ add-tag - |= [=term =resource:store] + |= [=term =uid:store] ^- (quip card _state) - ?> (~(has by graphs) resource) - :- (give [/updates /tags ~] [%add-tag term resource]) + ?> (~(has by graphs) resource.uid) + :- (give [/updates /tags ~] [%add-tag term uid]) %_ state - tag-queries (~(put ju tag-queries) term resource) + tag-queries (~(put ju tag-queries) term uid) == :: ++ remove-tag - |= [=term =resource:store] + |= [=term =uid:store] ^- (quip card _state) - ?> (~(has by graphs) resource) - :- (give [/updates /tags ~] [%remove-tag term resource]) + :- (give [/updates /tags ~] [%remove-tag term uid]) %_ state - tag-queries (~(del ju tag-queries) term resource) + tag-queries (~(del ju tag-queries) term uid) == :: ++ archive-graph @@ -610,10 +567,6 @@ archive (~(put by archive) resource (~(got by graphs) resource)) graphs (~(del by graphs) resource) update-logs (~(del by update-logs) resource) - tag-queries - %- ~(run by tag-queries) - |= =resources:store - (~(del in resources) resource) == :: ++ unarchive-graph @@ -648,7 +601,7 @@ ?- -.q.update %add-graph update(resource.q resource) %add-nodes update(resource.q resource) - %remove-nodes update(resource.q resource) + %remove-posts update(resource.q resource) %add-signatures update(resource.uid.q resource) %remove-signatures update(resource.uid.q resource) == @@ -657,7 +610,7 @@ ++ give |= [paths=(list path) update=action:store] ^- (list card) - [%give %fact paths [%graph-update-1 !>([now.bowl update])]]~ + [%give %fact paths [%graph-update-2 !>([now.bowl update])]]~ -- :: ++ debug @@ -665,24 +618,38 @@ ^- (quip card _state) =/ [=graph:store mark=(unit mark:store)] (~(got by graphs) resource.debug-input) - ?> (validate-graph graph mark) + =^ is-valid state + (validate-graph graph mark) + ?> is-valid [~ state] :: ++ validate-graph |= [=graph:store mark=(unit mark:store)] - ^- ? - ?~ mark %.y - =/ =dais:clay - .^ =dais:clay - %cb - /(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/[u.mark] + ^- [? _state] + ?~ mark [%.y state] + =/ has-validator (~(has by validators) u.mark) + =/ validate=$-(indexed-post:store indexed-post:store) + ?: has-validator + (~(got by validators) u.mark) + .^ $-(indexed-post:store indexed-post:store) + %cf + (scot %p our.bowl) + q.byk.bowl + (scot %da now.bowl) + u.mark + %graph-indexed-post + ~ == + :_ state(validators (~(put by validators) u.mark validate)) |- ^- ? ?~ graph %.y %+ roll (tap:orm graph) |= [[=atom =node:store] out=?] ^- ? - ?& ?=(^ (vale:dais [atom post.node])) + ?& ?| ?=(%| -.post.node) + ?=(^ (validate [atom p.post.node])) + == + :: ?- -.children.node %empty %.y %graph ^$(graph p.children.node) @@ -691,155 +658,9 @@ ++ poke-import |= arc=* ^- (quip card _state) - |^ - =/ sty=state-3 [%3 (remake-network ;;(tree-network +.arc))] - :_ sty - %+ turn ~(tap by graphs.sty) - |= [rid=resource:store =marked-graph:store] - ^- card - ?: =(our.bowl entity.rid) - =/ =cage [%push-hook-action !>([%add rid])] - [%pass / %agent [our.bowl %graph-push-hook] %poke cage] - (try-rejoin rid 0) - :: - +$ tree-network - $: graphs=tree-graphs - tag-queries=(tree [term (tree resource:store)]) - update-logs=tree-update-logs - archive=tree-graphs - validators=(tree ^mark) - == - +$ tree-graphs (tree [resource:store tree-marked-graph]) - +$ tree-marked-graph [p=tree-graph q=(unit ^mark)] - +$ tree-graph (tree [atom tree-node]) - +$ tree-node [post=tree-post children=tree-internal-graph] - +$ tree-internal-graph - $~ [%empty ~] - $% [%graph p=tree-graph] - [%empty ~] - == - +$ tree-update-logs (tree [resource:store tree-update-log]) - +$ tree-update-log (tree [time tree-logged-update]) - +$ tree-logged-update - $: p=time - $= q - $% [%add-graph =resource:store =tree-graph mark=(unit ^mark) ow=?] - [%add-nodes =resource:store nodes=(tree [index:store tree-node])] - [%remove-nodes =resource:store indices=(tree index:store)] - [%add-signatures =uid:store signatures=tree-signatures] - [%remove-signatures =uid:store signatures=tree-signatures] - == - == - +$ tree-signatures (tree signature:store) - +$ tree-post - $: author=ship - =index:store - time-sent=time - contents=(list content:store) - hash=(unit hash:store) - signatures=tree-signatures - == - :: - ++ remake-network - |= t=tree-network - ^- network:store - :* (remake-graphs graphs.t) - (remake-jug tag-queries.t) - (remake-update-logs update-logs.t) - (remake-graphs archive.t) - (remake-set validators.t) - == - :: - ++ remake-graphs - |= t=tree-graphs - ^- graphs:store - %- remake-map - (~(run by t) remake-marked-graph) - :: - ++ remake-marked-graph - |= t=tree-marked-graph - ^- marked-graph:store - [(remake-graph p.t) q.t] - :: - ++ remake-graph - |= t=tree-graph - ^- graph:store - %+ gas:orm *graph:store - %+ turn ~(tap by t) - |= [a=atom tn=tree-node] - ^- [atom node:store] - [a (remake-node tn)] - :: - ++ remake-internal-graph - |= t=tree-internal-graph - ^- internal-graph:store - ?: ?=(%empty -.t) - [%empty ~] - [%graph (remake-graph p.t)] - :: - ++ remake-node - |= t=tree-node - ^- node:store - :- (remake-post post.t) - (remake-internal-graph children.t) - :: - ++ remake-update-logs - |= t=tree-update-logs - ^- update-logs:store - %- remake-map - (~(run by t) remake-update-log) - :: - ++ remake-update-log - |= t=tree-update-log - ^- update-log:store - =/ ulm ((ordered-map time logged-update:store) gth) - %+ gas:ulm *update-log:store - %+ turn ~(tap by t) - |= [=time tlu=tree-logged-update] - ^- [^time logged-update:store] - [time (remake-logged-update tlu)] - :: - ++ remake-logged-update - |= t=tree-logged-update - ^- logged-update:store - :- p.t - ?- -.q.t - %add-graph - :* %add-graph - resource.q.t - (remake-graph tree-graph.q.t) - mark.q.t - ow.q.t - == - :: - %add-nodes - :- %add-nodes - :- resource.q.t - %- remake-map - (~(run by nodes.q.t) remake-node) - :: - %remove-nodes - [%remove-nodes resource.q.t (remake-set indices.q.t)] - :: - %add-signatures - [%add-signatures uid.q.t (remake-set signatures.q.t)] - :: - %remove-signatures - [%remove-signatures uid.q.t (remake-set signatures.q.t)] - == - :: - ++ remake-post - |= t=tree-post - ^- post:store - t(signatures (remake-set signatures.t)) - -- - :: - ++ try-rejoin - |= [rid=resource:store nack-count=@] - ^- card - =/ res-path (en-path:res rid) - =/ wire [%try-rejoin (scot %ud nack-count) res-path] - [%pass wire %agent [entity.rid %graph-push-hook] %watch resource+res-path] + =^ cards -.state + (import:store arc our.bowl) + [cards state] -- :: ++ on-peek @@ -858,15 +679,15 @@ ``noun+!>(q.u.result) :: [%x %keys ~] - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !>(`update:store`[now.bowl [%keys ~(key by graphs)]]) :: [%x %tags ~] - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !>(`update:store`[now.bowl [%tags ~(key by tag-queries)]]) :: [%x %tag-queries ~] - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !>(`update:store`[now.bowl [%tag-queries tag-queries]]) :: [%x %graph @ @ ~] @@ -875,7 +696,7 @@ =/ result=(unit marked-graph:store) (~(get by graphs) [ship term]) ?~ result [~ ~] - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !> ^- update:store :- now.bowl [%add-graph [ship term] `graph:store`p.u.result q.u.result %.y] @@ -890,7 +711,7 @@ ?~ result ~& no-archived-graph+[ship term] [~ ~] - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !> ^- update:store :- now.bowl [%add-graph [ship term] `graph:store`p.u.result q.u.result %.y] @@ -906,13 +727,13 @@ =/ graph=(unit marked-graph:store) (~(get by graphs) [ship term]) ?~ graph [~ ~] - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !> ^- update:store :- now.bowl :+ %add-nodes [ship term] %- ~(gas by *(map index:store node:store)) - %+ turn (tap:orm `graph:store`(subset:orm p.u.graph start end)) + %+ turn (tap:orm `graph:store`(lot:orm p.u.graph start end)) |= [=atom =node:store] ^- [index:store node:store] [~[atom] node] @@ -933,7 +754,7 @@ (turn t.t.t.t.path (cury slav %ud)) =/ node=(unit node:store) (get-node ship term index) ?~ node [~ ~] - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !> ^- update:store :- now.bowl :+ %add-nodes @@ -952,7 +773,7 @@ =/ graph (get-node-children ship term parent) ?~ graph [~ ~] - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !> ^- update:store :- now.bowl :+ %add-nodes @@ -963,13 +784,33 @@ %+ turn =- ?.(older (slag (safe-sub (lent -) count) -) (scag count -)) %- tap:orm - %+ subset:orm u.graph + %+ lot:orm u.graph =/ idx (snag (dec (lent index)) index) ?:(older [`idx ~] [~ `idx]) |= [=atom =node:store] ^- [index:store node:store] [(snoc parent atom) node] + :: + [%x %shallow-children @ @ *] + =/ newest ?=(%newest i.t.path) + =/ =ship (slav %p i.t.t.path) + =/ =term i.t.t.t.path + =/ =index:store + (turn t.t.t.t.path (cury slav %ud)) + =/ children + (get-node-children ship term index) + ?~ children [~ ~] + :- ~ :- ~ :- %graph-update-2 + !> ^- update:store + :+ now.bowl %add-nodes + :- [ship term] + %- ~(gas by *(map index:store node:store)) + %+ turn (tap:orm u.children) + |= [=atom =node:store] + ^- [index:store node:store] + :- (snoc index atom) + node(children [%empty ~]) :: [%x ?(%newest %oldest) @ @ @ *] =/ newest ?=(%newest i.t.path) @@ -982,7 +823,7 @@ =/ children (get-node-children ship term index) ?~ children [~ ~] - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !> ^- update:store :- now.bowl :+ %add-nodes @@ -1008,17 +849,121 @@ ?- -.children.u.node %empty [~ ~] %graph - :- ~ :- ~ :- %graph-update-1 + :- ~ :- ~ :- %graph-update-2 !> ^- update:store :- now.bowl :+ %add-nodes [ship term] %- ~(gas by *(map index:store node:store)) - %+ turn (tap:orm `graph:store`(subset:orm p.children.u.node end start)) + %+ turn (tap:orm `graph:store`(lot:orm p.children.u.node end start)) |= [=atom =node:store] ^- [index:store node:store] [(snoc index atom) node] == + :: + [%x %deep-nodes-older-than @ @ @ @ ~] + =/ =ship (slav %p i.t.t.path) + =/ =term i.t.t.t.path + =/ count=(unit atom) (rush i.t.t.t.t.path dem:ag) + =/ start=(unit atom) (rush i.t.t.t.t.t.path dem:ag) + ?: ?=(~ count) + [~ ~] + =/ result=(unit marked-graph:store) + (~(get by graphs) [ship term]) + ?~ result + [~ ~] + :- ~ :- ~ :- %graph-update-2 + !> ^- update:store + :- now.bowl + :+ %add-nodes + [ship term] + =* a u.count + =/ b=(list (pair atom node:store)) + (tab:orm p.u.result start u.count) + =| c=index:store + =| d=(map index:store node:store) + =| e=@ud + =- d + |- ^- [e=@ud d=(map index:store node:store)] + ?: ?|(?=(~ b) =(e a)) + [e d] + =* atom p.i.b + =* node q.i.b + =. c (snoc c atom) + ?- -.children.node + %empty + $(b t.b, e +(e), d (~(put by d) c node), c (snip c)) + :: + %graph + =/ f $(b (tab:orm p.children.node ~ (sub a e))) + ?: =(e.f a) f + %_ $ + b t.b + e +(e.f) + d (~(put by d.f) c node(children [%empty ~])) + c (snip c) + == + == + :: + [%x %firstborn @ @ @ *] + |^ + =/ =ship (slav %p i.t.t.path) + =/ =term i.t.t.t.path + =/ =index:store + (turn t.t.t.t.path (cury slav %ud)) + ?> ?=(^ index) + =/ result=(unit marked-graph:store) + (~(get by graphs) [ship term]) + ?~ result + [~ ~] + %- (bond |.(`(unit (unit cage))`[~ ~])) + %+ biff + (collect-parents p.u.result index ship term) + (corl some collect-firstborn) + :: + ++ collect-parents + |= [=graph:store =index:store =ship =term] + ^- (unit [node:store index:store (map index:store node:store) ^ship ^term]) + =| =(map index:store node:store) + =| =node:store + =| ind=index:store + =/ len (lent index) + |- + ?: (gte (lent ind) len) + `[node ind map ship term] + ?> ?=(^ index) + =* atom i.index + ?. (has:orm graph atom) + ~ + =: node (got:orm graph atom) + ind (snoc ind atom) + == + ?: ?=(%empty -.children.node) + ?. (gte (lent ind) len) + ~ + :- ~ + :* node ind + (~(put by map) ind node) + ship term + == + %_ $ + index t.index + graph p.children.node + map (~(put by map) ind node(children empty+~)) + == + :: + ++ collect-firstborn + |= [=node:store =index:store map=(map index:store node:store) =ship =term] + ^- (unit (unit cage)) + ?: ?=(%empty -.children.node) + :- ~ :- ~ :- %graph-update-2 + !> ^- update:store + [now.bowl [%add-nodes [ship term] map]] + =/ item=[k=atom v=node:store] + (need (ram:orm p.children.node)) + =. index (snoc index k.item) + $(map (~(put by map) index v.item(children empty+~)), node v.item) + -- :: [%x %update-log-subset @ @ @ @ ~] =/ =ship (slav %p i.t.t.path) @@ -1028,7 +973,7 @@ =/ update-log=(unit update-log:store) (~(get by update-logs) [ship term]) ?~ update-log [~ ~] :: orm-log is ordered backwards, so swap start and end - ``noun+!>((subset:orm-log u.update-log end start)) + ``noun+!>((lot:orm-log u.update-log end start)) :: [%x %update-log @ @ ~] =/ =ship (slav %p i.t.t.path) @@ -1046,7 +991,7 @@ %+ biff m-update-log |= =update-log:store =/ result=(unit [=time =update:store]) - (peek:orm-log:store update-log) + (pry:orm-log:store update-log) (bind result |=([=time update:store] time)) == :: diff --git a/pkg/arvo/app/group-push-hook.hoon b/pkg/arvo/app/group-push-hook.hoon index e1a2fc2376..20decf8c3a 100644 --- a/pkg/arvo/app/group-push-hook.hoon +++ b/pkg/arvo/app/group-push-hook.hoon @@ -47,8 +47,9 @@ :: ++ transform-proxy-update |= vas=vase - ^- (unit vase) + ^- (quip card (unit vase)) =/ =update:store !<(update:store vas) + :- ~ ?: ?=(%initial -.update) ~ |^ diff --git a/pkg/arvo/app/group-store.hoon b/pkg/arvo/app/group-store.hoon index 59ddc4dc94..f869a4c0a3 100644 --- a/pkg/arvo/app/group-store.hoon +++ b/pkg/arvo/app/group-store.hoon @@ -136,13 +136,13 @@ ^- (unit (unit cage)) ?+ path (on-peek:def path) [%y %groups ~] - ``noun+!>(~(key by groups)) + ``noun+!>(`(set resource)`~(key by groups)) :: [%x %groups %ship @ @ ~] =/ rid=(unit resource) (de-path-soft:resource t.t.path) ?~ rid ~ - ``noun+!>((peek-group u.rid)) + ``noun+!>(`(unit group)`(peek-group u.rid)) :: [%x %groups %ship @ @ %join @ ~] =/ rid=(unit resource) @@ -150,7 +150,7 @@ =/ =ship (slav %p i.t.t.t.t.t.t.path) ?~ rid ~ - ``noun+!>((peek-group-join u.rid ship)) + ``noun+!>(`?`(peek-group-join u.rid ship)) :: [%x %export ~] ``noun+!>(state) @@ -199,6 +199,7 @@ :: ++ peek-group-join |= [rid=resource =ship] + ^- ? =/ ugroup (~(get by groups) rid) ?~ ugroup diff --git a/pkg/arvo/app/hark-graph-hook.hoon b/pkg/arvo/app/hark-graph-hook.hoon index d05d69a973..6cc767efcc 100644 --- a/pkg/arvo/app/hark-graph-hook.hoon +++ b/pkg/arvo/app/hark-graph-hook.hoon @@ -24,7 +24,6 @@ watch-on-self=_& == :: -:: ++ scry |* [[our=@p now=@da] =mold p=path] ?> ?=(^ p) @@ -37,7 +36,6 @@ %^ scry [our now] tube:clay /cc/[desk]/[mark]/notification-kind -:: -- :: =| state-1 @@ -126,15 +124,15 @@ :: ++ poke-noun |= non=* - ?> ?=(%rewatch-dms non) - =/ graphs=(list resource) - ~(tap in get-keys:gra) - :- ~ - %_ state - watching - %- ~(gas in watching) - (murn graphs |=(rid=resource ?:((should-watch:ha rid) `[rid ~] ~))) - == + [~ state] +:: ?> ?=(%rewatch-dms non) +:: =/ graphs=(list resource) +:: ~(tap in get-keys:gra) +:: %_ state +:: watching +:: %- ~(gas in watching) +:: (murn graphs |=(rid=resource ?:((should-watch:ha rid) `[rid ~] ~))) +:: == :: ++ hark-graph-hook-action |= =action:hook @@ -182,7 +180,7 @@ ~[watch-graph:ha] :: %fact - ?. ?=(%graph-update-1 p.cage.sign) + ?. ?=(%graph-update-2 p.cage.sign) (on-agent:def wire sign) =^ cards state (graph-update !<(update:graph-store q.cage.sign)) @@ -197,18 +195,20 @@ :: ?(%remove-graph %archive-graph) (remove-graph resource.q.update) - :: - %remove-nodes - (remove-nodes resource.q.update indices.q.update) - :: + :: + %remove-posts + (remove-posts resource.q.update indices.q.update) + :: %add-nodes =* rid resource.q.update - (check-nodes ~(val by nodes.q.update) rid) + =/ assoc=(unit association:metadata) + (peek-association:met %graph rid) + (check-nodes ~(val by nodes.q.update) rid assoc) == :: this is awful, but notification kind should always switch :: on the index, so hopefully doesn't matter :: TODO: rethink this - ++ remove-nodes + ++ remove-posts |= [rid=resource indices=(set index:graph-store)] =/ to-remove %- ~(gas by *(set [resource index:graph-store])) @@ -256,32 +256,22 @@ =/ graph=graph:graph-store :: graph in subscription is bunted (get-graph-mop:gra rid) =/ node=(unit node:graph-store) - (bind (peek:orm:graph-store graph) |=([@ =node:graph-store] node)) + (bind (pry:orm:graph-store graph) |=([@ =node:graph-store] node)) + =/ assoc=(unit association:metadata) + (peek-association:met %graph rid) =^ cards state - (check-nodes (drop node) rid) - ?. (should-watch:ha rid) + (check-nodes (drop node) rid assoc) + ?. (should-watch:ha rid assoc) [cards state] :_ state(watching (~(put in watching) [rid ~])) (weld cards (give:ha ~[/updates] %listen [rid ~])) :: - :: ++ check-nodes |= $: nodes=(list node:graph-store) rid=resource + assoc=(unit association:metadata) == - =/ group=(unit resource) - (peek-group:met %graph rid) - ?~ group - ~& no-group+rid - `state - =/ metadatum=(unit metadatum:metadata) - (peek-metadatum:met %graph rid) - ?~ metadatum `state - =/ module=term - ?: ?=(%empty -.config.u.metadatum) %$ - ?: ?=(%group -.config.u.metadatum) %$ - module.config.u.metadatum - abet:check:(abed:handle-update:ha rid nodes u.group module) + abet:check:(abed:handle-update:ha rid nodes) -- :: ++ on-peek on-peek:def @@ -343,31 +333,31 @@ $(contents t.contents) :: ++ should-watch - |= rid=resource + |= [rid=resource assoc=(unit association:metadata)] ^- ? - =/ group-rid=(unit resource) - (peek-group:met %graph rid) - ?~ group-rid %.n - ?| !(is-managed:grp u.group-rid) - &(watch-on-self =(our.bowl entity.rid)) - == + ?~ assoc + %.y + &(watch-on-self =(our.bowl entity.rid)) :: ++ handle-update |_ $: rid=resource :: input updates=(list node:graph-store) - group=resource - module=term + mark=(unit mark) hark-pokes=(list action:store) :: output new-watches=(list index:graph-store) == ++ update-core . :: ++ abed - |= [r=resource upds=(list node:graph-store) grp=resource mod=term] - update-core(rid r, updates upds, group grp, module mod) + |= [r=resource upds=(list node:graph-store)] + =/ m=(unit ^mark) + (get-mark:gra r) + update-core(rid r, updates upds, mark m) :: ++ get-conversion - (^get-conversion rid) + :: LA: this tube should be cached in %hark-graph-hook state + :: instead of just trying to keep it warm, as the scry overhead is large + ~+ (^get-conversion rid) :: ++ abet ^- (quip card _state) @@ -417,30 +407,35 @@ |= =node:graph-store ^+ update-core =. update-core (check-node-children node) + ?: ?=(%| -.post.node) + update-core + =* pos p.post.node =+ !< notif-kind=(unit notif-kind:hook) - (get-conversion !>([0 post.node])) + %- get-conversion + !>(`indexed-post:graph-store`[0 pos]) ?~ notif-kind update-core =/ desc=@t - ?: (is-mention contents.post.node) + ?: (is-mention contents.pos) %mention name.u.notif-kind =* not-kind u.notif-kind =/ parent=index:post - (scag parent.index-len.not-kind index.post.node) + (scag parent.index-len.not-kind index.pos) =/ notif-index=index:store - [%graph group rid module desc parent] - ?: =(our.bowl author.post.node) + [%graph rid mark desc parent] + ?: =(our.bowl author.pos) (self-post node notif-index not-kind) =. update-core - (update-unread-count not-kind notif-index [time-sent index]:post.node) + (update-unread-count not-kind notif-index [time-sent index]:pos) =? update-core ?| =(desc %mention) (~(has in watching) [rid parent]) + =(mark `%graph-validator-dm) == =/ =contents:store - [%graph (limo post.node ~)] - (add-unread notif-index [time-sent.post.node %.n contents]) + [%graph (limo pos ~)] + (add-unread notif-index [time-sent.pos %.n contents]) update-core :: ++ update-unread-count @@ -459,19 +454,19 @@ =notif-kind:hook == ^+ update-core + ?> ?=(%& -.post.node) =/ =stats-index:store (to-stats-index:store index) =. update-core - (hark %seen-index time-sent.post.node stats-index) + (hark %seen-index time-sent.p.post.node stats-index) =? update-core ?=(%count mode.notif-kind) (hark %read-count stats-index) =? update-core watch-on-self - (new-watch index.post.node [watch-for index-len]:notif-kind) + (new-watch index.p.post.node [watch-for index-len]:notif-kind) update-core :: ++ add-unread |= [=index:store =notification:store] (hark %add-note index notification) - :: -- -- diff --git a/pkg/arvo/app/hark-store.hoon b/pkg/arvo/app/hark-store.hoon index e62e5e27f2..ab34ac6f84 100644 --- a/pkg/arvo/app/hark-store.hoon +++ b/pkg/arvo/app/hark-store.hoon @@ -25,6 +25,7 @@ state-4 state-5 state-6 + state-7 == +$ unread-stats [indices=(set index:graph-store) last=@da] @@ -32,6 +33,8 @@ +$ base-state $: unreads-each=(jug stats-index:store index:graph-store) unreads-count=(map stats-index:store @ud) + timeboxes=(map stats-index:store @da) + unread-notes=timebox:store last-seen=(map stats-index:store @da) =notifications:store archive=notifications:store @@ -52,23 +55,16 @@ [%5 state-three:store] :: +$ state-6 - [%6 base-state] + [%6 state-four:store] +:: ++$ state-7 + [%7 base-state] :: -+$ inflated-state - $: state-6 - cache - == -:: $cache: useful to have precalculated, but can be derived from state -:: albeit expensively -+$ cache - $: by-index=(jug stats-index:store [time=@da =index:store]) - ~ - == :: ++ orm ((ordered-map @da timebox:store) gth) -- :: -=| inflated-state +=| state-7 =* state - :: =< @@ -87,26 +83,43 @@ :_ this ~[autoseen-timer] :: -++ on-save !>(-.state) +++ on-save !>(state) ++ on-load |= =old=vase ^- (quip card _this) =/ old !<(versioned-state old-vase) =| cards=(list card) - |^ + |^ + ^- (quip card _this) ?- -.old - %6 + %7 :- (flop cards) - this(-.state old, +.state (inflate-cache:ha old)) + this(state old) + :: + %6 + %_ $ + -.old %7 :: - %5 + +.old + %* . *base-state + notifications (notifications:to-five:upgrade:store notifications.old) + archive ~ + unreads-each unreads-each.old + unreads-count unreads-count.old + last-seen last-seen.old + current-timebox current-timebox + dnd dnd.old + == + == + :: + %5 %_ $ -.old %6 - notifications.old (convert-notifications-4 notifications.old) - archive.old (convert-notifications-4 archive.old) + notifications.old (notifications:to-four:upgrade:store notifications.old) + archive.old *notifications:state-four:store == - :: + :: %4 %_ $ -.old %5 @@ -115,14 +128,14 @@ %- ~(run by last-seen.old) |=(old=@da (min old now.bowl)) == - :: + :: %3 %_ $ -.old %4 - notifications.old (convert-notifications-3 notifications.old) - archive.old (convert-notifications-3 archive.old) + notifications.old (notifications:to-three:upgrade:store notifications.old) + archive.old *notifications:state-three:store == - :: + :: %2 %_ $ -.old %3 @@ -131,7 +144,7 @@ :_ cards [%pass / %agent [our dap]:bowl %poke noun+!>(%fix-dangling)] == - :: + :: %1 %_ $ :: @@ -146,7 +159,7 @@ dnd dnd.old == == - :: + :: %0 %_ $ :: @@ -160,98 +173,6 @@ == == :: - ++ convert-notifications-4 - |= old=notifications:state-three:store - %+ gas:orm *notifications:store - ^- (list [@da timebox:store]) - %+ murn - (tap:orm:state-three:store old) - |= [time=@da =timebox:state-three:store] - ^- (unit [@da timebox:store]) - =/ new-timebox=timebox:store - (convert-timebox-4 timebox) - ?: =(0 ~(wyt by new-timebox)) - ~ - `[time new-timebox] - :: - ++ convert-timebox-4 - |= =timebox:state-three:store - ^- timebox:store - %- ~(gas by *timebox:store) - ^- (list [index:store notification:store]) - %+ murn - ~(tap by timebox) - |= [=index:store =notification:state-three:store] - ^- (unit [index:store notification:store]) - =/ new-notification=(unit notification:store) - (convert-notification-4 notification) - ?~ new-notification ~ - `[index u.new-notification] - :: - ++ convert-notification-4 - |= =notification:state-three:store - ^- (unit notification:store) - ?: ?=(%group -.contents.notification) - `notification - =/ con=(list post:post) - (convert-graph-contents-4 list.contents.notification) - ?: =(~ con) ~ - =, notification - `[date read %graph con] - :: - ++ convert-graph-contents-4 - |= con=(list post:post-zero:post) - ^- (list post:post) - (turn con post-to-one:graph-store) - :: - ++ convert-notifications-3 - |= old=notifications:state-two:store - %+ gas:orm:state-three:store *notifications:state-three:store - ^- (list [@da timebox:state-three:store]) - %+ murn - (tap:orm:state-two:store old) - |= [time=@da =timebox:state-two:store] - ^- (unit [@da timebox:state-three:store]) - =/ new-timebox=timebox:state-three:store - (convert-timebox-3 timebox) - ?: =(0 ~(wyt by new-timebox)) - ~ - `[time new-timebox] - :: - ++ convert-timebox-3 - |= =timebox:state-two:store - ^- timebox:state-three:store - %- ~(gas by *timebox:state-three:store) - ^- (list [index:state-three:store notification:state-three:store]) - %+ murn - ~(tap by timebox) - |= [=index:store =notification:state-two:store] - ^- (unit [index:store notification:state-three:store]) - =/ new-notification=(unit notification:state-three:store) - (convert-notification-3 notification) - ?~ new-notification ~ - `[index u.new-notification] - :: - ++ convert-notification-3 - |= =notification:state-two:store - ^- (unit notification:state-three:store) - ?: ?=(%graph -.contents.notification) - `notification - =/ con=(list group-contents:store) - (convert-group-contents-3 list.contents.notification) - ?: =(~ con) ~ - =, notification - `[date read %group con] - :: - ++ convert-group-contents-3 - |= con=(list group-contents:state-two:store) - ^- (list group-contents:store) - %+ murn con - |= =group-contents:state-two:store - ^- (unit group-contents:store) - ?. ?=(?(%add-members %remove-members) -.group-contents) ~ - `group-contents - :: ++ uni-by |= [a=(set index:graph-store) b=(set index:graph-store)] =/ merged @@ -291,12 +212,12 @@ |= =timebox:state-zero:store ^- timebox:state-two:store %- ~(gas by *timebox:state-two:store) - ^- (list [index:store notification:state-two:store]) + ^- (list [index:state-two:store notification:state-two:store]) %+ murn ~(tap by timebox) |= [=index:state-zero:store =notification:state-zero:store] - ^- (unit [index:store notification:state-two:store]) - =/ new-index=(unit index:store) + ^- (unit [index:state-two:store notification:state-two:store]) + =/ new-index=(unit index:state-two:store) (convert-index-1 index) =/ new-notification=(unit notification:state-two:store) (convert-notification-1 notification) @@ -306,13 +227,13 @@ :: ++ convert-index-1 |= =index:state-zero:store - ^- (unit index:store) + ^- (unit index:state-two:store) ?+ -.index `index %chat ~ :: %graph =, index - `[%graph group graph module description ~] + `[%graph graph *resource module description ~] == :: ++ convert-notification-1 @@ -339,8 +260,14 @@ ^- update:store :- %more ^- (list update:store) - :- give-unreads - [%set-dnd dnd]~ + :~ give-unreads + [%set-dnd dnd] + give-notifications + == + :: + ++ give-notifications + ^- update:store + [%timebox ~ ~(tap by unread-notes)] :: ++ give-since-unreads ^- (list [stats-index:store stats:store]) @@ -348,7 +275,6 @@ ~(tap by unreads-count) |= [=stats-index:store count=@ud] :* stats-index - (~(gut by by-index) stats-index ~) [%count count] (~(gut by last-seen) stats-index *time) == @@ -359,31 +285,16 @@ ~(tap by unreads-each) |= [=stats-index:store indices=(set index:graph-store)] :* stats-index - (~(gut by by-index) stats-index ~) [%each indices] (~(gut by last-seen) stats-index *time) == :: - ++ give-group-unreads - ^- (list [stats-index:store stats:store]) - %+ murn ~(tap by by-index) - |= [=stats-index:store nots=(set [time index:store])] - ?. ?=(%group -.stats-index) - ~ - :- ~ - :* stats-index - nots - [%count 0] - *time - == - :: ++ give-unreads ^- update:store :- %unreads ;: weld give-each-unreads give-since-unreads - give-group-unreads == -- :: @@ -409,8 +320,7 @@ ?:(is-archive archive notifications) |= [time=@da =timebox:store] ^- update:store - :^ %timebox time is-archive - ~(tap by timebox) + [%timebox `time ~(tap by timebox)] == :: ++ on-poke @@ -471,9 +381,7 @@ ^- (quip card _this) ?. ?=([%autoseen ~] wire) (on-arvo:def wire sign-arvo) - ?> ?=([%behn %wake *] sign-arvo) - :_ this(current-timebox now.bowl) - ~[autoseen-timer:ha] + `this :: ++ on-fail on-fail:def -- @@ -512,7 +420,6 @@ %unread-each (unread-each +.in) :: %read-note (read-note +.in) - %unread-note (unread-note +.in) :: %seen-index (seen-index +.in) %remove-graph (remove-graph +.in) @@ -525,13 +432,6 @@ :: +| %note :: :: notification tracking - ++ upd-cache - |= [read=? time=@da =index:store] - poke-core(+.state (^upd-cache read time index)) - :: - ++ rebuild-cache - poke-core(+.state (inflate-cache -.state)) - :: ++ put-notifs |= [time=@da =timebox:store] poke-core(notifications (put:orm notifications time timebox)) @@ -539,74 +439,60 @@ ++ add-note |= [=index:store =notification:store] ^+ poke-core + =/ existing-notif + (~(get by unread-notes) index) + =/ new=notification:store + (merge-notification existing-notif notification) + =. unread-notes + (~(put by unread-notes) index new) + =/ timebox=@da + (~(gut by timeboxes) (to-stats-index:store index) current-timebox) + (give %added index new) + :: + ++ do-archive + |= [time=(unit @da) =index:store] + ^+ poke-core + |^ + ?~(time archive-unread (archive-read u.time)) + :: + ++ archive-unread + =. unread-notes + (~(del by unread-notes) index) + (give %archive ~ index) + :: + ++ archive-read + |= time=@da + =/ =timebox:store + (gut-orm notifications time) + =/ =notification:store + (~(got by timebox) index) + =/ new-timebox=timebox:store + (~(del by timebox) index) + =. poke-core + (put-notifs time new-timebox) + (give %archive `time index) + -- + :: + ++ read-note + |= =index:store + =/ =notification:store + (~(got by unread-notes) index) + =. unread-notes + (~(del by unread-notes) index) + =/ =time + (~(gut by timeboxes) (to-stats-index:store index) current-timebox) =/ =timebox:store - (gut-orm notifications current-timebox) + (gut-orm notifications time) =/ existing-notif (~(get by timebox) index) =/ new=notification:store (merge-notification existing-notif notification) - =/ new-read=? - ?~ existing-notif %.y - read.u.existing-notif - =/ new-timebox=timebox:store + =. timebox (~(put by timebox) index new) - =. poke-core (put-notifs current-timebox new-timebox) - =? poke-core new-read - (upd-cache %.n current-timebox index) - (give %added current-timebox index new) - :: - ++ do-archive - |= [time=@da =index:store] - ^+ poke-core - =/ =timebox:store - (gut-orm notifications time) - =/ =notification:store - (~(got by timebox) index) - =/ new-timebox=timebox:store - (~(del by timebox) index) - =? poke-core !read.notification - (upd-cache %.y time index) - =. poke-core - (put-notifs time new-timebox) - =. archive - %^ jub-orm archive time - |= archive-box=timebox:store - (~(put by archive-box) index notification(read %.y)) - (give %archive time index) - :: - :: if we detect cache inconsistencies, wipe and rebuild - ++ change-read-status - |= [time=@da =index:store read=?] - ^+ poke-core - =. poke-core (upd-cache read time index) - =/ tib=(unit timebox:store) - (get:orm notifications time) - ?~ tib poke-core - =/ not=(unit notification:store) - (~(get by u.tib) index) - ?~ not poke-core - =? poke-core - :: cache is inconsistent iff we didn't directly - :: call this through %read-note or %unread-note - &(=(read read.u.not) !?=(?(%read-note %unread-note) -.in)) - ~& >> "Inconsistent hark cache, rebuilding" - rebuild-cache - ?< &(=(read read.u.not) ?=(?(%read-note %unread-note) -.in)) - =. u.tib - (~(put by u.tib) index u.not(read read)) =. notifications - (put:orm notifications time u.tib) - poke-core + (put:orm notifications time timebox) + (give %note-read time index) :: - ++ read-note - |= [time=@da =index:store] - %. [%read-note time index] - give:(change-read-status time index %.y) - :: - ++ unread-note - |= [time=@da =index:store] - %. [%unread-note time index] - give:(change-read-status time index %.n) :: :: +| %each :: @@ -624,18 +510,18 @@ |= [=stats-index:store ref=index:graph-store] %- read-indices %+ skim - ~(tap ^in (~(get ju by-index) stats-index)) - |= [time=@da =index:store] - =/ =timebox:store - (gut-orm notifications time) + ~(tap ^in ~(key by unread-notes)) + |= =index:store + ?. (stats-index-is-index:store stats-index index) %.n =/ not=notification:store - (~(got by timebox) index) + (~(got by unread-notes) index) ?. ?=(%graph -.index) %.n ?. ?=(%graph -.contents.not) %.n (lien list.contents.not |=(p=post:post =(index.p ref))) :: ++ read-each |= [=stats-index:store ref=index:graph-store] + =. timeboxes (~(put by timeboxes) stats-index now.bowl) =. poke-core (read-index-each stats-index ref) %+ jub-unreads-each:(give %read-each stats-index ref) stats-index @@ -659,12 +545,13 @@ ++ read-count |= =stats-index:store =. unreads-count (~(put by unreads-count) stats-index 0) - =/ times=(list [@da index:store]) - ~(tap ^in (~(get ju by-index) stats-index)) + =/ times=(list index:store) + (unread-for-stats-index stats-index) + =? timeboxes !(~(has by timeboxes) stats-index) (~(put by timeboxes) stats-index now.bowl) (give:(read-indices times) %read-count stats-index) :: ++ read-indices - |= times=(list [time=@da =index:store]) + |= times=(list =index:store) |- ?~ times poke-core =/ core @@ -694,8 +581,6 @@ unreads-each indices =. last-seen ((dif-map-by-key ,@da) last-seen indices) - =. by-index - ((dif-map-by-key ,(set [@da =index:store])) by-index indices) poke-core :: ++ get-stats-indices @@ -705,7 +590,6 @@ ~(tap ^in ~(key by unreads-count)) ~(tap ^in ~(key by last-seen)) ~(tap ^in ~(key by unreads-each)) - ~(tap ^in ~(key by by-index)) == |= =stats-index:store ?. ?=(%graph -.stats-index) %.n @@ -728,30 +612,35 @@ ~(tap ^in set) |- ?~ indices poke-core - =/ times=(list [time=@da =index:store]) - ~(tap ^in (~(get ju by-index) i.indices)) + =/ times=(list =index:store) + (unread-for-stats-index i.indices) =. poke-core (read-indices times) $(indices t.indices) -- :: ++ seen - => (emit cancel-autoseen) - => (emit autoseen-timer) - poke-core(current-timebox now.bowl) + =. poke-core + (read-indices ~(tap ^in ~(key by unread-notes))) + poke-core(current-timebox now.bowl, timeboxes ~) :: ++ read-all =: unreads-count (~(run by unreads-count) _0) unreads-each (~(run by unreads-each) _~) notifications (~(run by notifications) _~) == - (give:seen:rebuild-cache %read-all ~) + (give:seen %read-all ~) :: ++ set-dnd |= d=? (give:poke-core(dnd d) %set-dnd d) -- :: +++ unread-for-stats-index + |= =stats-index:store + %+ skim ~(tap in ~(key by unread-notes)) + (cury stats-index-is-index:store stats-index) +:: ++ merge-notification |= [existing=(unit notification:store) new=notification:store] ^- notification:store @@ -760,11 +649,11 @@ :: %graph ?> ?=(%graph -.contents.new) - u.existing(read %.n, list.contents (weld list.contents.u.existing list.contents.new)) + u.existing(list.contents (weld list.contents.u.existing list.contents.new)) :: %group ?> ?=(%group -.contents.new) - u.existing(read %.n, list.contents (weld list.contents.u.existing list.contents.new)) + u.existing(list.contents (weld list.contents.u.existing list.contents.new)) == :: :: +key-orm: +key:by for ordered maps @@ -818,38 +707,4 @@ ^- (list [@da timebox:store]) %+ skim (tap:orm notifications) |=([@da =timebox:store] !=(~(wyt by timebox) 0)) - -:: -++ upd-cache - |= [read=? time=@da =index:store] - ^+ +.state - %_ +.state - :: - by-index - %. [(to-stats-index:store index) time index] - ?: read - ~(del ju by-index) - ~(put ju by-index) - == -:: -++ inflate-cache - |= state-6 - ^+ +.state - =. +.state - *cache - =/ nots=(list [p=@da =timebox:store]) - (tap:orm notifications) - |- =* outer $ - ?~ nots +.state - =/ unreads ~(tap by timebox.i.nots) - |- =* inner $ - ?~ unreads - outer(nots t.nots) - =* notification q.i.unreads - =* index p.i.unreads - ?: read.notification - inner(unreads t.unreads) - =. +.state - (upd-cache %.n p.i.nots index) - inner(unreads t.unreads) -- diff --git a/pkg/arvo/app/hood.hoon b/pkg/arvo/app/hood.hoon index 24a9e524cc..b6567e1f5b 100644 --- a/pkg/arvo/app/hood.hoon +++ b/pkg/arvo/app/hood.hoon @@ -2,7 +2,7 @@ /+ drum=hood-drum, helm=hood-helm, kiln=hood-kiln |% +$ state - $: %12 + $: %13 drum=state:drum helm=state:helm kiln=state:kiln @@ -15,6 +15,7 @@ [%9 drum=state:drum helm=state:helm kiln=state:kiln] [%10 drum=state:drum helm=state:helm kiln=state:kiln] [%11 drum=state:drum helm=state:helm kiln=state:kiln] + [%12 drum=state:drum helm=state:helm kiln=state:kiln] == +$ any-state-tuple $: drum=any-state:drum diff --git a/pkg/arvo/app/landscape/index.html b/pkg/arvo/app/landscape/index.html index 8a76a571f8..9d5903f2cf 100644 --- a/pkg/arvo/app/landscape/index.html +++ b/pkg/arvo/app/landscape/index.html @@ -24,6 +24,6 @@
- + diff --git a/pkg/arvo/app/launch.hoon b/pkg/arvo/app/launch.hoon index 16997bfc0b..bc7bdd7f0e 100644 --- a/pkg/arvo/app/launch.hoon +++ b/pkg/arvo/app/launch.hoon @@ -13,16 +13,23 @@ [%4 state-zero] [%5 state-zero] [%6 state-zero] + [%7 state-7] == :: +$ state-zero + $: tiles=tiles-0:store + =tile-ordering:store + first-time=? + == +:: ++$ state-7 $: =tiles:store =tile-ordering:store first-time=? == -- :: -=| [%6 state-zero] +=| [%7 state-7] =* state - %- agent:dbug ^- agent:gall @@ -32,7 +39,7 @@ :: ++ on-init ^- (quip card _this) - =/ new-state *state-zero + =/ new-state *state-7 =. new-state %_ new-state tiles @@ -41,12 +48,12 @@ |= =term :- term ^- tile:store - ?+ term [[%custom ~] %.y] + ?+ term [[%custom ~ ~] %.y] %term [[%basic 'Terminal' '/~landscape/img/term.png' '/~term'] %.y] == tile-ordering [%weather %clock %term ~] == - [~ this(state [%6 new-state])] + [~ this(state [%7 new-state])] :: ++ on-save !>(state) ++ on-load @@ -55,8 +62,22 @@ =/ old-state !<(versioned-state old) =| cards=(list card) |- ^- (quip card _this) - ?: ?=(%6 -.old-state) + ?: ?=(%7 -.old-state) [cards this(state old-state)] + :: + ?: ?=(%6 -.old-state) + =/ new-tiles=tiles:store + %- ~(gas by *tiles:store) + %+ turn ~(tap by tiles.old-state) + |= [=term =tile-0:store] + :- term + :_ is-shown.tile-0 + ?- -.type.tile-0 + %basic type.tile-0 + %custom [%custom ~ ~] + == + $(old-state [%7 new-tiles tile-ordering.old-state first-time.old-state]) + :: ?: ?=(%5 -.old-state) :: replace %dojo with %term :: @@ -86,11 +107,11 @@ =. new-state %_ new-state tiles - %- ~(gas by *tiles:store) + %- ~(gas by *tiles-0:store) %+ turn `(list term)`[%weather %clock %dojo ~] |= =term :- term - ^- tile:store + ^- tile-0:store ?+ term [[%custom ~] %.y] %dojo [[%basic 'Dojo' '/~landscape/img/Dojo.png' '/~dojo'] %.y] == @@ -191,9 +212,14 @@ ^- (unit (unit cage)) ?. (team:title our.bowl src.bowl) ~ ?+ path [~ ~] - [%x %tiles ~] ``noun+!>([tiles tile-ordering]) - [%x %first-time ~] ``noun+!>(first-time) - [%x %keys ~] ``noun+!>(~(key by tiles)) + [%x %tiles ~] ``noun+!>([tiles tile-ordering]) + [%x %first-time ~] ``noun+!>(first-time) + [%x %keys ~] ``noun+!>(~(key by tiles)) + :: + [%x %runtime-lag ~] + :^ ~ ~ %json + !> ^- json + b+.^(? //(scot %p our.bowl)//(scot %da now.bowl)/zen/lag) == :: ++ on-arvo diff --git a/pkg/arvo/app/lens.hoon b/pkg/arvo/app/lens.hoon index f7290cfa9b..ed9c93328f 100644 --- a/pkg/arvo/app/lens.hoon +++ b/pkg/arvo/app/lens.hoon @@ -1,5 +1,5 @@ /- lens, *sole -/+ *server, default-agent +/+ *server, default-agent, dbug /= lens-mark /mar/lens/command :: TODO: ask clay to build a $tube =, format |% @@ -35,6 +35,8 @@ -- :: =| =state +%- agent:dbug +^- agent:gall |_ =bowl:gall +* this . def ~(. (default-agent this %|) bowl) @@ -56,8 +58,6 @@ ?. ?=(%handle-http-request mark) (on-poke:def mark vase) =+ !<([eyre-id=@ta =inbound-request:eyre] vase) - ?> ?=(~ job.state) - :: =/ request-line (parse-request-line url.request.inbound-request) =/ site (flop site.request-line) :: @@ -76,6 +76,13 @@ =/ com=command:lens (json:grab:lens-mark jon) :: + ?: ?=(%cancel -.source.com) + ~& %lens-cancel + :_ this(job.state ~) + (give-simple-payload:app eyre-id (json-response:gen [%s 'cancelled'])) + :: + ?> ?=(~ job.state) + :: ?+ -.source.com :_ this(job.state (some [eyre-id com])) [%pass /sole %agent [our.bowl %dojo] %watch /sole/[eyre-id]]~ diff --git a/pkg/arvo/app/metadata-push-hook.hoon b/pkg/arvo/app/metadata-push-hook.hoon index a7ffd37bde..dafbba4679 100644 --- a/pkg/arvo/app/metadata-push-hook.hoon +++ b/pkg/arvo/app/metadata-push-hook.hoon @@ -2,7 +2,7 @@ :: /- *group, *invite-store, store=metadata-store /+ default-agent, verb, dbug, grpl=group, push-hook, - resource, mdl=metadata, gral=graph + resource, mdl=metadata, gral=graph, agentio ~% %group-hook-top ..part ~ |% +$ card card:agent:gall @@ -18,9 +18,19 @@ == :: +$ agent (push-hook:push-hook config) +:: ++$ state-null ~ ++$ state-zero [%0 ~] +:: ++$ versioned-state + $% state-null + state-zero + == -- :: :: +=| state-zero +=* state - %- agent:dbug %+ verb | ^- agent:gall @@ -32,23 +42,45 @@ grp ~(. grpl bowl) met ~(. mdl bowl) gra ~(. gral bowl) + io ~(. agentio bowl) + pass pass:io :: ++ on-init on-init:def ++ on-save !>(~) -++ on-load on-load:def +++ on-load on-load:def +:: ++ on-poke |= [=mark =vase] - ?. ?=(%metadata-hook-update mark) - (on-poke:def mark vase) - =+ !<(=hook-update:store vase) - ?. ?=(%req-preview -.hook-update) - (on-poke:def mark vase) - ?> =(entity.group.hook-update our.bowl) - =/ =group-preview:store - (get-preview:met group.hook-update) - :_ this - =- [%pass / %agent [src.bowl %metadata-pull-hook] %poke -]~ - metadata-hook-update+!>(`hook-update:store`[%preview group-preview]) + |^ ^- (quip card _this) + ?+ mark (on-poke:def mark vase) + %metadata-hook-update metadata-hook-update + %noun noun + == + :: + ++ metadata-hook-update + =+ !<(=hook-update:store vase) + ?. ?=(%req-preview -.hook-update) + (on-poke:def mark vase) + ?> =(entity.group.hook-update our.bowl) + =/ =group-preview:store + (get-preview:met group.hook-update) + :_ this + =- [%pass / %agent [src.bowl %metadata-pull-hook] %poke -]~ + metadata-hook-update+!>(`hook-update:store`[%preview group-preview]) + :: + ++ noun + ?+ q.vase ~|("unknown noun poke" !!) + :: + %clean-dm + =+ .^(sharing=(set resource) (scry:io %gx dap.bowl /sharing/noun)) + :_ this + %+ murn ~(tap in sharing) + |= rid=resource + ^- (unit card) + ?@ (rush name.rid ;~(pfix (jest 'dm--') fed:ag)) ~ + `(poke-self:pass push-hook-action+!>([%remove rid])) + == + -- :: ++ on-agent on-agent:def ++ on-watch on-watch:def @@ -59,8 +91,9 @@ :: ++ transform-proxy-update |= vas=vase - ^- (unit vase) + ^- (quip card (unit vase)) =/ =update:store !<(update:store vas) + :- ~ ?. ?=(?(%add %remove) -.update) ~ =/ role=(unit (unit role-tag)) diff --git a/pkg/arvo/app/metadata-store.hoon b/pkg/arvo/app/metadata-store.hoon index 2f430864c5..ed2322976e 100644 --- a/pkg/arvo/app/metadata-store.hoon +++ b/pkg/arvo/app/metadata-store.hoon @@ -106,6 +106,7 @@ +$ state-8 [%8 base-state-3] +$ state-9 [%9 base-state-3] +$ state-10 [%10 base-state-3] ++$ state-11 [%11 base-state-3] +$ versioned-state $% state-0 state-1 @@ -118,10 +119,11 @@ state-8 state-9 state-10 + state-11 == :: +$ inflated-state - $: state-10 + $: state-11 cached-indices == -- @@ -198,22 +200,21 @@ [%x %associations ~] ``noun+!>(associations) [%x %app-name @ ~] =/ =app-name:store i.t.t.path - ``noun+!>((metadata-for-app:mc app-name)) + ``noun+!>(`associations:store`(metadata-for-app:mc app-name)) :: [%x %group *] =/ group=resource (de-path:resource t.t.path) - ``noun+!>((metadata-for-group:mc group)) + ``noun+!>(`associations:store`(metadata-for-group:mc group)) :: [%x %metadata @ @ @ @ ~] =/ =md-resource:store [i.t.t.path (de-path:resource t.t.t.path)] - ``noun+!>((~(get by associations) md-resource)) + ``noun+!>(`(unit association:store)`(~(get by associations) md-resource)) :: [%x %resource @ *] =/ app=term i.t.t.path =/ rid=resource (de-path:resource t.t.t.path) - ``noun+!>((~(get by resource-indices) [app rid])) - + ``noun+!>(`(unit resource)`(~(get by resource-indices) [app rid])) :: [%x %export ~] ``noun+!>(-.state) @@ -234,7 +235,7 @@ =| cards=(list card) |^ =* loop $ - ?: ?=(%10 -.old) + ?: ?=(%11 -.old) :- cards %_ state associations associations.old @@ -242,6 +243,8 @@ group-indices (rebuild-group-indices associations.old) app-indices (rebuild-app-indices associations.old) == + ?: ?=(%10 -.old) + $(-.old %11, associations.old (hide-dm-assoc associations.old)) ?: ?=(%9 -.old) =/ groups (fall (~(get by (rebuild-app-indices associations.old)) %groups) ~) @@ -282,6 +285,20 @@ :: pre-breach, can safely throw away loop(old *state-8) :: + ++ hide-dm-assoc + |= assoc=associations:store + ^- associations:store + %- ~(gas by *associations:store) + %+ turn ~(tap by assoc) + |= [m=md-resource:store [g=resource met=metadatum:store]] + ^- [md-resource:store association:store] + =? hidden.met + ?& ?=(^ (rush name.resource.m ;~(pfix (jest 'dm--') fed:ag))) + ?=(%graph app-name.m) + == + %.y + [m [g met]] + :: ++ associations-2-to-3 |= assoc=associations-2 ^- associations:store @@ -483,7 +500,7 @@ :: ++ metadata-for-app |= =app-name:store - ^+ associations + ^- associations:store %+ roll ~(tap in (~(gut by app-indices) app-name ~)) |= [[group=resource rid=resource] out=associations:store] =/ =md-resource:store @@ -494,6 +511,7 @@ :: ++ metadata-for-group |= group=resource + ^- associations:store =/ resources=(set md-resource:store) (~(get ju group-indices) group) %+ roll diff --git a/pkg/arvo/gen/btc-provider/action.hoon b/pkg/arvo/gen/btc-provider/action.hoon new file mode 100644 index 0000000000..2182dbd575 --- /dev/null +++ b/pkg/arvo/gen/btc-provider/action.hoon @@ -0,0 +1,13 @@ +:: Sends a raw RPC action to the BTC Provider +:: +:: Commands: +:: +:: +:: +/- *btc-provider +:: +:- %say +|= $: [now=@da eny=@uvJ =beak] + [[act=action ~] ~] +== +[%btc-provider-action act] diff --git a/pkg/arvo/gen/btc-provider/command.hoon b/pkg/arvo/gen/btc-provider/command.hoon new file mode 100644 index 0000000000..f7b3751452 --- /dev/null +++ b/pkg/arvo/gen/btc-provider/command.hoon @@ -0,0 +1,13 @@ +:: Sends a command to the BTC Provider +:: +:: Commands: +:: +:: +:: +/- *btc-provider +:: +:- %say +|= $: [now=@da eny=@uvJ =beak] + [[comm=command ~] ~] + == +[%btc-provider-command comm] diff --git a/pkg/arvo/gen/btc-wallet-check.hoon b/pkg/arvo/gen/btc-wallet-check.hoon new file mode 100644 index 0000000000..9c5e435550 --- /dev/null +++ b/pkg/arvo/gen/btc-wallet-check.hoon @@ -0,0 +1,5 @@ +:- %say +|= [[now=time * bec=beak] ~ ~] +:- %noun +:- %btc-wallet-hash +.^(@uv %gx (en-beam bec(q %glob) /btc-wallet/noun)) diff --git a/pkg/arvo/gen/btc-wallet/action.hoon b/pkg/arvo/gen/btc-wallet/action.hoon new file mode 100644 index 0000000000..949bbff48b --- /dev/null +++ b/pkg/arvo/gen/btc-wallet/action.hoon @@ -0,0 +1,9 @@ +:: Sends an action to btc-wallet +:: +/- *btc-wallet +:: +:- %say +|= $: [now=@da eny=@uvJ =beak] +[[act=action ~] ~] +== +[%btc-wallet-action act] diff --git a/pkg/arvo/gen/btc-wallet/command.hoon b/pkg/arvo/gen/btc-wallet/command.hoon new file mode 100644 index 0000000000..7f5e0c1850 --- /dev/null +++ b/pkg/arvo/gen/btc-wallet/command.hoon @@ -0,0 +1,9 @@ +:: Sends a command to btc-wallet +:: +/- *btc-wallet +:: +:- %say +|= $: [now=@da eny=@uvJ =beak] + [[comm=command ~] ~] + == +[%btc-wallet-command comm] diff --git a/pkg/arvo/gen/dm-hook/dm.hoon b/pkg/arvo/gen/dm-hook/dm.hoon new file mode 100644 index 0000000000..129205a55b --- /dev/null +++ b/pkg/arvo/gen/dm-hook/dm.hoon @@ -0,0 +1,21 @@ +:: dm-hook|dm: DM somebody +:: +/- *graph-store +:- %say +|= $: [now=@da eny=@uvJ =beak] + [[him=ship contents=(list content) ~] ~] + == +=* our p.beak +=/ =post *post +=: author.post our + index.post ~[him now] + time-sent.post now + contents.post contents +== +:: +:- %graph-update-2 +^- update +:- now +:+ %add-nodes [our %dm-inbox] +%- ~(gas by *(map index node)) +~[[~[him now] [%&^post [%empty ~]]]] diff --git a/pkg/arvo/gen/glob/make.hoon b/pkg/arvo/gen/glob/make.hoon index 1f2d5b4a88..ba580ef537 100644 --- a/pkg/arvo/gen/glob/make.hoon +++ b/pkg/arvo/gen/glob/make.hoon @@ -1,3 +1,3 @@ :- %say -|= * -[%glob-make ~] +|= [^ [=path ~] ~] +[%glob-make path] diff --git a/pkg/arvo/gen/graph-store/add-graph.hoon b/pkg/arvo/gen/graph-store/add-graph.hoon index 9b47be0e68..2f284f26a8 100644 --- a/pkg/arvo/gen/graph-store/add-graph.hoon +++ b/pkg/arvo/gen/graph-store/add-graph.hoon @@ -5,6 +5,6 @@ |= $: [now=@da eny=@uvJ =beak] [[=resource mark=(unit mark) overwrite=? ~] ~] == -:- %graph-update-1 +:- %graph-update-2 ^- update [now [%add-graph resource (gas:orm ~ ~) mark overwrite]] diff --git a/pkg/arvo/gen/graph-store/add-post.hoon b/pkg/arvo/gen/graph-store/add-post.hoon index 25edf239a1..2f68f2af23 100644 --- a/pkg/arvo/gen/graph-store/add-post.hoon +++ b/pkg/arvo/gen/graph-store/add-post.hoon @@ -12,9 +12,9 @@ contents.post contents == :: -:- %graph-update-1 +:- %graph-update-2 ^- update :- now :+ %add-nodes [our name] %- ~(gas by *(map index node)) -~[[[now]~ [post [%empty ~]]]] +~[[[now]~ [[%& post] [%empty ~]]]] diff --git a/pkg/arvo/gen/graph-store/add-signatures.hoon b/pkg/arvo/gen/graph-store/add-signatures.hoon index 5106908759..570fa97e70 100644 --- a/pkg/arvo/gen/graph-store/add-signatures.hoon +++ b/pkg/arvo/gen/graph-store/add-signatures.hoon @@ -5,6 +5,6 @@ |= $: [now=@da eny=@uvJ =beak] [[[=resource =index] =signatures ~] ~] == -:- %graph-update-1 +:- %graph-update-2 ^- update [now [%add-signatures [resource index] signatures]] diff --git a/pkg/arvo/gen/graph-store/add-tag.hoon b/pkg/arvo/gen/graph-store/add-tag.hoon index 6d9572d01a..08366364f9 100644 --- a/pkg/arvo/gen/graph-store/add-tag.hoon +++ b/pkg/arvo/gen/graph-store/add-tag.hoon @@ -3,8 +3,8 @@ /- *graph-store :- %say |= $: [now=@da eny=@uvJ =beak] - [[=term =resource ~] ~] + [[=term =uid ~] ~] == -:- %graph-update-1 +:- %graph-update-2 ^- update -[now [%add-tag term resource]] +[now [%add-tag term uid]] diff --git a/pkg/arvo/gen/graph-store/archive-graph.hoon b/pkg/arvo/gen/graph-store/archive-graph.hoon index 003f835728..a6f9ae2989 100644 --- a/pkg/arvo/gen/graph-store/archive-graph.hoon +++ b/pkg/arvo/gen/graph-store/archive-graph.hoon @@ -5,6 +5,6 @@ |= $: [now=@da eny=@uvJ =beak] [[=resource ~] ~] == -:- %graph-update-1 +:- %graph-update-2 ^- update [now [%archive-graph resource]] diff --git a/pkg/arvo/gen/graph-store/export-graph.hoon b/pkg/arvo/gen/graph-store/export-graph.hoon index 2f9bdbafe0..4330d01eb2 100644 --- a/pkg/arvo/gen/graph-store/export-graph.hoon +++ b/pkg/arvo/gen/graph-store/export-graph.hoon @@ -4,7 +4,7 @@ |= $: [now=@da eny=@uvJ bec=beak] [[=ship graph=term ~] ~] == -:- %graph-update-1 +:- %graph-update-2 =/ our (scot %p p.bec) =/ wen (scot %da now) =/ who (scot %p ship) diff --git a/pkg/arvo/gen/graph-store/import-graph.hoon b/pkg/arvo/gen/graph-store/import-graph.hoon index f14150c206..4d3e03aa0b 100644 --- a/pkg/arvo/gen/graph-store/import-graph.hoon +++ b/pkg/arvo/gen/graph-store/import-graph.hoon @@ -4,6 +4,6 @@ |= $: [now=@da eny=@uvJ bec=beak] [[graph=term =path ~] ~] == -:- %graph-update-1 +:- %graph-update-2 =- ~& update=- - .^(=update:graph-store %cx path) diff --git a/pkg/arvo/gen/graph-store/remove-graph.hoon b/pkg/arvo/gen/graph-store/remove-graph.hoon index fc11cfe31f..2bd979faa7 100644 --- a/pkg/arvo/gen/graph-store/remove-graph.hoon +++ b/pkg/arvo/gen/graph-store/remove-graph.hoon @@ -5,6 +5,6 @@ |= $: [now=@da eny=@uvJ =beak] [[=resource ~] ~] == -:- %graph-update-1 +:- %graph-update-2 ^- update [now [%remove-graph resource]] diff --git a/pkg/arvo/gen/graph-store/remove-nodes.hoon b/pkg/arvo/gen/graph-store/remove-posts.hoon similarity index 51% rename from pkg/arvo/gen/graph-store/remove-nodes.hoon rename to pkg/arvo/gen/graph-store/remove-posts.hoon index 13eb098571..01f2345c30 100644 --- a/pkg/arvo/gen/graph-store/remove-nodes.hoon +++ b/pkg/arvo/gen/graph-store/remove-posts.hoon @@ -1,10 +1,10 @@ -:: graph-store|remove-nodes: remove nodes from a graph at indices +:: graph-store|remove-posts: remove nodes from a graph at indices :: /- *graph-store :- %say |= $: [now=@da eny=@uvJ =beak] [[=resource indices=(set index) ~] ~] == -:- %graph-update-1 +:- %graph-update-2 ^- update -[now [%remove-nodes resource indices]] +[now [%remove-posts resource indices]] diff --git a/pkg/arvo/gen/graph-store/remove-signatures.hoon b/pkg/arvo/gen/graph-store/remove-signatures.hoon index 7fc7f90302..8bd4b86958 100644 --- a/pkg/arvo/gen/graph-store/remove-signatures.hoon +++ b/pkg/arvo/gen/graph-store/remove-signatures.hoon @@ -6,6 +6,6 @@ |= $: [now=@da eny=@uvJ =beak] [[[=resource =index] =signatures ~] ~] == -:- %graph-update-1 +:- %graph-update-2 ^- update [now [%remove-signatures [resource index] signatures]] diff --git a/pkg/arvo/gen/graph-store/remove-tag.hoon b/pkg/arvo/gen/graph-store/remove-tag.hoon index c01a10eccd..1a425a4bb2 100644 --- a/pkg/arvo/gen/graph-store/remove-tag.hoon +++ b/pkg/arvo/gen/graph-store/remove-tag.hoon @@ -3,8 +3,8 @@ /- *graph-store :- %say |= $: [now=@da eny=@uvJ =beak] - [[=term =resource ~] ~] + [[=term =uid ~] ~] == -:- %graph-update-1 +:- %graph-update-2 ^- update -[now [%remove-tag term resource]] +[now [%remove-tag term uid]] diff --git a/pkg/arvo/gen/graph-store/unarchive-graph.hoon b/pkg/arvo/gen/graph-store/unarchive-graph.hoon index 7dfd75cbf4..9402207af9 100644 --- a/pkg/arvo/gen/graph-store/unarchive-graph.hoon +++ b/pkg/arvo/gen/graph-store/unarchive-graph.hoon @@ -5,6 +5,6 @@ |= $: [now=@da eny=@uvJ =beak] [[=resource ~] ~] == -:- %graph-update-1 +:- %graph-update-2 ^- update [now [%unarchive-graph resource]] diff --git a/pkg/arvo/gen/hood/code.hoon b/pkg/arvo/gen/hood/code.hoon index 3cb86c225f..3cd4eacae3 100644 --- a/pkg/arvo/gen/hood/code.hoon +++ b/pkg/arvo/gen/hood/code.hoon @@ -3,15 +3,14 @@ :::: /hoon/code/hood/gen :: /? 310 -:: -:::: - :: -:- %say +/- *sole +/+ *generators +:- %ask |= $: [now=@da eny=@uvJ bec=beak] [arg=?(~ [%reset ~]) ~] == =* our p.bec -:- %helm-code +^- (sole-result [%helm-code ?(~ %reset)]) ?~ arg =/ code=tape %+ slag 1 @@ -20,11 +19,23 @@ =/ step=tape %+ scow %ud .^(@ud %j /(scot %p our)/step/(scot %da now)/(scot %p our)) - %- %- slog - :~ [%leaf code] - [%leaf (weld "current step=" step)] - [%leaf "use |code %reset to invalidate this and generate a new code"] - == - ~ + :: + %+ print 'use |code %reset to invalidate this and generate a new code' + %+ print leaf+(weld "current step=" step) + %+ print leaf+code + (produce [%helm-code ~]) +:: ?> =(%reset -.arg) -%reset +%+ print 'continue?' +%+ print 'warning: resetting your code closes all web sessions' +%+ prompt + [%& %project "y/n: "] +%+ parse + ;~ pose + (cold %.y (mask "yY")) + (cold %.n (mask "nN")) + == +|= reset=? +?. reset + no-product +(produce [%helm-code %reset]) diff --git a/pkg/arvo/gen/hood/fuse.hoon b/pkg/arvo/gen/hood/fuse.hoon new file mode 100644 index 0000000000..870b38d2aa --- /dev/null +++ b/pkg/arvo/gen/hood/fuse.hoon @@ -0,0 +1,15 @@ +:: Kiln: Fuse local desk from (optionally-)foreign sources +:: +:::: /hoon/fuse/hood/gen + :: +/* help-text %txt /gen/hood/fuse/help/txt +=, clay +:: +:::: + :: +:- %say +|= [[now=@da eny=@uvJ bec=beak] [arg=[?(~ [des=desk bas=beak con=(list [beak germ]) ~])]] ~] +:- %kiln-fuse +?~ arg + ((slog (turn `wain`help-text |=(=@t leaf+(trip t)))) ~) +[des bas con]:arg diff --git a/pkg/arvo/gen/hood/fuse/help.txt b/pkg/arvo/gen/hood/fuse/help.txt new file mode 100644 index 0000000000..9e18eb80e9 --- /dev/null +++ b/pkg/arvo/gen/hood/fuse/help.txt @@ -0,0 +1,8 @@ +Usage: + + |fuse %destination-desk base-beak ~[[source-beak %some-germ] [another-beak %another-germ]] + +A fuse replaces the contents of %destination-desk with the merge of the +specified beaks according to their merge strategies. This has no dependence +on the previous state of %destination-desk so any commits/work there will +be overwritten. diff --git a/pkg/arvo/gen/kick.hoon b/pkg/arvo/gen/kick.hoon new file mode 100644 index 0000000000..e5a469bddc --- /dev/null +++ b/pkg/arvo/gen/kick.hoon @@ -0,0 +1,7 @@ +:: Kick subs +:- %say +|= $: [now=@da eny=@uvJ bec=beak] + ~ + ~ + == +[%kick %kick] diff --git a/pkg/arvo/gen/tally.hoon b/pkg/arvo/gen/tally.hoon index a66710d5c5..7935400362 100644 --- a/pkg/arvo/gen/tally.hoon +++ b/pkg/arvo/gen/tally.hoon @@ -1,5 +1,5 @@ /- gr=group, md=metadata-store, ga=graph-store -/+ re=resource +/+ re=resource, graph=graph-store !: :- %say |= $: [now=@da eny=@uvJ =beak] @@ -67,7 +67,7 @@ =/ real=(set resource:re) =/ upd=update:ga %+ scry update:ga - [%x %graph-store /keys/graph-update-1] + [%x %graph-store /keys/graph-update-2] ?> ?=(%keys -.q.upd) resources.q.upd :: count activity per channel @@ -86,14 +86,17 @@ %+ scry update:ga [%x %graph-store /graph/(scot %p entity.r)/[name.r]/noun] ?> ?=(%add-graph -.q.upd) - =/ mo ((ordered-map atom node:ga) gth) + =* mo orm:graph =/ week=(list [@da node:ga]) - (tap:mo (subset:mo graph.q.upd ~ `(sub now ~d7))) + (tap:mo (lot:mo graph.q.upd ~ `(sub now ~d7))) :- (lent week) %~ wyt in %+ roll week - |= [[* [author=ship *] *] a=(set ship)] - (~(put in a) author) + |= [[* mp=maybe-post:ga *] a=(set ship)] + ?- -.mp + %| a + %& (~(put in a) author.p.mp) + == :: render results :: :- (tac 'the date is ' (scot %da now)) diff --git a/pkg/arvo/gen/trouble.hoon b/pkg/arvo/gen/trouble.hoon index 6ce73e5176..7eff7e13a6 100644 --- a/pkg/arvo/gen/trouble.hoon +++ b/pkg/arvo/gen/trouble.hoon @@ -9,6 +9,7 @@ :: children :: glob-hash: hash of the glob, which is the js for landscape :: +/- glob /+ version :- %say |= [[now=time * bec=beak] ~ ~] @@ -65,8 +66,11 @@ .^(@uv %cz /[parent]/[desk.u.ota]/(scot %ud ud.cass)) :: ++ glob-state - ^- [@uv @tas] - =< [hash ?~(glob %waiting ?:(-.u.glob %done %trying))] - !< [@ud hash=@uv glob=(unit [? *])] - .^(vase %gx (weld (pathify ~.glob ~) /dbug/state/noun)) + ^- (list [path @uv @tas]) + =+ !< [@ud =globs:glob] + .^(vase %gx (weld (pathify ~.glob ~) /dbug/state/noun)) + %+ turn ~(tap by globs) + |= [srv=path hash=@uv glob=(unit [? *])] + ^- [path @uv @tas] + [srv hash ?~(glob %waiting ?:(-.u.glob %done %trying))] -- diff --git a/pkg/arvo/lib/azimuth-rpc.hoon b/pkg/arvo/lib/azimuth-rpc.hoon index 80d4443401..cc03bd72a8 100644 --- a/pkg/arvo/lib/azimuth-rpc.hoon +++ b/pkg/arvo/lib/azimuth-rpc.hoon @@ -1,7 +1,7 @@ :: azimuth-rpc: command parsing and utilities :: -/- rpc=json-rpc -/+ naive +/- rpc=json-rpc, *dice +/+ naive, json-rpc, lib=naive-transactions :: => :: Utilities :: @@ -19,32 +19,54 @@ %set-spawn-proxy %set-transfer-proxy == - :: FIXME: import tx-status, pend-tx from aggregator :: - +$ tx-status - $: status=?(%unknown %pending %sent %confirmed %failed) - tx=(unit @ux) - == - :: - +$ pend-tx [force=? =raw-tx:naive] + ++ parse-ship + |= jon=json + ^- (unit @p) + ?: ?=([%n *] jon) + (rush p.jon dem) + ?. ?=([%s *] jon) ~ + (rush p.jon ;~(pfix sig fed:ag)) + :: TODO: from /lib/group-store (move to zuse?) + ++ enkebab + |= str=cord + ^- @tas + ~| str + =- (fall - str) + %+ rush str + =/ name + %+ cook + |= part=tape + ^- tape + ?~ part part + :- (add i.part 32) + t.part + ;~(plug hig (star low)) + %+ cook + |=(a=(list tape) (crip (zing (join "-" a)))) + ;~(plug (star low) (star name)) :: ++ from-json + =, dejs-soft:format |% - ++ keys - |= params=(map @t json) - ^- (unit [encrypt=@ auth=@ crypto-suite=@ breach=?]) - ?~ data=(~(get by params) 'data') ~ - %. u.data - =, dejs-soft:format - %- ot - :~ ['encrypt' so] - ['auth' so] - ['crypto-suite' so] - ['breach' bo] - == - :: ++ data |% + ++ keys + |= params=(map @t json) + ^- (unit [encrypt=@ auth=@ crypto-suite=@ breach=?]) + ?~ data=(~(get by params) 'data') ~ + =; ans=(unit [cryp=(unit @ux) auth=(unit @ux) suit=@ brec=?]) + ?~ ans ~ + ?: |(?=(~ cryp.u.ans) ?=(~ auth.u.ans)) ~ + (some [u.cryp.u.ans u.auth.u.ans suit.u.ans brec.u.ans]) + %. u.data + %- ot + :~ ['encrypt' (cu to-hex so)] + ['auth' (cu to-hex so)] + ['cryptoSuite' no] + ['breach' bo] + == + :: ++ address-transfer |= params=(map @t json) ^- (unit [@ux ?]) @@ -54,7 +76,6 @@ ?~ add.u.ans ~ (some [u.add.u.ans r.u.ans]) %. u.data - =, dejs-soft:format %- ot ~[['address' (cu to-hex so)] ['reset' bo]] :: @@ -67,9 +88,8 @@ ?~ add.u.ans ~ (some [ship.u.ans u.add.u.ans]) %. u.data - =, dejs-soft:format %- ot - :~ ['ship' (su ;~(pfix sig fed:ag))] + :~ ['ship' parse-ship] ['address' (cu to-hex so)] == :: @@ -79,7 +99,6 @@ ?~ data=(~(get by params) 'data') ~ =; ans=(unit (unit @ux)) ?~(ans ~ u.ans) - =, dejs-soft:format %. u.data (ot ['address' (cu to-hex so)]~) :: @@ -87,90 +106,106 @@ |= params=(map @t json) ^- (unit @p) ?~ data=(~(get by params) 'data') ~ - =, dejs-soft:format %. u.data - (ot ['ship' (su ;~(pfix sig fed:ag))]~) + (ot ['ship' parse-ship]~) + :: + ++ cancel + |= params=(map @t json) + ^- (unit [l2-tx @p]) + ?~ data=(~(get by params) 'data') ~ + %. u.data + %- ot + :~ ['type' (cu l2-tx so)] + ['ship' parse-ship] + == -- :: ++ ship |= params=(map @t json) ^- (unit @p) ?~ data=(~(get by params) 'ship') ~ - =, dejs-soft:format - %. u.data - (su ;~(pfix sig fed:ag)) + (parse-ship u.data) :: ++ address |= params=(map @t json) ^- (unit @ux) ?~ data=(~(get by params) 'address') ~ - =; ans=(unit (unit @ux)) - ?~(ans ~ u.ans) - =, dejs-soft:format - ((cu to-hex so) u.data) + ?~ ans=((cu to-hex so) u.data) ~ + u.ans :: ++ sig |= params=(map @t json) ^- (unit @) - ?~ sig=(~(get by params) 'sig') ~ - (so:dejs-soft:format u.sig) + ?~ sig=(~(get by params) 'sig') ~ + ?~ ans=((cu to-hex so) u.sig) ~ + u.ans :: ++ from |= params=(map @t json) ^- (unit [@p proxy:naive]) ?~ from=(~(get by params) 'from') ~ - =, dejs-soft:format %. u.from %- ot - :~ ['ship' (su ;~(pfix sig fed:ag))] + :~ ['ship' parse-ship] ['proxy' (cu proxy:naive so)] == :: - ++ keccak + ++ hash |= params=(map @t json) ^- (unit @ux) - ?~ keccak=(~(get by params) 'keccak') ~ - =; ans=(unit (unit @ux)) - ?~(ans ~ u.ans) - =, dejs-soft:format - ((cu to-hex so) u.keccak) + ?~ hash=(~(get by params) 'hash') ~ + ?~ ans=((cu to-hex so) u.hash) ~ + u.ans :: ++ raw |= params=(map @t json) ^- (unit octs) ?~ raw=(~(get by params) 'raw') ~ - =; ans=(unit (unit @ux)) - ?~ ans ~ - ?~ u.ans ~ - (some (as-octs:mimes:html u.u.ans)) - =, dejs-soft:format - ((cu to-hex so) u.raw) + ?~ ans=((cu to-hex so) u.raw) ~ + ?~ u.ans ~ + (some (as-octs:mimes:html u.u.ans)) + :: + ++ tx + |= params=(map @t json) + ^- (unit l2-tx) + ?~ data=(~(get by params) 'tx') ~ + ?~ tx=(so u.data) ~ + =/ method=@tas (enkebab u.tx) + ?. ?=(l2-tx method) ~ + `method + :: + ++ nonce + |= params=(map @t json) + ^- (unit @ud) + ?~ nonce=(~(get by params) 'nonce') ~ + (ni u.nonce) -- :: ++ to-json + =, enjs:format |% ++ pending |= pending=(list pend-tx) ^- json - =, enjs:format :- %a %+ turn pending |= pend-tx ^- json - =, enjs:format %- pairs :~ ['force' b+force] + (en-address address) :: - :- 'raw-tx' + :- 'rawTx' %- pairs - :~ ['sig' (numb sig.raw-tx)] - ['tx' (tx:to-json tx.raw-tx)] + :~ ['tx' (tx:to-json tx.raw-tx)] + ['sig' (hex (as-octs:mimes:html sig.raw-tx))] == == :: + ++ en-address |=(a=@ux address+(hex 20 a)) + :: ++ tx |= =tx:naive ^- json - =, enjs:format |^ %- pairs :~ ['tx' (parse-tx +.tx)] @@ -203,7 +238,6 @@ == == :: ++ en-ship |=(s=@p ship+(ship s)) - ++ en-address |=(a=@ux address+s+(crip "0x{((x-co:co 20) a)}")) ++ en-spawn |=([s=@p a=@ux] ~[(en-ship s) (en-address a)]) ++ en-transfer |=([a=@ux r=?] ~[(en-address a) reset+b+r]) ++ en-keys @@ -211,7 +245,7 @@ ^- (list [@t json]) :~ ['encrypt' (numb encrypt)] ['auth' (numb auth)] - ['crypto-suite' (numb crypto-suite)] + ['cryptoSuite' (numb crypto-suite)] ['breach' b+breach] == -- @@ -221,10 +255,22 @@ ^- json a+(turn txs |=(=tx:naive (tx:to-json tx))) :: + ++ roller-txs + |= txs=(list roller-tx) + ^- json + :- %a + %+ turn txs + |= roller-tx + ^- json + %- pairs + :~ ['status' s+status] + ['hash' (hex (as-octs:mimes:html hash))] + ['type' s+type] + == + :: ++ point |= =point:naive ^- json - =, enjs:format %- pairs :~ ['dominion' s+dominion.point] :: @@ -244,15 +290,15 @@ =* net net.point :* ['rift' (numb rift.net)] :: + =, mimes:html :- 'keys' %- pairs :~ ['life' (numb life.keys.net)] ['suite' (numb suite.keys.net)] - ['auth' (numb auth.keys.net)] - ['crypt' (numb crypt.keys.net)] + ['auth' (hex (as-octs auth.keys.net))] + ['crypt' (hex (as-octs crypt.keys.net))] == :: - ['rift' (numb rift.net)] :- 'sponsor' %- pairs ~[['has' b+has.sponsor.net] ['who' (ship who.sponsor.net)]] @@ -261,220 +307,211 @@ ['escape' (ship u.escape.net)]~ == == :: + ++ points + |= points=(list [@p point:naive]) + ^- json + :- %a + %+ turn points + |= [ship=@p =point:naive] + %- pairs + :~ ['ship' (^ship ship)] + ['point' (^point point)] + == + :: + ++ ships + |= ships=(list @p) + ^- json + a+(turn ships ship) + :: ++ ownership |= [=address:naive =nonce:naive] ^- json - =, enjs:format %- pairs - :~ ['address' s+(crip "0x{((x-co:co 20) address)}")] + :~ (en-address address) ['nonce' (numb nonce)] == :: - ++ tx-status - |= =^tx-status + ++ spawned + |= children=(list [@p @ux]) ^- json - =, enjs:format + :- %a + %+ turn children + |= [child=@p address=@ux] %- pairs - :~ ['status' s+status.tx-status] - :: - :- 'tx' - ?~ tx.tx-status ~ - s+(crip "0x{((x-co:co 20) u.tx.tx-status)}") + :~ ['ship' (ship child)] + (en-address address) == + :: + ++ tx-status |=(=^tx-status ^-(json s+status.tx-status)) + :: + ++ config + |= roller-config + ^- json + %- pairs + :~ ['nextBatch' (time next-batch)] + ['frequency' (numb (div frequency ~s1))] + ['refreshTime' (numb (div refresh-time ~s1))] + ['contract' (hex 20 contract)] + ['chainId' (numb chain-id)] + == + :: + ++ hex + |= [p=@ q=@] + ^- json + s+(crip ['0' 'x' ((x-co:co (mul 2 p)) q)]) -- :: ++ to-hex |= =cord ^- (unit @ux) - =/ parsed=(unit (pair @ud @ux)) (de:base16:mimes:html cord) - ?~ parsed - ::~|(%non-hex-cord !!) + ?. =((end [3 2] cord) '0x') ~ + (rush (rsh [3 2] cord) hex) + :: + ++ build-l2-tx + |= [=l2-tx from=[@p proxy:naive] params=(map @t json)] + ^- (unit tx:naive) + ?: =(l2-tx %transfer-point) + ?~ data=(address-transfer:data:from-json params) + ~ + `[from %transfer-point u.data] + ?: =(l2-tx %spawn) + ?~ data=(address-ship:data:from-json params) + ~ + `[from %spawn u.data] + ?: =(l2-tx %configure-keys) + ?~ data=(keys:data:from-json params) + ~ + `[from %configure-keys u.data] + ?: ?=(spawn-action l2-tx) + ?~ data=(ship:data:from-json params) + ~ + ?- l2-tx + %escape `[from %escape u.data] + %cancel-escape `[from %cancel-escape u.data] + %adopt `[from %adopt u.data] + %reject `[from %reject u.data] + %detach `[from %detach u.data] + == + ?. ?=(proxy-action l2-tx) ~ - (some q.u.parsed) - :: - ++ rpc-res - |% - ++ sponsor - |= [id=@t params=(map @t json) action=spawn-action] - ^- [(unit cage) response:rpc] - ?. (params:validate params) - [~ ~(params error id)] - =/ sig=(unit @) (sig:from-json params) - =/ from=(unit [@p proxy:naive]) (from:from-json params) - =/ raw=(unit octs) (raw:from-json params) - =/ data=(unit @p) (ship:data:from-json params) - ?. &(?=(^ sig) ?=(^ from) ?=(^ raw) ?=(^ data)) - [~ ~(parse error id)] - :_ [%result id s+'ok'] - %- some - :- %aggregator-action - !> - =; =skim-tx:naive - [%submit | u.sig %ful u.raw u.from skim-tx] - ?- action - %escape [%escape u.data] - %cancel-escape [%cancel-escape u.data] - %adopt [%adopt u.data] - %reject [%reject u.data] - %detach [%detach u.data] - == - :: - ++ proxy - |= [id=@t params=(map @t json) action=proxy-action] - ^- [(unit cage) response:rpc] - ?. (params:validate params) - [~ ~(params error id)] - =/ sig=(unit @) (sig:from-json params) - =/ from=(unit [@p proxy:naive]) (from:from-json params) - =/ raw=(unit octs) (raw:from-json params) - =/ data=(unit @ux) (address:data:from-json params) - ?. &(?=(^ sig) ?=(^ from) ?=(^ raw) ?=(^ data)) - [~ ~(parse error id)] - :_ [%result id s+'ok'] - %- some - :- %aggregator-action - !> - =; =skim-tx:naive - [%submit | u.sig %ful u.raw u.from skim-tx] - ?- action - %set-management-proxy [%set-management-proxy u.data] - %set-spawn-proxy [%set-spawn-proxy u.data] - %set-transfer-proxy [%set-transfer-proxy u.data] - == - -- - :: - ++ error - |_ id=@t - :: https://www.jsonrpc.org/specification#error_object - :: - ++ parse [%error id '-32700' 'Failed to parsed'] - ++ request [%error id '-32600' 'Invalid Request'] - ++ method [%error id '-32601' 'Method not found'] - ++ params [%error id '-32602' 'Invalid params'] - ++ internal [%error id '-32603' 'Internal error'] - ++ not-found [%error id '-32000' 'Resource not found'] - -- - :: - ++ validate - |% - ++ params - |= params=(map @t json) - ^- ? - =((lent ~(tap by params)) 4) - -- + ?~ data=(address:data:from-json params) + ~ + ?- l2-tx + %set-management-proxy `[from %set-management-proxy u.data] + %set-spawn-proxy `[from %set-spawn-proxy u.data] + %set-transfer-proxy `[from %set-transfer-proxy u.data] + == -- |% ++ get-point |= [id=@t params=(map @t json) scry=$-(ship (unit point:naive))] ^- response:rpc - ?. =((lent ~(tap by params)) 1) - ~(params error id) + ?. =(~(wyt by params) 1) + ~(params error:json-rpc id) ?~ ship=(~(get by params) 'ship') - ~(params error id) - ?~ ship=(rush (so:dejs:format u.ship) ;~(pfix sig fed:ag)) - ~(params error id) + ~(params error:json-rpc id) + ?~ ship=(parse-ship u.ship) + ~(params error:json-rpc id) ?~ point=(scry u.ship) - ~(params error id) + ~(not-found error:json-rpc id) [%result id (point:to-json u.point)] :: -++ transfer-point +++ get-ships + |= [id=@t params=(map @t json) scry=$-(@ux (list @p))] + ^- response:rpc + ?. =(~(wyt by params) 1) + ~(params error:json-rpc id) + ?~ address=(address:from-json params) + ~(parse error:json-rpc id) + [%result id (ships:to-json (scry u.address))] +:: +++ get-dns + |= [id=@t params=(map @t json) dns=(list @t)] + ^- response:rpc + ?. =((lent ~(tap by params)) 0) + ~(params error:json-rpc id) + [%result id a+(turn dns (cork same (lead %s)))] +:: +++ cancel-tx |= [id=@t params=(map @t json)] ^- [(unit cage) response:rpc] - ?. (params:validate params) - [~ ~(params error id)] - =/ sig=(unit @) (sig:from-json params) - =/ from=(unit [ship @t]) (from:from-json params) - =/ raw=(unit octs) (raw:from-json params) - =/ data=(unit [@ux ?]) (address-transfer:data:from-json params) - ?: |(?=(~ sig) ?=(~ from) ?=(~ raw) ?=(~ data)) - [~ ~(parse error id)] + ?. =(~(wyt by params) 3) + [~ ~(params error:json-rpc id)] + =/ sig=(unit @) (sig:from-json params) + =/ keccak=(unit @ux) (hash:from-json params) + =/ data=(unit [l2-tx ship]) (cancel:data:from-json params) + ?. &(?=(^ sig) ?=(^ keccak) ?=(^ data)) + [~ ~(parse error:json-rpc id)] :_ [%result id s+'ok'] %- some - noun+!>([u.sig u.from u.data]) + aggregator-action+!>([%cancel u.sig u.keccak u.data]) :: -++ configure-keys - |= [id=@t params=(map @t json)] +++ get-spawned + |= [id=@t params=(map @t json) scry=$-(ship (list [ship @ux]))] + ^- response:rpc + ?. =((lent ~(tap by params)) 1) + ~(params error:json-rpc id) + ?~ ship=(ship:from-json params) + ~(params error:json-rpc id) + [%result id (spawned:to-json (scry u.ship))] +:: +++ process-rpc + |= [id=@t params=(map @t json) action=l2-tx] ^- [(unit cage) response:rpc] - ?. (params:validate params) - [~ ~(params error id)] - =/ sig=(unit @) (sig:from-json params) - =/ from=(unit [ship @t]) (from:from-json params) - =/ raw=(unit octs) (raw:from-json params) - =/ data=(unit [encrypt=@ auth=@ crypto-suite=@ breach=?]) - (keys:data:from-json params) - ?. &(?=(^ sig) ?=(^ from) ?=(^ raw) ?=(^ data)) - [~ ~(parse error id)] - :_ [%result id s+'ok'] + ?. =((lent ~(tap by params)) 4) + [~ ~(params error:json-rpc id)] + =+ ^- $: sig=(unit @) + from=(unit [ship proxy:naive]) + addr=(unit @ux) + == + =, from-json + [(sig params) (from params) (address params)] + ?: |(?=(~ sig) ?=(~ from) ?=(~ addr)) + [~ ~(parse error:json-rpc id)] + =/ tx=(unit tx:naive) (build-l2-tx action u.from params) + ?~ tx [~ ~(parse error:json-rpc id)] + =+ (gen-tx-octs:lib u.tx) + :_ [%result id (hex:to-json 32 (hash-tx:lib p q))] %- some - noun+!>([u.sig u.from u.data]) + aggregator-action+!>([%submit | u.addr u.sig %don u.tx]) :: -++ spawn - |= [id=@t params=(map @t json)] - ^- [(unit cage) response:rpc] - ?. (params:validate params) - [~ ~(params error id)] - =/ sig=(unit @) (sig:from-json params) - =/ from=(unit [@p proxy:naive]) (from:from-json params) - =/ raw=(unit octs) (raw:from-json params) - =/ data=(unit [@p @ux]) (address-ship:data:from-json params) - ?. &(?=(^ sig) ?=(^ from) ?=(^ raw) ?=(^ data)) - [~ ~(parse error id)] - :_ [%result id s+'ok'] - %- some - aggregator-action+!>([%submit | u.sig %ful u.raw u.from %spawn u.data]) -:: -++ escape sponsor:rpc-res -++ cancel-escape sponsor:rpc-res -++ adopt sponsor:rpc-res -++ detach sponsor:rpc-res -++ reject sponsor:rpc-res -++ management-proxy proxy:rpc-res -++ spawn-proxy proxy:rpc-res -++ transfer-proxy proxy:rpc-res -:: - readNonce(from=[ship proxy]) -> @ :: automatically increment for pending wraps -:: -++ read-nonce +++ nonce |= [id=@t params=(map @t json) scry=$-([ship proxy:naive] (unit @))] ^- response:rpc - ?. =((lent ~(tap by params)) 3) - ~(params error id) + ?. =((lent ~(tap by params)) 1) + ~(params error:json-rpc id) ?~ from=(from:from-json params) - ~(parse error id) + ~(parse error:json-rpc id) ?~ nonce=(scry u.from) - ~(params error id) + ~(not-found error:json-rpc id) [%result id (numb:enjs:format u.nonce)] :: ++ pending - :: FIXME: send raw-tx (i.e. tx with signature) instead? - :: |% - :: - readPendingRoll() -> (list pend-tx) :: ++ all |= [id=@t params=(map @t json) pending=(list pend-tx)] ^- response:rpc ?. =((lent ~(tap by params)) 0) - ~(params error id) + ~(params error:json-rpc id) [%result id (pending:to-json pending)] - :: - readPendingByShip(ship) -> (list pend-tx) :: ++ ship |= [id=@t params=(map @t json) scry=$-(@p (list pend-tx))] ^- response:rpc ?. =((lent ~(tap by params)) 1) - ~(params error id) + ~(params error:json-rpc id) ?~ ship=(ship:from-json params) - ~(parse error id) + ~(parse error:json-rpc id) [%result id (pending:to-json (scry u.ship))] - :: - readPendingByAddress(address) -> (list pend-tx) :: ++ addr |= [id=@t params=(map @t json) scry=$-(@ux (list pend-tx))] ^- response:rpc ?. =((lent ~(tap by params)) 1) - ~(params error id) + ~(params error:json-rpc id) ?~ address=(address:from-json params) - ~(parse error id) + ~(parse error:json-rpc id) [%result id (pending:to-json (scry u.address))] -- :: @@ -482,22 +519,50 @@ |= [id=@t params=(map @t json) scry=$-(@ tx-status)] ^- response:rpc ?. =((lent ~(tap by params)) 1) - ~(params error id) - ?~ keccak=(keccak:from-json params) - ~(parse error id) - [%result id (tx-status:to-json (scry u.keccak))] + ~(params error:json-rpc id) + ?~ hash=(hash:from-json params) + ~(parse error:json-rpc id) + [%result id (tx-status:to-json (scry u.hash))] :: -:: ++ history -:: |= $: id=@t -:: params=(map @t json) -:: :: FIXME: use proper type from aggregator/index -:: :: -:: scry=$-([@p proxy:naive] (list tx:naive)) -:: == -:: ^- response:rpc -:: ?. =((lent ~(tap by params)) 1) -:: ~(params error id) -:: ?~ from=(from:from-json params) -:: ~(parse error id) -:: [%result id (txs:to-json (scry u.from))] +++ next-batch + |= [id=@t params=(map @t json) when=time] + ^- response:rpc + ?. =((lent ~(tap by params)) 0) + ~(params error:json-rpc id) + [%result id (time:enjs:format when)] +:: +++ history + |= [id=@t params=(map @t json) scry=$-(address:naive (list roller-tx))] + ^- response:rpc + ?. =((lent ~(tap by params)) 1) + ~(params error:json-rpc id) + ?~ address=(address:from-json params) + ~(parse error:json-rpc id) + [%result id (roller-txs:to-json (scry u.address))] +:: +++ get-config + |= [id=@t params=(map @t json) =roller-config] + ^- response:rpc + ?. =((lent ~(tap by params)) 0) + ~(params error:json-rpc id) + [%result id (config:to-json roller-config)] +:: +++ hash-transaction + |= [id=@t params=(map @t json) chain-id=@] + ^- response:rpc + ?. =((lent ~(tap by params)) 4) + ~(params error:json-rpc id) + =+ ^- $: l2-tx=(unit l2-tx) + nonce=(unit @ud) + from=(unit [@p proxy:naive]) + == + =, from-json + [(tx params) (nonce params) (from params)] + ?: |(?=(~ nonce) ?=(~ from) ?=(~ l2-tx)) + ~(parse error:json-rpc id) + =/ tx=(unit tx:naive) (build-l2-tx u.l2-tx u.from params) + ?~ tx ~(parse error:json-rpc id) + :+ %result id + =- (hex:to-json 32 (hash-tx:lib p q)) + (unsigned-tx:lib chain-id u.nonce (gen-tx-octs:lib u.tx)) -- diff --git a/pkg/arvo/lib/azimuth.hoon b/pkg/arvo/lib/azimuth.hoon index 96e9967ea1..b834a4144b 100644 --- a/pkg/arvo/lib/azimuth.hoon +++ b/pkg/arvo/lib/azimuth.hoon @@ -132,7 +132,7 @@ 0x3e8c.a510.354b.c2fd.bbd6.1502.52d9.3105.c9c2.7bbe :: ++ naive - 0xb581.01cd.3bbb.cc6f.a40b.cdb0.4bb7.1623.b5c7.d39b + 0xe7cf.4b83.06d3.11ba.ca15.585f.e3f0.7cd0.441c.21d1 :: ++ launch 4.601.630 ++ public launch diff --git a/pkg/arvo/lib/bip/b158.hoon b/pkg/arvo/lib/bip/b158.hoon new file mode 100644 index 0000000000..bf7ac0badc --- /dev/null +++ b/pkg/arvo/lib/bip/b158.hoon @@ -0,0 +1,247 @@ +/- bc=bitcoin +/+ bcu=bitcoin-utils +|% +++ params + |% + ++ p 19 + ++ m 784.931 + -- +:: +++ siphash + |= [k=byts m=byts] + ^- byts + |^ + ?> =(wid.k 16) + ?> (lte (met 3 dat.k) wid.k) + ?> (lte (met 3 dat.m) wid.m) + =. k (flim:sha k) + =. m (flim:sha m) + (flim:sha (fin (comp m (init dat.k)))) + :: Initialise internal state + :: + ++ init + |= k=@ + ^- [@ @ @ @] + =/ k0=@ (end [6 1] k) + =/ k1=@ (cut 6 [1 1] k) + :^ (mix k0 0x736f.6d65.7073.6575) + (mix k1 0x646f.7261.6e64.6f6d) + (mix k0 0x6c79.6765.6e65.7261) + (mix k1 0x7465.6462.7974.6573) + :: + :: Compression rounds + ++ comp + |= [m=byts v=[v0=@ v1=@ v2=@ v3=@]] + ^- [@ @ @ @] + =/ len=@ud (div wid.m 8) + =/ last=@ (lsh [3 7] (mod wid.m 256)) + =| i=@ud + =| w=@ + |- + =. w (cut 6 [i 1] dat.m) + ?: =(i len) + =. v3.v (mix v3.v (mix last w)) + =. v (rnd (rnd v)) + =. v0.v (mix v0.v (mix last w)) + v + %= $ + v =. v3.v (mix v3.v w) + =. v (rnd (rnd v)) + =. v0.v (mix v0.v w) + v + i (add i 1) + == + :: + :: Finalisation rounds + ++ fin + |= v=[v0=@ v1=@ v2=@ v3=@] + ^- byts + =. v2.v (mix v2.v 0xff) + =. v (rnd (rnd (rnd (rnd v)))) + :- 8 + :(mix v0.v v1.v v2.v v3.v) + :: + :: Sipround + ++ rnd + |= [v0=@ v1=@ v2=@ v3=@] + ^- [@ @ @ @] + =. v0 (~(sum fe 6) v0 v1) + =. v2 (~(sum fe 6) v2 v3) + =. v1 (~(rol fe 6) 0 13 v1) + =. v3 (~(rol fe 6) 0 16 v3) + =. v1 (mix v1 v0) + =. v3 (mix v3 v2) + =. v0 (~(rol fe 6) 0 32 v0) + =. v2 (~(sum fe 6) v2 v1) + =. v0 (~(sum fe 6) v0 v3) + =. v1 (~(rol fe 6) 0 17 v1) + =. v3 (~(rol fe 6) 0 21 v3) + =. v1 (mix v1 v2) + =. v3 (mix v3 v0) + =. v2 (~(rol fe 6) 0 32 v2) + [v0 v1 v2 v3] + -- +:: +str: bit streams +:: read is from the front +:: write appends to the back +:: +++ str + |% + ++ read-bit + |= s=bits:bc + ^- [bit=@ub rest=bits:bc] + ?> (gth wid.s 0) + :* ?:((gth wid.s (met 0 dat.s)) 0b0 0b1) + [(dec wid.s) (end [0 (dec wid.s)] dat.s)] + == + :: + ++ read-bits + |= [n=@ s=bits:bc] + ^- [bits:bc rest=bits:bc] + =| bs=bits:bc + |- + ?: =(n 0) [bs s] + =^ b s (read-bit s) + $(n (dec n), bs (write-bits bs [1 b])) + :: + ++ write-bits + |= [s1=bits:bc s2=bits:bc] + ^- bits:bc + [(add wid.s1 wid.s2) (can 0 ~[s2 s1])] + -- +:: +gol: Golomb-Rice encoding/decoding +:: +++ gol + |% + :: +en: encode x and append to end of s + :: - s: bits stream + :: - x: number to add to the stream + :: - p: golomb-rice p param + :: + ++ en + |= [s=bits:bc x=@ p=@] + ^- bits:bc + =+ q=(rsh [0 p] x) + =+ unary=[+(q) (lsh [0 1] (dec (bex q)))] + =+ r=[p (end [0 p] x)] + %+ write-bits:str s + (write-bits:str unary r) + :: + ++ de + |= [s=bits:bc p=@] + ^- [delta=@ rest=bits:bc] + |^ ?> (gth wid.s 0) + =^ q s (get-q s) + =^ r s (read-bits:str p s) + [(add dat.r (lsh [0 p] q)) s] + :: + ++ get-q + |= s=bits:bc + =| q=@ + =^ first-bit s (read-bit:str s) + |- + ?: =(0 first-bit) [q s] + =^ b s (read-bit:str s) + $(first-bit b, q +(q)) + -- + -- +:: +hsh +:: +++ hsh + |% + :: +to-range + :: - item: scriptpubkey to hash + :: - f: N*M + :: - k: key for siphash (end of blockhash, reversed) + :: + ++ to-range + |= [item=byts f=@ k=byts] + ^- @ + (rsh [0 64] (mul f (swp 3 dat:(siphash k item)))) + :: +set-construct: return sorted hashes of scriptpubkeys + :: + ++ set-construct + |= [items=(list byts) k=byts f=@] + ^- (list @) + %+ sort + %+ turn items + |= item=byts + (to-range item f k) + lth + -- +:: +++ parse-filter + |= filter=hexb:bc + ^- [n=@ux gcs-set=bits:bc] + =/ n n:(de:csiz:bcu filter) + =/ lead=@ ?:(=(1 wid.n) 1 +(wid.n)) + :- dat.n + [(mul 8 (sub wid.filter lead)) `@ub`dat:(drop:byt:bcu lead filter)] +:: +to-key: blockhash (little endian) to key for siphash +:: +++ to-key + |= blockhash=tape + ^- byts + %+ take:byt:bcu 16 + %- flip:byt:bcu + (from-cord:hxb:bcu (crip blockhash)) +:: +match: whether block filter matches *any* target scriptpubkeys +:: - filter: full block filter, with leading N +:: - k: key for siphash (end of blockhash, reversed) +:: - targets: scriptpubkeys to match +:: +++ match + |= [filter=hexb:bc k=byts targets=(list byts)] + ^- ? + =/ [p=@ m=@] [p:params m:params] + =/ [n=@ux gcs-set=bits:bc] (parse-filter filter) + =+ target-hs=(set-construct:hsh targets k (mul n m)) + =+ last-val=0 + |- + ?~ target-hs %.n + ?: =(last-val i.target-hs) + %.y + ?: (gth last-val i.target-hs) + $(target-hs t.target-hs) + :: last-val is less than target: check next val in GCS, if any + :: + ?: (lth wid.gcs-set p) %.n + =^ delta gcs-set + (de:gol gcs-set p) + $(last-val (add delta last-val)) +:: +all-match: returns all target byts that match +:: - filter: full block filter, with leading N +:: - k: key for siphash (end of blockhash, reversed) +:: - targets: scriptpubkeys to match +:: +++ all-match + |= [filter=hexb:bc k=byts targets=(list byts)] + ^- (set hexb:bc) + %- ~(gas in *(set hexb:bc)) + =/ [p=@ m=@] [p:params m:params] + =/ [n=@ux gcs-set=bits:bc] (parse-filter filter) + =/ target-map=(map @ hexb:bc) + %- ~(gas by *(map @ hexb:bc)) + %+ turn targets + |=(t=hexb:bc [(to-range:hsh t (mul n m) k) t]) + =+ target-hs=(sort ~(tap in ~(key by target-map)) lth) + =+ last-val=0 + =| matches=(list @) + |- + ?~ target-hs + (murn matches ~(get by target-map)) + ?: =(last-val i.target-hs) + %= $ + target-hs t.target-hs + matches [last-val matches] + == + ?: (gth last-val i.target-hs) + $(target-hs t.target-hs) + :: last-val is less than target: get next val in GCS, if any + :: + ?: (lth wid.gcs-set p) + (murn matches ~(get by target-map)) + =^ delta gcs-set + (de:gol gcs-set p) + $(last-val (add delta last-val)) +-- diff --git a/pkg/arvo/lib/bip/b173.hoon b/pkg/arvo/lib/bip/b173.hoon new file mode 100644 index 0000000000..e2c46db1ac --- /dev/null +++ b/pkg/arvo/lib/bip/b173.hoon @@ -0,0 +1,144 @@ +:: BIP173: Bech32 Addresses +:: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki +:: +:: Heavily copies: +:: https://github.com/bitcoinjs/bech32/blob/master/index.js +:: +/- sur=bitcoin +/+ bcu=bitcoin-utils +=, sur +=, bcu +|% +++ prefixes + ^- (map network tape) + (my [[%main "bc"] [%testnet "tb"] ~]) +++ charset "qpzry9x8gf2tvdw0s3jn54khce6mua7l" ++$ raw-decoded [hrp=tape data=(list @) checksum=(list @)] +:: below is a port of: https://github.com/bitcoinjs/bech32/blob/master/index.js +:: +++ polymod + |= values=(list @) + |^ ^- @ + =/ gen=(list @ux) + ~[0x3b6a.57b2 0x2650.8e6d 0x1ea1.19fa 0x3d42.33dd 0x2a14.62b3] + =/ chk=@ 1 + |- ?~ values chk + =/ top (rsh [0 25] chk) + =. chk + (mix i.values (lsh [0 5] (dis chk 0x1ff.ffff))) + $(values t.values, chk (update-chk chk top gen)) +:: + ++ update-chk + |= [chk=@ top=@ gen=(list @ux)] + =/ is (gulf 0 4) + |- ?~ is chk + ?: =(1 (dis 1 (rsh [0 i.is] top))) + $(is t.is, chk (mix chk (snag i.is gen))) + $(is t.is) + -- +:: +++ expand-hrp + |= hrp=tape + ^- (list @) + =/ front (turn hrp |=(p=@tD (rsh [0 5] p))) + =/ back (turn hrp |=(p=@tD (dis 31 p))) + (zing ~[front ~[0] back]) +:: +++ verify-checksum + |= [hrp=tape data-and-checksum=(list @)] + ^- ? + %- |=(a=@ =(1 a)) + %- polymod + (weld (expand-hrp hrp) data-and-checksum) +:: +++ checksum + |= [hrp=tape data=(list @)] + ^- (list @) + :: xor 1 with the polymod + :: + =/ pmod=@ + %+ mix 1 + %- polymod + (zing ~[(expand-hrp hrp) data (reap 6 0)]) + %+ turn (gulf 0 5) + |=(i=@ (dis 31 (rsh [0 (mul 5 (sub 5 i))] pmod))) +:: +++ charset-to-value + |= c=@tD + ^- (unit @) + (find ~[c] charset) +++ value-to-charset + |= value=@ + ^- (unit @tD) + ?: (gth value 31) ~ + `(snag value charset) +:: +++ is-valid + |= [bech=tape last-1-pos=@] ^- ? + ?& ?|(=((cass bech) bech) =((cuss bech) bech)) :: to upper or to lower is same as bech + (gte last-1-pos 1) + (lte (add last-1-pos 7) (lent bech)) + (lte (lent bech) 90) + (levy bech |=(c=@tD (gte c 33))) + (levy bech |=(c=@tD (lte c 126))) + == +:: data should be 5bit words +:: +++ encode-raw + |= [hrp=tape data=(list @)] + ^- cord + =/ combined=(list @) + (weld data (checksum hrp data)) + %- crip + (zing ~[hrp "1" (tape (murn combined value-to-charset))]) +++ decode-raw + |= body=cord + ^- (unit raw-decoded) + =/ bech (cass (trip body)) :: to lowercase + =/ pos (flop (fand "1" bech)) + ?~ pos ~ + =/ last-1=@ i.pos + ?. (is-valid bech last-1) :: check bech32 validity (not segwit validity or checksum) + ~ + =/ hrp (scag last-1 bech) + =/ encoded-data-and-checksum=(list @) + (slag +(last-1) bech) + =/ data-and-checksum=(list @) + %+ murn encoded-data-and-checksum + charset-to-value + ?. =((lent encoded-data-and-checksum) (lent data-and-checksum)) :: ensure all were in CHARSET + ~ + ?. (verify-checksum hrp data-and-checksum) + ~ + =/ checksum-pos (sub (lent data-and-checksum) 6) + `[hrp (scag checksum-pos data-and-checksum) (slag checksum-pos data-and-checksum)] +:: +from-address: BIP173 bech32 address encoding to hex +:: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki +:: expects to drop a leading 5-bit 0 (the witness version) +:: +++ from-address + |= body=cord + ^- hexb + ~| "Invalid bech32 address" + =/ d=(unit raw-decoded) (decode-raw body) + ?> ?=(^ d) + =/ bs=bits (from-atoms:bit 5 data.u.d) + =/ byt-len=@ (div (sub wid.bs 5) 8) + ?> =(5^0b0 (take:bit 5 bs)) + ?> ?| =(20 byt-len) + =(32 byt-len) + == + [byt-len `@ux`dat:(take:bit (mul 8 byt-len) (drop:bit 5 bs))] +:: pubkey is the 33 byte ECC compressed public key +:: +++ encode-pubkey + |= [=network pubkey=byts] + ^- (unit cord) + ?. =(33 wid.pubkey) + ~|('pubkey must be a 33 byte ECC compressed public key' !!) + =/ prefix (~(get by prefixes) network) + ?~ prefix ~ + :- ~ + %+ encode-raw u.prefix + [0v0 (to-atoms:bit 5 [160 `@ub`dat:(hash-160 pubkey)])] +-- diff --git a/pkg/arvo/lib/bip/b174.hoon b/pkg/arvo/lib/bip/b174.hoon new file mode 100644 index 0000000000..3bae71d929 --- /dev/null +++ b/pkg/arvo/lib/bip/b174.hoon @@ -0,0 +1,182 @@ +:: BIP174: PSBTs +:: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki +:: +/- sur=bitcoin +/+ bcu=bitcoin-utils +=, sur +=, bcu +|% +++ en + |% + ++ globals + |= rawtx=hexb + ^- map:psbt + :~ [[1 0x0] rawtx] + == + :: + ++ input + |= [only-witness=? i=in:psbt] + ^- map:psbt + %+ weld + ?: only-witness ~ + ~[[1^0x0 rawtx.i]] + :~ (witness-tx i) + (hdkey %input hdkey.i) + == + :: + ++ output + |= =out:psbt + ^- map:psbt + ?~ hk.out ~ + :~ (hdkey %output u.hk.out) + == + :: + ++ witness-tx + |= i=in:psbt + ^- keyval:psbt + :- [1 0x1] + %- cat:byt + :~ (flip:byt 8^value.utxo.i) + 1^0x16 + 2^0x14 + (hash-160 pubkey.hdkey.i) + == + :: + ++ hdkey + |= [=target:psbt h=^hdkey] + ^- keyval:psbt + =/ typ=@ux + ?- target + %input 0x6 + %output 0x2 + == + =/ coin-type=hexb + ?- network.h + %main + 1^0x0 + %testnet + 1^0x1 + == + :- (cat:byt ~[1^typ pubkey.h]) + %- cat:byt + :~ fprint.h + 1^`@ux`bipt.h 3^0x80 + coin-type 3^0x80 + 4^0x80 + 1^`@ux`chyg.h 3^0x0 + (flip:byt 4^idx.h) + == + :: + ++ keyval-byts + |= kv=keyval:psbt + ^- hexb + %- cat:byt + :~ 1^wid.key.kv + key.kv + 1^wid.val.kv + val.kv + == + :: + ++ map-byts + |= m=map:psbt + ^- (unit hexb) + ?~ m ~ + :- ~ + %- cat:byt + (turn m keyval-byts) + -- + ++ base64 + |= b=hexb + ^- base64:psbt + %- en:base64:mimes:html + (flip:byt b) +:: +encode: make base64 cord of PSBT +:: - only-witness: don't include non-witness UTXO +:: +++ encode + |= $: only-witness=? + rawtx=hexb + txid=hexb + inputs=(list in:psbt) + outputs=(list out:psbt) + == + ^- base64:psbt + =/ sep=(unit hexb) `1^0x0 + =/ final=(list (unit hexb)) + %+ join sep + %+ turn + %- zing + :~ ~[(globals:en rawtx)] + (turn inputs (cury input:en only-witness)) + (turn outputs output:en) + == + map-byts:en + %- base64:en + ^- byts + %- cat:byt + %+ weld ~[[5 0x70.7362.74ff]] + (murn (snoc final sep) same) +:: +++ parse + |= psbt-base64=cord + ^- (list map:psbt) + =/ todo=hexb + (drop:byt 5 (to-byts psbt-base64)) + =| acc=(list map:psbt) + =| m=map:psbt + |- + ?: =(wid.todo 0) + (snoc acc m) + :: 0x0: map separator + :: + ?: =(1^0x0 (take:byt 1 todo)) + $(acc (snoc acc m), m *map:psbt, todo (drop:byt 1 todo)) + =^ kv todo (next-keyval todo) + $(m (snoc m kv)) +:: +get-txid: extract txid from a valid PSBT +:: +++ get-txid + |= psbt-base64=cord + ^- hexb + =/ tx=hexb + %- raw-tx + %+ drop:byt 5 + (to-byts psbt-base64) + %- flip:byt + (dsha256 tx) +:: +raw-tx: extract hex transaction +:: looks for key 0x0 in global map +:: crashes if tx not in hex +:: +++ raw-tx + |= b=hexb + ^- hexb + |- + ?: =(wid.b 0) !! + ?: =(1^0x0 (take:byt 1 b)) !! + =/ nk (next-keyval b) + ?: =(0x0 dat.key.kv.nk) + val.kv.nk + $(b rest.nk) +:: +next-keyval: returns next key-val in a PSBT map +:: input first byte must be a map key length +:: +++ next-keyval + |= b=hexb + ^- [kv=keyval:psbt rest=hexb] + =/ klen dat:(take:byt 1 b) + =/ k (take:byt klen (drop:byt 1 b)) + =/ vlen dat:(take:byt 1 (drop:byt (add 1 klen) b)) + =/ v (take:byt vlen (drop:byt (add 2 klen) b)) + ?> ?&((gth wid.k 0) (gth wid.v 0)) + :- [k v] + (drop:byt ;:(add 2 klen vlen) b) +:: +++ to-byts + |= psbt-base64=cord + ^- hexb + ~| "Invalid PSBT" + =+ p=(de:base64:mimes:html psbt-base64) + ?~ p !! + (flip:byt u.p) +-- diff --git a/pkg/arvo/lib/bitcoin-json.hoon b/pkg/arvo/lib/bitcoin-json.hoon new file mode 100644 index 0000000000..fb2562932b --- /dev/null +++ b/pkg/arvo/lib/bitcoin-json.hoon @@ -0,0 +1,234 @@ +/- btc-wallet, btc-provider, bitcoin +/+ bl=bitcoin +|% +++ dejs + =, dejs:format + |% + ++ command + |= jon=json + ^- command:btc-wallet + %. jon + %- of + :~ set-provider+(mu ship) + check-provider+ship + check-payee+ship + set-current-wallet+so + add-wallet+add-wallet + delete-wallet+so + init-payment-external+init-payment-external + init-payment+init-payment + broadcast-tx+so + gen-new-address+|=(json ~) + == + :: + ++ ship (su ;~(pfix sig fed:ag)) + :: + ++ add-wallet + %- ot + :~ xpub+so + fprint+(at [ni ni ~]) + scan-to+(mu (at [ni ni ~])) + max-gap+(mu ni) + confs+(mu ni) + == + :: + ++ init-payment-external + %- ot + :~ address+address + value+ni + feyb+ni + note+(mu so) + == + :: + ++ init-payment + %- ot + :~ payee+ship + value+ni + feyb+ni + note+(mu so) + == + :: + ++ address + |= jon=json + ?> ?=([%s @t] jon) + ^- address:bitcoin + (from-cord:adr:bl +.jon) + -- +:: +++ enjs + =, enjs:format + |% + ++ status + |= sta=status:btc-provider + ^- json + %+ frond -.sta + ?- -.sta + %connected (connected sta) + %new-block (new-block sta) + %disconnected ~ + == + :: + ++ connected + |= sta=status:btc-provider + ?> ?=(%connected -.sta) + %- pairs + :~ network+s+network.sta + block+(numb block.sta) + fee+?~(fee.sta ~ (numb u.fee.sta)) + == + :: + ++ new-block + |= sta=status:btc-provider + ?> ?=(%new-block -.sta) + %- pairs + :~ network+s+network.sta + block+(numb block.sta) + fee+?~(fee.sta ~ (numb u.fee.sta)) + blockhash+(hexb blockhash.sta) + blockfilter+(hexb blockfilter.sta) + == + :: + ++ hexb + |= h=hexb:bitcoin + ^- json + %- pairs + :~ wid+(numb:enjs wid.h) + dat+s+(scot %ux dat.h) + == + :: + ++ update + |= upd=update:btc-wallet + ^- json + %+ frond -.upd + ?- -.upd + %initial (initial upd) + %change-provider (change-provider upd) + %change-wallet (change-wallet upd) + %psbt (psbt upd) + %btc-state (btc-state btc-state.upd) + %new-tx (hest hest.upd) + %cancel-tx (hexb txid.upd) + %new-address (address address.upd) + %balance (balance balance.upd) + %error s+error.upd + %broadcast-success ~ + == + :: + ++ initial + |= upd=update:btc-wallet + ?> ?=(%initial -.upd) + ^- json + %- pairs + :~ provider+(provider provider.upd) + wallet+?~(wallet.upd ~ [%s u.wallet.upd]) + balance+(balance balance.upd) + history+(history history.upd) + btc-state+(btc-state btc-state.upd) + address+?~(address.upd ~ (address u.address.upd)) + == + :: + ++ change-provider + |= upd=update:btc-wallet + ?> ?=(%change-provider -.upd) + ^- json + (provider provider.upd) + :: + ++ change-wallet + |= upd=update:btc-wallet + ?> ?=(%change-wallet -.upd) + ^- json + %- pairs + :~ wallet+?~(wallet.upd ~ [%s u.wallet.upd]) + balance+(balance balance.upd) + history+(history history.upd) + == + :: + ++ psbt + |= upd=update:btc-wallet + ?> ?=(%psbt -.upd) + ^- json + %- pairs + :~ pb+s+pb.upd + fee+(numb fee.upd) + == + :: + ++ balance + |= b=(unit [p=@ q=@]) + ^- json + ?~ b ~ + %- pairs + :~ confirmed+(numb p.u.b) + unconfirmed+(numb q.u.b) + == + :: + ++ btc-state + |= bs=btc-state:btc-wallet + ^- json + %- pairs + :~ block+(numb block.bs) + fee+?~(fee.bs ~ (numb u.fee.bs)) + date+(sect t.bs) + == + :: + ++ provider + |= p=(unit provider:btc-wallet) + ^- json + ?~ p ~ + %- pairs + :~ host+(ship host.u.p) + connected+b+connected.u.p + == + :: + ++ history + |= hy=history:btc-wallet + ^- json + :- %o + ^- (map @t json) + %- ~(rep by hy) + |= [[=txid:btc-wallet h=hest:btc-wallet] out=(map @t json)] + ^- (map @t json) + (~(put by out) (scot %ux dat.txid) (hest h)) + :: + ++ hest + |= h=hest:btc-wallet + ^- json + %- pairs + :~ xpub+s+xpub.h + txid+(hexb txid.h) + confs+(numb confs.h) + recvd+?~(recvd.h ~ (sect u.recvd.h)) + inputs+(vals inputs.h) + outputs+(vals outputs.h) + note+?~(note.h ~ [%s u.note.h]) + == + :: + ++ vals + |= vl=(list [=val:tx:bitcoin s=(unit @p)]) + ^- json + :- %a + %+ turn vl + |= [v=val:tx:bitcoin s=(unit @p)] + %- pairs + :~ val+(val v) + ship+?~(s ~ (ship u.s)) + == + :: + ++ val + |= v=val:tx:bitcoin + ^- json + %- pairs + :~ txid+(hexb txid.v) + pos+(numb pos.v) + address+(address address.v) + value+(numb value.v) + == + :: + ++ address + |= a=address:bitcoin + ^- json + ?- -.a + %base58 [%s (rsh [3 2] (scot %uc +.a))] + %bech32 [%s +.a] + == + -- +-- diff --git a/pkg/arvo/lib/bitcoin-utils.hoon b/pkg/arvo/lib/bitcoin-utils.hoon new file mode 100644 index 0000000000..69ba4738d3 --- /dev/null +++ b/pkg/arvo/lib/bitcoin-utils.hoon @@ -0,0 +1,166 @@ +:: lib/bitcoin-utils.hoon +:: Utilities for working with BTC data types and transactions +:: +/- sur=bitcoin +=, sur +|% +:: +:: TODO: move this bit/byt stuff to zuse +:: bit/byte utilities +:: +:: +:: +blop: munge bit and byt sequences (cat, flip, take, drop) +:: +++ blop + |_ =bloq + +$ biyts [wid=@ud dat=@] + ++ cat + |= bs=(list biyts) + ^- biyts + :- (roll (turn bs |=(b=biyts -.b)) add) + (can bloq (flop bs)) + :: +flip: flip endianness while preserving lead/trail zeroes + :: + ++ flip + |= b=biyts + ^- biyts + [wid.b (rev bloq b)] + :: +take: take n bloqs from front + :: pads front with extra zeroes if n is longer than input + :: + ++ take + |= [n=@ b=biyts] + ^- biyts + ?: (gth n wid.b) + [n dat.b] + [n (rsh [bloq (sub wid.b n)] dat.b)] + :: +drop: drop n bloqs from front + :: returns 0^0 if n >= width + :: + ++ drop + |= [n=@ b=biyts] + ^- biyts + ?: (gte n wid.b) + 0^0x0 + =+ n-take=(sub wid.b n) + [n-take (end [bloq n-take] dat.b)] + -- +++ byt ~(. blop 3) +:: +++ bit + =/ bl ~(. blop 0) + |% + ++ cat cat:bl:bit + ++ flip flip:bl:bit + ++ take take:bl:bit + ++ drop drop:bl:bit + ++ from-atoms + |= [bitwidth=@ digits=(list @)] + ^- bits + %- cat:bit + %+ turn digits + |= a=@ + ?> (lte (met 0 a) bitwidth) + [bitwidth `@ub`a] + :: +to-atoms: convert bits to atoms of bitwidth + :: + ++ to-atoms + |= [bitwidth=@ bs=bits] + ^- (list @) + =| res=(list @) + ?> =(0 (mod wid.bs bitwidth)) + |- + ?: =(0 wid.bs) res + %= $ + res (snoc res dat:(take:bit bitwidth bs)) + bs (drop:bit bitwidth bs) + == + -- +:: big endian sha256: input and output are both MSB first (big endian) +:: +++ sha256 + |= =byts + ^- hexb + %- flip:byt + [32 (shay (flip:byt byts))] +:: +++ dsha256 + |= =byts + (sha256 (sha256 byts)) +:: +++ hash-160 + |= val=byts + ^- hexb + =, ripemd:crypto + :- 20 + %- ripemd-160 + (sha256 val) + +:: +:: hxb: hex parsing utilities +:: +++ hxb + |% + ++ from-cord + |= h=@t + ^- hexb + ?: =('' h) 1^0x0 + :: Add leading 00 + :: + =+ (lsh [3 2] h) + :: Group by 4-size block + :: + =+ (rsh [3 2] -) + :: Parse hex to atom + :: + :- (div (lent (trip h)) 2) + `@ux`(rash - hex) + :: + ++ to-cord + |= =hexb + ^- cord + (en:base16:mimes:html hexb) + -- +:: +:: +csiz: CompactSize integers (a Bitcoin-specific datatype) +:: https://btcinformation.org/en/developer-reference#compactsize-unsigned-integers +:: - encode: big endian to little endian +:: - decode: little endian to big endian +:: +++ csiz + |% + ++ en + |= a=@ + ^- hexb + =/ l=@ (met 3 a) + ?: =(l 1) 1^a + ?: =(l 2) (cat:byt ~[1^0xfd (flip:byt 2^a)]) + ?: (lte l 4) (cat:byt ~[1^0xfe (flip:byt 4^a)]) + ?: (lte l 8) (cat:byt ~[1^0xff (flip:byt 8^a)]) + ~|("Cannot encode CompactSize longer than 8 bytes" !!) + :: + ++ de + |= h=hexb + ^- [n=hexb rest=hexb] + =/ s=@ux dat:(take:byt 1 h) + ?: (lth s 0xfd) [1^s (drop:byt 1 h)] + ~| "Invalid compact-size at start of {}" + =/ len=bloq + ?+ s !! + %0xfd 1 + %0xfe 2 + %0xff 3 + == + :_ (drop:byt (add 1 len) h) + %- flip:byt + (take:byt (bex len) (drop:byt 1 h)) + :: +dea: atom instead of hexb for parsed CompactSize + :: + ++ dea + |= h=hexb + ^- [a=@ rest=hexb] + => (de h) + [dat.n rest] + -- +:: +-- diff --git a/pkg/arvo/lib/bitcoin.hoon b/pkg/arvo/lib/bitcoin.hoon new file mode 100644 index 0000000000..d790ff5a03 --- /dev/null +++ b/pkg/arvo/lib/bitcoin.hoon @@ -0,0 +1,286 @@ +:: bitcoin.hoon +:: top-level Bitcoin constants +:: expose BIP libraries +:: +/- sur=bitcoin +/+ bech32=bip-b173, pbt=bip-b174, bcu=bitcoin-utils +=, sur +=, bcu +|% +++ overhead-weight ^-(vbytes 11) +++ input-weight + |= =bipt + ^- vbytes + ?- bipt + %44 148 + %49 91 + %84 68 + == +++ output-weight + |= =bipt + ^- vbytes + ?- bipt + %44 34 + %49 32 + %84 31 + == +:: +++ xpub-type + |= =xpub + ^- [=bipt =network] + =/ prefix=tape (scag 4 (trip xpub)) + ?: =("tpub" prefix) [%44 %testnet] + ?: =("upub" prefix) [%49 %testnet] + ?: =("vpub" prefix) [%84 %testnet] + ?: =("xpub" prefix) [%44 %main] + ?: =("ypub" prefix) [%49 %main] + ?: =("zpub" prefix) [%84 %main] + ~|("invalid xpub: {}" !!) +:: +:: adr: address manipulation +:: +++ adr + |% + ++ get-bipt + |= a=address + ^- bipt + =/ spk=hexb (to-script-pubkey:adr a) + ?: =(25 wid.spk) %44 + ?: =(23 wid.spk) %49 + ?: =(22 wid.spk) %84 + ?: =(34 wid.spk) %84 + ~|("Invalid address" !!) + :: + ++ to-cord + |= a=address ^- cord + ?: ?=([%base58 *] a) + (scot %uc +.a) + +.a + :: + ++ from-pubkey + |= [=bipt =network pubkey=hexb] + ^- address + ?- bipt + %44 + :- %base58 + =< ^-(@uc dat) + %- cat:byt + :- ?- network + %main 1^0x0 + %testnet 1^0x6f + == + ~[(hash-160 pubkey)] + :: + %49 + :- %base58 + =< ^-(@uc dat) + %- cat:byt + :~ ?- network + %main 1^0x5 + %testnet 1^0xc4 + == + %- hash-160 + (cat:byt ~[2^0x14 (hash-160 pubkey)]) + == + :: + %84 + :- %bech32 + (need (encode-pubkey:bech32 network pubkey)) + == + :: + ++ from-cord + |= addrc=@t + |^ + =/ addrt=tape (trip addrc) + ^- address + ?: (is-base58 addrt) + [%base58 `@uc`(scan addrt fim:ag)] + ?: (is-bech32 addrt) + [%bech32 addrc] + ~|("Invalid address: {}" !!) + :: + ++ is-base58 + |= at=tape + ^- ? + ?| =("m" (scag 1 at)) + =("1" (scag 1 at)) + =("3" (scag 1 at)) + =("2" (scag 1 at)) + == + :: + ++ is-bech32 + |= at=tape + ^- ? + ?| =("bc1" (scag 3 at)) + =("tb1" (scag 3 at)) + == + -- + :: + ++ to-script-pubkey + |= =address + ^- hexb + ?- -.address + %bech32 + =+ h=(from-address:bech32 +.address) + %- cat:byt + :~ 1^0x0 + 1^wid.h + h + == + :: + %base58 + =/ h=hexb [21 `@ux`+.address] + =+ lead-byt=dat:(take:byt 1 h) + =/ version-network=[bipt network] + ?: =(0x0 lead-byt) [%44 %main] + ?: =(0x6f lead-byt) [%44 %testnet] + ?: =(0x5 lead-byt) [%49 %main] + ?: =(0xc4 lead-byt) [%49 %testnet] + ~|("Invalid base58 address: {<+.address>}" !!) + %- cat:byt + ?: ?=(%44 -.version-network) + :~ 3^0x76.a914 + (drop:byt 1 h) + 2^0x88ac + == + :~ 2^0xa914 + (drop:byt 1 h) + 1^0x87 + == + == + -- +:: +:: +txu: transaction utility core +:: - primarily used for calculating txids +:: - ignores signatures in inputs +:: +++ txu + |% + ++ en + |% + ++ input + |= i=input:tx + ^- hexb + %- cat:byt + :~ (flip:byt txid.i) + (flip:byt 4^pos.i) + ?~ script-sig.i 1^0x0 + %- cat:byt + ~[(en:csiz wid.u.script-sig.i) u.script-sig.i] + (flip:byt sequence.i) + == + :: + ++ output + |= o=output:tx + ^- hexb + %- cat:byt + :~ (flip:byt 8^value.o) + 1^wid.script-pubkey.o + script-pubkey.o + == + -- + :: + ++ de + |% + ++ nversion + |= b=hexb + ^- [nversion=@ud rest=hexb] + :- dat:(flip:byt (take:byt 4 b)) + (drop:byt 4 b) + :: + ++ segwit + |= b=hexb + ^- [segwit=(unit @ud) rest=hexb] + ?. =(1^0x0 (take:byt 1 b)) + [~ b] + :- [~ dat:(take:byt 2 b)] + (drop:byt 2 b) + :: + ++ script-sig + |= b=hexb + ^- [sig=hexb rest=hexb] + =^ siglen=hexb b (de:csiz b) + :- (take:byt dat.siglen b) + (drop:byt dat.siglen b) + :: + ++ sequence + |= b=hexb + ^- [seq=hexb rest=hexb] + [(flip:byt (take:byt 4 b)) (drop:byt 4 b)] + :: + ++ inputs + |= b=hexb + ^- [is=(list input:tx) rest=hexb] + |^ + =| acc=(list input:tx) + =^ count b (dea:csiz b) + |- + ?: =(0 count) [acc b] + =^ i b (input b) + $(acc (snoc acc i), count (dec count)) + :: + ++ input + |= b=hexb + ^- [i=input:tx rest=hexb] + =/ txid (flip:byt (take:byt 32 b)) + =/ pos dat:(flip:byt (take:byt 4 (drop:byt 32 b))) + =^ sig=hexb b (script-sig (drop:byt 36 b)) + =^ seq=hexb b (sequence b) + :_ b + [txid pos seq ?:((gth wid.sig 0) `sig ~) ~ 0] + -- + :: + ++ outputs + |= b=hexb + ^- [os=(list output:tx) rest=hexb] + =| acc=(list output:tx) + =^ count b (dea:csiz b) + |- + ?: =(0 count) [acc b] + =/ value (flip:byt (take:byt 8 b)) + =^ scriptlen b (dea:csiz (drop:byt 8 b)) + %= $ + acc %+ snoc acc + :- (take:byt scriptlen b) + dat.value + b (drop:byt scriptlen b) + count (dec count) + == + -- + :: +basic-encode: encodes data in a format suitable for hashing + :: + ++ basic-encode + |= =data:tx + ^- hexb + %- cat:byt + %- zing + :~ ~[(flip:byt 4^nversion.data)] + ~[(en:csiz (lent is.data))] + (turn is.data input:en) + ~[(en:csiz (lent os.data))] + (turn os.data output:en) + ~[(flip:byt 4^locktime.data)] + == + ++ get-id + |= =data:tx + ^- hexb + %- flip:byt + %- dsha256 + (basic-encode data) + :: + ++ decode + |= b=hexb + ^- data:tx + =^ nversion b + (nversion:de b) + =^ segwit b + (segwit:de b) + =^ inputs b + (inputs:de b) + =^ outputs b + (outputs:de b) + =/ locktime=@ud + dat:(take:byt 4 (flip:byt b)) + [inputs outputs locktime nversion segwit] + -- +-- diff --git a/pkg/arvo/lib/btc-provider.hoon b/pkg/arvo/lib/btc-provider.hoon new file mode 100644 index 0000000000..98276607fa --- /dev/null +++ b/pkg/arvo/lib/btc-provider.hoon @@ -0,0 +1,209 @@ +/- bp=btc-provider, json-rpc +/+ bc=bitcoin +^? +::=< [sur .] +::=, sur +|% +:: +from-epoch: time since Jan 1, 1970 in seconds. +:: +++ from-epoch + |= secs=@ud + ^- (unit @da) + ?: =(0 secs) ~ + [~ (add ~1970.1.1 `@dr`(mul secs ~s1))] +:: +++ get-request + |= url=@t + ^- request:http + [%'GET' url ~ ~] +:: +++ post-request + |= [url=@t body=json] + ^- request:http + :* %'POST' + url + ~[['Content-Type' 'application/json']] + =, html + %- some + %- as-octt:mimes + (en-json body) + == +:: +++ gen-request + |= [=host-info:bp ract=action:rpc-types:bp] + ^- request:http + %+ rpc-action-to-http + api-url.host-info ract +:: +++ rpc + =, dejs:format + |% + ++ parse-result + |= res=response:json-rpc + |^ ^- result:rpc-types:bp + ~| -.res + ?> ?=(%result -.res) + ?+ id.res ~|([%unsupported-result id.res] !!) + %get-address-info + [id.res (address-info res.res)] + :: + %get-tx-vals + [id.res (tx-vals res.res)] + :: + %get-raw-tx + [id.res (raw-tx res.res)] + :: + %broadcast-tx + [%broadcast-tx (broadcast-tx res.res)] + :: + %get-block-count + [id.res (ni res.res)] + :: + %get-block-info + [id.res (block-info res.res)] + == + ++ address-info + %- ot + :~ [%address (cu from-cord:adr:bc so)] + [%utxos (as utxo)] + [%used bo] + [%block ni] + == + ++ utxo + %- ot + :~ ['tx_pos' ni] + ['tx_hash' (cu from-cord:hxb:bc so)] + [%height ni] + [%value ni] + [%recvd (cu from-epoch ni)] + == + ++ tx-vals + %- ot + :~ [%included bo] + [%txid (cu from-cord:hxb:bc so)] + [%confs ni] + [%recvd (cu from-epoch ni)] + [%inputs (ar tx-val)] + [%outputs (ar tx-val)] + == + ++ tx-val + %- ot + :~ [%txid (cu from-cord:hxb:bc so)] + [%pos ni] + [%address (cu from-cord:adr:bc so)] + [%value ni] + == + ++ raw-tx + %- ot + :~ [%txid (cu from-cord:hxb:bc so)] + [%rawtx (cu from-cord:hxb:bc so)] + == + ++ broadcast-tx + %- ot + :~ [%txid (cu from-cord:hxb:bc so)] + [%broadcast bo] + [%included bo] + == + ++ block-info + %- ot + :~ [%block ni] + [%fee (mu ni)] + [%blockhash (cu from-cord:hxb:bc so)] + [%blockfilter (cu from-cord:hxb:bc so)] + == + -- + -- +:: +++ rpc-action-to-http + |= [endpoint=@t ract=action:rpc-types:bp] + |^ ^- request:http + ?- -.ract + %get-address-info + %- get-request + %+ mk-url '/addresses/info/' + (to-cord:adr:bc address.ract) + :: + %get-tx-vals + %- get-request + %+ mk-url '/gettxvals/' + (to-cord:hxb:bc txid.ract) + :: + %get-raw-tx + %- get-request + %+ mk-url '/getrawtx/' + (to-cord:hxb:bc txid.ract) + :: + %broadcast-tx + %- get-request + %+ mk-url '/broadcasttx/' + (to-cord:hxb:bc rawtx.ract) + :: + %get-block-count + %- get-request + (mk-url '/getblockcount' '') + :: + %get-block-info + %- get-request + (mk-url '/getblockinfo' '') + == + ++ mk-url + |= [base=@t params=@t] + %^ cat 3 + (cat 3 endpoint base) params + -- +:: RPC/HTTP Utilities +:: +++ httr-to-rpc-response + |= hit=httr:eyre + ^- response:json-rpc + ~| hit + =/ jon=json (need (de-json:html q:(need r.hit))) + ?. =(%2 (div p.hit 100)) + (parse-rpc-error jon) + =, dejs-soft:format + ^- response:json-rpc + =; dere + =+ res=((ar dere) jon) + ?~ res (need (dere jon)) + [%batch u.res] + |= jon=json + ^- (unit response:json-rpc) + =/ res=[id=(unit @t) res=(unit json) err=(unit json)] + %. jon + =, dejs:format + =- (ou -) + :~ ['id' (uf ~ (mu so))] + ['result' (uf ~ (mu same))] + ['error' (uf ~ (mu same))] + == + ?: ?=([^ * ~] res) + `[%result [u.id.res ?~(res.res ~ u.res.res)]] + ~| jon + `(parse-rpc-error jon) +:: +++ get-rpc-response + |= response=client-response:iris + ^- response:json-rpc + ?> ?=(%finished -.response) + %- httr-to-rpc-response + %+ to-httr:iris + response-header.response + full-file.response +:: +++ parse-rpc-error + |= =json + ^- response:json-rpc + :- %error + ?~ json ['' '' ''] + %. json + =, dejs:format + =- (ou -) + :~ =- ['id' (uf '' (cu - (mu so)))] + |*(a=(unit) ?~(a '' u.a)) + :- 'error' + =- (uf ['' ''] -) + =- (cu |*(a=(unit) ?~(a ['' ''] u.a)) (mu (ou -))) + :~ ['code' (uf '' no)] + ['message' (uf '' so)] + == == +-- diff --git a/pkg/arvo/lib/btc.hoon b/pkg/arvo/lib/btc.hoon new file mode 100644 index 0000000000..179431c3d1 --- /dev/null +++ b/pkg/arvo/lib/btc.hoon @@ -0,0 +1,571 @@ +:: lib/btc.hoon +:: +/- *btc-wallet, json-rpc, bp=btc-provider +/+ bip32, bc=bitcoin +=, secp:crypto +=+ ecc=secp256k1 +|% +:: +:: Formerly lib/btc-wallet.hoon +:: +:: +++ defaults + |% + ++ max-gap 20 + ++ confs 6 + -- + :: +fam: planet parent if s is a moon +:: +++ fam + |= [our=ship now=@da s=ship] + ^- ship + ?. =(%earl (clan:title s)) s + (sein:title our now s) +:: +++ num-confs + |= [last-block=@ud =utxo:bc] + ?: =(0 height.utxo) 0 + (add 1 (sub last-block height.utxo)) +:: +++ from-xpub + |= $: =xpub:bc + =fprint:bc + scan-to=(unit scon) + max-gap=(unit @ud) + confs=(unit @ud) + == + ^- walt + =/ [=bipt =network] (xpub-type:bc xpub) + :* xpub + network + fprint + +6:(from-extended:bip32 (trip xpub)) + bipt + *wach + [0 0] + %.n + (fall scan-to *scon) + (fall max-gap max-gap:defaults) + (fall confs confs:defaults) + == +:: +address-coords: find wallet info for the address, if any +:: +++ address-coords + |= [a=address ws=(list walt)] + ^- (unit [w=walt =chyg =idx]) + |^ + |- ?~ ws ~ + =/ res=(unit [=chyg =idx]) + (lookup i.ws) + ?^ res `[i.ws chyg.u.res idx.u.res] + $(ws t.ws) + :: + ++ lookup + |= w=walt + ^- (unit [=chyg =idx]) + =/ ad=(unit addi) (~(get by wach.w) a) + ?~(ad ~ `[chyg.u.ad idx.u.ad]) + -- +:: +++ new-txbu + |= $: w=walt + payee=(unit ship) + =vbytes:bc + is=(list insel) + txos=(list txo) + == + ^- txbu + :* xpub.w + payee + vbytes + %+ turn is + |= i=insel + [utxo.i ~ (~(hdkey wad w chyg.i) idx.i)] + txos + ~ + == +:: txb: transaction builder helpers +:: +++ txb + |_ t=txbu + ++ value + ^- [in=sats out=sats] + :- %+ roll + %+ turn txis.t + |=(=txi value.utxo.txi) + add + (roll (turn txos.t |=(=txo value.txo)) add) + :: + ++ fee + ^- sats:bc + =/ [in=sats out=sats] value + (sub in out) + :: + ++ vbytes + ^- vbytes:bc + %+ add overhead-weight:bc + %+ add + %+ roll + (turn txis.t |=(t=txi (input-weight:bc bipt.hdkey.t))) + add + %+ roll + (turn txos.t |=(t=txo (output-weight:bc (get-bipt:adr:bc address.t)))) + add + ++ tx-data + |^ + ^- data:tx:bc + :* (turn txis.t txi-data) + (turn txos.t txo-data) + 0 1 `1 + == + :: + ++ txi-data + |= =txi + :* txid.utxo.txi pos.utxo.txi + 4^0xffff.ffff ~ ~ value.utxo.txi + == + ++ txo-data + |= =txo + :- (to-script-pubkey:adr:bc address.txo) + value.txo + -- + :: + ++ get-txid + ^- txid + (get-id:txu:bc tx-data) + :: + ++ get-rawtx + (basic-encode:txu:bc tx-data) + :: +add-output: append output (usually change) to txos + :: + ++ add-output + |= =txo + ^- txbu + :: todo update vbytes + t(txos (snoc [txos.t] txo)) + :: +to-psbt: returns a based 64 PSBT if + :: - all inputs have an associated rawtx + :: + ++ to-psbt + ^- (unit base64:psbt:bc) + =/ ins=(list in:psbt:bc) + %+ murn txis.t + |= =txi + ?~ rawtx.txi ~ + `[utxo.txi u.rawtx.txi hdkey.txi] + ?: (lth (lent ins) (lent txis.t)) + ~ + =/ outs=(list out:psbt:bc) + %+ turn txos.t + |=(=txo [address.txo hk.txo]) + `(encode:pbt:bc %.y get-rawtx get-txid ins outs) + -- +:: wad: door for processing walts (wallets) +:: parameterized on a walt and it's chyg account +:: +++ wad + |_ [w=walt =chyg] + ++ pubkey + |= =idx:bc + ^- hexb:bc + =/ pk=@ux + %- compress-point:ecc + pub:(derive-public:(~(derive-public bip32 wamp.w) chyg) idx) + [(met 3 pk) pk] + :: + ++ hdkey + |= =idx:bc + ^- hdkey:bc + [fprint.w (~(pubkey wad w chyg) idx) network.w bipt.w chyg idx] + :: + ++ mk-address + |= =idx:bc + ^- address:bc + (from-pubkey:adr:bc bipt.w network.w (pubkey idx)) + :: +nixt-address: used to get change addresses + :: - gets the current next available address + :: - doesn't bump nixt-address if it's unused + :: - if used, fall back to gen-address and make a new one + :: + ++ nixt-address + ^- (trel address:bc idx:bc walt) + =/ addr (mk-address nixt-idx) + ~| "lib/btc-wallet-store: get-next-address: nixt shouldn't be blank" + =/ =addi (~(got by wach.w) addr) + ?. used.addi + [addr nixt-idx w] + gen-address + :: + :: +gen-address: + :: - generates the next available address + :: - watches it (using update address) + :: + ++ gen-address + ^- (trel address:bc idx:bc walt) + =/ addr (mk-address nixt-idx) + :* addr + nixt-idx + %+ update-address addr + [%.n chyg nixt-idx *(set utxo:bc)] + == + :: +update-address + :: - insert a new address + :: - if it's used, move "nixt" to the next free address + :: - watch address + :: + ++ update-address + |= [a=address:bc =addi] + ^- walt + ?> =(chyg chyg.addi) + ?> =(a (mk-address idx.addi)) + =? w ?&(used.addi (is-nixt addi)) + bump-nixt + w(wach (~(put by wach.w) a addi)) + :: + ++ is-nixt + |= =addi ^- ? + ?: ?=(%0 chyg.addi) + =(idx.addi p.nixt.w) + =(idx.addi q.nixt.w) + ++ nixt-idx + ?:(?=(%0 chyg) p.nixt.w q.nixt.w) + :: +bump-nixt: return wallet with bumped nixt + :: - find next unused address + :: - watches that address + :: - crashes if max-index is passed + :: + ++ bump-nixt + |^ ^- walt + =/ new-idx=idx:bc +(nixt-idx) + |- ?> (lte new-idx max-index) + =+ addr=(mk-address new-idx) + =/ =addi + %+ ~(gut by wach.w) addr + [%.n chyg new-idx *(set utxo:bc)] + ?. used.addi + %= w + nixt (set-nixt new-idx) + wach (~(put by wach.w) addr addi) + == + $(new-idx +(new-idx)) + :: + ++ set-nixt + |= =idx:bc ^- nixt + ?:(?=(%0 chyg) [idx q.nixt.w] [p.nixt.w idx]) + -- + -- +:: sut: select utxos +:: +++ sut +|_ [w=walt eny=@uvJ last-block=@ud payee=(unit ship) =feyb txos=(list txo)] + ++ dust-sats 3 + ++ dust-threshold + |= output-bipt=bipt:bc + ^- vbytes + (mul dust-sats (input-weight:bc output-bipt)) + :: + ++ target-value + ^- sats + %+ roll (turn txos |=(=txo value.txo)) + |=([a=sats b=sats] (add a b)) + :: + ++ base-weight + ^- vbytes + %+ add overhead-weight:bc + %+ roll + %+ turn txos + |=(=txo (output-weight:bc (get-bipt:adr:bc address.txo))) + add + :: + ++ total-vbytes + |= selected=(list insel) + ^- vbytes + %+ add base-weight + (mul (input-weight:bc bipt.w) (lent selected)) + :: value of an input after fee + :: 0 if net is <= 0 + :: + ++ net-value + |= val=sats + ^- sats + =/ cost (mul (input-weight:bc bipt.w) feyb) + ?: (lte val cost) 0 + (sub val cost) + :: + :: +spendable: whether utxo has enough confs to spend + :: + ++ spendable + |= =utxo:bc ^- ? + (gte (num-confs last-block utxo) confs.w) + :: +with-change: + :: - choose UTXOs, if there are enough + :: - return txbu and amount of change (if any) + :: + ++ with-change + ^- [tb=(unit txbu) chng=(unit sats)] + =/ tb=(unit txbu) select-utxos + ?~ tb [~ ~] + =+ excess=~(fee txb u.tb) :: (inputs - outputs) + =/ new-fee=sats :: cost of this tx + one more output + (mul feyb (add (output-weight:bc bipt.w) vbytes.u.tb)) + ?. (gth excess new-fee) + [tb ~] + ?. (gth (sub excess new-fee) (dust-threshold bipt.w)) + [tb ~] + :- tb + `(sub excess new-fee) + :: Uses naive random selection. Should switch to branch-and-bound later. + :: + ++ select-utxos + |^ ^- (unit txbu) + ?. %+ levy txos + |= =txo + %+ gth value.txo + (dust-threshold (get-bipt:adr:bc address.txo)) + ~|("One or more suggested outputs is dust." !!) + =/ is=(unit (list insel)) + %- single-random-draw + %- zing + (turn ~(val by wach.w) to-insels) + ?~ is ~ + `(new-txbu w payee (total-vbytes u.is) u.is txos) + :: + ++ to-insels + |= =addi + ^- (list insel) + %+ turn ~(tap in utxos.addi) + |=(=utxo:bc [utxo chyg.addi idx.addi]) + -- + :: single-random-draw + :: randomly choose utxos until target is hit + :: only use an insel if its net-value > 0 + :: + ++ single-random-draw + |= is=(list insel) + ^- (unit (list insel)) + =/ rng ~(. og eny) + =/ target (add target-value (mul feyb base-weight)) :: add base fees to target + =| [select=(list insel) total=sats:bc] + |- + ?: =(~ is) ~ + =^ n rng (rads:rng (lent is)) + =/ i=insel (snag n is) + ?. (spendable utxo.i) + $(is (oust [n 1] is)) + =/ net-val (net-value value.utxo.i) + =? select (gth net-val 0) + [i select] + =/ new-total (add total net-val) + ?: (gte new-total target) `select + %= $ + is (oust [n 1] is) + total new-total + == + :: + -- +:: +:: +:: Formerly lib/btc-provider +:: +:: +++ from-epoch + |= secs=@ud + ^- (unit @da) + ?: =(0 secs) ~ + [~ (add ~1970.1.1 `@dr`(mul secs ~s1))] +:: +++ get-request + |= url=@t + ^- request:http + [%'GET' url ~ ~] +:: +++ post-request + |= [url=@t body=json] + ^- request:http + :* %'POST' + url + ~[['Content-Type' 'application/json']] + =, html + %- some + %- as-octt:mimes + (en-json body) + == +:: +++ gen-request + |= [=host-info:bp ract=action:rpc-types:bp] + ^- request:http + %+ rpc-action-to-http + api-url.host-info ract +:: +++ rpc + =, dejs:format + |% + ++ parse-result + |= res=response:json-rpc + |^ ^- result:rpc-types:bp + ~| -.res + ?> ?=(%result -.res) + ?+ id.res ~|([%unsupported-result id.res] !!) + %get-address-info + [id.res (address-info res.res)] + :: + %get-tx-vals + [id.res (tx-vals res.res)] + :: + %get-raw-tx + [id.res (raw-tx res.res)] + :: + %broadcast-tx + [%broadcast-tx (broadcast-tx res.res)] + :: + %get-block-count + [id.res (ni res.res)] + :: + %get-block-info + [id.res (block-info res.res)] + == + ++ address-info + %- ot + :~ [%address (cu from-cord:adr:bc so)] + [%utxos (as utxo)] + [%used bo] + [%block ni] + == + ++ utxo + %- ot + :~ ['tx_pos' ni] + ['tx_hash' (cu from-cord:hxb:bc so)] + [%height ni] + [%value ni] + [%recvd (cu from-epoch ni)] + == + ++ tx-vals + %- ot + :~ [%included bo] + [%txid (cu from-cord:hxb:bc so)] + [%confs ni] + [%recvd (cu from-epoch ni)] + [%inputs (ar tx-val)] + [%outputs (ar tx-val)] + == + ++ tx-val + %- ot + :~ [%txid (cu from-cord:hxb:bc so)] + [%pos ni] + [%address (cu from-cord:adr:bc so)] + [%value ni] + == + ++ raw-tx + %- ot + :~ [%txid (cu from-cord:hxb:bc so)] + [%rawtx (cu from-cord:hxb:bc so)] + == + ++ broadcast-tx + %- ot + :~ [%txid (cu from-cord:hxb:bc so)] + [%broadcast bo] + [%included bo] + == + ++ block-info + %- ot + :~ [%block ni] + [%fee (mu ni)] + [%blockhash (cu from-cord:hxb:bc so)] + [%blockfilter (cu from-cord:hxb:bc so)] + == + -- + -- +:: +++ rpc-action-to-http + |= [endpoint=@t ract=action:rpc-types:bp] + |^ ^- request:http + ?- -.ract + %get-address-info + %- get-request + %+ mk-url '/addresses/info/' + (to-cord:adr:bc address.ract) + :: + %get-tx-vals + %- get-request + %+ mk-url '/gettxvals/' + (to-cord:hxb:bc txid.ract) + :: + %get-raw-tx + %- get-request + %+ mk-url '/getrawtx/' + (to-cord:hxb:bc txid.ract) + :: + %broadcast-tx + %- get-request + %+ mk-url '/broadcasttx/' + (to-cord:hxb:bc rawtx.ract) + :: + %get-block-count + %- get-request + (mk-url '/getblockcount' '') + :: + %get-block-info + %- get-request + (mk-url '/getblockinfo' '') + == + ++ mk-url + |= [base=@t params=@t] + %^ cat 3 + (cat 3 endpoint base) params + -- +:: RPC/HTTP Utilities +:: +++ httr-to-rpc-response + |= hit=httr:eyre + ^- response:json-rpc + ~| hit + =/ jon=json (need (de-json:html q:(need r.hit))) + ?. =(%2 (div p.hit 100)) + (parse-rpc-error jon) + =, dejs-soft:format + ^- response:json-rpc + =; dere + =+ res=((ar dere) jon) + ?~ res (need (dere jon)) + [%batch u.res] + |= jon=json + ^- (unit response:json-rpc) + =/ res=[id=(unit @t) res=(unit json) err=(unit json)] + %. jon + =, dejs:format + =- (ou -) + :~ ['id' (uf ~ (mu so))] + ['result' (uf ~ (mu same))] + ['error' (uf ~ (mu same))] + == + ?: ?=([^ * ~] res) + `[%result [u.id.res ?~(res.res ~ u.res.res)]] + ~| jon + `(parse-rpc-error jon) +:: +++ get-rpc-response + |= response=client-response:iris + ^- response:json-rpc + ?> ?=(%finished -.response) + %- httr-to-rpc-response + %+ to-httr:iris + response-header.response + full-file.response +:: +++ parse-rpc-error + |= =json + ^- response:json-rpc + :- %error + ?~ json ['' '' ''] + %. json + =, dejs:format + =- (ou -) + :~ =- ['id' (uf '' (cu - (mu so)))] + |*(a=(unit) ?~(a '' u.a)) + :- 'error' + =- (uf ['' ''] -) + =- (cu |*(a=(unit) ?~(a ['' ''] u.a)) (mu (ou -))) + :~ ['code' (uf '' no)] + ['message' (uf '' so)] + == == +-- diff --git a/pkg/arvo/lib/dice.hoon b/pkg/arvo/lib/dice.hoon new file mode 100644 index 0000000000..b81ac66c51 --- /dev/null +++ b/pkg/arvo/lib/dice.hoon @@ -0,0 +1,73 @@ +:: dice: helper functions for L2 Rollers +:: +/- *dice +/+ naive, *naive-transactions +:: +|% +++ apply-effects + |= [=effects:naive nas=^state:naive own=owners chain-t=@] + ^+ [nas=nas own=own] + %+ roll effects + |= [=diff:naive nas=_nas own=_own] + ^+ [nas own] + ?. ?=([%tx *] diff) [nas own] + =< [nas own] + (apply-raw-tx | raw-tx.diff nas own chain-t) +:: +++ apply-raw-tx + |= [force=? =raw-tx:naive nas=^state:naive own=owners chain-t=@] + ^- [? nas=_nas own=_own] + =+ cache-nas=nas + =/ chain-t=@t (ud-to-ascii:naive chain-t) + ?. (verify-sig-and-nonce:naive verifier chain-t nas raw-tx) + ~& [%verify-sig-and-nonce %failed tx.raw-tx] + [force nas own] + =^ * points.nas + (increment-nonce:naive nas from.tx.raw-tx) + ?~ nex=(receive-tx:naive nas tx.raw-tx) + ~& [%receive-tx %failed] + [force ?:(force nas cache-nas) own] + =* new-nas +.u.nex + =* effects -.u.nex + :+ & + new-nas + (update-ownership effects cache-nas new-nas own) +:: +++ update-ownership + |= $: =effects:naive + cache-nas=^state:naive + nas=^state:naive + =owners + == + ^+ owners + %+ roll effects + |= [=diff:naive owners=_owners] + =, orm:naive + ?. ?=([%point *] diff) owners + =/ old=(unit point:naive) + (get points.cache-nas ship.diff) + =/ new=point:naive + (need (get points.nas ship.diff)) + =* event +>.diff + =; [to=@ux from=@ux] + =? owners !=(from 0x0) + (~(del ju owners) from ship.diff) + ?: =(to 0x0) owners + (~(put ju owners) to ship.diff) + ?+ -.event [0x0 0x0] + %owner + [+.event ?~(old 0x0 address.owner.own.u.old)] + :: + %spawn-proxy + [+.event ?~(old 0x0 address.spawn-proxy.own.u.old)] + :: + %management-proxy + [+.event ?~(old 0x0 address.management-proxy.own.u.old)] + :: + %voting-proxy + [+.event ?~(old 0x0 address.voting-proxy.own.u.old)] + :: + %transfer-proxy + [+.event ?~(old 0x0 address.transfer-proxy.own.u.old)] + == +-- diff --git a/pkg/arvo/lib/dm-hook.hoon b/pkg/arvo/lib/dm-hook.hoon new file mode 100644 index 0000000000..0bb26f22d9 --- /dev/null +++ b/pkg/arvo/lib/dm-hook.hoon @@ -0,0 +1,36 @@ +/- *dm-hook +|% +:: +++ dejs + =, dejs:format + |% + ++ action + |^ + %- of + :~ accept+ship + decline+ship + pendings+ships + screen+bo + == + :: + ++ ship (su ;~(pfix sig fed:ag)) + :: + ++ ships (as ship) + -- + -- +:: +++ enjs + =, enjs:format + |% + :: + ++ action + |= act=^action + %+ frond -.act + ?- -.act + ?(%accept %decline) (ship +.act) + %pendings a+(turn ~(tap in ships.act) ship) + %screen [%b +.act] + == + -- +-- + diff --git a/pkg/arvo/lib/ethereum.hoon b/pkg/arvo/lib/ethereum.hoon index e2ae7a2288..bc85922708 100644 --- a/pkg/arvo/lib/ethereum.hoon +++ b/pkg/arvo/lib/ethereum.hoon @@ -483,6 +483,7 @@ [%eth-get-filter-changes fid=@ud] [%eth-get-transaction-by-hash txh=@ux] [%eth-get-transaction-count adr=address =block] + [%eth-get-balance adr=address] [%eth-get-transaction-receipt txh=@ux] [%eth-send-raw-transaction dat=@ux] == @@ -717,6 +718,9 @@ :~ (tape (address-to-hex adr.req)) (block-to-json block.req) == + :: + %eth-get-balance + ['eth_getBalance' (tape (address-to-hex adr.req)) ~] :: %eth-get-transaction-by-hash ['eth_getTransactionByHash' (tape (transaction-to-hex txh.req)) ~] @@ -796,6 +800,8 @@ :: ++ parse-eth-get-transaction-count parse-hex-result :: + ++ parse-eth-get-balance parse-hex-result + :: ++ parse-event-logs (ar:dejs:format parse-event-log) :: diff --git a/pkg/arvo/lib/ethio.hoon b/pkg/arvo/lib/ethio.hoon index fb919460fa..46926ecd9e 100644 --- a/pkg/arvo/lib/ethio.hoon +++ b/pkg/arvo/lib/ethio.hoon @@ -108,16 +108,25 @@ ++ parse-one-response |= =json ^- (unit response:rpc) - =/ res=(unit [@t ^json]) + ?. &(?=([%o *] json) (~(has by p.json) 'error')) + =/ res=(unit [@t ^json]) + %. json + =, dejs-soft:format + (ot id+so result+some ~) + ?~ res ~ + `[%result u.res] + ~| parse-one-response=json + =/ error=(unit [id=@t ^json code=@ta mssg=@t]) %. json =, dejs-soft:format - (ot id+so result+some ~) - ?^ res `[%result u.res] - ~| parse-one-response=json - :+ ~ %error %- need - %. json - =, dejs-soft:format - (ot id+so error+(ot code+no message+so ~) ~) + :: A 'result' member is present in the error + :: response when using ganache, even though + :: that goes against the JSON-RPC spec + :: + (ot id+so result+some error+(ot code+no message+so ~) ~) + ?~ error ~ + =* err u.error + `[%error id.err code.err mssg.err] -- :: :: +read-contract: calls a read function on a contract, produces result hex @@ -267,4 +276,14 @@ [%eth-get-transaction-count address [%label %latest]] %- pure:m (parse-eth-get-transaction-count:rpc:ethereum json) +:: +++ get-balance + |= [url=@ta =address] + =/ m (strand:strandio ,@ud) + ^- form:m + ;< =json bind:m + %^ request-rpc url `'balance' + [%eth-get-balance address] + %- pure:m + (parse-eth-get-balance:rpc:ethereum json) -- diff --git a/pkg/arvo/lib/graph-store.hoon b/pkg/arvo/lib/graph-store.hoon index 1dd12e82a3..5c64c9350f 100644 --- a/pkg/arvo/lib/graph-store.hoon +++ b/pkg/arvo/lib/graph-store.hoon @@ -1,105 +1,10 @@ /- sur=graph-store, pos=post -/+ res=resource +/+ res=resource, migrate =< [sur .] =< [pos .] =, sur =, pos |% -:: -++ update-log-to-one - |= =update-log:zero - ^- ^update-log - %+ gas:orm-log *^update-log - %+ turn (tap:orm-log:zero update-log) - |= [=time =logged-update:zero] - :- time - :- p.logged-update - (logged-update-to-one q.logged-update) -:: -++ logged-update-to-one - |= upd=logged-update-0:zero - ?+ -.upd upd - %add-graph upd(graph (graph-to-one graph.upd)) - %add-nodes upd(nodes (~(run by nodes.upd) node-to-one)) - == -:: -++ node-to-one - |= =node:zero - (node:(upgrade ,post:zero ,post) node post-to-one) -:: -++ graph-to-one - |= =graph:zero - (graph:(upgrade ,post:zero ,post) graph post-to-one) -:: -++ marked-graph-to-one - |= [=graph:zero m=(unit mark)] - [(graph-to-one graph) m] -:: -++ post-to-one - |= p=post:zero - ^- post - p(contents (contents-to-one contents.p)) -:: -++ contents-to-one - |= cs=(list content:zero) - ^- (list content) - %+ murn cs - |= =content:zero - ^- (unit ^content) - ?: ?=(%reference -.content) ~ - `content -:: -++ upgrade - |* [in-pst=mold out-pst=mold] - => - |% - ++ in-orm - ((ordered-map atom in-node) gth) - +$ in-node - [post=in-pst children=in-internal-graph] - +$ in-graph - ((mop atom in-node) gth) - +$ in-internal-graph - $~ [%empty ~] - $% [%graph p=in-graph] - [%empty ~] - == - :: - ++ out-orm - ((ordered-map atom out-node) gth) - +$ out-node - [post=out-pst children=out-internal-graph] - +$ out-graph - ((mop atom out-node) gth) - +$ out-internal-graph - $~ [%empty ~] - $% [%graph p=out-graph] - [%empty ~] - == - -- - |% - :: - ++ graph - |= $: gra=in-graph - fn=$-(in-pst out-pst) - == - ^- out-graph - %+ gas:out-orm *out-graph - ^- (list [atom out-node]) - %+ turn (tap:in-orm gra) - |= [a=atom n=in-node] - ^- [atom out-node] - [a (node n fn)] - :: - ++ node - |= [nod=in-node fn=$-(in-pst out-pst)] - ^- out-node - :- (fn post.nod) - ^- out-internal-graph - ?: ?=(%empty -.children.nod) - [%empty ~] - [%graph (graph p.children.nod fn)] - -- :: NOTE: move these functions to zuse ++ nu :: parse number as hex |= jon=json @@ -145,18 +50,17 @@ == :: ++ index - |= i=^index + |= ind=^index ^- json - ?: =(~ i) s+'/' - =/ j=^tape "" - |- - ?~ i [%s (crip j)] - =/ k=json (numb i.i) - ?> ?=(%n -.k) - %_ $ - i t.i - j (weld j (weld "/" (trip +.k))) - == + :- %s + ?: =(~ ind) + '/' + %+ roll ind + |= [cur=@ acc=@t] + ^- @t + =/ num (numb cur) + ?> ?=(%n -.num) + (rap 3 acc '/' p.num ~) :: ++ uid |= u=^uid @@ -212,6 +116,14 @@ s+(enjs-path:res grp) -- :: + ++ maybe-post + |= mp=^maybe-post + ^- json + ?- -.mp + %| s+(scot %ux p.mp) + %& (post p.mp) + == + :: ++ post |= p=^post ^- json @@ -252,8 +164,8 @@ [%nodes (nodes nodes.upd)] == :: - %remove-nodes - :- %remove-nodes + %remove-posts + :- %remove-posts %- pairs :~ [%resource (enjs:res resource.upd)] [%indices (indices indices.upd)] @@ -277,14 +189,14 @@ :- %add-tag %- pairs :~ [%term s+term.upd] - [%resource (enjs:res resource.upd)] + [%uid (uid uid.upd)] == :: %remove-tag :- %remove-tag %- pairs :~ [%term s+term.upd] - [%resource (enjs:res resource.upd)] + [%uid (uid uid.upd)] == :: %archive-graph @@ -306,9 +218,9 @@ :- %tag-queries %- pairs %+ turn ~(tap by tag-queries.upd) - |= [=term =resources] + |= [=term uids=(set ^uid)] ^- [cord json] - [term [%a (turn ~(tap in resources) enjs:res)]] + [term [%a (turn ~(tap in uids) uid)]] == :: ++ graph @@ -328,7 +240,7 @@ |= n=^node ^- json %- pairs - :~ [%post (post post.n)] + :~ [%post (maybe-post post.n)] :- %children ?- -.children.n %empty ~ @@ -336,7 +248,6 @@ == == :: - :: ++ nodes |= m=(map ^index ^node) ^- json @@ -370,7 +281,7 @@ ++ decode %- of :~ [%add-nodes add-nodes] - [%remove-nodes remove-nodes] + [%remove-posts remove-posts] [%add-signatures add-signatures] [%remove-signatures remove-signatures] :: @@ -422,7 +333,7 @@ :: ++ node %- ot - :~ [%post post] + :~ [%post maybe-post] [%children internal-graph] == :: @@ -433,6 +344,15 @@ [%empty ~] [%graph (graph jon)] :: + ++ maybe-post + |= jon=json + ^- ^maybe-post + ?~ jon !! + ?+ -.jon !! + %s [%| (nu jon)] + %o [%& (post jon)] + == + :: ++ post %- ot :~ [%author (su ;~(pfix sig fed:ag))] @@ -489,9 +409,8 @@ :~ expression+so output+tang == - :: - ++ remove-nodes + ++ remove-posts %- ot :~ [%resource dejs:res] [%indices (as index)] @@ -527,13 +446,13 @@ ++ add-tag %- ot :~ [%term so] - [%resource dejs:res] + [%uid uid] == :: ++ remove-tag %- ot :~ [%term so] - [%resource dejs:res] + [%uid uid] == :: ++ keys @@ -568,4 +487,391 @@ *signatures == -- +:: +++ upgrade + |% + :: + :: +two + :: + ++ marked-graph-to-two + |= [=graph:one m=(unit mark)] + [(graph-to-two graph) m] + :: + ++ graph-to-two + |= =graph:one + (graph:(upgrade ,post:one ,maybe-post) graph post-to-two) + :: + ++ post-to-two + |= p=post:one + ^- maybe-post + [%& p] + :: + :: + :: +one + :: + ++ update-log-to-one + |= =update-log:zero + ^- update-log:one + %+ gas:orm-log:one *update-log:one + %+ turn (tap:orm-log:zero update-log) + |= [=time =logged-update:zero] + ^- [^time logged-update:one] + :- time + :- p.logged-update + (logged-update-to-one q.logged-update) + :: + ++ logged-update-to-one + |= upd=logged-update-0:zero + ^- logged-action:one + ?+ -.upd upd + %add-graph upd(graph (graph-to-one graph.upd)) + %add-nodes upd(nodes (~(run by nodes.upd) node-to-one)) + == + :: + ++ node-to-one + |= =node:zero + (node:(upgrade ,post:zero ,post) node post-to-one) + :: + ++ graph-to-one + |= =graph:zero + (graph:(upgrade ,post:zero ,post) graph post-to-one) + :: + ++ marked-graph-to-one + |= [=graph:zero m=(unit mark)] + [(graph-to-one graph) m] + :: + ++ post-to-one + |= p=post:zero + ^- post + p(contents (contents-to-one contents.p)) + :: + ++ contents-to-one + |= cs=(list content:zero) + ^- (list content) + %+ murn cs + |= =content:zero + ^- (unit ^content) + ?: ?=(%reference -.content) ~ + `content + :: + ++ upgrade + |* [in-pst=mold out-pst=mold] + => + |% + ++ in-orm + ((ordered-map atom in-node) gth) + +$ in-node + [post=in-pst children=in-internal-graph] + +$ in-graph + ((mop atom in-node) gth) + +$ in-internal-graph + $~ [%empty ~] + $% [%graph p=in-graph] + [%empty ~] + == + :: + ++ out-orm + ((ordered-map atom out-node) gth) + +$ out-node + [post=out-pst children=out-internal-graph] + +$ out-graph + ((mop atom out-node) gth) + +$ out-internal-graph + $~ [%empty ~] + $% [%graph p=out-graph] + [%empty ~] + == + -- + |% + :: + ++ graph + |= $: gra=in-graph + fn=$-(in-pst out-pst) + == + ^- out-graph + %+ gas:out-orm *out-graph + ^- (list [atom out-node]) + %+ turn (tap:in-orm gra) + |= [a=atom n=in-node] + ^- [atom out-node] + [a (node n fn)] + :: + ++ node + |= [nod=in-node fn=$-(in-pst out-pst)] + ^- out-node + :- (fn post.nod) + ^- out-internal-graph + ?: ?=(%empty -.children.nod) + [%empty ~] + [%graph (graph p.children.nod fn)] + -- + :: + ++ zero-load + :: =* infinitely recurses + =, store=zero + =, orm=orm:zero + =, orm-log=orm-log:zero + |% + ++ change-revision-graph + |= [=graph:store q=(unit mark)] + ^- [graph:store (unit mark)] + |^ + :_ q + ?+ q graph + [~ %graph-validator-link] convert-links + [~ %graph-validator-publish] convert-publish + == + :: + ++ convert-links + %+ gas:orm *graph:store + %+ turn (tap:orm graph) + |= [=atom =node:store] + ^- [^atom node:store] + :: top-level + :: + :+ atom post.node + ?: ?=(%empty -.children.node) + [%empty ~] + :- %graph + %+ gas:orm *graph:store + %+ turn (tap:orm p.children.node) + |= [=^atom =node:store] + ^- [^^atom node:store] + :: existing comments get turned into containers for revisions + :: + :^ atom + post.node(contents ~, hash ~) + %graph + %+ gas:orm *graph:store + :_ ~ :- %0 + :_ [%empty ~] + post.node(index (snoc index.post.node atom), hash ~) + :: + ++ convert-publish + %+ gas:orm *graph:store + %+ turn (tap:orm graph) + |= [=atom =node:store] + ^- [^atom node:store] + :: top-level + :: + :+ atom post.node + ?: ?=(%empty -.children.node) + [%empty ~] + :- %graph + %+ gas:orm *graph:store + %+ turn (tap:orm p.children.node) + |= [=^atom =node:store] + ^- [^^atom node:store] + :: existing container for publish note revisions + :: + ?+ atom !! + %1 [atom node] + %2 + :+ atom post.node + ?: ?=(%empty -.children.node) + [%empty ~] + :- %graph + %+ gas:orm *graph:store + %+ turn (tap:orm p.children.node) + |= [=^^atom =node:store] + ^- [^^^atom node:store] + :+ atom post.node(contents ~, hash ~) + :- %graph + %+ gas:orm *graph:store + :_ ~ :- %1 + :_ [%empty ~] + post.node(index (snoc index.post.node atom), hash ~) + == + -- + :: + ++ maybe-unix-to-da + |= =atom + ^- @ + :: (bex 127) is roughly 226AD + ?. (lte atom (bex 127)) + atom + (add ~1970.1.1 (div (mul ~s1 atom) 1.000)) + :: + ++ convert-unix-timestamped-node + |= =node:store + ^- node:store + =. index.post.node + (convert-unix-timestamped-index index.post.node) + ?. ?=(%graph -.children.node) + node + :+ post.node + %graph + (convert-unix-timestamped-graph p.children.node) + :: + ++ convert-unix-timestamped-index + |= =index:store + (turn index maybe-unix-to-da) + :: + ++ convert-unix-timestamped-graph + |= =graph:store + %+ gas:orm *graph:store + %+ turn + (tap:orm graph) + |= [=atom =node:store] + ^- [^atom node:store] + :- (maybe-unix-to-da atom) + (convert-unix-timestamped-node node) + -- + -- +++ import + |= [arc=* our=ship] + ^- (quip card:agent:gall [%5 network]) + |^ + =/ sty [%5 (remake-network ;;(tree-network +.arc))] + :_ sty + %+ turn ~(tap by graphs.sty) + |= [rid=resource =marked-graph] + ^- card:agent:gall + ?: =(our entity.rid) + =/ =cage [%push-hook-action !>([%add rid])] + [%pass / %agent [our %graph-push-hook] %poke cage] + (try-rejoin rid 0) + :: + +$ tree-network + $: graphs=tree-graphs + tag-queries=(tree [term (tree uid)]) + update-logs=tree-update-logs + archive=tree-graphs + ~ + == + +$ tree-graphs (tree [resource tree-marked-graph]) + +$ tree-marked-graph [p=tree-graph q=(unit ^mark)] + +$ tree-graph (tree [atom tree-node]) + +$ tree-node [post=tree-maybe-post children=tree-internal-graph] + +$ tree-internal-graph + $~ [%empty ~] + $% [%graph p=tree-graph] + [%empty ~] + == + +$ tree-update-logs (tree [resource tree-update-log]) + +$ tree-update-log (tree [time tree-logged-update]) + +$ tree-logged-update + $: p=time + $= q + $% [%add-graph =resource =tree-graph mark=(unit ^mark) ow=?] + [%add-nodes =resource nodes=(tree [index tree-node])] + [%remove-posts =resource indices=(tree index)] + [%add-signatures =uid signatures=tree-signatures] + [%remove-signatures =uid signatures=tree-signatures] + == + == + +$ tree-signatures (tree signature) + +$ tree-maybe-post (each tree-post hash) + +$ tree-post + $: author=ship + =index + time-sent=time + contents=(list content) + hash=(unit hash) + signatures=tree-signatures + == + :: + ++ remake-network + |= t=tree-network + ^- network + :* (remake-graphs graphs.t) + (remake-jug:migrate tag-queries.t) + (remake-update-logs update-logs.t) + (remake-graphs archive.t) + ~ + == + :: + ++ remake-graphs + |= t=tree-graphs + ^- graphs + %- remake-map:migrate + (~(run by t) remake-marked-graph) + :: + ++ remake-marked-graph + |= t=tree-marked-graph + ^- marked-graph + [(remake-graph p.t) q.t] + :: + ++ remake-graph + |= t=tree-graph + ^- graph + %+ gas:orm *graph + %+ turn ~(tap by t) + |= [a=atom tn=tree-node] + ^- [atom node] + [a (remake-node tn)] + :: + ++ remake-internal-graph + |= t=tree-internal-graph + ^- internal-graph + ?: ?=(%empty -.t) + [%empty ~] + [%graph (remake-graph p.t)] + :: + ++ remake-node + |= t=tree-node + ^- node + :- (remake-post post.t) + (remake-internal-graph children.t) + :: + ++ remake-update-logs + |= t=tree-update-logs + ^- update-logs + %- remake-map:migrate + (~(run by t) remake-update-log) + :: + ++ remake-update-log + |= t=tree-update-log + ^- update-log + =/ ulm ((ordered-map time logged-update) gth) + %+ gas:ulm *update-log + %+ turn ~(tap by t) + |= [=time tlu=tree-logged-update] + ^- [^time logged-update] + [time (remake-logged-update tlu)] + :: + ++ remake-logged-update + |= t=tree-logged-update + ^- logged-update + :- p.t + ?- -.q.t + %add-graph + :* %add-graph + resource.q.t + (remake-graph tree-graph.q.t) + mark.q.t + ow.q.t + == + :: + %add-nodes + :- %add-nodes + :- resource.q.t + %- remake-map:migrate + (~(run by nodes.q.t) remake-node) + :: + %remove-posts + [%remove-posts resource.q.t (remake-set:migrate indices.q.t)] + :: + %add-signatures + [%add-signatures uid.q.t (remake-set:migrate signatures.q.t)] + :: + %remove-signatures + [%remove-signatures uid.q.t (remake-set:migrate signatures.q.t)] + == + :: + ++ remake-post + |= t=tree-maybe-post + ^- maybe-post + ?- -.t + %| t + %& t(signatures.p (remake-set:migrate signatures.p.t)) + == + :: + ++ try-rejoin + |= [rid=resource nack-count=@] + ^- card:agent:gall + =/ res-path (en-path:res rid) + =/ wire [%try-rejoin (scot %ud nack-count) res-path] + [%pass wire %agent [entity.rid %graph-push-hook] %watch resource+res-path] + -- -- diff --git a/pkg/arvo/lib/graph.hoon b/pkg/arvo/lib/graph.hoon index 8493ad064a..e578eee7b1 100644 --- a/pkg/arvo/lib/graph.hoon +++ b/pkg/arvo/lib/graph.hoon @@ -1,6 +1,14 @@ /- *resource /+ store=graph-store |_ =bowl:gall +++ cg + |% + ++ update + |= =update:store + ^- cage + [%graph-update-2 !>(update)] + -- +:: ++ scry-for |* [=mold =path] .^ mold @@ -19,7 +27,7 @@ %add-graph ~[resource.q.update] %remove-graph ~[resource.q.update] %add-nodes ~[resource.q.update] - %remove-nodes ~[resource.q.update] + %remove-posts ~[resource.q.update] %add-signatures ~[resource.uid.q.update] %remove-signatures ~[resource.uid.q.update] %archive-graph ~[resource.q.update] @@ -76,6 +84,7 @@ ++ get-graph |= res=resource ^- update:store + =- -(p *time) %+ scry-for update:store /graph/(scot %p entity.res)/[name.res] :: diff --git a/pkg/arvo/lib/group.hoon b/pkg/arvo/lib/group.hoon index 436bffdef5..1da653b7ec 100644 --- a/pkg/arvo/lib/group.hoon +++ b/pkg/arvo/lib/group.hoon @@ -34,10 +34,12 @@ :: ++ scry-group |= rid=resource + ^- (unit group) %+ scry-for ,(unit group) `path`groups+(en-path:resource rid) :: ++ scry-groups + ^- (set resource) .^ ,(set resource) %gy (scot %p our.bowl) @@ -48,6 +50,7 @@ :: ++ members |= rid=resource + ^- (set ship) =; =group members.group (fall (scry-group rid) *group) @@ -75,7 +78,12 @@ =/ grp=(unit group) (scry-group rid) ?~ grp ~ - =* group u.grp + (role-for-ship-with-group u.grp rid ship) +:: +++ role-for-ship-with-group + |= [grp=group rid=resource =ship] + ^- (unit (unit role-tag)) + =* group grp =* policy policy.group =* tags tags.group =/ admins=(set ^ship) @@ -96,6 +104,7 @@ :: ++ can-join |= [rid=resource =ship] + ^- ? %+ scry-for ,? ^- path :- %groups @@ -106,11 +115,17 @@ ^- (set ship) =/ grp=(unit group) (scry-group rid) - ?~ grp ~ - (~(get ju tags.u.grp) tag) + ?~ grp ~ + (get-tagged-ships-with-group u.grp rid tag) +:: +++ get-tagged-ships-with-group + |= [grp=group rid=resource =tag] + ^- (set ship) + (~(get ju tags.grp) tag) :: ++ is-managed |= rid=resource + ^- ? =/ group=(unit group) (scry-group rid) ?~ group %.n diff --git a/pkg/arvo/lib/hark/store.hoon b/pkg/arvo/lib/hark/store.hoon index 99b2f38df6..6c71819803 100644 --- a/pkg/arvo/lib/hark/store.hoon +++ b/pkg/arvo/lib/hark/store.hoon @@ -4,6 +4,247 @@ =< [. sur] =, sur |% +++ upgrade + |% + ++ to-three + =* two state-two + =* three state-three + |% + ++ index + |= =index:two + ^- (unit index:three) + `index + ++ contents + |= =contents:two + ^- (unit contents:three) + ?. ?=(%group -.contents) + `contents + =- ?: =(~ -) ~ + `[%group -] + %+ murn list.contents + |= =group-contents:two + ^- (unit group-contents:three) + ?: ?=(?(%add %remove) -.group-contents) + ~ + `group-contents + :: + ++ stats-index + |= =stats-index:two + ^- (unit stats-index:three) + `stats-index + :: + ++ notifications + upg-notifications:upg + :: + ++ upg + %. [index stats-index contents] + %: upgrade + index:two + stats-index:two + contents:two + index:three + stats-index:three + contents:three + == + -- + :: + ++ to-four + =* three state-three + =* four state-four + |% + ++ index + |= =index:three + ^- (unit index:four) + `index + ++ contents + |= =contents:three + ^- (unit contents:four) + ?. ?=(%graph -.contents) + `contents + `[%graph (turn list.contents post-to-one:upgrade:graph-store)] + :: + ++ unreads-each + upg-unreads-each:upg + :: + ++ notifications + upg-notifications:upg + :: + ++ stats-index + |= =stats-index:three + ^- (unit stats-index:four) + `stats-index + :: + ++ upg + %. [index stats-index contents] + %: upgrade + index:three + stats-index:three + contents:three + index:four + stats-index:four + contents:four + == + -- + :: + ++ to-five + =* four state-four + =* five sur + |% + ++ mark + |= module=@t + ^- (unit @t) + ?+ module ~ + %chat `%graph-validator-chat + %publish `%graph-validator-publish + %link `%graph-validator-link + == + ++ index + |= =index:four + ^- (unit index:five) + ?: ?=(%group -.index) + `index + =* i index + `[%graph graph.i (mark module.i) description.i index.i] + :: + ++ contents + |= =contents:four + ^- (unit contents:five) + `contents + :: + ++ unreads-each + upg-unreads-each:upg + :: + ++ stats-index + |= =stats-index:four + ^- (unit stats-index:five) + `stats-index + :: + ++ upg + %. [index stats-index contents] + %: upgrade + index:four + stats-index:four + contents:four + index:five + stats-index:five + contents:five + == + + ++ notifications + upg-notifications:upg + -- + :: + ++ upgrade + |* $: :: input molds + in-index=mold + in-stats-index=mold + in-contents=mold + :: output molds + out-index=mold + out-stats-index=mold + out-contents=mold + == + => . => + |% + :: + ++ in + |% + :: + +$ index in-index + +$ stats-index in-stats-index + +$ contents in-contents + +$ unreads-each (jug stats-index index) + +$ timebox (map index notification) + +$ notification + [date=@da read=? =contents] + ++ orm + ((ordered-map time timebox) gth) + +$ notifications + ((mop time timebox) gth) + -- + ++ out + |% + :: + :: + +$ index out-index + +$ stats-index out-stats-index + +$ contents out-contents + +$ timebox (map out-index notification) + +$ unreads-each (jug stats-index index) + +$ notification + [date=@da read=? contents=out-contents] + +$ notifications + ((mop time timebox) gth) + ++ orm + ((ordered-map time timebox) gth) + -- + -- + |= $: fun-index=$-(index:in (unit index:out)) + fun-stats-index=$-(stats-index:in (unit stats-index:out)) + fun-contents=$-(contents:in (unit contents:out)) + == + |% + :: + ++ upg-unreads-each + |= =unreads-each:in + ^- unreads-each:out + %- ~(gas by *unreads-each:out) + %+ murn ~(tap by unreads-each) + |= [=stats-index:in indices=(set index:in)] + ^- (unit [stats-index:out (set index:out)]) + =/ new-stats + (fun-stats-index stats-index) + ?~ new-stats ~ + =/ new-indices + (upg-indices indices) + ?: =(0 ~(wyt ^in new-indices)) ~ + `[u.new-stats new-indices] + :: + ++ upg-indices + |= indices=(set index:in) + ^- (set index:out) + %- ~(gas ^in *(set index:out)) + (murn ~(tap ^in indices) fun-index) + :: + ++ upg-notifications + |= =notifications:in + ^- notifications:out + %+ gas:orm:out *notifications:out + ^- (list [@da timebox:out]) + %+ murn (tap:orm:in notifications) + |= [time=@da =timebox:in] + ^- (unit [@da =timebox:out]) + =/ new-timebox=timebox:out + (upg-timebox timebox) + ?: =(0 ~(wyt by timebox)) + ~ + `[time new-timebox] + :: + ++ upg-timebox + |= =timebox:in + ^- timebox:out + %- ~(gas by *timebox:out) + %+ murn ~(tap by timebox) + |= [=index:in =notification:in] + ^- (unit [index:out notification:out]) + =/ new-index + (fun-index index) + ?~ new-index ~ + =/ new-notification + (upg-notification notification) + ?~ new-notification ~ + `[u.new-index u.new-notification] + :: + ++ upg-notification + |= n=notification:in + ^- (unit notification:out) + =/ new-contents + (fun-contents contents.n) + ?~ new-contents ~ + `[date.n read.n u.new-contents] + -- + -- + ++ dejs =, dejs:format |% @@ -21,9 +262,8 @@ :: ++ graph-index %- ot - :~ group+dejs-path:resource - graph+dejs-path:resource - module+so + :~ graph+dejs-path:resource + mark+(mu so) description+so index+(su ;~(pfix fas (more fas dem))) == @@ -47,9 +287,9 @@ `@da`(rash p.jon dem:ag) :: ++ notif-ref - ^- $-(json [@da ^index]) + ^- $-(json [(unit @da) ^index]) %- ot - :~ time+sd + :~ time+(mu sd) index+index == ++ graph-store-index @@ -70,8 +310,7 @@ %- of :~ seen+ul archive+notif-ref - unread-note+notif-ref - read-note+notif-ref + read-note+index add-note+add set-dnd+bo read-count+stats-index @@ -100,12 +339,21 @@ %unread-count (unread-count +.upd) %remove-graph s+(enjs-path:resource +.upd) %seen-index (seen-index +.upd) - %unreads (unreads +.upd) + %unreads (unreads +.upd) + %read-note (index +.upd) + %note-read (note-read +.upd) :: - ?(%archive %read-note %unread-note) + %archive (notif-ref +.upd) == :: + ++ note-read + |= [tim=@da idx=^index] + %- pairs + :~ time+s+(scot %ud tim) + index+(index idx) + == + :: ++ stats-index |= s=^stats-index %+ frond -.s @@ -151,23 +399,21 @@ ^- json %- pairs :~ unreads+(unread unreads.s) - notifications+a+(turn ~(tap in notifications.s) notif-ref) last+(time last-seen.s) == ++ added - |= [tim=@da idx=^index not=^notification] + |= [idx=^index not=^notification] ^- json %- pairs - :~ time+s+(scot %ud tim) - index+(index idx) + :~ index+(index idx) notification+(notification not) == :: ++ notif-ref - |= [tim=@da idx=^index] + |= [tim=(unit @da) idx=^index] ^- json %- pairs - :~ time+s+(scot %ud tim) + :~ [%time ?~(tim ~ s+(scot %ud u.tim))] index+(index idx) == ++ seen-index @@ -193,17 +439,15 @@ == :: ++ graph-index - |= $: group=resource - graph=resource - module=@t + |= $: graph=resource + mark=(unit mark) description=@t idx=index:graph-store == ^- json %- pairs - :~ group+s+(enjs-path:resource group) - graph+s+(enjs-path:resource graph) - module+s+module + :~ graph+s+(enjs-path:resource graph) + mark+s+(fall mark '') description+s+description index+(index:enjs:graph-store idx) == @@ -222,7 +466,6 @@ ^- json %- pairs :~ time+(time date) - read+b+read contents+(^contents contents) == :: @@ -259,11 +502,10 @@ == :: ++ timebox - |= [tim=@da arch=? l=(list [^index ^notification])] + |= [tim=(unit @da) l=(list [^index ^notification])] ^- json %- pairs - :~ time+s+(scot %ud tim) - archive+b+arch + :~ time+`json`?~(tim ~ s+(scot %ud u.tim)) :- %notifications ^- json :- %a diff --git a/pkg/arvo/lib/hood/drum.hoon b/pkg/arvo/lib/hood/drum.hoon index d89d81fb01..0023ed45e4 100644 --- a/pkg/arvo/lib/hood/drum.hoon +++ b/pkg/arvo/lib/hood/drum.hoon @@ -108,6 +108,7 @@ %metadata-pull-hook %group-view %settings-store + %dm-hook == :: ++ deft-fish :: default connects @@ -258,6 +259,8 @@ => (se-born | %home %contact-pull-hook) => (se-born | %home %settings-store) (se-born | %home %group-view) + =? ..on-load (lte hood-version %13) + (se-born | %home %dm-hook) ..on-load :: ++ reap-phat :: ack connect diff --git a/pkg/arvo/lib/hood/kiln.hoon b/pkg/arvo/lib/hood/kiln.hoon index 0e7f719eb2..79b07a668a 100644 --- a/pkg/arvo/lib/hood/kiln.hoon +++ b/pkg/arvo/lib/hood/kiln.hoon @@ -55,6 +55,12 @@ cas=case :: gim=?(%auto germ) :: == ++$ kiln-fuse + $@ ~ + $: syd=desk + bas=beak + con=(list [beak germ]) + == -- |= [bowl:gall state] ?> =(src our) @@ -381,6 +387,11 @@ ?~ +< abet abet:abet:(merge:(work syd) ali sud cas gim) :: +++ poke-fuse + |= k=kiln-fuse + ?~ k abet + abet:(emit [%pass /kiln/fuse/[syd.k] %arvo %c [%fuse syd.k bas.k con.k]]) +:: ++ poke-cancel |= a=@tas abet:(emit %pass /cancel %arvo %c [%drop a]) @@ -430,6 +441,7 @@ %kiln-info =;(f (f !<(_+<.f vase)) poke-info) %kiln-label =;(f (f !<(_+<.f vase)) poke-label) %kiln-merge =;(f (f !<(_+<.f vase)) poke-merge) + %kiln-fuse =;(f (f !<(_+<.f vase)) poke-fuse) %kiln-mount =;(f (f !<(_+<.f vase)) poke-mount) %kiln-ota =;(f (f !<(_+<.f vase)) poke:update) %kiln-ota-info =;(f (f !<(_+<.f vase)) poke-ota-info) @@ -489,6 +501,8 @@ ++ take |=(way=wire ?>(?=([@ ~] way) (work i.way))) :: general handler ++ take-mere :: |= [way=wire are=(each (set path) (pair term tang))] + ?. ?=([@ ~] way) + abet abet:abet:(mere:(take way) are) :: ++ take-coup-fancy :: diff --git a/pkg/arvo/lib/json/rpc.hoon b/pkg/arvo/lib/json/rpc.hoon index 2cc0c7ff04..110df6789a 100644 --- a/pkg/arvo/lib/json/rpc.hoon +++ b/pkg/arvo/lib/json/rpc.hoon @@ -17,7 +17,7 @@ |= request ^- json %- pairs:enjs:format - :~ jsonrpc+s+'0.2' + :~ jsonrpc+s+'2.0' id+s+id method+s+method :: @@ -25,7 +25,9 @@ ^- json ?- -.params %list [%a +.params] - %map [%o +.params] + :: FIXME: support either %map or %object (also in /sur/json/rpc) + :: + %map [%o +.params] %object [%o (~(gas by *(map @t json)) +.params)] == == :: @@ -35,14 +37,16 @@ :: TODO: consider all cases :: ?+ -.response ~|([%unsupported-rpc-response response] !!) + %batch a+(turn bas.response response-to-json) + :: %result :- %o %- molt ^- (list [@t json]) :: FIXME: return 'id' as string, number or NULL - :: - :~ ['jsonrpc' s+'2.0'] - ['id' s+id.response] + :: + :~ ['jsonrpc' s+'2.0'] + ['id' s+id.response] ['result' res.response] == :: @@ -50,39 +54,48 @@ :- %o %- molt ^- (list [@t json]) - :~ ['jsonrpc' s+'2.0'] - ['id' ?~(id.response ~ s+id.response)] + :~ ['jsonrpc' s+'2.0'] + ['id' ?~(id.response ~ s+id.response)] ['code' n+code.response] ['message' s+message.response] == == :: ++ validate-request - |= [body=(unit octs) parse-method=$-(@t term)] - ^- (unit request) + |= body=(unit octs) + ^- (unit batch-request) ?~ body ~ ?~ jon=(de-json:html q.u.body) ~ - :: ignores non-object responses - :: - :: ?. ?=([%o *] json) ~|([%format-not-valid json] !!) - ?. ?=([%o *] u.jon) ~ - %- some - %. u.jon - =, dejs:format - :: TODO: If parsing fails, return a proper error (not 500) - :: + =, dejs-soft:format + =; reparser + ?: ?=([%a *] u.jon) + (bind ((ar reparser) u.jon) (lead %a)) + (bind (reparser u.jon) (lead %o)) %- ot :~ :: FIXME: parse 'id' as string, number or NULL :: ['id' so] ['jsonrpc' (su (jest '2.0'))] - ['method' (cu parse-method so)] + ['method' so] :: :- 'params' |= =json - ^- request-params - ?+ -.json !! - %a [%list ((ar same) json)] - %o [%map ((om same) json)] + ^- (unit request-params) + ?+ -.json ~ + %a `[%list ((ar:dejs:format same) json)] + %o `[%map ((om:dejs:format same) json)] == == +:: +++ error + |_ id=@t + :: https://www.jsonrpc.org/specification#error_object + :: + ++ parse [%error id '-32700' 'Failed to parsed'] + ++ request [%error id '-32600' 'Invalid Request'] + ++ method [%error id '-32601' 'Method not found'] + ++ params [%error id '-32602' 'Invalid params'] + ++ internal [%error id '-32603' 'Internal error'] + ++ not-found [%error id '-32000' 'Resource not found'] + ++ todo [%error id '-32001' 'Method not implemented'] + -- -- diff --git a/pkg/arvo/lib/language-server/parser.hoon b/pkg/arvo/lib/language-server/parser.hoon index d4f5002fb6..cf57790926 100644 --- a/pkg/arvo/lib/language-server/parser.hoon +++ b/pkg/arvo/lib/language-server/parser.hoon @@ -21,7 +21,10 @@ (most ;~(plug com gaw) taut-rule) :: %+ rune tis - ;~(plug sym ;~(pfix gap fas (more fas urs:ab))) + ;~(plug sym ;~(pfix gap stap)) + :: + %+ rune sig + ;~((glue gap) sym wyde:vast stap) :: %+ rune cen ;~(plug sym ;~(pfix gap ;~(pfix cen sym))) @@ -37,7 +40,7 @@ ;~ (glue gap) sym ;~(pfix cen sym) - ;~(pfix fas (more fas urs:ab)) + stap == :: %+ stag %tssg diff --git a/pkg/arvo/lib/launch-store.hoon b/pkg/arvo/lib/launch-store.hoon index 36146faa08..b22005a544 100644 --- a/pkg/arvo/lib/launch-store.hoon +++ b/pkg/arvo/lib/launch-store.hoon @@ -71,7 +71,12 @@ [%'linkedUrl' s+linked-url.type] == :: - %custom (frond %custom ~) + %custom + %+ frond %custom + %- pairs + :~ [%'linkedUrl' ?~(linked-url.type ~ s+u.linked-url.type)] + [%'image' ?~(image.type ~ s+u.image.type)] + == == :: ++ terms @@ -105,10 +110,10 @@ [%'isShown' bo] == :: - ++ tile-type + ++ tile-type %- of :~ [%basic basic] - [%custom ul] + [%custom (ot [%'linkedUrl' (mu so)] [%'image' (mu so)] ~)] == :: ++ basic diff --git a/pkg/arvo/lib/metadata-store.hoon b/pkg/arvo/lib/metadata-store.hoon index 23a6878f97..304c988c57 100644 --- a/pkg/arvo/lib/metadata-store.hoon +++ b/pkg/arvo/lib/metadata-store.hoon @@ -23,13 +23,13 @@ %+ turn ~(tap by associations) |= [=md-resource [group=resource =^metadatum]] ^- [cord json] - :- - %- crip - ;: weld - (trip (spat (en-path:resource group))) - (weld "/" (trip app-name.md-resource)) - (trip (spat (en-path:resource resource.md-resource))) - == + :- %: rap 3 + (spat (en-path:resource group)) + '/' + app-name.md-resource + (spat (en-path:resource resource.md-resource)) + ~ + == %- pairs :~ [%group s+(enjs-path:resource group)] [%app-name s+app-name.md-resource] diff --git a/pkg/arvo/lib/metadata.hoon b/pkg/arvo/lib/metadata.hoon index 7b382c5800..a89d131cf8 100644 --- a/pkg/arvo/lib/metadata.hoon +++ b/pkg/arvo/lib/metadata.hoon @@ -53,6 +53,7 @@ :: ++ app-metadata-for-group |= [group=resource =app-name:store] + ^- associations:store =/ =associations:store (metadata-for-group group) %- ~(gas by *associations:store) @@ -62,6 +63,7 @@ :: ++ metadata-for-group |= group=resource + ^- associations:store .^ associations:store %gx (scot %p our.bowl) %metadata-store (scot %da now.bowl) %group (snoc (en-path:resource group) %noun) @@ -69,6 +71,7 @@ :: ++ md-resources-from-group |= group=resource + ^- (set md-resource:store) =- (~(get ju -) group) .^ (jug resource md-resource:store) %gy @@ -80,6 +83,7 @@ :: ++ peek-association |= [app-name=term rid=resource] + ^- (unit association:store) .^ (unit association:store) %gx (scot %p our.bowl) %metadata-store (scot %da now.bowl) %metadata app-name (snoc (en-path:resource rid) %noun) @@ -87,6 +91,7 @@ :: ++ peek-metadatum |= =md-resource:store + ^- (unit metadatum:store) %+ bind (peek-association md-resource) |=(association:store metadatum) :: diff --git a/pkg/arvo/lib/naive-transactions.hoon b/pkg/arvo/lib/naive-transactions.hoon index a2314da6e0..f0c65ac782 100644 --- a/pkg/arvo/lib/naive-transactions.hoon +++ b/pkg/arvo/lib/naive-transactions.hoon @@ -19,24 +19,54 @@ =, secp256k1:secp:crypto %- address-from-pub:key:ethereum %- serialize-point - (ecdsa-raw-recover (keccak-256:keccak:crypto dat) v r s) + (ecdsa-raw-recover (hash-tx dat) v r s) ?- -.result %| ~ %& `p.result == +:: Verify signature and produce signer address +:: +++ verify-sig + |= [sig=@ txdata=octs] + ^- (unit address) + |^ + :: Reversed of the usual r-s-v order because Ethereum integers are + :: big-endian + :: + =^ v sig (take 3) + =^ s sig (take 3 32) + =^ r sig (take 3 32) + :: In Ethereum, v is generally 27 + recid, and verifier expects a + :: recid. Old versions of geth used 0 + recid, so most software + :: now supports either format. See: + :: + :: https://github.com/ethereum/go-ethereum/issues/2053 + :: + =? v (gte v 27) (sub v 27) + (verifier txdata v r s) + :: + ++ take + |= =bite + [(end bite sig) (rsh bite sig)] + -- +:: +++ unsigned-tx + |= [chain-id=@ud =nonce tx=octs] + ^- octs + =/ prepared-data (prepare-for-sig chain-id nonce tx) + =/ len (rsh [3 2] (scot %ui p.prepared-data)) + %: cad:naive 3 + 26^'\19Ethereum Signed Message:\0a' + (met 3 len)^len + prepared-data + ~ + == :: ++ sign-tx |= [pk=@ =nonce tx=octs] ^- octs - =/ prepared-data (prepare-for-sig 1.337 nonce tx) =/ sign-data - =/ len (rsh [3 2] (scot %ui p.prepared-data)) - %- keccak-256:keccak:crypto - %: cad:naive 3 - 26^'\19Ethereum Signed Message:\0a' - (met 3 len)^len - prepared-data - ~ - == + %- hash-tx + (unsigned-tx 1.337 nonce tx) =+ (ecdsa-raw-sign:secp256k1:secp:crypto sign-data pk) (cad:naive 3 1^v 32^s 32^r tx ~) :: @@ -53,6 +83,18 @@ ~ == :: +++ extract-address + |= [=raw-tx:naive nas=^state:naive chain-id=@] + ^- (unit @ux) + ?~ point=(get:orm:naive points.nas ship.from.tx.raw-tx) + ~ + =/ =nonce:naive + =< nonce + (proxy-from-point:naive proxy.from.tx.raw-tx u.point) + =/ message=octs + (unsigned-tx chain-id nonce raw.raw-tx) + (verify-sig sig.raw-tx message) +:: ++ gen-tx |= [=nonce tx=tx:naive pk=@] ^- octs :: takes in a nonce, tx:naive, and private key and returned a signed transactions as octs @@ -161,4 +203,11 @@ :: -- :: +++ hash-tx keccak-256:keccak:crypto +:: +++ hash-raw-tx + |= =raw-tx:naive + ^- @ux + (hash-tx raw.raw-tx) +:: -- diff --git a/pkg/arvo/lib/naive.hoon b/pkg/arvo/lib/naive.hoon index efb0b4d01f..64f185242c 100644 --- a/pkg/arvo/lib/naive.hoon +++ b/pkg/arvo/lib/naive.hoon @@ -139,6 +139,7 @@ +$ nonce @ud +$ dominion ?(%l1 %l2 %spawn) +$ keys [=life suite=@ud auth=@ crypt=@] +++ orm ((on ship point) por) ++ point $: :: domain :: @@ -187,7 +188,7 @@ =operators dns=(list @t) == -+$ points (map ship point) ++$ points (tree [ship point]) +$ operators (jug address address) +$ effects (list diff) +$ proxy ?(%own %spawn %manage %vote %transfer) @@ -455,7 +456,7 @@ ++ get-point |= [=state =ship] ^- (unit point) - =/ existing (~(get by points.state) ship) + =/ existing (get:orm points.state ship) ?^ existing `u.existing =| =point @@ -517,7 +518,7 @@ =/ the-point (get-point state ship) ?> ?=(^ the-point) =* point u.the-point - =- [effects state(points (~(put by points.state) ship new-point))] + =- [effects state(points (put:orm points.state ship new-point))] ^- [=effects new-point=^point] :: ?: =(log-name changed-spawn-proxy:log-names) @@ -690,7 +691,7 @@ == :: :- [%nonce ship proxy nonce]~ - (~(put by points.state) ship u.point) + (put:orm points.state ship u.point) :: :: Receive an individual L2 transaction :: @@ -726,7 +727,7 @@ =/ res=(unit [=effects new-point=^point]) (fun u.point rest) ?~ res ~ - `[effects.u.res state(points (~(put by points.state) ship new-point.u.res))] + `[effects.u.res state(points (put:orm points.state ship new-point.u.res))] :: ++ w-point-esc |* [fun=$-([ship point *] (unit [effects point])) =ship rest=*] @@ -736,7 +737,7 @@ =/ res=(unit [=effects new-point=^point]) (fun u.point rest) ?~ res ~ - `[effects.u.res state(points (~(put by points.state) ship new-point.u.res))] + `[effects.u.res state(points (put:orm points.state ship new-point.u.res))] :: ++ w-point-spawn |* [fun=$-([ship point *] (unit [effects point])) =ship rest=*] @@ -747,7 +748,7 @@ =/ res=(unit [=effects new-point=^point]) (fun u.point rest) ?~ res ~ - `[effects.u.res state(points (~(put by points.state) ship new-point.u.res))] + `[effects.u.res state(points (put:orm points.state ship new-point.u.res))] :: ++ process-transfer-point |= [=point to=address reset=?] @@ -778,7 +779,7 @@ ?: =(0 life.keys.net.point) `rift.net.point :- [%point ship %rift +(rift.net.point)]~ - +(rift.net.point) + +(rift.net.point) =/ effects-4 :~ [%point ship %spawn-proxy *address] [%point ship %management-proxy *address] @@ -811,7 +812,7 @@ :: :: TODO: verify this means the ship exists on neither L1 nor L2 :: - ?: (~(has by points.state) ship) (debug %spawn-exists ~) + ?^ (get:orm points.state ship) (debug %spawn-exists ~) :: Assert one-level-down :: ?. =(+((ship-rank parent)) (ship-rank ship)) (debug %bad-rank ~) @@ -843,7 +844,7 @@ address.owner.own address.owner.own.u.parent-point address.transfer-proxy.own to == - `[effects state(points (~(put by points.state) ship new-point))] + `[effects state(points (put:orm points.state ship new-point))] :: ++ process-configure-keys |= [=point crypt=@ auth=@ suite=@ breach=?] diff --git a/pkg/arvo/lib/pull-hook.hoon b/pkg/arvo/lib/pull-hook.hoon index 59a21e1606..8b94e96f36 100644 --- a/pkg/arvo/lib/pull-hook.hoon +++ b/pkg/arvo/lib/pull-hook.hoon @@ -90,7 +90,12 @@ $: tracking=(map resource track) inner-state=vase == - +:: ++$ base-state-3 + $: prev-version=@ud + prev-min-version=@ud + base-state-2 + == :: +$ state-0 [%0 base-state-0] :: @@ -100,12 +105,23 @@ :: +$ state-3 [%3 base-state-2] :: ++$ state-4 [%4 base-state-3] +:: +$ versioned-state $% state-0 state-1 state-2 state-3 + state-4 == +:: +diplomatic: only renegotiate if versions changed +:: +:: If %.n please leave note as to why renegotiation necessary +:: +:: +++ diplomatic + ^- ? + %.y :: ++ default |* [pull-hook=* =config] @@ -198,7 +214,7 @@ ++ agent |* =config |= =(pull-hook config) - =| state-3 + =| state-4 =* state - ^- agent:gall =< @@ -224,13 +240,21 @@ =| cards=(list card:agent:gall) |^ ?- -.old - %3 + %4 =^ og-cards pull-hook (on-load:og inner-state.old) =. state old + =/ kick=(list card) + ?: ?& =(min-version.config prev-min-version.old) + =(version.config prev-version.old) + diplomatic + == + ~ + (poke-self:pass kick+!>(%kick))^~ :_ this - :(weld cards og-cards (poke-self:pass kick+!>(%kick))^~) + :(weld cards og-cards kick) :: + %3 $(old [%4 0 0 +.old]) %2 $(old (state-to-3 old)) %1 $(old [%2 +.old ~]) %0 !! :: pre-breach @@ -255,8 +279,10 @@ :: ++ on-save ^- vase - =. inner-state - on-save:og + =: inner-state on-save:og + prev-min-version min-version.config + prev-version version.config + == !>(state) :: ++ on-poke @@ -422,6 +448,7 @@ ?~ tan tr-core ?. versioned (tr-ap-og:tr-cleanup |.((on-pull-nack:og rid u.tan))) + %- (slog leaf+"versioned nack for {} in {}" u.tan) =/ pax (kick-mule:virt rid |.((on-pull-kick:og rid))) ?~ pax tr-failed-kick @@ -446,18 +473,18 @@ :: subscription tr-core (tr-suspend-pub-ver min-version.config) - =/ =vase + =/ =^cage (convert-to:ver cage) =/ =wire (make-wire /store) - =+ resources=(~(gas in *(set resource)) (resource-for-update:og vase)) + =+ resources=(~(gas in *(set resource)) (resource-for-update:og q.cage)) ?> ?| no-validate.config ?& (check-src resources) (~(has in resources) rid) == == =/ =mark (append-version:ver version.config) - (tr-emit (~(poke-our pass wire) store-name.config mark vase)) + (tr-emit (~(poke-our pass wire) store-name.config cage)) -- :: ++ tr-kick @@ -472,6 +499,7 @@ :: ++ tr-add |= [s=^ship r=resource] + ?< =(s our.bowl) =: ship s rid r status [%active ~] diff --git a/pkg/arvo/lib/push-hook.hoon b/pkg/arvo/lib/push-hook.hoon index 69d19e6820..fefebaee83 100644 --- a/pkg/arvo/lib/push-hook.hoon +++ b/pkg/arvo/lib/push-hook.hoon @@ -26,6 +26,7 @@ :: /- *push-hook /+ default-agent, resource, verb, versioning, agentio +~% %push-hook-top ..part ~ |% +$ card card:agent:gall :: @@ -57,15 +58,32 @@ inner-state=vase == :: ++$ base-state-1 + $: prev-version=@ud + prev-min-version=@ud + base-state-0 + == +:: +$ state-0 [%0 base-state-0] :: +$ state-1 [%1 base-state-0] ++$ state-2 [%2 base-state-1] :: +$ versioned-state $% state-0 state-1 + state-2 == +:: +diplomatic: only renegotiate if versions changed +:: +:: If %.n please leave note as to why renegotiation necessary +:: +++ diplomatic + ^- ? + %.y +:: ++ push-hook + ~/ %push-hook |* =config $_ ^| |_ bowl:gall @@ -95,7 +113,7 @@ :: ++ transform-proxy-update |~ vase - *(unit vase) + *[(list card) (unit vase)] :: +initial-watch: produce initial state for a subscription :: :: .resource is the resource being subscribed to. @@ -153,10 +171,11 @@ ++ agent |* =config |= =(push-hook config) - =| state-1 + =| state-2 =* state - ^- agent:gall =< + ~% %push-agent-lib ..poke-hook-action ~ |_ =bowl:gall +* this . og ~(. push-hook bowl) @@ -179,16 +198,21 @@ =| cards=(list card:agent:gall) |^ ?- -.old - %1 + %2 =^ og-cards push-hook (on-load:og inner-state.old) =/ old-subs - find-old-subs + (find-old-subs [prev-version prev-min-version]:old) =/ version-cards :- (fact:io version+!>(version.config) /version ~) ?~ old-subs ~ (kick:io old-subs)^~ [:(weld cards og-cards version-cards) this(state old)] + :: + %1 + %_ $ + old [%2 0 0 +.old] + == :: :: %0 @@ -205,6 +229,13 @@ == :: ++ find-old-subs + |= [prev-min-version=@ud prev-version=@ud] + ?: ?& =(min-version.config prev-min-version) + =(prev-version version.config) + diplomatic + == + :: bail on kick if we didn't change versions + ~ %~ tap in %+ roll ~(val by sup.bowl) @@ -230,13 +261,20 @@ -- :: ++ on-save - =. inner-state - on-save:og + =: prev-version version.config + prev-min-version min-version.config + inner-state on-save:og + == !>(state) :: ++ on-poke + ~/ %on-poke |= [=mark =vase] ^- (quip card:agent:gall agent:gall) + ?: =(mark %kick) + ?> (team:title [our src]:bowl) + :_ this + (kick:io (turn ~(val by sup.bowl) tail))^~ ?: =(mark %push-hook-action) ?> (team:title our.bowl src.bowl) =^ cards state @@ -251,6 +289,7 @@ [cards this] :: ++ on-watch + ~/ %on-watch |= =path ^- (quip card:agent:gall agent:gall) ?: ?=([%version ~] path) @@ -265,31 +304,32 @@ unversioned =/ =resource (de-path:resource t.t.path) + =/ requested=@ud + (slav %ud i.t.t.t.t.t.path) =/ =mark - (append-version:ver (slav %ud i.t.t.t.t.t.path)) + (append-version:ver (min requested version.config)) ?. (supported:ver mark) :_ this (fact-init-kick:io version+!>(min-version.config)) - =/ =vase - (convert-to:ver mark (initial-watch:og t.t.t.t.t.t.path resource)) :_ this - [%give %fact ~ mark vase]~ + =- [%give %fact ~ -]~ + (convert-to:ver mark (initial-watch:og t.t.t.t.t.t.path resource)) :: ++ unversioned ?> ?=([%ship @ @ *] t.path) - ?. =(min-version.config 0) - ~& >>> "unversioned req from: {}, nooping" - `this =/ =resource (de-path:resource t.path) - =/ =vase - %+ convert-to:ver update-mark.config + =/ =vase (initial-watch:og t.t.t.t.path resource) :_ this - [%give %fact ~ update-mark.config vase]~ + ?. =(min-version.config 0) + ~& >>> "unversioned req from: {}, nooping" + ~ + [%give %fact ~ (convert-to:ver update-mark.config vase)]~ -- :: ++ on-agent + ~/ %on-agent |= [=wire =sign:agent:gall] ^- (quip card:agent:gall agent:gall) ?. ?=([%helper %push-hook @ *] wire) @@ -343,6 +383,7 @@ [%x %min-version ~] ``version+!>(version.config) == -- + ~% %push-helper-lib ..card ~ |_ =bowl:gall +* og ~(. push-hook bowl) ver ~(. versioning [bowl [update-mark version min-version]:config]) @@ -350,6 +391,7 @@ pass pass:io :: ++ poke-hook-action + ~/ %poke-hook-action |= =action ^- (quip card:agent:gall _state) |^ @@ -418,6 +460,7 @@ [%pass wire %agent [our.bowl store-name.config] %watch store-path.config] :: ++ push-updates + ~/ %push-updates |= =cage ^- (list card:agent:gall) %+ roll (resource-for-update q.cage) @@ -439,11 +482,8 @@ %+ turn ~(tap by paths) |= [fact-ver=@ud paths=(set path)] =/ =mark - (append-version:ver fact-ver) - =/ =^cage - :- mark - (convert-from:ver mark q.cage) - (fact:io cage ~(tap in paths)) + (append-version:ver (min version.config fact-ver)) + (fact:io (convert-from:ver mark q.cage) ~(tap in paths)) :: TODO: deprecate ++ unversioned ?. =(min-version.config 0) ~ @@ -453,52 +493,47 @@ %- ~(gas in *(set path)) (turn (incoming-subscriptions prefix) tail) ?: =(0 ~(wyt in unversioned)) ~ - =/ =^cage - :- update-mark.config - (convert-from:ver update-mark.config q.cage) - (fact:io cage ~(tap in unversioned))^~ + (fact:io (convert-from:ver update-mark.config q.cage) ~(tap in unversioned))^~ -- :: ++ forward-update + ~/ %forward-update |= =cage ^- (list card:agent:gall) =- lis - =/ vas - (convert-to:ver cage) + =/ vas=vase + q:(convert-to:ver cage) %+ roll (resource-for-update q.cage) |= [rid=resource [lis=(list card:agent:gall) tf-vas=(unit vase)]] ^- [(list card:agent:gall) (unit vase)] =/ =path resource+(en-path:resource rid) - =/ =wire (make-wire path) =* ship entity.rid - =. tf-vas + =/ out=(pair (list card:agent:gall) (unit vase)) ?. =(our.bowl ship) :: do not transform before forwarding :: - `vas + ``vas :: use cached transform :: - ?^ tf-vas tf-vas + ?^ tf-vas `tf-vas :: transform before poking store :: (transform-proxy-update:og vas) - ~| "forwarding failed during transform. mark: {} resource: {}" - ?> ?=(^ tf-vas) - =/ =dock - :- ship - ?. =(our.bowl ship) - :: forward to host - :: - dap.bowl - :: poke our store + ~| "forwarding failed during transform. mark: {} rid: {}" + ?> ?=(^ q.out) + :_ q.out + :_ (weld lis p.out) + =/ =wire (make-wire path) + =- [%pass wire %agent - %poke [current-version:ver u.q.out]] + :- ship + ?. =(our.bowl ship) + :: forward to host :: - store-name.config - =/ cag=^cage - :- current-version:ver - u.tf-vas - :_ tf-vas - [[%pass wire %agent dock %poke cag] lis] + dap.bowl + :: poke our store + :: + store-name.config :: ++ ver-from-path |= =path @@ -508,6 +543,7 @@ (slav %ud i.extra) :: ++ resource-for-update + ~/ %resource-for-update |= =vase ^- (list resource) %~ tap in diff --git a/pkg/arvo/lib/server.hoon b/pkg/arvo/lib/server.hoon index 1f450c3e50..431b5db8ac 100644 --- a/pkg/arvo/lib/server.hoon +++ b/pkg/arvo/lib/server.hoon @@ -39,10 +39,10 @@ ~! +:*handler (handler inbound-request) :: - =/ redirect=cord - %- crip - "/~/login?redirect={(trip url.request.inbound-request)}" - [[307 ['location' redirect]~] ~] + =- [[307 ['location' -]~] ~] + %^ cat 3 + '/~/login?redirect=' + url.request.inbound-request :: :: +require-authorization-simple: :: redirect to the login page when unauthenticated @@ -56,10 +56,10 @@ ~! this simple-payload :: - =/ redirect=cord - %- crip - "/~/login?redirect={(trip url.request.inbound-request)}" - [[307 ['location' redirect]~] ~] + =- [[307 ['location' -]~] ~] + %^ cat 3 + '/~/login?redirect=' + url.request.inbound-request :: ++ give-simple-payload |= [eyre-id=@ta =simple-payload:http] @@ -86,36 +86,59 @@ :_ `octs [200 [['content-type' 'text/html'] ?:(cache [max-1-wk ~] ~)]] :: - ++ js-response - |= =octs - ^- simple-payload:http - [[200 [['content-type' 'text/javascript'] max-1-da ~]] `octs] - :: - ++ json-response - |= =json - ^- simple-payload:http - [[200 ['content-type' 'application/json']~] `(json-to-octs json)] - :: ++ css-response + =| cache=? |= =octs ^- simple-payload:http - [[200 [['content-type' 'text/css'] max-1-da ~]] `octs] + :_ `octs + [200 [['content-type' 'text/css'] ?:(cache [max-1-wk ~] ~)]] :: - ++ manx-response - |= man=manx + ++ js-response + =| cache=? + |= =octs ^- simple-payload:http - [[200 ['content-type' 'text/html']~] `(manx-to-octs man)] + :_ `octs + [200 [['content-type' 'text/javascript'] ?:(cache [max-1-wk ~] ~)]] :: ++ png-response + =| cache=? |= =octs ^- simple-payload:http - [[200 [['content-type' 'image/png'] max-1-wk ~]] `octs] + :_ `octs + [200 [['content-type' 'image/png'] ?:(cache [max-1-wk ~] ~)]] + :: + ++ svg-response + =| cache=? + |= =octs + ^- simple-payload:http + :_ `octs + [200 [['content-type' 'image/svg+xml'] ?:(cache [max-1-wk ~] ~)]] + :: + ++ ico-response + |= =octs + ^- simple-payload:http + [[200 [['content-type' 'image/x-icon'] max-1-wk ~]] `octs] :: ++ woff2-response + =| cache=? |= =octs ^- simple-payload:http [[200 [['content-type' 'font/woff2'] max-1-wk ~]] `octs] :: + ++ json-response + =| cache=_| + |= =json + ^- simple-payload:http + :_ `(json-to-octs json) + [200 [['content-type' 'application/json'] ?:(cache [max-1-da ~] ~)]] + :: + ++ manx-response + =| cache=_| + |= man=manx + ^- simple-payload:http + :_ `(manx-to-octs man) + [200 [['content-type' 'text/html'] ?:(cache [max-1-da ~] ~)]] + :: ++ not-found ^- simple-payload:http [[404 ~] ~] @@ -123,10 +146,10 @@ ++ login-redirect |= =request:http ^- simple-payload:http - =/ redirect=cord - %- crip - "/~/login?redirect={(trip url.request)}" - [[307 ['location' redirect]~] ~] + =- [[307 ['location' -]~] ~] + %^ cat 3 + '/~/login?redirect=' + url.request :: ++ redirect |= redirect=cord diff --git a/pkg/arvo/lib/std.hoon b/pkg/arvo/lib/std.hoon index 92915d158a..852868ce64 100644 --- a/pkg/arvo/lib/std.hoon +++ b/pkg/arvo/lib/std.hoon @@ -12,6 +12,7 @@ +$ step _`@u`1 +$ bite $@(bloq [=bloq =step]) +$ octs [p=@ud q=@] ++$ mold $~(* $-(* *)) ++ unit |$ [item] $@(~ [~ u=item]) ++ list |$ [item] $@(~ [i=item t=(list item)]) ++ lest |$ [item] [i=item t=(list item)] @@ -455,6 +456,22 @@ ?. ?=(@ b) & (lth a b) :: +++ por :: parent order + ~/ %por + |= [a=@p b=@p] + ^- ? + ?: =(a b) & + =| i=@ + |- + ?: =(i 2) + :: second two bytes + (lte a b) + :: first two bytes + =+ [c=(end 3 a) d=(end 3 b)] + ?: =(c d) + $(a (rsh 3 a), b (rsh 3 b), i +(i)) + (lth c d) +:: :: Maps :: ++ by @@ -534,6 +551,134 @@ == -- :: +++ on :: ordered map + ~/ %on + |* [key=mold val=mold] + => |% + +$ item [key=key val=val] + -- + :: + ~% %comp +>+ ~ + |= compare=$-([key key] ?) + ~% %core + ~ + |% + :: + ++ apt + ~/ %apt + |= a=(tree item) + =| [l=(unit key) r=(unit key)] + |- ^- ? + ?~ a %.y + ?& ?~(l %.y (compare key.n.a u.l)) + ?~(r %.y (compare u.r key.n.a)) + ?~(l.a %.y &((mor key.n.a key.n.l.a) $(a l.a, l `key.n.a))) + ?~(r.a %.y &((mor key.n.a key.n.r.a) $(a r.a, r `key.n.a))) + == + :: + ++ gas + ~/ %gas + |= [a=(tree item) b=(list item)] + ^- (tree item) + ?~ b a + $(b t.b, a (put a i.b)) + :: + ++ get + ~/ %get + |= [a=(tree item) b=key] + ^- (unit val) + ?~ a ~ + ?: =(b key.n.a) + `val.n.a + ?: (compare b key.n.a) + $(a l.a) + $(a r.a) + :: + ++ has + ~/ %has + |= [a=(tree item) b=key] + ^- ? + !=(~ (get a b)) + :: + ++ lot + ~/ %lot + |= $: tre=(tree item) + start=(unit key) + end=(unit key) + == + ^- (tree item) + |^ + ?: ?&(?=(~ start) ?=(~ end)) + tre + ?~ start + (del-span tre %end end) + ?~ end + (del-span tre %start start) + ?> (compare u.start u.end) + =. tre (del-span tre %start start) + (del-span tre %end end) + :: + ++ del-span + |= [a=(tree item) b=?(%start %end) c=(unit key)] + ^- (tree item) + ?~ a a + ?~ c a + ?- b + %start + ?: =(key.n.a u.c) + (nip a(l ~)) + ?: (compare key.n.a u.c) + $(a (nip a(l ~))) + a(l $(a l.a)) + :: + %end + ?: =(u.c key.n.a) + (nip a(r ~)) + ?: (compare key.n.a u.c) + a(r $(a r.a)) + $(a (nip a(r ~))) + == + -- + :: + ++ nip + ~/ %nip + |= a=(tree item) + ^- (tree item) + ?> ?=(^ a) + |- ^- (tree item) + ?~ l.a r.a + ?~ r.a l.a + ?: (mor key.n.l.a key.n.r.a) + l.a(r $(l.a r.l.a)) + r.a(l $(r.a l.r.a)) + :: + ++ put + ~/ %put + |= [a=(tree item) =key =val] + ^- (tree item) + ?~ a [n=[key val] l=~ r=~] + ?: =(key.n.a key) a(val.n val) + ?: (compare key key.n.a) + =/ l $(a l.a) + ?> ?=(^ l) + ?: (mor key.n.a key.n.l) + a(l l) + l(r a(l r.l)) + =/ r $(a r.a) + ?> ?=(^ r) + ?: (mor key.n.a key.n.r) + a(r r) + r(l a(r l.r)) + :: + ++ tap + ~/ %tap + |= a=(tree item) + ^- (list item) + =| b=(list item) + |- ^+ b + ?~ a b + $(a l.a, b [n.a $(a r.a)]) + -- +:: :: Sets :: ++ in diff --git a/pkg/arvo/lib/strandio.hoon b/pkg/arvo/lib/strandio.hoon index 7ccbfcbca7..d0574fc73c 100644 --- a/pkg/arvo/lib/strandio.hoon +++ b/pkg/arvo/lib/strandio.hoon @@ -490,7 +490,7 @@ =/ m (strand ,vase) ^- form:m ;< =riot:clay bind:m - (warp ship desk ~ %sing %b case /[mak]) + (warp ship desk ~ %sing %e case /[mak]) ?~ riot (strand-fail %build-nave >arg< ~) ?> =(%nave p.r.u.riot) diff --git a/pkg/arvo/lib/vere.hoon b/pkg/arvo/lib/vere.hoon index ee6687cd30..d682b22fa7 100644 --- a/pkg/arvo/lib/vere.hoon +++ b/pkg/arvo/lib/vere.hoon @@ -44,23 +44,10 @@ :: |give:dawn: produce requests for pre-boot validation :: ++ give - =, rpc:ethereum - =, abi:ethereum - =/ tract azimuth:contracts:azimuth |% - :: +bloq:give:dawn: Eth RPC for latest block number - :: - ++ bloq - ^- octs - %- as-octt:mimes:html - %- en-json:html - %+ request-to-json - `~.0 - [%eth-block-number ~] :: +czar:give:dawn: Eth RPC for galaxy table :: ++ czar - |= boq=@ud ^- octs %- as-octt:mimes:html %- en-json:html @@ -68,40 +55,43 @@ %+ turn (gulf 0 255) |= gal=@ %+ request-to-json - `(cat 3 'gal-' (scot %ud gal)) - :+ %eth-call - =- [from=~ to=tract gas=~ price=~ value=~ data=-] - (encode-call 'points(uint32)' [%uint gal]~) - [%number boq] + (cat 3 'gal-' (scot %ud gal)) + :- 'getPoint' + (~(put by *(map @t json)) 'ship' s+(scot %p gal)) :: +point:give:dawn: Eth RPC for ship's contract state :: ++ point - |= [boq=@ud who=ship] + |= who=ship ^- octs %- as-octt:mimes:html %- en-json:html %+ request-to-json - `~.0 - :+ %eth-call - =- [from=~ to=tract gas=~ price=~ value=~ data=-] - (encode-call 'points(uint32)' [%uint `@`who]~) - [%number boq] + ~. + :- 'getPoint' + (~(put by *(map @t json)) 'ship' s+(scot %p who)) :: +turf:give:dawn: Eth RPC for network domains :: ++ turf - |= boq=@ud ^- octs %- as-octt:mimes:html %- en-json:html - :- %a - %+ turn (gulf 0 2) - |= idx=@ %+ request-to-json - `(cat 3 'turf-' (scot %ud idx)) - :+ %eth-call - =- [from=~ to=tract gas=~ price=~ value=~ data=-] - (encode-call 'dnsDomains(uint256)' [%uint idx]~) - [%number boq] + 'turf' + ['getDns' ~] + :: +request-to-json:give:dawn: internally used for request generation + :: + ::NOTE we could import this from /lib/json/rpc, but adding that as a + :: dependency seems a bit unclean + :: + ++ request-to-json + |= [id=@t method=@t params=(map @t json)] + ^- json + %- pairs:enjs:format + :~ jsonrpc+s+'2.0' + id+s+id + method+s+method + params+o+params + == -- :: |take:dawn: parse responses for pre-boot validation :: @@ -111,23 +101,6 @@ =, azimuth =, dejs-soft:format |% - :: +bloq:take:dawn: parse block number - :: - ++ bloq - |= rep=octs - ^- (unit @ud) - =/ jon=(unit json) (de-json:html q.rep) - ?~ jon - ~&([%bloq-take-dawn %invalid-json] ~) - =/ res=(unit cord) ((ot result+so ~) u.jon) - ?~ res - ~&([%bloq-take-dawn %invalid-response rep] ~) - =/ out - %- mule |. - (hex-to-num:ethereum u.res) - ?: ?=(%& -.out) - (some p.out) - ~&([%bloq-take-dawn %invalid-block-number] ~) :: +czar:take:dawn: parse galaxy table :: ++ czar @@ -136,58 +109,94 @@ =/ jon=(unit json) (de-json:html q.rep) ?~ jon ~&([%czar-take-dawn %invalid-json] ~) - =/ res=(unit (list [@t @t])) - ((ar (ot id+so result+so ~)) u.jon) + =/ res=(unit (list [@t @ud @ud @])) + %. u.jon + =, dejs-soft:format + =- (ar (ot id+so result+(ot network+- ~) ~)) + %- ot + :~ :- 'rift' ni + :- 'keys' (ot 'life'^ni ~) + :- 'keys' %+ cu pass-from-eth:azimuth + %- ot + :~ 'crypt'^(cu (lead 32) ni) + 'auth'^(cu (lead 32) ni) + 'suite'^ni + == + == ?~ res - ~&([%czar-take-dawn %invalid-response rep] ~) - =/ dat=(unit (list [who=@p point:azimuth-types])) - =- ?:(?=(%| -.out) ~ (some p.out)) - ^= out %- mule |. - %+ turn u.res - |= [id=@t result=@t] - ^- [who=ship point:azimuth-types] - =/ who `@p`(slav %ud (rsh [3 4] id)) - :- who - %+ point-from-eth - who - :_ *deed:eth-noun - %+ decode-results - result - point:eth-type - ?~ dat - ~&([%bloq-take-dawn %invalid-galaxy-table] ~) + ~&([%czar-take-dawn %invalid-json] ~) :- ~ - %+ roll u.dat - |= $: [who=ship =point:azimuth-types] + %+ roll u.res + |= $: [id=@t deet=[=rift =life =pass]] kyz=(map ship [=rift =life =pass]) == ^+ kyz - ?~ net.point + ?: =(0 life.deet) kyz - (~(put by kyz) who [continuity-number life pass]:u.net.point) + %+ ~(put by kyz) + (slav %ud (rsh [3 4] id)) + deet :: +point:take:dawn: parse ship's contract state :: ++ point |= [who=ship rep=octs] ^- (unit point:azimuth) + ~! *point:azimuth =/ jon=(unit json) (de-json:html q.rep) ?~ jon ~&([%point-take-dawn %invalid-json] ~) - =/ res=(unit cord) ((ot result+so ~) u.jon) - ?~ res - ~&([%point-take-dawn %invalid-response rep] ~) - ~? =(u.res '0x') - :- 'bad result from node; is azimuth address correct?' - azimuth:contracts - =/ out - %- mule |. - %+ point-from-eth - who - :_ *deed:eth-noun ::TODO call rights to fill - (decode-results u.res point:eth-type) - ?: ?=(%& -.out) - (some p.out) - ~&([%point-take-dawn %invalid-point] ~) + =- ?~ res + ~&([%point-take-dawn %incomplete-json] ~) + =, u.res + %- some + :+ own + ?: =(0 life) ~ + `[life pass rift sponsor ~] ::NOTE escape unknown ::TODO could be! + ?. (gth who 0xffff) ~ + `[spawn ~] ::NOTE spawned unknown + ^- $= res + %- unit + $: [spawn=@ own=[@ @ @ @]] + [=rift =life =pass sponsor=[? ship]] + == + %. u.jon + =, dejs-soft:format + =- (ot result+- ~) + %- ot + :~ :- 'ownership' + %- ot + |^ :~ 'spawnProxy'^address + 'owner'^address + 'managementProxy'^address + 'votingProxy'^address + 'transferProxy'^address + == + :: + ++ address + (ot 'address'^(cu hex-to-num:ethereum so) ~) + -- + :: + :- 'network' + %- ot + ::TODO dedupe with +czar + :~ 'rift'^ni + 'keys'^(ot 'life'^ni ~) + :: + :- 'keys' + %+ cu pass-from-eth:azimuth + %- ot + :~ 'crypt'^(cu (lead 32) ni) + 'auth'^(cu (lead 32) ni) + 'suite'^ni + == + :: + ::TODO inconsistent @p string + 'sponsor'^(ot 'has'^bo 'who'^(su fed:ag) ~) + :: + ::TODO escape + ::TODO what if escape or sponsor not present? possible? + == + == :: +turf:take:dawn: parse network domains :: ++ turf @@ -196,94 +205,95 @@ =/ jon=(unit json) (de-json:html q.rep) ?~ jon ~&([%turf-take-dawn %invalid-json] ~) - =/ res=(unit (list [@t @t])) - ((ar (ot id+so result+so ~)) u.jon) + =/ res=(unit (list @t)) + ((ot result+(ar so) ~) u.jon) ?~ res ~&([%turf-take-dawn %invalid-response rep] ~) - =/ dat=(unit (list (pair @ud ^turf))) - =- ?:(?=(%| -.out) ~ (some p.out)) - ^= out %- mule |. - %+ turn u.res - |= [id=@t result=@t] - ^- (pair @ud ^turf) - :- (slav %ud (rsh [3 5] id)) - =/ dom=tape - (decode-results result [%string]~) - =/ hot=host:eyre - (scan dom thos:de-purl:html) - ?>(?=(%& -.hot) p.hot) - ?~ dat - ~&([%turf-take-dawn %invalid-domains] ~) - :- ~ - =* dom u.dat - :: sort by id, ascending, removing duplicates + :: remove duplicates, parse into turfs :: - =| tuf=(map ^turf @ud) - |- ^- (list ^turf) - ?~ dom - %+ turn - %+ sort ~(tap by tuf) - |=([a=(pair ^turf @ud) b=(pair ^turf @ud)] (lth q.a q.b)) - head - =? tuf !(~(has by tuf) q.i.dom) - (~(put by tuf) q.i.dom p.i.dom) - $(dom t.dom) + =- `doz + %+ roll u.res + |= [dom=@t doh=(set @t) doz=(list ^turf)] + ?: (~(has in doh) dom) [doh doz] + :- (~(put in doh) dom) + =/ hot=host:eyre + (rash dom thos:de-purl:html) + ?. ?=(%& -.hot) doz + (snoc doz p.hot) -- :: +veri:dawn: validate keys, life, discontinuity, &c :: ++ veri - |= [=seed:jael =point:azimuth =live] - ^- (unit error=term) - =/ rac (clan:title who.seed) - =/ cub (nol:nu:crub:crypto key.seed) - ?- rac - %pawn - :: a comet address is the fingerprint of the keypair - :: - ?. =(who.seed `@`fig:ex:cub) - `%key-mismatch - :: a comet can never be breached - :: - ?^ live - `%already-booted - :: a comet can never be re-keyed - :: - ?. ?=(%1 lyf.seed) - `%invalid-life - ~ + |= [=ship =feed:jael =point:azimuth =live] + ^- (each seed:jael (lest error=term)) + |^ ?@ -.feed + ?^ err=(test feed) |+[u.err ~] + &+feed + ?> ?=([%1 ~] -.feed) + =| errs=(list term) + |- + ?~ kyz.feed + |+?~(errs [%no-key ~] errs) + =/ =seed:jael [who [lyf key ~]:i.kyz]:feed + ?~ err=(test seed) + &+seed + =. errs (snoc errs u.err) + $(kyz.feed t.kyz.feed) :: - %earl - ~ - :: - * - :: on-chain ships must be launched + ++ test + |= =seed:jael + ^- (unit error=term) + ?. =(ship who.seed) `%not-our-key + =/ rac (clan:title who.seed) + =/ cub (nol:nu:crub:crypto key.seed) + ?- rac + %pawn + :: a comet address is the fingerprint of the keypair + :: + ?. =(who.seed `@`fig:ex:cub) + `%key-mismatch + :: a comet can never be breached + :: + ?^ live + `%already-booted + :: a comet can never be re-keyed + :: + ?. ?=(%1 lyf.seed) + `%invalid-life + ~ :: - ?~ net.point - `%not-keyed - =* net u.net.point - :: boot keys must match the contract + %earl + ~ :: - ?. =(pub:ex:cub pass.net) - ~& [%key-mismatch pub:ex:cub pass.net] - `%key-mismatch - :: life must match the contract - :: - ?. =(lyf.seed life.net) - `%life-mismatch - :: the boot life must be greater than and discontinuous with - :: the last seen life (per the sponsor) - :: - ?: ?& ?=(^ live) - ?| ?=(%| breach.u.live) - (lte life.net life.u.live) - == == - `%already-booted - :: produce the sponsor for vere - :: - ~? !has.sponsor.net - [%no-sponsorship-guarantees-from who.sponsor.net] - ~ - == + * + :: on-chain ships must be launched + :: + ?~ net.point + `%not-keyed + =* net u.net.point + :: boot keys must match the contract + :: + ?. =(pub:ex:cub pass.net) + `%key-mismatch + :: life must match the contract + :: + ?. =(lyf.seed life.net) + `%life-mismatch + :: the boot life must be greater than and discontinuous with + :: the last seen life (per the sponsor) + :: + ?: ?& ?=(^ live) + ?| ?=(%| breach.u.live) + (lte life.net life.u.live) + == == + `%already-booted + :: produce the sponsor for vere + :: + ~? !has.sponsor.net + [%no-sponsorship-guarantees-from who.sponsor.net] + ~ + == + -- :: +sponsor:dawn: retreive sponsor from point :: ++ sponsor diff --git a/pkg/arvo/lib/versioning.hoon b/pkg/arvo/lib/versioning.hoon index 418e215186..bddb10d574 100644 --- a/pkg/arvo/lib/versioning.hoon +++ b/pkg/arvo/lib/versioning.hoon @@ -29,11 +29,12 @@ &((gte ver min) (lte ver version)) :: ++ convert-to - |= =cage - ^- vase - ?: =(p.cage current-version) - q.cage - ((tube-to p.cage) q.cage) + |= [=mark =vase] + ^- cage + :- current-version + ?: =(mark current-version) + vase + ((tube-to mark) vase) :: ++ tube-to |= =mark @@ -44,10 +45,11 @@ .^(tube:clay %cc (scry:io %home /[current-version]/[mark])) :: ++ convert-from - |= =cage - ^- vase - ?: =(p.cage current-version) - q.cage - ((tube-from p.cage) q.cage) + |= [=mark =vase] + ^- cage + :- mark + ?: =(mark current-version) + vase + ((tube-from mark) vase) -- diff --git a/pkg/arvo/mar/btc-provider/action.hoon b/pkg/arvo/mar/btc-provider/action.hoon new file mode 100644 index 0000000000..52a0e1cbea --- /dev/null +++ b/pkg/arvo/mar/btc-provider/action.hoon @@ -0,0 +1,12 @@ +/- *btc-provider +|_ act=action +++ grad %noun +++ grow + |% + ++ noun act + -- +++ grab + |% + ++ noun action + -- +-- diff --git a/pkg/arvo/mar/btc-provider/status.hoon b/pkg/arvo/mar/btc-provider/status.hoon new file mode 100644 index 0000000000..c23fd5e2da --- /dev/null +++ b/pkg/arvo/mar/btc-provider/status.hoon @@ -0,0 +1,14 @@ +/- *btc-provider +/+ bitcoin-json +|_ sta=status +++ grad %noun +++ grow + |% + ++ noun sta + ++ json (status:enjs:bitcoin-json sta) + -- +++ grab + |% + ++ noun status + -- +-- diff --git a/pkg/arvo/mar/btc-provider/update.hoon b/pkg/arvo/mar/btc-provider/update.hoon new file mode 100644 index 0000000000..fae20d82b0 --- /dev/null +++ b/pkg/arvo/mar/btc-provider/update.hoon @@ -0,0 +1,12 @@ +/- *btc-provider +|_ upd=update +++ grad %noun +++ grow + |% + ++ noun upd + -- +++ grab +|% + ++ noun update + -- +-- diff --git a/pkg/arvo/mar/btc-wallet/action.hoon b/pkg/arvo/mar/btc-wallet/action.hoon new file mode 100644 index 0000000000..6d50771ea5 --- /dev/null +++ b/pkg/arvo/mar/btc-wallet/action.hoon @@ -0,0 +1,12 @@ +/- *btc-wallet +|_ act=action +++ grad %noun +++ grow + |% + ++ noun act + -- +++ grab + |% + ++ noun action + -- +-- diff --git a/pkg/arvo/mar/btc-wallet/command.hoon b/pkg/arvo/mar/btc-wallet/command.hoon new file mode 100644 index 0000000000..efee201ca7 --- /dev/null +++ b/pkg/arvo/mar/btc-wallet/command.hoon @@ -0,0 +1,14 @@ +/- *btc-wallet +/+ bitcoin-json +|_ com=command +++ grad %noun +++ grow + |% + ++ noun com + -- +++ grab + |% + ++ noun command + ++ json command:dejs:bitcoin-json + -- +-- diff --git a/pkg/arvo/mar/btc-wallet/internal.hoon b/pkg/arvo/mar/btc-wallet/internal.hoon new file mode 100644 index 0000000000..5096021aff --- /dev/null +++ b/pkg/arvo/mar/btc-wallet/internal.hoon @@ -0,0 +1,12 @@ +/- *btc-wallet +|_ intr=internal +++ grad %noun +++ grow + |% + ++ noun intr + -- +++ grab + |% + ++ noun internal + -- +-- diff --git a/pkg/arvo/mar/btc-wallet/update.hoon b/pkg/arvo/mar/btc-wallet/update.hoon new file mode 100644 index 0000000000..a6245637de --- /dev/null +++ b/pkg/arvo/mar/btc-wallet/update.hoon @@ -0,0 +1,14 @@ +/- *btc-wallet +/+ bitcoin-json +|_ upd=update +++ grad %noun +++ grow + |% + ++ noun upd + ++ json (update:enjs:bitcoin-json upd) + -- +++ grab + |% + ++ noun update + -- +-- diff --git a/pkg/arvo/mar/dm-hook-action.hoon b/pkg/arvo/mar/dm-hook-action.hoon new file mode 100644 index 0000000000..db028c3210 --- /dev/null +++ b/pkg/arvo/mar/dm-hook-action.hoon @@ -0,0 +1,18 @@ +/+ *dm-hook +|_ act=action +++ grad %noun +++ grow + |% + ++ noun act + ++ json + %+ frond:enjs:format %dm-hook-action + (action:enjs act) + -- +:: +++ grab + |% + ++ noun action + ++ json action:dejs + -- +-- + diff --git a/pkg/arvo/mar/graph/cache/hook.hoon b/pkg/arvo/mar/graph/cache/hook.hoon new file mode 100644 index 0000000000..1b9395a0f6 --- /dev/null +++ b/pkg/arvo/mar/graph/cache/hook.hoon @@ -0,0 +1,20 @@ +/- metadata=metadata-store, res=resource +|% ++$ cache-action + $% [%graph-to-mark (pair resource:res (unit mark))] + [%perm-marks (pair (pair mark @tas) tube:clay)] + [%transform-marks (pair mark tube:clay)] + == +-- +:: +|_ act=cache-action +++ grad %noun +++ grow + |% + ++ noun act + -- +++ grab + |% + ++ noun cache-action + -- +-- diff --git a/pkg/arvo/mar/graph/indexed-post.hoon b/pkg/arvo/mar/graph/indexed-post.hoon new file mode 100644 index 0000000000..1013a61aae --- /dev/null +++ b/pkg/arvo/mar/graph/indexed-post.hoon @@ -0,0 +1,14 @@ +/- *post +|_ i=indexed-post +++ grow + |% + ++ noun i + -- +:: +++ grab + |% + ++ noun indexed-post + -- +:: +++ grad %noun +-- diff --git a/pkg/arvo/mar/graph/update-1.hoon b/pkg/arvo/mar/graph/update-1.hoon index e6766edb51..be29d7e8fa 100644 --- a/pkg/arvo/mar/graph/update-1.hoon +++ b/pkg/arvo/mar/graph/update-1.hoon @@ -1,19 +1,17 @@ /+ *graph-store =* as-octs as-octs:mimes:html :: -|_ upd=update +|_ upd=update:one ++ grad %noun ++ grow |% ++ noun upd - ++ json (update:enjs upd) ++ mime [/application/x-urb-graph-update (as-octs (jam upd))] -- :: ++ grab |% - ++ noun update - ++ json update:dejs + ++ noun update:one ++ mime |=([* =octs] ;;(update (cue q.octs))) -- -- diff --git a/pkg/arvo/mar/graph/update-2.hoon b/pkg/arvo/mar/graph/update-2.hoon new file mode 100644 index 0000000000..e6766edb51 --- /dev/null +++ b/pkg/arvo/mar/graph/update-2.hoon @@ -0,0 +1,19 @@ +/+ *graph-store +=* as-octs as-octs:mimes:html +:: +|_ upd=update +++ grad %noun +++ grow + |% + ++ noun upd + ++ json (update:enjs upd) + ++ mime [/application/x-urb-graph-update (as-octs (jam upd))] + -- +:: +++ grab + |% + ++ noun update + ++ json update:dejs + ++ mime |=([* =octs] ;;(update (cue q.octs))) + -- +-- diff --git a/pkg/arvo/mar/graph/validator/chat.hoon b/pkg/arvo/mar/graph/validator/chat.hoon index 53c10c9f0e..63a6a8d3a7 100644 --- a/pkg/arvo/mar/graph/validator/chat.hoon +++ b/pkg/arvo/mar/graph/validator/chat.hoon @@ -4,6 +4,11 @@ |% ++ noun i :: + ++ graph-indexed-post + ^- indexed-post + ?> ?=([@ ~] index.p.i) + i + :: ++ graph-permissions-add |= vip=vip-metadata:met ^- permissions:graph @@ -30,13 +35,10 @@ =- [- post(index -)] [atom ~] -- -++ grab +:: +++ grab |% - ++ noun - |= p=* - =/ ip ;;(indexed-post p) - ?> ?=([@ ~] index.p.ip) - ip + ++ noun indexed-post -- :: ++ grad %noun diff --git a/pkg/arvo/mar/graph/validator/dm.hoon b/pkg/arvo/mar/graph/validator/dm.hoon new file mode 100644 index 0000000000..85fe37e9db --- /dev/null +++ b/pkg/arvo/mar/graph/validator/dm.hoon @@ -0,0 +1,26 @@ +/- *post, met=metadata-store, graph=graph-store, hark=hark-graph-hook +|_ i=indexed-post +++ grow + |% + ++ noun i + :: + ++ graph-indexed-post + ^- indexed-post + ?> ?=(?([@ ~] [@ @ ~]) index.p.i) + ?> (lth i.index.p.i (bex 128)) + i + :: + ++ notification-kind + ^- (unit notif-kind:hark) + ?+ index.p.i ~ + [@ @ ~] `[%message [1 2] %count %none] + == + :: + -- +++ grab + |% + ++ noun indexed-post + -- +:: +++ grad %noun +-- diff --git a/pkg/arvo/mar/graph/validator/link.hoon b/pkg/arvo/mar/graph/validator/link.hoon index d877018648..a59086f1b7 100644 --- a/pkg/arvo/mar/graph/validator/link.hoon +++ b/pkg/arvo/mar/graph/validator/link.hoon @@ -4,6 +4,28 @@ |% ++ noun i :: + ++ graph-indexed-post + ^- indexed-post + ?+ index.p.i ~|(index+index.p.i !!) + :: top-level link post; title and url + :: + [@ ~] + ?> ?=([[%text @] $%([%url @] [%reference *]) ~] contents.p.i) + i + :: + :: comment on link post; container structure + :: + [@ @ ~] + ?> ?=(~ contents.p.i) + i + :: + :: comment on link post; comment text + :: + [@ @ @ ~] + ?> ?=(^ contents.p.i) + i + == + :: ++ graph-permissions-add |= vip=vip-metadata:met ^- permissions:graph @@ -48,28 +70,7 @@ -- ++ grab |% - ++ noun - |= p=* - =/ ip ;;(indexed-post p) - ?+ index.p.ip ~|(index+index.p.ip !!) - :: top-level link post; title and url - :: - [@ ~] - ?> ?=([[%text @] $%([%url @] [%reference *]) ~] contents.p.ip) - ip - :: - :: comment on link post; container structure - :: - [@ @ ~] - ?> ?=(~ contents.p.ip) - ip - :: - :: comment on link post; comment text - :: - [@ @ @ ~] - ?> ?=(^ contents.p.ip) - ip - == + ++ noun indexed-post -- ++ grad %noun -- diff --git a/pkg/arvo/mar/graph/validator/post.hoon b/pkg/arvo/mar/graph/validator/post.hoon index a12e62e721..9de65dc375 100644 --- a/pkg/arvo/mar/graph/validator/post.hoon +++ b/pkg/arvo/mar/graph/validator/post.hoon @@ -3,6 +3,12 @@ ++ grow |% ++ noun i + :: + ++ graph-indexed-post + ^- indexed-post + ?> ?=(^ contents.p.i) + i + :: ++ graph-permissions-add |= vip=vip-metadata:met ^- permissions:graph @@ -40,13 +46,7 @@ -- ++ grab |% - :: +noun: validate post - :: - ++ noun - |= p=* - =/ ip ;;(indexed-post p) - ?> ?=(^ contents.p.ip) - ip + ++ noun indexed-post -- :: ++ grad %noun diff --git a/pkg/arvo/mar/graph/validator/publish.hoon b/pkg/arvo/mar/graph/validator/publish.hoon index c8da4405ca..e5cfd19117 100644 --- a/pkg/arvo/mar/graph/validator/publish.hoon +++ b/pkg/arvo/mar/graph/validator/publish.hoon @@ -3,6 +3,44 @@ ++ grow |% ++ noun i + :: + ++ graph-indexed-post + ^- indexed-post + ?+ index.p.i !! + :: top level post must have no content + [@ ~] + ?> ?=(~ contents.p.i) + i + :: container for revisions + :: + [@ %1 ~] + ?> ?=(~ contents.p.i) + i + :: specific revision + :: first content is the title + :: revisions are numbered by the revision count + :: starting at one + [@ %1 @ ~] + ?> ?=([* * *] contents.p.i) + ?> ?=(%text -.i.contents.p.i) + i + :: container for comments + :: + [@ %2 ~] + ?> ?=(~ contents.p.i) + i + :: container for comment revisions + :: + [@ %2 @ ~] + ?> ?=(~ contents.p.i) + i + :: specific comment revision + :: + [@ %2 @ @ ~] + ?> ?=(^ contents.p.i) + i + == + :: ++ graph-permissions-add |= vip=vip-metadata:met ^- permissions:graph @@ -55,45 +93,7 @@ -- ++ grab |% - :: +noun: validate publish note - :: - ++ noun - |= p=* - =/ ip ;;(indexed-post p) - ?+ index.p.ip !! - :: top level post must have no content - [@ ~] - ?> ?=(~ contents.p.ip) - ip - :: container for revisions - :: - [@ %1 ~] - ?> ?=(~ contents.p.ip) - ip - :: specific revision - :: first content is the title - :: revisions are numbered by the revision count - :: starting at one - [@ %1 @ ~] - ?> ?=([* * *] contents.p.ip) - ?> ?=(%text -.i.contents.p.ip) - ip - :: container for comments - :: - [@ %2 ~] - ?> ?=(~ contents.p.ip) - ip - :: container for comment revisions - :: - [@ %2 @ ~] - ?> ?=(~ contents.p.ip) - ip - :: specific comment revision - :: - [@ %2 @ @ ~] - ?> ?=(^ contents.p.ip) - ip - == + ++ noun indexed-post -- :: ++ grad %noun diff --git a/pkg/arvo/mar/ico.hoon b/pkg/arvo/mar/ico.hoon new file mode 100644 index 0000000000..e862b9b9a9 --- /dev/null +++ b/pkg/arvo/mar/ico.hoon @@ -0,0 +1,12 @@ +|_ dat=@ +++ grow + |% + ++ mime [/image/x-icon (as-octs:mimes:html dat)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + ++ noun @ + -- +++ grad %mime +-- diff --git a/pkg/arvo/mar/lens/command.hoon b/pkg/arvo/mar/lens/command.hoon index 1e70b360db..84bab9cdb5 100644 --- a/pkg/arvo/mar/lens/command.hoon +++ b/pkg/arvo/mar/lens/command.hoon @@ -46,6 +46,7 @@ import-all+(ot base64-jam+so ~) as+(ot mark+(su sym) next+source ~) hoon+(ot code+so next+source ~) + cancel+none == ++ none |=(^^json (some ~)) ++ sink diff --git a/pkg/arvo/mar/svg.hoon b/pkg/arvo/mar/svg.hoon new file mode 100644 index 0000000000..2911e4900c --- /dev/null +++ b/pkg/arvo/mar/svg.hoon @@ -0,0 +1,12 @@ +|_ dat=@ +++ grow + |% + ++ mime [/image/'svg+xml' (as-octs:mimes:html dat)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + ++ noun @ + -- +++ grad %mime +-- diff --git a/pkg/arvo/sur/bitcoin.hoon b/pkg/arvo/sur/bitcoin.hoon new file mode 100644 index 0000000000..06aee81785 --- /dev/null +++ b/pkg/arvo/sur/bitcoin.hoon @@ -0,0 +1,84 @@ +:: sur/btc.hoon +:: Utilities for working with BTC data types and transactions +:: +:: chyg: whether account is (non-)change. 0 or 1 +:: bytc: "btc-byts" with dat cast to @ux +|% ++$ network ?(%main %testnet) ++$ hexb [wid=@ dat=@ux] :: hex byts ++$ bits [wid=@ dat=@ub] ++$ xpub @ta ++$ address + $% [%base58 @uc] + [%bech32 cord] + == ++$ fprint hexb ++$ bipt $?(%44 %49 %84) ++$ chyg $?(%0 %1) ++$ idx @ud ++$ hdkey [=fprint pubkey=hexb =network =bipt =chyg =idx] ++$ sats @ud ++$ vbytes @ud ++$ txid hexb ++$ utxo [pos=@ =txid height=@ value=sats recvd=(unit @da)] +++ address-info + $: =address + confirmed-value=sats + unconfirmed-value=sats + utxos=(set utxo) + == +++ tx + |% + +$ data + $: is=(list input) + os=(list output) + locktime=@ud + nversion=@ud + segwit=(unit @ud) + == + +$ val + $: =txid + pos=@ud + =address + value=sats + == + :: included: whether tx is in the mempool or blockchain + :: + +$ info + $: included=? + =txid + confs=@ud + recvd=(unit @da) + inputs=(list val) + outputs=(list val) + == + +$ input + $: =txid + pos=@ud + sequence=hexb + script-sig=(unit hexb) + pubkey=(unit hexb) + value=sats + == + +$ output + $: script-pubkey=hexb + value=sats + == + -- +++ psbt + |% + +$ base64 cord + +$ in [=utxo rawtx=hexb =hdkey] + +$ out [=address hk=(unit hdkey)] + +$ target $?(%input %output) + +$ keyval [key=hexb val=hexb] + +$ map (list keyval) + -- +++ ops + |% + ++ op-dup 118 + ++ op-equalverify 136 + ++ op-hash160 169 + ++ op-checksig 172 + -- +-- diff --git a/pkg/arvo/sur/btc-provider.hoon b/pkg/arvo/sur/btc-provider.hoon new file mode 100644 index 0000000000..65c59be46f --- /dev/null +++ b/pkg/arvo/sur/btc-provider.hoon @@ -0,0 +1,78 @@ +/- *bitcoin, resource +|% ++$ host-info + $: api-url=@t + connected=? + =network + block=@ud + clients=(set ship) + == ++$ whitelist + $: public=? + kids=? + users=(set ship) + groups=(set resource:resource) + == +:: ++$ whitelist-target + $% [%public ~] + [%kids ~] + [%users users=(set ship)] + [%groups groups=(set resource:resource)] + == ++$ command + $% [%set-credentials api-url=@t =network] + [%add-whitelist wt=whitelist-target] + [%remove-whitelist wt=whitelist-target] + == ++$ action + $% [%address-info =address] + [%tx-info txid=hexb] + [%raw-tx txid=hexb] + [%broadcast-tx rawtx=hexb] + [%ping ~] + == +:: ++$ result + $% [%address-info =address utxos=(set utxo) used=? block=@ud] + [%tx-info =info:tx] + [%raw-tx txid=hexb rawtx=hexb] + [%broadcast-tx txid=hexb broadcast=? included=?] + == ++$ error + $% [%not-connected status=@ud] + [%bad-request status=@ud] + [%no-auth status=@ud] + [%rpc-error ~] + == ++$ update (each result error) ++$ status + $% [%connected =network block=@ud fee=(unit sats)] + [%new-block =network block=@ud fee=(unit sats) blockhash=hexb blockfilter=hexb] + [%disconnected ~] + == +:: +++ rpc-types + |% + +$ action + $% [%get-address-info =address] + [%get-tx-vals txid=hexb] + [%get-raw-tx txid=hexb] + [%broadcast-tx rawtx=hexb] + [%get-block-count ~] + [%get-block-info ~] + == + :: + +$ result + $% [%get-address-info =address utxos=(set utxo) used=? block=@ud] + [%get-tx-vals =info:tx] + [%get-raw-tx txid=hexb rawtx=hexb] + [%create-raw-tx rawtx=hexb] + [%broadcast-tx txid=hexb broadcast=? included=?] + [%get-block-count block=@ud] + [%get-block-info block=@ud fee=(unit sats) blockhash=hexb blockfilter=hexb] + + == + -- +-- +:: diff --git a/pkg/arvo/sur/btc-wallet.hoon b/pkg/arvo/sur/btc-wallet.hoon new file mode 100644 index 0000000000..85d30a2bac --- /dev/null +++ b/pkg/arvo/sur/btc-wallet.hoon @@ -0,0 +1,167 @@ +/- *bitcoin, bp=btc-provider +/+ bip32 +|% ++$ params [batch-size=@ud fam-limit=@ud piym-limit=@ud] ++$ provider [host=ship connected=?] ++$ block @ud ++$ btc-state [=block fee=(unit sats) t=@da] ++$ payment [pend=(unit txid) =xpub =address payer=ship value=sats note=(unit @t)] ++$ piym + $: ps=(map ship payment) + pend=(map txid payment) + num-fam=(map ship @ud) + == ++$ poym [txbu=(unit txbu) note=(unit @t)] +:: +:: command: run from the CLI or as API calls by our ship +:: ++$ command + $% [%set-provider provider=(unit ship)] + [%check-provider provider=ship] + [%check-payee payee=ship] + [%set-current-wallet =xpub] + [%add-wallet =xpub =fprint scan-to=(unit scon) max-gap=(unit @ud) confs=(unit @ud)] + [%delete-wallet =xpub] + [%init-payment-external =address value=sats feyb=sats note=(unit @t)] + [%init-payment payee=ship value=sats feyb=sats note=(unit @t)] + [%broadcast-tx txhex=cord] + [%gen-new-address ~] + == +:: action: how peers poke us +:: ++$ action + $% [%gen-pay-address value=sats note=(unit @t)] + [%give-pay-address =address value=sats] + [%expect-payment =txid value=sats] + == +:: internal: actions that simply make the state machine more explicit +:: ++$ internal + $% [%add-poym-raw-txi =txid rawtx=hexb] + [%close-pym ti=info:tx] + [%fail-broadcast-tx =txid] + [%succeed-broadcast-tx =txid] + == +:: +:: Wallet Types +:: +:: nixt: next indices to generate addresses from (non-change/change) +:: addi: HD path along with UTXOs +:: wach: map for watched addresses. +:: Membership implies the address is known by outside parties or had prior activity +:: scon: indices to initially scan to in (non-)change accounts +:: defaults to 2^32-1 (i.e. all the addresses, ~4B) +:: wilt: copulates with thousands of indices to form addresses +:: +++ max-index (dec (pow 2 32)) ++$ nixt (pair idx idx) ++$ addi [used=? =chyg =idx utxos=(set utxo)] ++$ wach (map address addi) ++$ scon $~([max-index max-index] (pair idx idx)) ++$ wilt _bip32 ++$ wamp [prv=@ pub=[x=@ y=@] cad=@ dep=@ud ind=@ud pif=@] +:: +:: walt: wallet datastructure +:: scanned: whether the wallet's addresses have been checked for prior activity +:: scan-to +:: max-gap: maximum number of consec blank addresses before wallet stops scanning +:: confs: confirmations required (after this is hit for an address, wallet stops refreshing it) +:: ++$ walt-0 + $: =xpub + =network + =fprint + =wilt + =bipt + =wach + =nixt + scanned=? + scan-to=scon + max-gap=@ud + confs=@ud + == +:: ++$ walt + $: =xpub + =network + =fprint + =wamp + =bipt + =wach + =nixt + scanned=? + scan-to=scon + max-gap=@ud + confs=@ud + == +:: batch: indexes to scan for a given chyg +:: scans: all scans underway (batches) +:: ++$ batch [todo=(set idx) endpoint=idx has-used=?] ++$ scans (map [xpub chyg] batch) +:: +:: insel: a selected utxo for input to a transaction +:: pmet: optional payment metadata +:: feyb: fee per byte in sats +:: txi/txo: input/output for a transaction being built +:: - txo has an hdkey if it's a change account +:: - by convention, first output of txo is to the payee, if one is present +:: txbu: tx builder -- all information needed to make a transaction for signing +:: ++$ insel [=utxo =chyg =idx] ++$ feyb sats ++$ txi [=utxo rawtx=(unit hexb) =hdkey] ++$ txo [=address value=sats hk=(unit hdkey)] ++$ txbu + $: =xpub + payee=(unit ship) + =vbytes + txis=(list txi) + txos=(list txo) + signed-tx=(unit hexb) + == +:: hest: an entry in the history log +:: ++$ hest + $: =xpub + =txid + confs=@ud + recvd=(unit @da) + inputs=(list [=val:tx s=(unit ship)]) + outputs=(list [=val:tx s=(unit ship)]) + note=(unit @t) + == ++$ history (map txid hest) +:: ++$ error + $? %cant-pay-ourselves + %no-comets + %no-dust + %tx-being-signed + %insufficient-balance + %broadcast-fail + == +:: data to send to the frontend +:: ++$ update + $% $: %initial + provider=(unit provider) + wallet=(unit xpub) + balance=(unit [confirmed=sats unconfirmed=sats]) + =history + =btc-state + address=(unit address) + == + [%broadcast-success ~] + [%change-provider provider=(unit provider)] + [%change-wallet wallet=(unit xpub) balance=(unit [p=sats q=sats]) =history] + [%psbt pb=@t fee=sats] + [%btc-state =btc-state] + [%new-tx =hest] + [%cancel-tx =txid] + [%new-address =address] + [%balance balance=(unit [confirmed=sats unconfirmed=sats])] + [%error =error] + == +:: +-- diff --git a/pkg/arvo/sur/dice.hoon b/pkg/arvo/sur/dice.hoon new file mode 100644 index 0000000000..82df7ef8c2 --- /dev/null +++ b/pkg/arvo/sur/dice.hoon @@ -0,0 +1,67 @@ +:: dice: structures for L2 Rollers +:: +/+ naive, ethereum +:: +|% ++$ owners (jug address:naive ship) +:: ++$ roller-config + $: next-batch=time + frequency=@dr + refresh-time=@dr + contract=@ux + chain-id=@ + == +:: ++$ keccak @ux +:: ++$ status + ?(%unknown %pending %sending %confirmed %failed) +:: ++$ tx-status + $: =status + pointer=(unit l1-tx-pointer) + == +:: ++$ l1-tx-pointer + $: =address:ethereum + nonce=@ud + == +:: ++$ l2-tx + $? %transfer-point + %spawn + %configure-keys + %escape + %cancel-escape + %adopt + %reject + %detach + %set-management-proxy + %set-spawn-proxy + %set-transfer-proxy + == +:: +:: TODO: add submission time? +:: ++$ roller-tx [=ship =status hash=keccak type=l2-tx] +:: ++$ pend-tx [force=? =address:naive =raw-tx:naive] +:: ++$ part-tx + $% [%raw raw=octs] + [%don =tx:naive] + [%ful raw=octs =tx:naive] ::TODO redundant? + == +:: ++$ rpc-send-roll + $: endpoint=@t + contract=address:ethereum + chain-id=@ + pk=@ + :: + nonce=@ud + next-gas-price=@ud + txs=(list raw-tx:naive) + == +-- diff --git a/pkg/arvo/sur/dm-hook.hoon b/pkg/arvo/sur/dm-hook.hoon new file mode 100644 index 0000000000..227566a27b --- /dev/null +++ b/pkg/arvo/sur/dm-hook.hoon @@ -0,0 +1,25 @@ +|% +++ action + =< action + |% + :: + ++ action + $% accept + decline + pendings + screen + == + :: + +$ accept + [%accept =ship] + :: + +$ decline + [%decline =ship] + :: + +$ pendings + [%pendings ships=(set ship)] + :: + +$ screen + [%screen screen=?] + -- +-- diff --git a/pkg/arvo/sur/glob.hoon b/pkg/arvo/sur/glob.hoon index 4c2950310e..7d2503785a 100644 --- a/pkg/arvo/sur/glob.hoon +++ b/pkg/arvo/sur/glob.hoon @@ -1,3 +1,5 @@ |% -+$ glob (map path mime) ++$ glob (map path mime) ++$ glob-details [hash=@uv glob=(unit (each glob tid=@ta))] ++$ globs (map serve-path=path glob-details) -- diff --git a/pkg/arvo/sur/graph-store.hoon b/pkg/arvo/sur/graph-store.hoon index 51f86a0a9a..2217038f0b 100644 --- a/pkg/arvo/sur/graph-store.hoon +++ b/pkg/arvo/sur/graph-store.hoon @@ -1,5 +1,61 @@ /- *post |% ++$ graph ((mop atom node) gth) ++$ marked-graph [p=graph q=(unit mark)] +:: ++$ maybe-post (each post hash) ++$ node [post=maybe-post children=internal-graph] ++$ graphs (map resource marked-graph) +:: ++$ tag-queries (jug term uid) +:: ++$ update-log ((mop time logged-update) gth) ++$ update-logs (map resource update-log) +:: ++$ internal-graph + $~ [%empty ~] + $% [%graph p=graph] + [%empty ~] + == +:: ++$ network + $: =graphs + =tag-queries + =update-logs + archive=graphs + ~ + == +:: ++$ update [p=time q=action] +:: ++$ logged-update [p=time q=logged-action] + +:: ++$ logged-action + $% [%add-graph =resource =graph mark=(unit mark) overwrite=?] + [%add-nodes =resource nodes=(map index node)] + [%remove-posts =resource indices=(set index)] + [%add-signatures =uid =signatures] + [%remove-signatures =uid =signatures] + == +:: ++$ action + $% logged-action + [%remove-graph =resource] + :: + [%add-tag =term =uid] + [%remove-tag =term =uid] + :: + [%archive-graph =resource] + [%unarchive-graph =resource] + [%run-updates =resource =update-log] + :: + :: NOTE: cannot be sent as pokes + :: + [%keys =resources] + [%tags tags=(set term)] + [%tag-queries =tag-queries] + == :: +$ permissions [admin=permission-level writer=permission-level reader=permission-level] @@ -13,11 +69,75 @@ +$ permission-level ?(%no %self %yes) :: +:: %graph-store types version 1 +:: +++ one + |% + ++ orm ((ordered-map atom node) gth) + ++ orm-log ((ordered-map time logged-update) gth) + :: + +$ graph ((mop atom node) gth) + +$ marked-graph [p=graph q=(unit mark)] + :: + +$ node [=post children=internal-graph] + +$ graphs (map resource marked-graph) + :: + +$ tag-queries (jug term resource) + :: + +$ update-log ((mop time logged-update) gth) + +$ update-logs (map resource update-log) + :: + +$ internal-graph + $~ [%empty ~] + $% [%graph p=graph] + [%empty ~] + == + :: + +$ network + $: =graphs + =tag-queries + =update-logs + archive=graphs + validators=(set mark) + == + :: + +$ update [p=time q=action] + :: + +$ logged-update [p=time q=logged-action] + :: + +$ logged-action + $% [%add-graph =resource =graph mark=(unit mark) overwrite=?] + [%add-nodes =resource nodes=(map index node)] + [%remove-nodes =resource indices=(set index)] + [%add-signatures =uid =signatures] + [%remove-signatures =uid =signatures] + == + :: + +$ action + $% logged-action + [%remove-graph =resource] + :: + [%add-tag =term =resource] + [%remove-tag =term =resource] + :: + [%archive-graph =resource] + [%unarchive-graph =resource] + [%run-updates =resource =update-log] + :: + :: NOTE: cannot be sent as pokes + :: + [%keys =resources] + [%tags tags=(set term)] + [%tag-queries =tag-queries] + == + -- +:: +:: %graph-store types version 0 +:: ++ zero =< [. post-zero] =, post-zero |% - :: ++ orm ((ordered-map atom node) gth) ++ orm-log ((ordered-map time logged-update) gth) :: @@ -81,61 +201,4 @@ [%tag-queries =tag-queries] == -- - -+$ graph ((mop atom node) gth) -+$ marked-graph [p=graph q=(unit mark)] -:: -+$ node [=post children=internal-graph] -+$ graphs (map resource marked-graph) -:: -+$ tag-queries (jug term resource) -:: -+$ update-log ((mop time logged-update) gth) -+$ update-logs (map resource update-log) -:: -:: -+$ internal-graph - $~ [%empty ~] - $% [%graph p=graph] - [%empty ~] - == -:: -+$ network - $: =graphs - =tag-queries - =update-logs - archive=graphs - validators=(set mark) - == -:: -+$ update [p=time q=action] -:: -+$ logged-update [p=time q=logged-action] - -:: -+$ logged-action - $% [%add-graph =resource =graph mark=(unit mark) overwrite=?] - [%add-nodes =resource nodes=(map index node)] - [%remove-nodes =resource indices=(set index)] - [%add-signatures =uid =signatures] - [%remove-signatures =uid =signatures] - == -:: -+$ action - $% logged-action - [%remove-graph =resource] - :: - [%add-tag =term =resource] - [%remove-tag =term =resource] - :: - [%archive-graph =resource] - [%unarchive-graph =resource] - [%run-updates =resource =update-log] - :: - :: NOTE: cannot be sent as pokes - :: - [%keys =resources] - [%tags tags=(set term)] - [%tag-queries =tag-queries] - == -- diff --git a/pkg/arvo/sur/hark-store.hoon b/pkg/arvo/sur/hark-store.hoon index 82a966f4e7..682d069dbb 100644 --- a/pkg/arvo/sur/hark-store.hoon +++ b/pkg/arvo/sur/hark-store.hoon @@ -1,6 +1,83 @@ /- chat-store, graph-store, post, *resource, group-store, metadata-store ^? |% ++$ index + $% $: %graph + graph=resource + mark=(unit mark) + description=@t + =index:graph-store + == + [%group group=resource description=@t] + == +:: ++$ group-contents + $~ [%add-members *resource ~] + $>(?(%add-members %remove-members) update:group-store) +:: ++$ notification + [date=@da read=? =contents] +:: ++$ contents + $% [%graph =(list post:post)] + [%group =(list group-contents)] + == +:: ++$ timebox + (map index notification) +:: ++$ notifications + ((mop @da timebox) gth) +:: ++$ action + $% [%add-note =index =notification] + :: if .time is ~, then archiving unread notification + :: else, archiving read notification + [%archive time=(unit @da) =index] + :: + [%unread-count =stats-index =time] + [%read-count =stats-index] + :: + [%unread-each =stats-index ref=index:graph-store time=@da] + [%read-each =stats-index ref=index:graph-store] + :: + [%read-note =index] + :: + [%seen-index time=@da =stats-index] + [%remove-graph =resource] + :: + [%read-all ~] + [%set-dnd dnd=?] + [%seen ~] + == +:: +++ stats-index + $% [%graph graph=resource =index:graph-store] + [%group group=resource] + == +:: ++$ indexed-notification + [index notification] +:: ++$ stats + [=unreads last-seen=@da] +:: ++$ unreads + $% [%count num=@ud] + [%each indices=(set index:graph-store)] + == +:: ++$ update + $% action + [%more more=(list update)] + [%added =index =notification] + [%note-read =time =index] + [%timebox time=(unit @da) =(list [index notification])] + [%count count=@ud] + [%clear =stats-index] + [%unreads unreads=(list [stats-index stats])] + == +:: historical ++ state-zero |% +$ state @@ -20,7 +97,7 @@ (map index notification) :: +$ index - $% [%graph group=resource graph=resource module=@t description=@t] + $% [%graph graph=resource module=@t description=@t] [%group group=resource description=@t] [%chat chat=path mention=?] == @@ -68,6 +145,17 @@ dnd=_| == :: + +$ index + $% $: %graph + group=resource + graph=resource + module=@t + description=@t + =index:graph-store + == + [%group group=resource description=@t] + == + :: ++ orm ((ordered-map @da timebox) gth) :: @@ -106,6 +194,17 @@ ++ orm ((ordered-map @da timebox) gth) :: + +$ index + $% $: %graph + group=resource + graph=resource + module=@t + description=@t + =index:graph-store + == + [%group group=resource description=@t] + == + :: +$ notification [date=@da read=? =contents] :: @@ -122,80 +221,97 @@ :: -- :: -+$ index - $% $: %graph - group=resource - graph=resource - module=@t - description=@t - =index:graph-store - == - [%group group=resource description=@t] - == -:: -+$ group-contents - $~ [%add-members *resource ~] - $>(?(%add-members %remove-members) update:group-store) -:: -+$ notification - [date=@da read=? =contents] -:: -+$ contents - $% [%graph =(list post:post)] - [%group =(list group-contents)] - == -:: -+$ timebox - (map index notification) -:: -+$ notifications - ((mop @da timebox) gth) -:: -+$ action - $% [%add-note =index =notification] - [%archive time=@da index] - :: - [%unread-count =stats-index =time] - [%read-count =stats-index] - :: - :: - [%unread-each =stats-index ref=index:graph-store time=@da] - [%read-each =stats-index ref=index:graph-store] - :: - [%read-note time=@da index] - [%unread-note time=@da index] - :: - [%seen-index time=@da =stats-index] - [%remove-graph =resource] - :: - [%read-all ~] - [%set-dnd dnd=?] - [%seen ~] - == -:: -++ stats-index - $% [%graph graph=resource =index:graph-store] - [%group group=resource] - == -:: -+$ indexed-notification - [index notification] -:: -+$ stats - [notifications=(set [time index]) =unreads last-seen=@da] -:: -+$ unreads - $% [%count num=@ud] - [%each indices=(set index:graph-store)] - == -:: -+$ update - $% action - [%more more=(list update)] - [%added time=@da =index =notification] - [%timebox time=@da archived=? =(list [index notification])] - [%count count=@ud] - [%clear =stats-index] - [%unreads unreads=(list [stats-index stats])] - == +++ state-four + =< base-state + |% + ++ orm + ((ordered-map @da timebox) gth) + :: + +$ base-state + $: unreads-each=(jug stats-index index:graph-store) + unreads-count=(map stats-index @ud) + last-seen=(map stats-index @da) + =notifications + archive=notifications + current-timebox=@da + dnd=_| + == + :: + +$ index + $% $: %graph + group=resource + graph=resource + module=@t + description=@t + =index:graph-store + == + [%group group=resource description=@t] + == + :: + +$ group-contents + $~ [%add-members *resource ~] + $>(?(%add-members %remove-members) update:group-store) + :: + +$ notification + [date=@da read=? =contents] + :: + +$ contents + $% [%graph =(list post:post)] + [%group =(list group-contents)] + == + :: + +$ timebox + (map index notification) + :: + +$ notifications + ((mop @da timebox) gth) + :: + +$ action + $% [%add-note =index =notification] + [%archive time=@da index] + :: + [%unread-count =stats-index =time] + [%read-count =stats-index] + :: + :: + [%unread-each =stats-index ref=index:graph-store time=@da] + [%read-each =stats-index ref=index:graph-store] + :: + [%read-note time=@da index] + [%unread-note time=@da index] + :: + [%seen-index time=@da =stats-index] + [%remove-graph =resource] + :: + [%read-all ~] + [%set-dnd dnd=?] + [%seen ~] + == + :: + ++ stats-index + $% [%graph graph=resource =index:graph-store] + [%group group=resource] + == + :: + +$ indexed-notification + [index notification] + :: + +$ stats + [notifications=(set [time index]) =unreads last-seen=@da] + :: + +$ unreads + $% [%count num=@ud] + [%each indices=(set index:graph-store)] + == + :: + +$ update + $% action + [%more more=(list update)] + [%added time=@da =index =notification] + [%timebox time=@da archived=? =(list [index notification])] + [%count count=@ud] + [%clear =stats-index] + [%unreads unreads=(list [stats-index stats])] + == + -- -- diff --git a/pkg/arvo/sur/json/rpc.hoon b/pkg/arvo/sur/json/rpc.hoon index 63f5a06f10..1c99b0f0ac 100644 --- a/pkg/arvo/sur/json/rpc.hoon +++ b/pkg/arvo/sur/json/rpc.hoon @@ -1,6 +1,11 @@ :: json-rpc: protocol types :: |% ++$ batch-request + $% [%a p=(list request)] + [%o p=request] + == +:: +$ request $: id=@t jsonrpc=@t diff --git a/pkg/arvo/sur/launch-store.hoon b/pkg/arvo/sur/launch-store.hoon index 8417ab2782..e46c379d55 100644 --- a/pkg/arvo/sur/launch-store.hoon +++ b/pkg/arvo/sur/launch-store.hoon @@ -1,4 +1,14 @@ |% ++$ tiles-0 (map term tile-0) ++$ tile-0 + $: type=tile-type-0 + is-shown=? + == ++$ tile-type-0 + $% [%basic title=cord icon-url=cord linked-url=cord] + [%custom ~] + == +:: +$ tiles (map term tile) +$ tile-ordering (list term) :: @@ -9,7 +19,7 @@ :: +$ tile-type $% [%basic title=cord icon-url=cord linked-url=cord] - [%custom ~] + [%custom linked-url=(unit cord) image=(unit cord)] == :: +$ action diff --git a/pkg/arvo/sur/lens.hoon b/pkg/arvo/sur/lens.hoon index e5f4bae4d4..6a574512a1 100644 --- a/pkg/arvo/sur/lens.hoon +++ b/pkg/arvo/sur/lens.hoon @@ -19,6 +19,7 @@ [%import app=@t base64-jam=@t] [%export-all ~] [%import-all base64-jam=@t] + [%cancel ~] == ++ sink $% [%stdout ~] diff --git a/pkg/arvo/sur/post.hoon b/pkg/arvo/sur/post.hoon index 01b05cdedd..6f4b33c167 100644 --- a/pkg/arvo/sur/post.hoon +++ b/pkg/arvo/sur/post.hoon @@ -1,27 +1,5 @@ /- *resource |% -:: -++ post-zero - |% - :: - +$ content - $% [%text text=cord] - [%mention =ship] - [%url url=cord] - [%code expression=cord output=(list tank)] - [%reference =uid] - == - :: - +$ post - $: author=ship - =index - time-sent=time - contents=(list content) - hash=(unit hash) - =signatures - == - -- - +$ index (list atom) +$ uid [=resource =index] :: @@ -60,4 +38,25 @@ [%code expression=cord output=(list tank)] [%reference =reference] == +:: +++ post-zero + |% + :: + +$ content + $% [%text text=cord] + [%mention =ship] + [%url url=cord] + [%code expression=cord output=(list tank)] + [%reference =uid] + == + :: + +$ post + $: author=ship + =index + time-sent=time + contents=(list content) + hash=(unit hash) + =signatures + == + -- -- diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index 834cbcf390..d84d3a35cf 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -5452,12 +5452,14 @@ :::: 4k: atom printing :: ++ co + !: ~% %co ..co ~ =< |_ lot=coin ++ rear |=(rom=tape rend(rep rom)) - ++ rent `@ta`(rap 3 rend) + ++ rent ~+ `@ta`(rap 3 rend) ++ rend ^- tape + ~+ ?: ?=(%blob -.lot) ['~' '0' ((v-co 1) (jam p.lot))] ?: ?=(%many -.lot) @@ -5602,18 +5604,17 @@ |= a=dn ?: ?=([%i *] a) (weld ?:(s.a "inf" "-inf") rep) ?: ?=([%n *] a) (weld "nan" rep) - =/ f=(pair tape @) - %. a.a - %+ ed-co(rep ~) [10 1] - |=([a=? b=@ c=tape] [~(d ne b) ?.(a c ['.' c])]) - =. e.a (sum:si e.a (sun:si (dec q.f))) - =/ res - %+ weld p.f - ?~ e.a - rep - %+ weld ?:((syn:si e.a) "e" "e-") - ((d-co 1) (abs:si e.a)) - ?:(s.a res ['-' res]) + =; rep ?:(s.a rep ['-' rep]) + =/ f ((d-co 1) a.a) + =^ e e.a + =/ e=@s (sun:si (lent f)) + =/ sci :(sum:si e.a e -1) + ?: (syn:si (dif:si e.a --3)) [--1 sci] :: 12000 -> 12e3 e>+2 + ?: !(syn:si (dif:si sci -2)) [--1 sci] :: 0.001 -> 1e-3 e<-2 + [(sum:si sci --1) --0] :: 1.234e2 -> '.'@3 -> 123 .4 + =? rep !=(--0 e.a) + :(weld ?:((syn:si e.a) "e" "e-") ((d-co 1) (abs:si e.a))) + (weld (ed-co e f) rep) :: ++ s-co |= esc=(list @) ^- tape @@ -5659,20 +5660,13 @@ :: - used only for @r* floats :: ++ ed-co - |= [[bas=@ min=@] par=$-([? @ tape] tape)] - =| [fir=? cou=@ud] - |= hol=@ - ^- [tape @] - ?: &(=(0 hol) =(0 min)) - [rep cou] - =/ [dar=@ rad=@] (dvr hol bas) - %= $ - min ?:(=(0 min) 0 (dec min)) - hol dar - rep (par &(=(0 dar) !fir) rad rep) - fir | - cou +(cou) - == + |= [exp=@s int=tape] ^- tape + =/ [pos=? dig=@u] [=(--1 (cmp:si exp --0)) (abs:si exp)] + ?. pos + (into (weld (reap +(dig) '0') int) 1 '.') + =/ len (lent int) + ?: (lth dig len) (into int dig '.') + (weld int (reap (sub dig len) '0')) :: :: +ox-co: format '.'-separated digit sequences in numeric base :: @@ -5965,9 +5959,8 @@ :: ++ spat |=(pax=path (crip (spud pax))) :: render path to cord ++ spud |=(pax=path ~(ram re (smyt pax))) :: render path to tape -++ stab :: parse cord to path - =+ fel=;~(pfix fas (more fas urs:ab)) - |=(zep=@t `path`(rash zep fel)) +++ stab |=(zep=@t `path`(rash zep stap)) :: parse cord to path +++ stap ;~(pfix fas (more fas urs:ab)) :: path parser :: :::: 4n: virtualization :: @@ -6627,7 +6620,7 @@ +$ seminoun :: partial noun; blocked subtrees are ~ :: - $~ [[%full ~] ~] + $~ [[%full / ~ ~] ~] [mask=stencil data=noun] :: :: +stencil: noun knowledge map diff --git a/pkg/arvo/sys/lull.hoon b/pkg/arvo/sys/lull.hoon index c10dc016d8..5d1c9b6f5e 100644 --- a/pkg/arvo/sys/lull.hoon +++ b/pkg/arvo/sys/lull.hoon @@ -762,6 +762,11 @@ her=@p dem=desk cas=case :: source how=germ :: method == :: + $: %fuse :: merge many + des=desk :: target desk + bas=beak :: base desk + con=(list [beak germ]) :: merges + == [%mont pot=term bem=beam] :: mount to unix [%dirk des=desk] :: mark mount dirty [%ogre pot=$@(desk beam)] :: delete mount point @@ -928,6 +933,7 @@ :: /- sur-file :: surface imports from /sur :: /+ lib-file :: library imports from /lib :: /= face /path :: imports built hoon file at path + :: /~ face type /path :: imports built hoon files from directory :: /% face %mark :: imports mark definition from /mar :: /$ face %from %to :: imports mark converter from /mar :: /* face %mark /path :: unbuilt file imports, as mark @@ -936,6 +942,7 @@ $: sur=(list taut) lib=(list taut) raw=(list [face=term =path]) + raz=(list [face=term =spec =path]) maz=(list [face=term =mark]) caz=(list [face=term =mars]) bar=(list [face=term =mark =path]) @@ -955,7 +962,6 @@ $_ ^? |% - ++ bunt *typ ++ diff |~([old=typ new=typ] *dif) ++ form *mark ++ join |~([a=dif b=dif] *(unit (unit dif))) @@ -970,7 +976,6 @@ +$ dais $_ ^| |_ sam=vase - ++ bunt sam ++ diff |~(new=_sam *vase) ++ form *mark ++ join |~([a=vase b=vase] *(unit (unit vase))) @@ -1865,7 +1870,12 @@ [%public-keys =public-keys-result] :: ethereum changes [%turf turf=(list turf)] :: domains == :: - :: +seed: private boot parameters + :: +feed: potential boot parameters + :: + +$ feed + $^ [[%1 ~] who=ship kyz=(list [lyf=life key=ring])] + seed + :: +seed: individual boot parameters :: +$ seed [who=ship lyf=life key=ring sig=(unit oath:pki)] :: diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index bd267477e4..fb09a2ebea 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -1944,11 +1944,11 @@ =/ =bone bone.shut-packet :: ?: ?=(%& -.meat.shut-packet) - =+ ?~ dud ~ + =+ ?. &(?=(^ dud) msg.veb) ~ %. ~ - %+ slog - leaf+"ames: {} fragment crashed {}" - ?.(msg.veb ~ tang.u.dud) + %- slog + :_ tang.u.dud + leaf+"ames: {} fragment crashed {}" (run-message-sink bone %hear lane shut-packet ?=(~ dud)) :: Just try again on error, printing trace :: @@ -1967,20 +1967,12 @@ ++ on-memo |= [=bone payload=* valence=?(%plea %boon)] ^+ peer-core - :: if we haven't been trying to talk to %live, reset timer - :: - =? last-contact.qos.peer-state - ?& ?=(%live -.qos.peer-state) - %- ~(all by snd.peer-state) - |= =message-pump-state - =(~ live.packet-pump-state.message-pump-state) - == - now - :: =/ =message-blob (dedup-message (jim payload)) =. peer-core (run-message-pump bone %memo message-blob) :: - ?: &(=(%boon valence) ?=(?(%dead %unborn) -.qos.peer-state)) + ?: ?& =(%boon valence) + (gte now (add ~s30 last-contact.qos.peer-state)) + == check-clog peer-core :: +dedup-message: replace with any existing copy of this message @@ -2535,7 +2527,7 @@ ++ assert ^+ message-pump =/ top-live - (peek:packet-queue:*make-packet-pump live.packet-pump-state.state) + (pry:packet-queue:*make-packet-pump live.packet-pump-state.state) ?. |(?=(~ top-live) (lte current.state message-num.key.u.top-live)) ~| [%strange-current current=current.state key.u.top-live] !! @@ -2603,7 +2595,7 @@ =| acc=(unit static-fragment) ^+ [static-fragment=acc live=live.state] :: - %^ (traverse:packet-queue _acc) live.state acc + %^ (dip:packet-queue _acc) live.state acc |= $: acc=_acc key=live-packet-key val=live-packet-val @@ -2681,7 +2673,7 @@ =/ acc resends=*(list static-fragment) :: - %^ (traverse:packet-queue _acc) live.state acc + %^ (dip:packet-queue _acc) live.state acc |= $: acc=_acc key=live-packet-key val=live-packet-val @@ -2734,7 +2726,7 @@ :: ^+ [acc live=live.state] :: - %^ (traverse:packet-queue _acc) live.state acc + %^ (dip:packet-queue _acc) live.state acc |= $: acc=_acc key=live-packet-key val=live-packet-val @@ -2781,7 +2773,7 @@ :: ^+ [metrics=metrics.state live=live.state] :: - %^ (traverse:packet-queue pump-metrics) live.state acc=metrics.state + %^ (dip:packet-queue pump-metrics) live.state acc=metrics.state |= $: metrics=pump-metrics key=live-packet-key val=live-packet-val @@ -2804,10 +2796,10 @@ :: ++ set-wake ^+ packet-pump - :: if nonempty .live, peek at head to get next wake time + :: if nonempty .live, pry at head to get next wake time :: =/ new-wake=(unit @da) - ?~ head=(peek:packet-queue live.state) + ?~ head=(pry:packet-queue live.state) ~ `(next-expiry:gauge u.head) :: no-op if no change diff --git a/pkg/arvo/sys/vane/behn.hoon b/pkg/arvo/sys/vane/behn.hoon index 3933c22e62..afff958eae 100644 --- a/pkg/arvo/sys/vane/behn.hoon +++ b/pkg/arvo/sys/vane/behn.hoon @@ -186,7 +186,7 @@ =* timers timers.state :: if no timers, cancel existing wakeup timer or no-op :: - =/ first=(unit [date=@da *]) (peek:timer-map timers.state) + =/ first=(unit [date=@da *]) (pry:timer-map timers.state) ?~ first ?~ next-wake event-core @@ -351,7 +351,7 @@ [%timers %next ~] :^ ~ ~ %noun !> ^- (unit @da) - (bind (peek:timer-map timers) head) + (bind (pry:timer-map timers) head) :: [%timers @ ~] ?~ til=(slaw %da i.t.tyl) diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index af2f653037..993ac2703a 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -59,6 +59,12 @@ :: +$ cult (jug wove duct) :: +:: State for ongoing %fuse merges. `con` maintains the ordering, +:: `sto` stores the data needed to merge, and `bas` is the base +:: beak for the merge. +:: ++$ melt [bas=beak con=(list [beak germ]) sto=(map beak (unit dome:clay))] +:: :: Domestic desk state. :: :: Includes subscriber list, dome (desk content), possible commit state (for @@ -69,6 +75,7 @@ dom=dome :: desk state per=regs :: read perms per path pew=regs :: write perms per path + fiz=melt :: state for mega merges == :: :: Desk state. @@ -118,11 +125,11 @@ :: Ford cache :: +$ ford-cache - $: files=(map path [res=vase dez=(set path)]) - naves=(map mark [res=vase dez=(set path)]) - marks=(map mark [res=dais dez=(set path)]) - casts=(map mars [res=vase dez=(set path)]) - tubes=(map mars [res=tube dez=(set path)]) + $: files=(map path [res=vase dez=(set [dir=? =path])]) + naves=(map mark [res=vase dez=(set [dir=? =path])]) + marks=(map mark [res=dais dez=(set [dir=? =path])]) + casts=(map mars [res=vase dez=(set [dir=? =path])]) + tubes=(map mars [res=tube dez=(set [dir=? =path])]) == :: $reef-cache: built system files :: @@ -212,6 +219,7 @@ dom=dome :: revision state per=regs :: read perms per path pew=regs :: write perms per path + fiz=melt :: domestic mega merges == :: :: :: Foreign request manager. @@ -303,6 +311,7 @@ $: %c :: to %clay $> $? %info :: internal edit %merg :: merge desks + %fuse :: merge many %pork :: %warp :: %werp :: @@ -428,18 +437,23 @@ :: ++ an |_ nak=ankh + :: +dug: produce ankh at path + :: + ++ dug + |= =path + ^- (unit ankh) + ?~ path `nak + ?~ kid=(~(get by dir.nak) i.path) + ~ + $(nak u.kid, path t.path) :: +get: produce file at path :: ++ get |= =path ^- (unit cage) - ?~ path - ?~ fil.nak - ~ - `q.u.fil.nak - ?~ kid=(~(get by dir.nak) i.path) - ~ - $(nak u.kid, path t.path) + ?~ nik=(dug path) ~ + ?~ fil.u.nik ~ + `q.u.fil.u.nik -- ++ with-face |=([face=@tas =vase] vase(p [%face face p.vase])) ++ with-faces @@ -472,7 +486,7 @@ +$ state $: baked=(map path cage) cache=ford-cache - stack=(list (set path)) + stack=(list (set [dir=? =path])) cycle=(set build) == +$ args @@ -493,8 +507,8 @@ :: +pop-stack: pop build stack, copying deps downward :: ++ pop-stack - ^- [(set path) _stack.nub] - =^ top=(set path) stack.nub stack.nub + ^- [(set [dir=? =path]) _stack.nub] + =^ top=(set [dir=? =path]) stack.nub stack.nub =? stack.nub ?=(^ stack.nub) stack.nub(i (~(uni in i.stack.nub) top)) [top stack.nub] @@ -559,7 +573,6 @@ =/ dif diff:deg ^- (nave typ dif) |% - ++ bunt +<.cor ++ diff |= [old=typ new=typ] ^- dif @@ -581,7 +594,6 @@ =/ dif _*diff:grad:cor ^- (nave:clay typ dif) |% - ++ bunt +<.cor ++ diff |=([old=typ new=typ] (diff:~(grad cor old) new)) ++ form form:grad:cor ++ join @@ -622,7 +634,6 @@ :_ nub ^- dais |_ sam=vase - ++ bunt (slap nav limb/%bunt) ++ diff |= new=vase (slam (slap nav limb/%diff) (slop sam new)) @@ -649,7 +660,7 @@ |= diff=vase (slam (slap nav limb/%pact) (slop sam diff)) ++ vale - |= =noun + |: noun=q:(slap nav !,(*hoon *vale)) (slam (slap nav limb/%vale) noun/noun) -- :: +build-cast: produce gate to convert mark .a to, statically typed @@ -805,9 +816,11 @@ =^ res=vase nub (run-pile pile) res :: - ++ build-file - |= =path + ++ build-dependency + |= dep=(each [dir=path fil=path] path) ^- [vase state] + =/ =path + ?:(?=(%| -.dep) p.dep fil.p.dep) ~| %error-building^path ?^ got=(~(get by files.cache.nub) path) =? stack.nub ?=(^ stack.nub) @@ -816,7 +829,9 @@ ?: (~(has in cycle.nub) file+path) ~|(cycle+file+path^stack.nub !!) =. cycle.nub (~(put in cycle.nub) file+path) - =. stack.nub [(sy path ~) stack.nub] + =. stack.nub + =- [(sy - ~) stack.nub] + ?:(?=(%| -.dep) dep [& dir.p.dep]) =^ cag=cage nub (read-file path) ?> =(%hoon p.cag) =/ tex=tape (trip !<(@t q.cag)) @@ -826,11 +841,42 @@ =. files.cache.nub (~(put by files.cache.nub) path [res top]) [res nub] :: + ++ build-file + |= =path + (build-dependency |+path) + :: +build-directory: builds files in top level of a directory + :: + :: this excludes files directly at /path/hoon, + :: instead only including files in the unix-style directory at /path, + :: such as /path/file/hoon, but not /path/more/file/hoon. + :: + ++ build-directory + |= =path + ^- [(map @ta vase) state] + =/ fiz=(list @ta) + =/ nuk=(unit _ankh) (~(dug an ankh) path) + ?~ nuk ~ + %+ murn + ~(tap by dir.u.nuk) + |= [nom=@ta nak=_ankh] + ?. ?=([~ [~ *] *] (~(get by dir.nak) %hoon)) ~ + `nom + :: + =| rez=(map @ta vase) + |- + ?~ fiz + [rez nub] + =* nom=@ta i.fiz + =/ pax=^path (weld path nom %hoon ~) + =^ res nub (build-dependency &+[path pax]) + $(fiz t.fiz, rez (~(put by rez) nom res)) + :: ++ run-pile |= =pile =^ sut=vase nub (run-tauts bud %sur sur.pile) =^ sut=vase nub (run-tauts sut %lib lib.pile) =^ sut=vase nub (run-raw sut raw.pile) + =^ sut=vase nub (run-raz sut raz.pile) =^ sut=vase nub (run-maz sut maz.pile) =^ sut=vase nub (run-caz sut caz.pile) =^ sut=vase nub (run-bar sut bar.pile) @@ -869,7 +915,10 @@ (most ;~(plug com gaw) taut-rule) :: %+ rune tis - ;~(plug sym ;~(pfix gap fas (more fas urs:ab))) + ;~(plug sym ;~(pfix gap stap)) + :: + %+ rune sig + ;~((glue gap) sym wyde:vast stap) :: %+ rune cen ;~(plug sym ;~(pfix gap ;~(pfix cen sym))) @@ -885,7 +934,7 @@ ;~ (glue gap) sym ;~(pfix cen sym) - ;~(pfix fas (more fas urs:ab)) + ;~(pfix stap) == :: %+ stag %tssg @@ -931,6 +980,30 @@ =. p.pin [%face face.i.raw p.pin] $(sut (slop pin sut), raw t.raw) :: + ++ run-raz + |= [sut=vase raz=(list [face=term =spec =path])] + ^- [vase state] + ?~ raz [sut nub] + =^ res=(map @ta vase) nub + (build-directory path.i.raz) + =; pin=vase + =. p.pin [%face face.i.raz p.pin] + $(sut (slop pin sut), raz t.raz) + :: + =/ =type (~(play ut p.sut) [%kttr spec.i.raz]) + :: ensure results nest in the specified type, + :: and produce a homogenous map containing that type. + :: + :- %- ~(play ut p.sut) + [%kttr %make [%wing ~[%map]] ~[[%base %atom %ta] spec.i.raz]] + |- + ?~ res ~ + ?. (~(nest ut type) | p.q.n.res) + ~| [%nest-fail path.i.raz p.n.res] + !! + :- [p.n.res q.q.n.res] + [$(res l.res) $(res r.res)] + :: ++ run-maz |= [sut=vase maz=(list [face=term =mark])] ^- [vase state] @@ -1043,12 +1116,12 @@ ~ =/ rus rus:(~(gut by hoy.ruf) her *rung) %+ ~(gut by rus) syd - [lim=~2000.1.1 ref=`*rind qyx=~ dom=*dome per=~ pew=~] + [lim=~2000.1.1 ref=`*rind qyx=~ dom=*dome per=~ pew=~ fiz=*melt] :: administrative duct, domestic +rede :: :+ ~ `hun.rom.ruf =/ jod (~(gut by dos.rom.ruf) syd *dojo) - [lim=now ref=~ [qyx dom per pew]:jod] + [lim=now ref=~ [qyx dom per pew fiz]:jod] :: =* red=rede ->+ |% @@ -1065,7 +1138,7 @@ :: %= ruf hun.rom (need hun) - dos.rom (~(put by dos.rom.ruf) syd [qyx dom per pew]:red) + dos.rom (~(put by dos.rom.ruf) syd [qyx dom per pew fiz]:red) == :: :: Handle `%sing` requests @@ -1256,6 +1329,24 @@ =/ =path [%question desk (scot %ud index) ~] (emit duct %pass wire %a %plea ship %c path `riff-any`[%1 riff]) :: + ++ foreign-capable + |= =rave + |^ + ?- -.rave + %many & + %sing (good-care care.mood.rave) + %next (good-care care.mood.rave) + %mult + %- ~(all in paths.mool.rave) + |= [=care =path] + (good-care care) + == + :: + ++ good-care + |= =care + (~(has in ^~((silt `(list ^care)`~[%u %w %x %y %z]))) care) + -- + :: :: Create a request that cannot be filled immediately. :: :: If it's a local request, we just put in in `qyx`, setting a timer if it's @@ -1275,6 +1366,10 @@ =. rave ?. ?=([%sing %v *] rave) rave [%many %| [%ud let.dom] case.mood.rave path.mood.rave] + :: + ?. (foreign-capable rave) + ~|([%clay-bad-foreign-request-care rave] !!) + :: =+ inx=nix.u.ref =. +>+.$ =< ?>(?=(^ ref) .) @@ -1582,12 +1677,19 @@ :: ++ invalidate |* [key=mold value=mold] - |= [cache=(map key [value dez=(set path)]) invalid=(set path)] - =/ builds=(list [key value dez=(set path)]) ~(tap by cache) + |= [cache=(map key [value dez=(set [dir=? =path])]) invalid=(set path)] + =/ builds=(list [key value dez=(set [dir=? =path])]) + ~(tap by cache) |- ^+ cache ?~ builds ~ - ?: ?=(^ (~(int in dez.i.builds) invalid)) + ?: %- ~(any in dez.i.builds) + |= [dir=? =path] + ?. dir (~(has in invalid) path) + =+ l=(lent path) + %- ~(any in invalid) + |= i=^path + &(=(path (scag l i)) ?=([@ %hoon ~] (slag l i))) $(builds t.builds) (~(put by $(builds t.builds)) i.builds) :: @@ -1962,32 +2064,178 @@ =/ =wire /merge/[syd]/(scot %p ali-ship)/[ali-desk]/[germ] (emit hen %pass wire %c %warp ali-ship ali-desk `[%sing %v case /]) :: + ++ make-melt + |= [bas=beak con=(list [beak germ])] + ^- melt + :+ bas con + %- ~(gas by *(map beak (unit dome:clay))) + :- [bas *(unit dome:clay)] + (turn con |=(a=[beak germ] [-.a *(unit dome:clay)])) + :: + ++ start-fuse + |= [bas=beak con=(list [beak germ])] + ^+ ..start-fuse + =/ moves=(list move) + %+ turn + [[bas *germ] con] + |= [bec=beak germ] + ^- move + =/ wir=wire /fuse/[syd]/(scot %p p.bec)/[q.bec]/(scot r.bec) + [hen %pass wir %c %warp p.bec q.bec `[%sing %v r.bec /]] + :: + :: We also want to clear the state (fiz) associated with this + :: merge and print a warning if it's non trivial i.e. we're + :: starting a new fuse before the previous one terminated. + :: + =/ err=tang + ?~ con.fiz + ~ + =/ discarded=tang + %+ turn + ~(tap in sto.fiz) + |= [k=beak v=(unit dome:clay)] + ^- tank + =/ received=tape ?~(v "missing" "received") + leaf+"{} {received}" + :_ discarded + leaf+"fusing into {} from {} {} - overwriting prior fuse" + =. fiz (make-melt bas con) + ((slog err) (emil moves)) + :: + ++ take-fuse + |^ + :: + |= [bec=beak =riot] + ^+ ..take-fuse + ?~ riot + :: + :: By setting fiz to *melt the merge is aborted - any further + :: responses we get for the merge will cause take-fuse to crash + :: + =. fiz *melt + ((slog [leaf+"clay: fuse failed, missing {}"]~) ..take-fuse) + ?> (~(has by sto.fiz) bec) + =. fiz + :+ bas.fiz con.fiz + (~(put by sto.fiz) bec `!<(dome:clay q.r.u.riot)) + =/ all-done=flag + %- ~(all by sto.fiz) + |= res=(unit dome:clay) + ^- flag + !=(res ~) + ?. all-done + ..take-fuse + =| rag=rang + =/ clean-state ..take-fuse + =/ initial-dome=dome:clay (need (~(got by sto.fiz) bas.fiz)) + =/ continuation-yaki=yaki + (~(got by hut.ran) (~(got by hit.initial-dome) let.initial-dome)) + =/ parents=(list tako) ~[(~(got by hit.initial-dome) let.initial-dome)] + =/ merges con.fiz + |- + ^+ ..take-fuse + ?~ merges + =/ t=tang [leaf+"{} fused from {} {}" ~] + =. ..take-fuse (done-fuse clean-state %& ~) + (park | [%| continuation-yaki(p (flop parents))] rag) + =/ [bec=beak g=germ] i.merges + =/ ali-dom=dome:clay (need (~(got by sto.fiz) bec)) + =/ result (merge-helper p.bec q.bec g ali-dom `continuation-yaki) + ?- -.result + %| + (done-fuse clean-state %| %fuse-merge-failed p.result) + :: + %& + =/ merge-result=(unit merge-result) +.result + ?~ merge-result + :: + :: This merge was a no-op, just continue + :: + $(merges t.merges) + ?^ conflicts.u.merge-result + :: + :: If there are merge conflicts send the error and abort the merge + :: + (done-fuse clean-state %& conflicts.u.merge-result) + =/ merged-yaki=yaki + ?- -.new.u.merge-result + %| + +.new.u.merge-result + :: + %& + :: + :: Convert the yuki to yaki + :: + =/ yuk=yuki +.new.u.merge-result + =/ lobes=(map path lobe) + %- ~(run by q.yuk) + |= val=(each page lobe) + ^- lobe + ?- -.val + %& (page-to-lobe +.val) + %| +.val + == + (make-yaki p.yuk lobes now) + == + %= $ + continuation-yaki merged-yaki + merges t.merges + hut.ran (~(put by hut.ran) r.merged-yaki merged-yaki) + lat.rag (~(uni by lat.rag) lat.u.merge-result) + parents [(~(got by hit.ali-dom) let.ali-dom) parents] + == + == + :: +done-fuse: restore state after a fuse is attempted, whether it + :: succeeds or fails. + :: + ++ done-fuse + |= [to-restore=_..take-fuse result=(each (set path) (pair term tang))] + ^+ ..take-fuse + =. fiz.to-restore *melt + (done:to-restore result) + -- + :: + ++ done + |= result=(each (set path) (pair term tang)) + ^+ ..merge + (emit hen %give %mere result) + :: ++ merge |= [=ali=ship =ali=desk =germ =riot] ^+ ..merge - |^ ?~ riot - (done %| %ali-unavailable >[ali-ship ali-desk germ]< ~) + (done %| %ali-unavailable ~[>[ali-ship ali-desk germ]<]) =/ ali-dome=dome:clay !<(dome:clay q.r.u.riot) + =/ result=(each (unit merge-result) (pair term tang)) + (merge-helper ali-ship ali-desk germ ali-dome ~) + ?- -.result + %| + (done %| +.result) + :: + %& + =/ mr=(unit merge-result) +.result + ?~ mr + (done %& ~) + =. ..merge (done %& conflicts.u.mr) + (park | new.u.mr ~ lat.u.mr) + == + :: + +$ merge-result [conflicts=(set path) new=yoki lat=(map lobe blob)] + :: + ++ merge-helper + |= [=ali=ship =ali=desk =germ ali-dome=dome:clay continuation-yaki=(unit yaki)] + ^- (each (unit merge-result) [term tang]) + |^ + ^- (each (unit merge-result) [term tang]) =/ ali-yaki=yaki (~(got by hut.ran) (~(got by hit.ali-dome) let.ali-dome)) =/ bob-yaki=(unit yaki) - ?~ let.dom - ~ - (~(get by hut.ran) (~(got by hit.dom) let.dom)) - =/ merge-result (merge-by-germ ali-yaki bob-yaki) - ?: ?=(%| -.merge-result) - (done %| p.merge-result) - ?~ p.merge-result - (done %& ~) - =. ..merge (done %& conflicts.u.p.merge-result) - (park | new.u.p.merge-result ~ lat.u.p.merge-result) + ?~ continuation-yaki + ?~ let.dom + ~ + (~(get by hut.ran) (~(got by hit.dom) let.dom)) + continuation-yaki + (merge-by-germ ali-yaki bob-yaki) :: - ++ done - |= result=(each (set path) (pair term tang)) - ^+ ..merge - (emit hen %give %mere result) - :: - +$ merge-result [conflicts=(set path) new=yoki lat=(map lobe blob)] ++ merge-by-germ |= [=ali=yaki bob-yaki=(unit yaki)] ^- (each (unit merge-result) [term tang]) @@ -2005,16 +2253,13 @@ ?- germ :: :: If this is a %only-this merge, we check to see if ali's and bob's - :: commits are the same, in which case we're done. Otherwise, we - :: check to see if ali's commit is in the ancestry of bob's, in - :: which case we're done. Otherwise, we create a new commit with - :: bob's data plus ali and bob as parents. + :: commits are the same, in which case we're done. + :: Otherwise, we create a new commit with bob's data plus ali and + :: bob as parents. :: %only-this ?: =(r.ali-yaki r.bob-yaki) &+~ - ?: (~(has in (reachable-takos:ze r.bob-yaki)) r.ali-yaki) - &+~ :* %& ~ conflicts=~ new=&+[[r.bob-yaki r.ali-yaki ~] (to-yuki q.bob-yaki)] @@ -2042,8 +2287,6 @@ %take-this ?: =(r.ali-yaki r.bob-yaki) &+~ - ?: (~(has in (reachable-takos:ze r.bob-yaki)) r.ali-yaki) - &+~ =/ new-data (~(uni by q.ali-yaki) q.bob-yaki) :* %& ~ conflicts=~ @@ -2313,7 +2556,7 @@ =+ (slag (dec (lent path)) path) ?~(- %$ i.-) =/ =dais (get-dais mark) - =/ res=(unit (unit vase)) (~(join dais bunt:dais) q.cal q.cob) + =/ res=(unit (unit vase)) (~(join dais *vale:dais) q.cal q.cob) ?~ res `[form:dais q.cob] ?~ u.res @@ -2665,6 +2908,9 @@ ++ start-request |= [for=(unit [ship @ud]) rav=rave] ^+ ..start-request + ?: &(?=(^ for) !(foreign-capable rav)) + ~& [%bad-foreign-request-care from=for rav] + ..start-request =^ [new-sub=(unit rove) sub-results=(list sub-result)] fod.dom (try-fill-sub for (rave-to-rove rav)) =. ..start-request (send-sub-results sub-results [hen ~ ~]) @@ -2721,14 +2967,23 @@ %r ~| %no-cages-please-they-are-just-way-too-big !! %s ~| %please-dont-get-your-takos-over-a-network !! %t ~| %requesting-foreign-directory-is-vaporware !! - %u ~| %prolly-poor-idea-to-get-rang-over-network !! %v ~| %weird-shouldnt-get-v-request-from-network !! - %z `(validate-z r.rand) + %u `(validate-u r.rand) %w `(validate-w r.rand) %x (validate-x [p.p q.p q r]:rand) %y `[p.r.rand !>(;;(arch q.r.rand))] + %z `(validate-z r.rand) == :: + :: Make sure the incoming data is a %u response + :: + ++ validate-u + |= =page + ^- cage + ?> ?=(%flag p.page) + :- p.page + !> ;;(? q.page) + :: :: Make sure the incoming data is a %w response :: ++ validate-w @@ -2749,7 +3004,11 @@ =/ vale-result %- mule |. %- wrap:fusion - (page-to-cage:(ford:fusion static-ford-args) peg) + :: Use %home's marks to validate, so we don't have to build the + :: foreign hoon/zuse + :: + =/ args %*(static-ford-args . dom dom:(~(got by dos.rom) %home)) + (page-to-cage:(ford:fusion args) peg) ?: ?=(%| -.vale-result) %- (slog >%validate-x-failed< p.vale-result) ~ @@ -2762,7 +3021,7 @@ ^- cage ?> ?=(%uvi p.page) :- p.page - !>(;;(@uvI q.page)) + !> ;;(@uvI q.page) -- :: :: Respond to backfill request @@ -3391,12 +3650,29 @@ |- ?: =(b let.dom) hit.dom + :: del everything after b $(hit.dom (~(del by hit.dom) let.dom), let.dom (dec let.dom)) b ?: =(0 b) [~ ~] - (data-twixt-takos =(0 ver) (~(get by hit.dom) a) (aeon-to-tako b)) - :: + =/ excludes=(set tako) + =| acc=(set tako) + =/ lower=@ud 1 + |- + :: a should be excluded, so wait until we're past it + ?: =(lower +(a)) + acc + =/ res=(set tako) (reachable-takos (~(got by hit.dom) lower)) + $(acc (~(uni in acc) res), lower +(lower)) + =/ includes=(set tako) + =| acc=(set tako) + =/ upper=@ud b + |- + ?: =(upper a) + acc + =/ res=(set tako) (reachable-takos (~(got by hit.dom) upper)) + $(acc (~(uni in acc) res), upper (dec upper)) + [(~(run in (~(dif in includes) excludes)) tako-to-yaki) ~] :: Traverse parentage and find all ancestor hashes :: ++ reachable-takos :: reachable @@ -3415,30 +3691,6 @@ =. s ^$(p i.p.y) $(p.y t.p.y) :: - :: Gets the data between two commit hashes, assuming the first is an - :: ancestor of the second. - :: - :: Get all the takos before `a`, then get all takos before `b` except the - :: ones we found before `a`. Then convert the takos to yakis and also get - :: all the data in all the yakis. - :: - :: What happens if you run an %init merge on a desk that already - :: had a commit? - :: - ++ data-twixt-takos - |= [plops=? a=(unit tako) b=tako] - ^- [(set yaki) (set plop)] - =+ old=?~(a ~ (reachable-takos u.a)) - =/ yal=(set tako) - %- silt - %+ skip - ~(tap in (reachable-takos b)) - |=(tak=tako (~(has in old) tak)) - :- (silt (turn ~(tap in yal) tako-to-yaki)) - ?. plops - ~ - (silt (turn ~(tap in (new-lobes (new-lobes ~ old) yal)) lobe-to-blob)) - :: :: Get all the lobes that are referenced in `a` except those that are :: already in `b`. :: @@ -3528,11 +3780,11 @@ [[~ ~] fod.dom] =/ cached=(unit [=vase *]) (~(get by naves.fod.dom) i.path) ?^ cached - :_(fod.dom [~ ~ %& %nave !>(vase.u.cached)]) + :_(fod.dom [~ ~ %& %nave vase.u.cached]) =^ =vase fod.dom %- wrap:fusion (build-nave:(ford:fusion static-ford-args) i.path) - :_(fod.dom [~ ~ %& %nave !>(vase)]) + :_(fod.dom [~ ~ %& %nave vase]) :: ++ read-f !. @@ -3958,12 +4210,14 @@ :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: =| :: instrument state - $: ver=%7 :: vane version + $: ver=%8 :: vane version ruf=raft :: revision tree == :: |= [now=@da eny=@uvJ rof=roof] :: current invocation +~% %clay-top ..part ~ |% :: ++ call :: handle request + ~/ %clay-call |= $: hen=duct dud=(unit goof) wrapped-task=(hobo task) @@ -4074,6 +4328,14 @@ =/ den ((de now rof hen ruf) our des.req) abet:(start-merge:den her.req dem.req cas.req how.req) [mos ..^$] + :: + %fuse + ?: =(%$ des.req) + ~&(%fuse-no-desk !!) + =^ mos ruf + =/ den ((de now rof hen ruf) our des.req) + abet:(start-fuse:den bas.req con.req) + [mos ..^$] :: %mont =. hez.ruf ?^(hez.ruf hez.ruf `[[%$ %sync ~] ~]) @@ -4202,11 +4464,41 @@ ++ load => |% +$ raft-any - $% [%7 raft-7] + $% [%8 raft-8] + [%7 raft-7] [%6 raft-6] == - +$ raft-7 raft - +$ dojo-7 dojo + +$ raft-8 raft + +$ raft-7 + $: rom=room-7 + hoy=(map ship rung-7) + ran=rang + mon=(map term beam) + hez=(unit duct) + cez=(map @ta crew) + pud=(unit [=desk =yoki]) + == + +$ room-7 + $: hun=duct + dos=(map desk dojo-7) + == + +$ rung-7 + $: rus=(map desk rede-7) + == + +$ dojo-7 + $: qyx=cult + dom=dome + per=regs + pew=regs + == + +$ rede-7 + $: lim=@da + ref=(unit rind) + qyx=cult + dom=dome + per=regs + pew=regs + == +$ ford-cache-7 ford-cache +$ raft-6 $: rom=room-6 :: domestic @@ -4249,7 +4541,8 @@ |= old=raft-any |^ =? old ?=(%6 -.old) 7+(raft-6-to-7 +.old) - ?> ?=(%7 -.old) + =? old ?=(%7 -.old) 8+(raft-7-to-8 +.old) + ?> ?=(%8 -.old) ..^^$(ruf +.old) :: +raft-6-to-7: delete stale ford caches (they could all be invalid) :: @@ -4270,9 +4563,30 @@ |= =rede-6 rede-6(dom dom.rede-6(fod *ford-cache-7)) == + :: +raft-7-to-8: create bunted melts in each dojo/rede + :: + ++ raft-7-to-8 + |= raf=raft-7 + ^- raft-8 + %= raf + dos.rom + %- ~(run by dos.rom.raf) + |= doj=dojo-7 + ^- dojo + [qyx.doj dom.doj per.doj pew.doj *melt] + :: + hoy + %- ~(run by hoy.raf) + |= =rung-7 + %- ~(run by rus.rung-7) + |= r=rede-7 + ^- rede + [lim.r ref.r qyx.r dom.r per.r pew.r *melt] + == -- :: ++ scry :: inspect + ~/ %clay-scry ^- roon |= [lyc=gang car=term bem=beam] ^- (unit (unit cage)) @@ -4334,6 +4648,7 @@ == :: ++ take :: accept response + ~/ %clay-take |= [tea=wire hen=duct dud=(unit goof) hin=sign] ^+ [*(list move) ..^$] ?^ dud @@ -4350,6 +4665,18 @@ abet:(merge:den ali-ship ali-desk germ p.hin) [mos ..^$] :: + ?: ?=([%fuse @ @ @ @ ~] tea) + ?> ?=(%writ +<.hin) + =* syd i.t.tea + =/ ali-ship=@p (slav %p i.t.t.tea) + =* ali-desk=desk i.t.t.t.tea + =/ ali-case (rash i.t.t.t.t.tea nuck:so) + ?> ?=([%$ *] ali-case) + =^ mos ruf + =/ den ((de now rof hen ruf) our i.t.tea) + abet:(take-fuse:den [ali-ship ali-desk (case +.ali-case)] p.hin) + [mos ..^$] + :: ?: ?=([%foreign-warp *] tea) ?> ?=(%writ +<.hin) :_ ..^$ diff --git a/pkg/arvo/sys/vane/eyre.hoon b/pkg/arvo/sys/vane/eyre.hoon index 998bd659a3..8072cbd507 100644 --- a/pkg/arvo/sys/vane/eyre.hoon +++ b/pkg/arvo/sys/vane/eyre.hoon @@ -215,7 +215,7 @@ ?: =('subscribe' u.maybe-key) %. item %+ pe %subscribe - (ot id+ni ship+(su fed:ag) app+so path+(su ;~(pfix fas (more fas urs:ab))) ~) + (ot id+ni ship+(su fed:ag) app+so path+(su stap) ~) ?: =('unsubscribe' u.maybe-key) %. item %+ pe %unsubscribe @@ -426,10 +426,12 @@ :- ~ %- as-octs:mimes:html %- crip - %- zing + %- zing ^- ^wall + %- zing ^- (list ^wall) %+ turn wall |= t=tape - "{t}\0a" + ^- ^wall + ~[t "\0a"] :: +internal-server-error: 500 page, with a tang :: ++ internal-server-error @@ -1598,6 +1600,7 @@ :: +channel-event-to-sign: attempt to recover a sign from a channel-event :: ++ channel-event-to-sign + ~% %eyre-channel-event-to-sign ..part ~ |= event=channel-event ^- (unit sign:agent:gall) ?. ?=(%fact -.event) `event @@ -1678,6 +1681,7 @@ == :: ++ event-json-to-wall + ~% %eyre-json-to-wall ..part ~ |= [event-id=@ud =json] ^- wall :~ (weld "id: " (format-ud-as-integer event-id)) @@ -2095,6 +2099,7 @@ ~% %http-server ..part ~ |% ++ call + ~/ %eyre-call |= [=duct dud=(unit goof) wrapped-task=(hobo task)] ^- [(list move) _http-server-gate] :: @@ -2297,6 +2302,7 @@ == :: ++ take + ~/ %eyre-take |= [=wire =duct dud=(unit goof) =sign] ^- [(list move) _http-server-gate] ?^ dud @@ -2484,6 +2490,7 @@ :: +scry: request a path in the urbit namespace :: ++ scry + ~/ %eyre-scry ^- roon |= [lyc=gang car=term bem=beam] ^- (unit (unit cage)) diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index a481307874..690fa615eb 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -646,6 +646,7 @@ :: cleared queue in +load 3-to-4 or +load-4-to-5 :: =? stand ?=(~ stand) + ~& [%gall-missing wire hen] (~(put to *(qeu remote-request)) %missing) ~| [full-wire=full-wire hen=hen stand=stand] =^ rr stand ~(get to stand) diff --git a/pkg/arvo/sys/vane/jael.hoon b/pkg/arvo/sys/vane/jael.hoon index 5edcebcfce..20a0555770 100644 --- a/pkg/arvo/sys/vane/jael.hoon +++ b/pkg/arvo/sys/vane/jael.hoon @@ -434,7 +434,7 @@ %- curd =< abet (private-keys:~(feel su hen now pki etn) life.tac ring.tac) :: - :: update private keys + :: register moon keys :: %moon ?. =(%earl (clan:title ship.tac)) @@ -717,6 +717,14 @@ =/ a-point=point (~(gut by pos.zim.pki) ship.i.udiffs *point) =/ a-diff=(unit diff:point) (udiff-to-diff:point udiff.i.udiffs a-point) =? this-su ?=(^ a-diff) + :: if this about our keys, and we already know these, start using them + :: + =? lyf.own + ?& =(our ship.i.udiffs) + ?=(%keys -.u.a-diff) + (~(has by jaw.own) life.to.u.a-diff) + == + life.to.u.a-diff (public-keys:feel original-pos %diff ship.i.udiffs u.a-diff) $(udiffs t.udiffs) :: @@ -926,7 +934,16 @@ ^+ ..feel ?: &(=(lyf.own life) =((~(get by jaw.own) life) `ring)) ..feel - =. lyf.own life + :: only eagerly update lyf if we were behind the chain life + :: + =? lyf.own + ?& (gth life lyf.own) + :: + =+ pon=(~(get by pos.zim) our) + ?~ pon | + (lth lyf.own life.u.pon) + == + life =. jaw.own (~(put by jaw.own) life ring) (exec yen.own [%give %private-keys lyf.own jaw.own]) :: diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index eaf098937b..168c15863a 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -3286,7 +3286,7 @@ ++ ship :: string from ship |= a=^ship ^- json - (tape (slag 1 (scow %p a))) + [%n (rap 3 '"' (rsh [3 1] (scot %p a)) '"' ~)] :: :: ++numb:enjs:format ++ numb :: number from unsigned |= a=@u @@ -3458,7 +3458,7 @@ [(rash a fel) b] :: :: ++pa:dejs:format ++ pa :: string as path - (su ;~(pfix fas (more fas urs:ab))) + (su stap) :: :: ++pe:dejs:format ++ pe :: prefix |* [pre=* wit=fist] @@ -5070,36 +5070,54 @@ |= ord=$-([key key] ?) |= a=* =/ b ;;((tree [key=key val=value]) a) - ?> (check-balance:((ordered-map key value) ord) b) + ?> (apt:((on key value) ord) b) b :: -:: $mk-item: constructor for +ordered-map item type :: -++ mk-item |$ [key val] [key=key val=val] -:: +ordered-map: treap with user-specified horizontal order -:: -:: Conceptually smaller items go on the left, so the item with the -:: smallest key can be popped off the head. If $key is `@` and -:: .compare is +lte, then the numerically smallest item is the head. +++ ordered-map on +:: +on: treap with user-specified horizontal order, ordered-map :: :: WARNING: ordered-map will not work properly if two keys can be :: unequal under noun equality but equal via the compare gate :: -++ ordered-map +++ on + ~/ %on |* [key=mold val=mold] => |% - +$ item (mk-item key val) + +$ item [key=key val=val] -- :: +compare: item comparator for horizontal order :: + ~% %comp +>+ ~ |= compare=$-([key key] ?) + ~% %core + ~ |% - :: +check-balance: verify horizontal and vertical orderings + :: +all: apply logical AND boolean test on all values :: - ++ check-balance - =| [l=(unit key) r=(unit key)] - |= a=(tree item) + ++ all + ~/ %all + |= [a=(tree item) b=$-(item ?)] ^- ? + |- + ?~ a + & + ?&((b n.a) $(a l.a) $(a r.a)) + :: +any: apply logical OR boolean test on all values + :: + ++ any + ~/ %any + |= [a=(tree item) b=$-(item ?)] + |- ^- ? + ?~ a + | + ?|((b n.a) $(a l.a) $(a r.a)) + :: +apt: verify horizontal and vertical orderings + :: + ++ apt + ~/ %apt + |= a=(tree item) + =| [l=(unit key) r=(unit key)] + |- ^- ? :: empty tree is valid :: ?~ a %.y @@ -5122,64 +5140,22 @@ :: ?~(r.a %.y &((mor key.n.a key.n.r.a) $(a r.a, r `key.n.a))) == - :: +put: ordered item insert + :: +bap: convert to list, right to left :: - ++ put - |= [a=(tree item) =key =val] - ^- (tree item) - :: base case: replace null with single-item tree - :: - ?~ a [n=[key val] l=~ r=~] - :: base case: overwrite existing .key with new .val - :: - ?: =(key.n.a key) a(val.n val) - :: if item goes on left, recurse left then rebalance vertical order - :: - ?: (compare key key.n.a) - =/ l $(a l.a) - ?> ?=(^ l) - ?: (mor key.n.a key.n.l) - a(l l) - l(r a(l r.l)) - :: item goes on right; recurse right then rebalance vertical order - :: - =/ r $(a r.a) - ?> ?=(^ r) - ?: (mor key.n.a key.n.r) - a(r r) - r(l a(r l.r)) - :: +peek: produce head (smallest item) or null - :: - ++ peek + ++ bap + ~/ %bap |= a=(tree item) - ^- (unit item) - :: - ?~ a ~ - ?~ l.a `n.a - $(a l.a) - :: - :: +pop: produce .head (smallest item) and .rest or crash if empty - :: - ++ pop - |= a=(tree item) - ^- [head=item rest=(tree item)] - :: - ?~ a !! - ?~ l.a [n.a r.a] - :: - =/ l $(a l.a) - :- head.l - :: load .rest.l back into .a and rebalance - :: - ?: |(?=(~ rest.l) (mor key.n.a key.n.rest.l)) - a(l rest.l) - rest.l(r a(r r.rest.l)) + ^- (list item) + =| b=(list item) + |- ^+ b + ?~ a b + $(a r.a, b [n.a $(a l.a)]) :: +del: delete .key from .a if it exists, producing value iff deleted :: ++ del + ~/ %del |= [a=(tree item) =key] ^- [(unit val) (tree item)] - :: ?~ a [~ ~] :: we found .key at the root; delete and rebalance :: @@ -5192,30 +5168,15 @@ [found a(l lef)] =+ [found rig]=$(a r.a) [found a(r rig)] - :: +nip: remove root; for internal use - :: - ++ nip - |= a=(tree item) - ^- (tree item) - :: - ?> ?=(^ a) - :: delete .n.a; merge and balance .l.a and .r.a - :: - |- ^- (tree item) - ?~ l.a r.a - ?~ r.a l.a - ?: (mor key.n.l.a key.n.r.a) - l.a(r $(l.a r.l.a)) - r.a(l $(r.a l.r.a)) - :: +traverse: stateful partial inorder traversal + :: +dip: stateful partial inorder traversal :: :: Mutates .state on each run of .f. Starts at .start key, or if - :: .start is ~, starts at the head (item with smallest key). Stops - :: when .f produces .stop=%.y. Traverses from smaller to larger - :: keys. Each run of .f can replace an item's value or delete the - :: item. + :: .start is ~, starts at the head. Stops when .f produces .stop=%.y. + :: Traverses from left to right keys. + :: Each run of .f can replace an item's value or delete the item. :: - ++ traverse + ++ dip + ~/ %dip |* state=mold |= $: a=(tree item) =state @@ -5274,63 +5235,18 @@ =/ rig main(a r.a) rig(a a(r a.rig)) -- - :: +tap: convert to list, smallest to largest - :: - ++ tap - |= a=(tree item) - ^- (list item) - :: - =| b=(list item) - |- ^+ b - ?~ a b - :: - $(a l.a, b [n.a $(a r.a)]) - :: +bap: convert to list, largest to smallest - :: - ++ bap - |= a=(tree item) - ^- (list item) - :: - =| b=(list item) - |- ^+ b - ?~ a b - :: - $(a r.a, b [n.a $(a l.a)]) :: +gas: put a list of items :: ++ gas + ~/ %gas |= [a=(tree item) b=(list item)] ^- (tree item) - :: ?~ b a $(b t.b, a (put a i.b)) - :: +uni: unify two ordered maps - :: - :: .b takes precedence over .a if keys overlap. - :: - ++ uni - |= [a=(tree item) b=(tree item)] - ^- (tree item) - :: - ?~ b a - ?~ a b - ?: =(key.n.a key.n.b) - :: - [n=n.b l=$(a l.a, b l.b) r=$(a r.a, b r.b)] - :: - ?: (mor key.n.a key.n.b) - :: - ?: (compare key.n.b key.n.a) - $(l.a $(a l.a, r.b ~), b r.b) - $(r.a $(a r.a, l.b ~), b l.b) - :: - ?: (compare key.n.a key.n.b) - $(l.b $(b l.b, r.a ~), a r.a) - $(r.b $(b r.b, l.a ~), a l.a) - :: :: +get: get val at key or return ~ :: ++ get + ~/ %get |= [a=(tree item) b=key] ^- (unit val) ?~ a ~ @@ -5339,11 +5255,24 @@ ?: (compare b key.n.a) $(a l.a) $(a r.a) + :: +got: need value at key :: - :: +subset: take a range excluding start and/or end and all elements + ++ got + |= [a=(tree item) b=key] + ^- val + (need (get a b)) + :: +has: check for key existence + :: + ++ has + ~/ %has + |= [a=(tree item) b=key] + ^- ? + !=(~ (get a b)) + :: +lot: take a subset range excluding start and/or end and all elements :: outside the range :: - ++ subset + ++ lot + ~/ %lot |= $: tre=(tree item) start=(unit key) end=(unit key) @@ -5389,6 +5318,154 @@ $(a (nip a(r ~))) == -- + :: +nip: remove root; for internal use + :: + ++ nip + ~/ %nip + |= a=(tree item) + ^- (tree item) + ?> ?=(^ a) + :: delete .n.a; merge and balance .l.a and .r.a + :: + |- ^- (tree item) + ?~ l.a r.a + ?~ r.a l.a + ?: (mor key.n.l.a key.n.r.a) + l.a(r $(l.a r.l.a)) + r.a(l $(r.a l.r.a)) + :: + :: +pop: produce .head (leftmost item) and .rest or crash if empty + :: + ++ pop + ~/ %pop + |= a=(tree item) + ^- [head=item rest=(tree item)] + ?~ a !! + ?~ l.a [n.a r.a] + =/ l $(a l.a) + :- head.l + :: load .rest.l back into .a and rebalance + :: + ?: |(?=(~ rest.l) (mor key.n.a key.n.rest.l)) + a(l rest.l) + rest.l(r a(r r.rest.l)) + :: +pry: produce head (leftmost item) or null + :: + ++ pry + ~/ %pry + |= a=(tree item) + ^- (unit item) + ?~ a ~ + |- + ?~ l.a `n.a + $(a l.a) + :: +put: ordered item insert + :: + ++ put + ~/ %put + |= [a=(tree item) =key =val] + ^- (tree item) + :: base case: replace null with single-item tree + :: + ?~ a [n=[key val] l=~ r=~] + :: base case: overwrite existing .key with new .val + :: + ?: =(key.n.a key) a(val.n val) + :: if item goes on left, recurse left then rebalance vertical order + :: + ?: (compare key key.n.a) + =/ l $(a l.a) + ?> ?=(^ l) + ?: (mor key.n.a key.n.l) + a(l l) + l(r a(l r.l)) + :: item goes on right; recurse right then rebalance vertical order + :: + =/ r $(a r.a) + ?> ?=(^ r) + ?: (mor key.n.a key.n.r) + a(r r) + r(l a(r l.r)) + :: +ram: produce tail (rightmost item) or null + :: + ++ ram + ~/ %ram + |= a=(tree item) + ^- (unit item) + ?~ a ~ + |- + ?~ r.a `n.a + $(a r.a) + :: +run: apply gate to transform all values in place + :: + ++ run + ~/ %run + |* [a=(tree item) b=$-(val *)] + |- + ?~ a a + [n=[key.n.a (b val.n.a)] l=$(a l.a) r=$(a r.a)] + :: +tab: tabulate a subset excluding start element with a max count + :: + ++ tab + ~/ %tab + |= [a=(tree item) b=(unit key) c=@] + ^- (list item) + |^ + (flop e:(tabulate (del-span a b) b c)) + :: + ++ tabulate + |= [a=(tree item) b=(unit key) c=@] + ^- [d=@ e=(list item)] + ?: ?&(?=(~ b) =(c 0)) + [0 ~] + =| f=[d=@ e=(list item)] + |- ^+ f + ?: ?|(?=(~ a) =(d.f c)) f + =. f $(a l.a) + ?: =(d.f c) f + =. f [+(d.f) [n.a e.f]] + ?:(=(d.f c) f $(a r.a)) + :: + ++ del-span + |= [a=(tree item) b=(unit key)] + ^- (tree item) + ?~ a a + ?~ b a + ?: =(key.n.a u.b) + r.a + ?: (compare key.n.a u.b) + $(a r.a) + a(l $(a l.a)) + -- + :: +tap: convert to list, left to right + :: + ++ tap + ~/ %tap + |= a=(tree item) + ^- (list item) + =| b=(list item) + |- ^+ b + ?~ a b + $(a l.a, b [n.a $(a r.a)]) + :: +uni: unify two ordered maps + :: + :: .b takes precedence over .a if keys overlap. + :: + ++ uni + ~/ %uni + |= [a=(tree item) b=(tree item)] + ^- (tree item) + ?~ b a + ?~ a b + ?: =(key.n.a key.n.b) + [n=n.b l=$(a l.a, b l.b) r=$(a r.a, b r.b)] + ?: (mor key.n.a key.n.b) + ?: (compare key.n.b key.n.a) + $(l.a $(a l.a, r.b ~), b r.b) + $(r.a $(a r.a, l.b ~), b l.b) + ?: (compare key.n.a key.n.b) + $(l.b $(b l.b, r.a ~), a r.a) + $(r.b $(b r.b, l.a ~), a l.a) -- :: :: :::: ++userlib :: (2u) non-vane utils @@ -5535,7 +5612,8 @@ :: :: ++unm:chrono:userlib ++ unm :: Urbit to Unix ms |= a=@da - (div (mul (sub a ~1970.1.1) 1.000) ~s1) + =- (div (mul - 1.000) ~s1) + (sub (add a (div ~s1 2.000)) ~1970.1.1) :: :: ++unt:chrono:userlib ++ unt :: Urbit to Unix time |= a=@da diff --git a/pkg/arvo/ted/aggregator/nonce.hoon b/pkg/arvo/ted/aggregator/nonce.hoon new file mode 100644 index 0000000000..311e1e9d59 --- /dev/null +++ b/pkg/arvo/ted/aggregator/nonce.hoon @@ -0,0 +1,15 @@ +:: aggregator/nonce: get next nonce +:: +/- rpc=json-rpc +/+ ethereum, ethio, strandio +:: +|= args=vase +=+ !<([endpoint=@t pk=@] args) +=/ m (strand:strandio ,vase) +^- form:m +:: +=/ =address:ethereum + (address-from-prv:key:ethereum pk) +;< expected-nonce=@ud bind:m + (get-next-nonce:ethio endpoint address) +(pure:m !>(expected-nonce)) diff --git a/pkg/arvo/ted/aggregator/send.hoon b/pkg/arvo/ted/aggregator/send.hoon index fd16da29be..6a5a77d7a7 100644 --- a/pkg/arvo/ted/aggregator/send.hoon +++ b/pkg/arvo/ted/aggregator/send.hoon @@ -1,28 +1,17 @@ :: aggregator/send: send rollup tx :: -/- rpc=json-rpc +/- rpc=json-rpc, *dice /+ naive, ethereum, ethio, strandio :: -=/ gas-limit=@ud 30.000 ::TODO verify, maybe scale with roll size :: |= args=vase -=+ !< $: endpoint=@t - contract=address:ethereum - chain-id=@ - pk=@ - :: - nonce=@ud - next-gas-price=@ud - txs=(list raw-tx:naive) - == - args +=+ !<(rpc-send-roll args) =/ m (strand:strandio ,vase) |^ ^- form:m -=* not-sent (pure:m !>(next-gas-price)) +=* not-sent (pure:m !>(%.y^next-gas-price)) :: -=/ =address:ethereum - (address-from-pub:key:ethereum pk) +=/ =address:ethereum (address-from-prv:key:ethereum pk) ;< expected-nonce=@ud bind:m (get-next-nonce:ethio endpoint address) :: if chain expects a different nonce, don't send this transaction @@ -34,17 +23,39 @@ ;< use-gas-price=@ud bind:m ?: =(0 next-gas-price) fetch-gas-price (pure:(strand:strandio @ud) next-gas-price) +:: +=/ batch-data=octs + %+ cad:naive 3 + %+ roll txs + |= [=raw-tx:naive out=(list octs)] + %+ weld + out + :_ [raw.raw-tx ~] + (met 3 sig.raw-tx)^sig.raw-tx +:: each l2 signature is 65 bytes + XX bytes for the raw data +:: from the ethereum yellow paper: +:: gasLimit = G_transaction + G_txdatanonzero × dataByteLength +:: where +:: G_transaction = 21000 gas (base fee) +:: + G_txdatanonzero = 68 gas +:: * dataByteLength = (65 + raw) * (lent txs) bytes +:: +:: TODO: enforce max number of tx in batch? +:: +=/ gas-limit=@ud (add 21.000 (mul 68 p.batch-data)) :: if we cannot pay for the transaction, don't bother sending it out :: =/ max-cost=@ud (mul gas-limit use-gas-price) ;< balance=@ud bind:m - ::TODO implement %eth-get-balance in /lib/ethio and /lib/ethereum - !! + (get-balance:ethio endpoint address) ?: (gth max-cost balance) ~& [%insufficient-aggregator-balance address] not-sent :: -=/ tx=@ux +::NOTE this fails the thread if sending fails, which in the app gives us +:: the "retry with same gas price" behavior we want +;< =response:rpc bind:m + %+ send-batch endpoint =; tx=transaction:rpc:ethereum (sign-transaction:key:ethereum tx pk) :* nonce @@ -52,20 +63,21 @@ gas-limit contract 0 - roll ::TODO tx data + q.batch-data chain-id == -:: -::NOTE this fails the thread if sending fails, which in the app gives us -:: the "retry with same gas price" behavior we want -;< jon=json bind:m - %+ request-rpc:ethio endpoint - [~ %eth-send-raw-transaction tx] -::TODO check that tx-hash in jon is non-zero? -::TODO enforce max here, or in app? -:: add five gwei to gas price of next attempt -:: -(pure:m !>((add use-gas-price 5.000.000.000))) +%- pure:m +!> ^- (each @ud @t) +?+ -.response %.n^'unexpected rpc response' + %error %.n^message.response + :: TODO: + :: check that tx-hash in +.response is non-zero? + :: log tx-hash to getTransactionReceipt(tx-hash)? + :: enforce max here, or in app? + :: add five gwei to gas price of next attempt + :: + %result %.y^(add use-gas-price 5.000.000.000) +== :: ::TODO should be distilled further, partially added to strandio? ++ fetch-gas-price @@ -83,7 +95,7 @@ take-maybe-response:strandio =* fallback ~& %fallback-gas-price - (pure:m 40.000.000.000) ::TODO maybe even lower, considering we increment? + (pure:m 10.000.000.000) ?. ?& ?=([~ %finished *] rep) ?=(^ full-file.u.rep) == @@ -96,5 +108,20 @@ (mul 1.000.000.000 u.res) ::NOTE gwei to wei %. u.jon =, dejs-soft:format - (ot 'result'^(ot 'FastGasPrice'^ni) ~) + (ot 'result'^(ot 'FastGasPrice'^ni ~) ~) +:: +++ send-batch + |= [endpoint=@ta batch=@ux] + =/ m (strand:strandio ,response:rpc) + ^- form:m + =/ req=[(unit @t) request:rpc:ethereum] + [`'sendRawTransaction' %eth-send-raw-transaction batch] + ;< res=(list response:rpc) bind:m + (request-batch-rpc-loose:ethio endpoint [req]~) + ?: ?=([* ~] res) + (pure:m i.res) + %+ strand-fail:strandio + %unexpected-multiple-results + [>(lent res)< ~] +:: -- diff --git a/pkg/arvo/ted/btc-rpc.hoon b/pkg/arvo/ted/btc-rpc.hoon new file mode 100644 index 0000000000..81f2ddc460 --- /dev/null +++ b/pkg/arvo/ted/btc-rpc.hoon @@ -0,0 +1,95 @@ +:: Note: these are for BTC testnet +:: +/- spider, rpc=json-rpc +/+ strandio, bc=bitcoin +=, strand=strand:spider +=> +|% +++ url1 "http://localhost:50002" +++ addr ^-(address:bc [%bech32 'bc1q39wus23jwe7m2j7xmrfr2svhrtejmsn262x3j2']) +++ btc-req + ^- request:http + =, enjs:format + :* method=%'POST' + url=`@ta`(crip (weld url1 "/btc-rpc")) + header-list=['Content-Type'^'application/json' ~] + ^= body + %- some + %- as-octt:mimes:html + %- en-json:html + %- pairs + :~ jsonrpc+s+'2.0' + id+s+'block-info' + method+s+'getblockchaininfo' + == + == +++ electrs-req + ^- request:http + =, enjs:format + :* method=%'POST' + url=`@ta`(crip (weld url1 "/electrs-rpc")) + header-list=['Content-Type'^'application/json' ~] + ^= body + %- some + %- as-octt:mimes:html + %- en-json:html + %- pairs + :~ jsonrpc+s+'2.0' + id+s+'list-unspent' + method+s+'blockchain.scripthash.listunspent' + params+a+~[[%s '34aae877286aa09828803af27ce2315e72c4888efdf74d7d067c975b7c558789']] + == + == +:: +:: convert address to Electrs ScriptHash that it uses to index +:: big-endian sha256 of the output script +:: +++ electrs-script-hash + |= a=address:bc + ^- hexb:bc + %- flip:byt:bc + %- sha256:bc + (script-pubkey:bc a) +:: +++ parse-json-rpc + |= =json + ^- (unit response:rpc) + =/ res=(unit [@t ^json]) + %. json + =, dejs-soft:format + (ot id+so result+some ~) + ?^ res `[%result u.res] + ~| parse-one-response=json + :+ ~ %error %- need + %. json + =, dejs-soft:format + (ot id+so error+(ot code+no message+so ~) ~) +:: +++ parse-response + |= =client-response:iris + =/ m (strand:strandio ,(unit response:rpc)) + ^- form:m + ?> ?=(%finished -.client-response) + ?~ full-file.client-response + (pure:m ~) + =/ body=@t q.data.u.full-file.client-response + =/ jon=(unit json) (de-json:html body) + ?~ jon (pure:m ~) + (pure:m (parse-json-rpc u.jon)) +:: +++ attempt-request + |= =request:http + =/ m (strand:strandio ,~) + ^- form:m + (send-request:strandio request) +-- +^- thread:spider +|= arg=vase +:: =+ !<([~ a=@ud] arg) +=/ m (strand ,vase) +^- form:m +;< ~ bind:m (attempt-request electrs-req) +;< rep=client-response:iris bind:m + take-client-response:strandio +;< rpc-resp=(unit response:rpc) bind:m (parse-response rep) +(pure:m !>(rpc-resp)) diff --git a/pkg/arvo/ted/glob.hoon b/pkg/arvo/ted/glob.hoon index c207b7a1c8..914691422c 100644 --- a/pkg/arvo/ted/glob.hoon +++ b/pkg/arvo/ted/glob.hoon @@ -8,5 +8,6 @@ =+ !<([~ hash=@uv] arg) =/ url "https://bootstrap.urbit.org/glob-{(scow %uv hash)}.glob" ;< =cord bind:m (fetch-cord:strandio url) +~| failed-glob+hash =+ ;;(=glob:glob (cue cord)) (pure:m !>(glob)) diff --git a/pkg/arvo/ted/graph/add-nodes.hoon b/pkg/arvo/ted/graph/add-nodes.hoon index 3c6a3ccf67..2359c5efe1 100644 --- a/pkg/arvo/ted/graph/add-nodes.hoon +++ b/pkg/arvo/ted/graph/add-nodes.hoon @@ -32,8 +32,9 @@ =/ hashes (nodes-to-pending-indices nodes.q.update) ;< ~ bind:m %^ poke-our %graph-push-hook - %graph-update-1 - !>(update) + %graph-update-2 + !> ^- update:store + update (pure:m !>(`action:graph-view`[%pending-indices hashes])) :: ++ sort-nodes @@ -75,7 +76,8 @@ ^- [index:store node:store] =* loop $ :- index - =* p post.node + ?> ?=(%& -.post.node) + =* p p.post.node =/ =hash:store =- `@ux`(sham -) :^ ?^ parent-hash @@ -85,9 +87,9 @@ time-sent.p contents.p %_ node - hash.post `hash + hash.p.post `hash :: - signatures.post + signatures.p.post %- ~(gas in *signatures:store) [(sign:sig our.bowl now.bowl hash)]~ :: @@ -115,7 +117,8 @@ ?: ?=([@ ~] index) ~ =/ node (got-deep:gra graph (snip `(list atom)`index)) - hash.post.node + ?> ?=(%& -.post.node) + hash.p.post.node :: ++ nodes-to-pending-indices |= nodes=(map index:store node:store) @@ -124,6 +127,7 @@ %+ turn ~(tap by nodes) |= [=index:store =node:store] ^- [hash:store index:store] - ?> ?=(^ hash.post.node) - [u.hash.post.node index] + ?> ?=(%& -.post.node) + ?> ?=(^ hash.p.post.node) + [u.hash.p.post.node index] -- diff --git a/pkg/arvo/ted/graph/create-group-feed.hoon b/pkg/arvo/ted/graph/create-group-feed.hoon index 99ce29dd21..83590f5928 100644 --- a/pkg/arvo/ted/graph/create-group-feed.hoon +++ b/pkg/arvo/ted/graph/create-group-feed.hoon @@ -39,7 +39,7 @@ == ;< ~ bind:m %+ poke-our %graph-store - :- %graph-update-1 + :- %graph-update-2 !> ^- update:graph [now.bowl %add-graph feed-rid *graph:graph `%graph-validator-post %&] ;< ~ bind:m diff --git a/pkg/arvo/ted/graph/create.hoon b/pkg/arvo/ted/graph/create.hoon index e4bb3ee573..44f9cd098e 100644 --- a/pkg/arvo/ted/graph/create.hoon +++ b/pkg/arvo/ted/graph/create.hoon @@ -54,7 +54,7 @@ =/ =update:graph [now.bowl %add-graph rid.action *graph:graph mark.action overwrite] ;< ~ bind:m - (poke-our %graph-store graph-update-1+!>(update)) + (poke-our %graph-store graph-update-2+!>(update)) ;< ~ bind:m (poke-our %graph-push-hook %push-hook-action !>([%add rid.action])) :: diff --git a/pkg/arvo/ted/graph/delete.hoon b/pkg/arvo/ted/graph/delete.hoon index 5d4d1765d6..bab899d6ef 100644 --- a/pkg/arvo/ted/graph/delete.hoon +++ b/pkg/arvo/ted/graph/delete.hoon @@ -36,7 +36,7 @@ ^- form:m ;< =bowl:spider bind:m get-bowl:strandio ;< ~ bind:m - (poke-our %graph-store %graph-update-1 !>([now.bowl %remove-graph rid])) + (poke-our %graph-store %graph-update-2 !>([now.bowl %remove-graph rid])) ;< ~ bind:m (poke-our %graph-push-hook %push-hook-action !>([%remove rid])) ;< ~ bind:m diff --git a/pkg/arvo/ted/graph/disable-group-feed.hoon b/pkg/arvo/ted/graph/disable-group-feed.hoon index 77356ed935..5b9d6555e8 100644 --- a/pkg/arvo/ted/graph/disable-group-feed.hoon +++ b/pkg/arvo/ted/graph/disable-group-feed.hoon @@ -40,7 +40,7 @@ ?: ?=([~ ^] feed.config.metadatum) ;< ~ bind:m %+ poke-our %graph-store - :- %graph-update-1 + :- %graph-update-2 !> ^- update:graph [now.bowl [%archive-graph resource.u.u.feed.config.metadatum]] (pure:m !>(~)) diff --git a/pkg/arvo/ted/graph/leave.hoon b/pkg/arvo/ted/graph/leave.hoon index 8802e45388..b84e53a164 100644 --- a/pkg/arvo/ted/graph/leave.hoon +++ b/pkg/arvo/ted/graph/leave.hoon @@ -39,7 +39,7 @@ ;< ~ bind:m (poke-our %graph-pull-hook %pull-hook-action !>([%remove rid])) ;< ~ bind:m - (poke-our %graph-store %graph-update-1 !>([now [%remove-graph rid]])) + (poke-our %graph-store %graph-update-2 !>([now [%remove-graph rid]])) (pure:m ~) -- :: diff --git a/pkg/arvo/ted/graph/restore.hoon b/pkg/arvo/ted/graph/restore.hoon index 9dca26e3d5..3efac97241 100644 --- a/pkg/arvo/ted/graph/restore.hoon +++ b/pkg/arvo/ted/graph/restore.hoon @@ -17,7 +17,7 @@ ;< =bowl:spider bind:m get-bowl:strandio :: unarchive graph and share it ;< ~ bind:m - (poke-our %graph-store %graph-update-1 !>([now.bowl %unarchive-graph rid])) + (poke-our %graph-store %graph-update-2 !>([now.bowl %unarchive-graph rid])) ;< ~ bind:m (poke-our %graph-push-hook %push-hook-action !>([%add rid])) :: diff --git a/pkg/arvo/ted/group/on-leave.hoon b/pkg/arvo/ted/group/on-leave.hoon index 5f2b501946..34b2b6636e 100644 --- a/pkg/arvo/ted/group/on-leave.hoon +++ b/pkg/arvo/ted/group/on-leave.hoon @@ -70,7 +70,7 @@ ;< ~ bind:m %+ raw-poke [our.bowl %graph-store] - :- %graph-update-1 + :- %graph-update-2 !> ^- update:gra [now.bowl [%archive-graph app-resource]] ;< ~ bind:m diff --git a/pkg/arvo/ted/ph/migrate/make-graphs.hoon b/pkg/arvo/ted/ph/migrate/make-graphs.hoon index 41ef5ae082..c24b70c8c9 100644 --- a/pkg/arvo/ted/ph/migrate/make-graphs.hoon +++ b/pkg/arvo/ted/ph/migrate/make-graphs.hoon @@ -12,9 +12,9 @@ |= [our=@p wen=@da rid=resource body=cord id=@] =/ =index:post [id]~ =/ =post:post [our index wen [%text body]~ ~ ~] - =/ =node:graph-store [post %empty ~] + =/ =node:graph-store [[%& post] %empty ~] =/ act=update:graph-store [wen %add-nodes rid (my [index node] ~)] - (poke-app our %graph-push-hook %graph-update-1 act) + (poke-app our %graph-push-hook %graph-update-2 act) -- :: ^- thread:spider diff --git a/pkg/arvo/ted/ph/migrate/post-import-graphs.hoon b/pkg/arvo/ted/ph/migrate/post-import-graphs.hoon index 7c1d5ed4b3..00b2309727 100644 --- a/pkg/arvo/ted/ph/migrate/post-import-graphs.hoon +++ b/pkg/arvo/ted/ph/migrate/post-import-graphs.hoon @@ -12,9 +12,9 @@ |= [our=@p wen=@da rid=resource body=cord id=@] =/ =index:post [id]~ =/ =post:post [our index wen [%text body]~ ~ ~] - =/ =node:graph-store [post %empty ~] + =/ =node:graph-store [[%& post] %empty ~] =/ act=update:graph-store [wen %add-nodes rid (my [index node] ~)] - (poke-app our %graph-push-hook %graph-update-1 act) + (poke-app our %graph-push-hook %graph-update-2 act) -- :: ^- thread:spider diff --git a/pkg/arvo/ted/rpc.hoon b/pkg/arvo/ted/rpc.hoon new file mode 100644 index 0000000000..3e037bf9bb --- /dev/null +++ b/pkg/arvo/ted/rpc.hoon @@ -0,0 +1,13 @@ +/- spider, rpc=json-rpc +/+ strandio, bcu=bitcoin-utils +=, strand=strand:spider +=> +|% +++ blah 2 +-- +^- thread:spider +|= arg=vase +:: =+ !<([~ a=@ud] arg) +=/ m (strand ,vase) +^- form:m +(pure:m !>(blah)) diff --git a/pkg/arvo/tests/lib/bip/b158.hoon b/pkg/arvo/tests/lib/bip/b158.hoon new file mode 100644 index 0000000000..925ca1cfb5 --- /dev/null +++ b/pkg/arvo/tests/lib/bip/b158.hoon @@ -0,0 +1,159 @@ +/+ *test, *bip-b158, *bitcoin-utils +|% ++$ filter-vector + $: filter=hexb + expect=[parse=[n=@ux gcs-set=bits] decode=[delta=@ rest=bits]] +== ++$ siphash-vector + $: blockhash=tape + filter=hexb + item=hexb + expect=@ + == ++$ match-vector + $: blockhash=tape + filter=hexb + inc-spks=(list hexb) + exc-spks=(list hexb) + expect=(list @) + == +:: +++ filter-vectors + ^- (list filter-vector) + :~ + :: testnet genesis block + :: + :* 4^0x19d.fca8 + :* 0x1 + 24^0b1001.1101.1111.1100.1010.1000 + == + [769.941 [3 0b0]] + == + :: testnet block 926485 + :: + :* 25^0x9.027a.cea6.1b6c.c3fb.33f5.d52f.7d08.8a6b.2f75.d234.e89c.a800 + :* 0x9 + 192^0b10.0111.1010.1100.1110.1010.0110.0001.1011.0110.1100.1100.0011.1111.1011.0011.0011.1111.0101.1101.0101.0010.1111.0111.1101.0000.1000.1000.1010.0110.1011.0010.1111.0111.0101.1101.0010.0011.0100.1110.1000.1001.1100.1010.1000.0000.0000 + == + [10.156 172^0b1110.1010.0110.0001.1011.0110.1100.1100.0011.1111.1011.0011.0011.1111.0101.1101.0101.0010.1111.0111.1101.0000.1000.1000.1010.0110.1011.0010.1111.0111.0101.1101.0010.0011.0100.1110.1000.1001.1100.1010.1000.0000.0000] + == + :: 3 vectors with large Ns (i.e. CompactSize starting with 0xfd/fe/ff) + :: + :* 6^0xfd88.279d.fca8 + :* 0x2788 + 24^0b1001.1101.1111.1100.1010.1000 + == + [769.941 [3 0b0]] + == + :: + :* 8^0xfe11.2233.449d.fca8 + :* 0x4433.2211 + 24^0b1001.1101.1111.1100.1010.1000 + == + [769.941 [3 0b0]] + == + :: + :* 12^0xff11.2233.4455.6677.889d.fca8 + :* 0x8877.6655.4433.2211 + 24^0b1001.1101.1111.1100.1010.1000 + == + [769.941 [3 0b0]] + == + == +:: +++ siphash-vectors + ^- (list siphash-vector) + :: testnet genesis block + :~ :* "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943" + 4^0x19d.fca8 + 67^0x41.0467.8afd.b0fe.5548.2719.67f1.a671.30b7.105c.d6a8.28e0.3909.a679.62e0.ea1f.61de.b649.f6bc.3f4c.ef38.c4f3.5504.e51e.c112.de5c.384d.f7ba.0b8d.578a.4c70.2b6b.f11d.5fac + 769.941 + == + == +:: +++ match-vectors + ^- (list match-vector) + :: testnet genesis block + :~ :* "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943" + 4^0x19d.fca8 + ~[67^0x41.0467.8afd.b0fe.5548.2719.67f1.a671.30b7.105c.d6a8.28e0.3909.a679.62e0.ea1f.61de.b649.f6bc.3f4c.ef38.c4f3.5504.e51e.c112.de5c.384d.f7ba.0b8d.578a.4c70.2b6b.f11d.5fac] + ~[25^0x76.a914.3ebc.40e4.11ed.3c76.f867.1150.7ab9.5230.0890.3972.88ac] + ~[271.501 769.941] + == + :: testnet block 926485 + :: + :* "000000000000015d6077a411a8f5cc95caf775ccf11c54e27df75ce58d187313" + 25^0x9.027a.cea6.1b6c.c3fb.33f5.d52f.7d08.8a6b.2f75.d234.e89c.a800 + :~ 25^0x76.a914.3ebc.40e4.11ed.3c76.f867.1150.7ab9.5230.0890.3972.88ac + 25^0x76.a914.5033.3046.115e.aa0a.c9e0.2165.65f9.4507.0e44.5739.88ac + == + :~ 21^0x14.7e69.a44c.1a94.2139.c8ab.4127.8325.5e1e.46d0.f0da + == + ~[176.536 2.341.508 3.078.625] + == + == +:: +++ test-all-vectors + =/ [p=@ m=@] [p:params m:params] + ^- tang + |^ ;: weld + %+ category "parse filters" + (zing (turn filter-vectors check-filter-parse)) + %+ category "decode GCS" + (zing (turn filter-vectors check-gcs-decode)) + %+ category "siphash" + (zing (turn siphash-vectors check-siphash)) + %+ category "hash script-pubkeys" + (zing (turn match-vectors check-hashing)) + %+ category "whether filter matches any script-pubkey" + (zing (turn match-vectors check-match)) + %+ category "get all script-pubkey matches for a block filter" + (zing (turn match-vectors check-all-match)) + == + :: + ++ check-filter-parse + |= v=filter-vector + %+ expect-eq + !>(parse.expect.v) + !>((parse-filter filter.v)) + :: + ++ check-gcs-decode + |= v=filter-vector + %+ expect-eq + !>(decode.expect.v) + !>((de:gol gcs-set:(parse-filter filter.v) p)) + :: + ++ check-siphash + |= v=siphash-vector + =+ f=(mul n:(parse-filter filter.v) m) + %+ expect-eq + !>(expect.v) + !>((to-range:hsh item.v f (to-key blockhash.v))) + :: + ++ check-hashing + |= v=match-vector + =/ [n=@ux gcs-set=bits] (parse-filter filter.v) + =+ k=(to-key blockhash.v) + %+ expect-eq + !>(expect.v) + !>((set-construct:hsh (weld inc-spks.v exc-spks.v) k (mul n m))) + :: + ++ check-match + |= v=match-vector + =+ k=(to-key blockhash.v) + %+ weld + %+ expect-eq + !>(%.y) + !>((match filter.v k inc-spks.v)) + %+ expect-eq + !>(%.n) + !>((match filter.v k exc-spks.v)) + :: + ++ check-all-match + |= v=match-vector + =+ k=(to-key blockhash.v) + %+ expect-eq + !>(`(set hexb)`(sy inc-spks.v)) + !>(`(set hexb)`(all-match filter.v k (weld inc-spks.v exc-spks.v))) + -- +-- diff --git a/pkg/arvo/tests/lib/bip/b174.hoon b/pkg/arvo/tests/lib/bip/b174.hoon new file mode 100644 index 0000000000..50be45d956 --- /dev/null +++ b/pkg/arvo/tests/lib/bip/b174.hoon @@ -0,0 +1,49 @@ +/- *bitcoin +/+ *test, *bip-b158, bcu=bitcoin-utils, pbt=bip-b174 +|% ++$ psbt-vector + $: =hdkey + hdkey-hex=hexb + == +++ fprint 4^0xdead.beef +++ psbt-vectors + ^- (list psbt-vector) + :~ :* [fprint 33^0x1 %testnet %44 %0 1] + 20^0x2c00.0080.0100.0080.0000.0080.0000.0000.0100.0000 + == + :: + :* [fprint 33^0x1 %testnet %49 %0 1] + 20^0x3100.0080.0100.0080.0000.0080.0000.0000.0100.0000 + == + :: + :* [fprint 33^0x1 %testnet %84 %0 1] + 20^0x5400.0080.0100.0080.0000.0080.0000.0000.0100.0000 + == + :: + :* [fprint 33^0x1 %main %44 %0 1] + 20^0x2c00.0080.0000.0080.0000.0080.0000.0000.0100.0000 + == + :: + :* [fprint 33^0x1 %main %49 %0 1] + 20^0x3100.0080.0000.0080.0000.0080.0000.0000.0100.0000 + == + :: + :* [fprint 33^0x1 %main %84 %0 1] + 20^0x5400.0080.0000.0080.0000.0080.0000.0000.0100.0000 + == + == +++ test-all-vectors +^- tang + |^ ;: weld + %+ category "check PSBT" + (zing (turn psbt-vectors check-psbt)) + == + ++ check-psbt + |= v=psbt-vector + =/ key=hexb + (cat:byt:bcu ~[1^0x6 pubkey.hdkey.v]) :: %input target + %+ expect-eq + !>([key (cat:byt:bcu ~[fprint.hdkey.v hdkey-hex.v])]) + !>((hdkey:en:pbt %input hdkey.v)) + -- +-- diff --git a/pkg/arvo/tests/lib/bitcoin.hoon b/pkg/arvo/tests/lib/bitcoin.hoon new file mode 100644 index 0000000000..29bc64eff8 --- /dev/null +++ b/pkg/arvo/tests/lib/bitcoin.hoon @@ -0,0 +1,207 @@ +/+ *test, *bitcoin, bip32 +=, secp:crypto +=+ ecc=secp256k1 +|% ++$ chyg ?(%0 %1) ++$ bits-vector [bitwidth=@ atoms=(list @) =bits] ++$ compact-size-vector @ux ++$ tx-vector [hex-cord=@t txid=hexb] ++$ xpub-vector + $: =xpub + =network + hdpath=[=bipt =chyg =idx] + pubkey=hexb + =address + == ++$ script-pubkey-vector [=address spk=hexb] +:: +++ bits-vectors + ^- (list bits-vector) + :~ :* 5 + ~[0 31 31 0 31 0] + [30 0b1.1111.1111.1000.0011.1110.0000] + == + == +:: +++ compact-size-vectors + ^- (list compact-size-vector) + :~ 0x98 + 0x302 + 0xaa.bbcc + 0xaabb.ccdd + 0xaa.bbcc.ddee + 0xaabb.ccdd.eeff.1122 + == +:: +++ tx-vectors + ^- (list tx-vector) + :~ :* '0200000002ab0949a08c5af7c49b8212f417e2f15ab3f5c33dcf153821a8139f877a5b7be40000000000feffffffab0949a08c5af7c49b8212f417e2f15ab3f5c33dcf153821a8139f877a5b7be40100000000feffffff02603bea0b000000001976a914768a40bbd740cbe81d988e71de2a4d5c71396b1d88ac8e240000000000001976a9146f4620b553fa095e721b9ee0efe9fa039cca459788ac00000000' + 32^0xfed6.cd1f.de4d.b4e1.3e7e.8003.17e3.7f9c.bd75.ec36.4389.670e.eff8.0da9.93c7.e560 + == + :: + :* '01000000000102267b34b058a44e678ca0609825fe37c5bb893462337334ad5a2e887b8ebef65c000000002322002049f80613b30fe3063d4e6ce75c53a7bc573ea17fe49dcb805aca416a8af5d991ffffffff666f99bf914bb18e28ec39af93d99a1938767fbec892408acced7c80663f0df40000000023220020096def7756afb4dba661ec58602cf6af1f7881e48e4b8a8c12be9985073f5adeffffffff06602d59010000000017a914572290324c72e6842e8a77c2cbb9882a3b9c2a9f87195c0e00000000001976a914abfdf3698ceef95986b31b763e6764cfe3ce584e88ac68642400000000001976a91456cf5fcc3654c5646b930e8773a95dce98c49e0588acfbb34b00000000001976a914518ee0d1b48f3d99f76e6e8283006610e39aeeba88acf492560000000000160014d1930fff9862af879ee14ecd3e1b9dc1099524ce0374c802000000001976a9148a6727bc345abeae523b6af7828053f95332918688ac03483045022100fcc8336b7c81e67cc7b53587fb06c3f950a6d3349e658594a444618c75988e45022065b3b957e0f7d2def98565a34c1ee7843d60525c4337730fa5d6ac8ff7aacb89012102ac604909ed86488338ec6255b0bdc0162562b299e66b860480a8bd2b99c7f3291976a9140e60a2ad39efd10ad61e2a3e6e5c1baa73190ee088ac0347304402202ec01f623cd48ba990caea70463de86b37ffb2363640b510ce9d80c750a54eec02204915d11649d636e5e8503b226d7a6a45da0163f3f0ca4b07bdaaa9af4d6f850f012102a52b3f9958c0f4b57b99f287832ea75775ddf7c83fa0648b6b1545ec4881ef2d1976a91401121fe150c9b05f9146bac57ad9947ea5c1478e88ac00000000' + 32^0x2b9c.60c4.dfcd.0aa2.b1b8.83a5.0a4a.2a96.197b.07d8.cdd1.e749.f0a1.f296.0f43.b339 + == + == +:: below use mnemonic: +:: abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about +:: +++ xpub-vectors + ^- (list xpub-vector) + :~ :* 'tpubDC5FSnBiZDMmhiuCmWAYsLwgLYrrT9rAqvTySfuCCrgsWz8wxMXUS9Tb9iVMvcRbvFcAHGkMD5Kx8koh4GquNGNTfohfk7pgjhaPCdXpoba' + %testnet + [%44 %0 0] + 33^0x2.a745.1395.7353.69f2.ecdf.c829.c0f7.74e8.8ef1.303d.fe5b.2f04.dbaa.b30a.535d.fdd6 + [%base58 0cmkpZhYtJu2r87Js3pDiWJDmPte2NRZ8bJV] + == + :: + :* 'upub5EFU65HtV5TeiSHmZZm7FUffBGy8UKeqp7vw43jYbvZPpoVsgU93oac7Wk3u6moKegAEWtGNF8DehrnHtv21XXEMYRUocHqguyjknFHYfgY' + %testnet + [%49 %0 0] + 33^0x3.a1af.804a.c108.a8a5.1782.198c.2d03.4b28.bf90.c880.3f5a.53f7.6276.fa69.a4ea.e77f + [%base58 0c2Mww8dCYPUpKHofjgcXcBCEGmniw9CoaiD2] + == + :: + :* 'vpub5Y6cjg78GGuNLsaPhmYsiw4gYX3HoQiRBiSwDaBXKUafCt9bNwWQiitDk5VZ5BVxYnQdwoTyXSs2JHRPAgjAvtbBrf8ZhDYe2jWAqvZVnsc' + %testnet + [%84 %0 0] + 33^0x2.e7ab.2537.b5d4.9e97.0309.aae0.6e9e.49f3.6ce1.c9fe.bbd4.4ec8.e0d1.cca0.b4f9.c319 + [%bech32 'tb1q6rz28mcfaxtmd6v789l9rrlrusdprr9pqcpvkl'] + == + :: + :* 'xpub6BosfCnifzxcFwrSzQiqu2DBVTshkCXacvNsWGYJVVhhawA7d4R5WSWGFNbi8Aw6ZRc1brxMyWMzG3DSSSSoekkudhUd9yLb6qx39T9nMdj' + %main + [%44 %0 0] + 33^0x3.aaeb.52dd.7494.c361.049d.e67c.c680.e83e.bcbb.bdbe.b136.37d9.2cd8.45f7.0308.af5e + [%base58 0c1LqBGSKuX5yYUonjxT5qGfpUsXKYYWeabA] + == + :: + :* 'ypub6Ww3ibxVfGzLrAH1PNcjyAWenMTbbAosGNB6VvmSEgytSER9azLDWCxoJwW7Ke7icmizBMXrzBx9979FfaHxHcrArf3zbeJJJUZPf663zsP' + %main + [%49 %0 0] + 33^0x3.9b3b.694b.8fc5.b5e0.7fb0.69c7.83ca.c754.f5d3.8c3e.08be.d196.0e31.fdb1.dda3.5c24 + [%base58 0c37VucYSaXLCAsxYyAPfbSi9eh4iEcbShgf] + == + :: + :* 'zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs' + %main + [%84 %0 0] + 33^0x3.30d5.4fd0.dd42.0a6e.5f8d.3624.f5f3.482c.ae35.0f79.d5f0.753b.f5be.ef9c.2d91.af3c + [%bech32 'bc1qcr8te4kr609gcawutmrza0j4xv80jy8z306fyu'] + == + == +:: +++ script-pubkey-vectors + ^- (list script-pubkey-vector) + :~ :* [%bech32 'bc1qcr8te4kr609gcawutmrza0j4xv80jy8z306fyu'] + [wid=22 dat=0x14.c0ce.bcd6.c3d3.ca8c.75dc.5ec6.2ebe.5533.0ef9.10e2] + == + :: + :* [%bech32 'bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3'] + [wid=34 dat=0x20.1863.143c.14c5.1668.04bd.1920.3356.da13.6c98.5678.cd4d.27a1.b8c6.3296.0490.3262] + == + :: + :* [%bech32 'tb1q6rz28mcfaxtmd6v789l9rrlrusdprr9pqcpvkl'] + [wid=22 dat=0x14.d0c4.a3ef.09e9.97b6.e99e.397e.518f.e3e4.1a11.8ca1] + == + :: + :* [%base58 0c1LqBGSKuX5yYUonjxT5qGfpUsXKYYWeabA] + [wid=25 dat=0x76.a914.d986.ed01.b7a2.2225.a70e.dbf2.ba7c.fb63.a15c.b3aa.88ac] + == + :: + :* [%base58 0cmxVFsFW5N4mu1HPkxPttorvocvzeZ7KZyk] + [wid=25 dat=0x76.a914.ba27.f99e.007c.7f60.5a83.05e3.18c1.abde.3cd2.20ac.88ac] + == + :: + :* [%base58 0cmfWxJ45yp2SFn7UciZyNpvDKrzbhyfKrY8] + [wid=25 dat=0x76.a914.0000.0000.0000.0000.0000.0000.0000.0000.0000.0000.88ac] + == + :: + :* [%base58 0c37VucYSaXLCAsxYyAPfbSi9eh4iEcbShgf] + [wid=23 dat=0xa9.143f.b6e9.5812.e57b.b469.1f9a.4a62.8862.a61a.4f76.9b87] + == + :: + :* [%base58 0c2MvLWCyKPQQ6oqJKSJ9ic8hYVmLyNry6yuF] + [wid=23 dat=0xa9.1421.e7fe.f309.cf6f.6cfc.fe94.c572.e541.d74f.d848.5487] + == + == +:: +++ mk-pubkey +|= [=xpub =chyg =idx] + ^- hexb + =/ pk=@ux + %- compress-point:ecc + pub:(derive-public:(derive-public:(from-extended:bip32 (trip xpub)) (@ chyg)) idx) + [(met 3 pk) pk] +:: +++ test-all-vectors +^- tang + |^ ;: weld + %+ category "bit manipulation" + (zing (turn bits-vectors check-bits)) + %+ category "compact-size en/decoding" + (zing (turn compact-size-vectors check-compact-size)) + %+ category "check TX en/decoding" + (zing (turn tx-vectors check-tx)) + %+ category "xpub parsing" + (zing (turn xpub-vectors check-xpub-parsing)) + %+ category "pubkey derivation" + (zing (turn xpub-vectors check-pubkey-derivation)) + %+ category "address derivation" + (zing (turn xpub-vectors check-address-derivation)) + %+ category "script-pubkey derivation" + (zing (turn script-pubkey-vectors check-script-pubkey-derivation)) + == + :: + ++ check-bits + |= v=bits-vector + ;: weld + :: TODO: from-atoms works, but to-atoms doesn't + %+ expect-eq + !>(bits.v) + !>((from-atoms:bit bitwidth.v atoms.v)) + %+ expect-eq + !>(atoms.v) + !>((to-atoms:bit bitwidth.v bits.v)) + == + :: + ++ check-compact-size + |= v=compact-size-vector + %+ expect-eq + !>(v) + !>(dat:n:(de:csiz (en:csiz v))) + :: + ++ check-tx + |= v=tx-vector + %+ expect-eq + !>(txid.v) + !>((get-id:txu (decode:txu (from-cord:hxb hex-cord.v)))) + :: + ++ check-xpub-parsing + |= v=xpub-vector + =/ [b=bipt n=network] (xpub-type xpub.v) + %+ expect-eq + !>([b n]) + !>([bipt.hdpath.v network.v]) + :: + ++ check-pubkey-derivation + |= v=xpub-vector + %+ expect-eq + !>(pubkey.v) + !>((mk-pubkey xpub.v chyg.hdpath.v idx.hdpath.v)) + :: + ++ check-address-derivation + |= v=xpub-vector + =/ [b=bipt n=network] (xpub-type xpub.v) + %+ expect-eq + !>(address.v) + !>((from-pubkey:adr b n pubkey.v)) + :: + ++ check-script-pubkey-derivation + |= v=script-pubkey-vector + %+ expect-eq + !>(spk.v) + !>((to-script-pubkey:adr address.v)) + -- +:: +-- diff --git a/pkg/arvo/tests/lib/btc.hoon b/pkg/arvo/tests/lib/btc.hoon new file mode 100644 index 0000000000..9fffe31b19 --- /dev/null +++ b/pkg/arvo/tests/lib/btc.hoon @@ -0,0 +1,190 @@ +/- bc=bitcoin +/+ *test, *btc +|% ++$ wallet-vector + $: =xpub:bc + =chyg + =idx:bc + =address:bc + == ++$ vector + $: =xpub:bc + eny=@uv + block=@ud + feyb=sats + ins=(list insel) + outs=(list txo) + expect=[selected=(unit (list insel)) chng=(unit sats:bc)] + == +++ mk-utxo + |= value=sats:bc + ^- utxo:bc + :* pos=0 + [wid=32 dat=0xc493.f6f1.4668.5f76.b44f.0c77.ca88.120c.b8bc.89f5.34fe.69b6.8288.27b9.74e6.8849] + height=3 + value + recvd=~ + == +:: +++ fprint 4^0xdead.beef +:: +++ wallet-vectors + ^- (list wallet-vector) + :~ :* 'zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs' + %0 + 0 + [%bech32 'bc1qcr8te4kr609gcawutmrza0j4xv80jy8z306fyu'] + == + == +:: +++ vectors + =| w=walt + ^- (list vector) + :~ :* 'zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs' + 0v3uc.iuebi.5qilc.l8d87.c1k6n.7iksq.nkobs.8s5he.raq40.9ff0b.5tj3u.kjtg7.aq59e.hatv7.oioam.mlsr4.pqqcd.cnbjn.pnpi2.1m5rt.k4scg + 999 + 10 + :~ [(mk-utxo 200.000) %0 1] + [(mk-utxo 500.000) %0 2] + [(mk-utxo 204) %0 3] + [(mk-utxo 235.000) %1 2] + == + :~ [[%bech32 'bc1q59u5epktervh6fxqay2dlph0wxu9hjnx6v8n66'] 200.100 ~] + [[%bech32 'bc1qlwd7mw33uea5m8r2lsnsrkc7gp2qynrxsfxpfm'] 200.000 ~] + == + :* `~[[(mk-utxo 500.000) %0 2]] + `332.500 + == + == + :: + :* 'zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs' + 0v1gt.mc4ca.lfs0m.q1dal.lqobu.mmlbd.2umnp.lj9dr.4pf4s.pvclr.dps96.4a6i8.rt6n9.krp0r.11kqu.ckqe4.1tmat.gr754.463aj.a4b41.jj7qg + 999 + 10 + :~ [(mk-utxo 200.000) %0 1] + [(mk-utxo 500.000) %0 2] + [(mk-utxo 204) %0 3] + [(mk-utxo 235.000) %1 2] + == + :~ [[%bech32 'bc1q59u5epktervh6fxqay2dlph0wxu9hjnx6v8n66'] 200.100 ~] + [[%bech32 'bc1qlwd7mw33uea5m8r2lsnsrkc7gp2qynrxsfxpfm'] 200.000 ~] + == + :* `~[[(mk-utxo 235.000) %1 2] [(mk-utxo 200.000) %0 1]] + `297.500 + == + == + :: + :* 'zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs' + 0v1gt.mc4ca.lfs0m.q1dal.lqobu.mmlbd.2umnp.lj9dr.4pf4s.pvclr.dps96.4a6i8.rt6n9.krp0r.11kqu.ckqe4.1tmat.gr754.463aj.a4b41.jj7qg + 999 + 10 + ~[[(mk-utxo 500.000) %0 2]] + :~ [[%bech32 'bc1q59u5epktervh6fxqay2dlph0wxu9hjnx6v8n66'] 299.797 ~] + [[%bech32 'bc1qlwd7mw33uea5m8r2lsnsrkc7gp2qynrxsfxpfm'] 200.000 ~] + == + :* *(unit (list insel)) + *(unit sats:bc) + == + == + :* 'zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs' + 0v1gt.mc4ca.lfs0m.q1dal.lqobu.mmlbd.2umnp.lj9dr.4pf4s.pvclr.dps96.4a6i8.rt6n9.krp0r.11kqu.ckqe4.1tmat.gr754.463aj.a4b41.jj7qg + 999 + 10 + ~[[(mk-utxo 500.000) %0 2]] + :~ [[%bech32 'bc1q59u5epktervh6fxqay2dlph0wxu9hjnx6v8n66'] 298.500 ~] + [[%bech32 'bc1qlwd7mw33uea5m8r2lsnsrkc7gp2qynrxsfxpfm'] 200.000 ~] + == + :* `~[[(mk-utxo 500.000) %0 2]] + *(unit sats:bc) + == + == + == +:: +++ dust-output-vectors + =| w=walt + ^- (list vector) + :~ + :* 'zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs' + 0v1gt.mc4ca.lfs0m.q1dal.lqobu.mmlbd.2umnp.lj9dr.4pf4s.pvclr.dps96.4a6i8.rt6n9.krp0r.11kqu.ckqe4.1tmat.gr754.463aj.a4b41.jj7qg + 999 + 10 + ~[[(mk-utxo 500.000) %0 2]] + :~ [[%bech32 'bc1q59u5epktervh6fxqay2dlph0wxu9hjnx6v8n66'] 298.580 ~] + [[%bech32 'bc1qlwd7mw33uea5m8r2lsnsrkc7gp2qynrxsfxpfm'] 204 ~] + == + :* `~[[(mk-utxo 500.000) %0 2]] + *(unit sats:bc) + == + == + == +:: +++ test-all-vectors + ^- tang + |^ ;: weld + %+ category "address generation/lookup" + (zing (turn wallet-vectors address-gen-lookup)) + %+ category "single-random-draw" + (zing (turn vectors check-single-random-draw)) + :: + %+ category "select with change" + (zing (turn vectors check-change)) + :: + %+ category "don't allow dust outputs" + (zing (turn dust-output-vectors check-dust-output)) + == + :: + ++ address-gen-lookup + |= v=wallet-vector + =/ w=walt (from-xpub xpub.v fprint ~ ~ ~) + =/ =address (~(mk-address wad w chyg.v) idx.v) + =. w (~(update-address wad w chyg.v) address [%.n %0 0 *(set utxo:bc)]) + =/ [w2=walt c=chyg i=idx] (need (address-coords address ~[w])) + ;: weld + %+ expect-eq + !>(address) + !>(address.v) + %+ expect-eq + !>([w2 c i]) + !>([w chyg.v idx.v]) + == + :: + ++ check-single-random-draw + |= v=vector + =/ w=walt (from-xpub xpub.v fprint ~ ~ ~) + %+ expect-eq + !>(selected.expect.v) + !>((~(single-random-draw sut [w eny.v block.v ~ feyb.v outs.v]) ins.v)) + :: + ++ check-change + |= v=vector + =/ w=walt (from-xpub xpub.v fprint ~ ~ ~) + =. wach.w + %- ~(gas by *(map address:bc addi)) + %+ turn ins.v + |= i=insel + :- (~(mk-address wad w chyg.i) idx.i) + [%.y %0 0 (sy ~[utxo.i])] + %+ expect-eq + !>(chng.expect.v) + !>(chng:~(with-change sut [w eny.v block.v ~ feyb.v outs.v])) + :: + ++ check-dust-output + |= v=vector + =/ w=walt (from-xpub xpub.v fprint ~ ~ ~) + =. wach.w (insels-to-wach w ins.v) + %- expect-fail + |.(~(with-change sut [w eny.v block.v ~ feyb.v outs.v])) + :: + ++ insels-to-wach + |= [w=walt is=(list insel)] + ^- wach + %- ~(gas by *(map address:bc addi)) + %+ turn is + |= i=insel + :- (~(mk-address wad w chyg.i) idx.i) + [%.y %0 0 (sy ~[utxo.i])] + -- + :: if a non-change output is dust, error + :: change shouldn't be returned when change is dust + :: +-- diff --git a/pkg/arvo/tests/lib/naive.hoon b/pkg/arvo/tests/lib/naive.hoon index 6c987924a3..396d4c8138 100644 --- a/pkg/arvo/tests/lib/naive.hoon +++ b/pkg/arvo/tests/lib/naive.hoon @@ -6,6 +6,7 @@ :: ++ n |=([=^state:naive =^input:naive] (%*(. naive lac &) verifier 1.337 +<)) :: +++ orm ((on ship point:naive) por:naive) ++ addr address-from-prv:key:ethereum :: :: The next section of this core generates "universes" of Azimuth points, each @@ -980,6 +981,8 @@ ++ rigred-mgmt [~rigred %manage] :: -- +=/ init-rut-simple (init-rut-full *^state:naive) +=/ init-red-simple (init-red-full *^state:naive) :: :: Tests :: @@ -1005,7 +1008,7 @@ :: =/ event-jar gen-rut-jar =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =/ initial-state state =/ ship-list rut-ship-list =/ suc-map (make-success-map make-event-list) @@ -1028,7 +1031,7 @@ %+ category (weld "correct nonce? " (scow %f nonce.cur-event)) %+ category (weld "success map " (scow %f (~(got by suc-map) cur-event))) :: - =/ cur-point (~(got by points.initial-state) cur-ship) + =/ cur-point (got:orm points.initial-state cur-ship) =* own own.cur-point =/ cur-nonce ?- proxy.cur-event @@ -1083,7 +1086,7 @@ ++ set-keys ^- ^state:naive =/ new-keys %= cur-point - life.keys.net +(life.keys.net:(~(got by points.initial-state) cur-ship)) + life.keys.net +(life.keys.net:(got:orm points.initial-state cur-ship)) suite.keys.net suit auth.keys.net auth crypt.keys.net encr @@ -1132,7 +1135,7 @@ == =/ expect-state (alter-state cur-point) :: this updates the nonce of the spawner %= expect-state - points (~(put by points.expect-state) ship spawned) + points (put:orm points.expect-state ship spawned) == :: ++ alter-state @@ -1148,7 +1151,7 @@ %transfer alt-point(nonce.transfer-proxy.own new-nonce) == %= expect-state - points (~(put by points.expect-state) cur-ship updated-point) + points (put:orm points.expect-state cur-ship updated-point) == :: -- :: end of expected state @@ -1266,9 +1269,9 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state (escape-requested:l1 ~rabsum-ravtyd ~rigred)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: ++ test-rut-l1-l2-escape-l1 ^- tang :: L1-escape A1 | * | * | * | * | -> | A1 | A1 | * | * @@ -1279,9 +1282,9 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state (escape-requested:l1 ~larsyx-mapmeg ~losred)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) :: ++ test-rut-l2-lx-escape-l1 ^- tang :: L2 ships can't escape on L1 @@ -1292,9 +1295,9 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state (escape-requested:l1 ~dovmul-mogryt ~rigred)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) :: :: escaping to L2 ship %+ expect-eq @@ -1302,9 +1305,9 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state (escape-requested:l1 ~pinpun-pilsun ~losred)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) == :: ++ test-red-l2-l2-adopt-l2-1 ^- tang @@ -1318,18 +1321,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 pp-adopt %losred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) :: %+ expect-eq !> [~ %.y ~losred] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 pp-m-adopt %losred-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) == :: ++ test-red-l1-l2-adopt-l2-1 @@ -1343,18 +1346,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 lm-adopt %losred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) :: %+ expect-eq !> [~ %.y ~losred] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 lm-m-adopt %losred-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) == :: ++ test-red-l2-l1-adopt-l2-1 @@ -1368,18 +1371,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 dm-adopt %rigred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) :: %+ expect-eq !> [~ %.y ~rigred] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 dm-m-adopt %rigred-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) == :: ++ test-red-l1-l1-adopt-l2-1 @@ -1393,18 +1396,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.y ~rigred] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 rr-m-adopt %rigred-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) == :: ++ test-red-l1-l1-adopt-l2-2 @@ -1418,18 +1421,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 rr-adopt %losred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [[~ ~rigred] %.y ~holrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 rr-m-adopt %losred-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) == :: ++ test-rut-l1-l1-adopt-l2-3 ^- tang @@ -1444,7 +1447,7 @@ =/ rr-batch-1=tx-list (limo ~[rr-h-detach rr-adopt]) =/ rr-batch-2=tx-list (limo ~[rr-h-m-detach rr-m-adopt]) :: - =/ init-state=^state:naive +:(init-rut-full *^state:naive) + =/ init-state=^state:naive +:init-rut-simple ;: weld %+ expect-eq !> [~ %.n ~holrut] @@ -1453,7 +1456,7 @@ =| =^state:naive =^ f state (n init-state %bat q:(gen-tx rr-h-detach)) =^ f state (n state %bat q:(gen-tx rr-adopt)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.n ~holrut] @@ -1461,7 +1464,7 @@ !> =| =^state:naive =^ f state (n init-state %bat (tx-list-to-batch rr-batch-1)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.n ~holrut] @@ -1470,7 +1473,7 @@ =| =^state:naive =^ f state (n init-state %bat q:(gen-tx rr-h-m-detach)) =^ f state (n state %bat q:(gen-tx rr-m-adopt)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.n ~holrut] @@ -1478,7 +1481,7 @@ !> =| =^state:naive =^ f state (n init-state %bat (tx-list-to-batch rr-batch-2)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) == :: :: the following tests L2 %rejects @@ -1493,18 +1496,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 pp-reject %losred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) :: %+ expect-eq !> [~ %.y ~losrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 pp-m-reject %losred-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) == :: ++ test-red-l2-l1-reject-l2-1 ^- tang @@ -1518,18 +1521,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 dm-reject %rigred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) :: %+ expect-eq !> [~ %.y ~holrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 dm-m-reject %rigred-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) == :: ++ test-red-l1-l2-reject-l2-1 ^- tang @@ -1543,18 +1546,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 lm-reject %losred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) :: %+ expect-eq !> [~ %.y ~rigrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 lm-m-reject %losred-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) == :: ++ test-red-l1-l1-reject-l2-1 ^- tang @@ -1568,18 +1571,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 rr-reject %rigred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.y ~holrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 rr-m-reject %rigred-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) == ++ test-red-l2-l2-reject-l2-2 ^- tang :: L2-reject A1 | * | A2 | * | * | -> | * | A2 | * | * @@ -1592,18 +1595,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) - =^ f state (n state %bat q:(gen-tx 3 pp-reject %losrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + =^ f state init-red-simple + =^ f state (n state %bat q:(gen-tx 2 pp-reject %losrut-key-0)) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) :: %+ expect-eq !> [[~ ~losred] %.y ~losrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 pp-m-reject %losrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) == :: ++ test-red-l2-l1-reject-l2-2 ^- tang @@ -1617,18 +1620,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 1 dm-reject %holrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) :: %+ expect-eq !> [[~ ~rigred] %.y ~holrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 dm-m-reject %holrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) == :: ++ test-red-l1-l2-reject-l2-2 ^- tang @@ -1642,18 +1645,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 lm-reject %rigrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) :: %+ expect-eq !> [[~ ~losred] %.y ~rigrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 lm-m-reject %rigrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) == :: ++ test-red-l1-l1-reject-l2-2 ^- tang @@ -1667,18 +1670,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 1 rr-reject %holrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [[~ ~rigred] %.y ~holrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 rr-m-reject %holrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) == :: ++ test-red-l1-l1-reject-l2-3 ^- tang @@ -1692,18 +1695,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 1 rt-reject %holrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~radres-tinnyl) + [escape.net sponsor.net]:(got:orm points.state ~radres-tinnyl) :: %+ expect-eq !> [~ %.y ~losrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 rt-m-reject %holrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~radres-tinnyl) + [escape.net sponsor.net]:(got:orm points.state ~radres-tinnyl) == :: :: the following tests L2 %cancel-escape @@ -1719,18 +1722,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) - =^ f state (n state %bat q:(gen-tx 3 pp-cancel-escape %losrut-pp-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + =^ f state init-red-simple + =^ f state (n state %bat q:(gen-tx 2 pp-cancel-escape %losrut-pp-key-0)) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) :: %+ expect-eq !> [~ %.y ~losrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 pp-m-cancel-escape %losrut-pp-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) == :: ++ test-red-l2-l1-cancel-escape-l2 ^- tang @@ -1744,18 +1747,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) - =^ f state (n state %bat q:(gen-tx 3 dm-cancel-escape %holrut-dm-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + =^ f state init-red-simple + =^ f state (n state %bat q:(gen-tx 2 dm-cancel-escape %holrut-dm-key-0)) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) :: %+ expect-eq !> [~ %.y ~holrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 dm-m-cancel-escape %holrut-dm-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) == :: ++ test-red-l1-l2-cancel-escape-l2 ^- tang @@ -1769,18 +1772,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 1 lm-cancel-escape %rigrut-lm-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) :: %+ expect-eq !> [~ %.y ~rigrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 lm-m-cancel-escape %rigrut-lm-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) == :: ++ test-red-l1-l1-cancel-escape-l2 ^- tang @@ -1794,18 +1797,18 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 1 rr-cancel-escape %holrut-rr-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.y ~holrut] :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 rr-m-cancel-escape %holrut-rr-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) == :: :: the following tests L2 %detach. the format test-rut-X-Y-detach means @@ -1822,18 +1825,18 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) - =^ f state (n state %bat q:(gen-tx 3 pp-detach %losrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + =^ f state init-rut-simple + =^ f state (n state %bat q:(gen-tx 2 pp-detach %losrut-key-0)) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) :: %+ expect-eq !> [~ %.n ~losrut] :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 0 pp-m-detach %losrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~pinpun-pilsun) + [escape.net sponsor.net]:(got:orm points.state ~pinpun-pilsun) == :: ++ test-rut-l2-l1-detach-l2-1 ^- tang @@ -1847,18 +1850,18 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) - =^ f state (n state %bat q:(gen-tx 3 rt-detach %losrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~radres-tinnyl) + =^ f state init-rut-simple + =^ f state (n state %bat q:(gen-tx 2 rt-detach %losrut-key-0)) + [escape.net sponsor.net]:(got:orm points.state ~radres-tinnyl) :: %+ expect-eq !> [~ %.n ~losrut] :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 0 rt-m-detach %losrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~radres-tinnyl) + [escape.net sponsor.net]:(got:orm points.state ~radres-tinnyl) == :: ++ test-rut-l1-l2-detach-l2-1 ^- tang @@ -1872,18 +1875,18 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 1 dm-detach %holrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) :: %+ expect-eq !> [~ %.n ~holrut] :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 0 dm-m-detach %holrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~dovmul-mogryt) + [escape.net sponsor.net]:(got:orm points.state ~dovmul-mogryt) == :: ++ test-rut-l1-l1-detach-l2-1 ^- tang @@ -1897,18 +1900,18 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 0 lm-detach %rigrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) :: %+ expect-eq !> [~ %.n ~rigrut] :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 0 lm-m-detach %rigrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) == :: ++ test-rut-l1-l1-detach-l2-2 ^- tang @@ -1924,18 +1927,18 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 0 rr-detach %rigrut-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.y ~holrut] :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 0 rr-m-detach %rigrut-mkey-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) == :: ++ test-rut-l1-l1-detach-l2-3 ^- tang @@ -1951,7 +1954,7 @@ =/ rr-detach-batch-1=tx-list (limo rr-h-detach rr-detach ~) =/ rr-detach-batch-2=tx-list (limo rr-h-m-detach rr-m-detach ~) :: - =/ init-state=^state:naive +:(init-rut-full *^state:naive) + =/ init-state=^state:naive +:init-rut-simple ;: weld %+ expect-eq !> [~ %.n ~holrut] @@ -1960,7 +1963,7 @@ =| =^state:naive =^ f state (n init-state %bat q:(gen-tx rr-h-detach)) =^ f state (n state %bat q:(gen-tx rr-detach)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.n ~holrut] @@ -1968,7 +1971,7 @@ !> =| =^state:naive =^ f state (n init-state %bat (tx-list-to-batch rr-detach-batch-1)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.n ~holrut] @@ -1977,7 +1980,7 @@ =| =^state:naive =^ f state (n init-state %bat q:(gen-tx rr-h-m-detach)) =^ f state (n state %bat q:(gen-tx rr-m-detach)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.n ~holrut] @@ -1985,7 +1988,7 @@ !> =| =^state:naive =^ f state (n init-state %bat (tx-list-to-batch rr-detach-batch-2)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) == :: @@ -1997,10 +2000,10 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state (escape-requested:l1 ~rabsum-ravtyd ~rigred)) =^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: :: The following test fails but only because ecliptic.sol only allows :: an adopt when its valid to do so. @@ -2012,15 +2015,15 @@ :: :: :: !> :: =| =^state:naive -:: =^ f state (init-red-full state) +:: =^ f state init-red-simple :: =^ f state (n state (escape-accepted:l1 ~rabsum-ravtyd ~rigred)) -:: [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) +:: [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: ++ test-rut-l1-adoption-on-l2-wrong-key-or-nonce =/ rr-escape [[~rabsum-ravtyd %own] %escape ~rigred] =/ rr-adopt [rigred-own %adopt ~rabsum-ravtyd] :: - =/ init-state +:(init-rut-full *^state:naive) + =/ init-state +:init-rut-simple :: ;: weld %+ expect-eq @@ -2030,7 +2033,7 @@ =| =^state:naive =^ f state (n init-state %bat q:(gen-tx 1 rr-escape %wrong-key)) =^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: %+ expect-eq !> [~ %.y ~holrut] @@ -2039,7 +2042,7 @@ =| =^state:naive =^ f state (n init-state %bat q:(gen-tx 999 rr-escape %holrut-rr-key-0)) =^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) == :: ++ test-own-sponsor-l2-escape @@ -2053,9 +2056,9 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) - =^ f state (n state %bat q:(gen-tx 1 rr-escape %holrut-rr-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + =^ f state init-rut-simple + =^ f state (n state %bat q:(gen-tx 0 rr-escape %holrut-rr-key-0)) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: ++ test-rut-l1-detach-1 :: L1-detach A1 | * | * | A1 | A1 | -> | * | * | ~ | ~ @@ -2078,11 +2081,11 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 0 rr-escape %holrut-rr-key-0)) =^ f state (n state %bat q:(gen-tx 1 rr-adopt %holrut-key-0)) =^ f state (n state (lost-sponsor:l1 ~rabsum-ravtyd ~holrut)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: ++ test-red-l1-detach-2 :: this takes a L1 planet with L1 sponsor that acquires a L2 sponsor @@ -2097,10 +2100,10 @@ :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =^ f state (n state %bat q:(gen-tx 0 lm-adopt %losred-key-0)) =^ f state (n state (lost-sponsor:l1 ~larsyx-mapmeg ~rigrut)) - [escape.net sponsor.net]:(~(got by points.state) ~larsyx-mapmeg) + [escape.net sponsor.net]:(got:orm points.state ~larsyx-mapmeg) :: ++ test-rut-l1-detach-3 :: L1-detach A1 | * | * | A1 | ~ | -> | * | * | ~ | ~ @@ -2113,12 +2116,12 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state %bat q:(gen-tx 1 rr-detach %holrut-key-0)) =^ f state (n state (escape-requested:l1 ~rabsum-ravtyd ~holrut)) =^ f state (n state (escape-accepted:l1 ~rabsum-ravtyd ~holrut)) =^ f state (n state (lost-sponsor:l1 ~rabsum-ravtyd ~holrut)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: :: This test is commented since ecliptic.sol will not allow a cancel :: if not escaping, so this row of the table cannot be tested here. @@ -2131,9 +2134,9 @@ :: :: :: !> :: =| =^state:naive -:: =^ f state (init-rut-full state) +:: =^ f state init-rut-simple :: =^ f state (n state (escape-canceled:l1 ~rabsum-ravtyd ~rigred)) -:: escape.net:(~(got by points.state) ~rabsum-ravtyd) +:: escape.net:(got:orm points.state ~rabsum-ravtyd) :: ++ test-rut-l1-cancel-2 :: L1-cancel A1 | A1 | * | * | * | -> | ~ | ~ | * | * @@ -2142,10 +2145,10 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state (escape-requested:l1 ~rabsum-ravtyd ~rigred)) =^ f state (n state (escape-canceled:l1 ~rabsum-ravtyd ~rigred)) - escape.net:(~(got by points.state) ~rabsum-ravtyd) + escape.net:(got:orm points.state ~rabsum-ravtyd) :: ++ test-rut-l1-adopt-1 :: L1-adopt A1 | A1 | * | * | * | -> | ~ | ~ | A1 | A2 @@ -2154,10 +2157,10 @@ :: !> =| =^state:naive - =^ f state (init-rut-full state) + =^ f state init-rut-simple =^ f state (n state (escape-requested:l1 ~rabsum-ravtyd ~rigred)) =^ f state (n state (escape-accepted:l1 ~rabsum-ravtyd ~rigred)) - [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) + [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: :: These commented out tests fail, but it is because L1 adopt is only :: accepted if the ecliptic.sol allows it. So these rows of the table @@ -2170,9 +2173,9 @@ :: :: :: !> :: =| =^state:naive -:: =^ f state (init-rut-full state) +:: =^ f state init-rut-simple :: =^ f state (n state (escape-accepted:l1 ~rabsum-ravtyd ~rigred)) -:: [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) +:: [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: :: :: ++ test-rut-l1-adopt-3 :: :: L1-adopt A1 | A2 | * | * | * | -> !! :: no adopt if not escaping @@ -2181,20 +2184,20 @@ :: :: :: !> :: =| =^state:naive -:: =^ f state (init-rut-full state) +:: =^ f state init-rut-simple :: =^ f state (n state (escape-requested:l1 ~rabsum-ravtyd ~rigrut)) :: =^ f state (n state (escape-accepted:l1 ~rabsum-ravtyd ~rigred)) -:: [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) +:: [escape.net sponsor.net]:(got:orm points.state ~rabsum-ravtyd) :: ++ test-marbud-l2-change-keys-whole-state ^- tang =/ new-keys [%configure-keys encr auth suit |] =| =^state:naive =^ f state (init-marbud state) - =/ marbud-point (~(got by points.state) ~marbud) + =/ marbud-point (got:orm points.state ~marbud) =/ new-marbud marbud-point(keys.net [1 suit auth encr], nonce.owner.own 1) :: %+ expect-eq - !> state(points (~(put by points.state) ~marbud new-marbud)) + !> state(points (put:orm points.state ~marbud new-marbud)) :: !> =^ f state (n state %bat q:(gen-tx 0 [marbud-own new-keys] %marbud-key-0)) @@ -2225,7 +2228,7 @@ !> =| =^state:naive =^ f state (init-marbud state) - dominion:(~(got by points.state) ~marbud) + dominion:(got:orm points.state ~marbud) :: ++ test-transfer-batch ^- tang =/ marbud-transfer [0 [marbud-own %transfer-point (addr %marbud-key-0) |] %marbud-key-0] @@ -2243,7 +2246,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx marbud-transfer)) =^ f state (n state %bat q:(gen-tx marbud-transfer-2)) - owner.own:(~(got by points.state) ~marbud) + owner.own:(got:orm points.state ~marbud) :: %+ expect-eq !> [(addr %marbud-key-1) 2] @@ -2252,7 +2255,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat (tx-list-to-batch marbud-batch)) - owner.own:(~(got by points.state) ~marbud) + owner.own:(got:orm points.state ~marbud) == :: ++ test-l1-changed-spawn-proxy ^- tang @@ -2263,7 +2266,7 @@ =| =^state:naive =^ f state (init-bud state) =^ f state (n state (changed-spawn-proxy:l1 ~bud (addr %bud-skey))) - spawn-proxy.own:(~(got by points.state) ~bud) + spawn-proxy.own:(got:orm points.state ~bud) :: ++ test-l1-changed-transfer-proxy ^- tang %+ expect-eq @@ -2273,7 +2276,7 @@ =| =^state:naive =^ f state (init-bud state) =^ f state (n state (changed-transfer-proxy:l1 ~bud (addr %bud-key-1))) - transfer-proxy.own:(~(got by points.state) ~bud) + transfer-proxy.own:(got:orm points.state ~bud) :: ++ test-l1-changed-management-proxy ^- tang %+ expect-eq @@ -2283,7 +2286,7 @@ =| =^state:naive =^ f state (init-bud state) =^ f state (n state (changed-management-proxy:l1 ~bud (addr %bud-mkey))) - management-proxy.own:(~(got by points.state) ~bud) + management-proxy.own:(got:orm points.state ~bud) :: ++ test-l1-changed-voting-proxy ^- tang %+ expect-eq @@ -2293,7 +2296,7 @@ =| =^state:naive =^ f state (init-bud state) =^ f state (n state (changed-voting-proxy:l1 ~bud (addr %bud-vkey))) - voting-proxy.own:(~(got by points.state) ~bud) + voting-proxy.own:(got:orm points.state ~bud) :: ++ test-l1-changed-keys ^- tang =/ life 1 @@ -2306,7 +2309,7 @@ =| =^state:naive =^ f state (init-bud state) =^ f state (n state (changed-keys:l1 new-keys)) - |1:keys.net:(~(got by points.state) ~bud) + |1:keys.net:(got:orm points.state ~bud) :: ++ test-l1-star-escape-requested ^- tang %+ expect-eq @@ -2317,7 +2320,7 @@ =^ f state (init-wes state) =^ f state (init-sambud state) =^ f state (n state (escape-requested:l1 ~sambud ~wes)) - escape.net:(~(got by points.state) ~sambud) + escape.net:(got:orm points.state ~sambud) :: ++ test-l1-star-escape-canceled ^- tang %+ expect-eq @@ -2329,7 +2332,7 @@ =^ f state (init-sambud state) =^ f state (n state (escape-requested:l1 ~sambud ~wes)) =^ f state (n state (escape-canceled:l1 ~sambud ~wes)) - escape.net:(~(got by points.state) ~sambud) + escape.net:(got:orm points.state ~sambud) :: ++ test-l1-star-adopt-accept ^- tang %+ expect-eq @@ -2341,7 +2344,7 @@ =^ f state (init-sambud state) =^ f state (n state (escape-requested:l1 ~sambud ~wes)) =^ f state (n state (escape-accepted:l1 ~sambud ~wes)) - [escape.net sponsor.net]:(~(got by points.state) ~sambud) + [escape.net sponsor.net]:(got:orm points.state ~sambud) :: ++ test-l1-star-lost-sponsor ^- tang %+ expect-eq @@ -2351,7 +2354,7 @@ =| =^state:naive =^ f state (init-sambud state) =^ f state (n state (lost-sponsor:l1 ~sambud ~bud)) - [escape.net sponsor.net]:(~(got by points.state) ~sambud) + [escape.net sponsor.net]:(got:orm points.state ~sambud) :: ++ test-l2-set-spawn-proxy ^- tang =/ marbud-sproxy [marbud-own %set-spawn-proxy (addr %marbud-skey)] @@ -2363,7 +2366,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 marbud-sproxy %marbud-key-0)) - spawn-proxy.own:(~(got by points.state) ~marbud) + spawn-proxy.own:(got:orm points.state ~marbud) :: ++ test-l2-set-transfer-proxy ^- tang =/ marbud-tproxy [marbud-own %set-transfer-proxy (addr %marbud-tkey)] @@ -2375,7 +2378,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 marbud-tproxy %marbud-key-0)) - transfer-proxy.own:(~(got by points.state) ~marbud) + transfer-proxy.own:(got:orm points.state ~marbud) :: ++ test-l2-set-management-proxy ^- tang =/ marbud-mproxy [marbud-own %set-management-proxy (addr %marbud-mkey)] @@ -2387,7 +2390,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 marbud-mproxy %marbud-key-0)) - management-proxy.own:(~(got by points.state) ~marbud) + management-proxy.own:(got:orm points.state ~marbud) :: ++ test-l2-dopbud-spawn-proxy-deposit ^- tang %+ expect-eq @@ -2396,7 +2399,7 @@ !> =| =^state:naive =^ f state (init-dopbud state) - dominion:(~(got by points.state) ~dopbud) + dominion:(got:orm points.state ~dopbud) :: ++ test-l2-sambud-spawn-proxy-predeposit ^- tang %+ expect-eq @@ -2407,7 +2410,7 @@ =^ f state (init-sambud state) =^ f state (n state (changed-spawn-proxy:l1 ~sambud (addr %sambud-skey))) =^ f state (n state (changed-spawn-proxy:l1 ~sambud deposit-address:naive)) - spawn-proxy.own:(~(got by points.state) ~sambud) + spawn-proxy.own:(got:orm points.state ~sambud) :: ++ test-l2-sambud-own-spawn-proxy-postdeposit ^- tang =/ sambud-sproxy [[~sambud %own] %set-spawn-proxy (addr %sambud-skey-0)] @@ -2419,7 +2422,7 @@ =^ f state (init-sambud state) =^ f state (n state (changed-spawn-proxy:l1 ~sambud deposit-address:naive)) =^ f state (n state %bat q:(gen-tx 0 sambud-sproxy %sambud-key-0)) - spawn-proxy.own:(~(got by points.state) ~sambud) + spawn-proxy.own:(got:orm points.state ~sambud) :: ++ test-l2-sambud-spawn-spawn-proxy-postdeposit ^- tang =/ sambud-sproxy [[~sambud %spawn] %set-spawn-proxy (addr %sambud-skey-1)] @@ -2432,7 +2435,7 @@ =^ f state (n state (changed-spawn-proxy:l1 ~sambud (addr %sambud-skey-0))) =^ f state (n state (changed-spawn-proxy:l1 ~sambud deposit-address:naive)) =^ f state (n state %bat q:(gen-tx 0 sambud-sproxy %sambud-skey-0)) - spawn-proxy.own:(~(got by points.state) ~sambud) + spawn-proxy.own:(got:orm points.state ~sambud) :: ++ test-l2-sambud-spawn-proxy-predeposit-spawn ^- tang =/ l2-sproxy [[~sambud %spawn] %set-spawn-proxy (addr %sambud-skey-1)] @@ -2447,7 +2450,7 @@ =^ f state (n state (changed-spawn-proxy:l1 ~sambud (addr %sambud-skey-0))) =^ f state (n state (changed-spawn-proxy:l1 ~sambud deposit-address:naive)) =^ f state (n state %bat q:(gen-tx 0 lf-spawn %sambud-skey-0)) - transfer-proxy.own:(~(got by points.state) ~lisdur-fodrys) + transfer-proxy.own:(got:orm points.state ~lisdur-fodrys) :: %+ expect-eq !> [`@ux`(addr %lf-key-0) 0] @@ -2459,7 +2462,7 @@ =^ f state (n state (changed-spawn-proxy:l1 ~sambud deposit-address:naive)) =^ f state (n state %bat q:(gen-tx 0 l2-sproxy %sambud-skey-0)) =^ f state (n state %bat q:(gen-tx 1 lf-spawn %sambud-skey-1)) - transfer-proxy.own:(~(got by points.state) ~lisdur-fodrys) + transfer-proxy.own:(got:orm points.state ~lisdur-fodrys) == ++ test-linnup-torsyx-spawn ^- tang :: try to spawn a L2 planet with a L2 planet @@ -2473,9 +2476,9 @@ =^ f state (init-litbud state) =^ f state (n state %bat q:(gen-tx 0 lt-spawn %marbud-key-0)) =^ f state (n state %bat q:(gen-tx 0 lt-transfer-yes-breach %lt-key-0)) - =/ lt-point (~(got by points.state) ~linnup-torsyx) + =/ lt-point (got:orm points.state ~linnup-torsyx) =/ new-lt lt-point(nonce.owner.own 1) - =/ no-op-state state(points (~(put by points.state) ~linnup-torsyx new-lt)) + =/ no-op-state state(points (put:orm points.state ~linnup-torsyx new-lt)) :: %+ expect-eq !> no-op-state @@ -2499,7 +2502,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 [marbud-own lt-spawn] %marbud-key-0)) - transfer-proxy.own:(~(got by points.state) ~linnup-torsyx) + transfer-proxy.own:(got:orm points.state ~linnup-torsyx) :: %+ expect-eq :: Tests l2 spawning with spawn proxy @@ -2510,7 +2513,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx marbud-sproxy)) =^ f state (n state %bat q:(gen-tx 0 [marbud-spn lt-spawn] %marbud-skey)) - transfer-proxy.own:(~(got by points.state) ~linnup-torsyx) + transfer-proxy.own:(got:orm points.state ~linnup-torsyx) :: %+ expect-eq :: Tests l2 spawning with spawn proxy as a batch @@ -2520,7 +2523,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat (tx-list-to-batch spawn-batch)) - transfer-proxy.own:(~(got by points.state) ~linnup-torsyx) + transfer-proxy.own:(got:orm points.state ~linnup-torsyx) == :: ++ test-marbud-l2-double-spawn ^- tang @@ -2532,9 +2535,9 @@ =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 marbud-sproxy %marbud-key-0)) =^ f state (n state %bat q:(gen-tx 1 lt-spawn-0 %marbud-key-0)) - =/ marbud-point (~(got by points.state) ~marbud) + =/ marbud-point (got:orm points.state ~marbud) =/ new-marbud marbud-point(nonce.spawn-proxy.own 1) - =/ no-op-state state(points (~(put by points.state) ~marbud new-marbud)) + =/ no-op-state state(points (put:orm points.state ~marbud new-marbud)) :: %+ expect-eq !> no-op-state @@ -2555,7 +2558,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 [marbud-own new-keys] %marbud-key-0)) - |1:keys.net:(~(got by points.state) ~marbud) + |1:keys.net:(got:orm points.state ~marbud) :: %+ expect-eq !> [suit auth encr] @@ -2565,7 +2568,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 marbud-mproxy %marbud-key-0)) =^ f state (n state %bat q:(gen-tx 0 [marbud-mgt new-keys] %marbud-mkey)) - |1:keys.net:(~(got by points.state) ~marbud) + |1:keys.net:(got:orm points.state ~marbud) :: == :: @@ -2605,7 +2608,7 @@ =^ f state (n state %bat q:(gen-tx marbud-tproxy)) =^ f state (n state %bat q:(gen-tx marbud-xfr-breach)) ^- [[@ @] [@ @] [@ @] [@ @] [@ @]] - own:(~(got by points.state) ~marbud) + own:(got:orm points.state ~marbud) :: %+ expect-eq :: batch version @@ -2623,7 +2626,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat (tx-list-to-batch test1)) ^- [[@ @] [@ @] [@ @] [@ @] [@ @]] - own:(~(got by points.state) ~marbud) + own:(got:orm points.state ~marbud) :: %+ expect-eq :: Tests that networking keys are reset on transfer with breach @@ -2635,7 +2638,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx marbud-new-keys)) =^ f state (n state %bat q:(gen-tx marbud-transfer-breach)) - |1:keys.net:(~(got by points.state) ~marbud) + |1:keys.net:(got:orm points.state ~marbud) :: %+ expect-eq :: batch version @@ -2646,7 +2649,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat (tx-list-to-batch test2)) - |1:keys.net:(~(got by points.state) ~marbud) + |1:keys.net:(got:orm points.state ~marbud) :: %+ expect-eq :: Tests that proxies are not reset when transfering without breach @@ -2666,7 +2669,7 @@ =^ f state (n state %bat q:(gen-tx marbud-tproxy)) =^ f state (n state %bat q:(gen-tx marbud-xfr-no-breach)) ^- [[@ @] [@ @] [@ @] [@ @] [@ @]] - own:(~(got by points.state) ~marbud) + own:(got:orm points.state ~marbud) :: %+ expect-eq :: batch version @@ -2683,7 +2686,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat (tx-list-to-batch test3)) ^- [[@ @] [@ @] [@ @] [@ @] [@ @]] - own:(~(got by points.state) ~marbud) + own:(got:orm points.state ~marbud) :: %+ expect-eq :: Tests that networking keys are not reset when transfering without breach @@ -2695,7 +2698,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx marbud-new-keys)) =^ f state (n state %bat q:(gen-tx marbud-transfer-no-breach)) - |1:keys.net:(~(got by points.state) ~marbud) + |1:keys.net:(got:orm points.state ~marbud) :: %+ expect-eq :: batch version @@ -2706,7 +2709,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat (tx-list-to-batch test4)) - |1:keys.net:(~(got by points.state) ~marbud) + |1:keys.net:(got:orm points.state ~marbud) == :: :: TODO: life+rift changes via transfer proxy @@ -2730,7 +2733,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 new-keys-no-reset %marbud-key-0)) =^ f state (n state %bat q:(gen-tx 1 new-keys-no-reset %marbud-key-0)) - [rift.net life.keys.net]:(~(got by points.state) ~marbud) + [rift.net life.keys.net]:(got:orm points.state ~marbud) :: %+ expect-eq :: breach=%.y @@ -2740,7 +2743,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 new-keys-yes-reset %marbud-key-0)) - [rift.net life.keys.net]:(~(got by points.state) ~marbud) + [rift.net life.keys.net]:(got:orm points.state ~marbud) :: %+ expect-eq :: networking keys set incremenets life, reset=%.y @@ -2754,7 +2757,7 @@ =^ f state (n state %bat q:(gen-tx 0 new-keys-yes-reset %marbud-key-0)) :: inc life and rift =^ f state (n state %bat q:(gen-tx 1 zero-keys-no-reset %marbud-key-0)) :: inc life =^ f state (n state %bat q:(gen-tx 2 zero-keys-yes-reset %marbud-key-0)) :: inc rift - [rift.net life.keys.net]:(~(got by points.state) ~marbud) + [rift.net life.keys.net]:(got:orm points.state ~marbud) :: %+ expect-eq :: Keep the same keys while breaching via %configure-keys @@ -2766,7 +2769,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 new-keys-yes-reset %marbud-key-0)) :: inc life and rift =^ f state (n state %bat q:(gen-tx 1 new-keys-yes-reset %marbud-key-0)) :: inc life and rift - [rift.net life.keys.net]:(~(got by points.state) ~marbud) + [rift.net life.keys.net]:(got:orm points.state ~marbud) :: %+ expect-eq :: @@ -2778,7 +2781,7 @@ =^ f state (n state %bat q:(gen-tx 0 new-keys-no-reset %marbud-key-0)) =^ f state (n state %bat q:(gen-tx 1 marbud-transfer-no-breach %marbud-key-0)) =^ f state (n state %bat q:(gen-tx 2 zero-keys-yes-reset %marbud-key-1)) - [rift.net life.keys.net]:(~(got by points.state) ~marbud) + [rift.net life.keys.net]:(got:orm points.state ~marbud) :: %+ expect-eq :: set networking keys, then transfer and set networking keys with breach @@ -2791,7 +2794,7 @@ =^ f state (n state %bat q:(gen-tx 0 new-keys-no-reset %marbud-key-0)) :: inc life =^ f state (n state %bat q:(gen-tx 1 marbud-transfer-yes-breach %marbud-key-0)) :: inc life and rift =^ f state (n state %bat q:(gen-tx 2 new-keys-no-reset %marbud-key-1)) ::inc life - [rift.net life.keys.net]:(~(got by points.state) ~marbud) + [rift.net life.keys.net]:(got:orm points.state ~marbud) :: %+ expect-eq :: networking keys set incremenets life, reset=%.y @@ -2805,7 +2808,7 @@ =^ f state (n state %bat q:(gen-tx 0 new-keys-yes-reset %marbud-key-0)) :: inc life and rift =^ f state (n state %bat q:(gen-tx 1 zero-keys-no-reset %marbud-key-0)) :: inc life =^ f state (n state %bat q:(gen-tx 2 marbud-transfer-yes-breach %marbud-key-0)) :: inc rift - [rift.net life.keys.net]:(~(got by points.state) ~marbud) + [rift.net life.keys.net]:(got:orm points.state ~marbud) :: == :: @@ -2819,7 +2822,7 @@ =| =^state:naive =^ f state (init-dopbud state) =^ f state (n state %bat q:(gen-tx 0 pp-spawn %dopbud-key-0)) - transfer-proxy.own:(~(got by points.state) ~palsep-picdun) + transfer-proxy.own:(got:orm points.state ~palsep-picdun) :: ++ test-dopbud-l2-spawn-after-transfer ^- tang =/ pp-spawn [dopbud-own %spawn ~palsep-picdun (addr %pp-key-0)] @@ -2834,7 +2837,7 @@ =^ f state (n state %bat q:(gen-tx 0 pp-spawn %dopbud-key-0)) =^ f state (n state (owner-changed:l1 ~dopbud (addr %dopbud-key-1))) =^ f state (n state %bat q:(gen-tx 1 lr-spawn %dopbud-key-1)) - transfer-proxy.own:(~(got by points.state) ~laclur-rachul) + transfer-proxy.own:(got:orm points.state ~laclur-rachul) :: ++ test-linnup-torsyx-l2-transfer-ownership ^- tang =/ lt-spawn [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)] @@ -2848,7 +2851,7 @@ =^ f state (init-marbud state) =^ f state (n state %bat q:(gen-tx 0 lt-spawn %marbud-key-0)) =^ f state (n state %bat q:(gen-tx 0 [lt-xfr lt-transfer-yes-breach] %lt-key-0)) - owner.own:(~(got by points.state) ~linnup-torsyx) + owner.own:(got:orm points.state ~linnup-torsyx) :: ++ test-palsep-picdun-l2-transfer-ownership ^- tang =/ pp-xfr [~palsep-picdun %transfer] @@ -2862,7 +2865,7 @@ =^ f state (init-dopbud state) =^ f state (n state %bat q:(gen-tx 0 pp-spawn %dopbud-key-0)) =^ f state (n state %bat q:(gen-tx 0 pp-transfer-yes-breach %pp-key-0)) - owner.own:(~(got by points.state) ~palsep-picdun) + owner.own:(got:orm points.state ~palsep-picdun) :: ++ test-linnup-torsyx-l2-escape-request ^- tang =/ lt-spawn [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)] @@ -2878,7 +2881,7 @@ =^ f state (n state %bat q:(gen-tx 0 lt-spawn %marbud-key-0)) =^ f state (n state %bat q:(gen-tx 0 lt-transfer-yes-breach %lt-key-0)) =^ f state (n state %bat q:(gen-tx 0 [lt-own [%escape ~litbud]] %lt-key-0)) - escape.net:(~(got by points.state) ~linnup-torsyx) + escape.net:(got:orm points.state ~linnup-torsyx) :: ++ test-linnup-torsyx-l2-cancel-escape-request ^- tang =/ lt-spawn [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)] @@ -2895,7 +2898,7 @@ =^ f state (n state %bat q:(gen-tx 0 lt-transfer-yes-breach %lt-key-0)) =^ f state (n state %bat q:(gen-tx 0 [lt-own [%escape ~litbud]] %lt-key-0)) =^ f state (n state %bat q:(gen-tx 1 [lt-own [%cancel-escape ~litbud]] %lt-key-0)) - escape.net:(~(got by points.state) ~linnup-torsyx) + escape.net:(got:orm points.state ~linnup-torsyx) :: ++ test-linnup-torsyx-l2-adopt-accept ^- tang =/ lt-spawn [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)] @@ -2912,7 +2915,7 @@ =^ f state (n state %bat q:(gen-tx 0 lt-transfer-yes-breach %lt-key-0)) =^ f state (n state %bat q:(gen-tx 0 [lt-own [%escape ~litbud]] %lt-key-0)) =^ f state (n state %bat q:(gen-tx 0 [litbud-own [%adopt ~linnup-torsyx]] %litbud-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~linnup-torsyx) + [escape.net sponsor.net]:(got:orm points.state ~linnup-torsyx) :: ++ test-linnup-torsyx-l2-adopt-reject ^- tang =/ lt-spawn [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)] @@ -2929,7 +2932,7 @@ =^ f state (n state %bat q:(gen-tx 0 lt-transfer-yes-breach %lt-key-0)) =^ f state (n state %bat q:(gen-tx 0 [lt-own [%escape ~litbud]] %lt-key-0)) =^ f state (n state %bat q:(gen-tx 0 [litbud-own [%reject ~linnup-torsyx]] %litbud-key-0)) - escape.net:(~(got by points.state) ~linnup-torsyx) + escape.net:(got:orm points.state ~linnup-torsyx) :: ++ test-linnup-torsyx-l2-detach ^- tang =/ lt-spawn [marbud-own %spawn ~linnup-torsyx (addr %lt-key-0)] @@ -2945,7 +2948,7 @@ =^ f state (n state %bat q:(gen-tx 0 lt-spawn %marbud-key-0)) =^ f state (n state %bat q:(gen-tx 0 lt-transfer-yes-breach %lt-key-0)) =^ f state (n state %bat q:(gen-tx 1 [marbud-own [%detach ~linnup-torsyx]] %marbud-key-0)) - [escape.net sponsor.net]:(~(got by points.state) ~linnup-torsyx) + [escape.net sponsor.net]:(got:orm points.state ~linnup-torsyx) :: :: Fuzz tests. These just feed the L2 contract various forms of garbage. None of them :: should alter the state of the PKI. @@ -2955,7 +2958,7 @@ :: =+ [seed=`@`%test-fuzz-octs i=0] =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =/ init-state state |- ^- tang ?: =(i 10) ~ @@ -2994,7 +2997,7 @@ :: =+ [seed=`@`%test-fuzz-valid-ship-key i=0] =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =/ init-state state |- ^- tang ?: =(i 100) ~ @@ -3032,7 +3035,7 @@ :: =+ [seed=`@`%test-fuzz-valid-ship-key-proxy-nonce i=0] =| =^state:naive - =^ f state (init-red-full state) + =^ f state init-red-simple =/ init-state state |- ^- tang ?: =(i 100) ~ @@ -3071,7 +3074,7 @@ :: :: :: =+ [seed=`@`%test-fuzz-after-tx1 i=0] :: =| =^state:naive -:: =^ f state (init-red-full state) +:: =^ f state init-red-simple :: =/ init-state state :: |- ^- tang :: ?: =(i 11) ~ :: 10 attempts for each transaction type @@ -3189,7 +3192,7 @@ =| =^state:naive =^ f state (init-zod state) =^ f state (n state %bat q:(gen-tx 0 bz-spawn %zod-skey-0)) - transfer-proxy.own:(~(got by points.state) ~binzod) + transfer-proxy.own:(got:orm points.state ~binzod) :: ++ test-zod-spawn-proxy =/ bz-spawn [[~zod %spawn] %spawn ~binzod (addr %binzod-key-0)] @@ -3201,7 +3204,7 @@ =| =^state:naive =^ f state (init-zod state) =^ f state (n state %bat q:(gen-tx 0 bz-spawn %zod-skey-0)) - transfer-proxy.own:(~(got by points.state) ~binzod) + transfer-proxy.own:(got:orm points.state ~binzod) :: ++ test-dopzod-spawn =/ tm-spawn [[~dopzod %own] %spawn ~tasben-monbur (addr %tm)] @@ -3213,7 +3216,7 @@ =| =^state:naive =^ f state (init-zod state) =^ f state (n state %bat q:(gen-tx 0 tm-spawn %dopzod-key-0)) - transfer-proxy.own:(~(got by points.state) ~tasben-monbur) + transfer-proxy.own:(got:orm points.state ~tasben-monbur) :: ++ test-address-padding :: tells ~dopzod to spawn ~tasben-monbur at 0x00000000001111111111 @@ -3236,7 +3239,7 @@ =| =^state:naive =^ f state (init-zod state) =^ f state (n state %bat q:signed-tx) - transfer-proxy.own:(~(got by points.state) ~tasben-monbur) + transfer-proxy.own:(got:orm points.state ~tasben-monbur) :: :: TODO: L1 tests with leading zeroes. in particular, changing :: keys uses data.log, so keys with leading zeroes might run into @@ -3257,7 +3260,7 @@ =| =^state:naive =^ f state (init-marbud state) =^ f state (n state %bat (tx-list-to-batch txs)) - owner.own:(~(got by points.state) ~marbud) + owner.own:(got:orm points.state ~marbud) :: ++ test-changed-dns :: uses actual data from ETH transaction @@ -3370,5 +3373,5 @@ :: %^ n state %bat :: q:(transfer-point:l2 0 ~marbud %marbud-key-0 meta-owner %own &) :: =^ f state (n state %bat (cat 3 sig tx)) -:: transfer-proxy.own:(~(got by points.state) ~marbud) +:: transfer-proxy.own:(got:orm points.state ~marbud) -- diff --git a/pkg/arvo/tests/lib/vere/dawn.hoon b/pkg/arvo/tests/lib/vere/dawn.hoon index 059120fb9f..80e3f37e0a 100644 --- a/pkg/arvo/tests/lib/vere/dawn.hoon +++ b/pkg/arvo/tests/lib/vere/dawn.hoon @@ -188,37 +188,53 @@ ++ test-veri-good =/ sed [~zod 1 sec ~] %+ expect-eq - !> ~ - !> (veri:dawn sed pot ~) + !> &+sed + !> (veri:dawn ~zod sed pot ~) :: ++ test-veri-not-spawned =/ sed [~zod 1 sec ~] %+ expect-eq - !> `%not-keyed - !> (veri:dawn sed =>(pot .(net ~)) ~) + !> |+[%not-keyed ~] + !> (veri:dawn ~zod sed =>(pot .(net ~)) ~) :: ++ test-veri-wrong-key =/ sed [~zod 1 sec:ex:(pit:nu:crub:crypto 24 %foo) ~] %+ expect-eq - !> `%key-mismatch - !> (veri:dawn sed pot ~) + !> |+[%key-mismatch ~] + !> (veri:dawn ~zod sed pot ~) :: ++ test-veri-life-mismatch =/ sed [~zod 2 sec ~] %+ expect-eq - !> `%life-mismatch - !> (veri:dawn sed pot ~) + !> |+[%life-mismatch ~] + !> (veri:dawn ~zod sed pot ~) +:: +++ test-veri-bad-multikey + =/ fed=feed:jael + :- [%1 ~] + :- ~zod + :~ [1 sec:ex:(pit:nu:crub:crypto 24 %foo)] + [2 sec] + == + %+ expect-eq + !> |+[%key-mismatch %life-mismatch ~] + !> (veri:dawn ~zod fed pot ~) +:: +++ test-veri-none-multikey + %+ expect-eq + !> |+[%no-key ~] + !> (veri:dawn ~zod [[%1 ~] ~zod ~] pot ~) :: ++ test-veri-already-booted =/ sed [~zod 1 sec ~] ;: weld %+ expect-eq - !> `%already-booted - !> (veri:dawn sed pot `[1 |]) + !> |+[%already-booted ~] + !> (veri:dawn ~zod sed pot `[1 |]) :: %+ expect-eq - !> `%already-booted - !> (veri:dawn sed pot `[2 &]) + !> |+[%already-booted ~] + !> (veri:dawn ~zod sed pot `[2 &]) == :: ++ test-veri-earl-good @@ -230,8 +246,8 @@ (shaf %earl (sham who 1 pub:ex:cub)) [who 1 sec:ex:cub `sig] %+ expect-eq - !> ~ - !> (veri:dawn sed pot ~) + !> &+sed + !> (veri:dawn who sed pot ~) :: ++ test-veri-earl-parent-not-keyed =/ cub (pit:nu:crub:crypto 24 %foo) @@ -242,38 +258,38 @@ (shaf %earl (sham who 1 pub:ex:cub)) [who 1 sec:ex:cub `sig] %+ expect-eq - !> ~ - !> (veri:dawn sed =>(pot .(net ~)) ~) + !> &+sed + !> (veri:dawn who sed =>(pot .(net ~)) ~) :: ++ test-veri-pawn-good =/ cub (pit:nu:crub:crypto 24 %foo) =/ who=ship `@`fig:ex:cub =/ sed [who 1 sec:ex:cub ~] %+ expect-eq - !> ~ - !> (veri:dawn sed *point:azimuth-types ~) + !> &+sed + !> (veri:dawn who sed *point:azimuth-types ~) :: ++ test-veri-pawn-key-mismatch =/ cub (pit:nu:crub:crypto 24 %foo) =/ who=ship `@`fig:ex:cub =/ sed [who 1 sec:ex:(pit:nu:crub:crypto 24 %bar) ~] %+ expect-eq - !> `%key-mismatch - !> (veri:dawn sed *point:azimuth-types ~) + !> |+[%key-mismatch ~] + !> (veri:dawn who sed *point:azimuth-types ~) :: ++ test-veri-pawn-invalid-life =/ cub (pit:nu:crub:crypto 24 %foo) =/ who=ship `@`fig:ex:cub =/ sed [who 2 sec:ex:cub ~] %+ expect-eq - !> `%invalid-life - !> (veri:dawn sed *point:azimuth-types ~) + !> |+[%invalid-life ~] + !> (veri:dawn who sed *point:azimuth-types ~) :: ++ test-veri-pawn-already-booted =/ cub (pit:nu:crub:crypto 24 %foo) =/ who=ship `@`fig:ex:cub =/ sed [who 1 sec:ex:cub ~] %+ expect-eq - !> `%already-booted - !> (veri:dawn sed *point:azimuth-types `[1 |]) + !> |+[%already-booted ~] + !> (veri:dawn who sed *point:azimuth-types `[1 |]) -- diff --git a/pkg/arvo/tests/sys/vane/clay.hoon b/pkg/arvo/tests/sys/vane/clay.hoon index 636efd3a35..457a810db0 100644 --- a/pkg/arvo/tests/sys/vane/clay.hoon +++ b/pkg/arvo/tests/sys/vane/clay.hoon @@ -23,7 +23,7 @@ =/ src "." %+ expect-eq !> ^- pile:fusion - :* ~ ~ ~ ~ ~ ~ + :* ~ ~ ~ ~ ~ ~ ~ tssg+[%dbug [/sur/foo/hoon [[1 1] [1 2]]] [%cnts ~[[%.y 1]] ~]]~ == !> (parse-pile:(ford):fusion /sur/foo/hoon src) @@ -32,7 +32,7 @@ =/ src "/% moo %mime\0a." %+ expect-eq !> ^- pile:fusion - :* sur=~ lib=~ raw=~ + :* sur=~ lib=~ raw=~ raz=~ maz=[face=%moo mark=%mime]~ caz=~ bar=~ tssg+[%dbug [/sur/foo/hoon [[2 1] [2 2]]] [%cnts ~[[%.y 1]] ~]]~ @@ -43,7 +43,7 @@ =/ src "/$ goo %mime %txt\0a." %+ expect-eq !> ^- pile:fusion - :* sur=~ lib=~ raw=~ maz=~ + :* sur=~ lib=~ raw=~ raz=~ maz=~ caz=[face=%goo from=%mime to=%txt]~ bar=~ tssg+[%dbug [/sur/foo/hoon [[2 1] [2 2]]] [%cnts ~[[%.y 1]] ~]]~ @@ -74,7 +74,7 @@ [`%hood-drum %hood-drum] [`%hood-write %hood-write] == - raw=~ maz=~ caz=~ bar=~ + raw=~ raz=~ maz=~ caz=~ bar=~ tssg+[%dbug [/sur/foo/hoon [[10 1] [10 2]]] [%cnts ~[[%.y 1]] ~]]~ == !> (parse-pile:(ford):fusion /sur/foo/hoon src) @@ -112,10 +112,10 @@ ;: weld %+ expect-eq !>(*mime) - (slap res limb/%bunt) + (slap res !,(*hoon *vale)) :: %+ expect-eq - !> (~(gas in *(set path)) /mar/mime/hoon ~) + !> (~(gas in *(set [? path])) |^/mar/mime/hoon ~) !> dez:(~(got by files.cache.nub) /mar/mime/hoon) == :: @@ -139,10 +139,10 @@ ;: weld %+ expect-eq !>(*@t) - (slap res limb/%bunt) + (slap res !,(*hoon *vale)) :: %+ expect-eq - !> (~(gas in *(set path)) /mar/udon/hoon /lib/cram/hoon ~) + !> (~(gas in *(set [? path])) |^/mar/udon/hoon |^/lib/cram/hoon ~) !> dez:(~(got by files.cache.nub) /mar/udon/hoon) == :: @@ -170,7 +170,7 @@ =/ changes %- my :~ [/mar/mime/hoon &+hoon+mar-mime] - [/lib/foo/hoon &+hoon+'/% moo %mime\0abunt:moo'] + [/lib/foo/hoon &+hoon+'/% moo %mime\0a*vale:moo'] == =/ ford %: ford:fusion @@ -224,7 +224,7 @@ (slap res (ream '(+ [*^ [%bob ~] ~])')) :: %+ expect-eq - !> (~(gas in *(set path)) /gen/hello/hoon ~) + !> (~(gas in *(set [? path])) |^/gen/hello/hoon ~) !> dez:(~(got by files.cache.nub) /gen/hello/hoon) == :: @@ -249,10 +249,10 @@ !>((slab %read %get-our -.res)) :: %+ expect-eq - !> %- ~(gas in *(set path)) - :~ /lib/strandio/hoon - /lib/strand/hoon - /sur/spider/hoon + !> %- ~(gas in *(set [? path])) + :~ [| /lib/strandio/hoon] + [| /lib/strand/hoon] + [| /sur/spider/hoon] == !> dez:(~(got by files.cache.nub) /lib/strandio/hoon) == diff --git a/pkg/arvo/tests/sys/vane/eyre.hoon b/pkg/arvo/tests/sys/vane/eyre.hoon index 0b83d3a843..6710fa2aee 100644 --- a/pkg/arvo/tests/sys/vane/eyre.hoon +++ b/pkg/arvo/tests/sys/vane/eyre.hoon @@ -2353,7 +2353,6 @@ :^ ~ ~ %dais !> ^- dais:clay |_ sam=vase - ++ bunt !! ++ diff !! ++ form !! ++ join !! diff --git a/pkg/arvo/tests/sys/zuse/format.hoon b/pkg/arvo/tests/sys/zuse/format.hoon index 8719ab241e..dddc9ef2e4 100644 --- a/pkg/arvo/tests/sys/zuse/format.hoon +++ b/pkg/arvo/tests/sys/zuse/format.hoon @@ -179,10 +179,15 @@ %+ expect-eq !> [%n '1000'] !> (time ~1970.1.1..0.0.1) + :: timestamps should invert + :: + %+ expect-eq + !> [%n '1001'] + !> (time (from-unix-ms:chrono:userlib 1.001)) :: ship - store ship identity as a string :: %+ expect-eq - !> [%s 'zod'] + !> [%n '"zod"'] !> (ship ~zod) == :: dejs - recursive processing of `json` values diff --git a/pkg/arvo/tests/sys/zuse/ordered-map.hoon b/pkg/arvo/tests/sys/zuse/ordered-map.hoon index 261b8f0851..247b85c91b 100644 --- a/pkg/arvo/tests/sys/zuse/ordered-map.hoon +++ b/pkg/arvo/tests/sys/zuse/ordered-map.hoon @@ -9,6 +9,7 @@ (items-from-keys (gulf 0 6)) :: =/ atom-map ((ordered-map @ud @tas) lte) +=/ gte-atom-map ((ordered-map @ud @tas) gte) :: |% ++ test-ordered-map-gas ^- tang @@ -17,7 +18,7 @@ :: %+ expect-eq !> %.y - !> (check-balance:atom-map a) + !> (apt:atom-map a) :: ++ test-ordered-map-tap ^- tang :: @@ -27,6 +28,72 @@ !> test-items !> (tap:atom-map a) :: +++ test-ordered-map-tab-gte ^- tang + :: + =/ a=(tree [@ud @tas]) (gas:gte-atom-map ~ test-items) + :: + %+ expect-eq + !> (flop test-items) + !> (tab:gte-atom-map a ~ 7) +:: +++ test-ordered-map-tab-gte-starting-from ^- tang + :: + =/ a=(tree [@ud @tas]) (gas:gte-atom-map ~ test-items) + =/ small-test-items=(list [@ud @tas]) + (items-from-keys (gulf 2 5)) + :: + %+ expect-eq + !> (flop small-test-items) + !> (tab:gte-atom-map a [~ 6] 4) +:: +++ test-ordered-map-tab-gte-count ^- tang + :: + =/ a=(tree [@ud @tas]) (gas:gte-atom-map ~ test-items) + =/ small-test-items=(list [@ud @tas]) + (items-from-keys (gulf 4 6)) + :: + %+ expect-eq + !> (flop small-test-items) + !> (tab:gte-atom-map a ~ 3) +:: +++ test-ordered-map-tab ^- tang + :: + =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) + :: + %+ expect-eq + !> test-items + !> (tab:atom-map a ~ 7) +:: +++ test-ordered-map-tab-starting-from ^- tang + :: + =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) + =/ small-test-items=(list [@ud @tas]) + (items-from-keys (gulf 1 4)) + :: + %+ expect-eq + !> small-test-items + !> (tab:atom-map a [~ 0] 4) +:: +++ test-ordered-map-tab-count ^- tang + :: + =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) + =/ small-test-items=(list [@ud @tas]) + (items-from-keys (gulf 0 2)) + :: + %+ expect-eq + !> small-test-items + !> (tab:atom-map a ~ 3) +:: +++ test-ordered-map-tab-more-than-exist ^- tang + :: + =/ specific-test-items=(list [@ud @tas]) + (items-from-keys (gulf 1 6)) + =/ a=(tree [@ud @tas]) (gas:atom-map ~ specific-test-items) + :: + %+ expect-eq + !> specific-test-items + !> (tab:atom-map a [~ 0] 8) +:: ++ test-ordered-map-pop ^- tang :: =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) @@ -35,13 +102,13 @@ !> [[0 %a] (gas:atom-map ~ (items-from-keys (gulf 1 6)))] !> (pop:atom-map a) :: -++ test-ordered-map-peek ^- tang +++ test-ordered-map-pry ^- tang :: =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) :: %+ expect-eq !> `[0 %a] - !> (peek:atom-map a) + !> (pry:atom-map a) :: ++ test-ordered-map-nip ^- tang :: @@ -53,61 +120,61 @@ !> (gas:atom-map ~ ~[[0^%a] [1^%b] [2^%c] [3^%d] [4^%e] [5^%f]]) !> b :: -++ test-ordered-map-subset ^- tang +++ test-ordered-map-lot ^- tang :: =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) :: - =/ b (subset:atom-map a `0 `4) + =/ b (lot:atom-map a `0 `4) :: %+ expect-eq !> (gas:atom-map ~ ~[[1^%b] [2^%c] [3^%d]]) !> b :: -++ test-ordered-map-null-start-subset ^- tang +++ test-ordered-map-null-start-lot ^- tang :: =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) :: - =/ b (subset:atom-map a ~ `5) + =/ b (lot:atom-map a ~ `5) :: %+ expect-eq !> (gas:atom-map ~ ~[[0^%a] [1^%b] [2^%c] [3^%d] [4^%e]]) !> b :: -++ test-ordered-map-null-end-subset ^- tang +++ test-ordered-map-null-end-lot ^- tang :: =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) :: - =/ b (subset:atom-map a `1 ~) + =/ b (lot:atom-map a `1 ~) :: %+ expect-eq !> (gas:atom-map ~ ~[[2^%c] [3^%d] [4^%e] [5^%f] [6^%g]]) !> b :: -++ test-ordered-map-double-null-subset ^- tang +++ test-ordered-map-double-null-lot ^- tang :: =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) :: - =/ b (subset:atom-map a ~ ~) + =/ b (lot:atom-map a ~ ~) :: %+ expect-eq !> (gas:atom-map ~ ~[[0^%a] [1^%b] [2^%c] [3^%d] [4^%e] [5^%f] [6^%g]]) !> b :: -++ test-ordered-map-not-found-start-subset ^- tang +++ test-ordered-map-not-found-start-lot ^- tang :: =/ a=(tree [@ud @tas]) (gas:atom-map ~ ~[[1^%b]]) :: - =/ b (subset:atom-map a `0 ~) + =/ b (lot:atom-map a `0 ~) :: %+ expect-eq !> (gas:atom-map ~ ~[[1^%b]]) !> b :: -++ test-ordered-map-traverse ^- tang +++ test-ordered-map-dip ^- tang :: =/ a=(tree [@ud @tas]) (gas:atom-map ~ test-items) :: - =/ b %- (traverse:atom-map ,(list [@ud @tas])) + =/ b %- (dip:atom-map ,(list [@ud @tas])) :* a state=~ :: @@ -129,11 +196,11 @@ !> -.b == :: -++ test-ordered-map-traverse-delete-all ^- tang +++ test-ordered-map-dip-delete-all ^- tang ;: weld =/ q ((ordered-map ,@ ,~) lte) =/ o (gas:q ~ ~[1/~ 2/~ 3/~]) - =/ b ((traverse:q ,~) o ~ |=([~ key=@ ~] [~ %| ~])) + =/ b ((dip:q ,~) o ~ |=([~ key=@ ~] [~ %| ~])) %+ expect-eq !> [~ ~] !> b @@ -147,7 +214,7 @@ ?:((lth aa ba) %.y ?:((gth aa ba) %.n (lte ab bb))) =/ q ((ordered-map ,[@ @] ,~) compare) =/ o (gas:q ~ c) - =/ b ((traverse:q ,~) o ~ |=([~ key=[@ @] ~] [~ %| ~])) + =/ b ((dip:q ,~) o ~ |=([~ key=[@ @] ~] [~ %| ~])) %+ expect-eq !> [~ ~] !> b diff --git a/pkg/btc-wallet/README.md b/pkg/btc-wallet/README.md new file mode 100644 index 0000000000..9c8cc6f54f --- /dev/null +++ b/pkg/btc-wallet/README.md @@ -0,0 +1,8 @@ +To verify your version of the bitcoin wallet, run the following command in the +dojo: + +`> +btc-wallet-check` + +it should return with the following hash: + +`0v2.3qak4.al612.8m1ig.kg03r.mfide` diff --git a/pkg/btc-wallet/config/urbitrc-sample b/pkg/btc-wallet/config/urbitrc-sample new file mode 100644 index 0000000000..0654ff48d1 --- /dev/null +++ b/pkg/btc-wallet/config/urbitrc-sample @@ -0,0 +1,6 @@ +module.exports = { + URBIT_PIERS: [ + "%URBITPIER%", + ], + URL: 'http://localhost:80' +}; diff --git a/pkg/btc-wallet/config/webpack.dev.js b/pkg/btc-wallet/config/webpack.dev.js new file mode 100644 index 0000000000..368de77177 --- /dev/null +++ b/pkg/btc-wallet/config/webpack.dev.js @@ -0,0 +1,128 @@ +const path = require('path'); +const webpack = require('webpack'); +// const HtmlWebpackPlugin = require('html-webpack-plugin'); +// const { CleanWebpackPlugin } = require('clean-webpack-plugin'); +const urbitrc = require('./urbitrc'); +const fs = require('fs-extra'); +const _ = require('lodash'); + +function copy(src,dest) { + return new Promise((res,rej) => + fs.copy(src,dest, err => err ? rej(err) : res())); +} + +class UrbitShipPlugin { + constructor(urbitrc) { + this.piers = urbitrc.URBIT_PIERS; + } + + apply(compiler) { + compiler.hooks.afterEmit.tapPromise( + 'UrbitShipPlugin', + async (compilation) => { + const src = path.resolve(compiler.options.output.path, 'index.js'); + } + ); + } +} + +let devServer = { + contentBase: path.join(__dirname, '../dist'), + hot: true, + port: 9000, + host: '0.0.0.0', + disableHostCheck: true, + historyApiFallback: true, +}; + +const router = _.mapKeys(urbitrc.FLEET || {}, (value, key) => `${key}.localhost:9000`); + +if(urbitrc.URL) { + devServer = { + ...devServer, + index: '', + proxy: { + '/~btc/js/bundle/index.*.js': { + target: 'http://localhost:9000', + pathRewrite: (req, path) => { + return '/index.js' + } + }, + '**': { + changeOrigin: true, + target: urbitrc.URL, + router, + // ensure proxy doesn't timeout channels + proxyTimeout: 0 + } + } + }; +} + +module.exports = { + node: { fs: 'empty' }, + mode: 'development', + entry: { + app: './src/index.js' + }, + module: { + rules: [ + { + test: /\.(j|t)sx?$/, + use: { + loader: 'babel-loader', + options: { + presets: ['@babel/preset-env', ['@babel/preset-react', { + runtime: 'automatic', + development: 'true', + importSource: '@welldone-software/why-did-you-render', + }]], + plugins: [ + '@babel/transform-runtime', + '@babel/plugin-proposal-object-rest-spread', + '@babel/plugin-proposal-optional-chaining', + '@babel/plugin-proposal-class-properties', + 'react-hot-loader/babel' + ] + } + }, + exclude: /node_modules/ + }, + { + test: /\.css$/i, + use: [ + // Creates `style` nodes from JS strings + 'style-loader', + // Translates CSS into CommonJS + 'css-loader', + // Compiles Sass to CSS + 'sass-loader' + ] + } + ] + }, + resolve: { + extensions: ['.js', '.ts', '.tsx'] + }, + devtool: 'inline-source-map', + devServer: devServer, + plugins: [ + new UrbitShipPlugin(urbitrc) + ], + watch: true, + watchOptions: { + poll: true, + ignored: '/node_modules/' + }, + output: { + filename: 'index.js', + chunkFilename: 'index.js', + path: path.resolve(__dirname, '../dist'), + publicPath: '/', + globalObject: 'this' + }, + optimization: { + minimize: false, + usedExports: true + } +}; diff --git a/pkg/btc-wallet/config/webpack.prod.js b/pkg/btc-wallet/config/webpack.prod.js new file mode 100644 index 0000000000..ed7403784e --- /dev/null +++ b/pkg/btc-wallet/config/webpack.prod.js @@ -0,0 +1,60 @@ +const path = require('path'); +const { CleanWebpackPlugin } = require('clean-webpack-plugin'); +// const urbitrc = require('./urbitrc'); + +module.exports = { + node: { fs: 'empty' }, + mode: 'production', + entry: { + app: './src/index.js' + }, + module: { + rules: [ + { + test: /\.jsx?$/, + use: { + loader: 'babel-loader', + options: { + presets: ['@babel/preset-env', '@babel/preset-react'], + plugins: [ + '@babel/transform-runtime', + '@babel/plugin-proposal-object-rest-spread', + '@babel/plugin-proposal-optional-chaining', + '@babel/plugin-proposal-class-properties' + ] + } + }, + exclude: /node_modules/ + }, + { + test: /\.css$/i, + use: [ + // Creates `style` nodes from JS strings + 'style-loader', + // Translates CSS into CommonJS + 'css-loader', + // Compiles Sass to CSS + 'sass-loader' + ] + } + ] + }, + resolve: { + extensions: ['.js', '.ts', '.tsx'] + }, + devtool: 'source-map', + plugins: [ + new CleanWebpackPlugin() + ], + output: { + filename: (pathData) => { + return pathData.chunk.name === 'app' ? 'index.[contenthash].js' : '[name].js'; + }, + path: path.resolve(__dirname, `../../arvo/app/btc-wallet/js/bundle`), + publicPath: '/', + }, + optimization: { + minimize: true, + usedExports: true + } +}; diff --git a/pkg/btc-wallet/package-lock.json b/pkg/btc-wallet/package-lock.json new file mode 100644 index 0000000000..1f96d7f142 --- /dev/null +++ b/pkg/btc-wallet/package-lock.json @@ -0,0 +1,9912 @@ +{ + "name": "urbit-bitcoin-wallet", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "@babel/compat-data": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", + "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", + "dev": true + }, + "@babel/core": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.10.tgz", + "integrity": "sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.9", + "@babel/helper-compilation-targets": "^7.13.10", + "@babel/helper-module-transforms": "^7.13.0", + "@babel/helpers": "^7.13.10", + "@babel/parser": "^7.13.10", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.13.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", + "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "requires": { + "@babel/types": "^7.13.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz", + "integrity": "sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==", + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.12.13.tgz", + "integrity": "sha512-CZOv9tGphhDRlVjVkAgm8Nhklm9RzSmWpX2my+t7Ua/KT616pEzXsQCjinzvkRvHWJ9itO4f296efroX23XCMA==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.10.tgz", + "integrity": "sha512-/Xju7Qg1GQO4mHZ/Kcs6Au7gfafgZnwm+a7sy/ow/tV1sHeraRUHbjdat8/UvDor4Tez+siGKDk6zIKtCPKVJA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.8", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.13.11", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz", + "integrity": "sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-member-expression-to-functions": "^7.13.0", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/helper-replace-supers": "^7.13.0", + "@babel/helper-split-export-declaration": "^7.12.13" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.17.tgz", + "integrity": "sha512-p2VGmBu9oefLZ2nQpgnEnG0ZlRPvL8gAGvPUMQwUdaE8k49rOMuZpOwdQoy5qJf6K8jL3bcAMhVUlHAjIgJHUg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "regexpu-core": "^4.7.1" + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.5.tgz", + "integrity": "sha512-nXuzCSwlJ/WKr8qxzW816gwyT6VZgiJG17zR40fou70yfAcqjoNyTLl/DQ+FExw5Hx5KNqshmN8Ldl/r2N7cTg==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.13.0.tgz", + "integrity": "sha512-qS0peLTDP8kOisG1blKbaoBg/o9OSa1qoumMjTK5pM+KDTtpxpsiubnCGP34vK8BXGcb2M9eigwgvoJryrzwWA==", + "dev": true, + "requires": { + "@babel/types": "^7.13.0" + } + }, + "@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "requires": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.0.tgz", + "integrity": "sha512-0kBzvXiIKfsCA0y6cFEIJf4OdzfpRuNk4+YTeHZpGGc666SATFKTz6sRncwFnQk7/ugJ4dSrCj6iJuvW4Qwr2g==", + "dev": true, + "requires": { + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", + "dev": true, + "requires": { + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-module-imports": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", + "requires": { + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-module-transforms": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.12.tgz", + "integrity": "sha512-7zVQqMO3V+K4JOOj40kxiCrMf6xlQAkewBB0eu2b03OO/Q21ZutOzjpfD79A5gtE/2OWi1nv625MrDlGlkbknQ==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.13.0.tgz", + "integrity": "sha512-pUQpFBE9JvC9lrQbpX0TmeNIy5s7GnZjna2lhhcHC7DzgBs6fWn722Y5cfwgrtrqc7NAJwMvOa0mKhq6XaE4jg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-wrap-function": "^7.13.0", + "@babel/types": "^7.13.0" + } + }, + "@babel/helper-replace-supers": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.13.12", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-simple-access": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "dev": true, + "requires": { + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + }, + "@babel/helper-validator-option": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", + "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.13.0.tgz", + "integrity": "sha512-1UX9F7K3BS42fI6qd2A4BjKzgGjToscyZTdp1DjknHLCIvpgne6918io+aL5LXFcER/8QWiwpoY902pVEqgTXA==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0" + } + }, + "@babel/helpers": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", + "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "dev": true, + "requires": { + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0" + } + }, + "@babel/highlight": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.12.tgz", + "integrity": "sha512-4T7Pb244rxH24yR116LAuJ+adxXXnHhZaLJjegJVKSdoNCe4x1eDBaud5YIcQFcqzsaD5BHvJw5BQ0AZapdCRw==" + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.13.12.tgz", + "integrity": "sha512-d0u3zWKcoZf379fOeJdr1a5WPDny4aOFZ6hlfKivgK0LY7ZxNfoaHL2fWwdGtHyVvra38FC+HVYkO+byfSA8AQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.13.12" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", + "integrity": "sha512-rPBnhj+WgoSmgq+4gQUtXx/vOcU+UYtjy1AA/aeD61Hwj410fwYyqfUcRP3lR8ucgliVJL/G7sXcNUecC75IXA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-remap-async-to-generator": "^7.13.0", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz", + "integrity": "sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.13.0", + "@babel/helper-plugin-utils": "^7.13.0" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.13.8.tgz", + "integrity": "sha512-ONWKj0H6+wIRCkZi9zSbZtE/r73uOhMVHh256ys0UzfM7I3d4n+spZNWjOnJv2gzopumP2Wxi186vI8N0Y2JyQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz", + "integrity": "sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.13.8.tgz", + "integrity": "sha512-w4zOPKUFPX1mgvTmL/fcEqy34hrQ1CRcGxdphBc6snDnnqJ47EZDIyop6IwXzAC8G916hsIuXB2ZMBCExC5k7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.13.8.tgz", + "integrity": "sha512-aul6znYB4N4HGweImqKn59Su9RS8lbUIqxtXTOcAGtNIDczoEFv+l1EhmX8rUBp3G1jMjKJm8m0jXVp63ZpS4A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz", + "integrity": "sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz", + "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz", + "integrity": "sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.8", + "@babel/helper-compilation-targets": "^7.13.8", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.13.0" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.13.8.tgz", + "integrity": "sha512-0wS/4DUF1CuTmGo+NiaHfHcVSeSLj5S3e6RivPTg/2k3wOv3jO35tZ6/ZWsQhQMvdgI7CwphjQa/ccarLymHVA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.12.tgz", + "integrity": "sha512-fcEdKOkIB7Tf4IxrgEVeFC4zeJSTr78no9wTdBuZZbqF64kzllU0ybo2zrzm7gUQfxGhBgq4E39oRs8Zx/RMYQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.13.0.tgz", + "integrity": "sha512-MXyyKQd9inhx1kDYPkFRVOBXQ20ES8Pto3T7UZ92xj2mY0EVD8oAVzeyYuVfy/mxAdTSIayOvg+aVzcHV2bn6Q==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.13.0", + "@babel/helper-plugin-utils": "^7.13.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz", + "integrity": "sha512-XyJmZidNfofEkqFV5VC/bLabGmO5QzenPO/YOfGuEbgU+2sSwMmio3YLb4WtBgcmmdwZHyVyv8on77IUjQ5Gvg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz", + "integrity": "sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", + "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz", + "integrity": "sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz", + "integrity": "sha512-96lgJagobeVmazXFaDrbmCLQxBysKu7U6Do3mLsx27gf5Dk85ezysrs2BZUpXD703U/Su1xTBDxxar2oa4jAGg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.13.0.tgz", + "integrity": "sha512-3j6E004Dx0K3eGmhxVJxwwI89CTJrce7lg3UrtFuDAVQ/2+SJ/h/aSFOeE6/n0WB1GsOffsJp6MnPQNQ8nmwhg==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-remap-async-to-generator": "^7.13.0" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz", + "integrity": "sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", + "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz", + "integrity": "sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-replace-supers": "^7.13.0", + "@babel/helper-split-export-declaration": "^7.12.13", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.13.0.tgz", + "integrity": "sha512-RRqTYTeZkZAz8WbieLTvKUEUxZlUTdmL5KGMyZj7FnMfLNKV4+r5549aORG/mgojRmFlQMJDUupwAMiF2Q7OUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz", + "integrity": "sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.13.tgz", + "integrity": "sha512-foDrozE65ZFdUC2OfgeOCrEPTxdB3yjqxpXh8CH+ipd9CHd4s/iq81kcUpyH8ACGNEPdFqbtzfgzbT/ZGlbDeQ==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.13.tgz", + "integrity": "sha512-NfADJiiHdhLBW3pulJlJI2NB0t4cci4WTZ8FtdIuNc2+8pslXdPtRRAEWqUY+m9kNOk2eRYbTAOipAxlrOcwwQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.13.tgz", + "integrity": "sha512-fbUelkM1apvqez/yYx1/oICVnGo2KM5s63mhGylrmXUxK/IAXSIf87QIxVfZldWf4QsOafY6vV3bX8aMHSvNrA==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.13.0.tgz", + "integrity": "sha512-IHKT00mwUVYE0zzbkDgNRP6SRzvfGCYsOxIRz8KsiaaHCcT9BWIkO+H9QRJseHBLOGBZkHUdHiqj6r0POsdytg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz", + "integrity": "sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz", + "integrity": "sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz", + "integrity": "sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.13.0.tgz", + "integrity": "sha512-EKy/E2NHhY/6Vw5d1k3rgoobftcNUmp9fGjb9XZwQLtTctsRBOTRO7RHHxfIky1ogMN5BxN7p9uMA3SzPfotMQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-plugin-utils": "^7.13.0", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz", + "integrity": "sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-simple-access": "^7.12.13", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.13.8.tgz", + "integrity": "sha512-hwqctPYjhM6cWvVIlOIe27jCIBgHCsdH2xCJVAYQm7V5yTMoilbVMi9f6wKg0rpQAOn6ZG4AOyvCqFF/hUh6+A==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.13.0", + "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-validator-identifier": "^7.12.11", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.13.0.tgz", + "integrity": "sha512-D/ILzAh6uyvkWjKKyFE/W0FzWwasv6vPTSqPcjxFqn6QpX3u8DjRVliq4F2BamO2Wee/om06Vyy+vPkNrd4wxw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-plugin-utils": "^7.13.0" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.13.tgz", + "integrity": "sha512-Xsm8P2hr5hAxyYblrfACXpQKdQbx4m2df9/ZZSQ8MAhsadw06+jW7s9zsSw6he+mJZXRlVMyEnVktJo4zjk1WA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.13.tgz", + "integrity": "sha512-/KY2hbLxrG5GTQ9zzZSc3xWiOy379pIETEhbtzwZcw9rvuaVV4Fqy7BYGYOWZnaoXIQYbbJ0ziXLa/sKcGCYEQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz", + "integrity": "sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz", + "integrity": "sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz", + "integrity": "sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-react-display-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.13.tgz", + "integrity": "sha512-MprESJzI9O5VnJZrL7gg1MpdqmiFcUv41Jc7SahxYsNP2kDkFqClxxTZq+1Qv4AFCamm+GXMRDQINNn+qrxmiA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-react-jsx": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.13.12.tgz", + "integrity": "sha512-jcEI2UqIcpCqB5U5DRxIl0tQEProI2gcu+g8VTIqxLO5Iidojb4d77q+fwGseCvd8af/lJ9masp4QWzBXFE2xA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/types": "^7.13.12" + } + }, + "@babel/plugin-transform-react-jsx-development": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.17.tgz", + "integrity": "sha512-BPjYV86SVuOaudFhsJR1zjgxxOhJDt6JHNoD48DxWEIxUCAMjV1ys6DYw4SDYZh0b1QsS2vfIA9t/ZsQGsDOUQ==", + "dev": true, + "requires": { + "@babel/plugin-transform-react-jsx": "^7.12.17" + } + }, + "@babel/plugin-transform-react-pure-annotations": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.12.1.tgz", + "integrity": "sha512-RqeaHiwZtphSIUZ5I85PEH19LOSzxfuEazoY7/pWASCAIBuATQzpSVD+eT6MebeeZT2F4eSL0u4vw6n4Nm0Mjg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz", + "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.13.tgz", + "integrity": "sha512-xhUPzDXxZN1QfiOy/I5tyye+TRz6lA7z6xaT4CLOjPRMVg1ldRf0LHw0TDBpYL4vG78556WuHdyO9oi5UmzZBg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-runtime": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.10.tgz", + "integrity": "sha512-Y5k8ipgfvz5d/76tx7JYbKQTcgFSU6VgJ3kKQv4zGTKr+a9T/KBvfRvGtSFgKDQGt/DBykQixV0vNWKIdzWErA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "babel-plugin-polyfill-corejs2": "^0.1.4", + "babel-plugin-polyfill-corejs3": "^0.1.3", + "babel-plugin-polyfill-regenerator": "^0.1.2", + "semver": "^6.3.0" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz", + "integrity": "sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.13.0.tgz", + "integrity": "sha512-V6vkiXijjzYeFmQTr3dBxPtZYLPcUfY34DebOU27jIl2M/Y8Egm52Hw82CSjjPqd54GTlJs5x+CR7HeNr24ckg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.13.tgz", + "integrity": "sha512-Jc3JSaaWT8+fr7GRvQP02fKDsYk4K/lYwWq38r/UGfaxo89ajud321NH28KRQ7xy1Ybc0VUE5Pz8psjNNDUglg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.13.0.tgz", + "integrity": "sha512-d67umW6nlfmr1iehCcBv69eSUSySk1EsIS8aTDX4Xo9qajAh6mYtcl4kJrBkGXuxZPEgVr7RVfAvNW6YQkd4Mw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.13.tgz", + "integrity": "sha512-eKv/LmUJpMnu4npgfvs3LiHhJua5fo/CysENxa45YCQXZwKnGCQKAg87bvoqSW1fFT+HA32l03Qxsm8ouTY3ZQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.13.0.tgz", + "integrity": "sha512-elQEwluzaU8R8dbVuW2Q2Y8Nznf7hnjM7+DSCd14Lo5fF63C9qNLbwZYbmZrtV9/ySpSUpkRpQXvJb6xyu4hCQ==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.13.0", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-typescript": "^7.12.13" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz", + "integrity": "sha512-0bHEkdwJ/sN/ikBHfSmOXPypN/beiGqjo+o4/5K+vxEFNPRPdImhviPakMKG4x96l85emoa0Z6cDflsdBusZbw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.13.tgz", + "integrity": "sha512-mDRzSNY7/zopwisPZ5kM9XKCfhchqIYwAKRERtEnhYscZB79VRekuRSoYbN0+KVe3y8+q1h6A4svXtP7N+UoCA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/preset-env": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.12.tgz", + "integrity": "sha512-JzElc6jk3Ko6zuZgBtjOd01pf9yYDEIH8BcqVuYIuOkzOwDesoa/Nz4gIo4lBG6K861KTV9TvIgmFuT6ytOaAA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.12", + "@babel/helper-compilation-targets": "^7.13.10", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-validator-option": "^7.12.17", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.13.12", + "@babel/plugin-proposal-async-generator-functions": "^7.13.8", + "@babel/plugin-proposal-class-properties": "^7.13.0", + "@babel/plugin-proposal-dynamic-import": "^7.13.8", + "@babel/plugin-proposal-export-namespace-from": "^7.12.13", + "@babel/plugin-proposal-json-strings": "^7.13.8", + "@babel/plugin-proposal-logical-assignment-operators": "^7.13.8", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8", + "@babel/plugin-proposal-numeric-separator": "^7.12.13", + "@babel/plugin-proposal-object-rest-spread": "^7.13.8", + "@babel/plugin-proposal-optional-catch-binding": "^7.13.8", + "@babel/plugin-proposal-optional-chaining": "^7.13.12", + "@babel/plugin-proposal-private-methods": "^7.13.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.13", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.12.13", + "@babel/plugin-transform-arrow-functions": "^7.13.0", + "@babel/plugin-transform-async-to-generator": "^7.13.0", + "@babel/plugin-transform-block-scoped-functions": "^7.12.13", + "@babel/plugin-transform-block-scoping": "^7.12.13", + "@babel/plugin-transform-classes": "^7.13.0", + "@babel/plugin-transform-computed-properties": "^7.13.0", + "@babel/plugin-transform-destructuring": "^7.13.0", + "@babel/plugin-transform-dotall-regex": "^7.12.13", + "@babel/plugin-transform-duplicate-keys": "^7.12.13", + "@babel/plugin-transform-exponentiation-operator": "^7.12.13", + "@babel/plugin-transform-for-of": "^7.13.0", + "@babel/plugin-transform-function-name": "^7.12.13", + "@babel/plugin-transform-literals": "^7.12.13", + "@babel/plugin-transform-member-expression-literals": "^7.12.13", + "@babel/plugin-transform-modules-amd": "^7.13.0", + "@babel/plugin-transform-modules-commonjs": "^7.13.8", + "@babel/plugin-transform-modules-systemjs": "^7.13.8", + "@babel/plugin-transform-modules-umd": "^7.13.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.13", + "@babel/plugin-transform-new-target": "^7.12.13", + "@babel/plugin-transform-object-super": "^7.12.13", + "@babel/plugin-transform-parameters": "^7.13.0", + "@babel/plugin-transform-property-literals": "^7.12.13", + "@babel/plugin-transform-regenerator": "^7.12.13", + "@babel/plugin-transform-reserved-words": "^7.12.13", + "@babel/plugin-transform-shorthand-properties": "^7.12.13", + "@babel/plugin-transform-spread": "^7.13.0", + "@babel/plugin-transform-sticky-regex": "^7.12.13", + "@babel/plugin-transform-template-literals": "^7.13.0", + "@babel/plugin-transform-typeof-symbol": "^7.12.13", + "@babel/plugin-transform-unicode-escapes": "^7.12.13", + "@babel/plugin-transform-unicode-regex": "^7.12.13", + "@babel/preset-modules": "^0.1.4", + "@babel/types": "^7.13.12", + "babel-plugin-polyfill-corejs2": "^0.1.4", + "babel-plugin-polyfill-corejs3": "^0.1.3", + "babel-plugin-polyfill-regenerator": "^0.1.2", + "core-js-compat": "^3.9.0", + "semver": "^6.3.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/preset-react": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.12.13.tgz", + "integrity": "sha512-TYM0V9z6Abb6dj1K7i5NrEhA13oS5ujUYQYDfqIBXYHOc2c2VkFgc+q9kyssIyUfy4/hEwqrgSlJ/Qgv8zJLsA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-transform-react-display-name": "^7.12.13", + "@babel/plugin-transform-react-jsx": "^7.12.13", + "@babel/plugin-transform-react-jsx-development": "^7.12.12", + "@babel/plugin-transform-react-pure-annotations": "^7.12.1" + } + }, + "@babel/preset-typescript": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.13.0.tgz", + "integrity": "sha512-LXJwxrHy0N3f6gIJlYbLta1D9BDtHpQeqwzM0LIfjDlr6UE/D5Mc7W4iDiQzaE+ks0sTjT26ArcHWnJVt0QiHw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-validator-option": "^7.12.17", + "@babel/plugin-transform-typescript": "^7.13.0" + } + }, + "@babel/runtime": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz", + "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/traverse": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", + "integrity": "sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==", + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.0", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.13.0", + "@babel/types": "^7.13.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.12.tgz", + "integrity": "sha512-K4nY2xFN4QMvQwkQ+zmBDp6ANMbVNw6BbxWmYA4qNjhR9W+Lj/8ky5MEY2Me5r+B2c6/v6F53oMndG+f9s3IiA==", + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "@emotion/is-prop-valid": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", + "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "requires": { + "@emotion/memoize": "0.7.4" + } + }, + "@emotion/memoize": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==" + }, + "@emotion/stylis": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz", + "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==" + }, + "@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" + }, + "@reach/auto-id": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@reach/auto-id/-/auto-id-0.10.5.tgz", + "integrity": "sha512-we4/bwjFxJ3F+2eaddQ1HltbKvJ7AB8clkN719El7Zugpn/vOjfPMOVUiBqTmPGLUvkYrq4tpuFwLvk2HyOVHg==", + "requires": { + "@reach/utils": "0.10.5", + "tslib": "^2.0.0" + } + }, + "@reach/descendants": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@reach/descendants/-/descendants-0.10.5.tgz", + "integrity": "sha512-8HhN4DwS/HsPQ+Ym/Ft/XJ1spXBYdE8hqpnbYR9UcU7Nx3oDbTIdhjA6JXXt23t5avYIx2jRa8YHCtVKSHuiwA==", + "requires": { + "@reach/utils": "0.10.5", + "tslib": "^2.0.0" + } + }, + "@reach/disclosure": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@reach/disclosure/-/disclosure-0.10.5.tgz", + "integrity": "sha512-DCae28vcL7wXJNt8hySI2uaowEJ6KPDJ9U14xQMkMs0/lH7Tz8PoAO3llf7csEXk/4kzjnDpkyobDiEV3pz05g==", + "requires": { + "@reach/auto-id": "0.10.5", + "@reach/utils": "0.10.5", + "tslib": "^2.0.0" + } + }, + "@reach/menu-button": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@reach/menu-button/-/menu-button-0.10.5.tgz", + "integrity": "sha512-PQzFzexk9K7Q5qTGmXcg3qYp+F36H0MaeyzybR5t4lB1e56nAh1u/C2bocwpHssIoy25xOR8Nu+LVMVf6k6cUw==", + "requires": { + "@reach/auto-id": "0.10.5", + "@reach/descendants": "0.10.5", + "@reach/popover": "0.10.5", + "@reach/utils": "0.10.5", + "prop-types": "^15.7.2", + "tslib": "^2.0.0" + } + }, + "@reach/observe-rect": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@reach/observe-rect/-/observe-rect-1.2.0.tgz", + "integrity": "sha512-Ba7HmkFgfQxZqqaeIWWkNK0rEhpxVQHIoVyW1YDSkGsGIXzcaW4deC8B0pZrNSSyLTdIk7y+5olKt5+g0GmFIQ==" + }, + "@reach/popover": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@reach/popover/-/popover-0.10.5.tgz", + "integrity": "sha512-S+qWIsjrN1yMpHjgELhjpdGc4Q3q1plJtXBGGQRxUAjmCUA/5OY7t5w5C8iqMNAEBwCvYXKvK/pLcXFxxLykSw==", + "requires": { + "@reach/portal": "0.10.5", + "@reach/rect": "0.10.5", + "@reach/utils": "0.10.5", + "tabbable": "^4.0.0", + "tslib": "^2.0.0" + } + }, + "@reach/portal": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.10.5.tgz", + "integrity": "sha512-K5K8gW99yqDPDCWQjEfSNZAbGOQWSx5AN2lpuR1gDVoz4xyWpTJ0k0LbetYJTDVvLP/InEcR7AU42JaDYDCXQw==", + "requires": { + "@reach/utils": "0.10.5", + "tslib": "^2.0.0" + } + }, + "@reach/rect": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@reach/rect/-/rect-0.10.5.tgz", + "integrity": "sha512-JBKs2HniYecq5zLO6UFReX28SUBPM3n0aizdNgHuvwZmDcTfNV4jsuJYQLqJ+FbCQsrSHkBxKZqWpfGXY9bUEg==", + "requires": { + "@reach/observe-rect": "1.2.0", + "@reach/utils": "0.10.5", + "prop-types": "^15.7.2", + "tslib": "^2.0.0" + } + }, + "@reach/tabs": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@reach/tabs/-/tabs-0.10.5.tgz", + "integrity": "sha512-oQJxQ9FwFsXo2HxEzJxFU/wP31bPVh4VU54NlhHW9f49uofyYkIKBbAhdF0Zb3TnaFp4cGKPHX39pXBYGPDkAQ==", + "requires": { + "@reach/auto-id": "0.10.5", + "@reach/descendants": "0.10.5", + "@reach/utils": "0.10.5", + "prop-types": "^15.7.2", + "tslib": "^2.0.0" + } + }, + "@reach/utils": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.10.5.tgz", + "integrity": "sha512-5E/xxQnUbmpI/LrufBAOXjunl96DnqX6B4zC2MO2KH/dRzLug5gM5VuOwV26egsp0jvsSPxojwciOhS43px3qw==", + "requires": { + "@types/warning": "^3.0.0", + "tslib": "^2.0.0", + "warning": "^4.0.3" + } + }, + "@styled-system/background": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.2.tgz", + "integrity": "sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/border": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@styled-system/border/-/border-5.1.5.tgz", + "integrity": "sha512-JvddhNrnhGigtzWRCVuAHepniyVi6hBlimxWDVAdcTuk7aRn9BYJUwfHslURtwYFsF5FoEs8Zmr1oZq2M1AP0A==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/color": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/color/-/color-5.1.2.tgz", + "integrity": "sha512-1kCkeKDZkt4GYkuFNKc7vJQMcOmTl3bJY3YBUs7fCNM6mMYJeT1pViQ2LwBSBJytj3AB0o4IdLBoepgSgGl5MA==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/core": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/core/-/core-5.1.2.tgz", + "integrity": "sha512-XclBDdNIy7OPOsN4HBsawG2eiWfCcuFt6gxKn1x4QfMIgeO6TOlA2pZZ5GWZtIhCUqEPTgIBta6JXsGyCkLBYw==", + "requires": { + "object-assign": "^4.1.1" + } + }, + "@styled-system/css": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@styled-system/css/-/css-5.1.5.tgz", + "integrity": "sha512-XkORZdS5kypzcBotAMPBoeckDs9aSZVkvrAlq5K3xP8IMAUek+x2O4NtwoSgkYkWWzVBu6DGdFZLR790QWGG+A==" + }, + "@styled-system/flexbox": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.1.2.tgz", + "integrity": "sha512-6hHV52+eUk654Y1J2v77B8iLeBNtc+SA3R4necsu2VVinSD7+XY5PCCEzBFaWs42dtOEDIa2lMrgL0YBC01mDQ==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/grid": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/grid/-/grid-5.1.2.tgz", + "integrity": "sha512-K3YiV1KyHHzgdNuNlaw8oW2ktMuGga99o1e/NAfTEi5Zsa7JXxzwEnVSDSBdJC+z6R8WYTCYRQC6bkVFcvdTeg==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/layout": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/layout/-/layout-5.1.2.tgz", + "integrity": "sha512-wUhkMBqSeacPFhoE9S6UF3fsMEKFv91gF4AdDWp0Aym1yeMPpqz9l9qS/6vjSsDPF7zOb5cOKC3tcKKOMuDCPw==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/position": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/position/-/position-5.1.2.tgz", + "integrity": "sha512-60IZfMXEOOZe3l1mCu6sj/2NAyUmES2kR9Kzp7s2D3P4qKsZWxD1Se1+wJvevb+1TP+ZMkGPEYYXRyU8M1aF5A==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/shadow": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/shadow/-/shadow-5.1.2.tgz", + "integrity": "sha512-wqniqYb7XuZM7K7C0d1Euxc4eGtqEe/lvM0WjuAFsQVImiq6KGT7s7is+0bNI8O4Dwg27jyu4Lfqo/oIQXNzAg==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/space": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.1.2.tgz", + "integrity": "sha512-+zzYpR8uvfhcAbaPXhH8QgDAV//flxqxSjHiS9cDFQQUSznXMQmxJegbhcdEF7/eNnJgHeIXv1jmny78kipgBA==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/typography": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/typography/-/typography-5.1.2.tgz", + "integrity": "sha512-BxbVUnN8N7hJ4aaPOd7wEsudeT7CxarR+2hns8XCX1zp0DFfbWw4xYa/olA0oQaqx7F1hzDg+eRaGzAJbF+jOg==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/variant": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@styled-system/variant/-/variant-5.1.5.tgz", + "integrity": "sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==", + "requires": { + "@styled-system/core": "^5.1.2", + "@styled-system/css": "^5.1.5" + } + }, + "@tlon/indigo-light": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@tlon/indigo-light/-/indigo-light-1.0.7.tgz", + "integrity": "sha512-xO8hj2Ak6cEYe2QCM3w7UuaSB8ubg6G0G6/OkPVMVrz6b5ztccZmkbmYCYJ/Ot6976lGzKFsWFKRUhwRgCHfHQ==" + }, + "@tlon/indigo-react": { + "version": "1.2.22", + "resolved": "https://registry.npmjs.org/@tlon/indigo-react/-/indigo-react-1.2.22.tgz", + "integrity": "sha512-8w2TkYicch+R0kkZT+MZ4oG0pIJFNjhmVlbXgqyXhOCPRJB2WrAh6OM5Cbb389r7lA+CXXfu3Nx7Rdiuxjf/vg==", + "requires": { + "@reach/menu-button": "^0.10.5", + "react": "^16.13.1", + "tslib": "^2.0.1" + } + }, + "@tlon/sigil-js": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@tlon/sigil-js/-/sigil-js-1.4.3.tgz", + "integrity": "sha512-IaJUvAgXRmPFj5JA/MDfd+b+RFDhGdiMLfzJZKuFIQyl3Dl/3cC9HdDLCYSoK4GBTu3gZqoqi6wxZl5Xia/cSw==", + "requires": { + "invariant": "^2.2.4", + "svgson": "^4.0.0", + "transformation-matrix": "2.1.1" + } + }, + "@types/anymatch": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.1.tgz", + "integrity": "sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==", + "dev": true + }, + "@types/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/html-minifier-terser": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", + "integrity": "sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", + "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==" + }, + "@types/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", + "dev": true + }, + "@types/node": { + "version": "14.14.36", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.36.tgz", + "integrity": "sha512-kjivUwDJfIjngzbhooRnOLhGYz6oRFi+L+EpMjxroDYXwDw9lHrJJ43E+dJ6KAd3V3WxWAJ/qZE9XKYHhjPOFQ==", + "dev": true + }, + "@types/source-list-map": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz", + "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", + "dev": true + }, + "@types/tapable": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.7.tgz", + "integrity": "sha512-0VBprVqfgFD7Ehb2vd8Lh9TG3jP98gvr8rgehQqzztZNI7o8zS8Ad4jyZneKELphpuE212D8J70LnSNQSyO6bQ==", + "dev": true + }, + "@types/uglify-js": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.13.0.tgz", + "integrity": "sha512-EGkrJD5Uy+Pg0NUR8uA4bJ5WMfljyad0G+784vLCNUkD+QwOJXUbBYExXfVGf7YtyzdQp3L/XMYcliB987kL5Q==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "@types/warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz", + "integrity": "sha1-DSUBJorY+ZYrdA04fEZU9fjiPlI=" + }, + "@types/webpack": { + "version": "4.41.27", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.27.tgz", + "integrity": "sha512-wK/oi5gcHi72VMTbOaQ70VcDxSQ1uX8S2tukBK9ARuGXrYM/+u4ou73roc7trXDNmCxCoerE8zruQqX/wuHszA==", + "dev": true, + "requires": { + "@types/anymatch": "*", + "@types/node": "*", + "@types/tapable": "^1", + "@types/uglify-js": "*", + "@types/webpack-sources": "*", + "source-map": "^0.6.0" + } + }, + "@types/webpack-sources": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.1.0.tgz", + "integrity": "sha512-LXn/oYIpBeucgP1EIJbKQ2/4ZmpvRl+dlrFdX7+94SKRUV3Evy3FsfMZY318vGhkWUS5MPhtOM3w1/hCOAOXcg==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/source-list-map": "*", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@welldone-software/why-did-you-render": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@welldone-software/why-did-you-render/-/why-did-you-render-6.1.1.tgz", + "integrity": "sha512-BMFp33T4MC27qvCWsI1SqwZCxIlxoQXsPQFdGLDsPSg7sgoWX4Gzj0+hlKVrWrCBiIxi7gP2JcS9IK6CZzk8mg==", + "dev": true, + "requires": { + "lodash": "^4" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" + }, + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true + }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", + "dev": true + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "argon2-wasm": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/argon2-wasm/-/argon2-wasm-0.9.0.tgz", + "integrity": "sha512-bt5xqrDt5FnA1gdLLouOwi2NN1h9BeML8DmKth7CCYhygoXUEDeIxEMB++q+CUPQ8U5gju065Z0MjI+hVSXX7A==" + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "babel-loader": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", + "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", + "dev": true, + "requires": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^1.4.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.1.10.tgz", + "integrity": "sha512-DO95wD4g0A8KRaHKi0D51NdGXzvpqVLnLu5BTvDlpqUEpTmeEtypgC1xqesORaWmiUOQI14UHKlzNd9iZ2G3ZA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.0", + "@babel/helper-define-polyfill-provider": "^0.1.5", + "semver": "^6.1.1" + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.1.7.tgz", + "integrity": "sha512-u+gbS9bbPhZWEeyy1oR/YaaSpod/KDT07arZHb80aTpl8H5ZBq+uN1nN9/xtX7jQyfLdPfoqI4Rue/MQSWJquw==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.1.5", + "core-js-compat": "^3.8.1" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.1.6.tgz", + "integrity": "sha512-OUrYG9iKPKz8NxswXbRAdSwF0GhRdIEMTloQATJi4bDuFqrXaXcCUT/VGNrr8pBcjMh1RxZ7Xt9cytVJTJfvMg==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.1.5" + } + }, + "babel-plugin-root-import": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/babel-plugin-root-import/-/babel-plugin-root-import-6.6.0.tgz", + "integrity": "sha512-SPzVOHd7nDh5loZwZBxtX/oOu1MXeKjTkz+1VnnzLWC0dk8sJIGC2IDQ2uWIBjE5mUtXlQ35MTHSqN0Xn7qHrg==", + "dev": true, + "requires": { + "slash": "^3.0.0" + } + }, + "babel-plugin-styled-components": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.12.0.tgz", + "integrity": "sha512-FEiD7l5ZABdJPpLssKXjBUJMYqzbcNzBowfXDCdJhOpbhWiewapUaY+LZGT8R4Jg2TwOjGjG4RKeyrO5p9sBkA==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.0.0", + "@babel/helper-module-imports": "^7.0.0", + "babel-plugin-syntax-jsx": "^6.18.0", + "lodash": "^4.17.11" + } + }, + "babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip174": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.0.1.tgz", + "integrity": "sha512-i3X26uKJOkDTAalYAp0Er+qGMDhrbbh2o93/xiPyAN2s25KrClSpe3VXo/7mNJoqA5qfko8rLS2l3RWZgYmjKQ==" + }, + "bip32": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/bip32/-/bip32-1.0.4.tgz", + "integrity": "sha512-8T21eLWylZETolyqCPgia+MNp+kY37zFr7PTFDTPObHeNi9JlfG4qGIh8WzerIJidtwoK+NsWq2I5i66YfHoIw==", + "requires": { + "bs58check": "^2.1.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "tiny-secp256k1": "^1.0.0", + "typeforce": "^1.11.5", + "wif": "^2.0.6" + } + }, + "bip39": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.6.0.tgz", + "integrity": "sha512-RrnQRG2EgEoqO24ea+Q/fftuPUZLmrEM3qNhhGsA3PbaXaCW791LTzPuVyx/VprXQcTbPJ3K3UeTna8ZnVl2sg==", + "requires": { + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9", + "randombytes": "^2.0.1", + "safe-buffer": "^5.0.1", + "unorm": "^1.3.3" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "bitcoin-address-validation": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bitcoin-address-validation/-/bitcoin-address-validation-2.0.1.tgz", + "integrity": "sha512-S3VEoqW4w/92QKKZhmraw84oUXc35i++hOknY9lxy9p10MXdwmhPjTNuKP37dm8YttYr5elUQE3jumc9l/PR5w==", + "requires": { + "base-x": "^3.0.8", + "bech32": "^2.0.0", + "sha.js": "^2.4.11" + }, + "dependencies": { + "bech32": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + } + } + }, + "bitcoin-ops": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz", + "integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==" + }, + "bitcoinjs-lib": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz", + "integrity": "sha512-5DcLxGUDejgNBYcieMIUfjORtUeNWl828VWLHJGVKZCb4zIS1oOySTUr0LGmcqJBQgTBz3bGbRQla4FgrdQEIQ==", + "requires": { + "bech32": "^1.1.2", + "bip174": "^2.0.1", + "bip32": "^2.0.4", + "bip66": "^1.1.0", + "bitcoin-ops": "^1.4.0", + "bs58check": "^2.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.3", + "merkle-lib": "^2.0.10", + "pushdata-bitcoin": "^1.0.1", + "randombytes": "^2.0.1", + "tiny-secp256k1": "^1.1.1", + "typeforce": "^1.11.3", + "varuint-bitcoin": "^1.0.4", + "wif": "^2.0.1" + }, + "dependencies": { + "@types/node": { + "version": "10.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" + }, + "bip32": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz", + "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==", + "requires": { + "@types/node": "10.12.18", + "bs58check": "^2.1.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "tiny-secp256k1": "^1.1.3", + "typeforce": "^1.11.5", + "wif": "^2.0.6" + } + } + } + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "dev": true, + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + }, + "dependencies": { + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + } + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + } + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "browserslist": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + } + }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "dependencies": { + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + } + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "dev": true, + "requires": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "camelize": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", + "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" + }, + "caniuse-lite": { + "version": "1.0.30001204", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz", + "integrity": "sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", + "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + }, + "clean-css": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + } + }, + "clean-webpack-plugin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz", + "integrity": "sha512-MciirUH5r+cYLGCOL5JX/ZLzOZbVr1ot3Fw+KcvbhUb6PM+yycqd9ZhIlcigQ5gl+XhppNmw3bEFuaaMNyLj3A==", + "dev": true, + "requires": { + "@types/webpack": "^4.4.31", + "del": "^4.1.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "connect-history-api-fallback": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", + "dev": true + }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js-compat": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.9.1.tgz", + "integrity": "sha512-jXAirMQxrkbiiLsCx9bQPJFA6llDadKMpYrBJQJ3/c4/vsPP/fAf29h24tviRlvwUL6AmY5CHLu2GvjuYviQqA==", + "dev": true, + "requires": { + "browserslist": "^4.16.3", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" + }, + "css-loader": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.6.0.tgz", + "integrity": "sha512-M5lSukoWi1If8dhQAUCvj4H8vUt3vOnwbQBH9DdTm/s4Ym2B/3dPMtYZeJmq7Q3S3Pa+I94DcZ7pc9bP14cWIQ==", + "requires": { + "camelcase": "^5.3.1", + "cssesc": "^3.0.0", + "icss-utils": "^4.1.1", + "loader-utils": "^1.2.3", + "normalize-path": "^3.0.0", + "postcss": "^7.0.32", + "postcss-modules-extract-imports": "^2.0.0", + "postcss-modules-local-by-default": "^3.0.2", + "postcss-modules-scope": "^2.2.0", + "postcss-modules-values": "^3.0.0", + "postcss-value-parser": "^4.1.0", + "schema-utils": "^2.7.0", + "semver": "^6.3.0" + } + }, + "css-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "css-to-react-native": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz", + "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==", + "requires": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^4.0.2" + } + }, + "css-what": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", + "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", + "dev": true + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" + }, + "cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-equal": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz", + "integrity": "sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0=" + }, + "deep-rename-keys": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/deep-rename-keys/-/deep-rename-keys-0.2.1.tgz", + "integrity": "sha1-7eeFN9emaivmFRfir5Vtf1ij8dg=", + "requires": { + "kind-of": "^3.0.2", + "rename-keys": "^1.1.2" + } + }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==" + }, + "default-gateway": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", + "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "ip-regex": "^2.1.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "del": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "globby": "^6.1.0", + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "detect-node": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.5.tgz", + "integrity": "sha512-qi86tE6hRcFHy8jI1m2VG+LaPUR1LhqDa5G8tVjuUXmOrpuAgqsA1pN0+ldgr3aKUH+QLI9hCY/OcRYisERejw==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", + "dev": true + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "dev": true, + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "dev": true, + "requires": { + "buffer-indexof": "^1.0.0" + } + }, + "dom-converter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", + "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", + "dev": true, + "requires": { + "utila": "~0.4" + } + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "dev": true + } + } + }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", + "dev": true + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.700", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.700.tgz", + "integrity": "sha512-wQtaxVZzpOeCjW1CGuC5W3bYjE2jglvk076LcTautBOB9UtHztty7wNzjVsndiMcSsdUsdMy5w76w5J1U7OPTQ==", + "dev": true + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "eventemitter3": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha1-teEHm1n7XhuidxwKmTvgYKWMmbo=" + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "eventsource": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz", + "integrity": "sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==", + "dev": true, + "requires": { + "original": "^1.0.0" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dev": true, + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "faye-websocket": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", + "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true + }, + "file-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", + "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "follow-redirects": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", + "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "formik": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/formik/-/formik-2.2.6.tgz", + "integrity": "sha512-Kxk2zQRafy56zhLmrzcbryUpMBvT0tal5IvcifK5+4YNGelKsnrODFJ0sZQRMQboblWNym4lAW3bt+tf2vApSA==", + "requires": { + "deepmerge": "^2.1.1", + "hoist-non-react-statics": "^3.3.0", + "lodash": "^4.17.14", + "lodash-es": "^4.17.14", + "react-fast-compare": "^2.0.1", + "tiny-warning": "^1.0.2", + "tslib": "^1.10.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "dev": true, + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "requires": { + "global-prefix": "^3.0.0" + }, + "dependencies": { + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "dependencies": { + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" + }, + "handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "history": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "requires": { + "@babel/runtime": "^7.1.2", + "loose-envify": "^1.2.0", + "resolve-pathname": "^3.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "html-entities": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", + "dev": true + }, + "html-minifier-terser": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", + "integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==", + "dev": true, + "requires": { + "camel-case": "^4.1.1", + "clean-css": "^4.2.3", + "commander": "^4.1.1", + "he": "^1.2.0", + "param-case": "^3.0.3", + "relateurl": "^0.2.7", + "terser": "^4.6.3" + } + }, + "html-webpack-plugin": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.5.2.tgz", + "integrity": "sha512-q5oYdzjKUIPQVjOosjgvCHQOv9Ett9CYYHlgvJeXG0qQvdSojnBq4vAdQBwn1+yGveAwHCoe/rMR86ozX3+c2A==", + "dev": true, + "requires": { + "@types/html-minifier-terser": "^5.0.0", + "@types/tapable": "^1.0.5", + "@types/webpack": "^4.41.8", + "html-minifier-terser": "^5.0.1", + "loader-utils": "^1.2.3", + "lodash": "^4.17.20", + "pretty-error": "^2.1.1", + "tapable": "^1.1.3", + "util.promisify": "1.0.0" + } + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + } + } + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "http-parser-js": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", + "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==", + "dev": true + }, + "http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + } + } + }, + "http-proxy-middleware": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", + "dev": true, + "requires": { + "http-proxy": "^1.17.0", + "is-glob": "^4.0.0", + "lodash": "^4.17.11", + "micromatch": "^3.1.10" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "i": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", + "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-utils": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz", + "integrity": "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==", + "requires": { + "postcss": "^7.0.14" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "internal-ip": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", + "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", + "dev": true, + "requires": { + "default-gateway": "^4.2.0", + "ipaddr.js": "^1.9.0" + } + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true + }, + "is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-callable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", + "dev": true + }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-negative-zero": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", + "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true + }, + "is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true + }, + "is-path-in-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "dev": true, + "requires": { + "is-path-inside": "^2.1.0" + } + }, + "is-path-inside": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "dev": true, + "requires": { + "path-is-inside": "^1.0.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "js-sha256": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", + "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json3": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", + "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "keccak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "requires": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" + } + }, + "killable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", + "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, + "lodash.chunk": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", + "integrity": "sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw=" + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "loglevel": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", + "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "requires": { + "tslib": "^2.0.3" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "markdown-to-jsx": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.1.2.tgz", + "integrity": "sha512-O8DMCl32V34RrD+ZHxcAPc2+kYytuDIoQYjY36RVdsLK7uHjgNVvFec4yv0X6LgB4YEZgSvK5QtFi5YVqEpoMA==" + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merkle-lib": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz", + "integrity": "sha1-grjbrnXieneFOItz+ddyXQ9vMyY=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + } + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", + "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.29", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", + "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "dev": true, + "requires": { + "mime-db": "1.46.0" + } + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "dev": true, + "requires": { + "dom-walk": "^0.1.0" + } + }, + "mini-create-react-context": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", + "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==", + "requires": { + "@babel/runtime": "^7.12.1", + "tiny-warning": "^1.0.3" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + }, + "mousetrap": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.5.tgz", + "integrity": "sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==" + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "dev": true, + "requires": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, + "mv": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", + "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", + "requires": { + "mkdirp": "~0.5.1", + "ncp": "~2.0.0", + "rimraf": "~2.4.0" + } + }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "requires": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", + "dev": true + }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + } + } + }, + "node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + }, + "dependencies": { + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + } + } + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", + "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.0", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.2", + "is-string": "^1.0.5", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.0" + } + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "dev": true + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "is-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" + } + }, + "object-inspect": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", + "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + } + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "omit-deep": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/omit-deep/-/omit-deep-0.3.0.tgz", + "integrity": "sha1-IcivNJm8rdKWUaIyy8rLxSRF6+w=", + "requires": { + "is-plain-object": "^2.0.1", + "unset-value": "^0.1.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "opn": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", + "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "original": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", + "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", + "dev": true, + "requires": { + "url-parse": "^1.4.3" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true + }, + "p-retry": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", + "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", + "dev": true, + "requires": { + "retry": "^0.12.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "parallel-transform": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dev": true, + "requires": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "param-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "requires": { + "isarray": "0.0.1" + } + }, + "pbkdf2": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dev": true, + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "7.0.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", + "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "postcss-modules-extract-imports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", + "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", + "requires": { + "postcss": "^7.0.5" + } + }, + "postcss-modules-local-by-default": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz", + "integrity": "sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw==", + "requires": { + "icss-utils": "^4.1.1", + "postcss": "^7.0.32", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + } + }, + "postcss-modules-scope": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz", + "integrity": "sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ==", + "requires": { + "postcss": "^7.0.6", + "postcss-selector-parser": "^6.0.0" + } + }, + "postcss-modules-values": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz", + "integrity": "sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==", + "requires": { + "icss-utils": "^4.0.0", + "postcss": "^7.0.6" + } + }, + "postcss-selector-parser": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", + "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1", + "util-deprecate": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==" + }, + "pretty-error": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz", + "integrity": "sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==", + "dev": true, + "requires": { + "lodash": "^4.17.20", + "renderkid": "^2.0.4" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "promise": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "requires": { + "asap": "~2.0.6" + } + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "prompt": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.1.0.tgz", + "integrity": "sha512-ec1vUPXCplDBDUVD8uPa3XGA+OzLrO40Vxv3F1uxoiZGkZhdctlK2JotcHq5X6ExjocDOGwGdCSXloGNyU5L1Q==", + "requires": { + "colors": "^1.1.2", + "read": "1.0.x", + "revalidator": "0.1.x", + "utile": "0.3.x", + "winston": "2.x" + } + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "proxy-addr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.1" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "pushdata-bitcoin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz", + "integrity": "sha1-FZMdPNlnreUiBvUjqnMxrvfUOvc=", + "requires": { + "bitcoin-ops": "^1.3.0" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + } + } + }, + "react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + } + }, + "react-dom": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + } + }, + "react-fast-compare": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz", + "integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==" + }, + "react-hot-loader": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.13.0.tgz", + "integrity": "sha512-JrLlvUPqh6wIkrK2hZDfOyq/Uh/WeVEr8nc7hkn2/3Ul0sx1Kr5y4kOGNacNRoj7RhwLNcQ3Udf1KJXrqc0ZtA==", + "dev": true, + "requires": { + "fast-levenshtein": "^2.0.6", + "global": "^4.3.0", + "hoist-non-react-statics": "^3.3.0", + "loader-utils": "^1.1.0", + "prop-types": "^15.6.1", + "react-lifecycles-compat": "^3.0.4", + "shallowequal": "^1.1.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", + "dev": true + }, + "react-router": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz", + "integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==", + "requires": { + "@babel/runtime": "^7.1.2", + "history": "^4.9.0", + "hoist-non-react-statics": "^3.1.0", + "loose-envify": "^1.3.1", + "mini-create-react-context": "^0.4.0", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.2", + "react-is": "^16.6.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + } + }, + "react-router-dom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz", + "integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==", + "requires": { + "@babel/runtime": "^7.1.2", + "history": "^4.9.0", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-router": "5.2.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + } + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "requires": { + "mute-stream": "~0.0.4" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" + }, + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexp.prototype.flags": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", + "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "regexpu-core": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "regjsparser": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "rename-keys": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/rename-keys/-/rename-keys-1.2.0.tgz", + "integrity": "sha512-U7XpAktpbSgHTRSNRrjKSrjYkZKuhUukfoBlXWXUExCAqhzh1TU3BDRAfJmarcl5voKS+pbKU9MvyLWKZ4UEEg==" + }, + "renderkid": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.5.tgz", + "integrity": "sha512-ccqoLg+HLOHq1vdfYNm4TBeaCDIi1FLt3wGojTDSvdewUv65oTmI3cnT2E4hRjl1gzKZIPK+KZrXzlUYKnR+vQ==", + "dev": true, + "requires": { + "css-select": "^2.0.2", + "dom-converter": "^0.2", + "htmlparser2": "^3.10.1", + "lodash": "^4.17.20", + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-in-file": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-4.3.1.tgz", + "integrity": "sha512-FqVvfmpqGTD2JRGI1JjJ86b24P17x/WWwGdxExeyJxnh/2rVQz2+jXfD1507UnnhEQw092X0u0DPCBf1WC4ooQ==", + "requires": { + "chalk": "^2.4.2", + "glob": "^7.1.6", + "yargs": "^15.0.2" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "dependencies": { + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + } + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-pathname": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true + }, + "revalidator": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", + "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=" + }, + "rimraf": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", + "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", + "requires": { + "glob": "^6.0.1" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sass": { + "version": "1.32.8", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.32.8.tgz", + "integrity": "sha512-Sl6mIeGpzjIUZqvKnKETfMf0iDAswD9TNlv13A7aAF3XZlRPMq4VvJWBC2N2DXbp94MQVdNSFG6LfF/iOXrPHQ==", + "dev": true, + "requires": { + "chokidar": ">=2.0.0 <4.0.0" + } + }, + "sass-loader": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz", + "integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "loader-utils": "^1.2.3", + "neo-async": "^2.6.1", + "schema-utils": "^2.6.1", + "semver": "^6.3.0" + } + }, + "scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + }, + "secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", + "dev": true + }, + "selfsigned": { + "version": "1.10.8", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz", + "integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==", + "dev": true, + "requires": { + "node-forge": "^0.10.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "sockjs": { + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.21.tgz", + "integrity": "sha512-DhbPFGpxjc6Z3I+uX07Id5ZO2XwYsWOrYjaSeieES78cq+JaJvVe5q/m1uvjIQhXinhIeCFRH6JgXe+mvVMyXw==", + "dev": true, + "requires": { + "faye-websocket": "^0.11.3", + "uuid": "^3.4.0", + "websocket-driver": "^0.7.4" + } + }, + "sockjs-client": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.5.1.tgz", + "integrity": "sha512-VnVAb663fosipI/m6pqRXakEOw7nvd7TUgdr3PlR/8V2I95QIdwT8L4nMxhyU8SmDBHYXU1TOElaKOmKLfYzeQ==", + "dev": true, + "requires": { + "debug": "^3.2.6", + "eventsource": "^1.0.7", + "faye-websocket": "^0.11.3", + "inherits": "^2.0.4", + "json3": "^3.3.3", + "url-parse": "^1.5.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "dev": true + }, + "spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + } + }, + "spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "style-loader": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.3.0.tgz", + "integrity": "sha512-V7TCORko8rs9rIqkSrlMfkqA63DfoGBBJmK1kKGCcSi+BWb4cqz0SRsnp4l6rU5iwOEd0/2ePv68SV22VXon4Q==", + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^2.7.0" + }, + "dependencies": { + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "styled-components": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.2.3.tgz", + "integrity": "sha512-BlR+KrLW3NL1yhvEB+9Nu9Dt51CuOnHoxd+Hj+rYPdtyR8X11uIW9rvhpy3Dk4dXXBsiW1u5U78f00Lf/afGoA==", + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/traverse": "^7.4.5", + "@emotion/is-prop-valid": "^0.8.8", + "@emotion/stylis": "^0.8.4", + "@emotion/unitless": "^0.7.4", + "babel-plugin-styled-components": ">= 1.12.0", + "css-to-react-native": "^3.0.0", + "hoist-non-react-statics": "^3.0.0", + "shallowequal": "^1.1.0", + "supports-color": "^5.5.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "styled-system": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/styled-system/-/styled-system-5.1.5.tgz", + "integrity": "sha512-7VoD0o2R3RKzOzPK0jYrVnS8iJdfkKsQJNiLRDjikOpQVqQHns/DXWaPZOH4tIKkhAT7I6wIsy9FWTWh2X3q+A==", + "requires": { + "@styled-system/background": "^5.1.2", + "@styled-system/border": "^5.1.5", + "@styled-system/color": "^5.1.2", + "@styled-system/core": "^5.1.2", + "@styled-system/flexbox": "^5.1.2", + "@styled-system/grid": "^5.1.2", + "@styled-system/layout": "^5.1.2", + "@styled-system/position": "^5.1.2", + "@styled-system/shadow": "^5.1.2", + "@styled-system/space": "^5.1.2", + "@styled-system/typography": "^5.1.2", + "@styled-system/variant": "^5.1.5", + "object-assign": "^4.1.1" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "svgson": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/svgson/-/svgson-4.1.0.tgz", + "integrity": "sha512-DodISxHtdLKUghDYA+PGK4Qq350+CbBAkdvGLkBFSmWd9WKSg4dijgjB1IiRPTmsUCd+a7KYe+ILHtklYgQyzQ==", + "requires": { + "deep-rename-keys": "^0.2.1", + "omit-deep": "0.3.0", + "xml-reader": "2.4.3" + } + }, + "tabbable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-4.0.0.tgz", + "integrity": "sha512-H1XoH1URcBOa/rZZWxLxHCtOdVUEev+9vo5YdYhC9tCY4wnybX+VQrCYuy9ubkg69fCBxCONJOSLGfw0DWMffQ==" + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + }, + "terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^4.0.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + }, + "dependencies": { + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true + }, + "timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tiny-invariant": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.1.0.tgz", + "integrity": "sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw==" + }, + "tiny-secp256k1": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", + "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", + "requires": { + "bindings": "^1.3.0", + "bn.js": "^4.11.8", + "create-hmac": "^1.1.7", + "elliptic": "^6.4.0", + "nan": "^2.13.2" + } + }, + "tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "transformation-matrix": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/transformation-matrix/-/transformation-matrix-2.1.1.tgz", + "integrity": "sha512-74MoNHhwLVuzwaPDcAecFjSkOA9vwWqyOdkeB0Be8Jc/IWSS5SNZKapFllqzkTliqZptkvqX5CZnVeDvfhN8cw==" + }, + "tslib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typeforce": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", + "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" + }, + "typescript": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", + "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", + "dev": true + }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + } + } + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unorm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", + "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-0.1.2.tgz", + "integrity": "sha1-UGgQuGfyfCpabpsEgzYx9t5Y0xA=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "urbit-key-generation": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/urbit-key-generation/-/urbit-key-generation-0.18.0.tgz", + "integrity": "sha512-L5yjwfj30sQmJ7KsdtYvQI03A4pluZPf1TumQdrT1MccQYGWB0aedfwTPZnrsXHHqvzGCCQgHBagdMmFBgSddg==", + "requires": { + "argon2-wasm": "^0.9.0", + "bip32": "^1.0.2", + "bip39": "^2.5.0", + "js-sha256": "^0.9.0", + "keccak": "^1.4.0", + "secp256k1": "^3.5.2", + "tweetnacl": "^1.0.0", + "urbit-ob": "4.1.4" + }, + "dependencies": { + "urbit-ob": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/urbit-ob/-/urbit-ob-4.1.4.tgz", + "integrity": "sha512-9sa7L+NUvlhP+okIMNyu8Bxn5VNDGo6AGVvCgOpEghqrEayk2uEoPeDV+ghGsCt1bA+4fjFMa7RG5ybZjgrtWQ==", + "requires": { + "bn.js": "^4.11.8", + "lodash.chunk": "^4.2.0", + "lodash.isequal": "^4.5.0" + } + } + } + }, + "urbit-ob": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/urbit-ob/-/urbit-ob-5.0.1.tgz", + "integrity": "sha512-qGNAwu87XNkW3g8ah4fUwmh2EKXtsdhEbyEiE5qX4Op17rhLH3HSkvu8g9z+MhqX51Uz9sf8ktvqJj/IRwETIQ==", + "requires": { + "bn.js": "^4.11.8", + "lodash.chunk": "^4.2.0", + "lodash.isequal": "^4.5.0" + } + }, + "urbit-sigil-js": { + "version": "1.3.13", + "resolved": "https://registry.npmjs.org/urbit-sigil-js/-/urbit-sigil-js-1.3.13.tgz", + "integrity": "sha512-g6tC7K65O/4rMCd9/Cy+BVyVSzC3GNjfd0R4EaXEl4aXnjRIiIkD0xkZl56yzLwNk6W9bniDQJALcGPxY3IROw==", + "requires": { + "invariant": "^2.2.4", + "react": "^16.8.6", + "svgson": "^4.0.0", + "transformation-matrix": "2.1.1" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-parse": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz", + "integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", + "dev": true + }, + "utile": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/utile/-/utile-0.3.0.tgz", + "integrity": "sha1-E1LDQOuCDk2N26A5pPv6oy7U7zo=", + "requires": { + "async": "~0.9.0", + "deep-equal": "~0.2.1", + "i": "0.3.x", + "mkdirp": "0.x.x", + "ncp": "1.0.x", + "rimraf": "2.x.x" + }, + "dependencies": { + "ncp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz", + "integrity": "sha1-0VNn5cuHQyuhF9K/gP30Wuz7QkY=" + } + } + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "value-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + }, + "varuint-bitcoin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", + "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "watchpack": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", + "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", + "dev": true, + "requires": { + "chokidar": "^3.4.1", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0", + "watchpack-chokidar2": "^2.0.1" + } + }, + "watchpack-chokidar2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", + "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", + "dev": true, + "optional": true, + "requires": { + "chokidar": "^2.1.8" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "optional": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "optional": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "optional": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "optional": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "optional": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + } + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "webpack": { + "version": "4.46.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz", + "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^4.5.0", + "eslint-scope": "^4.0.3", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.3", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.7.4", + "webpack-sources": "^1.4.1" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "webpack-cli": { + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz", + "integrity": "sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.1.1", + "findup-sync": "^3.0.0", + "global-modules": "^2.0.0", + "import-local": "^2.0.0", + "interpret": "^1.4.0", + "loader-utils": "^1.4.0", + "supports-color": "^6.1.0", + "v8-compile-cache": "^2.1.1", + "yargs": "^13.3.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "webpack-dev-middleware": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz", + "integrity": "sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==", + "dev": true, + "requires": { + "memory-fs": "^0.4.1", + "mime": "^2.4.4", + "mkdirp": "^0.5.1", + "range-parser": "^1.2.1", + "webpack-log": "^2.0.0" + }, + "dependencies": { + "mime": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", + "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==", + "dev": true + } + } + }, + "webpack-dev-server": { + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz", + "integrity": "sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ==", + "dev": true, + "requires": { + "ansi-html": "0.0.7", + "bonjour": "^3.5.0", + "chokidar": "^2.1.8", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.3.1", + "http-proxy-middleware": "0.19.1", + "import-local": "^2.0.0", + "internal-ip": "^4.3.0", + "ip": "^1.1.5", + "is-absolute-url": "^3.0.3", + "killable": "^1.0.1", + "loglevel": "^1.6.8", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.26", + "schema-utils": "^1.0.0", + "selfsigned": "^1.10.8", + "semver": "^6.3.0", + "serve-index": "^1.9.1", + "sockjs": "^0.3.21", + "sockjs-client": "^1.5.0", + "spdy": "^4.0.2", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", + "url": "^0.11.0", + "webpack-dev-middleware": "^3.7.2", + "webpack-log": "^2.0.0", + "ws": "^6.2.1", + "yargs": "^13.3.2" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "webpack-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", + "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", + "dev": true, + "requires": { + "ansi-colors": "^3.0.0", + "uuid": "^3.3.2" + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "requires": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "wif": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", + "integrity": "sha1-CNP1IFbGZnkplyb63g1DKudLRwQ=", + "requires": { + "bs58check": "<3.0.0" + } + }, + "winston": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.5.tgz", + "integrity": "sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A==", + "requires": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=" + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + } + } + }, + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xml-lexer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/xml-lexer/-/xml-lexer-0.2.2.tgz", + "integrity": "sha1-UYGTpKozTVj8fSSLVJB5uJkH4EY=", + "requires": { + "eventemitter3": "^2.0.0" + } + }, + "xml-reader": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/xml-reader/-/xml-reader-2.4.3.tgz", + "integrity": "sha1-n4EMr3xCWlqvuEixxFEDyecddTA=", + "requires": { + "eventemitter3": "^2.0.0", + "xml-lexer": "^0.2.2" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } +} diff --git a/pkg/btc-wallet/package.json b/pkg/btc-wallet/package.json new file mode 100644 index 0000000000..0b0a456045 --- /dev/null +++ b/pkg/btc-wallet/package.json @@ -0,0 +1,75 @@ +{ + "name": "urbit-bitcoin-wallet", + "version": "0.1.0", + "main": "node install.js", + "scripts": { + "start": "webpack-dev-server --config config/webpack.dev.js", + "build:dev": "cross-env NODE_ENV=production webpack --config config/webpack.dev.js", + "build:prod": "cross-env NODE_ENV=production webpack --config config/webpack.prod.js" + }, + "author": "Tlon Corp", + "license": "MIT", + "devDependencies": { + "@babel/core": "^7.9.0", + "@babel/plugin-proposal-class-properties": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.9.5", + "@babel/plugin-proposal-optional-chaining": "^7.9.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.10.5", + "@babel/preset-env": "^7.9.5", + "@babel/preset-react": "^7.9.4", + "@babel/preset-typescript": "^7.13.0", + "@welldone-software/why-did-you-render": "^6.1.1", + "babel-loader": "^8.1.0", + "babel-plugin-root-import": "^6.5.0", + "clean-webpack-plugin": "^3.0.0", + "cross-env": "^7.0.2", + "file-loader": "^6.0.0", + "html-webpack-plugin": "^4.2.0", + "react-hot-loader": "^4.12.21", + "sass": "^1.26.5", + "sass-loader": "^8.0.2", + "typescript": "^4.2.3", + "webpack": "^4.43.0", + "webpack-cli": "^3.3.11", + "webpack-dev-server": "^3.10.3" + }, + "dependencies": { + "@babel/runtime": "^7.10.5", + "@reach/disclosure": "^0.10.5", + "@reach/menu-button": "^0.10.5", + "@reach/tabs": "^0.10.5", + "@tlon/indigo-light": "^1.0.7", + "@tlon/indigo-react": "^1.2.22", + "@tlon/sigil-js": "^1.4.3", + "bip39": "^2.5.0", + "bitcoin-address-validation": "^2.0.1", + "bitcoinjs-lib": "^5.2.0", + "bs58check": "^2.1.2", + "buffer": "^6.0.3", + "classnames": "^2.2.6", + "css-loader": "^3.5.3", + "formik": "^2.2.0", + "fs-extra": "^8.1.0", + "lodash": "^4.17.11", + "markdown-to-jsx": "^7.1.2", + "moment": "^2.20.1", + "mousetrap": "^1.6.3", + "mv": "^2.1.1", + "promise": "^8.0.3", + "prompt": "^1.0.0", + "react": "^16.14.0", + "react-dom": "^16.14.0", + "react-router-dom": "^5.0.0", + "replace-in-file": "^4.1.1", + "style-loader": "^1.2.1", + "styled-components": "^5.2.3", + "styled-system": "^5.1.5", + "urbit-key-generation": "^0.19.0", + "urbit-ob": "^5.0.0", + "urbit-sigil-js": "^1.3.13" + }, + "resolutions": { + "natives": "1.1.3" + } +} diff --git a/pkg/btc-wallet/src/css/custom.css b/pkg/btc-wallet/src/css/custom.css new file mode 100644 index 0000000000..e5a56b4519 --- /dev/null +++ b/pkg/btc-wallet/src/css/custom.css @@ -0,0 +1,158 @@ +p, h1, h2, h3, h4, h5, h6, a, input, textarea, button { + margin-block-end: unset; + margin-block-start: unset; + -webkit-margin-before: unset; + -webkit-margin-after: unset; + font-family: Inter, sans-serif; +} + +a { + color: #000; + text-decoration: none; +} + +textarea, select, input, button { + outline: none; + -webkit-appearance: none; + border: none; + background-color: #fff; +} + +.body-regular { + font-size: 16px; + line-height: 24px; + font-weight: 600; +} + +.body-large { + font-size: 20px; + line-height: 24px; +} + +.label-regular { + font-size: 14px; + line-height: 24px; +} + +.label-small-mono { + font-size: 12px; + line-height: 24px; + font-family: "Source Code Pro", monospace; +} + +.body-regular-400 { + font-size: 16px; + line-height: 24px; + font-weight: 400; +} + +.plus-font { + font-size: 48px; + line-height: 24px; +} + +.btn-font { + font-size: 14px; + line-height: 16px; + font-weight: 600; +} +.mono { + font-family: "Source Code Pro", monospace; +} + +.inter { + font-family: Inter, sans-serif; +} + +.mix-blend-diff { + mix-blend-mode: difference; +} + +/* dark */ + +@media (prefers-color-scheme: dark) { + body { + background-color: #333; + } + .bg-black-d { + background-color: black; + } + .white-d { + color: white; + } + .gray1-d { + color: #4d4d4d; + } + .gray2-d { + color: #7f7f7f; + } + .gray3-d { + color: #b1b2b3; + } + .gray4-d { + color: #e6e6e6; + } + .bg-gray0-d { + background-color: #333; + } + .bg-gray1-d { + background-color: #4d4d4d; + } + .b--gray0-d { + border-color: #333; + } + .b--gray1-d { + border-color: #4d4d4d; + } + .b--gray2-d { + border-color: #7f7f7f; + } + .b--white-d { + border-color: #fff; + } + .bb-d { + border-bottom-width: 1px; + border-bottom-style: solid; + } + .invert-d { + filter: invert(1); + } + .o-80-d { + opacity: .8; + } + .focus-b--white-d:focus { + border-color: #fff; + } + a { + color: #fff; + } + .hover-bg-gray1-d:hover { + color: #4d4d4d; + } +} + +/* responsive */ + +@media all and (max-width: 34.375em) { + .h-100-minus-40-s { + height: calc(100% - 40px); + } +} + +@media all and (min-width: 34.375em) and (max-width: 46.875em) { + .h-100-minus-40-m { + height: calc(100% - 40px); + } +} + +@media all and (min-width: 46.875em) and (max-width: 60em) { + .h-100-minus-40-l { + height: calc(100% - 40px); + } +} + +@media all and (min-width: 60em) { + .h-100-minus-40-xl { + height: calc(100% - 40px); + } +} diff --git a/pkg/btc-wallet/src/css/fonts.css b/pkg/btc-wallet/src/css/fonts.css new file mode 100644 index 0000000000..34de928ec5 --- /dev/null +++ b/pkg/btc-wallet/src/css/fonts.css @@ -0,0 +1,63 @@ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + src: url("https://media.urbit.org/fonts/Inter-Regular.woff2") format("woff2"); +} + +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 400; + src: url("https://media.urbit.org/fonts/Inter-Italic.woff2") format("woff2"); +} + +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + src: url("https://media.urbit.org/fonts/Inter-Bold.woff2") format("woff2"); +} +@font-face { + font-family: 'Inter'; + font-style: italic; + font-weight: 700; + src: url("https://media.urbit.org/fonts/Inter-BoldItalic.woff2") format("woff2"); +} + +@font-face { + font-family: "Source Code Pro"; + src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-extralight.woff"); + font-weight: 200; +} + +@font-face { + font-family: "Source Code Pro"; + src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-light.woff"); + font-weight: 300; +} + +@font-face { + font-family: "Source Code Pro"; + src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-regular.woff"); + font-weight: 400; +} + +@font-face { + font-family: "Source Code Pro"; + src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-medium.woff"); + font-weight: 500; +} + +@font-face { + font-family: "Source Code Pro"; + src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-semibold.woff"); + font-weight: 600; +} + +@font-face { + font-family: "Source Code Pro"; + src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-bold.woff"); + font-weight: 700; +} + diff --git a/pkg/btc-wallet/src/css/indigo-static.css b/pkg/btc-wallet/src/css/indigo-static.css new file mode 100644 index 0000000000..bc23d73a1c --- /dev/null +++ b/pkg/btc-wallet/src/css/indigo-static.css @@ -0,0 +1 @@ +/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}.aspect-ratio{height:0;position:relative}.aspect-ratio--16x9{padding-bottom:56.25%}.aspect-ratio--9x16{padding-bottom:177.77%}.aspect-ratio--4x3{padding-bottom:75%}.aspect-ratio--3x4{padding-bottom:133.33%}.aspect-ratio--6x4{padding-bottom:66.6%}.aspect-ratio--4x6{padding-bottom:150%}.aspect-ratio--8x5{padding-bottom:62.5%}.aspect-ratio--5x8{padding-bottom:160%}.aspect-ratio--7x5{padding-bottom:71.42%}.aspect-ratio--5x7{padding-bottom:140%}.aspect-ratio--1x1{padding-bottom:100%}.aspect-ratio--object{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:100}.cover{background-size:cover!important}.contain{background-size:contain!important}.bg-center{background-position:50%}.bg-center,.bg-top{background-repeat:no-repeat}.bg-top{background-position:top}.bg-right{background-position:100%}.bg-bottom,.bg-right{background-repeat:no-repeat}.bg-bottom{background-position:bottom}.bg-left{background-repeat:no-repeat;background-position:0}.ba{border-style:solid;border-width:1px}.bt{border-top-style:solid;border-top-width:1px}.br{border-right-style:solid;border-right-width:1px}.bb{border-bottom-style:solid;border-bottom-width:1px}.bl{border-left-style:solid;border-left-width:1px}.bn{border-style:none;border-width:0}.b--black{border-color:#000}.b--white{border-color:#fff}.b--gray0{border-color:#333}.b--gray1{border-color:#4d4d4d}.b--gray2{border-color:#7f7f7f}.b--gray3{border-color:#b1b2b3}.b--gray4{border-color:#e6e6e6}.b--gray5{border-color:#f9f9f9}.b--blue0{border-color:#ecf6ff}.b--blue1{border-color:#b0c7ff}.b--blue2{border-color:#4330fc}.b--blue3{border-color:#190d7b}.b--red0{border-color:#f9d6ce}.b--red1{border-color:#ffa073}.b--red2{border-color:#ee5432}.b--red3{border-color:#c10d30}.b--green0{border-color:#bdebcc}.b--green1{border-color:#2ed196}.b--green2{border-color:#2aa779}.b--green3{border-color:#286e55}.b--yellow0{border-color:#ffefc5}.b--yellow1{border-color:#ffd972}.b--yellow2{border-color:#fcc440}.b--yellow3{border-color:#ee892b}.b--transparent{border-color:transparent}.br0{border-radius:0}.br1{border-radius:.125rem}.br2{border-radius:.25rem}.br3{border-radius:.5rem}.br4{border-radius:1rem}.br-100{border-radius:100%}.br-pill{border-radius:9999px}.br--bottom{border-top-left-radius:0;border-top-right-radius:0}.br--top{border-bottom-right-radius:0}.br--right,.br--top{border-bottom-left-radius:0}.br--right{border-top-left-radius:0}.br--left{border-top-right-radius:0;border-bottom-right-radius:0}.b--dotted{border-style:dotted}.b--dashed{border-style:dashed}.b--solid{border-style:solid}.b--none{border-style:none}.bw0{border-width:0}.bw1{border-width:.125rem}.bw2{border-width:.25rem}.bw3{border-width:.5rem}.bw4{border-width:1rem}.bw5{border-width:2rem}.bt-0{border-top-width:0}.br-0{border-right-width:0}.bb-0{border-bottom-width:0}.bl-0{border-left-width:0}.shadow-1{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.shadow-2{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.shadow-3{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.shadow-4{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.shadow-5{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}.border-box,a,article,aside,blockquote,body,code,dd,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,html,input[type=email],input[type=number],input[type=password],input[type=tel],input[type=text],input[type=url],legend,li,main,nav,ol,p,pre,section,table,td,textarea,th,tr,ul{box-sizing:border-box}.pre{overflow-x:auto;overflow-y:hidden;overflow:scroll}.pa0{padding:0}.ma0,.na0{margin:0}.pl0{padding-left:0}.ml0,.nl0{margin-left:0}.pr0{padding-right:0}.mr0,.nr0{margin-right:0}.pt0{padding-top:0}.mt0,.nt0{margin-top:0}.pb0{padding-bottom:0}.mb0,.nb0{margin-bottom:0}.pv0{padding-top:0;padding-bottom:0}.mv0,.nv0{margin-top:0;margin-bottom:0}.ph0{padding-left:0;padding-right:0}.mh0,.nh0{margin-left:0;margin-right:0}.pa1{padding:.25rem}.ma1{margin:.25rem}.na1{margin:-.25rem}.pl1{padding-left:.25rem}.ml1{margin-left:.25rem}.nl1{margin-left:-.25rem}.pr1{padding-right:.25rem}.mr1{margin-right:.25rem}.nr1{margin-right:-.25rem}.pt1{padding-top:.25rem}.mt1{margin-top:.25rem}.nt1{margin-top:-.25rem}.pb1{padding-bottom:.25rem}.mb1{margin-bottom:.25rem}.nb1{margin-bottom:-.25rem}.pv1{padding-top:.25rem;padding-bottom:.25rem}.mv1{margin-top:.25rem;margin-bottom:.25rem}.nv1{margin-top:-.25rem;margin-bottom:-.25rem}.ph1{padding-left:.25rem;padding-right:.25rem}.mh1{margin-left:.25rem;margin-right:.25rem}.nh1{margin-left:-.25rem;margin-right:-.25rem}.pa2{padding:.5rem}.ma2{margin:.5rem}.na2{margin:-.5rem}.pl2{padding-left:.5rem}.ml2{margin-left:.5rem}.nl2{margin-left:-.5rem}.pr2{padding-right:.5rem}.mr2{margin-right:.5rem}.nr2{margin-right:-.5rem}.pt2{padding-top:.5rem}.mt2{margin-top:.5rem}.nt2{margin-top:-.5rem}.pb2{padding-bottom:.5rem}.mb2{margin-bottom:.5rem}.nb2{margin-bottom:-.5rem}.pv2{padding-top:.5rem;padding-bottom:.5rem}.mv2{margin-top:.5rem;margin-bottom:.5rem}.nv2{margin-top:-.5rem;margin-bottom:-.5rem}.ph2{padding-left:.5rem;padding-right:.5rem}.mh2{margin-left:.5rem;margin-right:.5rem}.nh2{margin-left:-.5rem;margin-right:-.5rem}.pa3{padding:.75rem}.ma3{margin:.75rem}.na3{margin:-.75rem}.pl3{padding-left:.75rem}.ml3{margin-left:.75rem}.nl3{margin-left:-.75rem}.pr3{padding-right:.75rem}.mr3{margin-right:.75rem}.nr3{margin-right:-.75rem}.pt3{padding-top:.75rem}.mt3{margin-top:.75rem}.nt3{margin-top:-.75rem}.pb3{padding-bottom:.75rem}.mb3{margin-bottom:.75rem}.nb3{margin-bottom:-.75rem}.pv3{padding-top:.75rem;padding-bottom:.75rem}.mv3{margin-top:.75rem;margin-bottom:.75rem}.nv3{margin-top:-.75rem;margin-bottom:-.75rem}.ph3{padding-left:.75rem;padding-right:.75rem}.mh3{margin-left:.75rem;margin-right:.75rem}.nh3{margin-left:-.75rem;margin-right:-.75rem}.pa4{padding:1rem}.ma4{margin:1rem}.na4{margin:-1rem}.pl4{padding-left:1rem}.ml4{margin-left:1rem}.nl4{margin-left:-1rem}.pr4{padding-right:1rem}.mr4{margin-right:1rem}.nr4{margin-right:-1rem}.pt4{padding-top:1rem}.mt4{margin-top:1rem}.nt4{margin-top:-1rem}.pb4{padding-bottom:1rem}.mb4{margin-bottom:1rem}.nb4{margin-bottom:-1rem}.pv4{padding-top:1rem;padding-bottom:1rem}.mv4{margin-top:1rem;margin-bottom:1rem}.nv4{margin-top:-1rem;margin-bottom:-1rem}.ph4{padding-left:1rem;padding-right:1rem}.mh4{margin-left:1rem;margin-right:1rem}.nh4{margin-left:-1rem;margin-right:-1rem}.pa5{padding:1.25rem}.ma5{margin:1.25rem}.na5{margin:-1.25rem}.pl5{padding-left:1.25rem}.ml5{margin-left:1.25rem}.nl5{margin-left:-1.25rem}.pr5{padding-right:1.25rem}.mr5{margin-right:1.25rem}.nr5{margin-right:-1.25rem}.pt5{padding-top:1.25rem}.mt5{margin-top:1.25rem}.nt5{margin-top:-1.25rem}.pb5{padding-bottom:1.25rem}.mb5{margin-bottom:1.25rem}.nb5{margin-bottom:-1.25rem}.pv5{padding-top:1.25rem;padding-bottom:1.25rem}.mv5{margin-top:1.25rem;margin-bottom:1.25rem}.nv5{margin-top:-1.25rem;margin-bottom:-1.25rem}.ph5{padding-left:1.25rem;padding-right:1.25rem}.mh5{margin-left:1.25rem;margin-right:1.25rem}.nh5{margin-left:-1.25rem;margin-right:-1.25rem}.pa6{padding:1.5rem}.ma6{margin:1.5rem}.na6{margin:-1.5rem}.pl6{padding-left:1.5rem}.ml6{margin-left:1.5rem}.nl6{margin-left:-1.5rem}.pr6{padding-right:1.5rem}.mr6{margin-right:1.5rem}.nr6{margin-right:-1.5rem}.pt6{padding-top:1.5rem}.mt6{margin-top:1.5rem}.nt6{margin-top:-1.5rem}.pb6{padding-bottom:1.5rem}.mb6{margin-bottom:1.5rem}.nb6{margin-bottom:-1.5rem}.pv6{padding-top:1.5rem;padding-bottom:1.5rem}.mv6{margin-top:1.5rem;margin-bottom:1.5rem}.nv6{margin-top:-1.5rem;margin-bottom:-1.5rem}.ph6{padding-left:1.5rem;padding-right:1.5rem}.mh6{margin-left:1.5rem;margin-right:1.5rem}.nh6{margin-left:-1.5rem;margin-right:-1.5rem}.pa7{padding:2rem}.ma7{margin:2rem}.na7{margin:-2rem}.pl7{padding-left:2rem}.ml7{margin-left:2rem}.nl7{margin-left:-2rem}.pr7{padding-right:2rem}.mr7{margin-right:2rem}.nr7{margin-right:-2rem}.pt7{padding-top:2rem}.mt7{margin-top:2rem}.nt7{margin-top:-2rem}.pb7{padding-bottom:2rem}.mb7{margin-bottom:2rem}.nb7{margin-bottom:-2rem}.pv7{padding-top:2rem;padding-bottom:2rem}.mv7{margin-top:2rem;margin-bottom:2rem}.nv7{margin-top:-2rem;margin-bottom:-2rem}.ph7{padding-left:2rem;padding-right:2rem}.mh7{margin-left:2rem;margin-right:2rem}.nh7{margin-left:-2rem;margin-right:-2rem}.pa8{padding:3rem}.ma8{margin:3rem}.na8{margin:-3rem}.pl8{padding-left:3rem}.ml8{margin-left:3rem}.nl8{margin-left:-3rem}.pr8{padding-right:3rem}.mr8{margin-right:3rem}.nr8{margin-right:-3rem}.pt8{padding-top:3rem}.mt8{margin-top:3rem}.nt8{margin-top:-3rem}.pb8{padding-bottom:3rem}.mb8{margin-bottom:3rem}.nb8{margin-bottom:-3rem}.pv8{padding-top:3rem;padding-bottom:3rem}.mv8{margin-top:3rem;margin-bottom:3rem}.nv8{margin-top:-3rem;margin-bottom:-3rem}.ph8{padding-left:3rem;padding-right:3rem}.mh8{margin-left:3rem;margin-right:3rem}.nh8{margin-left:-3rem;margin-right:-3rem}.pa9{padding:4rem}.ma9{margin:4rem}.na9{margin:-4rem}.pl9{padding-left:4rem}.ml9{margin-left:4rem}.nl9{margin-left:-4rem}.pr9{padding-right:4rem}.mr9{margin-right:4rem}.nr9{margin-right:-4rem}.pt9{padding-top:4rem}.mt9{margin-top:4rem}.nt9{margin-top:-4rem}.pb9{padding-bottom:4rem}.mb9{margin-bottom:4rem}.nb9{margin-bottom:-4rem}.pv9{padding-top:4rem;padding-bottom:4rem}.mv9{margin-top:4rem;margin-bottom:4rem}.nv9{margin-top:-4rem;margin-bottom:-4rem}.ph9{padding-left:4rem;padding-right:4rem}.mh9{margin-left:4rem;margin-right:4rem}.nh9{margin-left:-4rem;margin-right:-4rem}.pa10{padding:6rem}.ma10{margin:6rem}.na10{margin:-6rem}.pl10{padding-left:6rem}.ml10{margin-left:6rem}.nl10{margin-left:-6rem}.pr10{padding-right:6rem}.mr10{margin-right:6rem}.nr10{margin-right:-6rem}.pt10{padding-top:6rem}.mt10{margin-top:6rem}.nt10{margin-top:-6rem}.pb10{padding-bottom:6rem}.mb10{margin-bottom:6rem}.nb10{margin-bottom:-6rem}.pv10{padding-top:6rem;padding-bottom:6rem}.mv10{margin-top:6rem;margin-bottom:6rem}.nv10{margin-top:-6rem;margin-bottom:-6rem}.ph10{padding-left:6rem;padding-right:6rem}.mh10{margin-left:6rem;margin-right:6rem}.nh10{margin-left:-6rem;margin-right:-6rem}.pa11{padding:10rem}.ma11{margin:10rem}.na11{margin:-10rem}.pl11{padding-left:10rem}.ml11{margin-left:10rem}.nl11{margin-left:-10rem}.pr11{padding-right:10rem}.mr11{margin-right:10rem}.nr11{margin-right:-10rem}.pt11{padding-top:10rem}.mt11{margin-top:10rem}.nt11{margin-top:-10rem}.pb11{padding-bottom:10rem}.mb11{margin-bottom:10rem}.nb11{margin-bottom:-10rem}.pv11{padding-top:10rem;padding-bottom:10rem}.mv11{margin-top:10rem;margin-bottom:10rem}.nv11{margin-top:-10rem;margin-bottom:-10rem}.ph11{padding-left:10rem;padding-right:10rem}.mh11{margin-left:10rem;margin-right:10rem}.nh11{margin-left:-10rem;margin-right:-10rem}.pa12{padding:18rem}.ma12{margin:18rem}.na12{margin:-18rem}.pl12{padding-left:18rem}.ml12{margin-left:18rem}.nl12{margin-left:-18rem}.pr12{padding-right:18rem}.mr12{margin-right:18rem}.nr12{margin-right:-18rem}.pt12{padding-top:18rem}.mt12{margin-top:18rem}.nt12{margin-top:-18rem}.pb12{padding-bottom:18rem}.mb12{margin-bottom:18rem}.nb12{margin-bottom:-18rem}.pv12{padding-top:18rem;padding-bottom:18rem}.mv12{margin-top:18rem;margin-bottom:18rem}.nv12{margin-top:-18rem;margin-bottom:-18rem}.ph12{padding-left:18rem;padding-right:18rem}.mh12{margin-left:18rem;margin-right:18rem}.nh12{margin-left:-18rem;margin-right:-18rem}.top-0{top:0}.right-0{right:0}.bottom-0{bottom:0}.left-0{left:0}.top-1{top:1rem}.right-1{right:1rem}.bottom-1{bottom:1rem}.left-1{left:1rem}.top-2{top:2rem}.right-2{right:2rem}.bottom-2{bottom:2rem}.left-2{left:2rem}.top--1{top:-1rem}.right--1{right:-1rem}.bottom--1{bottom:-1rem}.left--1{left:-1rem}.top--2{top:-2rem}.right--2{right:-2rem}.bottom--2{bottom:-2rem}.left--2{left:-2rem}.absolute--fill{top:0;right:0;bottom:0;left:0}.cf:after,.cf:before{content:" ";display:table}.cf:after{clear:both}.cf{*zoom:1}.cl{clear:left}.cr{clear:right}.cb{clear:both}.cn{clear:none}.dn{display:none}.di{display:inline}.db{display:block}.dib{display:inline-block}.dit{display:inline-table}.dt{display:table}.dtc{display:table-cell}.dt-row{display:table-row}.dt-row-group{display:table-row-group}.dt-column{display:table-column}.dt-column-group{display:table-column-group}.dt--fixed{table-layout:fixed;width:100%}.flex{display:flex}.inline-flex{display:inline-flex}.flex-auto{flex:1 1 auto;min-width:0;min-height:0}.flex-none{flex:none}.flex-column{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-column-reverse{flex-direction:column-reverse}.flex-row-reverse{flex-direction:row-reverse}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-baseline{align-self:baseline}.self-stretch{align-self:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-center{align-content:center}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-stretch{align-content:stretch}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-last{order:99999}.flex-grow-0{flex-grow:0}.flex-grow-1{flex-grow:1}.flex-shrink-0{flex-shrink:0}.flex-shrink-1{flex-shrink:1}.fl{float:left}.fl,.fr{_display:inline}.fr{float:right}.fn{float:none}.sans-serif{font-family:-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif}.serif{font-family:georgia,times,serif}.system-sans-serif{font-family:sans-serif}.system-serif{font-family:serif}.code,code{font-family:Consolas,monaco,monospace}.courier{font-family:Courier Next,courier,monospace}.helvetica{font-family:helvetica neue,helvetica,sans-serif}.avenir{font-family:avenir next,avenir,sans-serif}.athelas{font-family:athelas,georgia,serif}.georgia{font-family:georgia,serif}.times{font-family:times,serif}.bodoni{font-family:Bodoni MT,serif}.calisto{font-family:Calisto MT,serif}.garamond{font-family:garamond,serif}.baskerville{font-family:baskerville,serif}.i{font-style:italic}.fs-normal{font-style:normal}.normal{font-weight:400}.b{font-weight:700}.fw1{font-weight:100}.fw2{font-weight:200}.fw3{font-weight:300}.fw4{font-weight:400}.fw5{font-weight:500}.fw6{font-weight:600}.fw7{font-weight:700}.fw8{font-weight:800}.fw9{font-weight:900}.input-reset{-webkit-appearance:none;-moz-appearance:none}.button-reset::-moz-focus-inner,.input-reset::-moz-focus-inner{border:0;padding:0}.debug *{outline:1px solid gold}.debug-white *{outline:1px solid #fff}.debug-black *{outline:1px solid #000}.debug-grid{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAFElEQVR4AWPAC97/9x0eCsAEPgwAVLshdpENIxcAAAAASUVORK5CYII=) repeat 0 0}.debug-grid-16{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMklEQVR4AWOgCLz/b0epAa6UGuBOqQHOQHLUgFEDnAbcBZ4UGwDOkiCnkIhdgNgNxAYAiYlD+8sEuo8AAAAASUVORK5CYII=) repeat 0 0}.debug-grid-8-solid{background:#fff url(data:image/gif;base64,R0lGODdhCAAIAPEAAADw/wDx/////wAAACwAAAAACAAIAAACDZQvgaeb/lxbAIKA8y0AOw==) repeat 0 0}.debug-grid-16-solid{background:#fff url(data:image/gif;base64,R0lGODdhEAAQAPEAAADw/wDx/xXy/////ywAAAAAEAAQAAACIZyPKckYDQFsb6ZqD85jZ2+BkwiRFKehhqQCQgDHcgwEBQA7) repeat 0 0}.link{text-decoration:none}.link,.link:active,.link:focus,.link:hover,.link:link,.link:visited{transition:color .15s ease-in}.link:focus{outline:1px dotted currentColor}.list{list-style-type:none}.h1{height:1rem}.h2{height:2rem}.h3{height:4rem}.h4{height:8rem}.h5{height:16rem}.h-25{height:25%}.h-50{height:50%}.h-75{height:75%}.h-100{height:100%}.min-h-100{min-height:100%}.vh-25{height:25vh}.vh-50{height:50vh}.vh-75{height:75vh}.vh-100{height:100vh}.min-vh-100{min-height:100vh}.h-auto{height:auto}.h-inherit{height:inherit}.black{color:#000}.white{color:#fff}.gray0{color:#333}.gray1{color:#4d4d4d}.gray2{color:#7f7f7f}.gray3{color:#b1b2b3}.gray4{color:#e6e6e6}.gray5{color:#f9f9f9}.blue0{color:#ecf6ff}.blue1{color:#b0c7ff}.blue2{color:#4330fc}.blue3{color:#190d7b}.red0{color:#f9d6ce}.red1{color:#ffa073}.red2{color:#ee5432}.red3{color:#c10d30}.green0{color:#bdebcc}.green1{color:#2ed196}.green2{color:#2aa779}.green3{color:#286e55}.yellow0{color:#ffefc5}.yellow1{color:#ffd972}.yellow2{color:#fcc440}.yellow3{color:#ee892b}.bg-black{background-color:#000}.bg-white{background-color:#fff}.bg-gray0{background-color:#333}.bg-gray1{background-color:#4d4d4d}.bg-gray2{background-color:#7f7f7f}.bg-gray3{background-color:#b1b2b3}.bg-gray4{background-color:#e6e6e6}.bg-gray5{background-color:#f9f9f9}.bg-blue0{background-color:#ecf6ff}.bg-blue1{background-color:#b0c7ff}.bg-blue2{background-color:#4330fc}.bg-blue3{background-color:#190d7b}.bg-red0{background-color:#f9d6ce}.bg-red1{background-color:#ffa073}.bg-red2{background-color:#ee5432}.bg-red3{background-color:#c10d30}.bg-green0{background-color:#bdebcc}.bg-green1{background-color:#2ed196}.bg-green2{background-color:#2aa779}.bg-green3{background-color:#286e55}.bg-yellow0{background-color:#ffefc5}.bg-yellow1{background-color:#ffd972}.bg-yellow2{background-color:#fcc440}.bg-yellow3{background-color:#ee892b}.bg-transparent{background-color:transparent}.hover-black:focus,.hover-black:hover{color:#000}.hover-white:focus,.hover-white:hover{color:#fff}.hover-gray0:focus,.hover-gray0:hover{color:#333}.hover-gray1:focus,.hover-gray1:hover{color:#4d4d4d}.hover-gray2:focus,.hover-gray2:hover{color:#7f7f7f}.hover-gray3:focus,.hover-gray3:hover{color:#b1b2b3}.hover-gray4:focus,.hover-gray4:hover{color:#e6e6e6}.hover-gray5:focus,.hover-gray5:hover{color:#f9f9f9}.hover-blue0:focus,.hover-blue0:hover{color:#ecf6ff}.hover-blue1:focus,.hover-blue1:hover{color:#b0c7ff}.hover-blue2:focus,.hover-blue2:hover{color:#4330fc}.hover-blue3:focus,.hover-blue3:hover{color:#190d7b}.hover-red0:focus,.hover-red0:hover{color:#f9d6ce}.hover-red1:focus,.hover-red1:hover{color:#ffa073}.hover-red2:focus,.hover-red2:hover{color:#ee5432}.hover-red3:focus,.hover-red3:hover{color:#c10d30}.hover-green0:focus,.hover-green0:hover{color:#bdebcc}.hover-green1:focus,.hover-green1:hover{color:#2ed196}.hover-green2:focus,.hover-green2:hover{color:#2aa779}.hover-green3:focus,.hover-green3:hover{color:#286e55}.hover-yellow0:focus,.hover-yellow0:hover{color:#ffefc5}.hover-yellow1:focus,.hover-yellow1:hover{color:#ffd972}.hover-yellow2:focus,.hover-yellow2:hover{color:#fcc440}.hover-yellow3:focus,.hover-yellow3:hover{color:#ee892b}.hover-bg-black:focus,.hover-bg-black:hover{background-color:#000}.hover-bg-white:focus,.hover-bg-white:hover{background-color:#fff}.hover-bg-gray0:focus,.hover-bg-gray0:hover{background-color:#333}.hover-bg-gray1:focus,.hover-bg-gray1:hover{background-color:#4d4d4d}.hover-bg-gray2:focus,.hover-bg-gray2:hover{background-color:#7f7f7f}.hover-bg-gray3:focus,.hover-bg-gray3:hover{background-color:#b1b2b3}.hover-bg-gray4:focus,.hover-bg-gray4:hover{background-color:#e6e6e6}.hover-bg-gray5:focus,.hover-bg-gray5:hover{background-color:#f9f9f9}.hover-bg-blue0:focus,.hover-bg-blue0:hover{background-color:#ecf6ff}.hover-bg-blue1:focus,.hover-bg-blue1:hover{background-color:#b0c7ff}.hover-bg-blue2:focus,.hover-bg-blue2:hover{background-color:#4330fc}.hover-bg-blue3:focus,.hover-bg-blue3:hover{background-color:#190d7b}.hover-bg-red0:focus,.hover-bg-red0:hover{background-color:#f9d6ce}.hover-bg-red1:focus,.hover-bg-red1:hover{background-color:#ffa073}.hover-bg-red2:focus,.hover-bg-red2:hover{background-color:#ee5432}.hover-bg-red3:focus,.hover-bg-red3:hover{background-color:#c10d30}.hover-bg-green0:focus,.hover-bg-green0:hover{background-color:#bdebcc}.hover-bg-green1:focus,.hover-bg-green1:hover{background-color:#2ed196}.hover-bg-green2:focus,.hover-bg-green2:hover{background-color:#2aa779}.hover-bg-green3:focus,.hover-bg-green3:hover{background-color:#286e55}.hover-bg-yellow0:focus,.hover-bg-yellow0:hover{background-color:#ffefc5}.hover-bg-yellow1:focus,.hover-bg-yellow1:hover{background-color:#ffd972}.hover-bg-yellow2:focus,.hover-bg-yellow2:hover{background-color:#fcc440}.hover-bg-yellow3:focus,.hover-bg-yellow3:hover{background-color:#ee892b}.hover-bg-transparent:focus,.hover-bg-transparent:hover{background-color:transparent}img{max-width:100%}.tracked{letter-spacing:.1em}.tracked-tight{letter-spacing:-.05em}.tracked-mega{letter-spacing:.25em}.lh-solid{line-height:1.333333}.lh-title{line-height:1.5}.lh-copy{line-height:1.666666}.mw1{max-width:1rem}.mw2{max-width:2rem}.mw3{max-width:4rem}.mw4{max-width:8rem}.mw5{max-width:16rem}.mw6{max-width:32rem}.mw7{max-width:48rem}.mw8{max-width:64rem}.mw9{max-width:96rem}.mw-none{max-width:none}.mw-100{max-width:100%}.nested-copy-line-height ol,.nested-copy-line-height p,.nested-copy-line-height ul{line-height:1.5}.nested-headline-line-height h1,.nested-headline-line-height h2,.nested-headline-line-height h3,.nested-headline-line-height h4,.nested-headline-line-height h5,.nested-headline-line-height h6{line-height:1.25}.nested-list-reset ol,.nested-list-reset ul{padding-left:0;margin-left:0;list-style-type:none}.nested-copy-indent p+p{text-indent:1em;margin-top:0;margin-bottom:0}.nested-copy-separator p+p{margin-top:1.5em}.nested-img img{width:100%;max-width:100%;display:block}.nested-links a{color:#357edd;transition:color .15s ease-in}.nested-links a:focus,.nested-links a:hover{color:#96ccff;transition:color .15s ease-in}.dim{opacity:1}.dim,.dim:focus,.dim:hover{transition:opacity .15s ease-in}.dim:focus,.dim:hover{opacity:.5}.dim:active{opacity:.8;transition:opacity .15s ease-out}.glow,.glow:focus,.glow:hover{transition:opacity .15s ease-in}.glow:focus,.glow:hover{opacity:1}.hide-child .child{opacity:0;transition:opacity .15s ease-in}.hide-child:active .child,.hide-child:focus .child,.hide-child:hover .child{opacity:1;transition:opacity .15s ease-in}.underline-hover:focus,.underline-hover:hover{text-decoration:underline}.grow{-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform:translateZ(0);transform:translateZ(0);transition:-webkit-transform .25s ease-out;transition:transform .25s ease-out;transition:transform .25s ease-out,-webkit-transform .25s ease-out}.grow:focus,.grow:hover{-webkit-transform:scale(1.05);transform:scale(1.05)}.grow:active{-webkit-transform:scale(.9);transform:scale(.9)}.grow-large{-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform:translateZ(0);transform:translateZ(0);transition:-webkit-transform .25s ease-in-out;transition:transform .25s ease-in-out;transition:transform .25s ease-in-out,-webkit-transform .25s ease-in-out}.grow-large:focus,.grow-large:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}.grow-large:active{-webkit-transform:scale(.95);transform:scale(.95)}.pointer:hover,.shadow-hover{cursor:pointer}.shadow-hover{position:relative;transition:all .5s cubic-bezier(.165,.84,.44,1)}.shadow-hover:after{content:"";box-shadow:0 0 16px 2px rgba(0,0,0,.2);border-radius:inherit;opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;z-index:-1;transition:opacity .5s cubic-bezier(.165,.84,.44,1)}.shadow-hover:focus:after,.shadow-hover:hover:after{opacity:1}.bg-animate,.bg-animate:focus,.bg-animate:hover{transition:background-color .15s ease-in-out}.o-100{opacity:1}.o-90{opacity:.9}.o-80{opacity:.8}.o-70{opacity:.7}.o-60{opacity:.6}.o-50{opacity:.5}.o-40{opacity:.4}.o-30{opacity:.3}.o-20{opacity:.2}.o-10{opacity:.1}.o-05{opacity:.05}.o-025{opacity:.025}.o-0{opacity:0}.rotate-45{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.rotate-135{-webkit-transform:rotate(135deg);transform:rotate(135deg)}.rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rotate-225{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.rotate-315{-webkit-transform:rotate(315deg);transform:rotate(315deg)}.outline{outline:1px solid}.outline-transparent{outline:1px solid transparent}.outline-0{outline:0}.overflow-visible{overflow:visible}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-auto{overflow:auto}.overflow-x-visible{overflow-x:visible}.overflow-x-hidden{overflow-x:hidden}.overflow-x-scroll{overflow-x:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-visible{overflow-y:visible}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.overflow-y-auto{overflow-y:auto}.static{position:static}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.collapse{border-collapse:collapse;border-spacing:0}.striped--light-silver:nth-child(odd){background-color:#aaa}.striped--moon-gray:nth-child(odd){background-color:#ccc}.striped--light-gray:nth-child(odd){background-color:#eee}.striped--near-white:nth-child(odd){background-color:#f4f4f4}.stripe-light:nth-child(odd){background-color:hsla(0,0%,100%,.1)}.stripe-dark:nth-child(odd){background-color:rgba(0,0,0,.1)}.strike{text-decoration:line-through}.underline{text-decoration:underline}.no-underline{text-decoration:none}.tl{text-align:left}.tr{text-align:right}.tc{text-align:center}.tj{text-align:justify}.ttc{text-transform:capitalize}.ttl{text-transform:lowercase}.ttu{text-transform:uppercase}.ttn{text-transform:none}.v-base{vertical-align:baseline}.v-mid{vertical-align:middle}.v-top{vertical-align:top}.v-btm{vertical-align:bottom}.f1{font-size:4.5rem}.f2{font-size:4rem}.f3{font-size:3rem}.f4{font-size:2rem}.f5{font-size:1.5rem}.f6{font-size:1.125rem}.f7{font-size:1rem}.f8{font-size:.875rem}.f9{font-size:.75rem}.measure{max-width:30em}.measure-wide{max-width:34em}.measure-narrow{max-width:20em}.small-caps{font-variant:small-caps}.indent{text-indent:1em;margin-top:0;margin-bottom:0}.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-container{overflow-y:scroll}.center{margin-left:auto}.center,.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.clip{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ws-normal{white-space:normal}.nowrap{white-space:nowrap}.pre{white-space:pre}.w1{width:1rem}.w2{width:2rem}.w3{width:4rem}.w4{width:8rem}.w5{width:16rem}.w-10{width:10%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-33{width:33%}.w-34{width:34%}.w-40{width:40%}.w-50{width:50%}.w-60{width:60%}.w-70{width:70%}.w-75{width:75%}.w-80{width:80%}.w-90{width:90%}.w-100{width:100%}.w-third{width:33.33333%}.w-two-thirds{width:66.66667%}.w-auto{width:auto}.z-0{z-index:0}.z-1{z-index:1}.z-2{z-index:2}.z-3{z-index:3}.z-4{z-index:4}.z-5{z-index:5}.z-999{z-index:999}.z-9999{z-index:9999}.z-max{z-index:2147483647}.z-inherit{z-index:inherit}.z-initial{z-index:auto}.z-unset{z-index:unset}@media screen and (min-width:34.375em) and (max-width:46.875em){.aspect-ratio-m{height:0;position:relative}.aspect-ratio--16x9-m{padding-bottom:56.25%}.aspect-ratio--9x16-m{padding-bottom:177.77%}.aspect-ratio--4x3-m{padding-bottom:75%}.aspect-ratio--3x4-m{padding-bottom:133.33%}.aspect-ratio--6x4-m{padding-bottom:66.6%}.aspect-ratio--4x6-m{padding-bottom:150%}.aspect-ratio--8x5-m{padding-bottom:62.5%}.aspect-ratio--5x8-m{padding-bottom:160%}.aspect-ratio--7x5-m{padding-bottom:71.42%}.aspect-ratio--5x7-m{padding-bottom:140%}.aspect-ratio--1x1-m{padding-bottom:100%}.aspect-ratio--object-m{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:100}.cover-m{background-size:cover!important}.contain-m{background-size:contain!important}.bg-center-m{background-position:50%}.bg-center-m,.bg-top-m{background-repeat:no-repeat}.bg-top-m{background-position:top}.bg-right-m{background-position:100%}.bg-bottom-m,.bg-right-m{background-repeat:no-repeat}.bg-bottom-m{background-position:bottom}.bg-left-m{background-repeat:no-repeat;background-position:0}.ba-m{border-style:solid;border-width:1px}.bt-m{border-top-style:solid;border-top-width:1px}.br-m{border-right-style:solid;border-right-width:1px}.bb-m{border-bottom-style:solid;border-bottom-width:1px}.bl-m{border-left-style:solid;border-left-width:1px}.bn-m{border-style:none;border-width:0}.br0-m{border-radius:0}.br1-m{border-radius:.125rem}.br2-m{border-radius:.25rem}.br3-m{border-radius:.5rem}.br4-m{border-radius:1rem}.br-100-m{border-radius:100%}.br-pill-m{border-radius:9999px}.br--bottom-m{border-top-left-radius:0;border-top-right-radius:0}.br--top-m{border-bottom-right-radius:0}.br--right-m,.br--top-m{border-bottom-left-radius:0}.br--right-m{border-top-left-radius:0}.br--left-m{border-top-right-radius:0;border-bottom-right-radius:0}.b--dotted-m{border-style:dotted}.b--dashed-m{border-style:dashed}.b--solid-m{border-style:solid}.b--none-m{border-style:none}.bw0-m{border-width:0}.bw1-m{border-width:.125rem}.bw2-m{border-width:.25rem}.bw3-m{border-width:.5rem}.bw4-m{border-width:1rem}.bw5-m{border-width:2rem}.bt-0-m{border-top-width:0}.br-0-m{border-right-width:0}.bb-0-m{border-bottom-width:0}.bl-0-m{border-left-width:0}.shadow-1-m{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.shadow-2-m{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.shadow-3-m{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.shadow-4-m{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.shadow-5-m{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}.pa0-m{padding:0}.ma0-m,.na0-m{margin:0}.pl0-m{padding-left:0}.ml0-m,.nl0-m{margin-left:0}.pr0-m{padding-right:0}.mr0-m,.nr0-m{margin-right:0}.pt0-m{padding-top:0}.mt0-m,.nt0-m{margin-top:0}.pb0-m{padding-bottom:0}.mb0-m,.nb0-m{margin-bottom:0}.pv0-m{padding-top:0;padding-bottom:0}.mv0-m,.nv0-m{margin-top:0;margin-bottom:0}.ph0-m{padding-left:0;padding-right:0}.mh0-m,.nh0-m{margin-left:0;margin-right:0}.pa1-m{padding:.25rem}.ma1-m{margin:.25rem}.na1-m{margin:-.25rem}.pl1-m{padding-left:.25rem}.ml1-m{margin-left:.25rem}.nl1-m{margin-left:-.25rem}.pr1-m{padding-right:.25rem}.mr1-m{margin-right:.25rem}.nr1-m{margin-right:-.25rem}.pt1-m{padding-top:.25rem}.mt1-m{margin-top:.25rem}.nt1-m{margin-top:-.25rem}.pb1-m{padding-bottom:.25rem}.mb1-m{margin-bottom:.25rem}.nb1-m{margin-bottom:-.25rem}.pv1-m{padding-top:.25rem;padding-bottom:.25rem}.mv1-m{margin-top:.25rem;margin-bottom:.25rem}.nv1-m{margin-top:-.25rem;margin-bottom:-.25rem}.ph1-m{padding-left:.25rem;padding-right:.25rem}.mh1-m{margin-left:.25rem;margin-right:.25rem}.nh1-m{margin-left:-.25rem;margin-right:-.25rem}.pa2-m{padding:.5rem}.ma2-m{margin:.5rem}.na2-m{margin:-.5rem}.pl2-m{padding-left:.5rem}.ml2-m{margin-left:.5rem}.nl2-m{margin-left:-.5rem}.pr2-m{padding-right:.5rem}.mr2-m{margin-right:.5rem}.nr2-m{margin-right:-.5rem}.pt2-m{padding-top:.5rem}.mt2-m{margin-top:.5rem}.nt2-m{margin-top:-.5rem}.pb2-m{padding-bottom:.5rem}.mb2-m{margin-bottom:.5rem}.nb2-m{margin-bottom:-.5rem}.pv2-m{padding-top:.5rem;padding-bottom:.5rem}.mv2-m{margin-top:.5rem;margin-bottom:.5rem}.nv2-m{margin-top:-.5rem;margin-bottom:-.5rem}.ph2-m{padding-left:.5rem;padding-right:.5rem}.mh2-m{margin-left:.5rem;margin-right:.5rem}.nh2-m{margin-left:-.5rem;margin-right:-.5rem}.pa3-m{padding:.75rem}.ma3-m{margin:.75rem}.na3-m{margin:-.75rem}.pl3-m{padding-left:.75rem}.ml3-m{margin-left:.75rem}.nl3-m{margin-left:-.75rem}.pr3-m{padding-right:.75rem}.mr3-m{margin-right:.75rem}.nr3-m{margin-right:-.75rem}.pt3-m{padding-top:.75rem}.mt3-m{margin-top:.75rem}.nt3-m{margin-top:-.75rem}.pb3-m{padding-bottom:.75rem}.mb3-m{margin-bottom:.75rem}.nb3-m{margin-bottom:-.75rem}.pv3-m{padding-top:.75rem;padding-bottom:.75rem}.mv3-m{margin-top:.75rem;margin-bottom:.75rem}.nv3-m{margin-top:-.75rem;margin-bottom:-.75rem}.ph3-m{padding-left:.75rem;padding-right:.75rem}.mh3-m{margin-left:.75rem;margin-right:.75rem}.nh3-m{margin-left:-.75rem;margin-right:-.75rem}.pa4-m{padding:1rem}.ma4-m{margin:1rem}.na4-m{margin:-1rem}.pl4-m{padding-left:1rem}.ml4-m{margin-left:1rem}.nl4-m{margin-left:-1rem}.pr4-m{padding-right:1rem}.mr4-m{margin-right:1rem}.nr4-m{margin-right:-1rem}.pt4-m{padding-top:1rem}.mt4-m{margin-top:1rem}.nt4-m{margin-top:-1rem}.pb4-m{padding-bottom:1rem}.mb4-m{margin-bottom:1rem}.nb4-m{margin-bottom:-1rem}.pv4-m{padding-top:1rem;padding-bottom:1rem}.mv4-m{margin-top:1rem;margin-bottom:1rem}.nv4-m{margin-top:-1rem;margin-bottom:-1rem}.ph4-m{padding-left:1rem;padding-right:1rem}.mh4-m{margin-left:1rem;margin-right:1rem}.nh4-m{margin-left:-1rem;margin-right:-1rem}.pa5-m{padding:1.25rem}.ma5-m{margin:1.25rem}.na5-m{margin:-1.25rem}.pl5-m{padding-left:1.25rem}.ml5-m{margin-left:1.25rem}.nl5-m{margin-left:-1.25rem}.pr5-m{padding-right:1.25rem}.mr5-m{margin-right:1.25rem}.nr5-m{margin-right:-1.25rem}.pt5-m{padding-top:1.25rem}.mt5-m{margin-top:1.25rem}.nt5-m{margin-top:-1.25rem}.pb5-m{padding-bottom:1.25rem}.mb5-m{margin-bottom:1.25rem}.nb5-m{margin-bottom:-1.25rem}.pv5-m{padding-top:1.25rem;padding-bottom:1.25rem}.mv5-m{margin-top:1.25rem;margin-bottom:1.25rem}.nv5-m{margin-top:-1.25rem;margin-bottom:-1.25rem}.ph5-m{padding-left:1.25rem;padding-right:1.25rem}.mh5-m{margin-left:1.25rem;margin-right:1.25rem}.nh5-m{margin-left:-1.25rem;margin-right:-1.25rem}.pa6-m{padding:1.5rem}.ma6-m{margin:1.5rem}.na6-m{margin:-1.5rem}.pl6-m{padding-left:1.5rem}.ml6-m{margin-left:1.5rem}.nl6-m{margin-left:-1.5rem}.pr6-m{padding-right:1.5rem}.mr6-m{margin-right:1.5rem}.nr6-m{margin-right:-1.5rem}.pt6-m{padding-top:1.5rem}.mt6-m{margin-top:1.5rem}.nt6-m{margin-top:-1.5rem}.pb6-m{padding-bottom:1.5rem}.mb6-m{margin-bottom:1.5rem}.nb6-m{margin-bottom:-1.5rem}.pv6-m{padding-top:1.5rem;padding-bottom:1.5rem}.mv6-m{margin-top:1.5rem;margin-bottom:1.5rem}.nv6-m{margin-top:-1.5rem;margin-bottom:-1.5rem}.ph6-m{padding-left:1.5rem;padding-right:1.5rem}.mh6-m{margin-left:1.5rem;margin-right:1.5rem}.nh6-m{margin-left:-1.5rem;margin-right:-1.5rem}.pa7-m{padding:2rem}.ma7-m{margin:2rem}.na7-m{margin:-2rem}.pl7-m{padding-left:2rem}.ml7-m{margin-left:2rem}.nl7-m{margin-left:-2rem}.pr7-m{padding-right:2rem}.mr7-m{margin-right:2rem}.nr7-m{margin-right:-2rem}.pt7-m{padding-top:2rem}.mt7-m{margin-top:2rem}.nt7-m{margin-top:-2rem}.pb7-m{padding-bottom:2rem}.mb7-m{margin-bottom:2rem}.nb7-m{margin-bottom:-2rem}.pv7-m{padding-top:2rem;padding-bottom:2rem}.mv7-m{margin-top:2rem;margin-bottom:2rem}.nv7-m{margin-top:-2rem;margin-bottom:-2rem}.ph7-m{padding-left:2rem;padding-right:2rem}.mh7-m{margin-left:2rem;margin-right:2rem}.nh7-m{margin-left:-2rem;margin-right:-2rem}.pa8-m{padding:3rem}.ma8-m{margin:3rem}.na8-m{margin:-3rem}.pl8-m{padding-left:3rem}.ml8-m{margin-left:3rem}.nl8-m{margin-left:-3rem}.pr8-m{padding-right:3rem}.mr8-m{margin-right:3rem}.nr8-m{margin-right:-3rem}.pt8-m{padding-top:3rem}.mt8-m{margin-top:3rem}.nt8-m{margin-top:-3rem}.pb8-m{padding-bottom:3rem}.mb8-m{margin-bottom:3rem}.nb8-m{margin-bottom:-3rem}.pv8-m{padding-top:3rem;padding-bottom:3rem}.mv8-m{margin-top:3rem;margin-bottom:3rem}.nv8-m{margin-top:-3rem;margin-bottom:-3rem}.ph8-m{padding-left:3rem;padding-right:3rem}.mh8-m{margin-left:3rem;margin-right:3rem}.nh8-m{margin-left:-3rem;margin-right:-3rem}.pa9-m{padding:4rem}.ma9-m{margin:4rem}.na9-m{margin:-4rem}.pl9-m{padding-left:4rem}.ml9-m{margin-left:4rem}.nl9-m{margin-left:-4rem}.pr9-m{padding-right:4rem}.mr9-m{margin-right:4rem}.nr9-m{margin-right:-4rem}.pt9-m{padding-top:4rem}.mt9-m{margin-top:4rem}.nt9-m{margin-top:-4rem}.pb9-m{padding-bottom:4rem}.mb9-m{margin-bottom:4rem}.nb9-m{margin-bottom:-4rem}.pv9-m{padding-top:4rem;padding-bottom:4rem}.mv9-m{margin-top:4rem;margin-bottom:4rem}.nv9-m{margin-top:-4rem;margin-bottom:-4rem}.ph9-m{padding-left:4rem;padding-right:4rem}.mh9-m{margin-left:4rem;margin-right:4rem}.nh9-m{margin-left:-4rem;margin-right:-4rem}.pa10-m{padding:6rem}.ma10-m{margin:6rem}.na10-m{margin:-6rem}.pl10-m{padding-left:6rem}.ml10-m{margin-left:6rem}.nl10-m{margin-left:-6rem}.pr10-m{padding-right:6rem}.mr10-m{margin-right:6rem}.nr10-m{margin-right:-6rem}.pt10-m{padding-top:6rem}.mt10-m{margin-top:6rem}.nt10-m{margin-top:-6rem}.pb10-m{padding-bottom:6rem}.mb10-m{margin-bottom:6rem}.nb10-m{margin-bottom:-6rem}.pv10-m{padding-top:6rem;padding-bottom:6rem}.mv10-m{margin-top:6rem;margin-bottom:6rem}.nv10-m{margin-top:-6rem;margin-bottom:-6rem}.ph10-m{padding-left:6rem;padding-right:6rem}.mh10-m{margin-left:6rem;margin-right:6rem}.nh10-m{margin-left:-6rem;margin-right:-6rem}.pa11-m{padding:10rem}.ma11-m{margin:10rem}.na11-m{margin:-10rem}.pl11-m{padding-left:10rem}.ml11-m{margin-left:10rem}.nl11-m{margin-left:-10rem}.pr11-m{padding-right:10rem}.mr11-m{margin-right:10rem}.nr11-m{margin-right:-10rem}.pt11-m{padding-top:10rem}.mt11-m{margin-top:10rem}.nt11-m{margin-top:-10rem}.pb11-m{padding-bottom:10rem}.mb11-m{margin-bottom:10rem}.nb11-m{margin-bottom:-10rem}.pv11-m{padding-top:10rem;padding-bottom:10rem}.mv11-m{margin-top:10rem;margin-bottom:10rem}.nv11-m{margin-top:-10rem;margin-bottom:-10rem}.ph11-m{padding-left:10rem;padding-right:10rem}.mh11-m{margin-left:10rem;margin-right:10rem}.nh11-m{margin-left:-10rem;margin-right:-10rem}.pa12-m{padding:18rem}.ma12-m{margin:18rem}.na12-m{margin:-18rem}.pl12-m{padding-left:18rem}.ml12-m{margin-left:18rem}.nl12-m{margin-left:-18rem}.pr12-m{padding-right:18rem}.mr12-m{margin-right:18rem}.nr12-m{margin-right:-18rem}.pt12-m{padding-top:18rem}.mt12-m{margin-top:18rem}.nt12-m{margin-top:-18rem}.pb12-m{padding-bottom:18rem}.mb12-m{margin-bottom:18rem}.nb12-m{margin-bottom:-18rem}.pv12-m{padding-top:18rem;padding-bottom:18rem}.mv12-m{margin-top:18rem;margin-bottom:18rem}.nv12-m{margin-top:-18rem;margin-bottom:-18rem}.ph12-m{padding-left:18rem;padding-right:18rem}.mh12-m{margin-left:18rem;margin-right:18rem}.nh12-m{margin-left:-18rem;margin-right:-18rem}.top-0-m{top:0}.right-0-m{right:0}.bottom-0-m{bottom:0}.left-0-m{left:0}.top-1-m{top:1rem}.right-1-m{right:1rem}.bottom-1-m{bottom:1rem}.left-1-m{left:1rem}.top-2-m{top:2rem}.right-2-m{right:2rem}.bottom-2-m{bottom:2rem}.left-2-m{left:2rem}.top--1-m{top:-1rem}.right--1-m{right:-1rem}.bottom--1-m{bottom:-1rem}.left--1-m{left:-1rem}.top--2-m{top:-2rem}.right--2-m{right:-2rem}.bottom--2-m{bottom:-2rem}.left--2-m{left:-2rem}.absolute--fill-m{top:0;right:0;bottom:0;left:0}.cf-m:after,.cf-m:before{content:" ";display:table}.cf-m:after{clear:both}.cf-m{*zoom:1}.cl-m{clear:left}.cr-m{clear:right}.cb-m{clear:both}.cn-m{clear:none}.dn-m{display:none}.di-m{display:inline}.db-m{display:block}.dib-m{display:inline-block}.dit-m{display:inline-table}.dt-m{display:table}.dtc-m{display:table-cell}.dt-row-m{display:table-row}.dt-row-group-m{display:table-row-group}.dt-column-m{display:table-column}.dt-column-group-m{display:table-column-group}.dt--fixed-m{table-layout:fixed;width:100%}.flex-m{display:flex}.inline-flex-m{display:inline-flex}.flex-auto-m{flex:1 1 auto;min-width:0;min-height:0}.flex-none-m{flex:none}.flex-column-m{flex-direction:column}.flex-row-m{flex-direction:row}.flex-wrap-m{flex-wrap:wrap}.flex-nowrap-m{flex-wrap:nowrap}.flex-wrap-reverse-m{flex-wrap:wrap-reverse}.flex-column-reverse-m{flex-direction:column-reverse}.flex-row-reverse-m{flex-direction:row-reverse}.items-start-m{align-items:flex-start}.items-end-m{align-items:flex-end}.items-center-m{align-items:center}.items-baseline-m{align-items:baseline}.items-stretch-m{align-items:stretch}.self-start-m{align-self:flex-start}.self-end-m{align-self:flex-end}.self-center-m{align-self:center}.self-baseline-m{align-self:baseline}.self-stretch-m{align-self:stretch}.justify-start-m{justify-content:flex-start}.justify-end-m{justify-content:flex-end}.justify-center-m{justify-content:center}.justify-between-m{justify-content:space-between}.justify-around-m{justify-content:space-around}.content-start-m{align-content:flex-start}.content-end-m{align-content:flex-end}.content-center-m{align-content:center}.content-between-m{align-content:space-between}.content-around-m{align-content:space-around}.content-stretch-m{align-content:stretch}.order-0-m{order:0}.order-1-m{order:1}.order-2-m{order:2}.order-3-m{order:3}.order-4-m{order:4}.order-5-m{order:5}.order-6-m{order:6}.order-7-m{order:7}.order-8-m{order:8}.order-last-m{order:99999}.flex-grow-0-m{flex-grow:0}.flex-grow-1-m{flex-grow:1}.flex-shrink-0-m{flex-shrink:0}.flex-shrink-1-m{flex-shrink:1}.fl-m{float:left}.fl-m,.fr-m{_display:inline}.fr-m{float:right}.fn-m{float:none}.i-m{font-style:italic}.fs-normal-m{font-style:normal}.normal-m{font-weight:400}.b-m{font-weight:700}.fw1-m{font-weight:100}.fw2-m{font-weight:200}.fw3-m{font-weight:300}.fw4-m{font-weight:400}.fw5-m{font-weight:500}.fw6-m{font-weight:600}.fw7-m{font-weight:700}.fw8-m{font-weight:800}.fw9-m{font-weight:900}.h1-m{height:1rem}.h2-m{height:2rem}.h3-m{height:4rem}.h4-m{height:8rem}.h5-m{height:16rem}.h-25-m{height:25%}.h-50-m{height:50%}.h-75-m{height:75%}.h-100-m{height:100%}.min-h-100-m{min-height:100%}.vh-25-m{height:25vh}.vh-50-m{height:50vh}.vh-75-m{height:75vh}.vh-100-m{height:100vh}.min-vh-100-m{min-height:100vh}.h-auto-m{height:auto}.h-inherit-m{height:inherit}.tracked-m{letter-spacing:.1em}.tracked-tight-m{letter-spacing:-.05em}.tracked-mega-m{letter-spacing:.25em}.lh-solid-m{line-height:1.333333}.lh-title-m{line-height:1.5}.lh-copy-m{line-height:1.666666}.mw1-m{max-width:1rem}.mw2-m{max-width:2rem}.mw3-m{max-width:4rem}.mw4-m{max-width:8rem}.mw5-m{max-width:16rem}.mw6-m{max-width:32rem}.mw7-m{max-width:48rem}.mw8-m{max-width:64rem}.mw9-m{max-width:96rem}.mw-none-m{max-width:none}.mw-100-m{max-width:100%}.o-100-m{opacity:1}.o-90-m{opacity:.9}.o-80-m{opacity:.8}.o-70-m{opacity:.7}.o-60-m{opacity:.6}.o-50-m{opacity:.5}.o-40-m{opacity:.4}.o-30-m{opacity:.3}.o-20-m{opacity:.2}.o-10-m{opacity:.1}.o-05-m{opacity:.05}.o-025-m{opacity:.025}.o-0-m{opacity:0}.rotate-45-m{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.rotate-90-m{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.rotate-135-m{-webkit-transform:rotate(135deg);transform:rotate(135deg)}.rotate-180-m{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rotate-225-m{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.rotate-270-m{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.rotate-315-m{-webkit-transform:rotate(315deg);transform:rotate(315deg)}.outline-m{outline:1px solid}.outline-transparent-m{outline:1px solid transparent}.outline-0-m{outline:0}.overflow-visible-m{overflow:visible}.overflow-hidden-m{overflow:hidden}.overflow-scroll-m{overflow:scroll}.overflow-auto-m{overflow:auto}.overflow-x-visible-m{overflow-x:visible}.overflow-x-hidden-m{overflow-x:hidden}.overflow-x-scroll-m{overflow-x:scroll}.overflow-x-auto-m{overflow-x:auto}.overflow-y-visible-m{overflow-y:visible}.overflow-y-hidden-m{overflow-y:hidden}.overflow-y-scroll-m{overflow-y:scroll}.overflow-y-auto-m{overflow-y:auto}.static-m{position:static}.relative-m{position:relative}.absolute-m{position:absolute}.fixed-m{position:fixed}.strike-m{text-decoration:line-through}.underline-m{text-decoration:underline}.no-underline-m{text-decoration:none}.tl-m{text-align:left}.tr-m{text-align:right}.tc-m{text-align:center}.tj-m{text-align:justify}.ttc-m{text-transform:capitalize}.ttl-m{text-transform:lowercase}.ttu-m{text-transform:uppercase}.ttn-m{text-transform:none}.f1-m{font-size:4.5rem}.f2-m{font-size:4rem}.f3-m{font-size:3rem}.f4-m{font-size:2rem}.f5-m{font-size:1.5rem}.f6-m{font-size:1.125rem}.f7-m{font-size:1rem}.f8-m{font-size:.875rem}.f9-m{font-size:.75rem}.measure-m{max-width:30em}.measure-wide-m{max-width:34em}.measure-narrow-m{max-width:20em}.small-caps-m{font-variant:small-caps}.indent-m{text-indent:1em;margin-top:0;margin-bottom:0}.truncate-m{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clip-m{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ws-normal-m{white-space:normal}.nowrap-m{white-space:nowrap}.pre-m{white-space:pre}.w1-m{width:1rem}.w2-m{width:2rem}.w3-m{width:4rem}.w4-m{width:8rem}.w5-m{width:16rem}.w-10-m{width:10%}.w-20-m{width:20%}.w-25-m{width:25%}.w-30-m{width:30%}.w-33-m{width:33%}.w-34-m{width:34%}.w-40-m{width:40%}.w-50-m{width:50%}.w-60-m{width:60%}.w-70-m{width:70%}.w-75-m{width:75%}.w-80-m{width:80%}.w-90-m{width:90%}.w-100-m{width:100%}.w-third-m{width:33.33333%}.w-two-thirds-m{width:66.66667%}.w-auto-m{width:auto}}@media screen and (min-width:46.875em) and (max-width:60em){.aspect-ratio-l{height:0;position:relative}.aspect-ratio--16x9-l{padding-bottom:56.25%}.aspect-ratio--9x16-l{padding-bottom:177.77%}.aspect-ratio--4x3-l{padding-bottom:75%}.aspect-ratio--3x4-l{padding-bottom:133.33%}.aspect-ratio--6x4-l{padding-bottom:66.6%}.aspect-ratio--4x6-l{padding-bottom:150%}.aspect-ratio--8x5-l{padding-bottom:62.5%}.aspect-ratio--5x8-l{padding-bottom:160%}.aspect-ratio--7x5-l{padding-bottom:71.42%}.aspect-ratio--5x7-l{padding-bottom:140%}.aspect-ratio--1x1-l{padding-bottom:100%}.aspect-ratio--object-l{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:100}.cover-l{background-size:cover!important}.contain-l{background-size:contain!important}.bg-center-l{background-position:50%}.bg-center-l,.bg-top-l{background-repeat:no-repeat}.bg-top-l{background-position:top}.bg-right-l{background-position:100%}.bg-bottom-l,.bg-right-l{background-repeat:no-repeat}.bg-bottom-l{background-position:bottom}.bg-left-l{background-repeat:no-repeat;background-position:0}.ba-l{border-style:solid;border-width:1px}.bt-l{border-top-style:solid;border-top-width:1px}.br-l{border-right-style:solid;border-right-width:1px}.bb-l{border-bottom-style:solid;border-bottom-width:1px}.bl-l{border-left-style:solid;border-left-width:1px}.bn-l{border-style:none;border-width:0}.br0-l{border-radius:0}.br1-l{border-radius:.125rem}.br2-l{border-radius:.25rem}.br3-l{border-radius:.5rem}.br4-l{border-radius:1rem}.br-100-l{border-radius:100%}.br-pill-l{border-radius:9999px}.br--bottom-l{border-top-left-radius:0;border-top-right-radius:0}.br--top-l{border-bottom-right-radius:0}.br--right-l,.br--top-l{border-bottom-left-radius:0}.br--right-l{border-top-left-radius:0}.br--left-l{border-top-right-radius:0;border-bottom-right-radius:0}.b--dotted-l{border-style:dotted}.b--dashed-l{border-style:dashed}.b--solid-l{border-style:solid}.b--none-l{border-style:none}.bw0-l{border-width:0}.bw1-l{border-width:.125rem}.bw2-l{border-width:.25rem}.bw3-l{border-width:.5rem}.bw4-l{border-width:1rem}.bw5-l{border-width:2rem}.bt-0-l{border-top-width:0}.br-0-l{border-right-width:0}.bb-0-l{border-bottom-width:0}.bl-0-l{border-left-width:0}.shadow-1-l{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.shadow-2-l{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.shadow-3-l{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.shadow-4-l{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.shadow-5-l{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}.pa0-l{padding:0}.ma0-l,.na0-l{margin:0}.pl0-l{padding-left:0}.ml0-l,.nl0-l{margin-left:0}.pr0-l{padding-right:0}.mr0-l,.nr0-l{margin-right:0}.pt0-l{padding-top:0}.mt0-l,.nt0-l{margin-top:0}.pb0-l{padding-bottom:0}.mb0-l,.nb0-l{margin-bottom:0}.pv0-l{padding-top:0;padding-bottom:0}.mv0-l,.nv0-l{margin-top:0;margin-bottom:0}.ph0-l{padding-left:0;padding-right:0}.mh0-l,.nh0-l{margin-left:0;margin-right:0}.pa1-l{padding:.25rem}.ma1-l{margin:.25rem}.na1-l{margin:-.25rem}.pl1-l{padding-left:.25rem}.ml1-l{margin-left:.25rem}.nl1-l{margin-left:-.25rem}.pr1-l{padding-right:.25rem}.mr1-l{margin-right:.25rem}.nr1-l{margin-right:-.25rem}.pt1-l{padding-top:.25rem}.mt1-l{margin-top:.25rem}.nt1-l{margin-top:-.25rem}.pb1-l{padding-bottom:.25rem}.mb1-l{margin-bottom:.25rem}.nb1-l{margin-bottom:-.25rem}.pv1-l{padding-top:.25rem;padding-bottom:.25rem}.mv1-l{margin-top:.25rem;margin-bottom:.25rem}.nv1-l{margin-top:-.25rem;margin-bottom:-.25rem}.ph1-l{padding-left:.25rem;padding-right:.25rem}.mh1-l{margin-left:.25rem;margin-right:.25rem}.nh1-l{margin-left:-.25rem;margin-right:-.25rem}.pa2-l{padding:.5rem}.ma2-l{margin:.5rem}.na2-l{margin:-.5rem}.pl2-l{padding-left:.5rem}.ml2-l{margin-left:.5rem}.nl2-l{margin-left:-.5rem}.pr2-l{padding-right:.5rem}.mr2-l{margin-right:.5rem}.nr2-l{margin-right:-.5rem}.pt2-l{padding-top:.5rem}.mt2-l{margin-top:.5rem}.nt2-l{margin-top:-.5rem}.pb2-l{padding-bottom:.5rem}.mb2-l{margin-bottom:.5rem}.nb2-l{margin-bottom:-.5rem}.pv2-l{padding-top:.5rem;padding-bottom:.5rem}.mv2-l{margin-top:.5rem;margin-bottom:.5rem}.nv2-l{margin-top:-.5rem;margin-bottom:-.5rem}.ph2-l{padding-left:.5rem;padding-right:.5rem}.mh2-l{margin-left:.5rem;margin-right:.5rem}.nh2-l{margin-left:-.5rem;margin-right:-.5rem}.pa3-l{padding:.75rem}.ma3-l{margin:.75rem}.na3-l{margin:-.75rem}.pl3-l{padding-left:.75rem}.ml3-l{margin-left:.75rem}.nl3-l{margin-left:-.75rem}.pr3-l{padding-right:.75rem}.mr3-l{margin-right:.75rem}.nr3-l{margin-right:-.75rem}.pt3-l{padding-top:.75rem}.mt3-l{margin-top:.75rem}.nt3-l{margin-top:-.75rem}.pb3-l{padding-bottom:.75rem}.mb3-l{margin-bottom:.75rem}.nb3-l{margin-bottom:-.75rem}.pv3-l{padding-top:.75rem;padding-bottom:.75rem}.mv3-l{margin-top:.75rem;margin-bottom:.75rem}.nv3-l{margin-top:-.75rem;margin-bottom:-.75rem}.ph3-l{padding-left:.75rem;padding-right:.75rem}.mh3-l{margin-left:.75rem;margin-right:.75rem}.nh3-l{margin-left:-.75rem;margin-right:-.75rem}.pa4-l{padding:1rem}.ma4-l{margin:1rem}.na4-l{margin:-1rem}.pl4-l{padding-left:1rem}.ml4-l{margin-left:1rem}.nl4-l{margin-left:-1rem}.pr4-l{padding-right:1rem}.mr4-l{margin-right:1rem}.nr4-l{margin-right:-1rem}.pt4-l{padding-top:1rem}.mt4-l{margin-top:1rem}.nt4-l{margin-top:-1rem}.pb4-l{padding-bottom:1rem}.mb4-l{margin-bottom:1rem}.nb4-l{margin-bottom:-1rem}.pv4-l{padding-top:1rem;padding-bottom:1rem}.mv4-l{margin-top:1rem;margin-bottom:1rem}.nv4-l{margin-top:-1rem;margin-bottom:-1rem}.ph4-l{padding-left:1rem;padding-right:1rem}.mh4-l{margin-left:1rem;margin-right:1rem}.nh4-l{margin-left:-1rem;margin-right:-1rem}.pa5-l{padding:1.25rem}.ma5-l{margin:1.25rem}.na5-l{margin:-1.25rem}.pl5-l{padding-left:1.25rem}.ml5-l{margin-left:1.25rem}.nl5-l{margin-left:-1.25rem}.pr5-l{padding-right:1.25rem}.mr5-l{margin-right:1.25rem}.nr5-l{margin-right:-1.25rem}.pt5-l{padding-top:1.25rem}.mt5-l{margin-top:1.25rem}.nt5-l{margin-top:-1.25rem}.pb5-l{padding-bottom:1.25rem}.mb5-l{margin-bottom:1.25rem}.nb5-l{margin-bottom:-1.25rem}.pv5-l{padding-top:1.25rem;padding-bottom:1.25rem}.mv5-l{margin-top:1.25rem;margin-bottom:1.25rem}.nv5-l{margin-top:-1.25rem;margin-bottom:-1.25rem}.ph5-l{padding-left:1.25rem;padding-right:1.25rem}.mh5-l{margin-left:1.25rem;margin-right:1.25rem}.nh5-l{margin-left:-1.25rem;margin-right:-1.25rem}.pa6-l{padding:1.5rem}.ma6-l{margin:1.5rem}.na6-l{margin:-1.5rem}.pl6-l{padding-left:1.5rem}.ml6-l{margin-left:1.5rem}.nl6-l{margin-left:-1.5rem}.pr6-l{padding-right:1.5rem}.mr6-l{margin-right:1.5rem}.nr6-l{margin-right:-1.5rem}.pt6-l{padding-top:1.5rem}.mt6-l{margin-top:1.5rem}.nt6-l{margin-top:-1.5rem}.pb6-l{padding-bottom:1.5rem}.mb6-l{margin-bottom:1.5rem}.nb6-l{margin-bottom:-1.5rem}.pv6-l{padding-top:1.5rem;padding-bottom:1.5rem}.mv6-l{margin-top:1.5rem;margin-bottom:1.5rem}.nv6-l{margin-top:-1.5rem;margin-bottom:-1.5rem}.ph6-l{padding-left:1.5rem;padding-right:1.5rem}.mh6-l{margin-left:1.5rem;margin-right:1.5rem}.nh6-l{margin-left:-1.5rem;margin-right:-1.5rem}.pa7-l{padding:2rem}.ma7-l{margin:2rem}.na7-l{margin:-2rem}.pl7-l{padding-left:2rem}.ml7-l{margin-left:2rem}.nl7-l{margin-left:-2rem}.pr7-l{padding-right:2rem}.mr7-l{margin-right:2rem}.nr7-l{margin-right:-2rem}.pt7-l{padding-top:2rem}.mt7-l{margin-top:2rem}.nt7-l{margin-top:-2rem}.pb7-l{padding-bottom:2rem}.mb7-l{margin-bottom:2rem}.nb7-l{margin-bottom:-2rem}.pv7-l{padding-top:2rem;padding-bottom:2rem}.mv7-l{margin-top:2rem;margin-bottom:2rem}.nv7-l{margin-top:-2rem;margin-bottom:-2rem}.ph7-l{padding-left:2rem;padding-right:2rem}.mh7-l{margin-left:2rem;margin-right:2rem}.nh7-l{margin-left:-2rem;margin-right:-2rem}.pa8-l{padding:3rem}.ma8-l{margin:3rem}.na8-l{margin:-3rem}.pl8-l{padding-left:3rem}.ml8-l{margin-left:3rem}.nl8-l{margin-left:-3rem}.pr8-l{padding-right:3rem}.mr8-l{margin-right:3rem}.nr8-l{margin-right:-3rem}.pt8-l{padding-top:3rem}.mt8-l{margin-top:3rem}.nt8-l{margin-top:-3rem}.pb8-l{padding-bottom:3rem}.mb8-l{margin-bottom:3rem}.nb8-l{margin-bottom:-3rem}.pv8-l{padding-top:3rem;padding-bottom:3rem}.mv8-l{margin-top:3rem;margin-bottom:3rem}.nv8-l{margin-top:-3rem;margin-bottom:-3rem}.ph8-l{padding-left:3rem;padding-right:3rem}.mh8-l{margin-left:3rem;margin-right:3rem}.nh8-l{margin-left:-3rem;margin-right:-3rem}.pa9-l{padding:4rem}.ma9-l{margin:4rem}.na9-l{margin:-4rem}.pl9-l{padding-left:4rem}.ml9-l{margin-left:4rem}.nl9-l{margin-left:-4rem}.pr9-l{padding-right:4rem}.mr9-l{margin-right:4rem}.nr9-l{margin-right:-4rem}.pt9-l{padding-top:4rem}.mt9-l{margin-top:4rem}.nt9-l{margin-top:-4rem}.pb9-l{padding-bottom:4rem}.mb9-l{margin-bottom:4rem}.nb9-l{margin-bottom:-4rem}.pv9-l{padding-top:4rem;padding-bottom:4rem}.mv9-l{margin-top:4rem;margin-bottom:4rem}.nv9-l{margin-top:-4rem;margin-bottom:-4rem}.ph9-l{padding-left:4rem;padding-right:4rem}.mh9-l{margin-left:4rem;margin-right:4rem}.nh9-l{margin-left:-4rem;margin-right:-4rem}.pa10-l{padding:6rem}.ma10-l{margin:6rem}.na10-l{margin:-6rem}.pl10-l{padding-left:6rem}.ml10-l{margin-left:6rem}.nl10-l{margin-left:-6rem}.pr10-l{padding-right:6rem}.mr10-l{margin-right:6rem}.nr10-l{margin-right:-6rem}.pt10-l{padding-top:6rem}.mt10-l{margin-top:6rem}.nt10-l{margin-top:-6rem}.pb10-l{padding-bottom:6rem}.mb10-l{margin-bottom:6rem}.nb10-l{margin-bottom:-6rem}.pv10-l{padding-top:6rem;padding-bottom:6rem}.mv10-l{margin-top:6rem;margin-bottom:6rem}.nv10-l{margin-top:-6rem;margin-bottom:-6rem}.ph10-l{padding-left:6rem;padding-right:6rem}.mh10-l{margin-left:6rem;margin-right:6rem}.nh10-l{margin-left:-6rem;margin-right:-6rem}.pa11-l{padding:10rem}.ma11-l{margin:10rem}.na11-l{margin:-10rem}.pl11-l{padding-left:10rem}.ml11-l{margin-left:10rem}.nl11-l{margin-left:-10rem}.pr11-l{padding-right:10rem}.mr11-l{margin-right:10rem}.nr11-l{margin-right:-10rem}.pt11-l{padding-top:10rem}.mt11-l{margin-top:10rem}.nt11-l{margin-top:-10rem}.pb11-l{padding-bottom:10rem}.mb11-l{margin-bottom:10rem}.nb11-l{margin-bottom:-10rem}.pv11-l{padding-top:10rem;padding-bottom:10rem}.mv11-l{margin-top:10rem;margin-bottom:10rem}.nv11-l{margin-top:-10rem;margin-bottom:-10rem}.ph11-l{padding-left:10rem;padding-right:10rem}.mh11-l{margin-left:10rem;margin-right:10rem}.nh11-l{margin-left:-10rem;margin-right:-10rem}.pa12-l{padding:18rem}.ma12-l{margin:18rem}.na12-l{margin:-18rem}.pl12-l{padding-left:18rem}.ml12-l{margin-left:18rem}.nl12-l{margin-left:-18rem}.pr12-l{padding-right:18rem}.mr12-l{margin-right:18rem}.nr12-l{margin-right:-18rem}.pt12-l{padding-top:18rem}.mt12-l{margin-top:18rem}.nt12-l{margin-top:-18rem}.pb12-l{padding-bottom:18rem}.mb12-l{margin-bottom:18rem}.nb12-l{margin-bottom:-18rem}.pv12-l{padding-top:18rem;padding-bottom:18rem}.mv12-l{margin-top:18rem;margin-bottom:18rem}.nv12-l{margin-top:-18rem;margin-bottom:-18rem}.ph12-l{padding-left:18rem;padding-right:18rem}.mh12-l{margin-left:18rem;margin-right:18rem}.nh12-l{margin-left:-18rem;margin-right:-18rem}.top-0-l{top:0}.right-0-l{right:0}.bottom-0-l{bottom:0}.left-0-l{left:0}.top-1-l{top:1rem}.right-1-l{right:1rem}.bottom-1-l{bottom:1rem}.left-1-l{left:1rem}.top-2-l{top:2rem}.right-2-l{right:2rem}.bottom-2-l{bottom:2rem}.left-2-l{left:2rem}.top--1-l{top:-1rem}.right--1-l{right:-1rem}.bottom--1-l{bottom:-1rem}.left--1-l{left:-1rem}.top--2-l{top:-2rem}.right--2-l{right:-2rem}.bottom--2-l{bottom:-2rem}.left--2-l{left:-2rem}.absolute--fill-l{top:0;right:0;bottom:0;left:0}.cf-l:after,.cf-l:before{content:" ";display:table}.cf-l:after{clear:both}.cf-l{*zoom:1}.cl-l{clear:left}.cr-l{clear:right}.cb-l{clear:both}.cn-l{clear:none}.dn-l{display:none}.di-l{display:inline}.db-l{display:block}.dib-l{display:inline-block}.dit-l{display:inline-table}.dt-l{display:table}.dtc-l{display:table-cell}.dt-row-l{display:table-row}.dt-row-group-l{display:table-row-group}.dt-column-l{display:table-column}.dt-column-group-l{display:table-column-group}.dt--fixed-l{table-layout:fixed;width:100%}.flex-l{display:flex}.inline-flex-l{display:inline-flex}.flex-auto-l{flex:1 1 auto;min-width:0;min-height:0}.flex-none-l{flex:none}.flex-column-l{flex-direction:column}.flex-row-l{flex-direction:row}.flex-wrap-l{flex-wrap:wrap}.flex-nowrap-l{flex-wrap:nowrap}.flex-wrap-reverse-l{flex-wrap:wrap-reverse}.flex-column-reverse-l{flex-direction:column-reverse}.flex-row-reverse-l{flex-direction:row-reverse}.items-start-l{align-items:flex-start}.items-end-l{align-items:flex-end}.items-center-l{align-items:center}.items-baseline-l{align-items:baseline}.items-stretch-l{align-items:stretch}.self-start-l{align-self:flex-start}.self-end-l{align-self:flex-end}.self-center-l{align-self:center}.self-baseline-l{align-self:baseline}.self-stretch-l{align-self:stretch}.justify-start-l{justify-content:flex-start}.justify-end-l{justify-content:flex-end}.justify-center-l{justify-content:center}.justify-between-l{justify-content:space-between}.justify-around-l{justify-content:space-around}.content-start-l{align-content:flex-start}.content-end-l{align-content:flex-end}.content-center-l{align-content:center}.content-between-l{align-content:space-between}.content-around-l{align-content:space-around}.content-stretch-l{align-content:stretch}.order-0-l{order:0}.order-1-l{order:1}.order-2-l{order:2}.order-3-l{order:3}.order-4-l{order:4}.order-5-l{order:5}.order-6-l{order:6}.order-7-l{order:7}.order-8-l{order:8}.order-last-l{order:99999}.flex-grow-0-l{flex-grow:0}.flex-grow-1-l{flex-grow:1}.flex-shrink-0-l{flex-shrink:0}.flex-shrink-1-l{flex-shrink:1}.fl-l{float:left}.fl-l,.fr-l{_display:inline}.fr-l{float:right}.fn-l{float:none}.i-l{font-style:italic}.fs-normal-l{font-style:normal}.normal-l{font-weight:400}.b-l{font-weight:700}.fw1-l{font-weight:100}.fw2-l{font-weight:200}.fw3-l{font-weight:300}.fw4-l{font-weight:400}.fw5-l{font-weight:500}.fw6-l{font-weight:600}.fw7-l{font-weight:700}.fw8-l{font-weight:800}.fw9-l{font-weight:900}.h1-l{height:1rem}.h2-l{height:2rem}.h3-l{height:4rem}.h4-l{height:8rem}.h5-l{height:16rem}.h-25-l{height:25%}.h-50-l{height:50%}.h-75-l{height:75%}.h-100-l{height:100%}.min-h-100-l{min-height:100%}.vh-25-l{height:25vh}.vh-50-l{height:50vh}.vh-75-l{height:75vh}.vh-100-l{height:100vh}.min-vh-100-l{min-height:100vh}.h-auto-l{height:auto}.h-inherit-l{height:inherit}.tracked-l{letter-spacing:.1em}.tracked-tight-l{letter-spacing:-.05em}.tracked-mega-l{letter-spacing:.25em}.lh-solid-l{line-height:1.333333}.lh-title-l{line-height:1.5}.lh-copy-l{line-height:1.666666}.mw1-l{max-width:1rem}.mw2-l{max-width:2rem}.mw3-l{max-width:4rem}.mw4-l{max-width:8rem}.mw5-l{max-width:16rem}.mw6-l{max-width:32rem}.mw7-l{max-width:48rem}.mw8-l{max-width:64rem}.mw9-l{max-width:96rem}.mw-none-l{max-width:none}.mw-100-l{max-width:100%}.o-100-l{opacity:1}.o-90-l{opacity:.9}.o-80-l{opacity:.8}.o-70-l{opacity:.7}.o-60-l{opacity:.6}.o-50-l{opacity:.5}.o-40-l{opacity:.4}.o-30-l{opacity:.3}.o-20-l{opacity:.2}.o-10-l{opacity:.1}.o-05-l{opacity:.05}.o-025-l{opacity:.025}.o-0-l{opacity:0}.rotate-45-l{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.rotate-90-l{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.rotate-135-l{-webkit-transform:rotate(135deg);transform:rotate(135deg)}.rotate-180-l{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rotate-225-l{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.rotate-270-l{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.rotate-315-l{-webkit-transform:rotate(315deg);transform:rotate(315deg)}.outline-l{outline:1px solid}.outline-transparent-l{outline:1px solid transparent}.outline-0-l{outline:0}.overflow-visible-l{overflow:visible}.overflow-hidden-l{overflow:hidden}.overflow-scroll-l{overflow:scroll}.overflow-auto-l{overflow:auto}.overflow-x-visible-l{overflow-x:visible}.overflow-x-hidden-l{overflow-x:hidden}.overflow-x-scroll-l{overflow-x:scroll}.overflow-x-auto-l{overflow-x:auto}.overflow-y-visible-l{overflow-y:visible}.overflow-y-hidden-l{overflow-y:hidden}.overflow-y-scroll-l{overflow-y:scroll}.overflow-y-auto-l{overflow-y:auto}.static-l{position:static}.relative-l{position:relative}.absolute-l{position:absolute}.fixed-l{position:fixed}.strike-l{text-decoration:line-through}.underline-l{text-decoration:underline}.no-underline-l{text-decoration:none}.tl-l{text-align:left}.tr-l{text-align:right}.tc-l{text-align:center}.tj-l{text-align:justify}.ttc-l{text-transform:capitalize}.ttl-l{text-transform:lowercase}.ttu-l{text-transform:uppercase}.ttn-l{text-transform:none}.f1-l{font-size:4.5rem}.f2-l{font-size:4rem}.f3-l{font-size:3rem}.f4-l{font-size:2rem}.f5-l{font-size:1.5rem}.f6-l{font-size:1.125rem}.f7-l{font-size:1rem}.f8-l{font-size:.875rem}.f9-l{font-size:.75rem}.measure-l{max-width:30em}.measure-wide-l{max-width:34em}.measure-narrow-l{max-width:20em}.small-caps-l{font-variant:small-caps}.indent-l{text-indent:1em;margin-top:0;margin-bottom:0}.truncate-l{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clip-l{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ws-normal-l{white-space:normal}.nowrap-l{white-space:nowrap}.pre-l{white-space:pre}.w1-l{width:1rem}.w2-l{width:2rem}.w3-l{width:4rem}.w4-l{width:8rem}.w5-l{width:16rem}.w-10-l{width:10%}.w-20-l{width:20%}.w-25-l{width:25%}.w-30-l{width:30%}.w-33-l{width:33%}.w-34-l{width:34%}.w-40-l{width:40%}.w-50-l{width:50%}.w-60-l{width:60%}.w-70-l{width:70%}.w-75-l{width:75%}.w-80-l{width:80%}.w-90-l{width:90%}.w-100-l{width:100%}.w-third-l{width:33.33333%}.w-two-thirds-l{width:66.66667%}.w-auto-l{width:auto}}@media screen and (min-width:60em){.aspect-ratio-xl{height:0;position:relative}.aspect-ratio--16x9-xl{padding-bottom:56.25%}.aspect-ratio--9x16-xl{padding-bottom:177.77%}.aspect-ratio--4x3-xl{padding-bottom:75%}.aspect-ratio--3x4-xl{padding-bottom:133.33%}.aspect-ratio--6x4-xl{padding-bottom:66.6%}.aspect-ratio--4x6-xl{padding-bottom:150%}.aspect-ratio--8x5-xl{padding-bottom:62.5%}.aspect-ratio--5x8-xl{padding-bottom:160%}.aspect-ratio--7x5-xl{padding-bottom:71.42%}.aspect-ratio--5x7-xl{padding-bottom:140%}.aspect-ratio--1x1-xl{padding-bottom:100%}.aspect-ratio--object-xl{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:100}.cover-xl{background-size:cover!important}.contain-xl{background-size:contain!important}.bg-center-xl{background-position:50%}.bg-center-xl,.bg-top-xl{background-repeat:no-repeat}.bg-top-xl{background-position:top}.bg-right-xl{background-position:100%}.bg-bottom-xl,.bg-right-xl{background-repeat:no-repeat}.bg-bottom-xl{background-position:bottom}.bg-left-xl{background-repeat:no-repeat;background-position:0}.ba-xl{border-style:solid;border-width:1px}.bt-xl{border-top-style:solid;border-top-width:1px}.br-xl{border-right-style:solid;border-right-width:1px}.bb-xl{border-bottom-style:solid;border-bottom-width:1px}.bl-xl{border-left-style:solid;border-left-width:1px}.bn-xl{border-style:none;border-width:0}.br0-xl{border-radius:0}.br1-xl{border-radius:.125rem}.br2-xl{border-radius:.25rem}.br3-xl{border-radius:.5rem}.br4-xl{border-radius:1rem}.br-100-xl{border-radius:100%}.br-pill-xl{border-radius:9999px}.br--bottom-xl{border-top-left-radius:0;border-top-right-radius:0}.br--top-xl{border-bottom-right-radius:0}.br--right-xl,.br--top-xl{border-bottom-left-radius:0}.br--right-xl{border-top-left-radius:0}.br--left-xl{border-top-right-radius:0;border-bottom-right-radius:0}.b--dotted-xl{border-style:dotted}.b--dashed-xl{border-style:dashed}.b--solid-xl{border-style:solid}.b--none-xl{border-style:none}.bw0-xl{border-width:0}.bw1-xl{border-width:.125rem}.bw2-xl{border-width:.25rem}.bw3-xl{border-width:.5rem}.bw4-xl{border-width:1rem}.bw5-xl{border-width:2rem}.bt-0-xl{border-top-width:0}.br-0-xl{border-right-width:0}.bb-0-xl{border-bottom-width:0}.bl-0-xl{border-left-width:0}.shadow-1-xl{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.shadow-2-xl{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.shadow-3-xl{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.shadow-4-xl{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.shadow-5-xl{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}.pa0-xl{padding:0}.ma0-xl,.na0-xl{margin:0}.pl0-xl{padding-left:0}.ml0-xl,.nl0-xl{margin-left:0}.pr0-xl{padding-right:0}.mr0-xl,.nr0-xl{margin-right:0}.pt0-xl{padding-top:0}.mt0-xl,.nt0-xl{margin-top:0}.pb0-xl{padding-bottom:0}.mb0-xl,.nb0-xl{margin-bottom:0}.pv0-xl{padding-top:0;padding-bottom:0}.mv0-xl,.nv0-xl{margin-top:0;margin-bottom:0}.ph0-xl{padding-left:0;padding-right:0}.mh0-xl,.nh0-xl{margin-left:0;margin-right:0}.pa1-xl{padding:.25rem}.ma1-xl{margin:.25rem}.na1-xl{margin:-.25rem}.pl1-xl{padding-left:.25rem}.ml1-xl{margin-left:.25rem}.nl1-xl{margin-left:-.25rem}.pr1-xl{padding-right:.25rem}.mr1-xl{margin-right:.25rem}.nr1-xl{margin-right:-.25rem}.pt1-xl{padding-top:.25rem}.mt1-xl{margin-top:.25rem}.nt1-xl{margin-top:-.25rem}.pb1-xl{padding-bottom:.25rem}.mb1-xl{margin-bottom:.25rem}.nb1-xl{margin-bottom:-.25rem}.pv1-xl{padding-top:.25rem;padding-bottom:.25rem}.mv1-xl{margin-top:.25rem;margin-bottom:.25rem}.nv1-xl{margin-top:-.25rem;margin-bottom:-.25rem}.ph1-xl{padding-left:.25rem;padding-right:.25rem}.mh1-xl{margin-left:.25rem;margin-right:.25rem}.nh1-xl{margin-left:-.25rem;margin-right:-.25rem}.pa2-xl{padding:.5rem}.ma2-xl{margin:.5rem}.na2-xl{margin:-.5rem}.pl2-xl{padding-left:.5rem}.ml2-xl{margin-left:.5rem}.nl2-xl{margin-left:-.5rem}.pr2-xl{padding-right:.5rem}.mr2-xl{margin-right:.5rem}.nr2-xl{margin-right:-.5rem}.pt2-xl{padding-top:.5rem}.mt2-xl{margin-top:.5rem}.nt2-xl{margin-top:-.5rem}.pb2-xl{padding-bottom:.5rem}.mb2-xl{margin-bottom:.5rem}.nb2-xl{margin-bottom:-.5rem}.pv2-xl{padding-top:.5rem;padding-bottom:.5rem}.mv2-xl{margin-top:.5rem;margin-bottom:.5rem}.nv2-xl{margin-top:-.5rem;margin-bottom:-.5rem}.ph2-xl{padding-left:.5rem;padding-right:.5rem}.mh2-xl{margin-left:.5rem;margin-right:.5rem}.nh2-xl{margin-left:-.5rem;margin-right:-.5rem}.pa3-xl{padding:.75rem}.ma3-xl{margin:.75rem}.na3-xl{margin:-.75rem}.pl3-xl{padding-left:.75rem}.ml3-xl{margin-left:.75rem}.nl3-xl{margin-left:-.75rem}.pr3-xl{padding-right:.75rem}.mr3-xl{margin-right:.75rem}.nr3-xl{margin-right:-.75rem}.pt3-xl{padding-top:.75rem}.mt3-xl{margin-top:.75rem}.nt3-xl{margin-top:-.75rem}.pb3-xl{padding-bottom:.75rem}.mb3-xl{margin-bottom:.75rem}.nb3-xl{margin-bottom:-.75rem}.pv3-xl{padding-top:.75rem;padding-bottom:.75rem}.mv3-xl{margin-top:.75rem;margin-bottom:.75rem}.nv3-xl{margin-top:-.75rem;margin-bottom:-.75rem}.ph3-xl{padding-left:.75rem;padding-right:.75rem}.mh3-xl{margin-left:.75rem;margin-right:.75rem}.nh3-xl{margin-left:-.75rem;margin-right:-.75rem}.pa4-xl{padding:1rem}.ma4-xl{margin:1rem}.na4-xl{margin:-1rem}.pl4-xl{padding-left:1rem}.ml4-xl{margin-left:1rem}.nl4-xl{margin-left:-1rem}.pr4-xl{padding-right:1rem}.mr4-xl{margin-right:1rem}.nr4-xl{margin-right:-1rem}.pt4-xl{padding-top:1rem}.mt4-xl{margin-top:1rem}.nt4-xl{margin-top:-1rem}.pb4-xl{padding-bottom:1rem}.mb4-xl{margin-bottom:1rem}.nb4-xl{margin-bottom:-1rem}.pv4-xl{padding-top:1rem;padding-bottom:1rem}.mv4-xl{margin-top:1rem;margin-bottom:1rem}.nv4-xl{margin-top:-1rem;margin-bottom:-1rem}.ph4-xl{padding-left:1rem;padding-right:1rem}.mh4-xl{margin-left:1rem;margin-right:1rem}.nh4-xl{margin-left:-1rem;margin-right:-1rem}.pa5-xl{padding:1.25rem}.ma5-xl{margin:1.25rem}.na5-xl{margin:-1.25rem}.pl5-xl{padding-left:1.25rem}.ml5-xl{margin-left:1.25rem}.nl5-xl{margin-left:-1.25rem}.pr5-xl{padding-right:1.25rem}.mr5-xl{margin-right:1.25rem}.nr5-xl{margin-right:-1.25rem}.pt5-xl{padding-top:1.25rem}.mt5-xl{margin-top:1.25rem}.nt5-xl{margin-top:-1.25rem}.pb5-xl{padding-bottom:1.25rem}.mb5-xl{margin-bottom:1.25rem}.nb5-xl{margin-bottom:-1.25rem}.pv5-xl{padding-top:1.25rem;padding-bottom:1.25rem}.mv5-xl{margin-top:1.25rem;margin-bottom:1.25rem}.nv5-xl{margin-top:-1.25rem;margin-bottom:-1.25rem}.ph5-xl{padding-left:1.25rem;padding-right:1.25rem}.mh5-xl{margin-left:1.25rem;margin-right:1.25rem}.nh5-xl{margin-left:-1.25rem;margin-right:-1.25rem}.pa6-xl{padding:1.5rem}.ma6-xl{margin:1.5rem}.na6-xl{margin:-1.5rem}.pl6-xl{padding-left:1.5rem}.ml6-xl{margin-left:1.5rem}.nl6-xl{margin-left:-1.5rem}.pr6-xl{padding-right:1.5rem}.mr6-xl{margin-right:1.5rem}.nr6-xl{margin-right:-1.5rem}.pt6-xl{padding-top:1.5rem}.mt6-xl{margin-top:1.5rem}.nt6-xl{margin-top:-1.5rem}.pb6-xl{padding-bottom:1.5rem}.mb6-xl{margin-bottom:1.5rem}.nb6-xl{margin-bottom:-1.5rem}.pv6-xl{padding-top:1.5rem;padding-bottom:1.5rem}.mv6-xl{margin-top:1.5rem;margin-bottom:1.5rem}.nv6-xl{margin-top:-1.5rem;margin-bottom:-1.5rem}.ph6-xl{padding-left:1.5rem;padding-right:1.5rem}.mh6-xl{margin-left:1.5rem;margin-right:1.5rem}.nh6-xl{margin-left:-1.5rem;margin-right:-1.5rem}.pa7-xl{padding:2rem}.ma7-xl{margin:2rem}.na7-xl{margin:-2rem}.pl7-xl{padding-left:2rem}.ml7-xl{margin-left:2rem}.nl7-xl{margin-left:-2rem}.pr7-xl{padding-right:2rem}.mr7-xl{margin-right:2rem}.nr7-xl{margin-right:-2rem}.pt7-xl{padding-top:2rem}.mt7-xl{margin-top:2rem}.nt7-xl{margin-top:-2rem}.pb7-xl{padding-bottom:2rem}.mb7-xl{margin-bottom:2rem}.nb7-xl{margin-bottom:-2rem}.pv7-xl{padding-top:2rem;padding-bottom:2rem}.mv7-xl{margin-top:2rem;margin-bottom:2rem}.nv7-xl{margin-top:-2rem;margin-bottom:-2rem}.ph7-xl{padding-left:2rem;padding-right:2rem}.mh7-xl{margin-left:2rem;margin-right:2rem}.nh7-xl{margin-left:-2rem;margin-right:-2rem}.pa8-xl{padding:3rem}.ma8-xl{margin:3rem}.na8-xl{margin:-3rem}.pl8-xl{padding-left:3rem}.ml8-xl{margin-left:3rem}.nl8-xl{margin-left:-3rem}.pr8-xl{padding-right:3rem}.mr8-xl{margin-right:3rem}.nr8-xl{margin-right:-3rem}.pt8-xl{padding-top:3rem}.mt8-xl{margin-top:3rem}.nt8-xl{margin-top:-3rem}.pb8-xl{padding-bottom:3rem}.mb8-xl{margin-bottom:3rem}.nb8-xl{margin-bottom:-3rem}.pv8-xl{padding-top:3rem;padding-bottom:3rem}.mv8-xl{margin-top:3rem;margin-bottom:3rem}.nv8-xl{margin-top:-3rem;margin-bottom:-3rem}.ph8-xl{padding-left:3rem;padding-right:3rem}.mh8-xl{margin-left:3rem;margin-right:3rem}.nh8-xl{margin-left:-3rem;margin-right:-3rem}.pa9-xl{padding:4rem}.ma9-xl{margin:4rem}.na9-xl{margin:-4rem}.pl9-xl{padding-left:4rem}.ml9-xl{margin-left:4rem}.nl9-xl{margin-left:-4rem}.pr9-xl{padding-right:4rem}.mr9-xl{margin-right:4rem}.nr9-xl{margin-right:-4rem}.pt9-xl{padding-top:4rem}.mt9-xl{margin-top:4rem}.nt9-xl{margin-top:-4rem}.pb9-xl{padding-bottom:4rem}.mb9-xl{margin-bottom:4rem}.nb9-xl{margin-bottom:-4rem}.pv9-xl{padding-top:4rem;padding-bottom:4rem}.mv9-xl{margin-top:4rem;margin-bottom:4rem}.nv9-xl{margin-top:-4rem;margin-bottom:-4rem}.ph9-xl{padding-left:4rem;padding-right:4rem}.mh9-xl{margin-left:4rem;margin-right:4rem}.nh9-xl{margin-left:-4rem;margin-right:-4rem}.pa10-xl{padding:6rem}.ma10-xl{margin:6rem}.na10-xl{margin:-6rem}.pl10-xl{padding-left:6rem}.ml10-xl{margin-left:6rem}.nl10-xl{margin-left:-6rem}.pr10-xl{padding-right:6rem}.mr10-xl{margin-right:6rem}.nr10-xl{margin-right:-6rem}.pt10-xl{padding-top:6rem}.mt10-xl{margin-top:6rem}.nt10-xl{margin-top:-6rem}.pb10-xl{padding-bottom:6rem}.mb10-xl{margin-bottom:6rem}.nb10-xl{margin-bottom:-6rem}.pv10-xl{padding-top:6rem;padding-bottom:6rem}.mv10-xl{margin-top:6rem;margin-bottom:6rem}.nv10-xl{margin-top:-6rem;margin-bottom:-6rem}.ph10-xl{padding-left:6rem;padding-right:6rem}.mh10-xl{margin-left:6rem;margin-right:6rem}.nh10-xl{margin-left:-6rem;margin-right:-6rem}.pa11-xl{padding:10rem}.ma11-xl{margin:10rem}.na11-xl{margin:-10rem}.pl11-xl{padding-left:10rem}.ml11-xl{margin-left:10rem}.nl11-xl{margin-left:-10rem}.pr11-xl{padding-right:10rem}.mr11-xl{margin-right:10rem}.nr11-xl{margin-right:-10rem}.pt11-xl{padding-top:10rem}.mt11-xl{margin-top:10rem}.nt11-xl{margin-top:-10rem}.pb11-xl{padding-bottom:10rem}.mb11-xl{margin-bottom:10rem}.nb11-xl{margin-bottom:-10rem}.pv11-xl{padding-top:10rem;padding-bottom:10rem}.mv11-xl{margin-top:10rem;margin-bottom:10rem}.nv11-xl{margin-top:-10rem;margin-bottom:-10rem}.ph11-xl{padding-left:10rem;padding-right:10rem}.mh11-xl{margin-left:10rem;margin-right:10rem}.nh11-xl{margin-left:-10rem;margin-right:-10rem}.pa12-xl{padding:18rem}.ma12-xl{margin:18rem}.na12-xl{margin:-18rem}.pl12-xl{padding-left:18rem}.ml12-xl{margin-left:18rem}.nl12-xl{margin-left:-18rem}.pr12-xl{padding-right:18rem}.mr12-xl{margin-right:18rem}.nr12-xl{margin-right:-18rem}.pt12-xl{padding-top:18rem}.mt12-xl{margin-top:18rem}.nt12-xl{margin-top:-18rem}.pb12-xl{padding-bottom:18rem}.mb12-xl{margin-bottom:18rem}.nb12-xl{margin-bottom:-18rem}.pv12-xl{padding-top:18rem;padding-bottom:18rem}.mv12-xl{margin-top:18rem;margin-bottom:18rem}.nv12-xl{margin-top:-18rem;margin-bottom:-18rem}.ph12-xl{padding-left:18rem;padding-right:18rem}.mh12-xl{margin-left:18rem;margin-right:18rem}.nh12-xl{margin-left:-18rem;margin-right:-18rem}.top-0-xl{top:0}.right-0-xl{right:0}.bottom-0-xl{bottom:0}.left-0-xl{left:0}.top-1-xl{top:1rem}.right-1-xl{right:1rem}.bottom-1-xl{bottom:1rem}.left-1-xl{left:1rem}.top-2-xl{top:2rem}.right-2-xl{right:2rem}.bottom-2-xl{bottom:2rem}.left-2-xl{left:2rem}.top--1-xl{top:-1rem}.right--1-xl{right:-1rem}.bottom--1-xl{bottom:-1rem}.left--1-xl{left:-1rem}.top--2-xl{top:-2rem}.right--2-xl{right:-2rem}.bottom--2-xl{bottom:-2rem}.left--2-xl{left:-2rem}.absolute--fill-xl{top:0;right:0;bottom:0;left:0}.cf-xl:after,.cf-xl:before{content:" ";display:table}.cf-xl:after{clear:both}.cf-xl{*zoom:1}.cl-xl{clear:left}.cr-xl{clear:right}.cb-xl{clear:both}.cn-xl{clear:none}.dn-xl{display:none}.di-xl{display:inline}.db-xl{display:block}.dib-xl{display:inline-block}.dit-xl{display:inline-table}.dt-xl{display:table}.dtc-xl{display:table-cell}.dt-row-xl{display:table-row}.dt-row-group-xl{display:table-row-group}.dt-column-xl{display:table-column}.dt-column-group-xl{display:table-column-group}.dt--fixed-xl{table-layout:fixed;width:100%}.flex-xl{display:flex}.inline-flex-xl{display:inline-flex}.flex-auto-xl{flex:1 1 auto;min-width:0;min-height:0}.flex-none-xl{flex:none}.flex-column-xl{flex-direction:column}.flex-row-xl{flex-direction:row}.flex-wrap-xl{flex-wrap:wrap}.flex-nowrap-xl{flex-wrap:nowrap}.flex-wrap-reverse-xl{flex-wrap:wrap-reverse}.flex-column-reverse-xl{flex-direction:column-reverse}.flex-row-reverse-xl{flex-direction:row-reverse}.items-start-xl{align-items:flex-start}.items-end-xl{align-items:flex-end}.items-center-xl{align-items:center}.items-baseline-xl{align-items:baseline}.items-stretch-xl{align-items:stretch}.self-start-xl{align-self:flex-start}.self-end-xl{align-self:flex-end}.self-center-xl{align-self:center}.self-baseline-xl{align-self:baseline}.self-stretch-xl{align-self:stretch}.justify-start-xl{justify-content:flex-start}.justify-end-xl{justify-content:flex-end}.justify-center-xl{justify-content:center}.justify-between-xl{justify-content:space-between}.justify-around-xl{justify-content:space-around}.content-start-xl{align-content:flex-start}.content-end-xl{align-content:flex-end}.content-center-xl{align-content:center}.content-between-xl{align-content:space-between}.content-around-xl{align-content:space-around}.content-stretch-xl{align-content:stretch}.order-0-xl{order:0}.order-1-xl{order:1}.order-2-xl{order:2}.order-3-xl{order:3}.order-4-xl{order:4}.order-5-xl{order:5}.order-6-xl{order:6}.order-7-xl{order:7}.order-8-xl{order:8}.order-last-xl{order:99999}.flex-grow-0-xl{flex-grow:0}.flex-grow-1-xl{flex-grow:1}.flex-shrink-0-xl{flex-shrink:0}.flex-shrink-1-xl{flex-shrink:1}.fl-xl{float:left}.fl-xl,.fr-xl{_display:inline}.fr-xl{float:right}.fn-xl{float:none}.i-xl{font-style:italic}.fs-normal-xl{font-style:normal}.normal-xl{font-weight:400}.b-xl{font-weight:700}.fw1-xl{font-weight:100}.fw2-xl{font-weight:200}.fw3-xl{font-weight:300}.fw4-xl{font-weight:400}.fw5-xl{font-weight:500}.fw6-xl{font-weight:600}.fw7-xl{font-weight:700}.fw8-xl{font-weight:800}.fw9-xl{font-weight:900}.h1-xl{height:1rem}.h2-xl{height:2rem}.h3-xl{height:4rem}.h4-xl{height:8rem}.h5-xl{height:16rem}.h-25-xl{height:25%}.h-50-xl{height:50%}.h-75-xl{height:75%}.h-100-xl{height:100%}.min-h-100-xl{min-height:100%}.vh-25-xl{height:25vh}.vh-50-xl{height:50vh}.vh-75-xl{height:75vh}.vh-100-xl{height:100vh}.min-vh-100-xl{min-height:100vh}.h-auto-xl{height:auto}.h-inherit-xl{height:inherit}.tracked-xl{letter-spacing:.1em}.tracked-tight-xl{letter-spacing:-.05em}.tracked-mega-xl{letter-spacing:.25em}.lh-solid-xl{line-height:1.333333}.lh-title-xl{line-height:1.5}.lh-copy-xl{line-height:1.666666}.mw1-xl{max-width:1rem}.mw2-xl{max-width:2rem}.mw3-xl{max-width:4rem}.mw4-xl{max-width:8rem}.mw5-xl{max-width:16rem}.mw6-xl{max-width:32rem}.mw7-xl{max-width:48rem}.mw8-xl{max-width:64rem}.mw9-xl{max-width:96rem}.mw-none-xl{max-width:none}.mw-100-xl{max-width:100%}.o-100-xl{opacity:1}.o-90-xl{opacity:.9}.o-80-xl{opacity:.8}.o-70-xl{opacity:.7}.o-60-xl{opacity:.6}.o-50-xl{opacity:.5}.o-40-xl{opacity:.4}.o-30-xl{opacity:.3}.o-20-xl{opacity:.2}.o-10-xl{opacity:.1}.o-05-xl{opacity:.05}.o-025-xl{opacity:.025}.o-0-xl{opacity:0}.rotate-45-xl{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.rotate-90-xl{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.rotate-135-xl{-webkit-transform:rotate(135deg);transform:rotate(135deg)}.rotate-180-xl{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rotate-225-xl{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.rotate-270-xl{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.rotate-315-xl{-webkit-transform:rotate(315deg);transform:rotate(315deg)}.outline-xl{outline:1px solid}.outline-transparent-xl{outline:1px solid transparent}.outline-0-xl{outline:0}.overflow-visible-xl{overflow:visible}.overflow-hidden-xl{overflow:hidden}.overflow-scroll-xl{overflow:scroll}.overflow-auto-xl{overflow:auto}.overflow-x-visible-xl{overflow-x:visible}.overflow-x-hidden-xl{overflow-x:hidden}.overflow-x-scroll-xl{overflow-x:scroll}.overflow-x-auto-xl{overflow-x:auto}.overflow-y-visible-xl{overflow-y:visible}.overflow-y-hidden-xl{overflow-y:hidden}.overflow-y-scroll-xl{overflow-y:scroll}.overflow-y-auto-xl{overflow-y:auto}.static-xl{position:static}.relative-xl{position:relative}.absolute-xl{position:absolute}.fixed-xl{position:fixed}.strike-xl{text-decoration:line-through}.underline-xl{text-decoration:underline}.no-underline-xl{text-decoration:none}.tl-xl{text-align:left}.tr-xl{text-align:right}.tc-xl{text-align:center}.tj-xl{text-align:justify}.ttc-xl{text-transform:capitalize}.ttl-xl{text-transform:lowercase}.ttu-xl{text-transform:uppercase}.ttn-xl{text-transform:none}.f1-xl{font-size:4.5rem}.f2-xl{font-size:4rem}.f3-xl{font-size:3rem}.f4-xl{font-size:2rem}.f5-xl{font-size:1.5rem}.f6-xl{font-size:1.125rem}.f7-xl{font-size:1rem}.f8-xl{font-size:.875rem}.f9-xl{font-size:.75rem}.measure-xl{max-width:30em}.measure-wide-xl{max-width:34em}.measure-narrow-xl{max-width:20em}.small-caps-xl{font-variant:small-caps}.indent-xl{text-indent:1em;margin-top:0;margin-bottom:0}.truncate-xl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clip-xl{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ws-normal-xl{white-space:normal}.nowrap-xl{white-space:nowrap}.pre-xl{white-space:pre}.w1-xl{width:1rem}.w2-xl{width:2rem}.w3-xl{width:4rem}.w4-xl{width:8rem}.w5-xl{width:16rem}.w-10-xl{width:10%}.w-20-xl{width:20%}.w-25-xl{width:25%}.w-30-xl{width:30%}.w-33-xl{width:33%}.w-34-xl{width:34%}.w-40-xl{width:40%}.w-50-xl{width:50%}.w-60-xl{width:60%}.w-70-xl{width:70%}.w-75-xl{width:75%}.w-80-xl{width:80%}.w-90-xl{width:90%}.w-100-xl{width:100%}.w-third-xl{width:33.33333%}.w-two-thirds-xl{width:66.66667%}.w-auto-xl{width:auto}} \ No newline at end of file diff --git a/pkg/btc-wallet/src/index.js b/pkg/btc-wallet/src/index.js new file mode 100644 index 0000000000..64f6a05261 --- /dev/null +++ b/pkg/btc-wallet/src/index.js @@ -0,0 +1,25 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import { Root } from './js/components/root.js'; +import { api } from './js/api.js'; +import { subscription } from "./js/subscription.js"; + +import './css/indigo-static.css'; +import './css/fonts.css'; +import './css/custom.css'; + +// rebuild x3 + +window.NETWORK = 'testnet'; // 'bitcoin' + +const channel = new window.channel(); +api.setChannel(window.ship, channel); + + +if (module.hot) { + module.hot.accept() +} + +ReactDOM.render(( + +), document.querySelectorAll("#root")[0]); diff --git a/pkg/btc-wallet/src/js/api.js b/pkg/btc-wallet/src/js/api.js new file mode 100644 index 0000000000..3de39b6ea3 --- /dev/null +++ b/pkg/btc-wallet/src/js/api.js @@ -0,0 +1,52 @@ +import _ from 'lodash'; + +class UrbitApi { + setChannel(ship, channel) { + this.ship = ship; + this.channel = channel; + this.bindPaths = []; + } + + bind(path, method, ship = this.ship, appl = "btc-wallet", success, fail) { + this.bindPaths = _.uniq([...this.bindPaths, path]); + + window.subscriptionId = this.channel.subscribe(ship, appl, path, + (err) => { + fail(err); + }, + (event) => { + success({ + data: event, + from: { + ship, + path + } + }); + }, + (err) => { + fail(err); + }); + } + + btcWalletCommand(data) { + return this.action("btc-wallet", "btc-wallet-command", data); + } + + settingsEvent(data) { + return this.action("settings-store", "settings-event", data); + } + + action(appl, mark, data) { + return new Promise((resolve, reject) => { + this.channel.poke(ship, appl, mark, data, + (json) => { + resolve(json); + }, + (err) => { + reject(err); + }); + }); + } +} +export let api = new UrbitApi(); +window.api = api; diff --git a/pkg/btc-wallet/src/js/components/lib/balance.js b/pkg/btc-wallet/src/js/components/lib/balance.js new file mode 100644 index 0000000000..655b1b5142 --- /dev/null +++ b/pkg/btc-wallet/src/js/components/lib/balance.js @@ -0,0 +1,149 @@ +import React, { Component } from 'react'; +import { + Box, + Icon, + Row, + Text, + Button, + Col, +} from '@tlon/indigo-react'; + +import Send from './send.js' +import CurrencyPicker from './currencyPicker.js' +import { currencyToSats, satsToCurrency } from '../../lib/util.js'; + + +export default class Balance extends Component { + constructor(props) { + super(props); + + this.state = { + sending: false, + copiedButton: false, + copiedString: false, + } + + this.copyAddress = this.copyAddress.bind(this); + } + + copyAddress(arg) { + let address = this.props.state.address; + function listener(e) { + e.clipboardData.setData('text/plain', address); + e.preventDefault(); + } + + document.addEventListener('copy', listener); + document.execCommand('copy'); + document.removeEventListener('copy', listener); + + this.props.api.btcWalletCommand({'gen-new-address': null}); + + if (arg === 'button'){ + this.setState({copiedButton: true}); + setTimeout(() => { this.setState({copiedButton: false}); }, 2000); + } else if (arg === 'string') { + this.setState({copiedString: true}); + setTimeout(() => { this.setState({copiedString: false}); }, 2000); + } + } + + + render() { + const sats = (this.props.state.confirmedBalance || 0); + const unconfirmedSats = this.props.state.unconfirmedBalance; + + const unconfirmedString = unconfirmedSats ? ` (${unconfirmedSats}) ` : ''; + + const denomination = this.props.state.denomination; + const value = satsToCurrency(sats, denomination, this.props.state.currencyRates); + const sendDisabled = (sats === 0); + const addressText = (this.props.state.address === null) ? '' : + this.props.state.address.slice(0, 6) + '...' + + this.props.state.address.slice(-6); + + const conversion = this.props.state.currencyRates[denomination].last; + + return ( + <> + {this.state.sending ? + { + this.setState({sending: false}); + store.handleEvent({data: {psbt: '', fee: 0, error: '', "broadcast-fail": null}}); + }} + /> : + + + Balance + {this.copyAddress('string')}}> + {this.state.copiedString ? "copied" : addressText} + + + + + + {value} + + {`${sats}${unconfirmedString} sats`} + + + + + ) : ( - + - Welcome - - You have been invited to use Landscape, an interface to chat + Welcome + + You have been invited to use Landscape, an interface to chat and interact with communities
Would you like a tour of Landscape?
- + + } > - {children} - - {time && notification && ( - - - - )} - - + {children} + + {notification && ( + + + + )} + + + ); } export function Notification(props: NotificationProps) { - const { notification, associations, archived } = props; - const { read, contents, time } = notification.notification; + const { notification, unread } = props; + const { contents, time } = notification.notification; const wrapperProps = { notification, + read: !unread, time: props.time, - api: props.api, + api: props.api }; - if ("graph" in notification.index) { + if ('graph' in notification.index) { const index = notification.index.graph; const c: GraphNotificationContents = (contents as any).graph; @@ -153,15 +157,14 @@ export function Notification(props: NotificationProps) { api={props.api} index={index} contents={c} - read={read} - archived={archived} + read={!unread} timebox={props.time} time={time} /> ); } - if ("group" in notification.index) { + if ('group' in notification.index) { const index = notification.index.group; const c: GroupNotificationContents = (contents as any).group; return ( @@ -170,9 +173,8 @@ export function Notification(props: NotificationProps) { api={props.api} index={index} contents={c} - read={read} + read={!unread} timebox={props.time} - archived={archived} time={time} /> diff --git a/pkg/interface/src/views/apps/notifications/notifications.tsx b/pkg/interface/src/views/apps/notifications/notifications.tsx index cb916dd684..bfef8998e3 100644 --- a/pkg/interface/src/views/apps/notifications/notifications.tsx +++ b/pkg/interface/src/views/apps/notifications/notifications.tsx @@ -1,21 +1,15 @@ -import React, { useCallback, useState, useRef, ReactElement } from 'react'; -import _ from 'lodash'; -import { Link, Switch, Route } from 'react-router-dom'; +import { Box, Col, Icon, Row, Text } from '@tlon/indigo-react'; +import React, { ReactElement, useCallback, useRef, useState } from 'react'; import Helmet from 'react-helmet'; - -import { Box, Icon, Col, Text, Row } from '@tlon/indigo-react'; - -import { Body } from '~/views/components/Body'; -import { PropFunc } from '~/types/util'; -import Inbox from './inbox'; -import { Dropdown } from '~/views/components/Dropdown'; -import { FormikOnBlur } from '~/views/components/FormikOnBlur'; -import GroupSearch from '~/views/components/GroupSearch'; -import { useTutorialModal } from '~/views/components/useTutorialModal'; +import { Link, Route, Switch } from 'react-router-dom'; +import useGroupState from '~/logic/state/group'; import useHarkState from '~/logic/state/hark'; import useMetadataState from '~/logic/state/metadata'; -import useGroupState from '~/logic/state/group'; -import {StatelessAsyncAction} from '~/views/components/StatelessAsyncAction'; +import { PropFunc } from '~/types/util'; +import { Body } from '~/views/components/Body'; +import { StatelessAsyncAction } from '~/views/components/StatelessAsyncAction'; +import { useTutorialModal } from '~/views/components/useTutorialModal'; +import Inbox from './inbox'; const baseUrl = '/~notifications'; @@ -29,7 +23,7 @@ const HeaderLink = React.forwardRef(( return ( - + ); }); @@ -73,32 +67,33 @@ export default function NotificationsScreen(props: any): ReactElement { - + Notifications Mark All Read - + @@ -106,8 +101,8 @@ export default function NotificationsScreen(props: any): ReactElement { {!view && } + filter={filter.groups} + />} diff --git a/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx b/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx index c84630ff78..6d888956aa 100644 --- a/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx +++ b/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx @@ -1,18 +1,19 @@ -import React from "react"; -import { Anchor, Icon, Box, Row, Col, Text } from "@tlon/indigo-react"; -import ChatMessage from "../chat/components/ChatMessage"; -import { Association, GraphNode, Post, Group } from "@urbit/api"; -import { useGroupForAssoc } from "~/logic/state/group"; -import { MentionText } from "~/views/components/MentionText"; -import Author from "~/views/components/Author"; -import { NoteContent } from "../publish/components/Note"; -import { PostContent } from "~/views/landscape/components/Home/Post/PostContent"; -import bigInt from "big-integer"; -import { getSnippet } from "~/logic/lib/publish"; -import { NotePreviewContent } from "../publish/components/NotePreview"; -import GlobalApi from "~/logic/api/global"; -import {PermalinkEmbed} from "./embed"; -import {referenceToPermalink} from "~/logic/lib/permalinks"; +/* eslint-disable no-case-declarations */ +/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */ +import { Anchor, Box, Col, Icon, Row, Text } from '@tlon/indigo-react'; +import { Association, GraphConfig, GraphNode, Group, Post, ReferenceContent, TextContent, UrlContent } from '@urbit/api'; +import bigInt from 'big-integer'; +import React from 'react'; +import GlobalApi from '~/logic/api/global'; +import { referenceToPermalink } from '~/logic/lib/permalinks'; +import { getSnippet } from '~/logic/lib/publish'; +import { useGroupForAssoc } from '~/logic/state/group'; +import Author from '~/views/components/Author'; +import { MentionText } from '~/views/components/MentionText'; +import { GraphContent } from '~/views/landscape/components/Graph/GraphContent'; +import ChatMessage from '../chat/components/ChatMessage'; +import { NotePreviewContent } from '../publish/components/NotePreview'; +import { PermalinkEmbed } from './embed'; function TranscludedLinkNode(props: { node: GraphNode; @@ -21,25 +22,64 @@ function TranscludedLinkNode(props: { api: GlobalApi; }) { const { node, api, assoc, transcluded } = props; - const idx = node.post.index.slice(1).split("/"); + const idx = node?.post?.index?.slice(1)?.split('/') ?? []; + + if (typeof node?.post === 'string') { + return ( + + This link has been deleted. + + ); + } switch (idx.length) { case 1: - const [{ text }, link] = node.post.contents; + const [{ text }, link] = node.post.contents as [TextContent, UrlContent | ReferenceContent]; if('reference' in link) { const permalink = referenceToPermalink(link).link; - return - + return ; } - + return ( - - - - {text} - + + + + + + {text} + + ); + case 2: return ( + This comment has been deleted. + + ); + } + const group = useGroupForAssoc(assoc)!; const comment = node.children?.peekLargest()![1]!; return ( - - + @@ -93,27 +152,46 @@ function TranscludedPublishNode(props: { }) { const { node, assoc, transcluded, api } = props; const group = useGroupForAssoc(assoc)!; - const idx = node.post.index.slice(1).split("/"); + + if (typeof node?.post === 'string') { + return ( + + This note has been deleted. + + ); + } + + const idx = node?.post?.index?.slice(1)?.split('/') ?? []; switch (idx.length) { case 1: const post = node.children ?.get(bigInt.one) ?.children?.peekLargest()?.[1]!; return ( - + - - {post.post.contents[0]?.text} + + {(post.post.contents[0] as TextContent)?.text} - + @@ -137,19 +215,39 @@ export function TranscludedPost(props: { post: Post; api: GlobalApi; transcluded: number; + commentsCount?: number; group: Group; }) { - const { transcluded, post, group, api } = props; + const { transcluded, post, group, commentsCount, api } = props; + + if (typeof post === 'string') { + return ( + + This post has been deleted. + + ); + } + return ( - + + {commentsCount >= 1 ? + + + {commentsCount} {commentsCount === 1 ? 'reply' : 'replies'} + + + : null} ); } @@ -168,40 +273,56 @@ export function TranscludedNode(props: { api: GlobalApi; showOurContact?: boolean; }) { - const { node, showOurContact, assoc, transcluded } = props; + const { node, showOurContact, assoc, transcluded, api } = props; const group = useGroupForAssoc(assoc)!; - switch (assoc.metadata.config.graph) { - case "chat": + + if ( + typeof node?.post === 'string' && + (assoc.metadata.config as GraphConfig).graph === 'chat' + ) { + return ( + + This message has been deleted. + + ); + } + + switch ((assoc.metadata.config as GraphConfig).graph) { + case 'chat': return ( ); - case "publish": + case 'publish': return ; - case "link": + case 'link': return ; - case "post": + case 'post': return ( ) ; default: diff --git a/pkg/interface/src/views/apps/permalinks/app.tsx b/pkg/interface/src/views/apps/permalinks/app.tsx index c85778e69b..2d737b0a42 100644 --- a/pkg/interface/src/views/apps/permalinks/app.tsx +++ b/pkg/interface/src/views/apps/permalinks/app.tsx @@ -1,26 +1,21 @@ -import React, { useCallback } from "react"; - -import useMetadataState from "~/logic/state/metadata"; -import useGroupState from "~/logic/state/group"; +import { Association, GraphConfig } from '@urbit/api'; +import React, { useCallback } from 'react'; import { - Switch, - Route, - Redirect, - useLocation, - useParams, -} from "react-router-dom"; -import { makeResource, Association } from "@urbit/api"; -import { getGraphPermalink } from "./graphIndex"; -import { useQuery } from "~/logic/lib/useQuery"; -import useGraphState from "~/logic/state/graph"; + Redirect, Route, Switch +} from 'react-router-dom'; +import { useQuery } from '~/logic/lib/useQuery'; +import useGraphState from '~/logic/state/graph'; +import useGroupState from '~/logic/state/group'; +import useMetadataState from '~/logic/state/metadata'; +import { getGraphPermalink } from './graphIndex'; interface ResourceRouteProps { ship: string; name: string; } -export function PermalinkRoutes(props: {}) { - const groups = useGroupState((s) => s.groups); +export function PermalinkRoutes(props: unknown) { + const groups = useGroupState(s => s.groups); const { query, toQuery } = useQuery(); return ( @@ -52,8 +47,8 @@ export function PermalinkRoutes(props: {}) { function FallbackRoutes(props: { query: URLSearchParams }) { const { query } = props; - if (query.has("ext")) { - const ext = query.get("ext")!; + if (query.has('ext')) { + const ext = query.get('ext')!; const url = `/perma${ext.slice(16)}`; console.log(url); return ; @@ -65,7 +60,7 @@ function FallbackRoutes(props: { query: URLSearchParams }) { function GroupRoutes(props: { group: string; url: string }) { const { group, url } = props; const makePath = (s: string) => url + s; - const associations = useMetadataState((s) => s.associations); + const associations = useMetadataState(s => s.associations); const graphKeys = useGraphState(s => s.graphKeys); const { toQuery } = useQuery(); const groupUrl = `/~landscape${group}`; @@ -73,9 +68,9 @@ function GroupRoutes(props: { group: string; url: string }) { return ( { - const { ship, name } = match.params as ResourceRouteProps; + const { ship, name } = match.params as unknown as ResourceRouteProps; const path = `/ship/${ship}/${name}`; const association = associations.graph[path]; const { url: routeUrl } = match; @@ -87,9 +82,9 @@ function GroupRoutes(props: { group: string; url: string }) { return ; + />; } return null; } @@ -99,7 +94,7 @@ function GroupRoutes(props: { group: string; url: string }) { /> { return ; }} @@ -113,10 +108,10 @@ export function GraphIndexRoutes(props: { url: string; index?: string; }) { - const { index = "", association, url } = props; + const { index = '', association, url } = props; const makePath = (s: string) => url + s; const group = useGroupState( - useCallback((s) => s.groups[association.group], [association]) + useCallback(s => s.groups[association.group], [association]) ); if(!group) { @@ -126,7 +121,7 @@ export function GraphIndexRoutes(props: { return ( { const newIndex = `${index}/${match.params.id}`; const { url: newUrl } = match; @@ -139,7 +134,7 @@ export function GraphIndexRoutes(props: { ); }} /> - + diff --git a/pkg/interface/src/views/apps/permalinks/embed.tsx b/pkg/interface/src/views/apps/permalinks/embed.tsx index 2f7c8e11cc..56c1849444 100644 --- a/pkg/interface/src/views/apps/permalinks/embed.tsx +++ b/pkg/interface/src/views/apps/permalinks/embed.tsx @@ -1,29 +1,59 @@ -import React, { useCallback, useEffect, useState } from "react"; +import { BaseAnchor, Box, Center, Col, Icon, Row, Text } from '@tlon/indigo-react'; +import { Association, GraphNode, resourceFromPath, GraphConfig } from '@urbit/api'; +import React, { useCallback, useEffect, useState } from 'react'; +import _ from 'lodash'; +import { useHistory, useLocation } from 'react-router-dom'; +import GlobalApi from '~/logic/api/global'; import { - parsePermalink, - GraphPermalink as IGraphPermalink, - getPermalinkForGraph, - usePermalinkForGraph, -} from "~/logic/lib/permalinks"; -import { - Action, - Box, - Text, - BaseAnchor, - Row, - Icon, - Col, -} from "@tlon/indigo-react"; -import { GroupLink } from "~/views/components/GroupLink"; -import GlobalApi from "~/logic/api/global"; -import { getModuleIcon } from "~/logic/lib/util"; -import useMetadataState from "~/logic/state/metadata"; -import { Association, resourceFromPath } from "@urbit/api"; -import { Link } from "react-router-dom"; -import useGraphState from "~/logic/state/graph"; -import { GraphNodeContent } from "../notifications/graph"; -import { TranscludedNode } from "./TranscludedNode"; -import {useVirtualResizeProp} from "~/logic/lib/virtualContext"; + getPermalinkForGraph, GraphPermalink as IGraphPermalink, parsePermalink +} from '~/logic/lib/permalinks'; +import { getModuleIcon, GraphModule } from '~/logic/lib/util'; +import { useVirtualResizeProp } from '~/logic/lib/virtualContext'; +import useGraphState from '~/logic/state/graph'; +import useMetadataState from '~/logic/state/metadata'; +import { GroupLink } from '~/views/components/GroupLink'; +import { TranscludedNode } from './TranscludedNode'; + +function Placeholder(type) { + const lines = (type) => { + switch (type) { + case 'publish': + return 5; + case 'post': + return 3; + default: + return 1; + } + }; + return ( + + + + + + {_.times(lines(type), i => ( + + + + ))} + + ); +} function GroupPermalink(props: { group: string; api: GlobalApi }) { const { group, api } = props; @@ -31,9 +61,9 @@ function GroupPermalink(props: { group: string; api: GlobalApi }) { ); @@ -48,70 +78,115 @@ function GraphPermalink( full?: boolean; } ) { - const { full = false, showOurContact, pending, link, graph, group, index, api, transcluded } = props; + const { full = false, showOurContact, pending, graph, group, index, api, transcluded } = props; + const history = useHistory(); + const location = useLocation(); const { ship, name } = resourceFromPath(graph); const node = useGraphState( - useCallback((s) => s.looseNodes?.[`${ship.slice(1)}/${name}`]?.[index], [ + useCallback(s => s.looseNodes?.[`${ship.slice(1)}/${name}`]?.[index] as GraphNode, [ graph, - index, + index ]) ); const [errored, setErrored] = useState(false); + const [loading, setLoading] = useState(false); const association = useMetadataState( - useCallback((s) => s.associations.graph[graph] as Association | null, [ - graph, + useCallback(s => s.associations.graph[graph] as Association | null, [ + graph ]) ); - useVirtualResizeProp(node) + useVirtualResizeProp(Boolean(node)); useEffect(() => { (async () => { if (pending || !index) { return; } try { + setLoading(true); await api.graph.getNode(ship, name, index); + setLoading(false); } catch (e) { console.log(e); + setLoading(false); setErrored(true); } })(); }, [pending, graph, index]); - const showTransclusion = !!(association && node && transcluded < 1); + const showTransclusion = Boolean(association && node && transcluded < 1); const permalink = getPermalinkForGraph(group, graph, index); + const navigate = (e) => { + e.stopPropagation(); + history.push(`/perma${permalink.slice(16)}`); + }; + + const [nodeGroupHost, nodeGroupName] = association?.group.split('/').slice(-2) ?? ['Unknown', 'Unknown']; + const [nodeChannelHost, nodeChannelName] = association?.resource + .split('/') + .slice(-2) ?? ['Unknown', 'Unknown']; + const [ + locChannelName, + locChannelHost, + , + , + , + locGroupName, + locGroupHost + ] = location.pathname.split('/').reverse(); + + const isInSameResource = + locChannelHost === nodeChannelHost && + locChannelName === nodeChannelName && + locGroupName === nodeGroupName && + locGroupHost === nodeGroupHost; + return ( { e.stopPropagation(); }} + borderRadius={2} + cursor="pointer" + onClick={(e) => { + navigate(e); + }} > - {showTransclusion && index && ( - - - + {loading && association && !errored && Placeholder((association.metadata.config as GraphConfig).graph)} + {showTransclusion && index && !loading && ( + )} - {!!association ? ( + {association && !isInSameResource && !loading && ( - ) : ( + )} + {association && isInSameResource && transcluded === 2 && !loading && ( + + )} + {isInSameResource && transcluded !== 2 && !loading && } + {!association && !loading && ( @@ -125,16 +200,13 @@ function PermalinkDetails(props: { icon: any; permalink: string; showTransclusion?: boolean; + showDetails?: boolean; known?: boolean; }) { - const { title, icon, permalink, known, showTransclusion } = props; + const { title, icon, known, showTransclusion } = props; const rowTransclusionStyle = showTransclusion - ? { - borderTop: "1", - borderTopColor: "lightGray", - my: "1", - } - : {}; + ? { p: '12px 12px 11px 11px' } + : { p: '12px' }; return ( - - + +
+ +
+
+ {title}
- - Go to link -
); } @@ -165,6 +236,7 @@ export function PermalinkEmbed(props: { transcluded: number; showOurContact?: boolean; full?: boolean; + pending?: any; }) { const permalink = parsePermalink(props.link); @@ -173,9 +245,9 @@ export function PermalinkEmbed(props: { } switch (permalink.type) { - case "group": + case 'group': return ; - case "graph": + case 'graph': return ( { if (i === 0) { - return {...acc, pathname: `${acc.pathname}/note/${val}` }; + return { ...acc, pathname: `${acc.pathname}/note/${val}` }; } else if (i === 1 && val === '2') { isComment = true; return acc; @@ -69,16 +68,16 @@ function getLinkPermalink( assoc: Association, index: string ) { - const idx = index.split("/").slice(1); + const idx = index.split('/').slice(1); const base = `${groupPath}/resource/link${assoc.resource}`; const res = _.reduce( idx, (acc, val, i) => { console.log(acc); if (i === 0) { - return {...acc, pathname: `${acc.pathname}/index/${val}` }; + return { ...acc, pathname: `${acc.pathname}/index/${val}` }; } else if (i === 1) { - return {...acc, search: `?selected=${val}` }; + return { ...acc, search: `?selected=${val}` }; } return acc; }, @@ -92,7 +91,7 @@ function getChatPermalink( assoc: Association, index: string ) { - const idx = index.split("/").slice(1); + const idx = index.split('/').slice(1); if (idx.length === 0) { return `${groupPath}/resource/chat${assoc.resource}`; } diff --git a/pkg/interface/src/views/apps/profile/components/EditProfile.tsx b/pkg/interface/src/views/apps/profile/components/EditProfile.tsx index d053007d29..4b591a64c6 100644 --- a/pkg/interface/src/views/apps/profile/components/EditProfile.tsx +++ b/pkg/interface/src/views/apps/profile/components/EditProfile.tsx @@ -1,32 +1,26 @@ -import React, { ReactElement, useRef, useState } from 'react'; -import * as Yup from 'yup'; -import _ from 'lodash'; -import { Formik } from 'formik'; -import { useHistory } from 'react-router-dom'; - import { - ManagedForm as Form, - ManagedTextInputField as Input, - ManagedCheckboxField as Checkbox, - Col, - Text, - Row, - Button -} from '@tlon/indigo-react'; + Button, Col, ManagedCheckboxField as Checkbox, ManagedForm as Form, + ManagedTextInputField as Input, + Row, Text +} from '@tlon/indigo-react'; +import { Formik } from 'formik'; +import _ from 'lodash'; +import React, { ReactElement, useState } from 'react'; +import { useHistory } from 'react-router-dom'; +import * as Yup from 'yup'; +import { resourceFromPath } from '~/logic/lib/group'; import { uxToHex } from '~/logic/lib/util'; +import useContactState from '~/logic/state/contact'; +import { MarkdownField } from '~/views/apps/publish/components/MarkdownField'; import { AsyncButton } from '~/views/components/AsyncButton'; import { ColorInput } from '~/views/components/ColorInput'; -import { ImageInput } from '~/views/components/ImageInput'; -import { MarkdownField } from '~/views/apps/publish/components/MarkdownField'; -import { resourceFromPath } from '~/logic/lib/group'; import GroupSearch from '~/views/components/GroupSearch'; -import useContactState from '~/logic/state/contact'; +import { ImageInput } from '~/views/components/ImageInput'; import { - ProfileHeader, - ProfileControls, - ProfileStatus, - ProfileImages + ProfileControls, ProfileHeader, + + ProfileImages, ProfileStatus } from './Profile'; const formSchema = Yup.object({ @@ -67,7 +61,7 @@ export function ProfileHeaderImageEdit(props: any): ReactElement { ) : ( - { diff --git a/pkg/interface/src/views/apps/profile/components/Profile.tsx b/pkg/interface/src/views/apps/profile/components/Profile.tsx index 3d35126d3c..f98794e580 100644 --- a/pkg/interface/src/views/apps/profile/components/Profile.tsx +++ b/pkg/interface/src/views/apps/profile/components/Profile.tsx @@ -1,22 +1,22 @@ -import React, { ReactElement, useEffect, useRef, useState } from 'react'; +import { BaseImage, Box, Center, Row, Text } from '@tlon/indigo-react'; +import React, { ReactElement, useEffect, useRef } from 'react'; import { useHistory } from 'react-router-dom'; -import { Center, Box, Row, BaseImage, Text } from '@tlon/indigo-react'; -import RichText from '~/views/components/RichText'; -import useSettingsState, { selectCalmState } from '~/logic/state/settings'; import { Sigil } from '~/logic/lib/sigil'; -import { ViewProfile } from './ViewProfile'; -import { EditProfile } from './EditProfile'; -import { SetStatusBarModal } from '~/views/components/SetStatusBarModal'; import { uxToHex } from '~/logic/lib/util'; -import { useTutorialModal } from '~/views/components/useTutorialModal'; import useContactState from '~/logic/state/contact'; +import useSettingsState, { selectCalmState } from '~/logic/state/settings'; +import RichText from '~/views/components/RichText'; +import { SetStatusBarModal } from '~/views/components/SetStatusBarModal'; +import { useTutorialModal } from '~/views/components/useTutorialModal'; +import { EditProfile } from './EditProfile'; +import { ViewProfile } from './ViewProfile'; export function ProfileHeader(props: any): ReactElement { return ( @@ -27,10 +27,10 @@ export function ProfileHeader(props: any): ReactElement { export function ProfileImages(props: any): ReactElement { const { hideAvatars } = useSettingsState(selectCalmState); - const { contact, hideCover, ship } = { ...props }; + const { contact, hideCover, ship } = props; const hexColor = contact?.color ? `#${uxToHex(contact.color)}` : '#000000'; - const anchorRef = useRef(null) + const anchorRef = useRef(null); useTutorialModal('profile', ship === `~${window.ship}`, anchorRef); @@ -76,7 +76,7 @@ export function ProfileImages(props: any): ReactElement { + {props.children} ); } export function ProfileStatus(props: any): ReactElement { - const { contact } = { ...props }; + const { contact } = props; return ( {ship === `~${window.ship}` ? ( <> { @@ -138,14 +138,15 @@ export function ProfileActions(props: any): ReactElement { + display={['none','inline']} + > {isPublic ? ' Public' : ' Private'} Profile history.push(`/~landscape/dm/${ship.substring(1)}`)} + onClick={() => history.push(`/~landscape/messages/dm/${ship}`)} > Message diff --git a/pkg/interface/src/views/apps/profile/components/SetStatus.tsx b/pkg/interface/src/views/apps/profile/components/SetStatus.tsx index a19ca2253f..af66a6395b 100644 --- a/pkg/interface/src/views/apps/profile/components/SetStatus.tsx +++ b/pkg/interface/src/views/apps/profile/components/SetStatus.tsx @@ -1,16 +1,14 @@ -import React, { - useState, - useCallback, - useEffect, - ChangeEvent, - useRef -} from 'react'; import { - Row, - Text, - Button, + Button, Row, + StatelessTextInput as Input } from '@tlon/indigo-react'; +import React, { + ChangeEvent, useCallback, + useEffect, + + useRef, useState +} from 'react'; export function SetStatus(props: any) { const { contact, ship, api, callback } = props; @@ -41,7 +39,7 @@ export function SetStatus(props: any) { ref={inputRef} onChange={onStatusChange} value={_status} - autocomplete='off' + autoComplete='off' width='75%' mr={2} onKeyPress={(evt) => { diff --git a/pkg/interface/src/views/apps/profile/components/ViewProfile.tsx b/pkg/interface/src/views/apps/profile/components/ViewProfile.tsx index 9ae43ced51..8afcfc3194 100644 --- a/pkg/interface/src/views/apps/profile/components/ViewProfile.tsx +++ b/pkg/interface/src/views/apps/profile/components/ViewProfile.tsx @@ -1,21 +1,15 @@ +import { Box, Center, Col, Row, Text } from '@tlon/indigo-react'; import React, { ReactElement } from 'react'; -import _ from 'lodash'; -import { useHistory } from 'react-router-dom'; -import { Center, Box, Text, Row, Col } from '@tlon/indigo-react'; -import RichText from '~/views/components/RichText'; -import useSettingsState, { selectCalmState } from '~/logic/state/settings'; -import { Sigil } from '~/logic/lib/sigil'; -import { GroupLink } from '~/views/components/GroupLink'; import { lengthOrder } from '~/logic/lib/util'; -import useLocalState from '~/logic/state/local'; -import { - ProfileHeader, - ProfileControls, - ProfileActions, - ProfileStatus, - ProfileImages -} from './Profile'; import useContactState from '~/logic/state/contact'; +import useSettingsState, { selectCalmState } from '~/logic/state/settings'; +import { GroupLink } from '~/views/components/GroupLink'; +import RichText from '~/views/components/RichText'; +import { + ProfileActions, ProfileControls, ProfileHeader, + + ProfileImages, ProfileStatus +} from './Profile'; export function ViewProfile(props: any): ReactElement { const { hideNicknames } = useSettingsState(selectCalmState); @@ -51,20 +45,21 @@ export function ViewProfile(props: any): ReactElement { - +
- + {contact?.bio ? contact.bio : ''}
{(contact?.groups || []).length > 0 && ( - + Pinned Groups - {contact?.groups.slice().sort(lengthOrder).map((g) => ( + {contact?.groups.slice().sort(lengthOrder).map((g, i) => ( {}} /> diff --git a/pkg/interface/src/views/apps/profile/profile.tsx b/pkg/interface/src/views/apps/profile/profile.tsx index 0edf0cd2e3..3e1faf914b 100644 --- a/pkg/interface/src/views/apps/profile/profile.tsx +++ b/pkg/interface/src/views/apps/profile/profile.tsx @@ -1,12 +1,10 @@ -import React from 'react'; -import { Route, Link } from 'react-router-dom'; -import Helmet from 'react-helmet'; - import { Box } from '@tlon/indigo-react'; - -import { Profile } from './components/Profile'; +import React from 'react'; +import Helmet from 'react-helmet'; +import { Route } from 'react-router-dom'; import useContactState from '~/logic/state/contact'; import useHarkState from '~/logic/state/hark'; +import { Profile } from './components/Profile'; export default function ProfileScreen(props: any) { const contacts = useContactState(state => state.contacts); @@ -38,7 +36,7 @@ export default function ProfileScreen(props: any) { border={1} borderColor='lightGray' overflowY='auto' - flexGrow + flexGrow={1} > { const search = new URLSearchParams(location.search); if(search.has('selected') || search.has('edit') || !scrollRef.current) { return; } scrollRef.current.scrollTop = 0; - - - - }, [location]) + }, [location]); return ( diff --git a/pkg/interface/src/views/apps/publish/components/EditPost.tsx b/pkg/interface/src/views/apps/publish/components/EditPost.tsx index dd73baa5b0..b7585fd110 100644 --- a/pkg/interface/src/views/apps/publish/components/EditPost.tsx +++ b/pkg/interface/src/views/apps/publish/components/EditPost.tsx @@ -1,18 +1,18 @@ -import React, { ReactElement } from 'react'; -import _ from 'lodash'; -import { FormikHelpers } from 'formik'; -import { RouteComponentProps, useLocation } from 'react-router-dom'; - import { GraphNode } from '@urbit/api'; - -import { PostFormSchema, PostForm } from './NoteForm'; +import bigInt from 'big-integer'; +import { FormikHelpers } from 'formik'; +import _ from 'lodash'; +import React, { ReactElement } from 'react'; +import { RouteComponentProps, useLocation } from 'react-router-dom'; import GlobalApi from '~/logic/api/global'; -import { getLatestRevision, editPost } from '~/logic/lib/publish'; +import { referenceToPermalink } from '~/logic/lib/permalinks'; +import { editPost, getLatestRevision } from '~/logic/lib/publish'; import { useWaitForProps } from '~/logic/lib/useWaitForProps'; +import { PostForm, PostFormSchema } from './NoteForm'; interface EditPostProps { ship: string; - noteId: number; + noteId: bigInt.BigInteger; note: GraphNode; api: GlobalApi; book: string; @@ -23,10 +23,27 @@ export function EditPost(props: EditPostProps & RouteComponentProps): ReactEleme const [revNum, title, body] = getLatestRevision(note); const location = useLocation(); + let editContent = null; + editContent = body.reduce((val, curr) => { + if ('text' in curr) { + val = val + curr.text; + } else if ('mention' in curr) { + val = val + `~${curr.mention}`; + } else if ('url' in curr) { + val = val + curr.url; + } else if ('code' in curr) { + val = val + curr.code.expression; + } else if ('reference' in curr) { + val = `${val}${referenceToPermalink(curr).link}`; + } + + return val; + }, ''); + const waiter = useWaitForProps(props); const initial: PostFormSchema = { title, - body + body: editContent }; const onSubmit = async ( diff --git a/pkg/interface/src/views/apps/publish/components/MarkdownEditor.tsx b/pkg/interface/src/views/apps/publish/components/MarkdownEditor.tsx index 47d69f8f6e..57dc260e93 100644 --- a/pkg/interface/src/views/apps/publish/components/MarkdownEditor.tsx +++ b/pkg/interface/src/views/apps/publish/components/MarkdownEditor.tsx @@ -1,23 +1,18 @@ -import React, { createRef, useCallback, useRef } from 'react'; -import { IUnControlledCodeMirror, UnControlled as CodeEditor } from 'react-codemirror2'; -import { useFormikContext } from 'formik'; -import { Prompt } from 'react-router-dom'; +import { Box } from '@tlon/indigo-react'; import { Editor } from 'codemirror'; - -import { MOBILE_BROWSER_REGEX, usePreventWindowUnload } from '~/logic/lib/util'; -import { PropFunc } from '~/types/util'; -import CodeMirror from 'codemirror'; - -import 'codemirror/mode/markdown/markdown'; import 'codemirror/addon/display/placeholder'; import 'codemirror/addon/edit/continuelist'; - import 'codemirror/lib/codemirror.css'; -import { Box } from '@tlon/indigo-react'; +import 'codemirror/mode/markdown/markdown'; +import { useFormikContext } from 'formik'; +import React, { useCallback, useRef } from 'react'; +import { UnControlled as CodeEditor } from 'react-codemirror2'; +import { Prompt } from 'react-router-dom'; import { useFileDrag } from '~/logic/lib/useDrag'; -import SubmitDragger from '~/views/components/SubmitDragger'; import useStorage from '~/logic/lib/useStorage'; -import { StorageState } from '~/types'; +import { usePreventWindowUnload } from '~/logic/lib/util'; +import { PropFunc } from '~/types/util'; +import SubmitDragger from '~/views/components/SubmitDragger'; const MARKDOWN_CONFIG = { name: 'markdown' @@ -98,7 +93,6 @@ export function MarkdownEditor( return ( bind.onDragLeave(e)} - onDragOver={(editor, e) => bind.onDragOver(e)} - onDrop={(editor, e) => bind.onDrop(e)} - onDragEnter={(editor, e) => bind.onDragEnter(e)} + onDragLeave={(editor, e: DragEvent) => bind.onDragLeave(e)} + onDragOver={(editor, e: DragEvent) => bind.onDragOver(e)} + onDrop={(editor, e: DragEvent) => bind.onDrop(e)} + onDragEnter={(editor, e: DragEvent) => bind.onDragEnter(e)} /> {dragging && } diff --git a/pkg/interface/src/views/apps/publish/components/MarkdownField.tsx b/pkg/interface/src/views/apps/publish/components/MarkdownField.tsx index aa67e27dec..f779b1c6a4 100644 --- a/pkg/interface/src/views/apps/publish/components/MarkdownField.tsx +++ b/pkg/interface/src/views/apps/publish/components/MarkdownField.tsx @@ -1,7 +1,7 @@ -import React, { useCallback } from 'react'; -import _ from 'lodash'; import { Box, ErrorLabel } from '@tlon/indigo-react'; import { useField } from 'formik'; +import _ from 'lodash'; +import React, { useCallback } from 'react'; import { MarkdownEditor } from './MarkdownEditor'; export const MarkdownField = ({ @@ -36,7 +36,7 @@ export const MarkdownField = ({ value={value} onChange={setValue} /> - + {error} diff --git a/pkg/interface/src/views/apps/publish/components/Note.tsx b/pkg/interface/src/views/apps/publish/components/Note.tsx index 3383b60da5..f609c63af1 100644 --- a/pkg/interface/src/views/apps/publish/components/Note.tsx +++ b/pkg/interface/src/views/apps/publish/components/Note.tsx @@ -1,20 +1,20 @@ -import React, { useState, useEffect } from 'react'; -import { Box, Text, Col, Anchor, Row, Action } from '@tlon/indigo-react'; -import ReactMarkdown from 'react-markdown'; +import { Action, Anchor, Box, Col, Row, Text } from '@tlon/indigo-react'; +import { Association, Graph, GraphNode, Group } from '@urbit/api'; import bigInt from 'big-integer'; - +import React, { useEffect, useState } from 'react'; import { Link, RouteComponentProps } from 'react-router-dom'; -import { Spinner } from '~/views/components/Spinner'; -import { Comments } from '~/views/components/Comments'; -import { NoteNavigation } from './NoteNavigation'; import GlobalApi from '~/logic/api/global'; -import { getLatestRevision, getComments } from '~/logic/lib/publish'; import { roleForShip } from '~/logic/lib/group'; -import Author from '~/views/components/Author'; -import { Contacts, GraphNode, Graph, Association, Unreads, Group } from '@urbit/api'; -import {useCopy} from '~/logic/lib/useCopy'; import { getPermalinkForGraph } from '~/logic/lib/permalinks'; -import {useQuery} from '~/logic/lib/useQuery'; +import { getComments, getLatestRevision } from '~/logic/lib/publish'; +import { useCopy } from '~/logic/lib/useCopy'; +import { useQuery } from '~/logic/lib/useQuery'; +import Author from '~/views/components/Author'; +import { Comments } from '~/views/components/Comments'; +import { Spinner } from '~/views/components/Spinner'; +import { GraphContent } from '~/views/landscape/components/Graph/GraphContent'; +import { NoteNavigation } from './NoteNavigation'; +import { Redirect } from 'react-router-dom'; interface NoteProps { ship: string; @@ -28,22 +28,12 @@ interface NoteProps { group: Group; } -const renderers = { - link: ({ href, children }) => { - return ( - {children} - ) - } -}; - -export function NoteContent({ body }) { +export function NoteContent({ post, api }) { return ( - - + ); - } export function Note(props: NoteProps & RouteComponentProps) { @@ -54,10 +44,18 @@ export function Note(props: NoteProps & RouteComponentProps) { const deletePost = async () => { setDeleting(true); const indices = [note.post.index]; - await api.graph.removeNodes(ship, book, indices); + await api.graph.removePosts(ship, book, indices); props.history.push(rootUrl); }; + if (typeof note.post === 'string' || !note.post) { + return ( + + This note has been deleted. + + ); + } + const { query } = useQuery(); const comments = getComments(note); const [revNum, title, body, post] = getLatestRevision(note); @@ -68,23 +66,23 @@ export function Note(props: NoteProps & RouteComponentProps) { api.hark.markEachAsRead(props.association, '/',`/${index[1]}/1/1`, 'note', 'publish'); }, [props.association, props.note]); - let adminLinks: JSX.Element[] = []; + const adminLinks: JSX.Element[] = []; const ourRole = roleForShip(group, window.ship); if (window.ship === note?.post?.author) { adminLinks.push( - Update + Update - ) - }; + ); + } - if (window.ship === note?.post?.author || ourRole === "admin") { + if (window.ship === note?.post?.author || ourRole === 'admin') { adminLinks.push( - + Delete - ) - }; + ); + } const permalink = getPermalinkForGraph( association.group, @@ -94,7 +92,6 @@ export function Note(props: NoteProps & RouteComponentProps) { const { doCopy, copyDisplay } = useCopy(permalink, 'Copy Link'); - return ( - + {copyDisplay} {adminLinks}
- +
- + @@ -50,12 +48,12 @@ function getAdjacentId( return target?.[0] || null; } -function makeNoteUrl(noteId: number) { +function makeNoteUrl(noteId: BigInteger) { return noteId.toString(); } interface NoteNavigationProps { - noteId: number; + noteId: BigInteger; notebook: Graph; baseUrl: string; } diff --git a/pkg/interface/src/views/apps/publish/components/NotePreview.tsx b/pkg/interface/src/views/apps/publish/components/NotePreview.tsx index 24f4c12079..3f9ecc0954 100644 --- a/pkg/interface/src/views/apps/publish/components/NotePreview.tsx +++ b/pkg/interface/src/views/apps/publish/components/NotePreview.tsx @@ -1,19 +1,17 @@ +import { Box, Col, Icon, Image, Row, Text } from '@tlon/indigo-react'; +import { Group } from '@urbit/api'; +import { GraphNode } from '@urbit/api/graph'; import React from 'react'; +import ReactMarkdown from 'react-markdown'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; -import { Col, Row, Box, Text, Icon, Image } from '@tlon/indigo-react'; - -import Author from '~/views/components/Author'; -import { GraphNode } from '@urbit/api/graph'; -import { Contacts, Group } from '@urbit/api'; import { - getComments, - getLatestRevision, - getSnippet + getComments, + getLatestRevision, + getSnippet } from '~/logic/lib/publish'; -import { Unreads } from '@urbit/api'; -import ReactMarkdown from 'react-markdown'; import useHarkState from '~/logic/state/hark'; +import Author from '~/views/components/Author'; interface NotePreviewProps { host: string; @@ -37,10 +35,15 @@ export function NotePreviewContent({ snippet }) { - + + ), + paragraph: props => ( + + {props.children} + ) }} source={snippet} @@ -51,8 +54,12 @@ export function NotePreviewContent({ snippet }) { export function NotePreview(props: NotePreviewProps) { const { node, group } = props; const { post } = node; - if (!post) { - return null; + if (!post || typeof post === 'string') { + return ( + + This note has been deleted. + + ); } const numComments = getComments(node).children.size; @@ -62,6 +69,7 @@ export function NotePreview(props: NotePreviewProps) { const [rev, title, body, content] = getLatestRevision(node); const appPath = `/ship/${props.host}/${props.book}`; const unreads = useHarkState(state => state.unreads); + // @ts-ignore hark will have to choose between sets and numbers const isUnread = unreads.graph?.[appPath]?.['/']?.unreads?.has(`/${noteId}/1/1`); const snippet = getSnippet(body); @@ -74,7 +82,8 @@ export function NotePreview(props: NotePreviewProps) { + style={ { cursor: cursorStyle } } + > {title} - + - + + {association.metadata?.title} @@ -52,7 +49,7 @@ export function Notebook(props: NotebookProps & RouteComponentProps): ReactEleme - + state.contacts); return ( {Array.from(props.graph || []).map( @@ -25,7 +24,6 @@ export function NotebookPosts(props: NotebookPostsProps) { key={date.toString()} host={props.host} book={props.book} - contact={contacts[`~${node.post.author}`]} node={node} baseUrl={props.baseUrl} group={props.group} diff --git a/pkg/interface/src/views/apps/publish/components/NotebookRoutes.tsx b/pkg/interface/src/views/apps/publish/components/NotebookRoutes.tsx index 56c6b3b23f..ab28a3c6b1 100644 --- a/pkg/interface/src/views/apps/publish/components/NotebookRoutes.tsx +++ b/pkg/interface/src/views/apps/publish/components/NotebookRoutes.tsx @@ -1,24 +1,16 @@ -import React, { useEffect } from 'react'; -import { RouteComponentProps, Route, Switch } from 'react-router-dom'; -import GlobalApi from '~/logic/api/global'; -import { - Association, - Associations, - Graphs, - Groups, - Contacts, - Rolodex, - Unreads, -} from '@urbit/api'; import { Center, LoadingSpinner } from '@tlon/indigo-react'; -import { StorageState } from '~/types'; +import { + Association +} from '@urbit/api'; import bigInt from 'big-integer'; - -import Notebook from './Notebook'; -import NewPost from './new-post'; -import { NoteRoutes } from './NoteRoutes'; +import React, { useEffect } from 'react'; +import { Route, RouteComponentProps, Switch } from 'react-router-dom'; +import GlobalApi from '~/logic/api/global'; import useGraphState from '~/logic/state/graph'; import useGroupState from '~/logic/state/group'; +import NewPost from './new-post'; +import Notebook from './Notebook'; +import { NoteRoutes } from './NoteRoutes'; interface NotebookRoutesProps { api: GlobalApi; diff --git a/pkg/interface/src/views/apps/publish/components/Writers.js b/pkg/interface/src/views/apps/publish/components/Writers.tsx similarity index 65% rename from pkg/interface/src/views/apps/publish/components/Writers.js rename to pkg/interface/src/views/apps/publish/components/Writers.tsx index d06e1a78bd..affb8e8ea9 100644 --- a/pkg/interface/src/views/apps/publish/components/Writers.js +++ b/pkg/interface/src/views/apps/publish/components/Writers.tsx @@ -1,13 +1,20 @@ -import React, { Component } from 'react'; import { Box, Text } from '@tlon/indigo-react'; -import { ShipSearch } from '~/views/components/ShipSearch'; -import { Formik, Form } from 'formik'; +import { Association, Group } from '@urbit/api'; +import { Form, Formik } from 'formik'; +import React, { ReactElement } from 'react'; +import GlobalApi from '~/logic/api/global'; import { resourceFromPath } from '~/logic/lib/group'; import { AsyncButton } from '~/views/components/AsyncButton'; +import { ShipSearch } from '~/views/components/ShipSearch'; -export class Writers extends Component { - render() { - const { association, groups, api } = this.props; +interface WritersProps { + api: GlobalApi; + association: Association; + groups: Group[]; +} + +export const Writers = (props: WritersProps): ReactElement => { + const { association, groups, api } = props; const resource = resourceFromPath(association?.group); @@ -16,7 +23,7 @@ export class Writers extends Component { const ships = values.ships.map(e => `~${e}`); await api.groups.addTag( resource, - { app: 'graph', resource: association.resource, tag: `writers` }, + { app: 'graph', resource: association.resource, tag: 'writers' }, ships ); actions.resetForm(); @@ -28,11 +35,10 @@ export class Writers extends Component { }; const writers = Array.from(groups?.[association?.group]?.tags.graph[association.resource]?.writers || []).map(s => `~${s}`).join(', '); - return ( Writers - Add additional writers to this notebook + Add additional writers to this notebook - + Submit {writers.length > 0 ? <> - Current writers: - {writers} - : - + Current writers: + {writers} + : + All group members can write to this channel } ); - } -} +}; export default Writers; diff --git a/pkg/interface/src/views/apps/publish/components/new-post.tsx b/pkg/interface/src/views/apps/publish/components/new-post.tsx index 0334f04954..7a666094a0 100644 --- a/pkg/interface/src/views/apps/publish/components/new-post.tsx +++ b/pkg/interface/src/views/apps/publish/components/new-post.tsx @@ -1,14 +1,12 @@ -import React from 'react'; -import { FormikHelpers } from 'formik'; -import GlobalApi from '~/logic/api/global'; -import { useWaitForProps } from '~/logic/lib/useWaitForProps'; -import { RouteComponentProps } from 'react-router-dom'; -import { PostForm, PostFormSchema } from './NoteForm'; -import { createPost } from '~/logic/api/graph'; -import { Graph } from '@urbit/api/graph'; import { Association } from '@urbit/api'; -import { StorageState } from '~/types'; +import { Graph } from '@urbit/api/graph'; +import { FormikHelpers } from 'formik'; +import React from 'react'; +import { RouteComponentProps } from 'react-router-dom'; +import GlobalApi from '~/logic/api/global'; import { newPost } from '~/logic/lib/publish'; +import { useWaitForProps } from '~/logic/lib/useWaitForProps'; +import { PostForm, PostFormSchema } from './NoteForm'; interface NewPostProps { api: GlobalApi; diff --git a/pkg/interface/src/views/apps/publish/css/custom.css b/pkg/interface/src/views/apps/publish/css/custom.css index 4b22706658..5c11ec7095 100644 --- a/pkg/interface/src/views/apps/publish/css/custom.css +++ b/pkg/interface/src/views/apps/publish/css/custom.css @@ -137,46 +137,6 @@ display: none; } -.md h1, .md h2, .md h3, .md h4, .md h5, .md p, .md a, .md ul, .md ol, .md blockquote,.md code,.md pre { - font-size: 14px; - margin-bottom: 16px; -} - -.md ul ul { - margin-bottom: 0px; -} - -.md h2, .md h3, .md h4, .md h5, .md p, .md a, .md ul { - font-weight: 400; -} - -.md h1 { - font-weight: 600; -} - -.md h2, .md h3, .md h4, .md h5 { - color:var(--gray); -} - -.md { - line-height: 1.5; -} -.md code, .md pre { - font-family: "Source Code Pro", mono; - white-space: pre-wrap; -} -.md ul>li, .md ol>li { - line-height: 1.5; -} -.md a { - border-bottom-style: solid; - border-bottom-width: 1px; -} - -.md img { - margin-bottom: 8px; -} - @media all and (prefers-color-scheme: dark) { .options.open { background-color: #4d4d4d; diff --git a/pkg/interface/src/views/apps/settings/components/lib/BackButton.tsx b/pkg/interface/src/views/apps/settings/components/lib/BackButton.tsx index 1fdcc633cf..6218bcd58d 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/BackButton.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/BackButton.tsx @@ -1,13 +1,13 @@ +import { Text } from '@tlon/indigo-react'; import React from 'react'; import { Link } from 'react-router-dom'; -import { Text } from '@tlon/indigo-react'; export function BackButton(props: {}) { return ( Landscape Background - - Set an image background + + Set an image background - - Set a hex-based background - + + Set a hex-based background + + id="none" + /> ); } diff --git a/pkg/interface/src/views/apps/settings/components/lib/BucketList.tsx b/pkg/interface/src/views/apps/settings/components/lib/BucketList.tsx index 25afa1dff3..e1bd736ae7 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/BucketList.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/BucketList.tsx @@ -1,19 +1,16 @@ -import React, { ReactElement, useCallback, useState } from "react"; -import { Formik, FormikHelpers } from 'formik'; - import { - ManagedTextInputField as Input, - ManagedForm as Form, - Box, - Button, - Text, - Menu, - MenuButton, - MenuList, - MenuItem, - Row, -} from "@tlon/indigo-react"; + Box, + Button, ManagedForm as Form, ManagedTextInputField as Input, + Menu, + MenuButton, + + MenuItem, MenuList, + + Row, Text +} from '@tlon/indigo-react'; +import { Formik, FormikHelpers } from 'formik'; +import React, { ReactElement, useCallback, useState } from 'react'; import GlobalApi from '~/logic/api/global'; export function BucketList({ @@ -32,7 +29,7 @@ export function BucketList({ const onSubmit = useCallback( (values: { newBucket: string }, actions: FormikHelpers) => { api.s3.addBucket(values.newBucket); - actions.resetForm({ values: { newBucket: "" } }); + actions.resetForm({ values: { newBucket: '' } }); }, [api] ); @@ -98,22 +95,22 @@ export function BucketList({ {adding && ( )} - + diff --git a/pkg/interface/src/views/apps/settings/components/lib/CalmPref.tsx b/pkg/interface/src/views/apps/settings/components/lib/CalmPref.tsx index 2047f73b2c..d1d8bb9cbc 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/CalmPref.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/CalmPref.tsx @@ -1,17 +1,16 @@ -import React, {useCallback} from "react"; import { - Box, - ManagedToggleSwitchField as Toggle, - Button, - Col, - Text, -} from "@tlon/indigo-react"; -import { Formik, Form, FormikHelpers } from "formik"; -import * as Yup from "yup"; -import { BackButton } from "./BackButton"; -import useSettingsState, {selectSettingsState} from "~/logic/state/settings"; -import GlobalApi from "~/logic/api/global"; -import {AsyncButton} from "~/views/components/AsyncButton"; + Col, ManagedToggleSwitchField as Toggle, + + Text +} from '@tlon/indigo-react'; +import { Form, Formik, FormikHelpers } from 'formik'; +import React, { useCallback } from 'react'; +import GlobalApi from '~/logic/api/global'; +import useSettingsState, { selectSettingsState, SettingsState } from '~/logic/state/settings'; +import { AsyncButton } from '~/views/components/AsyncButton'; +import { BackButton } from './BackButton'; +import _ from 'lodash'; +import {FormikOnBlur} from '~/views/components/FormikOnBlur'; interface FormSchema { hideAvatars: boolean; @@ -25,62 +24,43 @@ interface FormSchema { videoShown: boolean; } -const settingsSel = selectSettingsState(["calm", "remoteContentPolicy"]); +const settingsSel = (s: SettingsState): FormSchema => ({ + hideAvatars: s.calm.hideAvatars, + hideNicknames: s.calm.hideAvatars, + hideUnreads: s.calm.hideUnreads, + hideGroups: s.calm.hideGroups, + hideUtilities: s.calm.hideUtilities, + imageShown: !s.remoteContentPolicy.imageShown, + videoShown: !s.remoteContentPolicy.videoShown, + oembedShown: !s.remoteContentPolicy.oembedShown, + audioShown: !s.remoteContentPolicy.audioShown +}); + export function CalmPrefs(props: { api: GlobalApi; }) { const { api } = props; - const { - calm: { - hideAvatars, - hideNicknames, - hideUnreads, - hideGroups, - hideUtilities - }, - remoteContentPolicy: { - imageShown, - videoShown, - oembedShown, - audioShown, - } - } = useSettingsState(settingsSel); - - - const initialValues: FormSchema = { - hideAvatars, - hideNicknames, - hideUnreads, - hideGroups, - hideUtilities, - imageShown: !imageShown, - videoShown: !videoShown, - oembedShown: !oembedShown, - audioShown: !audioShown - }; + const initialValues = useSettingsState(settingsSel); const onSubmit = useCallback(async (v: FormSchema, actions: FormikHelpers) => { - await Promise.all([ - api.settings.putEntry('calm', 'hideAvatars', v.hideAvatars), - api.settings.putEntry('calm', 'hideNicknames', v.hideNicknames), - api.settings.putEntry('calm', 'hideUnreads', v.hideUnreads), - api.settings.putEntry('calm', 'hideGroups', v.hideGroups), - api.settings.putEntry('calm', 'hideUtilities', v.hideUtilities), - api.settings.putEntry('remoteContentPolicy', 'imageShown', !v.imageShown), - api.settings.putEntry('remoteContentPolicy', 'videoShown', !v.videoShown), - api.settings.putEntry('remoteContentPolicy', 'audioShown', !v.audioShown), - api.settings.putEntry('remoteContentPolicy', 'oembedShown', !v.oembedShown), - ]); + let promises: Promise[] = []; + _.forEach(v, (bool, key) => { + const bucket = ['imageShown', 'videoShown', 'audioShown', 'oembedShown'].includes(key) ? 'remoteContentPolicy' : 'calm'; + if(initialValues[key] !== bool) { + promises.push(api.settings.putEntry(bucket, key, bool)); + } + }) + await Promise.all(promises); actions.setStatus({ success: null }); }, [api]); return ( - +
- - - + + + CalmEngine @@ -136,12 +116,8 @@ export function CalmPrefs(props: { id="oembedShown" caption="Embedded content may contain scripts that can track you" /> - - - Save - -
+ ); } diff --git a/pkg/interface/src/views/apps/settings/components/lib/Debug.tsx b/pkg/interface/src/views/apps/settings/components/lib/Debug.tsx index c667ee2bcd..fa4ed43f1f 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/Debug.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/Debug.tsx @@ -1,22 +1,22 @@ -import { BaseInput, Box, Col, Text } from "@tlon/indigo-react"; -import _ from "lodash"; -import React, { useCallback, useState } from "react"; -import { UseStore } from "zustand"; -import { BaseState } from "~/logic/state/base"; -import useContactState from "~/logic/state/contact"; -import useGraphState from "~/logic/state/graph"; -import useGroupState from "~/logic/state/group"; -import useHarkState from "~/logic/state/hark"; -import useInviteState from "~/logic/state/invite"; -import useLaunchState from "~/logic/state/launch"; -import useMetadataState from "~/logic/state/metadata"; -import useSettingsState from "~/logic/state/settings"; -import useStorageState from "~/logic/state/storage"; -import { BackButton } from "./BackButton"; +import { BaseInput, Box, Col, Text } from '@tlon/indigo-react'; +import _ from 'lodash'; +import React, { useCallback, useState } from 'react'; +import { UseStore } from 'zustand'; +import { BaseState } from '~/logic/state/base'; +import useContactState from '~/logic/state/contact'; +import useGraphState from '~/logic/state/graph'; +import useGroupState from '~/logic/state/group'; +import useHarkState from '~/logic/state/hark'; +import useInviteState from '~/logic/state/invite'; +import useLaunchState from '~/logic/state/launch'; +import useMetadataState from '~/logic/state/metadata'; +import useSettingsState from '~/logic/state/settings'; +import useStorageState from '~/logic/state/storage'; +import { BackButton } from './BackButton'; interface StoreDebuggerProps { name: string; - useStore: UseStore>; + useStore: UseStore & any>; } const objectToString = (obj: any): string => JSON.stringify(obj, null, ' '); @@ -27,7 +27,7 @@ const StoreDebugger = (props: StoreDebuggerProps) => { const [filter, setFilter] = useState(''); const [text, setText] = useState(objectToString(state)); const [visible, setVisible] = useState(false); - + const tryFilter = useCallback((filterToTry) => { let output: any = false; try { @@ -39,7 +39,6 @@ const StoreDebugger = (props: StoreDebuggerProps) => { setFilter(filterToTry); } }, [state, filter, text]); - return ( @@ -53,19 +52,22 @@ const StoreDebugger = (props: StoreDebuggerProps) => { backgroundColor='white' color='black' border='1px solid transparent' - borderRadius='2' + borderRadius={2} fontSize={1} placeholder="Drill Down" width="100%" - onKeyUp={event => { + onKeyUp={(event) => { + // @ts-ignore clearly value is in eventtarget if (event.target.value) { + // @ts-ignore clearly value is in eventtarget tryFilter(event.target.value); } else { setFilter(''); setText(objectToString(state)); } - }} /> - {text} + }} + /> + {text} }
); @@ -75,8 +77,8 @@ const DebugPane = () => { return ( <> - - + + Debug Menu @@ -95,7 +97,7 @@ const DebugPane = () => { - ) + ); }; -export default DebugPane; \ No newline at end of file +export default DebugPane; diff --git a/pkg/interface/src/views/apps/settings/components/lib/DisplayForm.tsx b/pkg/interface/src/views/apps/settings/components/lib/DisplayForm.tsx index 34b9862452..a6c3745e5d 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/DisplayForm.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/DisplayForm.tsx @@ -1,30 +1,28 @@ -import React from "react"; - import { - Col, - Text, - Label, - ManagedRadioButtonField as Radio -} from "@tlon/indigo-react"; -import { Formik, Form } from "formik"; -import * as Yup from "yup"; + Col, -import GlobalApi from "~/logic/api/global"; -import { uxToHex } from "~/logic/lib/util"; -import { S3State, BackgroundConfig, StorageState } from "~/types"; -import { BackgroundPicker, BgType } from "./BackgroundPicker"; -import useSettingsState, { SettingsState, selectSettingsState } from "~/logic/state/settings"; -import {AsyncButton} from "~/views/components/AsyncButton"; -import { BackButton } from "./BackButton"; + Label, + ManagedRadioButtonField as Radio, Text +} from '@tlon/indigo-react'; +import { Form, Formik } from 'formik'; +import React from 'react'; +import * as Yup from 'yup'; +import GlobalApi from '~/logic/api/global'; +import { uxToHex } from '~/logic/lib/util'; +import useSettingsState, { selectSettingsState } from '~/logic/state/settings'; +import { AsyncButton } from '~/views/components/AsyncButton'; +import {FormikOnBlur} from '~/views/components/FormikOnBlur'; +import { BackButton } from './BackButton'; +import { BackgroundPicker, BgType } from './BackgroundPicker'; const formSchema = Yup.object().shape({ bgType: Yup.string() - .oneOf(["none", "color", "url"], "invalid") - .required("Required"), + .oneOf(['none', 'color', 'url'], 'invalid') + .required('Required'), background: Yup.string(), theme: Yup.string() - .oneOf(["light", "dark", "auto"]) - .required("Required") + .oneOf(['light', 'dark', 'auto']) + .required('Required') }); interface FormSchema { @@ -38,7 +36,7 @@ interface DisplayFormProps { api: GlobalApi; } -const settingsSel = selectSettingsState(["display"]); +const settingsSel = selectSettingsState(['display']); export default function DisplayForm(props: DisplayFormProps) { const { api } = props; @@ -51,36 +49,35 @@ export default function DisplayForm(props: DisplayFormProps) { } } = useSettingsState(settingsSel); - let bgColor, bgUrl; - if (backgroundType === "url") { + if (backgroundType === 'url') { bgUrl = background; } - if (backgroundType === "color") { + if (backgroundType === 'color') { bgColor = background; } - const bgType = backgroundType || "none"; + const bgType = backgroundType || 'none'; return ( - { - let promises = [] as Promise[]; + const promises = [] as Promise[]; promises.push(api.settings.putEntry('display', 'backgroundType', values.bgType)); promises.push( api.settings.putEntry('display', 'background', - values.bgType === "color" - ? `#${uxToHex(values.bgColor || "0x0")}` - : values.bgType === "url" - ? values.bgUrl || "" + values.bgType === 'color' + ? `#${uxToHex(values.bgColor || '0x0')}` + : values.bgType === 'url' + ? values.bgUrl || '' : false )); @@ -88,14 +85,12 @@ export default function DisplayForm(props: DisplayFormProps) { await Promise.all(promises); actions.setStatus({ success: null }); - }} > - {(props) => (
- - - + + + Display Preferences @@ -104,12 +99,11 @@ export default function DisplayForm(props: DisplayFormProps) { - + @@ -117,7 +111,6 @@ export default function DisplayForm(props: DisplayFormProps) { - )} -
+ ); } diff --git a/pkg/interface/src/views/apps/settings/components/lib/DmSettings.tsx b/pkg/interface/src/views/apps/settings/components/lib/DmSettings.tsx new file mode 100644 index 0000000000..201a560211 --- /dev/null +++ b/pkg/interface/src/views/apps/settings/components/lib/DmSettings.tsx @@ -0,0 +1,58 @@ +import { + Text, + Col, + Box, + ManagedToggleSwitchField +} from '@tlon/indigo-react'; +import { Form, Formik } from 'formik'; +import React, { useCallback } from 'react'; +import GlobalApi from '~/logic/api/global'; +import useGraphState from '~/logic/state/graph'; +import { AsyncButton } from '~/views/components/AsyncButton'; + +export function DmSettings(props: { api: GlobalApi }) { + const { api } = props; + const screening = useGraphState(s => s.screening); + const initialValues = { accept: !screening }; + const onSubmit = useCallback( + async (values, actions) => { + await api.graph.setScreen(!values.accept); + actions.setStatus({ success: null }); + }, + [screening] + ); + + return ( + + + + Privacy + + + + Control other people's ability to message you + + + + + + Direct Messages + + +
+ + + + Save Changes + + + +
+ + + ); +} diff --git a/pkg/interface/src/views/apps/settings/components/lib/GroupChannelPicker.tsx b/pkg/interface/src/views/apps/settings/components/lib/GroupChannelPicker.tsx index 5c5b4eca76..f442e9762a 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/GroupChannelPicker.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/GroupChannelPicker.tsx @@ -1,29 +1,27 @@ -import React, { useState, useEffect } from "react"; import { Box, - Text, - Icon, - ManagedToggleSwitchField, - StatelessToggleSwitchField, - Col, - Center, -} from "@tlon/indigo-react"; -import _ from "lodash"; -import useMetadataState, { useGraphsForGroup } from "~/logic/state/metadata"; -import { Association, resourceFromPath } from "@urbit/api"; -import { MetadataIcon } from "~/views/landscape/components/MetadataIcon"; -import useGraphState from "~/logic/state/graph"; -import { useField } from "formik"; -import useHarkState from "~/logic/state/hark"; -import { getModuleIcon } from "~/logic/lib/util"; -import {isWatching} from "~/logic/lib/hark"; + Center, Col, Icon, + + ToggleSwitch, Text, + StatelessToggleSwitchField +} from '@tlon/indigo-react'; +import { Association, GraphConfig, resourceFromPath } from '@urbit/api'; +import { useField } from 'formik'; +import _ from 'lodash'; +import React, { useEffect, useState } from 'react'; +import { isWatching } from '~/logic/lib/hark'; +import { getModuleIcon, GraphModule } from '~/logic/lib/util'; +import useGraphState from '~/logic/state/graph'; +import useHarkState from '~/logic/state/hark'; +import useMetadataState, { useGraphsForGroup } from '~/logic/state/metadata'; +import { MetadataIcon } from '~/views/landscape/components/MetadataIcon'; export function GroupChannelPicker(props: {}) { - const associations = useMetadataState((s) => s.associations); + const associations = useMetadataState(s => s.associations); return ( - + {_.map(associations.groups, (assoc: Association, group: string) => ( ))} @@ -35,26 +33,24 @@ function GroupWithChannels(props: { association: Association }) { const { association } = props; const { metadata } = association; - const groupWatched = useHarkState((s) => + const groupWatched = useHarkState(s => s.notificationsGroupConfig.includes(association.group) ); const [{ value }, meta, { setValue }] = useField( `groups["${association.group}"]` ); - const onChange = () => { setValue(!value); }; - useEffect(() => { setValue(groupWatched); }, []); const graphs = useGraphsForGroup(association.group); - const joinedGraphs = useGraphState((s) => s.graphKeys); + const joinedGraphs = useGraphState(s => s.graphKeys); const joinedGroupGraphs = _.pickBy(graphs, (_, graph: string) => { const { ship, name } = resourceFromPath(graph); return joinedGraphs.has(`${ship.slice(1)}/${name}`); @@ -67,16 +63,16 @@ function GroupWithChannels(props: { association: Association }) { display="grid" gridTemplateColumns="24px 24px 1fr 24px 24px" gridTemplateRows="auto" - gridGap="2" + gridGap={2} gridTemplateAreas="'arrow icon title graphToggle groupToggle'" > {Object.keys(joinedGroupGraphs).length > 0 && (
setOpen((o) => !o)} + onClick={() => setOpen(o => !o)} gridArea="arrow" > - +
)} { + const onClick = () => { setValue(!value); - }; + setTouched(true); + } - const icon = getModuleIcon(metadata.config?.graph); + + const icon = getModuleIcon((metadata.config as GraphConfig)?.graph as GraphModule); return ( <> -
+
- + {metadata.title} - - + + ); diff --git a/pkg/interface/src/views/apps/settings/components/lib/LeapSettings.tsx b/pkg/interface/src/views/apps/settings/components/lib/LeapSettings.tsx index a4f7992824..590ae05fed 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/LeapSettings.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/LeapSettings.tsx @@ -1,30 +1,27 @@ -import React, { useCallback } from "react"; -import _ from "lodash"; import { - Col, - Text, - ManagedToggleSwitchField as Toggle, - ManagedCheckboxField, - BaseInput, -} from "@tlon/indigo-react"; -import { Form, FormikHelpers, useField, useFormikContext } from "formik"; -import { FormikOnBlur } from "~/views/components/FormikOnBlur"; -import { BackButton } from "./BackButton"; -import GlobalApi from "~/logic/api/global"; + Col, + + ManagedCheckboxField, Text +} from '@tlon/indigo-react'; +import { Form, useField, useFormikContext } from 'formik'; +import _ from 'lodash'; +import React from 'react'; +import GlobalApi from '~/logic/api/global'; +import useSettingsState, { selectSettingsState } from '~/logic/state/settings'; import { - NotificationGraphConfig, - LeapCategories, - leapCategories, -} from "~/types"; -import useSettingsState, { selectSettingsState } from "~/logic/state/settings"; -import { ShuffleFields } from "~/views/components/ShuffleFields"; + LeapCategories, + leapCategories +} from '~/types'; +import { FormikOnBlur } from '~/views/components/FormikOnBlur'; +import { ShuffleFields } from '~/views/components/ShuffleFields'; +import { BackButton } from './BackButton'; const labels: Record = { - mychannel: "My Channel", - updates: "Notifications", - profile: "Profile", - messages: "Messages", - logout: "Log Out", + mychannel: 'My Channel', + updates: 'Notifications', + profile: 'Profile', + messages: 'Messages', + logout: 'Log Out' }; interface FormSchema { @@ -46,23 +43,22 @@ function CategoryCheckbox(props: { index: number }) { ); } -const settingsSel = selectSettingsState(["leap", "set"]); +const settingsSel = selectSettingsState(['leap', 'set']); export function LeapSettings(props: { api: GlobalApi; }) { const { api } = props; const { leap, set: setSettingsState } = useSettingsState(settingsSel); const categories = leap.categories as LeapCategories[]; const missing = _.difference(leapCategories, categories); - console.log(categories); const initialValues = { categories: [ - ...categories.map((cat) => ({ + ...categories.map(cat => ({ category: cat, - display: true, + display: true })), - ...missing.map((cat) => ({ category: cat, display: false })), - ], + ...missing.map(cat => ({ category: cat, display: false })) + ] }; const onSubmit = async (values: FormSchema) => { @@ -75,10 +71,10 @@ export function LeapSettings(props: { api: GlobalApi; }) { return ( <> - - - - + + + + Leap @@ -87,7 +83,7 @@ export function LeapSettings(props: { api: GlobalApi; }) {
- + Customize default Leap sections diff --git a/pkg/interface/src/views/apps/settings/components/lib/NotificationPref.tsx b/pkg/interface/src/views/apps/settings/components/lib/NotificationPref.tsx index 3759572462..5bda6924b8 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/NotificationPref.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/NotificationPref.tsx @@ -1,17 +1,21 @@ -import React, { useCallback } from "react"; import { + Button, Col, - Text, - ManagedToggleSwitchField as Toggle, -} from "@tlon/indigo-react"; -import { Formik, Form, FormikHelpers } from "formik"; -import { BackButton } from "./BackButton"; -import GlobalApi from "~/logic/api/global"; -import useHarkState from "~/logic/state/hark"; -import _ from "lodash"; -import {AsyncButton} from "~/views/components/AsyncButton"; -import {GroupChannelPicker} from "./GroupChannelPicker"; -import {isWatching} from "~/logic/lib/hark"; + + + + + ManagedToggleSwitchField as Toggle, Text +} from '@tlon/indigo-react'; +import { Form, FormikHelpers } from 'formik'; +import _ from 'lodash'; +import React, { useCallback, useState } from 'react'; +import GlobalApi from '~/logic/api/global'; +import { isWatching } from '~/logic/lib/hark'; +import useHarkState from '~/logic/state/hark'; +import { FormikOnBlur } from '~/views/components/FormikOnBlur'; +import { BackButton } from './BackButton'; +import { GroupChannelPicker } from './GroupChannelPicker'; interface FormSchema { mentions: boolean; @@ -35,12 +39,12 @@ export function NotificationPreferences(props: { const initialValues = { mentions: graphConfig.mentions, dnd: dnd, - watchOnSelf: graphConfig.watchOnSelf, + watchOnSelf: graphConfig.watchOnSelf }; const onSubmit = useCallback(async (values: FormSchema, actions: FormikHelpers) => { try { - let promises: Promise[] = []; + const promises: Promise[] = []; if (values.mentions !== graphConfig.mentions) { promises.push(api.hark.setMentions(values.mentions)); } @@ -48,16 +52,16 @@ export function NotificationPreferences(props: { promises.push(api.hark.setWatchOnSelf(values.watchOnSelf)); } if (values.dnd !== dnd && !_.isUndefined(values.dnd)) { - promises.push(api.hark.setDoNotDisturb(values.dnd)) + promises.push(api.hark.setDoNotDisturb(values.dnd)); } _.forEach(values.graph, (listen: boolean, graph: string) => { if(listen !== isWatching(graphConfig, graph)) { - promises.push(api.hark[listen ? "listenGraph" : "ignoreGraph"](graph, "/")) + promises.push(api.hark[listen ? 'listenGraph' : 'ignoreGraph'](graph, '/')); } }); _.forEach(values.groups, (listen: boolean, group: string) => { if(listen !== groupConfig.includes(group)) { - promises.push(api.hark[listen ? "listenGroup" : "ignoreGroup"](group)); + promises.push(api.hark[listen ? 'listenGroup' : 'ignoreGroup'](group)); } }); @@ -69,12 +73,14 @@ export function NotificationPreferences(props: { } }, [api, graphConfig, dnd]); + const [notificationsAllowed, setNotificationsAllowed] = useState('Notification' in window && Notification.permission !== 'default'); + return ( <> - - - - + + + + Notification Preferences @@ -82,9 +88,17 @@ export function NotificationPreferences(props: { messaging - + + {notificationsAllowed || !('Notification' in window) + ? null + : + } - + Activity @@ -109,12 +123,9 @@ export function NotificationPreferences(props: { - - Save - - +
); diff --git a/pkg/interface/src/views/apps/settings/components/lib/S3Form.tsx b/pkg/interface/src/views/apps/settings/components/lib/S3Form.tsx index 5432215daf..cf07907be5 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/S3Form.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/S3Form.tsx @@ -1,24 +1,15 @@ -import React, { ReactElement, useCallback } from 'react'; -import { Formik, FormikHelpers } from 'formik'; - import { - ManagedTextInputField as Input, - ManagedForm as Form, - Box, - Text, - Button, - Col, - Anchor -} from '@tlon/indigo-react'; -import { AsyncButton } from "~/views/components/AsyncButton"; + Anchor, Col, ManagedForm as Form, ManagedTextInputField as Input, + Text +} from '@tlon/indigo-react'; +import { Formik, FormikHelpers } from 'formik'; +import React, { ReactElement, useCallback } from 'react'; import GlobalApi from '~/logic/api/global'; -import { BucketList } from './BucketList'; -import { S3State } from '~/types/s3-update'; -import useS3State from '~/logic/state/storage'; -import { BackButton } from './BackButton'; -import { StorageState } from '~/types'; import useStorageState from '~/logic/state/storage'; +import { AsyncButton } from '~/views/components/AsyncButton'; +import { BackButton } from './BackButton'; +import { BucketList } from './BucketList'; interface FormSchema { s3bucket: string; @@ -34,7 +25,7 @@ interface S3FormProps { export default function S3Form(props: S3FormProps): ReactElement { const { api } = props; - const s3 = useStorageState((state) => state.s3); + const s3 = useStorageState(state => state.s3); const onSubmit = useCallback(async (values: FormSchema, actions: FormikHelpers) => { if (values.s3secretAccessKey !== s3.credentials?.secretAccessKey) { @@ -56,7 +47,7 @@ export default function S3Form(props: S3FormProps): ReactElement { return ( <> - +
- - + + S3 Storage Setup @@ -81,8 +72,8 @@ export default function S3Form(props: S3FormProps): ReactElement { Learn more @@ -103,8 +94,8 @@ export default function S3Form(props: S3FormProps): ReactElement {
- - + + S3 Buckets diff --git a/pkg/interface/src/views/apps/settings/components/lib/Security.tsx b/pkg/interface/src/views/apps/settings/components/lib/Security.tsx index e577103175..1cb273557b 100644 --- a/pkg/interface/src/views/apps/settings/components/lib/Security.tsx +++ b/pkg/interface/src/views/apps/settings/components/lib/Security.tsx @@ -1,14 +1,11 @@ -import React, { useState } from "react"; import { - Box, - Text, - Button, - Col, - StatelessCheckboxField, -} from "@tlon/indigo-react"; - -import GlobalApi from "~/logic/api/global"; -import { BackButton } from "./BackButton"; + Button, + Col, + StatelessCheckboxField, Text +} from '@tlon/indigo-react'; +import React, { useState } from 'react'; +import GlobalApi from '~/logic/api/global'; +import { BackButton } from './BackButton'; interface SecuritySettingsProps { api: GlobalApi; @@ -18,9 +15,9 @@ export default function SecuritySettings({ api }: SecuritySettingsProps) { const [allSessions, setAllSessions] = useState(false); return ( <> - - - + + + Security Preferences @@ -28,19 +25,19 @@ export default function SecuritySettings({ api }: SecuritySettingsProps) { Manage sessions, login credentials and Landscape access
- + Log out of this session - + {allSessions - ? "You will be logged out of all browsers that have currently logged into your Urbit." - : "You will be logged out of your Urbit on this browser."} + ? 'You will be logged out of all browsers that have currently logged into your Urbit.' + : 'You will be logged out of your Urbit on this browser.'} setAllSessions((s) => !s)} + onChange={() => setAllSessions(s => !s)} > Log out of all sessions @@ -50,7 +47,7 @@ export default function SecuritySettings({ api }: SecuritySettingsProps) { primary destructive border={1} - style={{ cursor: "pointer" }} + style={{ cursor: 'pointer' }} > Logout diff --git a/pkg/interface/src/views/apps/settings/components/lib/ShortcutSettings.tsx b/pkg/interface/src/views/apps/settings/components/lib/ShortcutSettings.tsx new file mode 100644 index 0000000000..e5dca84799 --- /dev/null +++ b/pkg/interface/src/views/apps/settings/components/lib/ShortcutSettings.tsx @@ -0,0 +1,117 @@ +import React, { useCallback, useEffect, useState } from 'react'; +import _ from 'lodash'; + +import { Box, Col, Text } from '@tlon/indigo-react'; +import { Formik, Form, useField } from 'formik'; + +import GlobalApi from '~/logic/api/global'; +import { getChord } from '~/logic/lib/util'; +import useSettingsState, { + selectSettingsState, + ShortcutMapping, +} from '~/logic/state/settings'; +import { AsyncButton } from '~/views/components/AsyncButton'; +import { BackButton } from './BackButton'; + +interface ShortcutSettingsProps { + api: GlobalApi; +} + +const settingsSel = selectSettingsState(['keyboard']); + +export function ChordInput(props: { id: string; label: string }) { + const { id, label } = props; + const [capturing, setCapturing] = useState(false); + const [{ value }, , { setValue }] = useField(id); + const onCapture = useCallback(() => { + setCapturing(true); + }, []); + useEffect(() => { + if (!capturing) { + return; + } + function onKeydown(e: KeyboardEvent) { + if (['Control', 'Shift', 'Meta'].includes(e.key)) { + return; + } + const chord = getChord(e); + setValue(chord); + e.stopImmediatePropagation(); + e.preventDefault(); + setCapturing(false); + } + document.addEventListener('keydown', onKeydown); + return () => { + document.removeEventListener('keydown', onKeydown); + }; + }, [capturing]); + + return ( + <> + + {label} + + + {capturing ? 'Press' : value} + + + ); +} + +export default function ShortcutSettings(props: ShortcutSettingsProps) { + const { api } = props; + + const { keyboard } = useSettingsState(settingsSel); + + return ( + { + const promises = _.map(values, (value, key) => { + return keyboard[key] !== value + ? api.settings.putEntry('keyboard', key, value) + : Promise.resolve(); + }); + await Promise.all(promises); + actions.setStatus({ success: null }); + }} + > +
+ + + + + Shortcuts + + Customize keyboard shortcuts for landscape + + + + + + + + + Save Changes + + +
+ ); +} diff --git a/pkg/interface/src/views/apps/settings/components/settings.tsx b/pkg/interface/src/views/apps/settings/components/settings.tsx index 9c49fd414f..769702e130 100644 --- a/pkg/interface/src/views/apps/settings/components/settings.tsx +++ b/pkg/interface/src/views/apps/settings/components/settings.tsx @@ -1,15 +1,6 @@ -import React from "react"; - -import { Row, Icon, Box, Col, Text } from "@tlon/indigo-react"; - -import GlobalApi from "~/logic/api/global"; -import { StoreState } from "~/logic/store/type"; -import DisplayForm from "./lib/DisplayForm"; -import S3Form from "./lib/S3Form"; -import SecuritySettings from "./lib/Security"; -import { NotificationPreferences } from "./lib/NotificationPref"; -import { CalmPrefs } from "./lib/CalmPref"; -import { Link } from "react-router-dom"; +import { Box, Col, Row, Text } from '@tlon/indigo-react'; +import React from 'react'; +import { Link } from 'react-router-dom'; export function SettingsItem(props: { title: string; @@ -19,14 +10,14 @@ export function SettingsItem(props: { const { to, title, description } = props; return ( - + - + {title} {description} @@ -37,17 +28,17 @@ export function SettingsItem(props: { export default function Settings(props: {}) { return ( - - - System Preferences + + + System Preferences Configure and customize Landscape ( @@ -63,7 +62,7 @@ function SettingsItem(props: { children: ReactNode }) { const { children } = props; return ( - + {children} ); @@ -76,7 +75,8 @@ export default function SettingsScreen(props: any) { useEffect(() => { const debugShower = (event) => { - if (hash) return; + if (hash) +return; if (event.key === '~') { window.location.hash = 'debug'; } @@ -85,7 +85,7 @@ export default function SettingsScreen(props: any) { return () => { document.removeEventListener('keyup', debugShower); - } + }; }, [hash]); return ( @@ -96,25 +96,27 @@ export default function SettingsScreen(props: any) { - + System Preferences + + )} {hash === 'display' && } + {hash === 'dm' && } + {hash === 'shortcuts' && } {hash === 's3' && } {hash === 'leap' && } {hash === 'calm' && } diff --git a/pkg/interface/src/views/apps/term/api.js b/pkg/interface/src/views/apps/term/api.tsx similarity index 87% rename from pkg/interface/src/views/apps/term/api.js rename to pkg/interface/src/views/apps/term/api.tsx index 8216a771dc..077263efc3 100644 --- a/pkg/interface/src/views/apps/term/api.js +++ b/pkg/interface/src/views/apps/term/api.tsx @@ -1,6 +1,9 @@ import _ from 'lodash'; export default class Api { + ship: any; + channel: any; + bindPaths: any[]; constructor(ship, channel) { this.ship = ship; this.channel = channel; @@ -10,7 +13,7 @@ export default class Api { bind(path, method, ship = this.ship, appl = 'herm', success, fail) { this.bindPaths = _.uniq([...this.bindPaths, path]); - window.subscriptionId = this.channel.subscribe(ship, appl, path, + (window as any).subscriptionId = this.channel.subscribe(ship, appl, path, (err) => { fail(err); }, diff --git a/pkg/interface/src/views/apps/term/app.js b/pkg/interface/src/views/apps/term/app.tsx similarity index 88% rename from pkg/interface/src/views/apps/term/app.js rename to pkg/interface/src/views/apps/term/app.tsx index 435db57e88..edd546fdbf 100644 --- a/pkg/interface/src/views/apps/term/app.js +++ b/pkg/interface/src/views/apps/term/app.tsx @@ -1,21 +1,22 @@ -import React, { Component } from 'react'; -import { Route } from 'react-router-dom'; -import Helmet from 'react-helmet'; - -import { History } from './components/history'; -import { Input } from './components/input'; - import { Box, Col } from '@tlon/indigo-react'; - -import Api from './api'; -import Store from './store'; -import Subscription from './subscription'; +import React, { Component } from 'react'; +import Helmet from 'react-helmet'; +import { Route } from 'react-router-dom'; import withState from '~/logic/lib/withState'; import useHarkState from '~/logic/state/hark'; - +import Api from './api'; +import { History } from './components/history'; +import { Input } from './components/input'; import './css/custom.css'; +import Store from './store'; +import Subscription from './subscription'; class TermApp extends Component { + store: Store; + api: any; + subscription: any; + props: any; + state: any; constructor(props) { super(props); this.store = new Store(); @@ -31,7 +32,7 @@ class TermApp extends Component { componentDidMount() { this.resetControllers(); - const channel = new window.channel(); + const channel = new (window as any).channel(); this.api = new Api(this.props.ship, channel); this.store.api = this.api; @@ -65,18 +66,19 @@ class TermApp extends Component { display='flex' > + {/* @ts-ignore declare props in later pass */} + {/* @ts-ignore declare props in later pass */} {this.props.log.map((line, i) => { + // @ts-ignore react memo not passing props return ; })} diff --git a/pkg/interface/src/views/apps/term/components/input.js b/pkg/interface/src/views/apps/term/components/input.tsx similarity index 61% rename from pkg/interface/src/views/apps/term/components/input.js rename to pkg/interface/src/views/apps/term/components/input.tsx index 695c4a80f1..8a8ebc1eb7 100644 --- a/pkg/interface/src/views/apps/term/components/input.js +++ b/pkg/interface/src/views/apps/term/components/input.tsx @@ -1,7 +1,9 @@ +import { BaseInput, Box, Row } from '@tlon/indigo-react'; import React, { Component } from 'react'; -import { Row, Box, BaseInput } from '@tlon/indigo-react'; export class Input extends Component { + inputRef: React.RefObject; + props: any; constructor(props) { super(props); this.state = {}; @@ -13,40 +15,53 @@ export class Input extends Component { componentDidUpdate() { if ( - !document.activeElement == document.body - || document.activeElement == this.inputRef.current + document.activeElement == this.inputRef.current ) { + // @ts-ignore ref type issues this.inputRef.current.focus(); + // @ts-ignore ref type issues this.inputRef.current.setSelectionRange(this.props.cursor, this.props.cursor); } } keyPress(e) { - let key = e.key; + const key = e.key; // let paste and leap events pass - if ((e.getModifierState('Control') || event.getModifierState('Meta')) + if ((e.getModifierState('Control') || e.getModifierState('Meta')) && (e.key === 'v' || e.key === '/')) { return; } let belt = null; - if (key === 'ArrowLeft') belt = {aro: 'l'}; - else if (key === 'ArrowRight') belt = {aro: 'r'}; - else if (key === 'ArrowUp') belt = {aro: 'u'}; - else if (key === 'ArrowDown') belt = {aro: 'd'}; - else if (key === 'Backspace') belt = {bac: null}; - else if (key === 'Delete') belt = {del: null}; - else if (key === 'Tab') belt = {ctl: 'i'}; - else if (key === 'Enter') belt = {ret: null}; - else if (key.length === 1) belt = {txt: [key]}; - else belt = null; + if (key === 'ArrowLeft') +belt = { aro: 'l' }; + else if (key === 'ArrowRight') +belt = { aro: 'r' }; + else if (key === 'ArrowUp') +belt = { aro: 'u' }; + else if (key === 'ArrowDown') +belt = { aro: 'd' }; + else if (key === 'Backspace') +belt = { bac: null }; + else if (key === 'Delete') +belt = { del: null }; + else if (key === 'Tab') +belt = { ctl: 'i' }; + else if (key === 'Enter') +belt = { ret: null }; + else if (key.length === 1) +belt = { txt: [key] }; + else +belt = null; if (belt && e.getModifierState('Control')) { - if (belt.txt !== undefined) belt = {ctl: belt.txt[0]}; + if (belt.txt !== undefined) +belt = { ctl: belt.txt[0] }; } else if (belt && (e.getModifierState('Meta') || e.getModifierState('Alt'))) { - if (belt.bac !== undefined) belt = {met: 'bac'}; + if (belt.bac !== undefined) +belt = { met: 'bac' }; } if (belt !== null) { @@ -57,7 +72,7 @@ export class Input extends Component { } paste(e) { - const clipboardData = e.clipboardData || window.clipboardData; + const clipboardData = e.clipboardData || (window as any).clipboardData; const clipboardText = clipboardData.getData('Text'); this.props.api.belt({ txt: [...clipboardText] }); e.preventDefault(); @@ -76,24 +91,24 @@ export class Input extends Component { if (line.lin) { prompt = line.lin.join(''); } - //TODO render prompt style + // TODO render prompt style else if (line.klr) { prompt = line.klr.reduce((l, p) => (l + p.text.join('')), ''); } } return ( - - + + { - +import React from 'react'; +// @ts-ignore line isn't in props? +export default React.memo(({ line }) => { // line body to jsx - //NOTE lines are lists of characters that might span multiple codepoints + // NOTE lines are lists of characters that might span multiple codepoints // let text = ''; if (line.lin) { text = line.lin.join(''); - } - else if (line.klr) { + } else if (line.klr) { text = line.klr.map((part, i) => { - let prop = part.stye.deco.reduce((prop, deco) => { + const prop = part.stye.deco.reduce((prop, deco) => { switch (deco) { case null: return prop; - case 'br': return {bold: true, ...prop}; - case 'bl': return {className: 'blink', ...prop}; - case 'un': return {style: {textDecoration: 'underline'}, ...prop}; + case 'br': return { bold: true, ...prop }; + case 'bl': return { className: 'blink', ...prop }; + case 'un': return { style: { textDecoration: 'underline' }, ...prop }; default: console.log('weird deco', deco); return prop; } }, {}); @@ -45,8 +43,7 @@ export default React.memo(({line}) => { case 'w': prop.backgroundColor = 'white'; break; default: prop.backgroundColor = '#' + part.stye.back; } - if (Object.keys(prop).length === 0) - { + if (Object.keys(prop).length === 0) { return part.text; } else { return ( @@ -59,7 +56,8 @@ export default React.memo(({line}) => { // render line // return ( - {text} diff --git a/pkg/interface/src/views/apps/term/store.js b/pkg/interface/src/views/apps/term/store.tsx similarity index 74% rename from pkg/interface/src/views/apps/term/store.js rename to pkg/interface/src/views/apps/term/store.tsx index ac74cafe2a..d2166083a4 100644 --- a/pkg/interface/src/views/apps/term/store.js +++ b/pkg/interface/src/views/apps/term/store.tsx @@ -1,7 +1,10 @@ import { saveAs } from 'file-saver'; -import bel from '../../../logic/lib/bel' +import bel from '../../../logic/lib/bel'; export default class Store { + state: any; + api: any; + setState: any; constructor() { this.state = this.initialState(); } @@ -9,19 +12,19 @@ export default class Store { initialState() { return { lines: [''], - cursor: 0, + cursor: 0 }; } clear() { - this.setState(this.initialState()) + this.setState(this.initialState()); } handleEvent(data) { // process slogs // if (data.slog) { - this.state.lines.splice(this.state.lines.length-1, 0, {lin: [data.slog]}); + this.state.lines.splice(this.state.lines.length-1, 0, { lin: [data.slog] }); this.setState({ lines: this.state.lines }); return; } @@ -42,15 +45,15 @@ export default class Store { // codepoints, we need to calculate the byte-wise cursor position // to avoid incorrect cursor rendering. // - let line = this.state.lines[this.state.lines.length - 1]; + const line = this.state.lines[this.state.lines.length - 1]; let hops; if (line.lin) { hops = line.lin.slice(0, blit.hop); - } - else if (line.klr) { + } else if (line.klr) { hops = line.klr.reduce((h, p) => { - if (h.length >= blit.hop) return h; - return [...h, ...p.text.slice(0, blit.hop - h.length)] + if (h.length >= blit.hop) +return h; + return [...h, ...p.text.slice(0, blit.hop - h.length)]; }, []); } this.setState({ cursor: hops.join('').length }); @@ -69,14 +72,15 @@ export default class Store { break; case 'sag': blit.sav = blit.sag; + break; case 'sav': - let name = blit.sav.path.split('/').slice(-2).join('.'); - let buff = new Buffer(blit.sav.file, 'base64'); - let blob = new Blob([buff], {type: 'application/octet-stream'}); + const name = blit.sav.path.split('/').slice(-2).join('.'); + const buff = new Buffer(blit.sav.file, 'base64'); + const blob = new Blob([buff], { type: 'application/octet-stream' }); saveAs(blob, name); break; case 'url': - //TODO too invasive? just print as ? + // TODO too invasive? just print as ? window.open(blit.url); break; default: console.log('weird blit', blit); diff --git a/pkg/interface/src/views/apps/term/subscription.js b/pkg/interface/src/views/apps/term/subscription.tsx similarity index 84% rename from pkg/interface/src/views/apps/term/subscription.js rename to pkg/interface/src/views/apps/term/subscription.tsx index 21f3cc8367..178246e43f 100644 --- a/pkg/interface/src/views/apps/term/subscription.js +++ b/pkg/interface/src/views/apps/term/subscription.tsx @@ -1,4 +1,8 @@ export default class Subscription { + store: any; + api: any; + channel: any; + firstRoundComplete: boolean; constructor(store, api, channel) { this.store = store; this.api = api; @@ -21,25 +25,26 @@ export default class Subscription { let available = false; const slog = new EventSource('/~_~/slog', { withCredentials: true }); - slog.onopen = e => { + slog.onopen = (e) => { console.log('slog: opened stream'); available = true; - } + }; - slog.onmessage = e => { + slog.onmessage = (e) => { this.handleEvent({ slog: e.data }); - } + }; - slog.onerror = e => { + slog.onerror = (e) => { console.error('slog: eventsource error:', e); if (available) { window.setTimeout(() => { - if (slog.readyState !== EventSource.CLOSED) return; + if (slog.readyState !== EventSource.CLOSED) +return; console.log('slog: reconnecting...'); this.setupSlog(); }, 10000); } - } + }; } delete() { @@ -50,13 +55,13 @@ export default class Subscription { console.error('event source error: ', err); console.log('initiating new channel'); this.firstRoundComplete = false; - setTimeout(2000, () => { + setTimeout(() => { this.store.handleEvent({ data: { clear : true } }); this.start(); - }); + }, 2000); } subscribe(path, app) { diff --git a/pkg/interface/src/views/components/ArrayVirtualScroller.tsx b/pkg/interface/src/views/components/ArrayVirtualScroller.tsx new file mode 100644 index 0000000000..8d7570b77a --- /dev/null +++ b/pkg/interface/src/views/components/ArrayVirtualScroller.tsx @@ -0,0 +1,639 @@ +/* eslint-disable valid-jsdoc */ +import { Box, Center, LoadingSpinner } from '@tlon/indigo-react'; +import BigIntArrayOrderedMap, { + arrToString, + stringToArr +} from '@urbit/api/lib/BigIntArrayOrderedMap'; +import bigInt, { BigInteger } from 'big-integer'; +import _ from 'lodash'; +import normalizeWheel from 'normalize-wheel'; +import React, { Component, SyntheticEvent, useCallback } from 'react'; +import styled from 'styled-components'; +import { IS_IOS } from '~/logic/lib/platform'; +import { VirtualContext } from '~/logic/lib/virtualContext'; +import { clamp } from '~/logic/lib/util'; + +const ScrollbarLessBox = styled(Box)` + scrollbar-width: none !important; + + ::-webkit-scrollbar { + display: none; + } +`; + +interface RendererProps { + index: BigInteger[]; + scrollWindow: any; + ref: (el: HTMLElement | null) => void; +} + +export { arrToString, stringToArr }; + +export function indexEqual(a: BigInteger[], b: BigInteger[]) { + const aLen = a.length; + const bLen = b.length; + + if (aLen === bLen) { + let i = 0; + while (i < aLen && i < bLen) { + if (a[i].eq(b[i])) { + if (i === aLen - 1) { + return true; + } + i++; + } else { + return false; + } + } + } + + return false; +} + +interface VirtualScrollerProps { + /** + * Start scroll from + */ + origin: 'top' | 'bottom'; + /** + * Load more of the graph + * + * @returns boolean whether or not the graph is now fully loaded + */ + loadRows(newer: boolean): Promise; + /** + * The data to iterate over + */ + data: BigIntArrayOrderedMap; + /** + * The component to render the items + * + * @remarks + * + * This component must be referentially stable, so either use `useCallback` or + * a instance method. It must also forward the DOM ref from its root DOM node + */ + renderer: (props: RendererProps) => JSX.Element | null; + onStartReached?(): void; + onEndReached?(): void; + size: number; + pendingSize: number; + /** + * Average height of a single rendered item + * + * @remarks + * This is used primarily to calculate how many items should be onscreen. If + * size is variable, err on the lower side. + */ + averageHeight: number; + /** + * The offset to begin rendering at, on load. + * + * @remarks + * This is only looked up once, on component creation. Subsequent changes to + * this prop will have no effect + */ + offset: number; + style?: any; + /** + * Callback to execute when finished loading from start + */ + onBottomLoaded?: () => void; +} + +interface VirtualScrollerState { + visibleItems: BigInteger[][]; + scrollbar: number; + loaded: { + top: boolean; + bottom: boolean; + } +} + +type LogLevel = 'scroll' | 'network' | 'bail' | 'reflow'; +const logLevel = ['network', 'bail', 'scroll', 'reflow'] as LogLevel[]; + +const log = (level: LogLevel, message: string) => { + if(logLevel.includes(level)) { + console.log(`[${level}]: ${message}`); + } +}; + +const ZONE_SIZE = IS_IOS ? 20 : 80; + +// nb: in this file, an index refers to a BigInteger[] and an offset refers to a +// number used to index a listified BigIntArrayOrderedMap + +/** + * A virtualscroller for a `BigIntArrayOrderedMap`. + * + * VirtualScroller does not clean up or reset itself, so please use `key` + * to ensure a new instance is created for each BigIntArrayOrderedMap + */ +export default class ArrayVirtualScroller extends Component, VirtualScrollerState> { + /** + * A reference to our scroll container + */ + window: HTMLDivElement | null = null; + /** + * A map of child refs, used to calculate scroll position + */ + private childRefs = new Map(); + /** + * A set of child refs which have been unmounted + */ + private orphans = new Set(); + /** + * If saving, the bottommost visible element that we pin our scroll to + */ + private savedIndex: BigInteger[] | null = null; + /** + * If saving, the distance between the top of `this.savedEl` and the bottom + * of the screen + */ + private savedDistance = 0; + + /** + * If saving, the number of requested saves. If several images are loading + * at once, we save the scroll pos the first time we see it and restore + * once the number of requested saves is zero + */ + private saveDepth = 0; + + scrollLocked = true; + + private pageSize = 50; + + private pageDelta = 15; + + private scrollRef: HTMLElement | null = null; + + private cleanupRefInterval: NodeJS.Timeout | null = null; + + constructor(props: VirtualScrollerProps) { + super(props); + this.state = { + visibleItems: [], + scrollbar: 0, + loaded: { + top: false, + bottom: false + } + }; + + this.updateVisible = this.updateVisible.bind(this); + + this.invertedKeyHandler = this.invertedKeyHandler.bind(this); + this.onScroll = IS_IOS ? _.debounce(this.onScroll.bind(this), 200) : this.onScroll.bind(this); + this.scrollKeyMap = this.scrollKeyMap.bind(this); + this.setWindow = this.setWindow.bind(this); + this.restore = this.restore.bind(this); + this.startOffset = this.startOffset.bind(this); + } + + componentDidMount() { + this.updateVisible(0); + this.loadTop(); + this.loadBottom(); + this.cleanupRefInterval = setInterval(this.cleanupRefs, 5000); + } + + cleanupRefs = () => { + if(this.saveDepth > 0) { + return; + } + [...this.orphans].forEach((o) => { + this.childRefs.delete(o); + }); + this.orphans.clear(); + }; + + // manipulate scrollbar manually, to dodge change detection + updateScroll = IS_IOS ? () => {} : _.throttle(() => { + if(!this.window || !this.scrollRef) { + return; + } + const { scrollTop, scrollHeight } = this.window; + + const unloaded = (this.startOffset() / this.pageSize); + const totalpages = this.props.size / this.pageSize; + + const loaded = (scrollTop / scrollHeight); + const result = ((unloaded + loaded) / totalpages) * this.window.offsetHeight; + this.scrollRef.style[this.props.origin] = `${result}px`; + }, 50); + + componentDidUpdate(prevProps: VirtualScrollerProps, _prevState: VirtualScrollerState) { + const { size, pendingSize } = this.props; + + if(size !== prevProps.size || pendingSize !== prevProps.pendingSize) { + if((this.window?.scrollTop ?? 0) < ZONE_SIZE) { + this.scrollLocked = true; + this.updateVisible(0); + this.resetScroll(); + } + } + } + + componentWillUnmount() { + window.removeEventListener('keydown', this.invertedKeyHandler); + if(this.cleanupRefInterval) { + clearInterval(this.cleanupRefInterval); + } + this.cleanupRefs(); + this.childRefs.clear(); + } + + startOffset() { + const { data } = this.props; + const startIndex = this.state.visibleItems?.[0]; + if(!startIndex) { + return 0; + } + const dataList = Array.from(data); + const offset = dataList.findIndex(([i]) => indexEqual(i, startIndex)); + if(offset === -1) { + // TODO: revisit when we remove nodes for any other reason than + // pending indices being removed + return 0; + } + return offset; + } + + /** + * Updates the `startOffset` and adjusts visible items accordingly. + * Saves the scroll positions before repainting and restores it afterwards + * + * @param newOffset new startOffset + */ + updateVisible(newOffset: number) { + if (!this.window) { + return; + } + log('reflow', `from: ${this.startOffset()} to: ${newOffset}`); + + const { data } = this.props; + const visibleItems = data.keys().slice(newOffset, newOffset + this.pageSize); + + this.save(); + + this.setState({ + visibleItems + }); + requestAnimationFrame(() => { + this.restore(); + }); + } + + scrollKeyMap(): Map { + return new Map([ + ['ArrowUp', this.props.averageHeight], + ['ArrowDown', this.props.averageHeight * -1], + ['PageUp', this.window!.offsetHeight], + ['PageDown', this.window!.offsetHeight * -1], + ['Home', this.window!.scrollHeight], + ['End', this.window!.scrollHeight * -1], + ['Space', this.window!.offsetHeight * -1] + ]); + } + + invertedKeyHandler(event): void | false { + const map = this.scrollKeyMap(); + if (map.has(event.code) && document.body.isSameNode(document.activeElement)) { + event.preventDefault(); + event.stopImmediatePropagation(); + let distance = map.get(event.code)!; + if (event.code === 'Space' && event.shiftKey) { + distance = distance * -1; + } + this.window!.scrollBy(0, distance); + return false; + } + } + + setWindow(element) { + if (!element) + return; + this.save(); + + if (this.window) { + if (this.window.isSameNode(element)) { + return; + } else { + window.removeEventListener('keydown', this.invertedKeyHandler); + } + } + const { averageHeight } = this.props; + + this.window = element; + this.pageSize = Math.floor(element.offsetHeight / Math.floor(averageHeight / 2)); + this.pageDelta = Math.floor(this.pageSize / 4); + + if (this.props.origin === 'bottom') { + element.addEventListener('wheel', (event) => { + event.preventDefault(); + const normalized = normalizeWheel(event); + element.scrollBy(0, normalized.pixelY * -1); + return false; + }, { passive: false }); + + window.addEventListener('keydown', this.invertedKeyHandler, { passive: false }); + } + this.restore(); + } + + resetScroll() { + if (!this.window) { + return; + } + this.window.scrollTop = 0; + this.savedIndex = null; + this.savedDistance = 0; + this.saveDepth = 0; + } + loadTop = _.throttle(() => this.loadRows(false), 100); + loadBottom = _.throttle(() => this.loadRows(true), 100); + + loadRows = async (newer: boolean) => { + const dir = newer ? 'bottom' : 'top'; + if(this.state.loaded[dir]) { + return; + } + log('network', `loading more at ${dir}`); + const done = await this.props.loadRows(newer); + if(done) { + this.setState({ + loaded: { + ...this.state.loaded, + [dir]: done + } + }); + if(newer && this.props.onBottomLoaded) { + this.props.onBottomLoaded(); + } + } + }; + + onScroll(event: SyntheticEvent) { + this.updateScroll(); + if(!this.window) { + // bail if we're going to adjust scroll anyway + return; + } + if(this.saveDepth > 0) { + log('bail', 'deep scroll queue'); + return; + } + const { onStartReached, onEndReached } = this.props; + const windowHeight = this.window.offsetHeight; + const { scrollTop, scrollHeight } = this.window; + + const startOffset = this.startOffset(); + + if (scrollTop < ZONE_SIZE) { + log('scroll', `Entered start zone ${scrollTop}`); + if (startOffset === 0) { + onStartReached && onStartReached(); + this.scrollLocked = true; + } + + const newOffset = + clamp(startOffset - this.pageDelta, 0, this.props.data.size - this.pageSize); + if(newOffset < 10) { + this.loadBottom(); + } + + if(newOffset !== startOffset) { + this.updateVisible(newOffset); + } + } else if (scrollTop + windowHeight >= scrollHeight - ZONE_SIZE) { + this.scrollLocked = false; + log('scroll', `Entered end zone ${scrollTop}`); + + const newOffset = + clamp(startOffset + this.pageDelta, 0, this.props.data.size - this.pageSize); + if (onEndReached && startOffset === 0) { + onEndReached(); + } + + if((newOffset + (3 * this.pageSize) > this.props.data.size)) { + this.loadTop(); + } + + if(newOffset !== startOffset) { + this.updateVisible(newOffset); + } + } else { + this.scrollLocked = false; + } + } + + restore() { + if(!this.window || !this.savedIndex) { + return; + } + if(this.saveDepth !== 1) { + log('bail', 'Deep restore'); + return; + } + if(this.scrollLocked) { + this.resetScroll(); + requestAnimationFrame(() => { + this.savedIndex = null; + this.savedDistance = 0; + this.saveDepth--; + }); + return; + } + + const ref = this.childRefs.get(arrToString(this.savedIndex)); + if(!ref) { + return; + } + + const newScrollTop = this.props.origin === 'top' + ? this.savedDistance + ref.offsetTop + : this.window.scrollHeight - ref.offsetTop - this.savedDistance; + + this.window.scrollTo(0, newScrollTop); + requestAnimationFrame(() => { + this.savedIndex = null; + this.savedDistance = 0; + this.saveDepth--; + }); + } + + scrollToIndex = (index: BigInteger[]) => { + let ref = this.childRefs.get(arrToString(index)); + if(!ref) { + const offset = [...this.props.data].findIndex(([idx]) => indexEqual(idx, index)); + if(offset === -1) { + return; + } + this.scrollLocked = false; + this.updateVisible(Math.max(offset - this.pageDelta, 0)); + requestAnimationFrame(() => { + ref = this.childRefs.get(arrToString(index)); + requestAnimationFrame(() => { + this.savedIndex = null; + this.savedDistance = 0; + this.saveDepth = 0; + }); + + ref?.scrollIntoView({ block: 'center' }); + }); + } else { + ref?.scrollIntoView({ block: 'center' }); + requestAnimationFrame(() => { + this.savedIndex = null; + this.savedDistance = 0; + this.saveDepth = 0; + }); + } + }; + + save() { + if(!this.window || this.savedIndex) { + return; + } + if(this.saveDepth !== 0) { + return; + } + + log('scroll', 'saving...'); + + this.saveDepth++; + const { visibleItems } = this.state; + + let bottomIndex = visibleItems[visibleItems.length - 1]; + const { scrollTop, scrollHeight } = this.window; + const topSpacing = this.props.origin === 'top' ? scrollTop : scrollHeight - scrollTop; + const items = this.props.origin === 'top' ? visibleItems : [...visibleItems].reverse(); + items.forEach((index) => { + const el = this.childRefs.get(arrToString(index)); + if(!el) { + return; + } + const { offsetTop } = el; + if(offsetTop < topSpacing) { + bottomIndex = index; + } + }); + + if(!bottomIndex) { + // weird, shouldn't really happen + this.saveDepth--; + log('bail', 'no index found'); + return; + } + + this.savedIndex = bottomIndex; + const ref = this.childRefs.get(arrToString(bottomIndex))!; + if(!ref) { + this.saveDepth--; + log('bail', 'missing ref'); + return; + } + const { offsetTop } = ref; + this.savedDistance = topSpacing - offsetTop; + } + + // disabled until we work out race conditions with loading new nodes + shiftLayout = { save: () => {}, restore: () => {} }; + + setRef = (element: HTMLElement | null, index: BigInteger[]) => { + if(element) { + this.childRefs.set(arrToString(index), element); + this.orphans.delete(arrToString(index)); + } else { + this.orphans.add(arrToString(index)); + } + } + + render() { + const { + visibleItems + } = this.state; + + const { + origin = 'top', + renderer, + style + } = this.props; + + const isTop = origin === 'top'; + + const transform = isTop ? 'scale3d(1, 1, 1)' : 'scale3d(1, -1, 1)'; + const children = isTop ? visibleItems : [...visibleItems].reverse(); + + const atStart = + indexEqual( + (this.props.data.peekLargest()?.[0] ?? [bigInt.zero]), + (visibleItems?.[0] || [bigInt.zero]) + ); + + const atEnd = + indexEqual( + (this.props.data.peekSmallest()?.[0] ?? [bigInt.zero]), + (visibleItems?.[visibleItems.length - 1] || [bigInt.zero]) + ); + + return ( + <> + {!IS_IOS && ( { + this.scrollRef = el; +}} +right={0} height="50px" +position="absolute" width="4px" +backgroundColor="lightGray" + />)} + + + + {(isTop ? !atStart : !atEnd) && ( +
+ +
+ )} + + {children.map(index => ( + + ))} + + {(!isTop ? !atStart : !atEnd) && + (
+ +
)} +
+
+ + ); + } +} + +interface VirtualChildProps { + index: BigInteger[]; + scrollWindow: any; + setRef: (el: HTMLElement | null, index: BigInteger[]) => void; + renderer: (p: RendererProps) => JSX.Element | null; +} + +function VirtualChild(props: VirtualChildProps) { + const { setRef, renderer: Renderer, ...rest } = props; + + const ref = useCallback((el: HTMLElement | null) => { + setRef(el, props.index); + // VirtualChild should always be keyed on the index, so the index should be + // valid for the entire lifecycle of the component, hence no dependencies + }, []); + + return ; +} + diff --git a/pkg/interface/src/views/components/AsyncButton.tsx b/pkg/interface/src/views/components/AsyncButton.tsx index bc1120b12e..d6341ff21e 100644 --- a/pkg/interface/src/views/components/AsyncButton.tsx +++ b/pkg/interface/src/views/components/AsyncButton.tsx @@ -1,8 +1,6 @@ -import React, { useState, useEffect } from 'react'; - import { Button, LoadingSpinner } from '@tlon/indigo-react'; - import { useFormikContext } from 'formik'; +import React, { useEffect, useState } from 'react'; export function AsyncButton({ children, diff --git a/pkg/interface/src/views/components/Author.tsx b/pkg/interface/src/views/components/Author.tsx index 41d0fb723b..6cfd8b5d49 100644 --- a/pkg/interface/src/views/components/Author.tsx +++ b/pkg/interface/src/views/components/Author.tsx @@ -1,22 +1,18 @@ -import React, { ReactElement, ReactNode, useState } from 'react'; +import { BaseImage, Box, Row } from '@tlon/indigo-react'; import moment from 'moment'; -import { useHistory } from 'react-router-dom'; - -import { Col, Row, Box, BaseImage } from '@tlon/indigo-react'; -import { Contacts } from '@urbit/api/contacts'; -import { Group } from '@urbit/api'; - -import { uxToHex, cite, useShowNickname, deSig } from '~/logic/lib/util'; -import useSettingsState, {selectCalmState} from "~/logic/state/settings"; -import useLocalState from "~/logic/state/local"; +import React, { ReactElement, ReactNode } from 'react'; +import GlobalApi from '~/logic/api/global'; import { Sigil } from '~/logic/lib/sigil'; -import Timestamp from './Timestamp'; -import useContactState from '~/logic/state/contact'; import { useCopy } from '~/logic/lib/useCopy'; -import ProfileOverlay from './ProfileOverlay'; +import { cite, deSig, useShowNickname, uxToHex } from '~/logic/lib/util'; +import useContactState from '~/logic/state/contact'; +import useLocalState from '~/logic/state/local'; +import useSettingsState, { selectCalmState } from '~/logic/state/settings'; import { PropFunc } from '~/types'; +import ProfileOverlay from './ProfileOverlay'; +import Timestamp from './Timestamp'; -interface AuthorProps { +export interface AuthorProps { ship: string; date?: number; showImage?: boolean; @@ -24,6 +20,8 @@ interface AuthorProps { unread?: boolean; api?: GlobalApi; size?: number; + lineHeight?: string | number; + isRelativeTime?: boolean; } // eslint-disable-next-line max-lines-per-function @@ -35,21 +33,20 @@ export default function Author(props: AuthorProps & PropFunc): React fullNotIcon, children, unread, - group, isRelativeTime, dontShowTime, + lineHeight = 'tall', ...rest } = props; - const time = props.time || false; + const time = props.time || props.date || false; const size = props.size || 16; const sigilPadding = props.sigilPadding || 2; - const history = useHistory(); - const osDark = useLocalState((state) => state.dark); + const osDark = useLocalState(state => state.dark); const theme = useSettingsState(s => s.display.theme); - const dark = theme === 'dark' || (theme === 'auto' && osDark) + const dark = theme === 'dark' || (theme === 'auto' && osDark); let contact; const contacts = useContactState(state => state.contacts); @@ -61,13 +58,7 @@ export default function Author(props: AuthorProps & PropFunc): React const { hideAvatars } = useSettingsState(selectCalmState); const name = showNickname && contact ? contact.nickname : cite(ship); const stamp = moment(date); - const { copyDisplay, doCopy, didCopy } = useCopy(`~${ship}`, name); - - const [showOverlay, setShowOverlay] = useState(false); - - const toggleOverlay = () => { - setShowOverlay(value => !value); - }; + const { copyDisplay, doCopy } = useCopy(`~${ship}`, name); const sigil = fullNotIcon ? ( @@ -89,13 +80,10 @@ export default function Author(props: AuthorProps & PropFunc): React ) : sigil; return ( - + { - e.stopPropagation(); - toggleOverlay(); - }} - height={size} + height={`${size}px`} + overflow='hidden' position='relative' cursor='pointer' > @@ -105,30 +93,34 @@ export default function Author(props: AuthorProps & PropFunc): React )} - - {copyDisplay} + + + {copyDisplay} + + { !dontShowTime && time && ( + + )} + {children} - { !dontShowTime && time && ( - - )} - {children} ); } diff --git a/pkg/interface/src/views/components/Body.tsx b/pkg/interface/src/views/components/Body.tsx index 1f33b95752..ca119bc516 100644 --- a/pkg/interface/src/views/components/Body.tsx +++ b/pkg/interface/src/views/components/Body.tsx @@ -1,6 +1,5 @@ -import React, { ReactNode } from 'react'; - import { Box } from '@tlon/indigo-react'; +import React, { ReactNode } from 'react'; export function Body( props: { children: ReactNode } & Parameters[0] diff --git a/pkg/interface/src/views/components/ChipInput.tsx b/pkg/interface/src/views/components/ChipInput.tsx index 02471d817d..bc075d86f2 100644 --- a/pkg/interface/src/views/components/ChipInput.tsx +++ b/pkg/interface/src/views/components/ChipInput.tsx @@ -1,31 +1,28 @@ -import React, { - useCallback, - useState, - ReactNode, - useEffect, - useRef, - ReactElement -} from 'react'; +import { + Col, + + ErrorLabel, Label, + Row, + + StatelessTextInput as Input +} from '@tlon/indigo-react'; import { useField } from 'formik'; import Mousetrap from 'mousetrap'; +import React, { + ReactElement, ReactNode, useCallback, -import { - Label, - Row, - Col, - StatelessTextInput as Input, - ErrorLabel -} from '@tlon/indigo-react'; - + useEffect, + useRef, useState +} from 'react'; function Chip(props: { children: ReactNode }): ReactElement { return ( @@ -96,15 +93,15 @@ export function ChipInput(props: ChipInputProps): ReactElement { }, [inputRef.current, addNewChip, newChip]); return ( - + {caption && } - + {meta.error} diff --git a/pkg/interface/src/views/components/ColorInput.tsx b/pkg/interface/src/views/components/ColorInput.tsx index 0a4036e7c6..935bf39b8f 100644 --- a/pkg/interface/src/views/components/ColorInput.tsx +++ b/pkg/interface/src/views/components/ColorInput.tsx @@ -1,18 +1,16 @@ -import React, { FormEvent, ReactElement } from 'react'; -import { useField } from 'formik'; - import { - Col, - Label, - Row, - Box, - ErrorLabel, - StatelessTextInput as Input -} from '@tlon/indigo-react'; + Box, Col, + ErrorLabel, Label, + Row, + + StatelessTextInput as Input +} from '@tlon/indigo-react'; +import { useField } from 'formik'; +import React, { FormEvent } from 'react'; import { hexToUx } from '~/logic/lib/util'; -type ColorInputProps = Parameters[0] & { +export type ColorInputProps = Parameters[0] & { id: string; label?: string; placeholder?: string; @@ -42,11 +40,11 @@ export function ColorInput(props: ColorInputProps) { {caption ? ( - - + {meta.error}
diff --git a/pkg/interface/src/views/components/CommentInput.tsx b/pkg/interface/src/views/components/CommentInput.tsx index df61fc1618..9e9809288b 100644 --- a/pkg/interface/src/views/components/CommentInput.tsx +++ b/pkg/interface/src/views/components/CommentInput.tsx @@ -1,8 +1,8 @@ +import { ManagedTextAreaField as TextArea } from '@tlon/indigo-react'; +import { Form, Formik, FormikHelpers, useFormikContext } from 'formik'; import React from 'react'; import * as Yup from 'yup'; -import { Formik, FormikHelpers, Form, useFormikContext } from 'formik'; import { AsyncButton } from './AsyncButton'; -import { ManagedTextAreaField as TextArea } from '@tlon/indigo-react'; interface FormSchema { comment: string; diff --git a/pkg/interface/src/views/components/CommentItem.tsx b/pkg/interface/src/views/components/CommentItem.tsx index f652731895..68401d2f98 100644 --- a/pkg/interface/src/views/components/CommentItem.tsx +++ b/pkg/interface/src/views/components/CommentItem.tsx @@ -1,26 +1,17 @@ -import React, {useEffect, useRef, useCallback} from 'react'; -import { Link, useHistory } from 'react-router-dom'; -import styled from 'styled-components'; - -import { Box, Row, Text, Action } from '@tlon/indigo-react'; -import { Contacts } from '@urbit/api/contacts'; -import { GraphNode } from '@urbit/api/graph'; +import { Action, Box, Row, Text } from '@tlon/indigo-react'; import { Group } from '@urbit/api'; - +import { GraphNode } from '@urbit/api/graph'; +import bigInt from 'big-integer'; +import React, { useCallback, useEffect, useRef } from 'react'; +import { Link } from 'react-router-dom'; import GlobalApi from '~/logic/api/global'; -import Author from '~/views/components/Author'; -import { MentionText } from '~/views/components/MentionText'; import { roleForShip } from '~/logic/lib/group'; +import { getPermalinkForGraph } from '~/logic/lib/permalinks'; import { getLatestCommentRevision } from '~/logic/lib/publish'; -import {useCopy} from '~/logic/lib/useCopy'; -import { getPermalinkForGraph} from '~/logic/lib/permalinks'; +import { useCopy } from '~/logic/lib/useCopy'; import useMetadataState from '~/logic/state/metadata'; -import {GraphContentWide} from '../landscape/components/Graph/GraphContentWide'; - -const ClickBox = styled(Box)` - cursor: pointer; - padding-left: ${p => p.theme.space[2]}px; -`; +import Author from '~/views/components/Author'; +import { GraphContent } from '../landscape/components/Graph/GraphContent'; interface CommentItemProps { pending?: boolean; @@ -34,19 +25,46 @@ interface CommentItemProps { highlighted: boolean; } -export function CommentItem(props: CommentItemProps): ReactElement { +export function CommentItem(props: CommentItemProps) { + let { highlighted } = props; const { ship, name, api, comment, group } = props; const association = useMetadataState( useCallback(s => s.associations.graph[`/ship/${ship}/${name}`], [ship,name]) ); - const ref = useRef(null); + const ref = useRef(null); const [, post] = getLatestCommentRevision(comment); const disabled = props.pending; const onDelete = async () => { - await api.graph.removeNodes(ship, name, [comment.post?.index]); + const revs = comment.children.get(bigInt(1)); + const children = Array.from(revs.children); + const indices = []; + for (const child in children) { + const node = children[child] as any; + if (!node?.post || typeof node.post !== 'string') { + indices.push(node.post?.index); + } + } + + await api.graph.removePosts(ship, name, [ + comment.post?.index, + revs?.post?.index, + ...indices + ]); }; + const ourMention = post?.contents?.some((e) => { + if (!('mention' in e)) +return false; + return e?.mention && e?.mention === window.ship; + }); + + if (!highlighted) { + if (ourMention) { + highlighted = true; + } + } + const commentIndexArray = (comment.post?.index || '/').split('/'); const commentIndex = commentIndexArray[commentIndexArray.length - 1]; @@ -54,62 +72,70 @@ export function CommentItem(props: CommentItemProps): ReactElement { const ourRole = roleForShip(group, window.ship); if (window.ship == post?.author && !disabled) { adminLinks.push( - + Update - ) - }; + ); + } - if ((window.ship == post?.author || ourRole == "admin") && !disabled) { + if ((window.ship == post?.author || ourRole == 'admin') && !disabled) { adminLinks.push( Delete - ) - }; + ); + } useEffect(() => { if(ref.current && props.highlighted) { ref.current.scrollIntoView({ block: 'center' }); } }, [ref, props.highlighted]); - const history = useHistory(); const { copyDisplay, doCopy } = useCopy( getPermalinkForGraph( association.group, association.resource, - post.index.split('/').slice(0, -1).join('/') + post?.index?.split('/').slice(0, -1).join('/') ), 'Copy Link' ); + if (!post || typeof post === 'string' || typeof comment.post === 'string') { + return ( + + This comment has been deleted. + + ); + } + return ( - + - + {copyDisplay} {adminLinks} - diff --git a/pkg/interface/src/views/components/Comments.tsx b/pkg/interface/src/views/components/Comments.tsx index 16c6bf2db2..c9e0a6060b 100644 --- a/pkg/interface/src/views/components/Comments.tsx +++ b/pkg/interface/src/views/components/Comments.tsx @@ -1,21 +1,20 @@ -import React, { useEffect, useMemo } from 'react'; -import bigInt from 'big-integer'; import { Col } from '@tlon/indigo-react'; -import { CommentItem } from './CommentItem'; -import CommentInput from './CommentInput'; -import { Contacts } from '@urbit/api/contacts'; -import GlobalApi from '~/logic/api/global'; +import { Association, GraphNode, Group } from '@urbit/api'; +import bigInt from 'big-integer'; import { FormikHelpers } from 'formik'; -import { Group, GraphNode, Association } from '@urbit/api'; -import { createPost, createBlankNodeWithChildPost } from '~/logic/api/graph'; +import React, { useEffect, useMemo } from 'react'; +import GlobalApi from '~/logic/api/global'; +import { createBlankNodeWithChildPost, createPost } from '~/logic/api/graph'; +import { isWriter } from '~/logic/lib/group'; +import { getUnreadCount } from '~/logic/lib/hark'; +import { referenceToPermalink } from '~/logic/lib/permalinks'; import { getLatestCommentRevision } from '~/logic/lib/publish'; import tokenizeMessage from '~/logic/lib/tokenizeMessage'; -import { getUnreadCount } from '~/logic/lib/hark'; -import { PropFunc } from '~/types/util'; -import { isWriter } from '~/logic/lib/group'; +import { useQuery } from '~/logic/lib/useQuery'; import useHarkState from '~/logic/state/hark'; -import {useQuery} from '~/logic/lib/useQuery'; -import {referenceToPermalink} from '~/logic/lib/permalinks'; +import { PropFunc } from '~/types/util'; +import CommentInput from './CommentInput'; +import { CommentItem } from './CommentItem'; interface CommentsProps { comments: GraphNode; @@ -42,16 +41,15 @@ export function Comments(props: CommentsProps & PropFunc) { const { query } = useQuery(); const selectedComment = useMemo(() => { - const id = query.get('selected') + const id = query.get('selected'); return id ? bigInt(id) : null; }, [query]); const editCommentId = useMemo(() => { - const id = query.get('edit') + const id = query.get('edit'); return id || ''; }, [query]); - const onSubmit = async ( { comment }, actions: FormikHelpers<{ comment: string }> @@ -84,7 +82,7 @@ export function Comments(props: CommentsProps & PropFunc) { const post = createPost( content, commentNode.post.index, - parseInt(idx + 1, 10) + parseInt((idx + 1).toString(), 10).toString() ); await api.graph.addPost(ship, name, post); history.push(baseUrl); @@ -130,7 +128,7 @@ export function Comments(props: CommentsProps & PropFunc) { const canComment = isWriter(group, association.resource) || association.metadata.vip === 'reader-comments'; return ( - + {( !editCommentId && canComment ? : null )} {( editCommentId ? ( (null); - const anchorRef = useRef(null); + const { children, options, offsetX = 0, offsetY = 0, flexShrink = 1 } = props; + const dropdownRef = useRef(null); + const anchorRef = useRef(null); const { pathname } = useLocation(); const [open, setOpen] = useState(false); const [coords, setCoords] = useState({}); const updatePos = useCallback(() => { + if(!anchorRef.current) { + return; + } const newCoords = getRelativePosition(anchorRef.current, props.alignX, props.alignY, offsetX, offsetY); if(newCoords) { setCoords(newCoords); @@ -86,7 +84,7 @@ export function Dropdown(props: DropdownProps): ReactElement { }, []); return ( - + {children} diff --git a/pkg/interface/src/views/components/DropdownSearch.tsx b/pkg/interface/src/views/components/DropdownSearch.tsx index 39a69c49ed..e2ba2dd2e2 100644 --- a/pkg/interface/src/views/components/DropdownSearch.tsx +++ b/pkg/interface/src/views/components/DropdownSearch.tsx @@ -1,20 +1,15 @@ -import React, { - useRef, - useState, - useMemo, - useCallback, - useEffect, - ChangeEvent, - ReactElement -} from 'react'; +import { + Box, + StatelessTextInput as Input +} from '@tlon/indigo-react'; import _ from 'lodash'; import Mousetrap from 'mousetrap'; - -import { - Box, - StatelessTextInput as Input -} from '@tlon/indigo-react'; - +import React, { + ChangeEvent, + ReactElement, useCallback, + useEffect, useMemo, useRef, + useState +} from 'react'; import { useDropdown } from '~/logic/lib/useDropdown'; import { PropFunc } from '~/types/util'; @@ -45,7 +40,7 @@ type DropdownSearchProps = PropFunc & DropdownSearchExtraProps; export function DropdownSearch(props: DropdownSearchProps): ReactElement { - const textarea = useRef(); + const textarea = useRef(null); const { candidates, getKey, @@ -134,6 +129,7 @@ export function DropdownSearch(props: DropdownSearchProps): ReactElement { return ( + { /* @ts-ignore investigate onblur on styled-system component later */} (props: DropdownSearchProps): ReactElement { /> {dropdown.length !== 0 && query.length !== 0 && ( { body =`\`\`\`%0A${error.stack?.replaceAll('\n', '%0A')}%0A\`\`\``; } return ( - + {code ? code : 'Error'} diff --git a/pkg/interface/src/views/components/ErrorBoundary.tsx b/pkg/interface/src/views/components/ErrorBoundary.tsx index 6ab7516a6c..2c7ab28db1 100644 --- a/pkg/interface/src/views/components/ErrorBoundary.tsx +++ b/pkg/interface/src/views/components/ErrorBoundary.tsx @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import { RouteComponentProps, withRouter } from 'react-router-dom'; import StackTrace from 'stacktrace-js'; -import ErrorComponent from './Error'; import { Spinner } from '~/views/components/Spinner'; +import ErrorComponent from './Error'; class ErrorBoundary extends Component< RouteComponentProps, @@ -23,12 +23,12 @@ class ErrorBoundary extends Component< componentDidCatch(error: Error) { this.setState({ error: true }); - StackTrace.fromError(error).then(stackframes => { - const stack = stackframes.map(frame => { + StackTrace.fromError(error).then((stackframes) => { + const stack = stackframes.map((frame) => { return `${frame.functionName} (${frame.fileName} ${frame.lineNumber}:${frame.columnNumber})`; }).join('\n'); error = { name: error.name, message: error.message, stack }; - this.setState({ error }) + this.setState({ error }); }); return false; } diff --git a/pkg/interface/src/views/components/FormError.tsx b/pkg/interface/src/views/components/FormError.tsx index ed10100a86..e34839874f 100644 --- a/pkg/interface/src/views/components/FormError.tsx +++ b/pkg/interface/src/views/components/FormError.tsx @@ -1,6 +1,6 @@ -import React from 'react'; -import { useFormikContext } from 'formik'; import { ErrorLabel } from '@tlon/indigo-react'; +import { useFormikContext } from 'formik'; +import React from 'react'; import { PropFunc } from '~/types/util'; export function FormError(props: { message?: string } & PropFunc) { diff --git a/pkg/interface/src/views/components/FormGroup.tsx b/pkg/interface/src/views/components/FormGroup.tsx index 9295355d6b..84a5cc0910 100644 --- a/pkg/interface/src/views/components/FormGroup.tsx +++ b/pkg/interface/src/views/components/FormGroup.tsx @@ -1,18 +1,16 @@ +import { Box, Button, Row } from '@tlon/indigo-react'; +import { useFormikContext } from 'formik'; +import _ from 'lodash'; import React, { - ReactNode, - useEffect, - useCallback, - useState, - useMemo, -} from "react"; -import { Button, Box, Row, Col } from "@tlon/indigo-react"; -import _ from "lodash"; -import { useFormikContext } from "formik"; -import { PropFunc } from "~/types"; -import { FormGroupContext, SubmitHandler } from "~/logic/lib/formGroup"; -import { StatelessAsyncButton } from "./StatelessAsyncButton"; -import { Prompt } from "react-router-dom"; -import { usePreventWindowUnload } from "~/logic/lib/util"; + useCallback, useEffect, + + useMemo, useState +} from 'react'; +import { Prompt } from 'react-router-dom'; +import { FormGroupContext, SubmitHandler } from '~/logic/lib/formGroup'; +import { usePreventWindowUnload } from '~/logic/lib/util'; +import { PropFunc } from '~/types'; +import { StatelessAsyncButton } from './StatelessAsyncButton'; export function useFormGroupContext(id: string) { const ctx = React.useContext(FormGroupContext); @@ -47,7 +45,7 @@ export function useFormGroupContext(id: string) { onDirty, addSubmit, onErrors, - addReset, + addReset }; } @@ -69,7 +67,6 @@ export function FormGroupChild(props: { id: string }) { resetForm({ touched: {}, values }); } addSubmit(submit); - }, [submitForm, values]); useEffect(() => { @@ -77,7 +74,7 @@ export function FormGroupChild(props: { id: string }) { }, [dirty, onDirty]); useEffect(() => { - onErrors(_.keys(_.pickBy(errors, (s) => !!s)).length > 0); + onErrors(_.keys(_.pickBy(errors, s => Boolean(s))).length > 0); }, [errors, onErrors]); useEffect(() => { @@ -97,11 +94,11 @@ export function FormGroup(props: { onReset?: () => void; } & PropFunc); const [errors, setErrors] = useState({} as Record); const addSubmit = useCallback((id: string, s: SubmitHandler) => { - setSubmits((ss) => ({ ...ss, [id]: s })); + setSubmits(ss => ({ ...ss, [id]: s })); }, []); const resetAll = useCallback(() => { - _.map(resets, (r) => r()); + _.map(resets, r => r()); onReset && onReset(); }, [resets, onReset]); @@ -109,29 +106,29 @@ export function FormGroup(props: { onReset?: () => void; } & PropFunc dirty[k]), - (f) => f() + f => f() ) ); }, [submits, dirty]); const onDirty = useCallback( (id: string, t: boolean) => { - setDirty((ts) => ({ ...ts, [id]: t })); + setDirty(ts => ({ ...ts, [id]: t })); }, [setDirty] ); const onErrors = useCallback((id: string, e: boolean) => { - setErrors((es) => ({ ...es, [id]: e })); + setErrors(es => ({ ...es, [id]: e })); }, []); const addReset = useCallback((id: string, reset: () => void) => { - setResets((rs) => ({ ...rs, [id]: reset })); + setResets(rs => ({ ...rs, [id]: reset })); }, []); const context = { addSubmit, submitAll, onErrors, onDirty, addReset }; const hasErrors = useMemo( - () => _.keys(_.pickBy(errors, (s) => !!s)).length > 0, + () => _.keys(_.pickBy(errors, s => Boolean(s))).length > 0, [errors] ); const isDirty = useMemo( @@ -155,10 +152,10 @@ export function FormGroup(props: { onReset?: () => void; } & PropFunc diff --git a/pkg/interface/src/views/components/FormSubmit.tsx b/pkg/interface/src/views/components/FormSubmit.tsx index 8cad049ab9..ad53f6b3f0 100644 --- a/pkg/interface/src/views/components/FormSubmit.tsx +++ b/pkg/interface/src/views/components/FormSubmit.tsx @@ -1,6 +1,6 @@ -import React, { useCallback, ReactNode, ReactElement } from 'react'; +import { Button, Row } from '@tlon/indigo-react'; import { useFormikContext } from 'formik'; -import { Row, Button } from '@tlon/indigo-react'; +import React, { ReactElement, ReactNode, useCallback } from 'react'; import { AsyncButton } from './AsyncButton'; interface FormSubmitProps { @@ -22,10 +22,10 @@ export function FormSubmit(props: FormSubmitProps): ReactElement { return ( {dirty && !isSubmitting && ( diff --git a/pkg/interface/src/views/components/FormikOnBlur.tsx b/pkg/interface/src/views/components/FormikOnBlur.tsx index 6b444b1b90..9f09d67ff3 100644 --- a/pkg/interface/src/views/components/FormikOnBlur.tsx +++ b/pkg/interface/src/views/components/FormikOnBlur.tsx @@ -1,28 +1,32 @@ -import React, { useImperativeHandle, useEffect } from 'react'; -import { FormikValues, useFormik, FormikProvider, FormikConfig } from 'formik'; +import { FormikConfig, FormikProvider, FormikValues, useFormik } from 'formik'; +import React, { useEffect, useImperativeHandle, useState } from 'react'; export function FormikOnBlur< Values extends FormikValues = FormikValues, ExtraProps = {} >(props: FormikConfig & ExtraProps) { const formikBag = useFormik({ ...props, validateOnBlur: true }); + const [submitting, setSubmitting] = useState(false); useEffect(() => { if ( Object.keys(formikBag.errors || {}).length === 0 && - Object.keys(formikBag.touched || {}).length !== 0 && - !formikBag.isSubmitting + formikBag.dirty && + !formikBag.isSubmitting && + !submitting ) { + setSubmitting(true); const { values } = formikBag; formikBag.submitForm().then(() => { - formikBag.resetForm({ values, touched: {} }); + formikBag.resetForm({ values }) + setSubmitting(false); }); } }, [ formikBag.errors, - formikBag.touched, - formikBag.submitForm, - formikBag.values + formikBag.dirty, + submitting, + formikBag.isSubmitting ]); const { children, innerRef } = props; diff --git a/pkg/interface/src/views/components/GroupLink.tsx b/pkg/interface/src/views/components/GroupLink.tsx index 9e36db9a93..290073385a 100644 --- a/pkg/interface/src/views/components/GroupLink.tsx +++ b/pkg/interface/src/views/components/GroupLink.tsx @@ -1,15 +1,14 @@ -import React, { useEffect, useState, useLayoutEffect, ReactElement } from 'react'; +import { Box, Col, Icon, Row, Text } from '@tlon/indigo-react'; +import { MetadataUpdatePreview } from '@urbit/api'; +import React, { ReactElement, useEffect, useLayoutEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { Box, Text, Row, Col } from '@tlon/indigo-react'; -import { Associations, Groups } from '@urbit/api'; import GlobalApi from '~/logic/api/global'; -import { MetadataIcon } from '../landscape/components/MetadataIcon'; -import { JoinGroup } from '../landscape/components/JoinGroup'; import { useModal } from '~/logic/lib/useModal'; -import { GroupSummary } from '../landscape/components/GroupSummary'; -import { PropFunc } from '~/types'; +import { useVirtual } from '~/logic/lib/virtualContext'; import useMetadataState from '~/logic/state/metadata'; -import {useVirtual} from '~/logic/lib/virtualContext'; +import { PropFunc } from '~/types'; +import { JoinGroup } from '../landscape/components/JoinGroup'; +import { MetadataIcon } from '../landscape/components/MetadataIcon'; export function GroupLink( props: { @@ -48,26 +47,47 @@ export function GroupLink( }, [preview]); return ( - { e.stopPropagation(); }}> + { + e.stopPropagation(); + }} + backgroundColor='white' + borderColor={props.borderColor} + > {modal} history.push(`/~landscape/ship/${name}`) : showModal } - cursor='pointer' opacity={preview ? '1' : '0.6'} > - + - + {preview ? preview.metadata.title : name} - {preview ? `${preview.members} members` : "Fetching member count"} + + {preview ? + <> + + + + {preview.members} + {' '} + {preview.members > 1 ? 'peers' : 'peer'} + + + + : Fetching member count} + diff --git a/pkg/interface/src/views/components/GroupSearch.tsx b/pkg/interface/src/views/components/GroupSearch.tsx index 1bf50137ce..563c4e711a 100644 --- a/pkg/interface/src/views/components/GroupSearch.tsx +++ b/pkg/interface/src/views/components/GroupSearch.tsx @@ -1,25 +1,21 @@ -import React, { ReactElement, useMemo, useState } from 'react'; -import { useFormikContext, FieldArray } from 'formik'; -import _ from 'lodash'; -import styled from 'styled-components'; - import { - Box, - Text, - Label, - Row, - Col, - Icon, - ErrorLabel + Box, + + Col, + + ErrorLabel, Icon, Label, + Row, Text } from '@tlon/indigo-react'; -import { Groups } from '@urbit/api'; -import { Associations, Association } from '@urbit/api/metadata'; - - +import { OpenPolicy } from '@urbit/api'; +import { Association } from '@urbit/api/metadata'; +import { FieldArray, useFormikContext } from 'formik'; +import _ from 'lodash'; +import React, { ReactElement, useMemo, useState } from 'react'; +import styled from 'styled-components'; import { roleForShip } from '~/logic/lib/group'; -import { DropdownSearch } from './DropdownSearch'; import useGroupState from '~/logic/state/group'; import useMetadataState from '~/logic/state/metadata'; +import { DropdownSearch } from './DropdownSearch'; interface GroupSearchProps { disabled?: boolean; @@ -105,7 +101,7 @@ export function GroupSearch>(props: Gr return Object.values( Object.keys(associations.groups) .filter( - e => groupState?.[e]?.policy?.open + e => (groupState?.[e]?.policy as OpenPolicy)?.open ) .reduce((obj, key) => { obj[key] = associations.groups[key]; @@ -137,12 +133,12 @@ export function GroupSearch>(props: Gr {caption && ( -