2017-05-03 01:02:50 +02:00
|
|
|
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
|
|
|
|
|
|
|
### Table of Contents
|
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
- [Ed25519Keypair][1]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][2]
|
|
|
|
- [Properties][3]
|
|
|
|
- [Connection][4]
|
|
|
|
- [Parameters][5]
|
|
|
|
- [getBlock][6]
|
|
|
|
- [Parameters][7]
|
|
|
|
- [getTransaction][8]
|
|
|
|
- [Parameters][9]
|
|
|
|
- [listBlocks][10]
|
|
|
|
- [Parameters][11]
|
|
|
|
- [listOutputs][12]
|
|
|
|
- [Parameters][13]
|
|
|
|
- [listTransactions][14]
|
|
|
|
- [Parameters][15]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [postTransaction][16]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][17]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [postTransactionSync][18]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][19]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [postTransactionAsync][20]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][21]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [postTransactionCommit][22]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][23]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [searchAssets][24]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][25]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [searchMetadata][26]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][27]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [Transaction][28]
|
|
|
|
- [serializeTransactionIntoCanonicalString][29]
|
|
|
|
- [Parameters][30]
|
|
|
|
- [makeCreateTransaction][31]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][32]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [makeEd25519Condition][33]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][34]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [makeOutput][35]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][36]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [makeSha256Condition][37]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][38]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [makeThresholdCondition][39]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][40]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [makeTransferTransaction][41]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][42]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [signTransaction][43]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][44]
|
2021-03-09 07:17:06 +01:00
|
|
|
- [delegateSignTransaction][45]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][46]
|
2021-03-11 13:04:17 +01:00
|
|
|
- [delegateSignTransactionAsync][47]
|
|
|
|
- [Parameters][48]
|
|
|
|
- [ccJsonLoad][49]
|
2018-07-05 13:53:15 +02:00
|
|
|
- [Parameters][50]
|
2021-03-11 13:04:17 +01:00
|
|
|
- [ccJsonify][51]
|
|
|
|
- [Parameters][52]
|
2017-05-03 01:02:50 +02:00
|
|
|
|
|
|
|
## Ed25519Keypair
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/Ed25519Keypair.js:16-21][53]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Type: [Object][54]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
### Parameters
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `seed` **[Buffer][55]?** A seed that will be used as a key derivation function
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
### Properties
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `publicKey` **[string][56]**
|
|
|
|
- `privateKey` **[string][56]**
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
## Connection
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:21-199][57]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
- `nodes`
|
2021-03-11 13:04:17 +01:00
|
|
|
- `headers` **[Object][54]** Common headers for every request (optional, default `{}`)
|
2021-03-09 07:17:06 +01:00
|
|
|
- `timeout` **float** Optional timeout in secs (optional, default `DEFAULT_TIMEOUT`)
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
### getBlock
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:79-85][58]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
- `blockHeight`
|
|
|
|
|
|
|
|
### getTransaction
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:90-96][59]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
- `transactionId`
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
### listBlocks
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:102-108][60]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
- `transactionId`
|
|
|
|
- `status`
|
|
|
|
|
|
|
|
### listOutputs
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:114-126][61]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
- `publicKey`
|
|
|
|
- `spent`
|
|
|
|
|
|
|
|
### listTransactions
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:132-139][62]
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
- `assetId`
|
|
|
|
- `operation`
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
### postTransaction
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:144-146][63]
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
- `transaction`
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
### postTransactionSync
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:151-156][64]
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
- `transaction`
|
|
|
|
|
|
|
|
### postTransactionAsync
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:161-166][65]
|
2018-07-05 13:53:15 +02:00
|
|
|
|
|
|
|
#### Parameters
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
- `transaction`
|
|
|
|
|
|
|
|
### postTransactionCommit
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:171-176][66]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
- `transaction`
|
|
|
|
|
|
|
|
### searchAssets
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:181-187][67]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
- `search`
|
|
|
|
|
|
|
|
### searchMetadata
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/connection.js:192-198][68]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
- `search`
|
|
|
|
|
|
|
|
## Transaction
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:16-288][69]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
Construct Transactions
|
|
|
|
|
|
|
|
### serializeTransactionIntoCanonicalString
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:22-29][70]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
Canonically serializes a transaction into a string by sorting the keys
|
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
- `transaction`
|
2021-03-11 13:04:17 +01:00
|
|
|
- `null` **[Object][54]** (transaction)
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[string][56]** a canonically serialized Transaction
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
### makeCreateTransaction
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:80-87][71]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
Generate a `CREATE` transaction holding the `asset`, `metadata`, and `outputs`, to be signed by
|
|
|
|
the `issuers`.
|
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `asset` **[Object][54]** Created asset's data
|
|
|
|
- `metadata` **[Object][54]** Metadata for the Transaction
|
|
|
|
- `outputs` **[Array][72]<[Object][54]>** Array of Output objects to add to the Transaction.
|
2017-05-03 01:02:50 +02:00
|
|
|
Think of these as the recipients of the asset after the transaction.
|
|
|
|
For `CREATE` Transactions, this should usually just be a list of
|
|
|
|
Outputs wrapping Ed25519 Conditions generated from the issuers' public
|
|
|
|
keys (so that the issuers are the recipients of the created asset).
|
2021-03-11 13:04:17 +01:00
|
|
|
- `issuers` **...[Array][72]<[string][56]>** Public key of one or more issuers to the asset being created by this
|
2017-05-03 01:02:50 +02:00
|
|
|
Transaction.
|
|
|
|
Note: Each of the private keys corresponding to the given public
|
|
|
|
keys MUST be used later (and in the same order) when signing the
|
|
|
|
Transaction (`signTransaction()`).
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[Object][54]** Unsigned transaction -- make sure to call signTransaction() on it before
|
2017-05-03 01:02:50 +02:00
|
|
|
sending it off!
|
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
### makeEd25519Condition
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:96-101][73]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
Create an Ed25519 Cryptocondition from an Ed25519 public key
|
|
|
|
to put into an Output of a Transaction
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `publicKey` **[string][56]** base58 encoded Ed25519 public key for the recipient of the Transaction
|
|
|
|
- `json` **[boolean][74]** If true returns a json object otherwise a crypto-condition type (optional, default `true`)
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[Object][54]** Ed25519 Condition (that will need to wrapped in an Output)
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
### makeOutput
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:111-131][75]
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
Create an Output from a Condition.
|
|
|
|
Note: Assumes the given Condition was generated from a
|
|
|
|
single public key (e.g. a Ed25519 Condition)
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `condition` **[Object][54]** Condition (e.g. a Ed25519 Condition from `makeEd25519Condition()`)
|
|
|
|
- `amount` **[string][56]** Amount of the output (optional, default `'1'`)
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[Object][54]** An Output usable in a Transaction
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
### makeSha256Condition
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:139-143][76]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
Create a Preimage-Sha256 Cryptocondition from a secret to put into an Output of a Transaction
|
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `preimage` **[string][56]** Preimage to be hashed and wrapped in a crypto-condition
|
|
|
|
- `json` **[boolean][74]** If true returns a json object otherwise a crypto-condition type (optional, default `true`)
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[Object][54]** Preimage-Sha256 Condition (that will need to wrapped in an Output)
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
### makeThresholdCondition
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:152-162][77]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
Create an Sha256 Threshold Cryptocondition from threshold to put into an Output of a Transaction
|
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `threshold` **[number][78]**
|
|
|
|
- `subconditions` **[Array][72]** (optional, default `[]`)
|
|
|
|
- `json` **[boolean][74]** If true returns a json object otherwise a crypto-condition type (optional, default `true`)
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[Object][54]** Sha256 Threshold Condition (that will need to wrapped in an Output)
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
### makeTransferTransaction
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:185-206][79]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
Generate a `TRANSFER` transaction holding the `asset`, `metadata`, and `outputs`, that fulfills
|
|
|
|
the `fulfilledOutputs` of `unspentTransaction`.
|
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
- `unspentOutputs`
|
2021-03-11 13:04:17 +01:00
|
|
|
- `outputs` **[Array][72]<[Object][54]>** Array of Output objects to add to the Transaction.
|
2017-05-03 01:02:50 +02:00
|
|
|
Think of these as the recipients of the asset after the transaction.
|
|
|
|
For `TRANSFER` Transactions, this should usually just be a list of
|
|
|
|
Outputs wrapping Ed25519 Conditions generated from the public keys of
|
|
|
|
the recipients.
|
2021-03-11 13:04:17 +01:00
|
|
|
- `metadata` **[Object][54]** Metadata for the Transaction
|
|
|
|
- `unspentTransaction` **[Object][54]** Previous Transaction you have control over (i.e. can fulfill
|
2018-05-14 17:14:40 +02:00
|
|
|
its Output Condition)
|
2021-03-11 13:04:17 +01:00
|
|
|
- `OutputIndices` **...[number][78]** Indices of the Outputs in `unspentTransaction` that this
|
2017-05-03 01:02:50 +02:00
|
|
|
Transaction fulfills.
|
2018-05-14 17:14:40 +02:00
|
|
|
Note that listed public keys listed must be used (and in
|
|
|
|
the same order) to sign the Transaction
|
2017-05-03 01:02:50 +02:00
|
|
|
(`signTransaction()`).
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[Object][54]** Unsigned transaction -- make sure to call signTransaction() on it before
|
2017-05-03 01:02:50 +02:00
|
|
|
sending it off!
|
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
### signTransaction
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:219-243][80]
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
Sign the given `transaction` with the given `privateKey`s, returning a new copy of `transaction`
|
|
|
|
that's been signed.
|
|
|
|
Note: Only generates Ed25519 Fulfillments. Thresholds and other types of Fulfillments are left as
|
|
|
|
an exercise for the user.
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
#### Parameters
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `transaction` **[Object][54]** Transaction to sign. `transaction` is not modified.
|
|
|
|
- `privateKeys` **...[string][56]** Private keys associated with the issuers of the `transaction`.
|
2017-05-03 01:02:50 +02:00
|
|
|
Looped through to iteratively sign any Input Fulfillments found in
|
|
|
|
the `transaction`.
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[Object][54]** The signed version of `transaction`.
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
### delegateSignTransaction
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/transaction.js:252-265][81]
|
2021-03-09 07:17:06 +01:00
|
|
|
|
|
|
|
Delegate signing of the given `transaction` returning a new copy of `transaction`
|
|
|
|
that's been signed.
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `transaction` **[Object][54]** Transaction to sign. `transaction` is not modified.
|
|
|
|
- `signFn` **[Function][82]** Function signing the transaction, expected to return the fulfillment.
|
2021-03-09 07:17:06 +01:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[Object][54]** The signed version of `transaction`.
|
|
|
|
|
|
|
|
### delegateSignTransactionAsync
|
|
|
|
|
|
|
|
[src/transaction.js:274-287][83]
|
|
|
|
|
|
|
|
Delegate signing of the given `transaction` returning a new copy of `transaction`
|
|
|
|
that's been signed.
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
- `transaction` **[Object][54]** Transaction to sign. `transaction` is not modified.
|
|
|
|
- `signFn` **[Function][82]** Function signing the transaction, expected to resolve the fulfillment.
|
|
|
|
|
|
|
|
Returns **[Promise][84]<[Object][54]>** The signed version of `transaction`.
|
2021-03-09 07:17:06 +01:00
|
|
|
|
2017-05-03 01:02:50 +02:00
|
|
|
## ccJsonLoad
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/utils/ccJsonLoad.js:13-44][85]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
Loads a crypto-condition class (Fulfillment or Condition) from a BigchainDB JSON object
|
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
### Parameters
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
- `conditionJson` **[Object][54]**
|
2017-05-03 01:02:50 +02:00
|
|
|
|
|
|
|
Returns **cc.Condition** Ed25519 Condition (that will need to wrapped in an Output)
|
|
|
|
|
|
|
|
## ccJsonify
|
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[src/utils/ccJsonify.js:12-65][86]
|
2018-05-14 17:14:40 +02:00
|
|
|
|
|
|
|
Serializes a crypto-condition class (Condition or Fulfillment) into a BigchainDB-compatible JSON
|
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
### Parameters
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
- `fulfillment` **cc.Fulfillment** base58 encoded Ed25519 public key for recipient of the Transaction
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
Returns **[Object][54]** Ed25519 Condition (that will need to wrapped in an Output)
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-05-14 17:14:40 +02:00
|
|
|
[1]: #ed25519keypair
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[2]: #parameters
|
|
|
|
|
|
|
|
[3]: #properties
|
|
|
|
|
|
|
|
[4]: #connection
|
|
|
|
|
|
|
|
[5]: #parameters-1
|
|
|
|
|
|
|
|
[6]: #getblock
|
|
|
|
|
|
|
|
[7]: #parameters-2
|
|
|
|
|
|
|
|
[8]: #gettransaction
|
|
|
|
|
|
|
|
[9]: #parameters-3
|
|
|
|
|
|
|
|
[10]: #listblocks
|
|
|
|
|
|
|
|
[11]: #parameters-4
|
|
|
|
|
|
|
|
[12]: #listoutputs
|
|
|
|
|
|
|
|
[13]: #parameters-5
|
|
|
|
|
|
|
|
[14]: #listtransactions
|
|
|
|
|
|
|
|
[15]: #parameters-6
|
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[16]: #posttransaction
|
2018-07-05 13:53:15 +02:00
|
|
|
|
|
|
|
[17]: #parameters-7
|
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[18]: #posttransactionsync
|
2018-07-05 13:53:15 +02:00
|
|
|
|
|
|
|
[19]: #parameters-8
|
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[20]: #posttransactionasync
|
2018-07-05 13:53:15 +02:00
|
|
|
|
|
|
|
[21]: #parameters-9
|
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[22]: #posttransactioncommit
|
2018-07-05 13:53:15 +02:00
|
|
|
|
|
|
|
[23]: #parameters-10
|
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[24]: #searchassets
|
2018-07-05 13:53:15 +02:00
|
|
|
|
|
|
|
[25]: #parameters-11
|
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[26]: #searchmetadata
|
2018-07-05 13:53:15 +02:00
|
|
|
|
|
|
|
[27]: #parameters-12
|
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[28]: #transaction
|
2018-07-05 13:53:15 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[29]: #serializetransactionintocanonicalstring
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[30]: #parameters-13
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[31]: #makecreatetransaction
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[32]: #parameters-14
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[33]: #makeed25519condition
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[34]: #parameters-15
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[35]: #makeoutput
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[36]: #parameters-16
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[37]: #makesha256condition
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[38]: #parameters-17
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[39]: #makethresholdcondition
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[40]: #parameters-18
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[41]: #maketransfertransaction
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[42]: #parameters-19
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[43]: #signtransaction
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[44]: #parameters-20
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-09 07:17:06 +01:00
|
|
|
[45]: #delegatesigntransaction
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[46]: #parameters-21
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[47]: #delegatesigntransactionasync
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[48]: #parameters-22
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[49]: #ccjsonload
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2018-07-05 13:53:15 +02:00
|
|
|
[50]: #parameters-23
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[51]: #ccjsonify
|
|
|
|
|
|
|
|
[52]: #parameters-24
|
|
|
|
|
|
|
|
[53]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/Ed25519Keypair.js#L16-L21 "Source code on GitHub"
|
|
|
|
|
|
|
|
[54]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
|
|
|
|
|
|
[55]: https://nodejs.org/api/buffer.html
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[56]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[57]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L21-L199 "Source code on GitHub"
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[58]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L79-L85 "Source code on GitHub"
|
2017-05-03 01:02:50 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[59]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L90-L96 "Source code on GitHub"
|
2021-03-09 07:17:06 +01:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[60]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L102-L108 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[61]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L114-L126 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[62]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L132-L139 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[63]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L144-L146 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[64]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L151-L156 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[65]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L161-L166 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[66]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L171-L176 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[67]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L181-L187 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[68]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/connection.js#L192-L198 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[69]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L16-L288 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[70]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L22-L29 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[71]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L80-L87 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[72]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[73]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L96-L101 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[74]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[75]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L111-L131 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[76]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L139-L143 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[77]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L152-L162 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[78]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[79]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L185-L206 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[80]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L219-L243 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[81]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L252-L265 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[82]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[83]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/transaction.js#L274-L287 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[84]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[85]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/utils/ccJsonLoad.js#L13-L44 "Source code on GitHub"
|
2018-05-14 17:14:40 +02:00
|
|
|
|
2021-03-11 13:04:17 +01:00
|
|
|
[86]: https://github.com/bigchaindb/js-bigchaindb-driver/blob/76c877c649801f0a26351d03237e0b59c18bd3ef/src/utils/ccJsonify.js#L12-L65 "Source code on GitHub"
|