jupiter-node-sdk
Advanced tools
Comparing version 0.3.1 to 0.4.0
@@ -6,2 +6,9 @@ # Changelog | ||
## [0.4.0] - 2020-07-25 | ||
### Changed | ||
- Increased fee for jupiter-fs binary transactions | ||
### Added | ||
- Added function to get all the transactions with jupiter-fs metadata | ||
## [0.3.1] - 2020-07-15 | ||
@@ -8,0 +15,0 @@ ### Changed |
@@ -42,2 +42,3 @@ /// <reference types="node" /> | ||
decryptRecord(message: ITransactionAttachmentDecryptedMessage): Promise<string>; | ||
getAllMatadataTransactions(): Promise<ITransaction[]>; | ||
getAllTransactions(withMessage?: boolean, type?: number, subtype?: number | undefined): Promise<ITransaction[]>; | ||
@@ -44,0 +45,0 @@ getTransaction(txId: string): Promise<ITransaction>; |
@@ -23,2 +23,4 @@ "use strict"; | ||
}; | ||
const TYPE_DATA_FS = 8; | ||
const SUBTYPE_MESSAGING_METIS_METADATA_TYPE = 0; | ||
function setClient(serverUrl = opts.server) { | ||
@@ -52,16 +54,19 @@ return axios_1.default.create({ | ||
return fee; | ||
if (encryptedMessageLength <= 10000) { | ||
fee = 4000; | ||
if (encryptedMessageLength <= 5000) { | ||
fee = 16500; | ||
} | ||
else if (encryptedMessageLength <= 10000) { | ||
fee = 32000; | ||
} | ||
else if (encryptedMessageLength <= 20000) { | ||
fee = 7000; | ||
fee = 63000; | ||
} | ||
else if (encryptedMessageLength <= 30000) { | ||
fee = 10000; | ||
fee = 94500; | ||
} | ||
else if (encryptedMessageLength <= 40000) { | ||
fee = 13000; | ||
fee = 126000; | ||
} | ||
else { | ||
fee = 16000; | ||
fee = 135000; | ||
} | ||
@@ -209,2 +214,5 @@ return fee; | ||
}, | ||
async getAllMatadataTransactions() { | ||
return this.getAllTransactions(true, TYPE_DATA_FS, SUBTYPE_MESSAGING_METIS_METADATA_TYPE); | ||
}, | ||
async getAllTransactions(withMessage = true, type = 1, subtype) { | ||
@@ -211,0 +219,0 @@ const [confirmed, unconfirmed] = await Promise.all([ |
{ | ||
"name": "jupiter-node-sdk", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "A thin wrapper around the Jupiter blockchain APIs.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -20,2 +20,5 @@ import assert from 'assert' | ||
const TYPE_DATA_FS = 8; | ||
const SUBTYPE_MESSAGING_METIS_METADATA_TYPE = 0; | ||
function setClient(serverUrl: string = opts.server) { | ||
@@ -56,12 +59,14 @@ return axios.create({ | ||
return fee | ||
if (encryptedMessageLength <= 10000) { | ||
fee = 4000 | ||
if (encryptedMessageLength <= 5000) { | ||
fee = 16500 | ||
} else if (encryptedMessageLength <= 10000) { | ||
fee = 32000 | ||
} else if (encryptedMessageLength <= 20000) { | ||
fee = 7000 | ||
fee = 63000 | ||
} else if (encryptedMessageLength <= 30000) { | ||
fee = 10000 | ||
fee = 94500 | ||
} else if (encryptedMessageLength <= 40000) { | ||
fee = 13000 | ||
fee = 126000 | ||
} else { | ||
fee = 16000 | ||
fee = 135000 | ||
} | ||
@@ -244,2 +249,7 @@ return fee | ||
async getAllMatadataTransactions(): Promise<ITransaction[]> { | ||
return this.getAllTransactions(true, TYPE_DATA_FS, SUBTYPE_MESSAGING_METIS_METADATA_TYPE) | ||
}, | ||
async getAllTransactions( | ||
@@ -246,0 +256,0 @@ withMessage: boolean = true, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128918
4585