Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "xumm-sdk", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Interact with the Xumm Developer API", | ||
@@ -25,3 +25,2 @@ "main": "dist/src/index.js", | ||
"dotenv": "^8.2.0", | ||
"isomorphic-ws": "^4.0.1", | ||
"node-fetch": "^2.6.1", | ||
@@ -28,0 +27,0 @@ "ws": "^7.3.1" |
import type { Meta } from './Meta'; | ||
import type { PayloadSubscription, PayloadAndSubscription, onPayloadEvent, CreatePayload, CreatedPayload, DeletedPayload, XummPayload } from './types'; | ||
import type { PayloadSubscription, PayloadAndSubscription, onPayloadEvent, XummJsonTransaction, XummPostPayloadBodyJson, XummPostPayloadBodyBlob, CreatedPayload, DeletedPayload, XummPayload } from './types'; | ||
export declare class Payload { | ||
@@ -7,7 +7,7 @@ private Meta; | ||
resolvePayload(payload: string | XummPayload | CreatedPayload): Promise<XummPayload | null>; | ||
create(payload: CreatePayload, returnErrors?: boolean): Promise<CreatedPayload | null>; | ||
create(payload: XummPostPayloadBodyJson | XummPostPayloadBodyBlob | XummJsonTransaction, returnErrors?: boolean): Promise<CreatedPayload | null>; | ||
get(payload: string | CreatedPayload, returnErrors?: boolean): Promise<XummPayload | null>; | ||
subscribe(payload: string | XummPayload | CreatedPayload, callback?: onPayloadEvent): Promise<PayloadSubscription>; | ||
cancel(payload: string | XummPayload | CreatedPayload, returnErrors?: boolean): Promise<DeletedPayload | null>; | ||
createAndSubscribe(payload: CreatePayload, callback?: onPayloadEvent): Promise<PayloadAndSubscription>; | ||
createAndSubscribe(payload: XummPostPayloadBodyJson | XummPostPayloadBodyBlob | XummJsonTransaction, callback?: onPayloadEvent): Promise<PayloadAndSubscription>; | ||
} |
@@ -44,3 +44,5 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const call = yield this.Meta.call('payload', 'POST', payload); | ||
const directTx = typeof payload.TransactionType !== 'undefined' | ||
&& typeof payload.txjson === 'undefined'; | ||
const call = yield this.Meta.call('payload', 'POST', directTx ? { txjson: payload } : payload); | ||
if (returnErrors) { | ||
@@ -47,0 +49,0 @@ utils_1.throwIfError(call); |
{ | ||
"name": "xumm-sdk", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Interact with the Xumm Developer API", | ||
@@ -25,3 +25,2 @@ "main": "dist/src/index.js", | ||
"dotenv": "^8.2.0", | ||
"isomorphic-ws": "^4.0.1", | ||
"node-fetch": "^2.6.1", | ||
@@ -28,0 +27,0 @@ "ws": "^7.3.1" |
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
51231
6
785
- Removedisomorphic-ws@^4.0.1
- Removedisomorphic-ws@4.0.1(transitive)