projects
/
ldk-java
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dbce8d1
)
[TS] Swap BigInt (the class/constructor) for bigint (the primitive)
author
Matt Corallo
<git@bluematt.me>
Mon, 10 Jan 2022 00:56:18 +0000
(
00:56
+0000)
committer
Matt Corallo
<git@bluematt.me>
Mon, 10 Jan 2022 06:33:14 +0000
(06:33 +0000)
typescript_strings.py
patch
|
blob
|
history
diff --git
a/typescript_strings.py
b/typescript_strings.py
index e3b980830f6d0bce2172be184ef7d248d1abd351..03804e5fe1780e719d22922ff6b816dd6215b0e7 100644
(file)
--- a/
typescript_strings.py
+++ b/
typescript_strings.py
@@
-20,7
+20,7
@@
class Consts:
uint8_t = ['number', 'number', 'Uint8Array'],
uint16_t = ['number', 'number', 'Uint16Array'],
uint32_t = ['number', 'number', 'Uint32Array'],
uint8_t = ['number', 'number', 'Uint8Array'],
uint16_t = ['number', 'number', 'Uint16Array'],
uint32_t = ['number', 'number', 'Uint32Array'],
- uint64_t = ['
BigInt', 'BigI
nt', 'BigUint64Array'],
+ uint64_t = ['
bigint', 'bigi
nt', 'BigUint64Array'],
)
self.java_type_map = dict(
String = "number"
)
self.java_type_map = dict(
String = "number"
@@
-78,7
+78,7
@@
export default class CommonBase {
/** The script_pubkey in this output */
public script_pubkey: Uint8Array;
/** The value, in satoshis, of this output */
/** The script_pubkey in this output */
public script_pubkey: Uint8Array;
/** The value, in satoshis, of this output */
- public value:
BigI
nt;
+ public value:
bigi
nt;
/* @internal */
public constructor(_dummy: object, ptr: number) {
/* @internal */
public constructor(_dummy: object, ptr: number) {
@@
-86,7
+86,7
@@
export default class CommonBase {
this.script_pubkey = bindings.decodeUint8Array(bindings.TxOut_get_script_pubkey(ptr));
this.value = bindings.TxOut_get_value(ptr);
}
this.script_pubkey = bindings.decodeUint8Array(bindings.TxOut_get_script_pubkey(ptr));
this.value = bindings.TxOut_get_value(ptr);
}
- public constructor_new(value:
BigI
nt, script_pubkey: Uint8Array): TxOut {
+ public constructor_new(value:
bigi
nt, script_pubkey: Uint8Array): TxOut {
return new TxOut(null, bindings.TxOut_new(bindings.encodeUint8Array(script_pubkey), value));
}
}"""
return new TxOut(null, bindings.TxOut_new(bindings.encodeUint8Array(script_pubkey), value));
}
}"""
@@
-466,7
+466,7
@@
export function encodeUint32Array (inputArray: Uint32Array|Array<number>): numbe
arrayMemoryView[0] = inputArray.length;
return cArrayPointer;
}
arrayMemoryView[0] = inputArray.length;
return cArrayPointer;
}
-export function encodeUint64Array (inputArray: BigUint64Array|Array<
BigI
nt>): number {
+export function encodeUint64Array (inputArray: BigUint64Array|Array<
bigi
nt>): number {
const cArrayPointer = wasm.TS_malloc(inputArray.length * 8 + 1);
const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
arrayLengthView[0] = inputArray.length;
const cArrayPointer = wasm.TS_malloc(inputArray.length * 8 + 1);
const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
arrayLengthView[0] = inputArray.length;