@midnight-ntwrk/wallet-sdk-indexer-client 1.0.0-beta.11 → 1.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/effect/ConnectionHelper.js +12 -0
  2. package/dist/effect/HttpQueryClient.js +12 -0
  3. package/dist/effect/Query.js +12 -0
  4. package/dist/effect/QueryClient.js +12 -0
  5. package/dist/effect/Subscription.js +12 -0
  6. package/dist/effect/SubscriptionClient.js +12 -0
  7. package/dist/effect/WsSubscriptionClient.js +12 -0
  8. package/dist/effect/index.js +12 -0
  9. package/dist/effect/test/httpQueryClient.spied.test.js +12 -0
  10. package/dist/effect/test/httpQueryClient.test.js +12 -0
  11. package/dist/effect/test/wsSubscriptionClient.spied.test.js +12 -0
  12. package/dist/effect/test/wsSubscriptionClient.test.js +12 -0
  13. package/dist/graphql/generated/gql.js +12 -0
  14. package/dist/graphql/generated/graphql.d.ts +3 -3
  15. package/dist/graphql/generated/graphql.js +481 -7
  16. package/dist/graphql/generated/index.js +12 -0
  17. package/dist/graphql/queries/BlockHash.js +12 -0
  18. package/dist/graphql/queries/Connect.js +12 -0
  19. package/dist/graphql/queries/Disconnect.js +12 -0
  20. package/dist/graphql/queries/index.js +12 -0
  21. package/dist/graphql/queries/test/BlockHash.test.js +29 -15
  22. package/dist/graphql/subscriptions/DustLedgerEvents.js +12 -0
  23. package/dist/graphql/subscriptions/ShieldedTransactions.js +12 -0
  24. package/dist/graphql/subscriptions/UnshieldedTransactions.js +12 -0
  25. package/dist/graphql/subscriptions/ZswapEvents.js +12 -0
  26. package/dist/graphql/subscriptions/index.js +12 -0
  27. package/dist/graphql/subscriptions/test/ShieldedTransactions.test.js +27 -13
  28. package/dist/graphql/subscriptions/test/UnshieldedTransactions.test.js +27 -13
  29. package/dist/graphql/subscriptions/test/ZswapEvents.test.js +27 -13
  30. package/dist/index.js +12 -0
  31. package/package.json +6 -4
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import * as Either from 'effect/Either';
2
14
  import { FailedToDeriveWebSocketUrlError } from '@midnight-ntwrk/wallet-sdk-utilities/networking';
3
15
  export const deriveWebSocketUrl = (url) => {
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Effect, Layer } from 'effect';
2
14
  import { print } from 'graphql';
3
15
  import { createClient } from 'graphql-http';
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Effect, Context, Effectable, Option, identity } from 'effect';
2
14
  import { QueryClient } from './QueryClient.js';
3
15
  /**
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Context } from 'effect';
2
14
  export class QueryClient extends Context.Tag('@midnight-ntwrk/indexer-client#QueryClient')() {
3
15
  }
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Effect, Stream, Context, Effectable, Option, identity } from 'effect';
2
14
  import { SubscriptionClient } from './SubscriptionClient.js';
3
15
  export const make = (name, document) => new SubscriptionImpl(`${name}Subscription`, document);
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Context } from 'effect';
2
14
  export class SubscriptionClient extends Context.Tag('@midnight-ntwrk/indexer-client#SubscriptionClient')() {
3
15
  }
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Effect, Stream, Layer } from 'effect';
2
14
  import { createClient } from 'graphql-ws';
3
15
  import { print } from 'graphql';
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  export * as Query from './Query.js';
2
14
  export * as Subscription from './Subscription.js';
3
15
  export * from './QueryClient.js';
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Effect } from 'effect';
2
14
  import { describe, expect, it, vi } from 'vitest';
3
15
  import * as QueryClient from '../QueryClient.js';
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Effect } from 'effect';
2
14
  import { describe, it } from 'vitest';
3
15
  import * as QueryClient from '../QueryClient.js';
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Effect } from 'effect';
2
14
  import { describe, expect, it, vi } from 'vitest';
3
15
  import * as SubscriptionClient from '../SubscriptionClient.js';
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  import { Effect } from 'effect';
2
14
  import { describe, it } from 'vitest';
3
15
  import * as SubscriptionClient from '../SubscriptionClient.js';
@@ -1,3 +1,15 @@
1
+ // This file is part of MIDNIGHT-WALLET-SDK.
2
+ // Copyright (C) 2025 Midnight Foundation
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // You may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
1
13
  /* eslint-disable */
2
14
  import * as types from './graphql.js';
3
15
  const documents = {
@@ -84,7 +84,7 @@ export type BlockOffset =
84
84
  {
85
85
  hash: Scalars['HexEncoded']['input'];
86
86
  height?: never;
87
- } | /** A block height. */ {
87
+ } /** A block height. */ | {
88
88
  hash?: never;
89
89
  height: Scalars['Int']['input'];
90
90
  };
@@ -112,7 +112,7 @@ export type ContractActionOffset =
112
112
  {
113
113
  blockOffset: BlockOffset;
114
114
  transactionOffset?: never;
115
- } | /** Either a transaction hash or a transaction identifier. */ {
115
+ } /** Either a transaction hash or a transaction identifier. */ | {
116
116
  blockOffset?: never;
117
117
  transactionOffset: TransactionOffset;
118
118
  };
@@ -438,7 +438,7 @@ export type TransactionOffset =
438
438
  {
439
439
  hash: Scalars['HexEncoded']['input'];
440
440
  identifier?: never;
441
- } | /** A hex-encoded transaction identifier. */ {
441
+ } /** A hex-encoded transaction identifier. */ | {
442
442
  hash?: never;
443
443
  identifier: Scalars['HexEncoded']['input'];
444
444
  };