Skip to content

Commit 9fa2862

Browse files
committed
chore: switch to stacks codec
1 parent c415ea9 commit 9fa2862

28 files changed

Lines changed: 50 additions & 64 deletions

package-lock.json

Lines changed: 21 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@
8484
"@fastify/multipart": "8.3.1",
8585
"@fastify/swagger": "8.15.0",
8686
"@fastify/type-provider-typebox": "4.0.0",
87-
"@hirosystems/stacks-encoding-native-js": "1.3.0",
8887
"@sinclair/typebox": "0.32.35",
8988
"@stacks/api-toolkit": "1.12.2",
89+
"@stacks/codec": "1.5.0",
9090
"@stacks/common": "6.10.0",
9191
"@stacks/encryption": "6.13.1",
9292
"@stacks/network": "6.11.3",

src/api/controllers/db-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
decodeClarityValueToRepr,
1010
decodeClarityValueToTypeName,
1111
decodePostConditions,
12-
} from '@hirosystems/stacks-encoding-native-js';
12+
} from '@stacks/codec';
1313
import {
1414
BlockIdentifier,
1515
DbAssetEventTypeId,

src/api/routes/address.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
parseDbTx,
1515
} from '../controllers/db-controller';
1616
import { InvalidRequestError, InvalidRequestErrorType, NotFoundError } from '../../errors';
17-
import { decodeClarityValueToRepr } from '@hirosystems/stacks-encoding-native-js';
17+
import { decodeClarityValueToRepr } from '@stacks/codec';
1818
import {
1919
handlePrincipalCache,
2020
handlePrincipalMempoolCache,

src/api/routes/tokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getPagingQueryLimit, parsePagingQueryInput, ResourceType } from '../pagination';
22
import { isValidPrincipal } from '../../helpers';
3-
import { decodeClarityValueToRepr } from '@hirosystems/stacks-encoding-native-js';
3+
import { decodeClarityValueToRepr } from '@stacks/codec';
44
import { getAssetEventTypeString, parseDbTx } from '../controllers/db-controller';
55
import { handleChainTipCache } from '../controllers/cache-controller';
66
import { has0xPrefix } from '@stacks/api-toolkit';

src/api/routes/v2/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
getTxStatusString,
1818
parseDbTx,
1919
} from '../../../api/controllers/db-controller';
20-
import { decodeClarityValueToRepr } from '@hirosystems/stacks-encoding-native-js';
20+
import { decodeClarityValueToRepr } from '@stacks/codec';
2121
import { TransactionVersion, getAddressFromPublicKey } from '@stacks/transactions';
2222
import { SmartContractStatusList } from '../../schemas/entities/smart-contracts';
2323
import { AddressTransaction, AddressTransactionEvent } from '../../schemas/entities/addresses';

src/api/serializers/post-conditions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
PostConditionAssetInfoID,
44
PostConditionPrincipal,
55
PostConditionPrincipalTypeID,
6-
} from '@hirosystems/stacks-encoding-native-js';
6+
} from '@stacks/codec';
77

88
const assetPrincipalTypeMap = {
99
[PostConditionPrincipalTypeID.Origin]: 'principal_origin',

src/c32-addr-cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and for now this approach is much easier and faster.
99

1010
import * as c32check from 'c32check';
1111
import * as LruCache from 'lru-cache';
12-
import { stacksAddressFromParts } from '@hirosystems/stacks-encoding-native-js';
12+
import { stacksAddressFromParts } from '@stacks/codec';
1313

1414
type c32AddressFn = typeof c32check.c32address;
1515

src/datastore/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import {
5454
PostConditionAuthFlag,
5555
PrincipalTypeID,
5656
TxPayloadTypeID,
57-
} from '@hirosystems/stacks-encoding-native-js';
57+
} from '@stacks/codec';
5858
import { getTxSenderAddress } from '../event-stream/reader';
5959
import postgres = require('postgres');
6060
import * as prom from 'prom-client';

src/event-stream/bns/bns-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
ClarityValueTuple,
1818
ClarityValueUInt,
1919
TxPayloadTypeID,
20-
} from '@hirosystems/stacks-encoding-native-js';
20+
} from '@stacks/codec';
2121
import { DbBnsNamespace, DbBnsName } from '../../datastore/common';
2222
import { hexToBuffer, hexToUtf8String } from '@stacks/api-toolkit';
2323
import {

0 commit comments

Comments
 (0)