Skip to content

Commit 06a6a79

Browse files
committed
completing jslib
1 parent 5d30a66 commit 06a6a79

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

Assets/Dojo/Plugins/WebGL/controller.jslib

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@ mergeInto(LibraryManager.library, {
2323
}, {})
2424
}
2525

26-
window.provider = new ControllerProvider(opts)
26+
window.controllerProvider = new ControllerProvider(opts)
27+
},
28+
Probe: function (cb) {
29+
window.controllerProvider.probe().then((account) => {
30+
dynCall_vi(cb, account ? true : false)
31+
})
32+
},
33+
Connect: function (cb) {
34+
window.controllerProvider.connect().then((account) => {
35+
dynCall_vi(cb, account ? true : false)
36+
})
37+
},
38+
Disconnect: function (cb) {
39+
window.controllerProvider.disconnect().then(() => {
40+
dynCall_vi(cb)
41+
})
42+
},
43+
Execute: function (cb, calls) {
44+
window.controllerProvider.account.execute(JSON.parse(UTF8ToString(calls))).then((result) => {
45+
dynCall_vi(cb, result.transaction_hash)
46+
})
2747
}
2848
});

0 commit comments

Comments
 (0)