jupiter-node-sdk
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -6,2 +6,6 @@ # Changelog | ||
## [0.3.0] | ||
### Changed | ||
- Update storeRecord function to support jupiter metis subtypes | ||
## [0.2.1] - 2020-07-07 | ||
@@ -8,0 +12,0 @@ ### Added |
@@ -40,3 +40,3 @@ /// <reference types="node" /> | ||
parseEncryptedRecord(cipherText: string): Promise<any>; | ||
storeRecord(record: any): Promise<any>; | ||
storeRecord(record: any, subtype: string): Promise<any>; | ||
decryptRecord(message: ITransactionAttachmentDecryptedMessage): Promise<string>; | ||
@@ -43,0 +43,0 @@ getAllTransactions(withMessage?: boolean, type?: number): Promise<ITransaction[]>; |
@@ -169,3 +169,3 @@ "use strict"; | ||
// async storeRecord(record: IStringMap) { | ||
async storeRecord(record) { | ||
async storeRecord(record, subtype) { | ||
const finalRecordToStore = this.recordKey | ||
@@ -178,5 +178,7 @@ ? { | ||
const encryptedMessage = await this.encrypt(JSON.stringify(finalRecordToStore)); | ||
const requestType = subtype ? 'sendMetisMessage' : 'sendMessage'; | ||
const { data } = await this.request('post', '/nxt', { | ||
params: { | ||
requestType: 'sendMessage', | ||
requestType: requestType, | ||
subtype: subtype, | ||
secretPhrase: opts.passphrase, | ||
@@ -183,0 +185,0 @@ recipient: opts.address, |
{ | ||
"name": "jupiter-node-sdk", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "A thin wrapper around the Jupiter blockchain APIs.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -193,3 +193,3 @@ import assert from 'assert' | ||
// async storeRecord(record: IStringMap) { | ||
async storeRecord(record: any) { | ||
async storeRecord(record: any, subtype: string) { | ||
const finalRecordToStore = this.recordKey | ||
@@ -206,5 +206,8 @@ ? { | ||
const requestType = subtype ? 'sendMetisMessage' : 'sendMessage' | ||
const { data } = await this.request('post', '/nxt', { | ||
params: { | ||
requestType: 'sendMessage', | ||
requestType: requestType, | ||
subtype: subtype, | ||
secretPhrase: opts.passphrase, | ||
@@ -211,0 +214,0 @@ recipient: opts.address, |
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
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
111031
4565
0