Skip to content

permaweb/token-1.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

token@1.0

build and verify

rebar3 compile
rebar3 device verify
rebar3 device package

test

HB_PORT=0 rebar3 device test
rebar3 eunit-all

published package

device publish: token@1.0 

spec=ibZf_Tqk4omTejmBIgCI6HCvp5HWYlgKhjkDMZPh4UY 

impl=y8vkutjPnDdfOLP2ISSnj1eOBw9x0jTddgY4dhVpWrQ 

signer=vZY2XY1RD9HIfWi8ift-1_DnHLDadZMWrufSh-_rKF0

local node

HB_CONFIG=config.json rebar3 device local

config.json pins the published process-outbox@1.0 and security@1.0 implementations through HyperBEAM's trusted-devices runtime map.

src:

{
  "trusted-devices": {
    "process-outbox@1.0": "HOcPV7wxMHYb3rSQ3EfykQhHx_b8waRWhXolhcBNgHo",
    "security@1.0": "ARgymad5oYZcWPpxuV-A9hoSgmm4ElgPIvxMwmeh674"
  }
}

interaction with deployed token

use the process path for token semantics. this gives process@1.0 a chance to load the current state, run token@1.0/init if needed, and then switch into the execution device:

GET /<token-id>/now/as/balance?as=execution&balance=<address>
GET /<token-id>/now
POST /<token-id>/schedule

raw state paths are only for inspection:

GET /<token-id>/balances/<exact-raw-key>
GET /<token-id>/now/balances/<canonical-key>

dont use /<token-id>~token@1.0/balance?... as the normal client path. That calls the token device against the raw published item and bypasses process@1.0 initialization/caching.

publish

rebar3 device publish --key wallet.json

License

this package is licensed under the MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages