New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stacks/api

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stacks/api - npm Package Compare versions

Comparing version 6.14.1-next.36 to 6.14.1-next.37

6

dist/api.d.ts
import { FetchFn, Hex } from '@stacks/common';
import { StacksNetwork, StacksNetworkName } from '@stacks/network';
import { BurnchainRewardListResponse, BurnchainRewardSlotHolderListResponse, BurnchainRewardsTotal } from '@stacks/stacks-blockchain-api-types';
import { ClarityAbi, FeeEstimation, StacksTransaction, TxBroadcastResult } from '@stacks/transactions';
import { ClarityAbi, ContractIdString, FeeEstimation, StacksTransaction, TxBroadcastResult } from '@stacks/transactions';
import { BaseErrorResponse, ExtendedAccountBalances, PaginationOptions, V2CoreInfoResponse as V2InfoResponse, V2PoxInfoResponse } from './types';

@@ -19,3 +19,3 @@ export declare class StacksNodeApi {

estimateTransaction: (payload: Hex, estimatedLength?: number) => Promise<[FeeEstimation, FeeEstimation, FeeEstimation]>;
getAbi: (contract: `${string}.${string}`) => Promise<ClarityAbi>;
getAbi: (contract: ContractIdString) => Promise<ClarityAbi>;
getInfo(): Promise<V2InfoResponse>;

@@ -29,3 +29,3 @@ getPoxInfo(): Promise<V2PoxInfoResponse>;

getExtendedBtcRewardHolders(address: string, options?: PaginationOptions): Promise<BurnchainRewardSlotHolderListResponse | BaseErrorResponse>;
getDataVar(contract: `${string}.${string}`, dataVarName: string): Promise<{
getDataVar(contract: ContractIdString, dataVarName: string): Promise<{
value: import("@stacks/transactions").ClarityValue;

@@ -32,0 +32,0 @@ raw: string;

import { FetchFn, Hex } from '@stacks/common';
import { StacksNetwork, StacksNetworkName } from '@stacks/network';
import { BurnchainRewardListResponse, BurnchainRewardSlotHolderListResponse, BurnchainRewardsTotal } from '@stacks/stacks-blockchain-api-types';
import { ClarityAbi, FeeEstimation, StacksTransaction, TxBroadcastResult } from '@stacks/transactions';
import { ClarityAbi, ContractIdString, FeeEstimation, StacksTransaction, TxBroadcastResult } from '@stacks/transactions';
import { BaseErrorResponse, ExtendedAccountBalances, PaginationOptions, V2CoreInfoResponse as V2InfoResponse, V2PoxInfoResponse } from './types';

@@ -19,3 +19,3 @@ export declare class StacksNodeApi {

estimateTransaction: (payload: Hex, estimatedLength?: number) => Promise<[FeeEstimation, FeeEstimation, FeeEstimation]>;
getAbi: (contract: `${string}.${string}`) => Promise<ClarityAbi>;
getAbi: (contract: ContractIdString) => Promise<ClarityAbi>;
getInfo(): Promise<V2InfoResponse>;

@@ -29,3 +29,3 @@ getPoxInfo(): Promise<V2PoxInfoResponse>;

getExtendedBtcRewardHolders(address: string, options?: PaginationOptions): Promise<BurnchainRewardSlotHolderListResponse | BaseErrorResponse>;
getDataVar(contract: `${string}.${string}`, dataVarName: string): Promise<{
getDataVar(contract: ContractIdString, dataVarName: string): Promise<{
value: import("@stacks/transactions").ClarityValue;

@@ -32,0 +32,0 @@ raw: string;

@@ -0,1 +1,2 @@

import type { ContractIdString } from '@stacks/transactions';
export interface V2CoreInfoResponse {

@@ -12,3 +13,3 @@ burn_block_height: number;

export interface ContractVersionResponse {
contract_id: `${string}.${string}`;
contract_id: ContractIdString;
activation_burnchain_block_height: number;

@@ -15,0 +16,0 @@ first_reward_cycle_id: number;

@@ -0,1 +1,2 @@

import type { ContractIdString } from '@stacks/transactions';
export interface V2CoreInfoResponse {

@@ -12,3 +13,3 @@ burn_block_height: number;

export interface ContractVersionResponse {
contract_id: `${string}.${string}`;
contract_id: ContractIdString;
activation_burnchain_block_height: number;

@@ -15,0 +16,0 @@ first_reward_cycle_id: number;

{
"name": "@stacks/api",
"version": "6.14.1-next.36+95cd674f",
"version": "6.14.1-next.37+dfaf76f4",
"description": "Javascript library for interacting with the Stacks Blockchain Node and API.",

@@ -26,6 +26,6 @@ "license": "MIT",

"dependencies": {
"@stacks/common": "^6.14.1-next.36+95cd674f",
"@stacks/network": "^6.14.1-next.36+95cd674f",
"@stacks/common": "^6.14.1-next.37+dfaf76f4",
"@stacks/network": "^6.14.1-next.37+dfaf76f4",
"@stacks/stacks-blockchain-api-types": "^0.61.0",
"@stacks/transactions": "^6.14.1-next.36+95cd674f"
"@stacks/transactions": "^6.14.1-next.37+dfaf76f4"
},

@@ -55,3 +55,3 @@ "devDependencies": {

},
"gitHead": "95cd674ff54d3b2b18b3742813846622e4925742"
"gitHead": "dfaf76f46ea1663dd0074a6fa02ee627e5aade21"
}

@@ -18,2 +18,3 @@ import { FetchFn, Hex, createFetchFn } from '@stacks/common';

ClarityAbi,
ContractIdString,
FeeEstimation,

@@ -104,3 +105,3 @@ StacksTransaction,

*/
getAbi = async (contract: `${string}.${string}`): Promise<ClarityAbi> => {
getAbi = async (contract: ContractIdString): Promise<ClarityAbi> => {
const [contractAddress, contractName] = contract.split('.');

@@ -193,3 +194,3 @@ return getAbi({ contractAddress, contractName, api: this });

/** Gets the value of a data-var if it exists in the given contract */
async getDataVar(contract: `${string}.${string}`, dataVarName: string) {
async getDataVar(contract: ContractIdString, dataVarName: string) {
// todo: (contractAddress: string, contractName: string, dataVarName: string) overload?

@@ -196,0 +197,0 @@ // todo: cleanup address/contract identifies types

@@ -0,1 +1,3 @@

import type { ContractIdString } from '@stacks/transactions';
export interface V2CoreInfoResponse {

@@ -14,3 +16,3 @@ burn_block_height: number;

export interface ContractVersionResponse {
contract_id: `${string}.${string}`;
contract_id: ContractIdString;
activation_burnchain_block_height: number;

@@ -17,0 +19,0 @@ first_reward_cycle_id: number;

Sorry, the diff of this file is not supported yet

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