@bitaccess/coinlib-types
Advanced tools
+15
-6
@@ -29,10 +29,10 @@ 'use strict'; | ||
| const supportedNetworkSymbolsMap = { | ||
| TRX: null, | ||
| XRP: null, | ||
| XLM: null, | ||
| BCH: null, | ||
| BTC: null, | ||
| DOGE: null, | ||
| ETH: null, | ||
| LTC: null, | ||
| BCH: null, | ||
| DOGE: null, | ||
| TRX: null, | ||
| XLM: null, | ||
| XRP: null, | ||
| }; | ||
@@ -304,3 +304,12 @@ const SupportedCoinPaymentsSymbol = t__namespace.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol'); | ||
| const DERIVATION_PATH_REGEX = /^(m\/)?[0-9]+'?(\/[0-9]+'?)*$/; | ||
| const SUPPORTED_NETWORK_SYMBOLS = ["TRX", "XRP", "XLM", "BTC", "ETH", "LTC", "BCH", "DOGE"]; | ||
| const SUPPORTED_NETWORK_SYMBOLS = [ | ||
| "BCH", | ||
| "BTC", | ||
| "DOGE", | ||
| "ETH", | ||
| "LTC", | ||
| "TRX", | ||
| "XLM", | ||
| "XRP", | ||
| ]; | ||
@@ -307,0 +316,0 @@ exports.AddressMultisigData = AddressMultisigData; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.cjs.js","sources":["../src/types.ts","../src/errors.ts","../src/constants.ts"],"sourcesContent":["import * as t from 'io-ts'\nimport {\n requiredOptionalCodec,\n extendCodec,\n enumCodec,\n nullable,\n DateT,\n Logger,\n functionT,\n Numeric,\n} from '@bitaccess/ts-common'\nimport { SUPPORTED_NETWORK_SYMBOLS } from './constants'\n\nexport type SupportedCoinPaymentsSymbol = typeof SUPPORTED_NETWORK_SYMBOLS[number]\nconst supportedNetworkSymbolsMap: { [k in SupportedCoinPaymentsSymbol]: null } = {\n TRX: null,\n XRP: null,\n XLM: null,\n BTC: null,\n ETH: null,\n LTC: null,\n BCH: null,\n DOGE: null,\n}\nexport const SupportedCoinPaymentsSymbol = t.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol')\n\nexport interface Bip32Network {\n wif: number\n bip32: {\n public: number\n private: number\n }\n messagePrefix?: string\n bech32?: string\n pubKeyHash?: number\n scriptHash?: number\n}\n\nexport type MaybePromise<T> = Promise<T> | T\n\nexport const NullableOptionalString = t.union([t.string, t.null, t.undefined])\nexport type NullableOptionalString = t.TypeOf<typeof NullableOptionalString>\n\nexport enum NetworkType {\n Mainnet = 'mainnet',\n Testnet = 'testnet',\n}\nexport const NetworkTypeT = enumCodec<NetworkType>(NetworkType, 'NetworkType')\n\nexport const BaseConfig = t.partial(\n {\n network: NetworkTypeT,\n logger: Logger,\n },\n 'BaseConfig',\n)\nexport type BaseConfig = t.TypeOf<typeof BaseConfig>\n\nexport const KeyPairsConfigParam = t.union([\n t.array(NullableOptionalString),\n t.record(t.number, NullableOptionalString)\n], 'KeyPairsConfigParam')\nexport type KeyPairsConfigParam = t.TypeOf<typeof KeyPairsConfigParam>\n\nexport const Payport = requiredOptionalCodec(\n {\n address: t.string,\n },\n {\n extraId: nullable(t.string),\n signerAddress: t.string,\n },\n 'Payport',\n)\nexport type Payport = t.TypeOf<typeof Payport>\n\nexport const DerivablePayport = requiredOptionalCodec(\n {\n index: t.number\n },\n {\n addressType: t.string // enum for each coin payments\n },\n 'DerivablePayport'\n)\nexport type DerivablePayport = t.TypeOf<typeof DerivablePayport>\n\nexport const ResolveablePayport = t.union([Payport, DerivablePayport, t.string, t.number], 'ResolveablePayport')\nexport type ResolveablePayport = t.TypeOf<typeof ResolveablePayport>\n\nexport const PayportOutput = t.type({\n payport: ResolveablePayport,\n amount: Numeric,\n}, 'PayportOutput')\nexport type PayportOutput = t.TypeOf<typeof PayportOutput>\n\nexport enum FeeLevel {\n Custom = 'custom',\n Low = 'low',\n Medium = 'medium',\n High = 'high',\n}\nexport const FeeLevelT = enumCodec<FeeLevel>(FeeLevel, 'FeeLevel')\n\nexport const AutoFeeLevels = t.union([\n t.literal(FeeLevel.Low),\n t.literal(FeeLevel.Medium),\n t.literal(FeeLevel.High),\n], 'AutoFeeLevels')\nexport type AutoFeeLevels = t.TypeOf<typeof AutoFeeLevels>\n\nexport enum FeeRateType {\n Main = 'main', // ie bitcoins, ethers\n Base = 'base', // ie satoshis, wei\n BasePerWeight = 'base/weight', // ie satoshis per byte, gas price (wei per gas)\n}\nexport const FeeRateTypeT = enumCodec<FeeRateType>(FeeRateType, 'FeeRateType')\n\nexport const FeeRate = t.type({\n feeRate: t.string,\n feeRateType: FeeRateTypeT,\n}, 'FeeRate')\nexport type FeeRate = t.TypeOf<typeof FeeRate>\n\nexport const FeeOptionCustom = extendCodec(\n FeeRate,\n {},\n {\n feeLevel: t.literal(FeeLevel.Custom),\n },\n 'FeeOptionCustom',\n)\nexport type FeeOptionCustom = t.TypeOf<typeof FeeOptionCustom>\n\nexport const FeeOptionLevel = t.partial(\n {\n feeLevel: t.union([t.literal(FeeLevel.High), t.literal(FeeLevel.Medium), t.literal(FeeLevel.Low)]),\n },\n 'FeeOptionLevel',\n)\nexport type FeeOptionLevel = t.TypeOf<typeof FeeOptionLevel>\n\nexport const FeeOption = t.union([FeeOptionCustom, FeeOptionLevel], 'FeeOption')\nexport type FeeOption = t.TypeOf<typeof FeeOption>\n\nexport const UtxoInfo = requiredOptionalCodec(\n {\n txid: t.string,\n vout: t.number,\n value: t.string, // main denomination\n },\n {\n satoshis: t.union([t.number, t.string]),\n confirmations: t.number,\n height: t.string,\n lockTime: t.string,\n coinbase: t.boolean,\n txHex: t.string,\n scriptPubKeyHex: t.string,\n address: t.string,\n spent: t.boolean,\n signer: t.number, // signing account address or index relative to accountId\n },\n 'UtxoInfo',\n)\nexport type UtxoInfo = t.TypeOf<typeof UtxoInfo>\n\nexport const WeightedChangeOutput = t.type(\n {\n address: t.string,\n weight: t.number,\n },\n 'WeightedChangeOutput',\n)\nexport type WeightedChangeOutput = t.TypeOf<typeof WeightedChangeOutput>\n\nexport type FilterChangeAddresses = (addresses: string[]) => Promise<string[]>\nexport const FilterChangeAddresses = functionT<FilterChangeAddresses>('FilterChangeAddresses')\n\n/** Callback should return any known tx data hex strings (useful for caching) */\nexport type LookupTxDataByHashes = (txHashes: string[]) => Promise<{ [hash: string]: string }>\nexport const LookupTxDataByHashes = functionT<LookupTxDataByHashes>('LookupTxDataByHash')\n\nexport const CreateTransactionOptions = extendCodec(\n FeeOption,\n {},\n {\n sequenceNumber: Numeric, // Ripple/Stellar/Ethereum sequence number or nonce\n payportBalance: Numeric, // Spendable balance at the from payport (useful in conjunction with a BalanceMonitor)\n forcedUtxos: t.array(UtxoInfo), // utxos that must be used\n availableUtxos: t.array(UtxoInfo), // utxos that can be used\n useAllUtxos: t.boolean, // Uses all available utxos (ie sweep)\n useUnconfirmedUtxos: t.boolean, // Allow unconfirmed utxos as inputs\n recipientPaysFee: t.boolean, // Deduct fee from outputs (only utxo coins supported for now)\n maxFeePercent: Numeric, // Maximum fee as percent of output total\n changeAddress: t.union([t.string, t.array(t.string)]), // Change address\n lookupTxDataByHashes: LookupTxDataByHashes, // Callback to retrieve cached raw tx data for input hashes for psbt building\n },\n 'CreateTransactionOptions',\n)\nexport type CreateTransactionOptions = t.TypeOf<typeof CreateTransactionOptions>\n\nexport const GetTransactionInfoOptions = t.partial({\n changeAddress: t.union([t.string, t.array(t.string)]), // To differentiate external/change outputs\n filterChangeAddresses: FilterChangeAddresses, // Callback to filter out any change addresses from address list\n})\nexport type GetTransactionInfoOptions = t.TypeOf<typeof GetTransactionInfoOptions>\n\nexport const GetPayportOptions = t.partial({}, 'GetPayportOptions')\nexport type GetPayportOptions = t.TypeOf<typeof GetPayportOptions>\n\nexport const ResolvedFeeOption = t.type({\n targetFeeLevel: FeeLevelT,\n targetFeeRate: t.string,\n targetFeeRateType: FeeRateTypeT,\n feeBase: t.string,\n feeMain: t.string,\n}, 'ResolvedFeeOption')\nexport type ResolvedFeeOption = t.TypeOf<typeof ResolvedFeeOption>\n\nexport const BalanceResult = requiredOptionalCodec(\n {\n confirmedBalance: t.string, // balance with at least 1 confirmation\n unconfirmedBalance: t.string, // balance that is pending confirmation\n spendableBalance: t.string, // balance that can be spent (ie not locked in min balance)\n requiresActivation: t.boolean, // true if an address doesn't have min balance\n sweepable: t.boolean, // balance is high enough to be swept\n },\n {\n minimumBalance: t.string,\n },\n 'BalanceResult',\n)\nexport type BalanceResult = t.TypeOf<typeof BalanceResult>\n\nexport enum TransactionStatus {\n Unsigned = 'unsigned',\n Signed = 'signed',\n Pending = 'pending',\n Confirmed = 'confirmed',\n Failed = 'failed',\n}\nexport const TransactionStatusT = enumCodec<TransactionStatus>(TransactionStatus, 'TransactionStatus')\n\nexport const TransactionOutput = requiredOptionalCodec(\n {\n address: t.string,\n value: t.string,\n },\n {\n extraId: nullable(t.string),\n },\n 'TransactionOutput',\n)\nexport type TransactionOutput = t.TypeOf<typeof TransactionOutput>\n\nexport const TransactionCommon = requiredOptionalCodec(\n {\n status: TransactionStatusT,\n id: nullable(t.string), // network txid\n fromAddress: nullable(t.string), // sender address\n toAddress: nullable(t.string), // recipient address\n fromIndex: nullable(t.number), // sender address index\n toIndex: nullable(t.number), // recipient address index, null if not ours\n amount: nullable(t.string), // main denomination (eg \"0.125\")\n fee: nullable(t.string), // total fee in main denomination\n },\n {\n fromExtraId: nullable(t.string), // eg ripple sender tag\n toExtraId: nullable(t.string), // eg Monero payment ID or ripple destination tag\n sequenceNumber: nullable(t.union([t.string, t.number])), // eg Ethereum nonce or ripple sequence\n inputUtxos: t.array(UtxoInfo),\n outputUtxos: t.array(UtxoInfo),\n externalOutputs: t.array(TransactionOutput),\n weight: t.number, // weight of this transaction for fee purposes (ie vbytes, gas limit)\n chainId: t.string,\n },\n 'TransactionCommon',\n)\nexport type TransactionCommon = t.TypeOf<typeof TransactionCommon>\n\nexport const BaseMultisigData = t.type(\n {\n m: t.number,\n\n // Parallel arrays\n accountIds: t.array(t.string),\n publicKeys: t.array(t.string),\n\n // Accounts that have already signed (not parallel)\n signedAccountIds: t.array(t.string),\n },\n 'BitcoinMultisigData',\n)\nexport type BaseMultisigData = t.TypeOf<typeof BaseMultisigData>\n\nexport const AddressMultisigData = extendCodec(\n BaseMultisigData,\n {\n signerIndex: t.number,\n inputIndices: t.array(t.number),\n },\n 'AddressMultisigData',\n)\nexport type AddressMultisigData = t.TypeOf<typeof AddressMultisigData>\n\nexport const MultiInputMultisigData = t.record(t.string, AddressMultisigData, 'MultiInputMultisigData')\nexport type MultiInputMultisigData = t.TypeOf<typeof MultiInputMultisigData>\n\nexport const MultisigData = t.union([BaseMultisigData, MultiInputMultisigData])\nexport type MultisigData = t.TypeOf<typeof MultisigData>\n\nconst UnsignedCommon = extendCodec(\n TransactionCommon,\n {\n fromAddress: t.string,\n toAddress: t.string,\n fromIndex: nullable(t.number), // same as multioutput\n targetFeeLevel: FeeLevelT, // fee level requested upon creation\n targetFeeRate: nullable(t.string), // fee rate requested upon creation\n targetFeeRateType: nullable(FeeRateTypeT), // fee rate type requested upon creation\n },\n {\n multisigData: MultisigData,\n },\n 'UnsignedCommon',\n)\ntype UnsignedCommon = t.TypeOf<typeof UnsignedCommon>\n\nexport const BaseUnsignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Unsigned),\n data: t.object,\n },\n 'BaseUnsignedTransaction',\n)\nexport type BaseUnsignedTransaction = t.TypeOf<typeof BaseUnsignedTransaction>\n\nexport const BaseSignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Signed),\n id: t.string,\n amount: t.string,\n fee: t.string,\n data: t.object,\n },\n 'BaseSignedTransaction',\n)\nexport type BaseSignedTransaction = t.TypeOf<typeof BaseSignedTransaction>\n\nexport const BaseTransactionInfo = extendCodec(\n TransactionCommon,\n {\n id: t.string,\n amount: t.string,\n fee: t.string,\n isExecuted: t.boolean, // true if transaction didn't fail (eg TRX/ETH contract succeeded)\n isConfirmed: t.boolean,\n confirmations: t.number, // 0 if not confirmed\n confirmationId: nullable(t.string), // eg block/ledger hash. null if not confirmed\n confirmationTimestamp: nullable(DateT), // block timestamp. null if timestamp unavailable or unconfirmed\n data: t.object,\n },\n {\n currentBlockNumber: t.union([t.string, t.number]), // latest head of the blockchain\n confirmationNumber: t.union([t.string, t.number]) // eg block number in which tx was included\n },\n 'BaseTransactionInfo',\n)\nexport type BaseTransactionInfo = t.TypeOf<typeof BaseTransactionInfo>\n\nexport const BaseBroadcastResult = t.type(\n {\n id: t.string,\n },\n 'BaseBroadcastResult',\n)\nexport type BaseBroadcastResult = t.TypeOf<typeof BaseBroadcastResult>\n\nexport const BalanceActivityType = t.union([t.literal('in'), t.literal('out'), t.literal('fee')], 'BalanceActivityType')\nexport type BalanceActivityType = t.TypeOf<typeof BalanceActivityType>\n\nexport const BalanceActivity = requiredOptionalCodec(\n {\n type: BalanceActivityType,\n networkType: NetworkTypeT,\n networkSymbol: t.string,\n assetSymbol: t.string,\n address: t.string,\n extraId: nullable(t.string),\n amount: t.string,\n externalId: t.string,\n activitySequence: t.string,\n confirmationId: t.string,\n confirmationNumber: t.union([t.string, t.number]),\n timestamp: DateT,\n },\n {\n confirmations: t.number,\n // Utxos spent in this transaction applicable to the address\n utxosSpent: t.array(UtxoInfo),\n // Utxos create in this transaction applicable to the address\n utxosCreated: t.array(UtxoInfo),\n tokenAddress: t.string,\n },\n 'BalanceActivity',\n)\nexport type BalanceActivity = t.TypeOf<typeof BalanceActivity>\n\nexport const BalanceMonitorConfig = BaseConfig\nexport type BalanceMonitorConfig = t.TypeOf<typeof BalanceMonitorConfig>\n\nexport const GetBalanceActivityOptions = t.partial(\n {\n from: t.union([Numeric, BalanceActivity]),\n to: t.union([Numeric, BalanceActivity]),\n },\n 'GetBalanceActivityOptions',\n)\nexport type GetBalanceActivityOptions = t.TypeOf<typeof GetBalanceActivityOptions>\n\nexport type BalanceActivityCallback = (ba: BalanceActivity[], rawTx?: any) => Promise<void> | void\nexport const BalanceActivityCallback = functionT<BalanceActivityCallback>('BalanceActivityCallback')\n\nexport type NewBlockCallback = (b: { height: number, hash: string }) => Promise<void> | void\nexport const NewBlockCallback = functionT<NewBlockCallback>('NewBlockCallback')\n\nexport type FromTo = Pick<\n BaseUnsignedTransaction,\n 'fromAddress' | 'fromIndex' | 'fromExtraId' | 'toAddress' | 'toIndex' | 'toExtraId'\n> & { fromPayport: Payport; toPayport: Payport }\n\nexport const RetrieveBalanceActivitiesResult = t.type(\n {\n from: t.string,\n to: t.string,\n },\n 'RetrieveBalanceActivitiesResult',\n)\nexport type RetrieveBalanceActivitiesResult = t.TypeOf<typeof RetrieveBalanceActivitiesResult>\n\nexport const BlockInfo = requiredOptionalCodec(\n {\n id: t.string,\n height: t.number,\n time: DateT,\n },\n {\n previousId: t.string,\n raw: t.object,\n },\n 'BlockInfo',\n)\nexport type BlockInfo = t.TypeOf<typeof BlockInfo>\n\nexport type FilterBlockAddressesBlockInfo = BlockInfo & { page: number }\nexport type FilterBlockAddressesCallback = (\n addresses: string[], blockInfo: FilterBlockAddressesBlockInfo,\n) => string[] | Promise<string[]>\n\nexport const GetFeeRecommendationOptions = t.partial({\n source: t.string, // ie blockbook, blockcypher, ethgasstation, etc\n}, 'GetFeeRecommendationOptions')\nexport type GetFeeRecommendationOptions = t.TypeOf<typeof GetFeeRecommendationOptions>\n\nexport type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]\n","export enum PaymentsErrorCode {\n TxExpired = 'PAYMENTS_TX_EXPIRED',\n TxSequenceTooHigh = 'PAYMENTS_TX_SEQUENCE_TOO_HIGH',\n TxSequenceCollision = 'PAYMENTS_TX_SEQUENCE_COLLISION',\n /** Sender doesn't have enough balance for the output amount + fee */\n TxInsufficientBalance = 'PAYMENTS_TX_INSUFFICIENT_BALANCE',\n /** Fee exceeds the maximum acceptable percent relative to output amount */\n TxFeeTooHigh = 'PAYMENTS_TX_FEE_TOO_HIGH',\n}\n\nexport class PaymentsError extends Error {\n name = PaymentsError.name\n\n constructor(public code: PaymentsErrorCode, message?: string | Error) {\n super(typeof message === 'undefined' ? code : `${code} - ${message.toString()}`)\n }\n}\n","export const DEFAULT_MAX_FEE_PERCENT = 50\nexport const BIP39_SEED_REGEX = /^[0-9a-f]{128}$/\nexport const BIP39_SEED_BYTES = 64\nexport const DERIVATION_PATH_REGEX = /^(m\\/)?[0-9]+'?(\\/[0-9]+'?)*$/\n\nexport const SUPPORTED_NETWORK_SYMBOLS = [\"TRX\", \"XRP\", \"XLM\", \"BTC\", \"ETH\", \"LTC\", \"BCH\", \"DOGE\"] as const\n"],"names":["t","NetworkType","enumCodec","Logger","requiredOptionalCodec","nullable","Numeric","FeeLevel","FeeRateType","extendCodec","functionT","TransactionStatus","DateT","PaymentsErrorCode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAM,0BAA0B,GAAiD;AAC/E,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,IAAI,EAAE,IAAI;CACX,CAAA;AACM,MAAM,2BAA2B,GAAGA,YAAC,CAAC,KAAK,CAAC,0BAA0B,EAAE,6BAA6B,EAAC;MAgBhG,sBAAsB,GAAGA,YAAC,CAAC,KAAK,CAAC,CAACA,YAAC,CAAC,MAAM,EAAEA,YAAC,CAAC,IAAI,EAAEA,YAAC,CAAC,SAAS,CAAC,EAAC;AAGlEC,6BAGX;AAHD,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,WAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACrB,CAAC,EAHWA,mBAAW,KAAXA,mBAAW,GAGtB,EAAA,CAAA,CAAA,CAAA;AACY,MAAA,YAAY,GAAGC,kBAAS,CAAcD,mBAAW,EAAE,aAAa,EAAC;AAEjE,MAAA,UAAU,GAAG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-ts'\nimport {\n requiredOptionalCodec,\n extendCodec,\n enumCodec,\n nullable,\n DateT,\n Logger,\n functionT,\n Numeric,\n} from '@bitaccess/ts-common'\nimport { SUPPORTED_NETWORK_SYMBOLS } from './constants'\n\nexport type SupportedCoinPaymentsSymbol = typeof SUPPORTED_NETWORK_SYMBOLS[number]\nconst supportedNetworkSymbolsMap: { [k in SupportedCoinPaymentsSymbol]: null } = {\n BCH: null,\n BTC: null,\n DOGE: null,\n ETH: null,\n LTC: null,\n TRX: null,\n XLM: null,\n XRP: null,\n}\nexport const SupportedCoinPaymentsSymbol = t.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol')\n\nexport interface Bip32Network {\n wif: number\n bip32: {\n public: number\n private: number\n }\n messagePrefix?: string\n bech32?: string\n pubKeyHash?: number\n scriptHash?: number\n}\n\nexport type MaybePromise<T> = Promise<T> | T\n\nexport const NullableOptionalString = t.union([t.string, t.null, t.undefined])\nexport type NullableOptionalString = t.TypeOf<typeof NullableOptionalString>\n\nexport enum NetworkType {\n Mainnet = 'mainnet',\n Testnet = 'testnet',\n}\nexport const NetworkTypeT = enumCodec<NetworkType>(NetworkType, 'NetworkType')\n\nexport const BaseConfig = t.partial(\n {\n network: NetworkTypeT,\n logger: Logger,\n },\n 'BaseConfig',\n)\nexport type BaseConfig = t.TypeOf<typeof BaseConfig>\n\nexport const KeyPairsConfigParam = t.union([\n t.array(NullableOptionalString),\n t.record(t.number, NullableOptionalString)\n], 'KeyPairsConfigParam')\nexport type KeyPairsConfigParam = t.TypeOf<typeof KeyPairsConfigParam>\n\nexport const Payport = requiredOptionalCodec(\n {\n address: t.string,\n },\n {\n extraId: nullable(t.string),\n signerAddress: t.string,\n },\n 'Payport',\n)\nexport type Payport = t.TypeOf<typeof Payport>\n\nexport const DerivablePayport = requiredOptionalCodec(\n {\n index: t.number\n },\n {\n addressType: t.string // enum for each coin payments\n },\n 'DerivablePayport'\n)\nexport type DerivablePayport = t.TypeOf<typeof DerivablePayport>\n\nexport const ResolveablePayport = t.union([Payport, DerivablePayport, t.string, t.number], 'ResolveablePayport')\nexport type ResolveablePayport = t.TypeOf<typeof ResolveablePayport>\n\nexport const PayportOutput = t.type({\n payport: ResolveablePayport,\n amount: Numeric,\n}, 'PayportOutput')\nexport type PayportOutput = t.TypeOf<typeof PayportOutput>\n\nexport enum FeeLevel {\n Custom = 'custom',\n Low = 'low',\n Medium = 'medium',\n High = 'high',\n}\nexport const FeeLevelT = enumCodec<FeeLevel>(FeeLevel, 'FeeLevel')\n\nexport const AutoFeeLevels = t.union([\n t.literal(FeeLevel.Low),\n t.literal(FeeLevel.Medium),\n t.literal(FeeLevel.High),\n], 'AutoFeeLevels')\nexport type AutoFeeLevels = t.TypeOf<typeof AutoFeeLevels>\n\nexport enum FeeRateType {\n Main = 'main', // ie bitcoins, ethers\n Base = 'base', // ie satoshis, wei\n BasePerWeight = 'base/weight', // ie satoshis per byte, gas price (wei per gas)\n}\nexport const FeeRateTypeT = enumCodec<FeeRateType>(FeeRateType, 'FeeRateType')\n\nexport const FeeRate = t.type({\n feeRate: t.string,\n feeRateType: FeeRateTypeT,\n}, 'FeeRate')\nexport type FeeRate = t.TypeOf<typeof FeeRate>\n\nexport const FeeOptionCustom = extendCodec(\n FeeRate,\n {},\n {\n feeLevel: t.literal(FeeLevel.Custom),\n },\n 'FeeOptionCustom',\n)\nexport type FeeOptionCustom = t.TypeOf<typeof FeeOptionCustom>\n\nexport const FeeOptionLevel = t.partial(\n {\n feeLevel: t.union([t.literal(FeeLevel.High), t.literal(FeeLevel.Medium), t.literal(FeeLevel.Low)]),\n },\n 'FeeOptionLevel',\n)\nexport type FeeOptionLevel = t.TypeOf<typeof FeeOptionLevel>\n\nexport const FeeOption = t.union([FeeOptionCustom, FeeOptionLevel], 'FeeOption')\nexport type FeeOption = t.TypeOf<typeof FeeOption>\n\nexport const UtxoInfo = requiredOptionalCodec(\n {\n txid: t.string,\n vout: t.number,\n value: t.string, // main denomination\n },\n {\n satoshis: t.union([t.number, t.string]),\n confirmations: t.number,\n height: t.string,\n lockTime: t.string,\n coinbase: t.boolean,\n txHex: t.string,\n scriptPubKeyHex: t.string,\n address: t.string,\n spent: t.boolean,\n signer: t.number, // signing account address or index relative to accountId\n },\n 'UtxoInfo',\n)\nexport type UtxoInfo = t.TypeOf<typeof UtxoInfo>\n\nexport const WeightedChangeOutput = t.type(\n {\n address: t.string,\n weight: t.number,\n },\n 'WeightedChangeOutput',\n)\nexport type WeightedChangeOutput = t.TypeOf<typeof WeightedChangeOutput>\n\nexport type FilterChangeAddresses = (addresses: string[]) => Promise<string[]>\nexport const FilterChangeAddresses = functionT<FilterChangeAddresses>('FilterChangeAddresses')\n\n/** Callback should return any known tx data hex strings (useful for caching) */\nexport type LookupTxDataByHashes = (txHashes: string[]) => Promise<{ [hash: string]: string }>\nexport const LookupTxDataByHashes = functionT<LookupTxDataByHashes>('LookupTxDataByHash')\n\nexport const CreateTransactionOptions = extendCodec(\n FeeOption,\n {},\n {\n sequenceNumber: Numeric, // Ripple/Stellar/Ethereum sequence number or nonce\n payportBalance: Numeric, // Spendable balance at the from payport (useful in conjunction with a BalanceMonitor)\n forcedUtxos: t.array(UtxoInfo), // utxos that must be used\n availableUtxos: t.array(UtxoInfo), // utxos that can be used\n useAllUtxos: t.boolean, // Uses all available utxos (ie sweep)\n useUnconfirmedUtxos: t.boolean, // Allow unconfirmed utxos as inputs\n recipientPaysFee: t.boolean, // Deduct fee from outputs (only utxo coins supported for now)\n maxFeePercent: Numeric, // Maximum fee as percent of output total\n changeAddress: t.union([t.string, t.array(t.string)]), // Change address\n lookupTxDataByHashes: LookupTxDataByHashes, // Callback to retrieve cached raw tx data for input hashes for psbt building\n },\n 'CreateTransactionOptions',\n)\nexport type CreateTransactionOptions = t.TypeOf<typeof CreateTransactionOptions>\n\nexport const GetTransactionInfoOptions = t.partial({\n changeAddress: t.union([t.string, t.array(t.string)]), // To differentiate external/change outputs\n filterChangeAddresses: FilterChangeAddresses, // Callback to filter out any change addresses from address list\n})\nexport type GetTransactionInfoOptions = t.TypeOf<typeof GetTransactionInfoOptions>\n\nexport const GetPayportOptions = t.partial({}, 'GetPayportOptions')\nexport type GetPayportOptions = t.TypeOf<typeof GetPayportOptions>\n\nexport const ResolvedFeeOption = t.type({\n targetFeeLevel: FeeLevelT,\n targetFeeRate: t.string,\n targetFeeRateType: FeeRateTypeT,\n feeBase: t.string,\n feeMain: t.string,\n}, 'ResolvedFeeOption')\nexport type ResolvedFeeOption = t.TypeOf<typeof ResolvedFeeOption>\n\nexport const BalanceResult = requiredOptionalCodec(\n {\n confirmedBalance: t.string, // balance with at least 1 confirmation\n unconfirmedBalance: t.string, // balance that is pending confirmation\n spendableBalance: t.string, // balance that can be spent (ie not locked in min balance)\n requiresActivation: t.boolean, // true if an address doesn't have min balance\n sweepable: t.boolean, // balance is high enough to be swept\n },\n {\n minimumBalance: t.string,\n },\n 'BalanceResult',\n)\nexport type BalanceResult = t.TypeOf<typeof BalanceResult>\n\nexport enum TransactionStatus {\n Unsigned = 'unsigned',\n Signed = 'signed',\n Pending = 'pending',\n Confirmed = 'confirmed',\n Failed = 'failed',\n}\nexport const TransactionStatusT = enumCodec<TransactionStatus>(TransactionStatus, 'TransactionStatus')\n\nexport const TransactionOutput = requiredOptionalCodec(\n {\n address: t.string,\n value: t.string,\n },\n {\n extraId: nullable(t.string),\n },\n 'TransactionOutput',\n)\nexport type TransactionOutput = t.TypeOf<typeof TransactionOutput>\n\nexport const TransactionCommon = requiredOptionalCodec(\n {\n status: TransactionStatusT,\n id: nullable(t.string), // network txid\n fromAddress: nullable(t.string), // sender address\n toAddress: nullable(t.string), // recipient address\n fromIndex: nullable(t.number), // sender address index\n toIndex: nullable(t.number), // recipient address index, null if not ours\n amount: nullable(t.string), // main denomination (eg \"0.125\")\n fee: nullable(t.string), // total fee in main denomination\n },\n {\n fromExtraId: nullable(t.string), // eg ripple sender tag\n toExtraId: nullable(t.string), // eg Monero payment ID or ripple destination tag\n sequenceNumber: nullable(t.union([t.string, t.number])), // eg Ethereum nonce or ripple sequence\n inputUtxos: t.array(UtxoInfo),\n outputUtxos: t.array(UtxoInfo),\n externalOutputs: t.array(TransactionOutput),\n weight: t.number, // weight of this transaction for fee purposes (ie vbytes, gas limit)\n chainId: t.string,\n },\n 'TransactionCommon',\n)\nexport type TransactionCommon = t.TypeOf<typeof TransactionCommon>\n\nexport const BaseMultisigData = t.type(\n {\n m: t.number,\n\n // Parallel arrays\n accountIds: t.array(t.string),\n publicKeys: t.array(t.string),\n\n // Accounts that have already signed (not parallel)\n signedAccountIds: t.array(t.string),\n },\n 'BitcoinMultisigData',\n)\nexport type BaseMultisigData = t.TypeOf<typeof BaseMultisigData>\n\nexport const AddressMultisigData = extendCodec(\n BaseMultisigData,\n {\n signerIndex: t.number,\n inputIndices: t.array(t.number),\n },\n 'AddressMultisigData',\n)\nexport type AddressMultisigData = t.TypeOf<typeof AddressMultisigData>\n\nexport const MultiInputMultisigData = t.record(t.string, AddressMultisigData, 'MultiInputMultisigData')\nexport type MultiInputMultisigData = t.TypeOf<typeof MultiInputMultisigData>\n\nexport const MultisigData = t.union([BaseMultisigData, MultiInputMultisigData])\nexport type MultisigData = t.TypeOf<typeof MultisigData>\n\nconst UnsignedCommon = extendCodec(\n TransactionCommon,\n {\n fromAddress: t.string,\n toAddress: t.string,\n fromIndex: nullable(t.number), // same as multioutput\n targetFeeLevel: FeeLevelT, // fee level requested upon creation\n targetFeeRate: nullable(t.string), // fee rate requested upon creation\n targetFeeRateType: nullable(FeeRateTypeT), // fee rate type requested upon creation\n },\n {\n multisigData: MultisigData,\n },\n 'UnsignedCommon',\n)\ntype UnsignedCommon = t.TypeOf<typeof UnsignedCommon>\n\nexport const BaseUnsignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Unsigned),\n data: t.object,\n },\n 'BaseUnsignedTransaction',\n)\nexport type BaseUnsignedTransaction = t.TypeOf<typeof BaseUnsignedTransaction>\n\nexport const BaseSignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Signed),\n id: t.string,\n amount: t.string,\n fee: t.string,\n data: t.object,\n },\n 'BaseSignedTransaction',\n)\nexport type BaseSignedTransaction = t.TypeOf<typeof BaseSignedTransaction>\n\nexport const BaseTransactionInfo = extendCodec(\n TransactionCommon,\n {\n id: t.string,\n amount: t.string,\n fee: t.string,\n isExecuted: t.boolean, // true if transaction didn't fail (eg TRX/ETH contract succeeded)\n isConfirmed: t.boolean,\n confirmations: t.number, // 0 if not confirmed\n confirmationId: nullable(t.string), // eg block/ledger hash. null if not confirmed\n confirmationTimestamp: nullable(DateT), // block timestamp. null if timestamp unavailable or unconfirmed\n data: t.object,\n },\n {\n currentBlockNumber: t.union([t.string, t.number]), // latest head of the blockchain\n confirmationNumber: t.union([t.string, t.number]) // eg block number in which tx was included\n },\n 'BaseTransactionInfo',\n)\nexport type BaseTransactionInfo = t.TypeOf<typeof BaseTransactionInfo>\n\nexport const BaseBroadcastResult = t.type(\n {\n id: t.string,\n },\n 'BaseBroadcastResult',\n)\nexport type BaseBroadcastResult = t.TypeOf<typeof BaseBroadcastResult>\n\nexport const BalanceActivityType = t.union([t.literal('in'), t.literal('out'), t.literal('fee')], 'BalanceActivityType')\nexport type BalanceActivityType = t.TypeOf<typeof BalanceActivityType>\n\nexport const BalanceActivity = requiredOptionalCodec(\n {\n type: BalanceActivityType,\n networkType: NetworkTypeT,\n networkSymbol: t.string,\n assetSymbol: t.string,\n address: t.string,\n extraId: nullable(t.string),\n amount: t.string,\n externalId: t.string,\n activitySequence: t.string,\n confirmationId: t.string,\n confirmationNumber: t.union([t.string, t.number]),\n timestamp: DateT,\n },\n {\n confirmations: t.number,\n // Utxos spent in this transaction applicable to the address\n utxosSpent: t.array(UtxoInfo),\n // Utxos create in this transaction applicable to the address\n utxosCreated: t.array(UtxoInfo),\n tokenAddress: t.string,\n },\n 'BalanceActivity',\n)\nexport type BalanceActivity = t.TypeOf<typeof BalanceActivity>\n\nexport const BalanceMonitorConfig = BaseConfig\nexport type BalanceMonitorConfig = t.TypeOf<typeof BalanceMonitorConfig>\n\nexport const GetBalanceActivityOptions = t.partial(\n {\n from: t.union([Numeric, BalanceActivity]),\n to: t.union([Numeric, BalanceActivity]),\n },\n 'GetBalanceActivityOptions',\n)\nexport type GetBalanceActivityOptions = t.TypeOf<typeof GetBalanceActivityOptions>\n\nexport type BalanceActivityCallback = (ba: BalanceActivity[], rawTx?: any) => Promise<void> | void\nexport const BalanceActivityCallback = functionT<BalanceActivityCallback>('BalanceActivityCallback')\n\nexport type NewBlockCallback = (b: { height: number, hash: string }) => Promise<void> | void\nexport const NewBlockCallback = functionT<NewBlockCallback>('NewBlockCallback')\n\nexport type FromTo = Pick<\n BaseUnsignedTransaction,\n 'fromAddress' | 'fromIndex' | 'fromExtraId' | 'toAddress' | 'toIndex' | 'toExtraId'\n> & { fromPayport: Payport; toPayport: Payport }\n\nexport const RetrieveBalanceActivitiesResult = t.type(\n {\n from: t.string,\n to: t.string,\n },\n 'RetrieveBalanceActivitiesResult',\n)\nexport type RetrieveBalanceActivitiesResult = t.TypeOf<typeof RetrieveBalanceActivitiesResult>\n\nexport const BlockInfo = requiredOptionalCodec(\n {\n id: t.string,\n height: t.number,\n time: DateT,\n },\n {\n previousId: t.string,\n raw: t.object,\n },\n 'BlockInfo',\n)\nexport type BlockInfo = t.TypeOf<typeof BlockInfo>\n\nexport type FilterBlockAddressesBlockInfo = BlockInfo & { page: number }\nexport type FilterBlockAddressesCallback = (\n addresses: string[], blockInfo: FilterBlockAddressesBlockInfo,\n) => string[] | Promise<string[]>\n\nexport const GetFeeRecommendationOptions = t.partial({\n source: t.string, // ie blockbook, blockcypher, ethgasstation, etc\n}, 'GetFeeRecommendationOptions')\nexport type GetFeeRecommendationOptions = t.TypeOf<typeof GetFeeRecommendationOptions>\n\nexport type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]\n","export enum PaymentsErrorCode {\n TxExpired = 'PAYMENTS_TX_EXPIRED',\n TxSequenceTooHigh = 'PAYMENTS_TX_SEQUENCE_TOO_HIGH',\n TxSequenceCollision = 'PAYMENTS_TX_SEQUENCE_COLLISION',\n /** Sender doesn't have enough balance for the output amount + fee */\n TxInsufficientBalance = 'PAYMENTS_TX_INSUFFICIENT_BALANCE',\n /** Fee exceeds the maximum acceptable percent relative to output amount */\n TxFeeTooHigh = 'PAYMENTS_TX_FEE_TOO_HIGH',\n}\n\nexport class PaymentsError extends Error {\n name = PaymentsError.name\n\n constructor(public code: PaymentsErrorCode, message?: string | Error) {\n super(typeof message === 'undefined' ? code : `${code} - ${message.toString()}`)\n }\n}\n","export const DEFAULT_MAX_FEE_PERCENT = 50\nexport const BIP39_SEED_REGEX = /^[0-9a-f]{128}$/\nexport const BIP39_SEED_BYTES = 64\nexport const DERIVATION_PATH_REGEX = /^(m\\/)?[0-9]+'?(\\/[0-9]+'?)*$/\n\nexport const SUPPORTED_NETWORK_SYMBOLS = [\n \"BCH\",\n \"BTC\",\n \"DOGE\",\n \"ETH\",\n \"LTC\",\n \"TRX\",\n \"XLM\",\n \"XRP\",\n] as const\n"],"names":["t","NetworkType","enumCodec","Logger","requiredOptionalCodec","nullable","Numeric","FeeLevel","FeeRateType","extendCodec","functionT","TransactionStatus","DateT","PaymentsErrorCode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAM,0BAA0B,GAAiD;AAC/E,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,GAAG,EAAE,IAAI;CACV,CAAA;AACM,MAAM,2BAA2B,GAAGA,YAAC,CAAC,KAAK,CAAC,0BAA0B,EAAE,6BAA6B,EAAC;MAgBhG,sBAAsB,G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,IAAI,CAAA;KAIxB;AACF;;AChBM,MAAM,uBAAuB,GAAG,GAAE;AAClC,MAAM,gBAAgB,GAAG,kBAAiB;AAC1C,MAAM,gBAAgB,GAAG,GAAE;AAC3B,MAAM,qBAAqB,GAAG,gCAA+B;AAEvD,MAAA,yBAAyB,GAAG;IACrC,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
+15
-6
@@ -5,10 +5,10 @@ import * as t from 'io-ts'; | ||
| const supportedNetworkSymbolsMap = { | ||
| TRX: null, | ||
| XRP: null, | ||
| XLM: null, | ||
| BCH: null, | ||
| BTC: null, | ||
| DOGE: null, | ||
| ETH: null, | ||
| LTC: null, | ||
| BCH: null, | ||
| DOGE: null, | ||
| TRX: null, | ||
| XLM: null, | ||
| XRP: null, | ||
| }; | ||
@@ -280,5 +280,14 @@ const SupportedCoinPaymentsSymbol = t.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol'); | ||
| const DERIVATION_PATH_REGEX = /^(m\/)?[0-9]+'?(\/[0-9]+'?)*$/; | ||
| const SUPPORTED_NETWORK_SYMBOLS = ["TRX", "XRP", "XLM", "BTC", "ETH", "LTC", "BCH", "DOGE"]; | ||
| const SUPPORTED_NETWORK_SYMBOLS = [ | ||
| "BCH", | ||
| "BTC", | ||
| "DOGE", | ||
| "ETH", | ||
| "LTC", | ||
| "TRX", | ||
| "XLM", | ||
| "XRP", | ||
| ]; | ||
| export { AddressMultisigData, AutoFeeLevels, BIP39_SEED_BYTES, BIP39_SEED_REGEX, BalanceActivity, BalanceActivityCallback, BalanceActivityType, BalanceMonitorConfig, BalanceResult, BaseBroadcastResult, BaseConfig, BaseMultisigData, BaseSignedTransaction, BaseTransactionInfo, BaseUnsignedTransaction, BlockInfo, CreateTransactionOptions, DEFAULT_MAX_FEE_PERCENT, DERIVATION_PATH_REGEX, DerivablePayport, FeeLevel, FeeLevelT, FeeOption, FeeOptionCustom, FeeOptionLevel, FeeRate, FeeRateType, FeeRateTypeT, FilterChangeAddresses, GetBalanceActivityOptions, GetFeeRecommendationOptions, GetPayportOptions, GetTransactionInfoOptions, KeyPairsConfigParam, LookupTxDataByHashes, MultiInputMultisigData, MultisigData, NetworkType, NetworkTypeT, NewBlockCallback, NullableOptionalString, PaymentsError, PaymentsErrorCode, Payport, PayportOutput, ResolveablePayport, ResolvedFeeOption, RetrieveBalanceActivitiesResult, SUPPORTED_NETWORK_SYMBOLS, SupportedCoinPaymentsSymbol, TransactionCommon, TransactionOutput, TransactionStatus, TransactionStatusT, UtxoInfo, WeightedChangeOutput }; | ||
| //# sourceMappingURL=index.es.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.es.js","sources":["../src/types.ts","../src/errors.ts","../src/constants.ts"],"sourcesContent":["import * as t from 'io-ts'\nimport {\n requiredOptionalCodec,\n extendCodec,\n enumCodec,\n nullable,\n DateT,\n Logger,\n functionT,\n Numeric,\n} from '@bitaccess/ts-common'\nimport { SUPPORTED_NETWORK_SYMBOLS } from './constants'\n\nexport type SupportedCoinPaymentsSymbol = typeof SUPPORTED_NETWORK_SYMBOLS[number]\nconst supportedNetworkSymbolsMap: { [k in SupportedCoinPaymentsSymbol]: null } = {\n TRX: null,\n XRP: null,\n XLM: null,\n BTC: null,\n ETH: null,\n LTC: null,\n BCH: null,\n DOGE: null,\n}\nexport const SupportedCoinPaymentsSymbol = t.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol')\n\nexport interface Bip32Network {\n wif: number\n bip32: {\n public: number\n private: number\n }\n messagePrefix?: string\n bech32?: string\n pubKeyHash?: number\n scriptHash?: number\n}\n\nexport type MaybePromise<T> = Promise<T> | T\n\nexport const NullableOptionalString = t.union([t.string, t.null, t.undefined])\nexport type NullableOptionalString = t.TypeOf<typeof NullableOptionalString>\n\nexport enum NetworkType {\n Mainnet = 'mainnet',\n Testnet = 'testnet',\n}\nexport const NetworkTypeT = enumCodec<NetworkType>(NetworkType, 'NetworkType')\n\nexport const BaseConfig = t.partial(\n {\n network: NetworkTypeT,\n logger: Logger,\n },\n 'BaseConfig',\n)\nexport type BaseConfig = t.TypeOf<typeof BaseConfig>\n\nexport const KeyPairsConfigParam = t.union([\n t.array(NullableOptionalString),\n t.record(t.number, NullableOptionalString)\n], 'KeyPairsConfigParam')\nexport type KeyPairsConfigParam = t.TypeOf<typeof KeyPairsConfigParam>\n\nexport const Payport = requiredOptionalCodec(\n {\n address: t.string,\n },\n {\n extraId: nullable(t.string),\n signerAddress: t.string,\n },\n 'Payport',\n)\nexport type Payport = t.TypeOf<typeof Payport>\n\nexport const DerivablePayport = requiredOptionalCodec(\n {\n index: t.number\n },\n {\n addressType: t.string // enum for each coin payments\n },\n 'DerivablePayport'\n)\nexport type DerivablePayport = t.TypeOf<typeof DerivablePayport>\n\nexport const ResolveablePayport = t.union([Payport, DerivablePayport, t.string, t.number], 'ResolveablePayport')\nexport type ResolveablePayport = t.TypeOf<typeof ResolveablePayport>\n\nexport const PayportOutput = t.type({\n payport: ResolveablePayport,\n amount: Numeric,\n}, 'PayportOutput')\nexport type PayportOutput = t.TypeOf<typeof PayportOutput>\n\nexport enum FeeLevel {\n Custom = 'custom',\n Low = 'low',\n Medium = 'medium',\n High = 'high',\n}\nexport const FeeLevelT = enumCodec<FeeLevel>(FeeLevel, 'FeeLevel')\n\nexport const AutoFeeLevels = t.union([\n t.literal(FeeLevel.Low),\n t.literal(FeeLevel.Medium),\n t.literal(FeeLevel.High),\n], 'AutoFeeLevels')\nexport type AutoFeeLevels = t.TypeOf<typeof AutoFeeLevels>\n\nexport enum FeeRateType {\n Main = 'main', // ie bitcoins, ethers\n Base = 'base', // ie satoshis, wei\n BasePerWeight = 'base/weight', // ie satoshis per byte, gas price (wei per gas)\n}\nexport const FeeRateTypeT = enumCodec<FeeRateType>(FeeRateType, 'FeeRateType')\n\nexport const FeeRate = t.type({\n feeRate: t.string,\n feeRateType: FeeRateTypeT,\n}, 'FeeRate')\nexport type FeeRate = t.TypeOf<typeof FeeRate>\n\nexport const FeeOptionCustom = extendCodec(\n FeeRate,\n {},\n {\n feeLevel: t.literal(FeeLevel.Custom),\n },\n 'FeeOptionCustom',\n)\nexport type FeeOptionCustom = t.TypeOf<typeof FeeOptionCustom>\n\nexport const FeeOptionLevel = t.partial(\n {\n feeLevel: t.union([t.literal(FeeLevel.High), t.literal(FeeLevel.Medium), t.literal(FeeLevel.Low)]),\n },\n 'FeeOptionLevel',\n)\nexport type FeeOptionLevel = t.TypeOf<typeof FeeOptionLevel>\n\nexport const FeeOption = t.union([FeeOptionCustom, FeeOptionLevel], 'FeeOption')\nexport type FeeOption = t.TypeOf<typeof FeeOption>\n\nexport const UtxoInfo = requiredOptionalCodec(\n {\n txid: t.string,\n vout: t.number,\n value: t.string, // main denomination\n },\n {\n satoshis: t.union([t.number, t.string]),\n confirmations: t.number,\n height: t.string,\n lockTime: t.string,\n coinbase: t.boolean,\n txHex: t.string,\n scriptPubKeyHex: t.string,\n address: t.string,\n spent: t.boolean,\n signer: t.number, // signing account address or index relative to accountId\n },\n 'UtxoInfo',\n)\nexport type UtxoInfo = t.TypeOf<typeof UtxoInfo>\n\nexport const WeightedChangeOutput = t.type(\n {\n address: t.string,\n weight: t.number,\n },\n 'WeightedChangeOutput',\n)\nexport type WeightedChangeOutput = t.TypeOf<typeof WeightedChangeOutput>\n\nexport type FilterChangeAddresses = (addresses: string[]) => Promise<string[]>\nexport const FilterChangeAddresses = functionT<FilterChangeAddresses>('FilterChangeAddresses')\n\n/** Callback should return any known tx data hex strings (useful for caching) */\nexport type LookupTxDataByHashes = (txHashes: string[]) => Promise<{ [hash: string]: string }>\nexport const LookupTxDataByHashes = functionT<LookupTxDataByHashes>('LookupTxDataByHash')\n\nexport const CreateTransactionOptions = extendCodec(\n FeeOption,\n {},\n {\n sequenceNumber: Numeric, // Ripple/Stellar/Ethereum sequence number or nonce\n payportBalance: Numeric, // Spendable balance at the from payport (useful in conjunction with a BalanceMonitor)\n forcedUtxos: t.array(UtxoInfo), // utxos that must be used\n availableUtxos: t.array(UtxoInfo), // utxos that can be used\n useAllUtxos: t.boolean, // Uses all available utxos (ie sweep)\n useUnconfirmedUtxos: t.boolean, // Allow unconfirmed utxos as inputs\n recipientPaysFee: t.boolean, // Deduct fee from outputs (only utxo coins supported for now)\n maxFeePercent: Numeric, // Maximum fee as percent of output total\n changeAddress: t.union([t.string, t.array(t.string)]), // Change address\n lookupTxDataByHashes: LookupTxDataByHashes, // Callback to retrieve cached raw tx data for input hashes for psbt building\n },\n 'CreateTransactionOptions',\n)\nexport type CreateTransactionOptions = t.TypeOf<typeof CreateTransactionOptions>\n\nexport const GetTransactionInfoOptions = t.partial({\n changeAddress: t.union([t.string, t.array(t.string)]), // To differentiate external/change outputs\n filterChangeAddresses: FilterChangeAddresses, // Callback to filter out any change addresses from address list\n})\nexport type GetTransactionInfoOptions = t.TypeOf<typeof GetTransactionInfoOptions>\n\nexport const GetPayportOptions = t.partial({}, 'GetPayportOptions')\nexport type GetPayportOptions = t.TypeOf<typeof GetPayportOptions>\n\nexport const ResolvedFeeOption = t.type({\n targetFeeLevel: FeeLevelT,\n targetFeeRate: t.string,\n targetFeeRateType: FeeRateTypeT,\n feeBase: t.string,\n feeMain: t.string,\n}, 'ResolvedFeeOption')\nexport type ResolvedFeeOption = t.TypeOf<typeof ResolvedFeeOption>\n\nexport const BalanceResult = requiredOptionalCodec(\n {\n confirmedBalance: t.string, // balance with at least 1 confirmation\n unconfirmedBalance: t.string, // balance that is pending confirmation\n spendableBalance: t.string, // balance that can be spent (ie not locked in min balance)\n requiresActivation: t.boolean, // true if an address doesn't have min balance\n sweepable: t.boolean, // balance is high enough to be swept\n },\n {\n minimumBalance: t.string,\n },\n 'BalanceResult',\n)\nexport type BalanceResult = t.TypeOf<typeof BalanceResult>\n\nexport enum TransactionStatus {\n Unsigned = 'unsigned',\n Signed = 'signed',\n Pending = 'pending',\n Confirmed = 'confirmed',\n Failed = 'failed',\n}\nexport const TransactionStatusT = enumCodec<TransactionStatus>(TransactionStatus, 'TransactionStatus')\n\nexport const TransactionOutput = requiredOptionalCodec(\n {\n address: t.string,\n value: t.string,\n },\n {\n extraId: nullable(t.string),\n },\n 'TransactionOutput',\n)\nexport type TransactionOutput = t.TypeOf<typeof TransactionOutput>\n\nexport const TransactionCommon = requiredOptionalCodec(\n {\n status: TransactionStatusT,\n id: nullable(t.string), // network txid\n fromAddress: nullable(t.string), // sender address\n toAddress: nullable(t.string), // recipient address\n fromIndex: nullable(t.number), // sender address index\n toIndex: nullable(t.number), // recipient address index, null if not ours\n amount: nullable(t.string), // main denomination (eg \"0.125\")\n fee: nullable(t.string), // total fee in main denomination\n },\n {\n fromExtraId: nullable(t.string), // eg ripple sender tag\n toExtraId: nullable(t.string), // eg Monero payment ID or ripple destination tag\n sequenceNumber: nullable(t.union([t.string, t.number])), // eg Ethereum nonce or ripple sequence\n inputUtxos: t.array(UtxoInfo),\n outputUtxos: t.array(UtxoInfo),\n externalOutputs: t.array(TransactionOutput),\n weight: t.number, // weight of this transaction for fee purposes (ie vbytes, gas limit)\n chainId: t.string,\n },\n 'TransactionCommon',\n)\nexport type TransactionCommon = t.TypeOf<typeof TransactionCommon>\n\nexport const BaseMultisigData = t.type(\n {\n m: t.number,\n\n // Parallel arrays\n accountIds: t.array(t.string),\n publicKeys: t.array(t.string),\n\n // Accounts that have already signed (not parallel)\n signedAccountIds: t.array(t.string),\n },\n 'BitcoinMultisigData',\n)\nexport type BaseMultisigData = t.TypeOf<typeof BaseMultisigData>\n\nexport const AddressMultisigData = extendCodec(\n BaseMultisigData,\n {\n signerIndex: t.number,\n inputIndices: t.array(t.number),\n },\n 'AddressMultisigData',\n)\nexport type AddressMultisigData = t.TypeOf<typeof AddressMultisigData>\n\nexport const MultiInputMultisigData = t.record(t.string, AddressMultisigData, 'MultiInputMultisigData')\nexport type MultiInputMultisigData = t.TypeOf<typeof MultiInputMultisigData>\n\nexport const MultisigData = t.union([BaseMultisigData, MultiInputMultisigData])\nexport type MultisigData = t.TypeOf<typeof MultisigData>\n\nconst UnsignedCommon = extendCodec(\n TransactionCommon,\n {\n fromAddress: t.string,\n toAddress: t.string,\n fromIndex: nullable(t.number), // same as multioutput\n targetFeeLevel: FeeLevelT, // fee level requested upon creation\n targetFeeRate: nullable(t.string), // fee rate requested upon creation\n targetFeeRateType: nullable(FeeRateTypeT), // fee rate type requested upon creation\n },\n {\n multisigData: MultisigData,\n },\n 'UnsignedCommon',\n)\ntype UnsignedCommon = t.TypeOf<typeof UnsignedCommon>\n\nexport const BaseUnsignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Unsigned),\n data: t.object,\n },\n 'BaseUnsignedTransaction',\n)\nexport type BaseUnsignedTransaction = t.TypeOf<typeof BaseUnsignedTransaction>\n\nexport const BaseSignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Signed),\n id: t.string,\n amount: t.string,\n fee: t.string,\n data: t.object,\n },\n 'BaseSignedTransaction',\n)\nexport type BaseSignedTransaction = t.TypeOf<typeof BaseSignedTransaction>\n\nexport const BaseTransactionInfo = extendCodec(\n TransactionCommon,\n {\n id: t.string,\n amount: t.string,\n fee: t.string,\n isExecuted: t.boolean, // true if transaction didn't fail (eg TRX/ETH contract succeeded)\n isConfirmed: t.boolean,\n confirmations: t.number, // 0 if not confirmed\n confirmationId: nullable(t.string), // eg block/ledger hash. null if not confirmed\n confirmationTimestamp: nullable(DateT), // block timestamp. null if timestamp unavailable or unconfirmed\n data: t.object,\n },\n {\n currentBlockNumber: t.union([t.string, t.number]), // latest head of the blockchain\n confirmationNumber: t.union([t.string, t.number]) // eg block number in which tx was included\n },\n 'BaseTransactionInfo',\n)\nexport type BaseTransactionInfo = t.TypeOf<typeof BaseTransactionInfo>\n\nexport const BaseBroadcastResult = t.type(\n {\n id: t.string,\n },\n 'BaseBroadcastResult',\n)\nexport type BaseBroadcastResult = t.TypeOf<typeof BaseBroadcastResult>\n\nexport const BalanceActivityType = t.union([t.literal('in'), t.literal('out'), t.literal('fee')], 'BalanceActivityType')\nexport type BalanceActivityType = t.TypeOf<typeof BalanceActivityType>\n\nexport const BalanceActivity = requiredOptionalCodec(\n {\n type: BalanceActivityType,\n networkType: NetworkTypeT,\n networkSymbol: t.string,\n assetSymbol: t.string,\n address: t.string,\n extraId: nullable(t.string),\n amount: t.string,\n externalId: t.string,\n activitySequence: t.string,\n confirmationId: t.string,\n confirmationNumber: t.union([t.string, t.number]),\n timestamp: DateT,\n },\n {\n confirmations: t.number,\n // Utxos spent in this transaction applicable to the address\n utxosSpent: t.array(UtxoInfo),\n // Utxos create in this transaction applicable to the address\n utxosCreated: t.array(UtxoInfo),\n tokenAddress: t.string,\n },\n 'BalanceActivity',\n)\nexport type BalanceActivity = t.TypeOf<typeof BalanceActivity>\n\nexport const BalanceMonitorConfig = BaseConfig\nexport type BalanceMonitorConfig = t.TypeOf<typeof BalanceMonitorConfig>\n\nexport const GetBalanceActivityOptions = t.partial(\n {\n from: t.union([Numeric, BalanceActivity]),\n to: t.union([Numeric, BalanceActivity]),\n },\n 'GetBalanceActivityOptions',\n)\nexport type GetBalanceActivityOptions = t.TypeOf<typeof GetBalanceActivityOptions>\n\nexport type BalanceActivityCallback = (ba: BalanceActivity[], rawTx?: any) => Promise<void> | void\nexport const BalanceActivityCallback = functionT<BalanceActivityCallback>('BalanceActivityCallback')\n\nexport type NewBlockCallback = (b: { height: number, hash: string }) => Promise<void> | void\nexport const NewBlockCallback = functionT<NewBlockCallback>('NewBlockCallback')\n\nexport type FromTo = Pick<\n BaseUnsignedTransaction,\n 'fromAddress' | 'fromIndex' | 'fromExtraId' | 'toAddress' | 'toIndex' | 'toExtraId'\n> & { fromPayport: Payport; toPayport: Payport }\n\nexport const RetrieveBalanceActivitiesResult = t.type(\n {\n from: t.string,\n to: t.string,\n },\n 'RetrieveBalanceActivitiesResult',\n)\nexport type RetrieveBalanceActivitiesResult = t.TypeOf<typeof RetrieveBalanceActivitiesResult>\n\nexport const BlockInfo = requiredOptionalCodec(\n {\n id: t.string,\n height: t.number,\n time: DateT,\n },\n {\n previousId: t.string,\n raw: t.object,\n },\n 'BlockInfo',\n)\nexport type BlockInfo = t.TypeOf<typeof BlockInfo>\n\nexport type FilterBlockAddressesBlockInfo = BlockInfo & { page: number }\nexport type FilterBlockAddressesCallback = (\n addresses: string[], blockInfo: FilterBlockAddressesBlockInfo,\n) => string[] | Promise<string[]>\n\nexport const GetFeeRecommendationOptions = t.partial({\n source: t.string, // ie blockbook, blockcypher, ethgasstation, etc\n}, 'GetFeeRecommendationOptions')\nexport type GetFeeRecommendationOptions = t.TypeOf<typeof GetFeeRecommendationOptions>\n\nexport type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]\n","export enum PaymentsErrorCode {\n TxExpired = 'PAYMENTS_TX_EXPIRED',\n TxSequenceTooHigh = 'PAYMENTS_TX_SEQUENCE_TOO_HIGH',\n TxSequenceCollision = 'PAYMENTS_TX_SEQUENCE_COLLISION',\n /** Sender doesn't have enough balance for the output amount + fee */\n TxInsufficientBalance = 'PAYMENTS_TX_INSUFFICIENT_BALANCE',\n /** Fee exceeds the maximum acceptable percent relative to output amount */\n TxFeeTooHigh = 'PAYMENTS_TX_FEE_TOO_HIGH',\n}\n\nexport class PaymentsError extends Error {\n name = PaymentsError.name\n\n constructor(public code: PaymentsErrorCode, message?: string | Error) {\n super(typeof message === 'undefined' ? code : `${code} - ${message.toString()}`)\n }\n}\n","export const DEFAULT_MAX_FEE_PERCENT = 50\nexport const BIP39_SEED_REGEX = /^[0-9a-f]{128}$/\nexport const BIP39_SEED_BYTES = 64\nexport const DERIVATION_PATH_REGEX = /^(m\\/)?[0-9]+'?(\\/[0-9]+'?)*$/\n\nexport const SUPPORTED_NETWORK_SYMBOLS = [\"TRX\", \"XRP\", \"XLM\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EAAE,CAAE,CAAA,CAAC,CAAA;QAD/D,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAmB;AAF1C,QAAA,IAAA,CAAA,IAAI,GAAG,aAAa,CAAC,IAAI,CAAA;KAIxB;AACF;;AChBM,MAAM,uBAAuB,GAAG,GAAE;AAClC,MAAM,gBAAgB,GAAG,kBAAiB;AAC1C,MAAM,gBAAgB,GAAG,GAAE;AAC3B,MAAM,qBAAqB,GAAG,gCAA+B;MAEvD,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM;;;;"} | ||
| {"version":3,"file":"index.es.js","sources":["../src/types.ts","../src/errors.ts","../src/constants.ts"],"sourcesContent":["import * as t from 'io-ts'\nimport {\n requiredOptionalCodec,\n extendCodec,\n enumCodec,\n nullable,\n DateT,\n Logger,\n functionT,\n Numeric,\n} from '@bitaccess/ts-common'\nimport { SUPPORTED_NETWORK_SYMBOLS } from './constants'\n\nexport type SupportedCoinPaymentsSymbol = typeof SUPPORTED_NETWORK_SYMBOLS[number]\nconst supportedNetworkSymbolsMap: { [k in SupportedCoinPaymentsSymbol]: null } = {\n BCH: null,\n BTC: null,\n DOGE: null,\n ETH: null,\n LTC: null,\n TRX: null,\n XLM: null,\n XRP: null,\n}\nexport const SupportedCoinPaymentsSymbol = t.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol')\n\nexport interface Bip32Network {\n wif: number\n bip32: {\n public: number\n private: number\n }\n messagePrefix?: string\n bech32?: string\n pubKeyHash?: number\n scriptHash?: number\n}\n\nexport type MaybePromise<T> = Promise<T> | T\n\nexport const NullableOptionalString = t.union([t.string, t.null, t.undefined])\nexport type NullableOptionalString = t.TypeOf<typeof NullableOptionalString>\n\nexport enum NetworkType {\n Mainnet = 'mainnet',\n Testnet = 'testnet',\n}\nexport const NetworkTypeT = enumCodec<NetworkType>(NetworkType, 'NetworkType')\n\nexport const BaseConfig = t.partial(\n {\n network: NetworkTypeT,\n logger: Logger,\n },\n 'BaseConfig',\n)\nexport type BaseConfig = t.TypeOf<typeof BaseConfig>\n\nexport const KeyPairsConfigParam = t.union([\n t.array(NullableOptionalString),\n t.record(t.number, NullableOptionalString)\n], 'KeyPairsConfigParam')\nexport type KeyPairsConfigParam = t.TypeOf<typeof KeyPairsConfigParam>\n\nexport const Payport = requiredOptionalCodec(\n {\n address: t.string,\n },\n {\n extraId: nullable(t.string),\n signerAddress: t.string,\n },\n 'Payport',\n)\nexport type Payport = t.TypeOf<typeof Payport>\n\nexport const DerivablePayport = requiredOptionalCodec(\n {\n index: t.number\n },\n {\n addressType: t.string // enum for each coin payments\n },\n 'DerivablePayport'\n)\nexport type DerivablePayport = t.TypeOf<typeof DerivablePayport>\n\nexport const ResolveablePayport = t.union([Payport, DerivablePayport, t.string, t.number], 'ResolveablePayport')\nexport type ResolveablePayport = t.TypeOf<typeof ResolveablePayport>\n\nexport const PayportOutput = t.type({\n payport: ResolveablePayport,\n amount: Numeric,\n}, 'PayportOutput')\nexport type PayportOutput = t.TypeOf<typeof PayportOutput>\n\nexport enum FeeLevel {\n Custom = 'custom',\n Low = 'low',\n Medium = 'medium',\n High = 'high',\n}\nexport const FeeLevelT = enumCodec<FeeLevel>(FeeLevel, 'FeeLevel')\n\nexport const AutoFeeLevels = t.union([\n t.literal(FeeLevel.Low),\n t.literal(FeeLevel.Medium),\n t.literal(FeeLevel.High),\n], 'AutoFeeLevels')\nexport type AutoFeeLevels = t.TypeOf<typeof AutoFeeLevels>\n\nexport enum FeeRateType {\n Main = 'main', // ie bitcoins, ethers\n Base = 'base', // ie satoshis, wei\n BasePerWeight = 'base/weight', // ie satoshis per byte, gas price (wei per gas)\n}\nexport const FeeRateTypeT = enumCodec<FeeRateType>(FeeRateType, 'FeeRateType')\n\nexport const FeeRate = t.type({\n feeRate: t.string,\n feeRateType: FeeRateTypeT,\n}, 'FeeRate')\nexport type FeeRate = t.TypeOf<typeof FeeRate>\n\nexport const FeeOptionCustom = extendCodec(\n FeeRate,\n {},\n {\n feeLevel: t.literal(FeeLevel.Custom),\n },\n 'FeeOptionCustom',\n)\nexport type FeeOptionCustom = t.TypeOf<typeof FeeOptionCustom>\n\nexport const FeeOptionLevel = t.partial(\n {\n feeLevel: t.union([t.literal(FeeLevel.High), t.literal(FeeLevel.Medium), t.literal(FeeLevel.Low)]),\n },\n 'FeeOptionLevel',\n)\nexport type FeeOptionLevel = t.TypeOf<typeof FeeOptionLevel>\n\nexport const FeeOption = t.union([FeeOptionCustom, FeeOptionLevel], 'FeeOption')\nexport type FeeOption = t.TypeOf<typeof FeeOption>\n\nexport const UtxoInfo = requiredOptionalCodec(\n {\n txid: t.string,\n vout: t.number,\n value: t.string, // main denomination\n },\n {\n satoshis: t.union([t.number, t.string]),\n confirmations: t.number,\n height: t.string,\n lockTime: t.string,\n coinbase: t.boolean,\n txHex: t.string,\n scriptPubKeyHex: t.string,\n address: t.string,\n spent: t.boolean,\n signer: t.number, // signing account address or index relative to accountId\n },\n 'UtxoInfo',\n)\nexport type UtxoInfo = t.TypeOf<typeof UtxoInfo>\n\nexport const WeightedChangeOutput = t.type(\n {\n address: t.string,\n weight: t.number,\n },\n 'WeightedChangeOutput',\n)\nexport type WeightedChangeOutput = t.TypeOf<typeof WeightedChangeOutput>\n\nexport type FilterChangeAddresses = (addresses: string[]) => Promise<string[]>\nexport const FilterChangeAddresses = functionT<FilterChangeAddresses>('FilterChangeAddresses')\n\n/** Callback should return any known tx data hex strings (useful for caching) */\nexport type LookupTxDataByHashes = (txHashes: string[]) => Promise<{ [hash: string]: string }>\nexport const LookupTxDataByHashes = functionT<LookupTxDataByHashes>('LookupTxDataByHash')\n\nexport const CreateTransactionOptions = extendCodec(\n FeeOption,\n {},\n {\n sequenceNumber: Numeric, // Ripple/Stellar/Ethereum sequence number or nonce\n payportBalance: Numeric, // Spendable balance at the from payport (useful in conjunction with a BalanceMonitor)\n forcedUtxos: t.array(UtxoInfo), // utxos that must be used\n availableUtxos: t.array(UtxoInfo), // utxos that can be used\n useAllUtxos: t.boolean, // Uses all available utxos (ie sweep)\n useUnconfirmedUtxos: t.boolean, // Allow unconfirmed utxos as inputs\n recipientPaysFee: t.boolean, // Deduct fee from outputs (only utxo coins supported for now)\n maxFeePercent: Numeric, // Maximum fee as percent of output total\n changeAddress: t.union([t.string, t.array(t.string)]), // Change address\n lookupTxDataByHashes: LookupTxDataByHashes, // Callback to retrieve cached raw tx data for input hashes for psbt building\n },\n 'CreateTransactionOptions',\n)\nexport type CreateTransactionOptions = t.TypeOf<typeof CreateTransactionOptions>\n\nexport const GetTransactionInfoOptions = t.partial({\n changeAddress: t.union([t.string, t.array(t.string)]), // To differentiate external/change outputs\n filterChangeAddresses: FilterChangeAddresses, // Callback to filter out any change addresses from address list\n})\nexport type GetTransactionInfoOptions = t.TypeOf<typeof GetTransactionInfoOptions>\n\nexport const GetPayportOptions = t.partial({}, 'GetPayportOptions')\nexport type GetPayportOptions = t.TypeOf<typeof GetPayportOptions>\n\nexport const ResolvedFeeOption = t.type({\n targetFeeLevel: FeeLevelT,\n targetFeeRate: t.string,\n targetFeeRateType: FeeRateTypeT,\n feeBase: t.string,\n feeMain: t.string,\n}, 'ResolvedFeeOption')\nexport type ResolvedFeeOption = t.TypeOf<typeof ResolvedFeeOption>\n\nexport const BalanceResult = requiredOptionalCodec(\n {\n confirmedBalance: t.string, // balance with at least 1 confirmation\n unconfirmedBalance: t.string, // balance that is pending confirmation\n spendableBalance: t.string, // balance that can be spent (ie not locked in min balance)\n requiresActivation: t.boolean, // true if an address doesn't have min balance\n sweepable: t.boolean, // balance is high enough to be swept\n },\n {\n minimumBalance: t.string,\n },\n 'BalanceResult',\n)\nexport type BalanceResult = t.TypeOf<typeof BalanceResult>\n\nexport enum TransactionStatus {\n Unsigned = 'unsigned',\n Signed = 'signed',\n Pending = 'pending',\n Confirmed = 'confirmed',\n Failed = 'failed',\n}\nexport const TransactionStatusT = enumCodec<TransactionStatus>(TransactionStatus, 'TransactionStatus')\n\nexport const TransactionOutput = requiredOptionalCodec(\n {\n address: t.string,\n value: t.string,\n },\n {\n extraId: nullable(t.string),\n },\n 'TransactionOutput',\n)\nexport type TransactionOutput = t.TypeOf<typeof TransactionOutput>\n\nexport const TransactionCommon = requiredOptionalCodec(\n {\n status: TransactionStatusT,\n id: nullable(t.string), // network txid\n fromAddress: nullable(t.string), // sender address\n toAddress: nullable(t.string), // recipient address\n fromIndex: nullable(t.number), // sender address index\n toIndex: nullable(t.number), // recipient address index, null if not ours\n amount: nullable(t.string), // main denomination (eg \"0.125\")\n fee: nullable(t.string), // total fee in main denomination\n },\n {\n fromExtraId: nullable(t.string), // eg ripple sender tag\n toExtraId: nullable(t.string), // eg Monero payment ID or ripple destination tag\n sequenceNumber: nullable(t.union([t.string, t.number])), // eg Ethereum nonce or ripple sequence\n inputUtxos: t.array(UtxoInfo),\n outputUtxos: t.array(UtxoInfo),\n externalOutputs: t.array(TransactionOutput),\n weight: t.number, // weight of this transaction for fee purposes (ie vbytes, gas limit)\n chainId: t.string,\n },\n 'TransactionCommon',\n)\nexport type TransactionCommon = t.TypeOf<typeof TransactionCommon>\n\nexport const BaseMultisigData = t.type(\n {\n m: t.number,\n\n // Parallel arrays\n accountIds: t.array(t.string),\n publicKeys: t.array(t.string),\n\n // Accounts that have already signed (not parallel)\n signedAccountIds: t.array(t.string),\n },\n 'BitcoinMultisigData',\n)\nexport type BaseMultisigData = t.TypeOf<typeof BaseMultisigData>\n\nexport const AddressMultisigData = extendCodec(\n BaseMultisigData,\n {\n signerIndex: t.number,\n inputIndices: t.array(t.number),\n },\n 'AddressMultisigData',\n)\nexport type AddressMultisigData = t.TypeOf<typeof AddressMultisigData>\n\nexport const MultiInputMultisigData = t.record(t.string, AddressMultisigData, 'MultiInputMultisigData')\nexport type MultiInputMultisigData = t.TypeOf<typeof MultiInputMultisigData>\n\nexport const MultisigData = t.union([BaseMultisigData, MultiInputMultisigData])\nexport type MultisigData = t.TypeOf<typeof MultisigData>\n\nconst UnsignedCommon = extendCodec(\n TransactionCommon,\n {\n fromAddress: t.string,\n toAddress: t.string,\n fromIndex: nullable(t.number), // same as multioutput\n targetFeeLevel: FeeLevelT, // fee level requested upon creation\n targetFeeRate: nullable(t.string), // fee rate requested upon creation\n targetFeeRateType: nullable(FeeRateTypeT), // fee rate type requested upon creation\n },\n {\n multisigData: MultisigData,\n },\n 'UnsignedCommon',\n)\ntype UnsignedCommon = t.TypeOf<typeof UnsignedCommon>\n\nexport const BaseUnsignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Unsigned),\n data: t.object,\n },\n 'BaseUnsignedTransaction',\n)\nexport type BaseUnsignedTransaction = t.TypeOf<typeof BaseUnsignedTransaction>\n\nexport const BaseSignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Signed),\n id: t.string,\n amount: t.string,\n fee: t.string,\n data: t.object,\n },\n 'BaseSignedTransaction',\n)\nexport type BaseSignedTransaction = t.TypeOf<typeof BaseSignedTransaction>\n\nexport const BaseTransactionInfo = extendCodec(\n TransactionCommon,\n {\n id: t.string,\n amount: t.string,\n fee: t.string,\n isExecuted: t.boolean, // true if transaction didn't fail (eg TRX/ETH contract succeeded)\n isConfirmed: t.boolean,\n confirmations: t.number, // 0 if not confirmed\n confirmationId: nullable(t.string), // eg block/ledger hash. null if not confirmed\n confirmationTimestamp: nullable(DateT), // block timestamp. null if timestamp unavailable or unconfirmed\n data: t.object,\n },\n {\n currentBlockNumber: t.union([t.string, t.number]), // latest head of the blockchain\n confirmationNumber: t.union([t.string, t.number]) // eg block number in which tx was included\n },\n 'BaseTransactionInfo',\n)\nexport type BaseTransactionInfo = t.TypeOf<typeof BaseTransactionInfo>\n\nexport const BaseBroadcastResult = t.type(\n {\n id: t.string,\n },\n 'BaseBroadcastResult',\n)\nexport type BaseBroadcastResult = t.TypeOf<typeof BaseBroadcastResult>\n\nexport const BalanceActivityType = t.union([t.literal('in'), t.literal('out'), t.literal('fee')], 'BalanceActivityType')\nexport type BalanceActivityType = t.TypeOf<typeof BalanceActivityType>\n\nexport const BalanceActivity = requiredOptionalCodec(\n {\n type: BalanceActivityType,\n networkType: NetworkTypeT,\n networkSymbol: t.string,\n assetSymbol: t.string,\n address: t.string,\n extraId: nullable(t.string),\n amount: t.string,\n externalId: t.string,\n activitySequence: t.string,\n confirmationId: t.string,\n confirmationNumber: t.union([t.string, t.number]),\n timestamp: DateT,\n },\n {\n confirmations: t.number,\n // Utxos spent in this transaction applicable to the address\n utxosSpent: t.array(UtxoInfo),\n // Utxos create in this transaction applicable to the address\n utxosCreated: t.array(UtxoInfo),\n tokenAddress: t.string,\n },\n 'BalanceActivity',\n)\nexport type BalanceActivity = t.TypeOf<typeof BalanceActivity>\n\nexport const BalanceMonitorConfig = BaseConfig\nexport type BalanceMonitorConfig = t.TypeOf<typeof BalanceMonitorConfig>\n\nexport const GetBalanceActivityOptions = t.partial(\n {\n from: t.union([Numeric, BalanceActivity]),\n to: t.union([Numeric, BalanceActivity]),\n },\n 'GetBalanceActivityOptions',\n)\nexport type GetBalanceActivityOptions = t.TypeOf<typeof GetBalanceActivityOptions>\n\nexport type BalanceActivityCallback = (ba: BalanceActivity[], rawTx?: any) => Promise<void> | void\nexport const BalanceActivityCallback = functionT<BalanceActivityCallback>('BalanceActivityCallback')\n\nexport type NewBlockCallback = (b: { height: number, hash: string }) => Promise<void> | void\nexport const NewBlockCallback = functionT<NewBlockCallback>('NewBlockCallback')\n\nexport type FromTo = Pick<\n BaseUnsignedTransaction,\n 'fromAddress' | 'fromIndex' | 'fromExtraId' | 'toAddress' | 'toIndex' | 'toExtraId'\n> & { fromPayport: Payport; toPayport: Payport }\n\nexport const RetrieveBalanceActivitiesResult = t.type(\n {\n from: t.string,\n to: t.string,\n },\n 'RetrieveBalanceActivitiesResult',\n)\nexport type RetrieveBalanceActivitiesResult = t.TypeOf<typeof RetrieveBalanceActivitiesResult>\n\nexport const BlockInfo = requiredOptionalCodec(\n {\n id: t.string,\n height: t.number,\n time: DateT,\n },\n {\n previousId: t.string,\n raw: t.object,\n },\n 'BlockInfo',\n)\nexport type BlockInfo = t.TypeOf<typeof BlockInfo>\n\nexport type FilterBlockAddressesBlockInfo = BlockInfo & { page: number }\nexport type FilterBlockAddressesCallback = (\n addresses: string[], blockInfo: FilterBlockAddressesBlockInfo,\n) => string[] | Promise<string[]>\n\nexport const GetFeeRecommendationOptions = t.partial({\n source: t.string, // ie blockbook, blockcypher, ethgasstation, etc\n}, 'GetFeeRecommendationOptions')\nexport type GetFeeRecommendationOptions = t.TypeOf<typeof GetFeeRecommendationOptions>\n\nexport type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]\n","export enum PaymentsErrorCode {\n TxExpired = 'PAYMENTS_TX_EXPIRED',\n TxSequenceTooHigh = 'PAYMENTS_TX_SEQUENCE_TOO_HIGH',\n TxSequenceCollision = 'PAYMENTS_TX_SEQUENCE_COLLISION',\n /** Sender doesn't have enough balance for the output amount + fee */\n TxInsufficientBalance = 'PAYMENTS_TX_INSUFFICIENT_BALANCE',\n /** Fee exceeds the maximum acceptable percent relative to output amount */\n TxFeeTooHigh = 'PAYMENTS_TX_FEE_TOO_HIGH',\n}\n\nexport class PaymentsError extends Error {\n name = PaymentsError.name\n\n constructor(public code: PaymentsErrorCode, message?: string | Error) {\n super(typeof message === 'undefined' ? code : `${code} - ${message.toString()}`)\n }\n}\n","export const DEFAULT_MAX_FEE_PERCENT = 50\nexport const BIP39_SEED_REGEX = /^[0-9a-f]{128}$/\nexport const BIP39_SEED_BYTES = 64\nexport const DERIVATION_PATH_REGEX = /^(m\\/)?[0-9]+'?(\\/[0-9]+'?)*$/\n\nexport const SUPPORTED_NETWORK_SYMBOLS = [\n \"BCH\",\n \"BTC\",\n \"DOGE\",\n \"ETH\",\n \"LTC\",\n \"TRX\",\n \"XLM\",\n \"XRP\",\n] as const\n"],"names":[],"mappings":";;;AAcA,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;AAF1C,QAAA,IAAA,CAAA,IAAI,GAAG,aAAa,CAAC,IAAI,CAAA;KAIxB;AACF;;AChBM,MAAM,uBAAuB,GAAG,GAAE;AAClC,MAAM,gBAAgB,GAAG,kBAAiB;AAC1C,MAAM,gBAAgB,GAAG,GAAE;AAC3B,MAAM,qBAAqB,GAAG,gCAA+B;AAEvD,MAAA,yBAAyB,GAAG;IACrC,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;;;;;"} |
+15
-6
@@ -28,10 +28,10 @@ (function (global, factory) { | ||
| const supportedNetworkSymbolsMap = { | ||
| TRX: null, | ||
| XRP: null, | ||
| XLM: null, | ||
| BCH: null, | ||
| BTC: null, | ||
| DOGE: null, | ||
| ETH: null, | ||
| LTC: null, | ||
| BCH: null, | ||
| DOGE: null, | ||
| TRX: null, | ||
| XLM: null, | ||
| XRP: null, | ||
| }; | ||
@@ -303,3 +303,12 @@ const SupportedCoinPaymentsSymbol = t__namespace.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol'); | ||
| const DERIVATION_PATH_REGEX = /^(m\/)?[0-9]+'?(\/[0-9]+'?)*$/; | ||
| const SUPPORTED_NETWORK_SYMBOLS = ["TRX", "XRP", "XLM", "BTC", "ETH", "LTC", "BCH", "DOGE"]; | ||
| const SUPPORTED_NETWORK_SYMBOLS = [ | ||
| "BCH", | ||
| "BTC", | ||
| "DOGE", | ||
| "ETH", | ||
| "LTC", | ||
| "TRX", | ||
| "XLM", | ||
| "XRP", | ||
| ]; | ||
@@ -306,0 +315,0 @@ exports.AddressMultisigData = AddressMultisigData; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.umd.js","sources":["../src/types.ts","../src/errors.ts","../src/constants.ts"],"sourcesContent":["import * as t from 'io-ts'\nimport {\n requiredOptionalCodec,\n extendCodec,\n enumCodec,\n nullable,\n DateT,\n Logger,\n functionT,\n Numeric,\n} from '@bitaccess/ts-common'\nimport { SUPPORTED_NETWORK_SYMBOLS } from './constants'\n\nexport type SupportedCoinPaymentsSymbol = typeof SUPPORTED_NETWORK_SYMBOLS[number]\nconst supportedNetworkSymbolsMap: { [k in SupportedCoinPaymentsSymbol]: null } = {\n TRX: null,\n XRP: null,\n XLM: null,\n BTC: null,\n ETH: null,\n LTC: null,\n BCH: null,\n DOGE: null,\n}\nexport const SupportedCoinPaymentsSymbol = t.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol')\n\nexport interface Bip32Network {\n wif: number\n bip32: {\n public: number\n private: number\n }\n messagePrefix?: string\n bech32?: string\n pubKeyHash?: number\n scriptHash?: number\n}\n\nexport type MaybePromise<T> = Promise<T> | T\n\nexport const NullableOptionalString = t.union([t.string, t.null, t.undefined])\nexport type NullableOptionalString = t.TypeOf<typeof NullableOptionalString>\n\nexport enum NetworkType {\n Mainnet = 'mainnet',\n Testnet = 'testnet',\n}\nexport const NetworkTypeT = enumCodec<NetworkType>(NetworkType, 'NetworkType')\n\nexport const BaseConfig = t.partial(\n {\n network: NetworkTypeT,\n logger: Logger,\n },\n 'BaseConfig',\n)\nexport type BaseConfig = t.TypeOf<typeof BaseConfig>\n\nexport const KeyPairsConfigParam = t.union([\n t.array(NullableOptionalString),\n t.record(t.number, NullableOptionalString)\n], 'KeyPairsConfigParam')\nexport type KeyPairsConfigParam = t.TypeOf<typeof KeyPairsConfigParam>\n\nexport const Payport = requiredOptionalCodec(\n {\n address: t.string,\n },\n {\n extraId: nullable(t.string),\n signerAddress: t.string,\n },\n 'Payport',\n)\nexport type Payport = t.TypeOf<typeof Payport>\n\nexport const DerivablePayport = requiredOptionalCodec(\n {\n index: t.number\n },\n {\n addressType: t.string // enum for each coin payments\n },\n 'DerivablePayport'\n)\nexport type DerivablePayport = t.TypeOf<typeof DerivablePayport>\n\nexport const ResolveablePayport = t.union([Payport, DerivablePayport, t.string, t.number], 'ResolveablePayport')\nexport type ResolveablePayport = t.TypeOf<typeof ResolveablePayport>\n\nexport const PayportOutput = t.type({\n payport: ResolveablePayport,\n amount: Numeric,\n}, 'PayportOutput')\nexport type PayportOutput = t.TypeOf<typeof PayportOutput>\n\nexport enum FeeLevel {\n Custom = 'custom',\n Low = 'low',\n Medium = 'medium',\n High = 'high',\n}\nexport const FeeLevelT = enumCodec<FeeLevel>(FeeLevel, 'FeeLevel')\n\nexport const AutoFeeLevels = t.union([\n t.literal(FeeLevel.Low),\n t.literal(FeeLevel.Medium),\n t.literal(FeeLevel.High),\n], 'AutoFeeLevels')\nexport type AutoFeeLevels = t.TypeOf<typeof AutoFeeLevels>\n\nexport enum FeeRateType {\n Main = 'main', // ie bitcoins, ethers\n Base = 'base', // ie satoshis, wei\n BasePerWeight = 'base/weight', // ie satoshis per byte, gas price (wei per gas)\n}\nexport const FeeRateTypeT = enumCodec<FeeRateType>(FeeRateType, 'FeeRateType')\n\nexport const FeeRate = t.type({\n feeRate: t.string,\n feeRateType: FeeRateTypeT,\n}, 'FeeRate')\nexport type FeeRate = t.TypeOf<typeof FeeRate>\n\nexport const FeeOptionCustom = extendCodec(\n FeeRate,\n {},\n {\n feeLevel: t.literal(FeeLevel.Custom),\n },\n 'FeeOptionCustom',\n)\nexport type FeeOptionCustom = t.TypeOf<typeof FeeOptionCustom>\n\nexport const FeeOptionLevel = t.partial(\n {\n feeLevel: t.union([t.literal(FeeLevel.High), t.literal(FeeLevel.Medium), t.literal(FeeLevel.Low)]),\n },\n 'FeeOptionLevel',\n)\nexport type FeeOptionLevel = t.TypeOf<typeof FeeOptionLevel>\n\nexport const FeeOption = t.union([FeeOptionCustom, FeeOptionLevel], 'FeeOption')\nexport type FeeOption = t.TypeOf<typeof FeeOption>\n\nexport const UtxoInfo = requiredOptionalCodec(\n {\n txid: t.string,\n vout: t.number,\n value: t.string, // main denomination\n },\n {\n satoshis: t.union([t.number, t.string]),\n confirmations: t.number,\n height: t.string,\n lockTime: t.string,\n coinbase: t.boolean,\n txHex: t.string,\n scriptPubKeyHex: t.string,\n address: t.string,\n spent: t.boolean,\n signer: t.number, // signing account address or index relative to accountId\n },\n 'UtxoInfo',\n)\nexport type UtxoInfo = t.TypeOf<typeof UtxoInfo>\n\nexport const WeightedChangeOutput = t.type(\n {\n address: t.string,\n weight: t.number,\n },\n 'WeightedChangeOutput',\n)\nexport type WeightedChangeOutput = t.TypeOf<typeof WeightedChangeOutput>\n\nexport type FilterChangeAddresses = (addresses: string[]) => Promise<string[]>\nexport const FilterChangeAddresses = functionT<FilterChangeAddresses>('FilterChangeAddresses')\n\n/** Callback should return any known tx data hex strings (useful for caching) */\nexport type LookupTxDataByHashes = (txHashes: string[]) => Promise<{ [hash: string]: string }>\nexport const LookupTxDataByHashes = functionT<LookupTxDataByHashes>('LookupTxDataByHash')\n\nexport const CreateTransactionOptions = extendCodec(\n FeeOption,\n {},\n {\n sequenceNumber: Numeric, // Ripple/Stellar/Ethereum sequence number or nonce\n payportBalance: Numeric, // Spendable balance at the from payport (useful in conjunction with a BalanceMonitor)\n forcedUtxos: t.array(UtxoInfo), // utxos that must be used\n availableUtxos: t.array(UtxoInfo), // utxos that can be used\n useAllUtxos: t.boolean, // Uses all available utxos (ie sweep)\n useUnconfirmedUtxos: t.boolean, // Allow unconfirmed utxos as inputs\n recipientPaysFee: t.boolean, // Deduct fee from outputs (only utxo coins supported for now)\n maxFeePercent: Numeric, // Maximum fee as percent of output total\n changeAddress: t.union([t.string, t.array(t.string)]), // Change address\n lookupTxDataByHashes: LookupTxDataByHashes, // Callback to retrieve cached raw tx data for input hashes for psbt building\n },\n 'CreateTransactionOptions',\n)\nexport type CreateTransactionOptions = t.TypeOf<typeof CreateTransactionOptions>\n\nexport const GetTransactionInfoOptions = t.partial({\n changeAddress: t.union([t.string, t.array(t.string)]), // To differentiate external/change outputs\n filterChangeAddresses: FilterChangeAddresses, // Callback to filter out any change addresses from address list\n})\nexport type GetTransactionInfoOptions = t.TypeOf<typeof GetTransactionInfoOptions>\n\nexport const GetPayportOptions = t.partial({}, 'GetPayportOptions')\nexport type GetPayportOptions = t.TypeOf<typeof GetPayportOptions>\n\nexport const ResolvedFeeOption = t.type({\n targetFeeLevel: FeeLevelT,\n targetFeeRate: t.string,\n targetFeeRateType: FeeRateTypeT,\n feeBase: t.string,\n feeMain: t.string,\n}, 'ResolvedFeeOption')\nexport type ResolvedFeeOption = t.TypeOf<typeof ResolvedFeeOption>\n\nexport const BalanceResult = requiredOptionalCodec(\n {\n confirmedBalance: t.string, // balance with at least 1 confirmation\n unconfirmedBalance: t.string, // balance that is pending confirmation\n spendableBalance: t.string, // balance that can be spent (ie not locked in min balance)\n requiresActivation: t.boolean, // true if an address doesn't have min balance\n sweepable: t.boolean, // balance is high enough to be swept\n },\n {\n minimumBalance: t.string,\n },\n 'BalanceResult',\n)\nexport type BalanceResult = t.TypeOf<typeof BalanceResult>\n\nexport enum TransactionStatus {\n Unsigned = 'unsigned',\n Signed = 'signed',\n Pending = 'pending',\n Confirmed = 'confirmed',\n Failed = 'failed',\n}\nexport const TransactionStatusT = enumCodec<TransactionStatus>(TransactionStatus, 'TransactionStatus')\n\nexport const TransactionOutput = requiredOptionalCodec(\n {\n address: t.string,\n value: t.string,\n },\n {\n extraId: nullable(t.string),\n },\n 'TransactionOutput',\n)\nexport type TransactionOutput = t.TypeOf<typeof TransactionOutput>\n\nexport const TransactionCommon = requiredOptionalCodec(\n {\n status: TransactionStatusT,\n id: nullable(t.string), // network txid\n fromAddress: nullable(t.string), // sender address\n toAddress: nullable(t.string), // recipient address\n fromIndex: nullable(t.number), // sender address index\n toIndex: nullable(t.number), // recipient address index, null if not ours\n amount: nullable(t.string), // main denomination (eg \"0.125\")\n fee: nullable(t.string), // total fee in main denomination\n },\n {\n fromExtraId: nullable(t.string), // eg ripple sender tag\n toExtraId: nullable(t.string), // eg Monero payment ID or ripple destination tag\n sequenceNumber: nullable(t.union([t.string, t.number])), // eg Ethereum nonce or ripple sequence\n inputUtxos: t.array(UtxoInfo),\n outputUtxos: t.array(UtxoInfo),\n externalOutputs: t.array(TransactionOutput),\n weight: t.number, // weight of this transaction for fee purposes (ie vbytes, gas limit)\n chainId: t.string,\n },\n 'TransactionCommon',\n)\nexport type TransactionCommon = t.TypeOf<typeof TransactionCommon>\n\nexport const BaseMultisigData = t.type(\n {\n m: t.number,\n\n // Parallel arrays\n accountIds: t.array(t.string),\n publicKeys: t.array(t.string),\n\n // Accounts that have already signed (not parallel)\n signedAccountIds: t.array(t.string),\n },\n 'BitcoinMultisigData',\n)\nexport type BaseMultisigData = t.TypeOf<typeof BaseMultisigData>\n\nexport const AddressMultisigData = extendCodec(\n BaseMultisigData,\n {\n signerIndex: t.number,\n inputIndices: t.array(t.number),\n },\n 'AddressMultisigData',\n)\nexport type AddressMultisigData = t.TypeOf<typeof AddressMultisigData>\n\nexport const MultiInputMultisigData = t.record(t.string, AddressMultisigData, 'MultiInputMultisigData')\nexport type MultiInputMultisigData = t.TypeOf<typeof MultiInputMultisigData>\n\nexport const MultisigData = t.union([BaseMultisigData, MultiInputMultisigData])\nexport type MultisigData = t.TypeOf<typeof MultisigData>\n\nconst UnsignedCommon = extendCodec(\n TransactionCommon,\n {\n fromAddress: t.string,\n toAddress: t.string,\n fromIndex: nullable(t.number), // same as multioutput\n targetFeeLevel: FeeLevelT, // fee level requested upon creation\n targetFeeRate: nullable(t.string), // fee rate requested upon creation\n targetFeeRateType: nullable(FeeRateTypeT), // fee rate type requested upon creation\n },\n {\n multisigData: MultisigData,\n },\n 'UnsignedCommon',\n)\ntype UnsignedCommon = t.TypeOf<typeof UnsignedCommon>\n\nexport const BaseUnsignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Unsigned),\n data: t.object,\n },\n 'BaseUnsignedTransaction',\n)\nexport type BaseUnsignedTransaction = t.TypeOf<typeof BaseUnsignedTransaction>\n\nexport const BaseSignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Signed),\n id: t.string,\n amount: t.string,\n fee: t.string,\n data: t.object,\n },\n 'BaseSignedTransaction',\n)\nexport type BaseSignedTransaction = t.TypeOf<typeof BaseSignedTransaction>\n\nexport const BaseTransactionInfo = extendCodec(\n TransactionCommon,\n {\n id: t.string,\n amount: t.string,\n fee: t.string,\n isExecuted: t.boolean, // true if transaction didn't fail (eg TRX/ETH contract succeeded)\n isConfirmed: t.boolean,\n confirmations: t.number, // 0 if not confirmed\n confirmationId: nullable(t.string), // eg block/ledger hash. null if not confirmed\n confirmationTimestamp: nullable(DateT), // block timestamp. null if timestamp unavailable or unconfirmed\n data: t.object,\n },\n {\n currentBlockNumber: t.union([t.string, t.number]), // latest head of the blockchain\n confirmationNumber: t.union([t.string, t.number]) // eg block number in which tx was included\n },\n 'BaseTransactionInfo',\n)\nexport type BaseTransactionInfo = t.TypeOf<typeof BaseTransactionInfo>\n\nexport const BaseBroadcastResult = t.type(\n {\n id: t.string,\n },\n 'BaseBroadcastResult',\n)\nexport type BaseBroadcastResult = t.TypeOf<typeof BaseBroadcastResult>\n\nexport const BalanceActivityType = t.union([t.literal('in'), t.literal('out'), t.literal('fee')], 'BalanceActivityType')\nexport type BalanceActivityType = t.TypeOf<typeof BalanceActivityType>\n\nexport const BalanceActivity = requiredOptionalCodec(\n {\n type: BalanceActivityType,\n networkType: NetworkTypeT,\n networkSymbol: t.string,\n assetSymbol: t.string,\n address: t.string,\n extraId: nullable(t.string),\n amount: t.string,\n externalId: t.string,\n activitySequence: t.string,\n confirmationId: t.string,\n confirmationNumber: t.union([t.string, t.number]),\n timestamp: DateT,\n },\n {\n confirmations: t.number,\n // Utxos spent in this transaction applicable to the address\n utxosSpent: t.array(UtxoInfo),\n // Utxos create in this transaction applicable to the address\n utxosCreated: t.array(UtxoInfo),\n tokenAddress: t.string,\n },\n 'BalanceActivity',\n)\nexport type BalanceActivity = t.TypeOf<typeof BalanceActivity>\n\nexport const BalanceMonitorConfig = BaseConfig\nexport type BalanceMonitorConfig = t.TypeOf<typeof BalanceMonitorConfig>\n\nexport const GetBalanceActivityOptions = t.partial(\n {\n from: t.union([Numeric, BalanceActivity]),\n to: t.union([Numeric, BalanceActivity]),\n },\n 'GetBalanceActivityOptions',\n)\nexport type GetBalanceActivityOptions = t.TypeOf<typeof GetBalanceActivityOptions>\n\nexport type BalanceActivityCallback = (ba: BalanceActivity[], rawTx?: any) => Promise<void> | void\nexport const BalanceActivityCallback = functionT<BalanceActivityCallback>('BalanceActivityCallback')\n\nexport type NewBlockCallback = (b: { height: number, hash: string }) => Promise<void> | void\nexport const NewBlockCallback = functionT<NewBlockCallback>('NewBlockCallback')\n\nexport type FromTo = Pick<\n BaseUnsignedTransaction,\n 'fromAddress' | 'fromIndex' | 'fromExtraId' | 'toAddress' | 'toIndex' | 'toExtraId'\n> & { fromPayport: Payport; toPayport: Payport }\n\nexport const RetrieveBalanceActivitiesResult = t.type(\n {\n from: t.string,\n to: t.string,\n },\n 'RetrieveBalanceActivitiesResult',\n)\nexport type RetrieveBalanceActivitiesResult = t.TypeOf<typeof RetrieveBalanceActivitiesResult>\n\nexport const BlockInfo = requiredOptionalCodec(\n {\n id: t.string,\n height: t.number,\n time: DateT,\n },\n {\n previousId: t.string,\n raw: t.object,\n },\n 'BlockInfo',\n)\nexport type BlockInfo = t.TypeOf<typeof BlockInfo>\n\nexport type FilterBlockAddressesBlockInfo = BlockInfo & { page: number }\nexport type FilterBlockAddressesCallback = (\n addresses: string[], blockInfo: FilterBlockAddressesBlockInfo,\n) => string[] | Promise<string[]>\n\nexport const GetFeeRecommendationOptions = t.partial({\n source: t.string, // ie blockbook, blockcypher, ethgasstation, etc\n}, 'GetFeeRecommendationOptions')\nexport type GetFeeRecommendationOptions = t.TypeOf<typeof GetFeeRecommendationOptions>\n\nexport type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]\n","export enum PaymentsErrorCode {\n TxExpired = 'PAYMENTS_TX_EXPIRED',\n TxSequenceTooHigh = 'PAYMENTS_TX_SEQUENCE_TOO_HIGH',\n TxSequenceCollision = 'PAYMENTS_TX_SEQUENCE_COLLISION',\n /** Sender doesn't have enough balance for the output amount + fee */\n TxInsufficientBalance = 'PAYMENTS_TX_INSUFFICIENT_BALANCE',\n /** Fee exceeds the maximum acceptable percent relative to output amount */\n TxFeeTooHigh = 'PAYMENTS_TX_FEE_TOO_HIGH',\n}\n\nexport class PaymentsError extends Error {\n name = PaymentsError.name\n\n constructor(public code: PaymentsErrorCode, message?: string | Error) {\n super(typeof message === 'undefined' ? code : `${code} - ${message.toString()}`)\n }\n}\n","export const DEFAULT_MAX_FEE_PERCENT = 50\nexport const BIP39_SEED_REGEX = /^[0-9a-f]{128}$/\nexport const BIP39_SEED_BYTES = 64\nexport const DERIVATION_PATH_REGEX = /^(m\\/)?[0-9]+'?(\\/[0-9]+'?)*$/\n\nexport const SUPPORTED_NETWORK_SYMBOLS = [\"TRX\", \"XRP\", \"XLM\", \"BTC\", \"ETH\", \"LTC\", \"BCH\", \"DOGE\"] as const\n"],"names":["t","NetworkType","enumCodec","Logger","requiredOptionalCodec","nullable","Numeric","FeeLevel","FeeRateType","extendCodec","functionT","TransactionStatus","DateT","PaymentsErrorCode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAcA,MAAM,0BAA0B,GAAiD;EAC/E,IAAA,GAAG,EAAE,IAAI;EACT,IAAA,GAAG,EAAE,IAAI;EACT,IAAA,GAAG,EAAE,IAAI;EACT,IAAA,GAAG,EAAE,IAAI;EACT,IAAA,GAAG,EAAE,IAAI;EACT,IAAA,GAAG,EAAE,IAAI;EACT,IAAA,GAAG,EAAE,IAAI;EACT,IAAA,IAAI,EAAE,IAAI;GACX,CAAA;AACM,QAAM,2BAA2B,GAAGA,YAAC,CAAC,KAAK,CAAC,0BAA0B,EAAE,6BAA6B,EAAC;QAgBhG,sBAAsB,GAAGA,YAAC,CAAC,KAAK,CAAC,CAACA,YAAC,CAAC,MAAM,EAAEA,YAAC,CAAC,IAAI,EAAEA,YAAC,CAAC,SAAS,CAAC,EAAC;AAG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,GAAE;AAC3B,QAAM,qBAAqB,GAAG,gCAA+B;QAEvD,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} | ||
| {"version":3,"file":"index.umd.js","sources":["../src/types.ts","../src/errors.ts","../src/constants.ts"],"sourcesContent":["import * as t from 'io-ts'\nimport {\n requiredOptionalCodec,\n extendCodec,\n enumCodec,\n nullable,\n DateT,\n Logger,\n functionT,\n Numeric,\n} from '@bitaccess/ts-common'\nimport { SUPPORTED_NETWORK_SYMBOLS } from './constants'\n\nexport type SupportedCoinPaymentsSymbol = typeof SUPPORTED_NETWORK_SYMBOLS[number]\nconst supportedNetworkSymbolsMap: { [k in SupportedCoinPaymentsSymbol]: null } = {\n BCH: null,\n BTC: null,\n DOGE: null,\n ETH: null,\n LTC: null,\n TRX: null,\n XLM: null,\n XRP: null,\n}\nexport const SupportedCoinPaymentsSymbol = t.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol')\n\nexport interface Bip32Network {\n wif: number\n bip32: {\n public: number\n private: number\n }\n messagePrefix?: string\n bech32?: string\n pubKeyHash?: number\n scriptHash?: number\n}\n\nexport type MaybePromise<T> = Promise<T> | T\n\nexport const NullableOptionalString = t.union([t.string, t.null, t.undefined])\nexport type NullableOptionalString = t.TypeOf<typeof NullableOptionalString>\n\nexport enum NetworkType {\n Mainnet = 'mainnet',\n Testnet = 'testnet',\n}\nexport const NetworkTypeT = enumCodec<NetworkType>(NetworkType, 'NetworkType')\n\nexport const BaseConfig = t.partial(\n {\n network: NetworkTypeT,\n logger: Logger,\n },\n 'BaseConfig',\n)\nexport type BaseConfig = t.TypeOf<typeof BaseConfig>\n\nexport const KeyPairsConfigParam = t.union([\n t.array(NullableOptionalString),\n t.record(t.number, NullableOptionalString)\n], 'KeyPairsConfigParam')\nexport type KeyPairsConfigParam = t.TypeOf<typeof KeyPairsConfigParam>\n\nexport const Payport = requiredOptionalCodec(\n {\n address: t.string,\n },\n {\n extraId: nullable(t.string),\n signerAddress: t.string,\n },\n 'Payport',\n)\nexport type Payport = t.TypeOf<typeof Payport>\n\nexport const DerivablePayport = requiredOptionalCodec(\n {\n index: t.number\n },\n {\n addressType: t.string // enum for each coin payments\n },\n 'DerivablePayport'\n)\nexport type DerivablePayport = t.TypeOf<typeof DerivablePayport>\n\nexport const ResolveablePayport = t.union([Payport, DerivablePayport, t.string, t.number], 'ResolveablePayport')\nexport type ResolveablePayport = t.TypeOf<typeof ResolveablePayport>\n\nexport const PayportOutput = t.type({\n payport: ResolveablePayport,\n amount: Numeric,\n}, 'PayportOutput')\nexport type PayportOutput = t.TypeOf<typeof PayportOutput>\n\nexport enum FeeLevel {\n Custom = 'custom',\n Low = 'low',\n Medium = 'medium',\n High = 'high',\n}\nexport const FeeLevelT = enumCodec<FeeLevel>(FeeLevel, 'FeeLevel')\n\nexport const AutoFeeLevels = t.union([\n t.literal(FeeLevel.Low),\n t.literal(FeeLevel.Medium),\n t.literal(FeeLevel.High),\n], 'AutoFeeLevels')\nexport type AutoFeeLevels = t.TypeOf<typeof AutoFeeLevels>\n\nexport enum FeeRateType {\n Main = 'main', // ie bitcoins, ethers\n Base = 'base', // ie satoshis, wei\n BasePerWeight = 'base/weight', // ie satoshis per byte, gas price (wei per gas)\n}\nexport const FeeRateTypeT = enumCodec<FeeRateType>(FeeRateType, 'FeeRateType')\n\nexport const FeeRate = t.type({\n feeRate: t.string,\n feeRateType: FeeRateTypeT,\n}, 'FeeRate')\nexport type FeeRate = t.TypeOf<typeof FeeRate>\n\nexport const FeeOptionCustom = extendCodec(\n FeeRate,\n {},\n {\n feeLevel: t.literal(FeeLevel.Custom),\n },\n 'FeeOptionCustom',\n)\nexport type FeeOptionCustom = t.TypeOf<typeof FeeOptionCustom>\n\nexport const FeeOptionLevel = t.partial(\n {\n feeLevel: t.union([t.literal(FeeLevel.High), t.literal(FeeLevel.Medium), t.literal(FeeLevel.Low)]),\n },\n 'FeeOptionLevel',\n)\nexport type FeeOptionLevel = t.TypeOf<typeof FeeOptionLevel>\n\nexport const FeeOption = t.union([FeeOptionCustom, FeeOptionLevel], 'FeeOption')\nexport type FeeOption = t.TypeOf<typeof FeeOption>\n\nexport const UtxoInfo = requiredOptionalCodec(\n {\n txid: t.string,\n vout: t.number,\n value: t.string, // main denomination\n },\n {\n satoshis: t.union([t.number, t.string]),\n confirmations: t.number,\n height: t.string,\n lockTime: t.string,\n coinbase: t.boolean,\n txHex: t.string,\n scriptPubKeyHex: t.string,\n address: t.string,\n spent: t.boolean,\n signer: t.number, // signing account address or index relative to accountId\n },\n 'UtxoInfo',\n)\nexport type UtxoInfo = t.TypeOf<typeof UtxoInfo>\n\nexport const WeightedChangeOutput = t.type(\n {\n address: t.string,\n weight: t.number,\n },\n 'WeightedChangeOutput',\n)\nexport type WeightedChangeOutput = t.TypeOf<typeof WeightedChangeOutput>\n\nexport type FilterChangeAddresses = (addresses: string[]) => Promise<string[]>\nexport const FilterChangeAddresses = functionT<FilterChangeAddresses>('FilterChangeAddresses')\n\n/** Callback should return any known tx data hex strings (useful for caching) */\nexport type LookupTxDataByHashes = (txHashes: string[]) => Promise<{ [hash: string]: string }>\nexport const LookupTxDataByHashes = functionT<LookupTxDataByHashes>('LookupTxDataByHash')\n\nexport const CreateTransactionOptions = extendCodec(\n FeeOption,\n {},\n {\n sequenceNumber: Numeric, // Ripple/Stellar/Ethereum sequence number or nonce\n payportBalance: Numeric, // Spendable balance at the from payport (useful in conjunction with a BalanceMonitor)\n forcedUtxos: t.array(UtxoInfo), // utxos that must be used\n availableUtxos: t.array(UtxoInfo), // utxos that can be used\n useAllUtxos: t.boolean, // Uses all available utxos (ie sweep)\n useUnconfirmedUtxos: t.boolean, // Allow unconfirmed utxos as inputs\n recipientPaysFee: t.boolean, // Deduct fee from outputs (only utxo coins supported for now)\n maxFeePercent: Numeric, // Maximum fee as percent of output total\n changeAddress: t.union([t.string, t.array(t.string)]), // Change address\n lookupTxDataByHashes: LookupTxDataByHashes, // Callback to retrieve cached raw tx data for input hashes for psbt building\n },\n 'CreateTransactionOptions',\n)\nexport type CreateTransactionOptions = t.TypeOf<typeof CreateTransactionOptions>\n\nexport const GetTransactionInfoOptions = t.partial({\n changeAddress: t.union([t.string, t.array(t.string)]), // To differentiate external/change outputs\n filterChangeAddresses: FilterChangeAddresses, // Callback to filter out any change addresses from address list\n})\nexport type GetTransactionInfoOptions = t.TypeOf<typeof GetTransactionInfoOptions>\n\nexport const GetPayportOptions = t.partial({}, 'GetPayportOptions')\nexport type GetPayportOptions = t.TypeOf<typeof GetPayportOptions>\n\nexport const ResolvedFeeOption = t.type({\n targetFeeLevel: FeeLevelT,\n targetFeeRate: t.string,\n targetFeeRateType: FeeRateTypeT,\n feeBase: t.string,\n feeMain: t.string,\n}, 'ResolvedFeeOption')\nexport type ResolvedFeeOption = t.TypeOf<typeof ResolvedFeeOption>\n\nexport const BalanceResult = requiredOptionalCodec(\n {\n confirmedBalance: t.string, // balance with at least 1 confirmation\n unconfirmedBalance: t.string, // balance that is pending confirmation\n spendableBalance: t.string, // balance that can be spent (ie not locked in min balance)\n requiresActivation: t.boolean, // true if an address doesn't have min balance\n sweepable: t.boolean, // balance is high enough to be swept\n },\n {\n minimumBalance: t.string,\n },\n 'BalanceResult',\n)\nexport type BalanceResult = t.TypeOf<typeof BalanceResult>\n\nexport enum TransactionStatus {\n Unsigned = 'unsigned',\n Signed = 'signed',\n Pending = 'pending',\n Confirmed = 'confirmed',\n Failed = 'failed',\n}\nexport const TransactionStatusT = enumCodec<TransactionStatus>(TransactionStatus, 'TransactionStatus')\n\nexport const TransactionOutput = requiredOptionalCodec(\n {\n address: t.string,\n value: t.string,\n },\n {\n extraId: nullable(t.string),\n },\n 'TransactionOutput',\n)\nexport type TransactionOutput = t.TypeOf<typeof TransactionOutput>\n\nexport const TransactionCommon = requiredOptionalCodec(\n {\n status: TransactionStatusT,\n id: nullable(t.string), // network txid\n fromAddress: nullable(t.string), // sender address\n toAddress: nullable(t.string), // recipient address\n fromIndex: nullable(t.number), // sender address index\n toIndex: nullable(t.number), // recipient address index, null if not ours\n amount: nullable(t.string), // main denomination (eg \"0.125\")\n fee: nullable(t.string), // total fee in main denomination\n },\n {\n fromExtraId: nullable(t.string), // eg ripple sender tag\n toExtraId: nullable(t.string), // eg Monero payment ID or ripple destination tag\n sequenceNumber: nullable(t.union([t.string, t.number])), // eg Ethereum nonce or ripple sequence\n inputUtxos: t.array(UtxoInfo),\n outputUtxos: t.array(UtxoInfo),\n externalOutputs: t.array(TransactionOutput),\n weight: t.number, // weight of this transaction for fee purposes (ie vbytes, gas limit)\n chainId: t.string,\n },\n 'TransactionCommon',\n)\nexport type TransactionCommon = t.TypeOf<typeof TransactionCommon>\n\nexport const BaseMultisigData = t.type(\n {\n m: t.number,\n\n // Parallel arrays\n accountIds: t.array(t.string),\n publicKeys: t.array(t.string),\n\n // Accounts that have already signed (not parallel)\n signedAccountIds: t.array(t.string),\n },\n 'BitcoinMultisigData',\n)\nexport type BaseMultisigData = t.TypeOf<typeof BaseMultisigData>\n\nexport const AddressMultisigData = extendCodec(\n BaseMultisigData,\n {\n signerIndex: t.number,\n inputIndices: t.array(t.number),\n },\n 'AddressMultisigData',\n)\nexport type AddressMultisigData = t.TypeOf<typeof AddressMultisigData>\n\nexport const MultiInputMultisigData = t.record(t.string, AddressMultisigData, 'MultiInputMultisigData')\nexport type MultiInputMultisigData = t.TypeOf<typeof MultiInputMultisigData>\n\nexport const MultisigData = t.union([BaseMultisigData, MultiInputMultisigData])\nexport type MultisigData = t.TypeOf<typeof MultisigData>\n\nconst UnsignedCommon = extendCodec(\n TransactionCommon,\n {\n fromAddress: t.string,\n toAddress: t.string,\n fromIndex: nullable(t.number), // same as multioutput\n targetFeeLevel: FeeLevelT, // fee level requested upon creation\n targetFeeRate: nullable(t.string), // fee rate requested upon creation\n targetFeeRateType: nullable(FeeRateTypeT), // fee rate type requested upon creation\n },\n {\n multisigData: MultisigData,\n },\n 'UnsignedCommon',\n)\ntype UnsignedCommon = t.TypeOf<typeof UnsignedCommon>\n\nexport const BaseUnsignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Unsigned),\n data: t.object,\n },\n 'BaseUnsignedTransaction',\n)\nexport type BaseUnsignedTransaction = t.TypeOf<typeof BaseUnsignedTransaction>\n\nexport const BaseSignedTransaction = extendCodec(\n UnsignedCommon,\n {\n status: t.literal(TransactionStatus.Signed),\n id: t.string,\n amount: t.string,\n fee: t.string,\n data: t.object,\n },\n 'BaseSignedTransaction',\n)\nexport type BaseSignedTransaction = t.TypeOf<typeof BaseSignedTransaction>\n\nexport const BaseTransactionInfo = extendCodec(\n TransactionCommon,\n {\n id: t.string,\n amount: t.string,\n fee: t.string,\n isExecuted: t.boolean, // true if transaction didn't fail (eg TRX/ETH contract succeeded)\n isConfirmed: t.boolean,\n confirmations: t.number, // 0 if not confirmed\n confirmationId: nullable(t.string), // eg block/ledger hash. null if not confirmed\n confirmationTimestamp: nullable(DateT), // block timestamp. null if timestamp unavailable or unconfirmed\n data: t.object,\n },\n {\n currentBlockNumber: t.union([t.string, t.number]), // latest head of the blockchain\n confirmationNumber: t.union([t.string, t.number]) // eg block number in which tx was included\n },\n 'BaseTransactionInfo',\n)\nexport type BaseTransactionInfo = t.TypeOf<typeof BaseTransactionInfo>\n\nexport const BaseBroadcastResult = t.type(\n {\n id: t.string,\n },\n 'BaseBroadcastResult',\n)\nexport type BaseBroadcastResult = t.TypeOf<typeof BaseBroadcastResult>\n\nexport const BalanceActivityType = t.union([t.literal('in'), t.literal('out'), t.literal('fee')], 'BalanceActivityType')\nexport type BalanceActivityType = t.TypeOf<typeof BalanceActivityType>\n\nexport const BalanceActivity = requiredOptionalCodec(\n {\n type: BalanceActivityType,\n networkType: NetworkTypeT,\n networkSymbol: t.string,\n assetSymbol: t.string,\n address: t.string,\n extraId: nullable(t.string),\n amount: t.string,\n externalId: t.string,\n activitySequence: t.string,\n confirmationId: t.string,\n confirmationNumber: t.union([t.string, t.number]),\n timestamp: DateT,\n },\n {\n confirmations: t.number,\n // Utxos spent in this transaction applicable to the address\n utxosSpent: t.array(UtxoInfo),\n // Utxos create in this transaction applicable to the address\n utxosCreated: t.array(UtxoInfo),\n tokenAddress: t.string,\n },\n 'BalanceActivity',\n)\nexport type BalanceActivity = t.TypeOf<typeof BalanceActivity>\n\nexport const BalanceMonitorConfig = BaseConfig\nexport type BalanceMonitorConfig = t.TypeOf<typeof BalanceMonitorConfig>\n\nexport const GetBalanceActivityOptions = t.partial(\n {\n from: t.union([Numeric, BalanceActivity]),\n to: t.union([Numeric, BalanceActivity]),\n },\n 'GetBalanceActivityOptions',\n)\nexport type GetBalanceActivityOptions = t.TypeOf<typeof GetBalanceActivityOptions>\n\nexport type BalanceActivityCallback = (ba: BalanceActivity[], rawTx?: any) => Promise<void> | void\nexport const BalanceActivityCallback = functionT<BalanceActivityCallback>('BalanceActivityCallback')\n\nexport type NewBlockCallback = (b: { height: number, hash: string }) => Promise<void> | void\nexport const NewBlockCallback = functionT<NewBlockCallback>('NewBlockCallback')\n\nexport type FromTo = Pick<\n BaseUnsignedTransaction,\n 'fromAddress' | 'fromIndex' | 'fromExtraId' | 'toAddress' | 'toIndex' | 'toExtraId'\n> & { fromPayport: Payport; toPayport: Payport }\n\nexport const RetrieveBalanceActivitiesResult = t.type(\n {\n from: t.string,\n to: t.string,\n },\n 'RetrieveBalanceActivitiesResult',\n)\nexport type RetrieveBalanceActivitiesResult = t.TypeOf<typeof RetrieveBalanceActivitiesResult>\n\nexport const BlockInfo = requiredOptionalCodec(\n {\n id: t.string,\n height: t.number,\n time: DateT,\n },\n {\n previousId: t.string,\n raw: t.object,\n },\n 'BlockInfo',\n)\nexport type BlockInfo = t.TypeOf<typeof BlockInfo>\n\nexport type FilterBlockAddressesBlockInfo = BlockInfo & { page: number }\nexport type FilterBlockAddressesCallback = (\n addresses: string[], blockInfo: FilterBlockAddressesBlockInfo,\n) => string[] | Promise<string[]>\n\nexport const GetFeeRecommendationOptions = t.partial({\n source: t.string, // ie blockbook, blockcypher, ethgasstation, etc\n}, 'GetFeeRecommendationOptions')\nexport type GetFeeRecommendationOptions = t.TypeOf<typeof GetFeeRecommendationOptions>\n\nexport type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]\n","export enum PaymentsErrorCode {\n TxExpired = 'PAYMENTS_TX_EXPIRED',\n TxSequenceTooHigh = 'PAYMENTS_TX_SEQUENCE_TOO_HIGH',\n TxSequenceCollision = 'PAYMENTS_TX_SEQUENCE_COLLISION',\n /** Sender doesn't have enough balance for the output amount + fee */\n TxInsufficientBalance = 'PAYMENTS_TX_INSUFFICIENT_BALANCE',\n /** Fee exceeds the maximum acceptable percent relative to output amount */\n TxFeeTooHigh = 'PAYMENTS_TX_FEE_TOO_HIGH',\n}\n\nexport class PaymentsError extends Error {\n name = PaymentsError.name\n\n constructor(public code: PaymentsErrorCode, message?: string | Error) {\n super(typeof message === 'undefined' ? code : `${code} - ${message.toString()}`)\n }\n}\n","export const DEFAULT_MAX_FEE_PERCENT = 50\nexport const BIP39_SEED_REGEX = /^[0-9a-f]{128}$/\nexport const BIP39_SEED_BYTES = 64\nexport const DERIVATION_PATH_REGEX = /^(m\\/)?[0-9]+'?(\\/[0-9]+'?)*$/\n\nexport const SUPPORTED_NETWORK_SYMBOLS = [\n \"BCH\",\n \"BTC\",\n \"DOGE\",\n \"ETH\",\n \"LTC\",\n \"TRX\",\n \"XLM\",\n \"XRP\",\n] as const\n"],"names":["t","NetworkType","enumCodec","Logger","requiredOptionalCodec","nullable","Numeric","FeeLevel","FeeRateType","extendCodec","functionT","TransactionStatus","DateT","PaymentsErrorCode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAcA,MAAM,0BAA0B,GAAiD;EAC/E,IAAA,GAAG,EAAE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MAAO,aAAc,SAAQ,KAAK,CAAA;MAGtC,WAAmB,CAAA,IAAuB,EAAE,OAAwB,EAAA;UAClE,KAAK,CAAC,OAAO,OAAO,KAAK,WAAW,GAAG,IAAI,GAAG,CAAA,EAAG,IAAI,CAAM,GAAA,EAAA,OAAO,CAAC,QAAQ,EAAE,CAAE,CAAA,CAAC,CAAA;UAD/D,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAmB;EAF1C,QAAA,IAAA,CAAA,IAAI,GAAG,aAAa,CAAC,IAAI,CAAA;OAIxB;EACF;;AChBM,QAAM,uBAAuB,GAAG,GAAE;AAClC,QAAM,gBAAgB,GAAG,kBAAiB;AAC1C,QAAM,gBAAgB,GAAG,GAAE;AAC3B,QAAM,qBAAqB,GAAG,gCAA+B;AAEvD,QAAA,yBAAyB,GAAG;MACrC,KAAK;MACL,KAAK;MACL,MAAM;MACN,KAAK;MACL,KAAK;MACL,KAAK;MACL,KAAK;MACL,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
@@ -5,2 +5,2 @@ export declare const DEFAULT_MAX_FEE_PERCENT = 50; | ||
| export declare const DERIVATION_PATH_REGEX: RegExp; | ||
| export declare const SUPPORTED_NETWORK_SYMBOLS: readonly ["TRX", "XRP", "XLM", "BTC", "ETH", "LTC", "BCH", "DOGE"]; | ||
| export declare const SUPPORTED_NETWORK_SYMBOLS: readonly ["BCH", "BTC", "DOGE", "ETH", "LTC", "TRX", "XLM", "XRP"]; |
@@ -5,3 +5,12 @@ export const DEFAULT_MAX_FEE_PERCENT = 50; | ||
| export const DERIVATION_PATH_REGEX = /^(m\/)?[0-9]+'?(\/[0-9]+'?)*$/; | ||
| export const SUPPORTED_NETWORK_SYMBOLS = ["TRX", "XRP", "XLM", "BTC", "ETH", "LTC", "BCH", "DOGE"]; | ||
| export const SUPPORTED_NETWORK_SYMBOLS = [ | ||
| "BCH", | ||
| "BTC", | ||
| "DOGE", | ||
| "ETH", | ||
| "LTC", | ||
| "TRX", | ||
| "XLM", | ||
| "XRP", | ||
| ]; | ||
| //# sourceMappingURL=constants.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAA;AACzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAA;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAA;AAClC,MAAM,CAAC,MAAM,qBAAqB,GAAG,+BAA+B,CAAA;AAEpE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAU,CAAA"} | ||
| {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAA;AACzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAA;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAA;AAClC,MAAM,CAAC,MAAM,qBAAqB,GAAG,+BAA+B,CAAA;AAEpE,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;CACC,CAAA"} |
@@ -5,10 +5,10 @@ import * as t from 'io-ts'; | ||
| export declare const SupportedCoinPaymentsSymbol: t.KeyofC<{ | ||
| TRX: null; | ||
| XRP: null; | ||
| XLM: null; | ||
| BCH: null; | ||
| BTC: null; | ||
| DOGE: null; | ||
| ETH: null; | ||
| LTC: null; | ||
| BCH: null; | ||
| DOGE: null; | ||
| TRX: null; | ||
| XLM: null; | ||
| XRP: null; | ||
| }>; | ||
@@ -15,0 +15,0 @@ export interface Bip32Network { |
| import * as t from 'io-ts'; | ||
| import { requiredOptionalCodec, extendCodec, enumCodec, nullable, DateT, Logger, functionT, Numeric, } from '@bitaccess/ts-common'; | ||
| const supportedNetworkSymbolsMap = { | ||
| TRX: null, | ||
| XRP: null, | ||
| XLM: null, | ||
| BCH: null, | ||
| BTC: null, | ||
| DOGE: null, | ||
| ETH: null, | ||
| LTC: null, | ||
| BCH: null, | ||
| DOGE: null, | ||
| TRX: null, | ||
| XLM: null, | ||
| XRP: null, | ||
| }; | ||
@@ -13,0 +13,0 @@ export const SupportedCoinPaymentsSymbol = t.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol'); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAA;AAC1B,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,GACR,MAAM,sBAAsB,CAAA;AAI7B,MAAM,0BAA0B,GAAiD;IAC/E,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;CACX,CAAA;AACD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,CAAA;AAgB7G,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;AAG9E,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;I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M,gBAAgB,GAAG,SAAS,CAAmB,kBAAkB,CAAC,CAAA;AAO/E,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,IAAI,CACnD;IACE,IAAI,EAAE,CAAC,CAAC,MAAM;IACd,EAAE,EAAE,CAAC,CAAC,MAAM;CACb,EACD,iCAAiC,CAClC,CAAA;AAGD,MAAM,CAAC,MAAM,SAAS,GAAG,qBAAqB,CAC5C;IACE,EAAE,EAAE,CAAC,CAAC,MAAM;IACZ,MAAM,EAAE,CAAC,CAAC,MAAM;IAChB,IAAI,EAAE,KAAK;CACZ,EACD;IACE,UAAU,EAAE,CAAC,CAAC,MAAM;IACpB,GAAG,EAAE,CAAC,CAAC,MAAM;CACd,EACD,WAAW,CACZ,CAAA;AAQD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,OAAO,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,MAAM;CACjB,EAAE,6BAA6B,CAAC,CAAA"} |
+2
-2
| { | ||
| "name": "@bitaccess/coinlib-types", | ||
| "version": "7.1.1", | ||
| "version": "7.2.0", | ||
| "description": "Shared types used by coinlib libraries", | ||
@@ -49,3 +49,3 @@ "main": "dist/index.cjs.js", | ||
| }, | ||
| "gitHead": "a27180a1c8bbd6f21d2deaad6ed7b53d7c76e191" | ||
| "gitHead": "6ae64e55b658a0c5f0696713bedfd2a781afda60" | ||
| } |
+10
-1
@@ -6,2 +6,11 @@ export const DEFAULT_MAX_FEE_PERCENT = 50 | ||
| export const SUPPORTED_NETWORK_SYMBOLS = ["TRX", "XRP", "XLM", "BTC", "ETH", "LTC", "BCH", "DOGE"] as const | ||
| export const SUPPORTED_NETWORK_SYMBOLS = [ | ||
| "BCH", | ||
| "BTC", | ||
| "DOGE", | ||
| "ETH", | ||
| "LTC", | ||
| "TRX", | ||
| "XLM", | ||
| "XRP", | ||
| ] as const |
+5
-5
@@ -16,10 +16,10 @@ import * as t from 'io-ts' | ||
| const supportedNetworkSymbolsMap: { [k in SupportedCoinPaymentsSymbol]: null } = { | ||
| TRX: null, | ||
| XRP: null, | ||
| XLM: null, | ||
| BCH: null, | ||
| BTC: null, | ||
| DOGE: null, | ||
| ETH: null, | ||
| LTC: null, | ||
| BCH: null, | ||
| DOGE: null, | ||
| TRX: null, | ||
| XLM: null, | ||
| XRP: null, | ||
| } | ||
@@ -26,0 +26,0 @@ export const SupportedCoinPaymentsSymbol = t.keyof(supportedNetworkSymbolsMap, 'SupportedCoinPaymentsSymbol') |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
218019
0.17%3001
1.52%0
-100%