Commit 9934d9a6a446f5a6218a27df8b509155c7bc57cc
move cap into module
wanderer committed on 12/6/2017, 5:00:21 AMParent: f7af9769dc163a3efc6196f8cc06ab9115567a9f
Files changed
actor.js | changed |
package-lock.json | changed |
package.json | changed |
actor.js | ||
---|---|---|
@@ -1,5 +1,6 @@ | ||
1 | 1 | const Buffer = require('safe-buffer').Buffer |
2 | +const Cap = require('primea-capability') | |
2 | 3 | const Message = require('primea-message') |
3 | 4 | const leb128 = require('leb128').unsigned |
4 | 5 | const LockMap = require('lockmap') |
5 | 6 | const Inbox = require('./inbox.js') |
@@ -35,12 +36,9 @@ | ||
35 | 36 | * @param {*} tag - a tag which can be used to identify caps |
36 | 37 | * @return {Object} |
37 | 38 | */ |
38 | 39 | mintCap (tag = 0) { |
39 | - return { | |
40 | - destId: this.id, | |
41 | - tag: tag | |
42 | - } | |
40 | + return new Cap(this.id, tag) | |
43 | 41 | } |
44 | 42 | |
45 | 43 | /** |
46 | 44 | * adds a message to this actor's message queue |
package-lock.json | ||
---|---|---|
The diff is too large to show. Use a local git client to view these changes. Old file size: 345831 bytes New file size: 347004 bytes |
package.json | ||
---|---|---|
@@ -31,10 +31,12 @@ | ||
31 | 31 | "contributors": "Alex Beregszaszi <alex@rtfs.hu>", |
32 | 32 | "license": "MPL-2.0", |
33 | 33 | "dependencies": { |
34 | 34 | "binary-search-insert": "^1.0.3", |
35 | + "buffer-pipe": "0.0.1", | |
35 | 36 | "leb128": "0.0.4", |
36 | 37 | "lockmap": "^0.1.0", |
38 | + "primea-capability": "0.0.0", | |
37 | 39 | "primea-message": "0.6.1", |
38 | 40 | "safe-buffer": "^5.1.1", |
39 | 41 | "sortedmap": "0.0.1", |
40 | 42 | "typedarray-addition": "0.0.1" |
Built with git-ssb-web