Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stacks/transactions

Package Overview
Dependencies
Maintainers
8
Versions
662
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacks/transactions - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

11

dist/transactions/src/utils.d.ts

@@ -35,7 +35,12 @@ /// <reference types="node" />

export declare function hexToCV(hex: string): ClarityValue;
export interface ReadOnlyFunctionResponse {
okay: boolean;
export interface ReadOnlyFunctionSuccessResponse {
okay: true;
result: string;
}
export declare const parseReadOnlyResponse: ({ result }: ReadOnlyFunctionResponse) => ClarityValue;
export interface ReadOnlyFunctionErrorResponse {
okay: false;
cause: string;
}
export declare type ReadOnlyFunctionResponse = ReadOnlyFunctionSuccessResponse | ReadOnlyFunctionErrorResponse;
export declare const parseReadOnlyResponse: (response: ReadOnlyFunctionResponse) => ClarityValue;
export declare const validateStacksAddress: (stacksAddress: string) => boolean;

@@ -194,5 +194,8 @@ import './constants.esm.js';

}
var parseReadOnlyResponse = function parseReadOnlyResponse(_ref) {
var result = _ref.result;
return hexToCV(result);
var parseReadOnlyResponse = function parseReadOnlyResponse(response) {
if (response.okay) {
return hexToCV(response.result);
} else {
throw new Error(response.cause);
}
};

@@ -199,0 +202,0 @@ var validateStacksAddress = function validateStacksAddress(stacksAddress) {

{
"name": "@stacks/transactions",
"version": "1.0.1",
"version": "1.0.2",
"description": "Javascript library for constructing transactions on the Stacks blockchain.",

@@ -54,8 +54,7 @@ "homepage": "https://blockstack.org",

"ts-node": "^8.10.2",
"tsdx": "^0.14.0",
"typescript": "^3.7.2"
"tsdx": "^0.14.0"
},
"dependencies": {
"@stacks/common": "^1.0.1",
"@stacks/network": "^1.0.1",
"@stacks/network": "^1.0.2",
"@types/bn.js": "^4.11.6",

@@ -127,3 +126,3 @@ "@types/elliptic": "^6.4.12",

"unpkg": "dist/transactions.cjs.production.min.js",
"gitHead": "788006ea42257fc515c0678dd276ddd6dbdc2b9c"
"gitHead": "2cf05938c1364dbfe45445f0297b64567ef91bc4"
}

@@ -40,8 +40,9 @@ # @stacks/transactions [![npm](https://img.shields.io/npm/v/@stacks/transactions?color=red)](https://www.npmjs.com/package/@stacks/transactions)

makeStandardSTXPostCondition,
StacksMainnet,
broadcastTransaction,
} from '@stacks/transactions';
import { StacksTestnet, StacksMainnet } from '@stacks/network';
const BigNum = require('bn.js');
const network = new StacksMainnet();
// for mainnet, use `StacksMainnet()`
const network = new StacksTestnet();

@@ -70,6 +71,8 @@ const txOptions = {

```javascript
import { makeContractDeploy, StacksMainnet, broadcastTransaction } from '@stacks/transactions';
import { makeContractDeploy, broadcastTransaction } from '@stacks/transactions';
import { StacksTestnet, StacksMainnet } from '@stacks/network';
const BigNum = require('bn.js');
const network = new StacksMainnet();
// for mainnet, use `StacksMainnet()`
const network = new StacksTestnet();

@@ -91,11 +94,8 @@ const txOptions = {

```javascript
import {
makeContractCall,
BufferCV,
StacksMainnet,
broadcastTransaction,
} from '@stacks/transactions';
import { makeContractCall, BufferCV, broadcastTransaction } from '@stacks/transactions';
import { StacksTestnet, StacksMainnet } from '@stacks/network';
const BigNum = require('bn.js');
const network = new StacksMainnet();
// for mainnet, use `StacksMainnet()`
const network = new StacksTestnet();

@@ -166,2 +166,3 @@ // Add an optional post condition

} from '@stacks/transactions';
import { StacksTestnet, StacksMainnet } from '@stacks/network';
const BigNum = require('bn.js');

@@ -182,3 +183,4 @@

const network = new StacksMainnet();
// for mainnet, use `StacksMainnet()`
const network = new StacksTestnet();
broadcastTransaction(sponsoredTx, network);

@@ -185,0 +187,0 @@ ```

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc