]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/LockableScore.ts
Merge pull request #56 from TheBlueMatt/main
[ldk-java] / ts / structs / LockableScore.ts
1
2             
3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
5
6
7
8             export default class LockableScore extends CommonBase {
9                 constructor(_dummy: object, ptr: number) {
10                     super(ptr);
11                 }
12
13                 
14                 protected finalize() {
15                     super.finalize();
16
17                     if (this.ptr != 0) {
18                         bindings.LockableScore_free(this.ptr);
19                     }
20                 }
21         public static LockableScore constructor_new(Score score) {
22                 number ret = bindings.LockableScore_new(score == null ? 0 : score.ptr);
23                 const ret_hu_conv: LockableScore = new LockableScore(null, ret);
24                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
25                 ret_hu_conv.ptrs_to.add(score);
26                 return ret_hu_conv;
27         }
28
29         public Uint8Array write() {
30                 Uint8Array ret = bindings.LockableScore_write(this.ptr);
31                 return ret;
32         }
33
34 }