Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exports and import paths #299

Merged
merged 3 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/src/standard-nft/my-nft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
NearPromise,
PromiseOrValue,
view,
} from "near-sdk-js/lib";
} from "near-sdk-js";
import {
NFTContractMetadata,
NonFungibleTokenMetadataProvider,
Expand All @@ -19,7 +19,7 @@ import {
IntoStorageKey,
Option,
} from "near-contract-standards/lib/non_fungible_token/utils";
import { AccountId } from "near-sdk-js/lib/types";
import { AccountId } from "near-sdk-js";
import { NonFungibleTokenCore } from "near-contract-standards/lib/non_fungible_token/core";
import {
Token,
Expand Down
4 changes: 2 additions & 2 deletions examples/src/standard-nft/test-approval-receiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
PromiseOrValue,
assert,
call,
} from "near-sdk-js/lib";
import { AccountId } from "near-sdk-js/lib/types";
} from "near-sdk-js";
import { AccountId } from "near-sdk-js";
import { NonFungibleTokenApprovalReceiver } from "near-contract-standards/lib/non_fungible_token/approval/approval_receiver";

const BASE_GAS = 20_000_000_000_000n;
Expand Down
4 changes: 2 additions & 2 deletions examples/src/standard-nft/test-token-receiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
NearBindgen,
NearPromise,
PromiseOrValue,
} from "near-sdk-js/lib";
import { AccountId } from "near-sdk-js/lib/types";
} from "near-sdk-js";
import { AccountId } from "near-sdk-js";

const BASE_GAS = 10_000_000_000_000n;
const PROMISE_CALL = 10_000_000_000_000n;
Expand Down
13 changes: 6 additions & 7 deletions lib/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 6 additions & 37 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,6 @@
import { call, view, initialize, NearBindgen } from "./near-bindgen";

import * as near from "./api";
import {
LookupMap,
Vector,
LookupSet,
UnorderedMap,
UnorderedSet,
} from "./collections";

import { bytes, Bytes, assert, validateAccountId, serialize } from "./utils";

import { NearPromise, PromiseOrValue } from "./promise";

import { AccountId } from "./types";

export {
call,
view,
initialize,
NearBindgen,
near,
LookupMap,
Vector,
LookupSet,
UnorderedMap,
UnorderedSet,
bytes,
Bytes,
assert,
validateAccountId,
serialize,
NearPromise,
PromiseOrValue,
AccountId,
};
export * as near from "./api";
export * from "./types";
export * from "./near-bindgen";
export * from "./collections";
export * from "./utils";
export * from "./promise";
2 changes: 1 addition & 1 deletion tests/src/highlevel-promise.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NearBindgen, call, NearPromise, near, bytes } from "near-sdk-js";
import { PublicKey } from "near-sdk-js/lib/types";
import { PublicKey } from "near-sdk-js";

function callingData() {
return {
Expand Down
4 changes: 2 additions & 2 deletions tests/src/public-key.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { near, bytes } from "near-sdk-js";
import { CurveType, PublicKey } from "near-sdk-js/lib/types";
import { assert } from "near-sdk-js/lib/utils";
import { CurveType, PublicKey } from "near-sdk-js";
import { assert } from "near-sdk-js";

function runtime_validate_public_key(prefix, public_key) {
let promiseId = near.promiseBatchCreate(prefix + ".pk.test.near");
Expand Down