Constructor
new Transaction(envelope)
Parameters:
Name | Type | Description |
---|---|---|
envelope |
string
|
xdr.TransactionEnvelope
|
The transaction envelope object or base64 encoded string. |
Methods
hash() → {Buffer}
Returns a hash for this transaction, suitable for signing.
Returns:
- Type:
-
Buffer
sign(…keypairs) → {void}
Signs the transaction with the given Keypair.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
keypairs |
Keypair
|
<repeatable> |
Keypairs of signers |
Returns:
- Type:
-
void
signatureBase() → {Buffer}
Returns the "signature base" of this transaction, which is the value that, when hashed, should be signed to create a signature that validators on the DigitalBits Network will accept.
It is composed of a 4 prefix bytes followed by the xdr-encoded form of this transaction.
Returns:
- Type:
-
Buffer
signHashX(preimage) → {void}
Add hashX
signer preimage as signature.
Parameters:
Name | Type | Description |
---|---|---|
preimage |
Buffer
|
String
|
Preimage of hash used as signer |
Returns:
- Type:
-
void
toEnvelope() → {xdr.TransactionEnvelope}
To envelope returns a xdr.TransactionEnvelope which can be submitted to the network.
Returns:
- Type:
-
xdr.TransactionEnvelope