Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
feat(dist): add dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
tadejgolobic committed Jan 8, 2021
1 parent 72ce279 commit f7e4be2
Show file tree
Hide file tree
Showing 96 changed files with 6,224 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test/config.js
npm-debug.log

# Ignore dist folder, build for bower
dist/
#dist/

# Ignore flow output directory
out/
Expand Down
76 changes: 76 additions & 0 deletions dist/binary.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { BinaryParser } from "./serdes/binary-parser";
import { AccountID } from "./types/account-id";
import { BinarySerializer, BytesList } from "./serdes/binary-serializer";
import { sha512Half, transactionID } from "./hashes";
import { JsonObject } from "./types/serialized-type";
import { Buffer } from "buffer/";
/**
* Construct a BinaryParser
*
* @param bytes hex-string to construct BinaryParser from
* @returns A BinaryParser
*/
declare const makeParser: (bytes: string) => BinaryParser;
/**
* Parse BinaryParser into JSON
*
* @param parser BinaryParser object
* @returns JSON for the bytes in the BinaryParser
*/
declare const readJSON: (parser: BinaryParser) => JsonObject;
/**
* Parse a hex-string into its JSON interpretation
*
* @param bytes hex-string to parse into JSON
* @returns JSON
*/
declare const binaryToJSON: (bytes: string) => JsonObject;
/**
* Interface for passing parameters to SerializeObject
*
* @field set signingFieldOnly to true if you want to serialize only signing fields
*/
interface OptionObject {
prefix?: Buffer;
suffix?: Buffer;
signingFieldsOnly?: boolean;
}
/**
* Function to serialize JSON object representing a transaction
*
* @param object JSON object to serialize
* @param opts options for serializing, including optional prefix, suffix, and signingFieldOnly
* @returns A Buffer containing the serialized object
*/
declare function serializeObject(object: JsonObject, opts?: OptionObject): Buffer;
/**
* Serialize an object for signing
*
* @param transaction Transaction to serialize
* @param prefix Prefix bytes to put before the serialized object
* @returns A Buffer with the serialized object
*/
declare function signingData(transaction: JsonObject, prefix?: Buffer): Buffer;
/**
* Interface describing fields required for a Claim
*/
interface ClaimObject extends JsonObject {
channel: string;
amount: string | number;
}
/**
* Serialize a signingClaim
*
* @param claim A claim object to serialize
* @returns the serialized object with appropriate prefix
*/
declare function signingClaimData(claim: ClaimObject): Buffer;
/**
* Serialize a transaction object for multiSigning
*
* @param transaction transaction to serialize
* @param signingAccount Account to sign the transaction with
* @returns serialized transaction with appropriate prefix and suffix
*/
declare function multiSigningData(transaction: JsonObject, signingAccount: string | AccountID): Buffer;
export { BinaryParser, BinarySerializer, BytesList, ClaimObject, makeParser, serializeObject, readJSON, multiSigningData, signingData, signingClaimData, binaryToJSON, sha512Half, transactionID, };
113 changes: 113 additions & 0 deletions dist/binary.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/binary.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions dist/coretypes.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Field, TransactionType, LedgerEntryType, Type, TransactionResult } from "./enums";
import * as types from "./types";
import * as binary from "./binary";
import { ShaMap } from "./shamap";
import * as ledgerHashes from "./ledger-hashes";
import * as hashes from "./hashes";
import { quality } from "./quality";
import { HashPrefix } from "./hash-prefixes";
export { hashes, binary, ledgerHashes, Field, TransactionType, LedgerEntryType, Type, TransactionResult, quality, HashPrefix, ShaMap, types, };
24 changes: 24 additions & 0 deletions dist/coretypes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/coretypes.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f7e4be2

Please sign in to comment.