@midnight-ntwrk/wallet-sdk 2.0.0-beta.2 → 2.0.0-beta.4
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.
- package/README.md +36 -3
- package/dist/capabilities/codecs.d.ts +1 -0
- package/dist/capabilities/codecs.js +13 -0
- package/dist/dust/v2.d.ts +1 -0
- package/dist/dust/v2.js +13 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/ledger/v8.d.ts +25 -0
- package/dist/ledger/v8.js +37 -0
- package/dist/ledger/v9.d.ts +32 -0
- package/dist/ledger/v9.js +44 -0
- package/dist/shielded/v2.d.ts +1 -0
- package/dist/shielded/v2.js +13 -0
- package/dist/unshielded/v2.d.ts +1 -0
- package/dist/unshielded/v2.js +13 -0
- package/package.json +43 -14
package/README.md
CHANGED
|
@@ -33,11 +33,14 @@ re-exports the core wallet types, while dedicated sub-path exports give access t
|
|
|
33
33
|
| `@midnight-ntwrk/wallet-sdk/capabilities/simulation` | `@midnight-ntwrk/wallet-sdk-capabilities/simulation` |
|
|
34
34
|
| `@midnight-ntwrk/wallet-sdk/capabilities/submission` | `@midnight-ntwrk/wallet-sdk-capabilities/submission` |
|
|
35
35
|
| `@midnight-ntwrk/wallet-sdk/dust` | `@midnight-ntwrk/wallet-sdk-dust-wallet` |
|
|
36
|
-
| `@midnight-ntwrk/wallet-sdk/dust/v1` | `@midnight-ntwrk/wallet-sdk-dust-wallet/v1`
|
|
36
|
+
| `@midnight-ntwrk/wallet-sdk/dust/v1` | `@midnight-ntwrk/wallet-sdk-dust-wallet/v1` (ledger-v8, the V1 variant) |
|
|
37
|
+
| `@midnight-ntwrk/wallet-sdk/dust/v2` | `@midnight-ntwrk/wallet-sdk-dust-wallet/v2` (current, ledger-v9 variant) |
|
|
37
38
|
| `@midnight-ntwrk/wallet-sdk/facade` | `@midnight-ntwrk/wallet-sdk-facade` |
|
|
38
39
|
| `@midnight-ntwrk/wallet-sdk/hd` | `@midnight-ntwrk/wallet-sdk-hd` |
|
|
39
40
|
| `@midnight-ntwrk/wallet-sdk/indexer-client` | `@midnight-ntwrk/wallet-sdk-indexer-client` |
|
|
40
41
|
| `@midnight-ntwrk/wallet-sdk/indexer-client/effect` | `@midnight-ntwrk/wallet-sdk-indexer-client/effect` |
|
|
42
|
+
| `@midnight-ntwrk/wallet-sdk/ledger/v8` | `@midnight-ntwrk/ledger-v8` (ledger-v8, for authors — see [Authoring transactions](#authoring-transactions)) |
|
|
43
|
+
| `@midnight-ntwrk/wallet-sdk/ledger/v9` | `@midnightntwrk/ledger-v9` (ledger-v9, for authors — see [Authoring transactions](#authoring-transactions)) |
|
|
41
44
|
| `@midnight-ntwrk/wallet-sdk/node-client` | `@midnight-ntwrk/wallet-sdk-node-client` |
|
|
42
45
|
| `@midnight-ntwrk/wallet-sdk/node-client/effect` | `@midnight-ntwrk/wallet-sdk-node-client/effect` |
|
|
43
46
|
| `@midnight-ntwrk/wallet-sdk/node-client/testing` | `@midnight-ntwrk/wallet-sdk-node-client/testing` |
|
|
@@ -47,10 +50,12 @@ re-exports the core wallet types, while dedicated sub-path exports give access t
|
|
|
47
50
|
| `@midnight-ntwrk/wallet-sdk/runtime` | `@midnight-ntwrk/wallet-sdk-runtime` |
|
|
48
51
|
| `@midnight-ntwrk/wallet-sdk/runtime/abstractions` | `@midnight-ntwrk/wallet-sdk-runtime/abstractions` |
|
|
49
52
|
| `@midnight-ntwrk/wallet-sdk/shielded` | `@midnight-ntwrk/wallet-sdk-shielded` |
|
|
50
|
-
| `@midnight-ntwrk/wallet-sdk/shielded/v1` | `@midnight-ntwrk/wallet-sdk-shielded/v1`
|
|
53
|
+
| `@midnight-ntwrk/wallet-sdk/shielded/v1` | `@midnight-ntwrk/wallet-sdk-shielded/v1` (ledger-v8, the V1 variant) |
|
|
54
|
+
| `@midnight-ntwrk/wallet-sdk/shielded/v2` | `@midnight-ntwrk/wallet-sdk-shielded/v2` (current, ledger-v9 variant) |
|
|
51
55
|
| `@midnight-ntwrk/wallet-sdk/testing` | Legacy alias for `@midnight-ntwrk/wallet-sdk/utilities/testing` |
|
|
52
56
|
| `@midnight-ntwrk/wallet-sdk/unshielded` | `@midnight-ntwrk/wallet-sdk-unshielded-wallet` |
|
|
53
|
-
| `@midnight-ntwrk/wallet-sdk/unshielded/v1` | `@midnight-ntwrk/wallet-sdk-unshielded-wallet/v1`
|
|
57
|
+
| `@midnight-ntwrk/wallet-sdk/unshielded/v1` | `@midnight-ntwrk/wallet-sdk-unshielded-wallet/v1` (ledger-v8, the V1 variant) |
|
|
58
|
+
| `@midnight-ntwrk/wallet-sdk/unshielded/v2` | `@midnight-ntwrk/wallet-sdk-unshielded-wallet/v2` (current, ledger-v9 variant) |
|
|
54
59
|
| `@midnight-ntwrk/wallet-sdk/utilities` | `@midnight-ntwrk/wallet-sdk-utilities` |
|
|
55
60
|
| `@midnight-ntwrk/wallet-sdk/utilities/networking` | `@midnight-ntwrk/wallet-sdk-utilities/networking` |
|
|
56
61
|
| `@midnight-ntwrk/wallet-sdk/utilities/testing` | `@midnight-ntwrk/wallet-sdk-utilities/testing` |
|
|
@@ -153,6 +158,34 @@ const registrationRecipe = await facade.registerNightUtxosForDustGeneration(
|
|
|
153
158
|
const { fee, dustGenerationEstimations } = await facade.estimateRegistration(nightUtxos);
|
|
154
159
|
```
|
|
155
160
|
|
|
161
|
+
### Authoring transactions
|
|
162
|
+
|
|
163
|
+
Most applications never build a transaction themselves: they ask the wallet for a transfer or a swap and carry what
|
|
164
|
+
comes back. An application that _does_ build one — reaching for `Intent.new` or `Transaction.fromParts` — has to choose
|
|
165
|
+
which ledger version's rules the bytes follow, and both are shipped here so that choice is made in the import line
|
|
166
|
+
rather than by reaching past this package for a ledger of your own:
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
import * as ledger from '@midnight-ntwrk/wallet-sdk/ledger/v9';
|
|
170
|
+
import { WalletTransaction } from '@midnight-ntwrk/wallet-sdk';
|
|
171
|
+
|
|
172
|
+
const authored = ledger.Transaction.fromParts(networkId, undefined, undefined, intent);
|
|
173
|
+
const handle = WalletTransaction.adopt('Unproven', authored, state.activeProtocolVersion);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
`adopt` seals what you built into the same handle the wallet's own methods return, stamped with the protocol version you
|
|
177
|
+
claim it was built for. The SDK holds you to that claim: a transaction stamped for one side of the protocol boundary is
|
|
178
|
+
refused by a wallet acting on the other, with a typed `ProtocolVersionMismatchError`.
|
|
179
|
+
|
|
180
|
+
**Which subpath to import is a property of the chain, not of this release.** A chain is on ledger-v8 until it forks, and
|
|
181
|
+
mainnet is on ledger-v8 until then — so an authoring path that only ever imports `./ledger/v9` compiles cleanly and
|
|
182
|
+
**fails at run time on every chain that has not yet crossed**. Read `state.activeProtocolVersion` and author against the
|
|
183
|
+
version the chain is actually on; the check is a run-time one by design, because the compiler cannot know which chain
|
|
184
|
+
the application will be pointed at.
|
|
185
|
+
|
|
186
|
+
Neither subpath is re-exported from the package root. They are WebAssembly modules, and an application that only carries
|
|
187
|
+
transactions should not pay for a ledger it never names.
|
|
188
|
+
|
|
156
189
|
## Types
|
|
157
190
|
|
|
158
191
|
### BalancingRecipe
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@midnight-ntwrk/wallet-sdk-capabilities/codecs';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
+
// Copyright (C) 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.
|
|
13
|
+
export * from '@midnight-ntwrk/wallet-sdk-capabilities/codecs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@midnight-ntwrk/wallet-sdk-dust-wallet/v2';
|
package/dist/dust/v2.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
+
// Copyright (C) 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.
|
|
13
|
+
export * from '@midnight-ntwrk/wallet-sdk-dust-wallet/v2';
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,16 @@ export * from '@midnight-ntwrk/wallet-sdk-prover-client';
|
|
|
7
7
|
export * from '@midnight-ntwrk/wallet-sdk-shielded';
|
|
8
8
|
export * from '@midnight-ntwrk/wallet-sdk-unshielded-wallet';
|
|
9
9
|
export * from '@midnight-ntwrk/wallet-sdk-utilities';
|
|
10
|
+
/**
|
|
11
|
+
* The one thing an application signs with, and the one error it can get back.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Promoted from the internal adapter rather than restated: `Signing` is the vocabulary the ledger-v8 lowering is stated
|
|
15
|
+
* in, and `UnsupportedSignatureKindError` is the same class that lowering raises, so an application catching it here
|
|
16
|
+
* catches exactly what the SDK threw. The module names both ledger versions in `import type` only, so nothing of
|
|
17
|
+
* either is loaded to reach it.
|
|
18
|
+
*/
|
|
19
|
+
export { Signing, UnsupportedSignatureKindError } from '@midnight-ntwrk/wallet-sdk-capabilities/signatures';
|
|
10
20
|
export * as Capabilities from '@midnight-ntwrk/wallet-sdk-capabilities';
|
|
11
21
|
export * as IndexerClient from '@midnight-ntwrk/wallet-sdk-indexer-client';
|
|
12
22
|
export * as NodeClient from '@midnight-ntwrk/wallet-sdk-node-client';
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,16 @@ export * from '@midnight-ntwrk/wallet-sdk-prover-client';
|
|
|
19
19
|
export * from '@midnight-ntwrk/wallet-sdk-shielded';
|
|
20
20
|
export * from '@midnight-ntwrk/wallet-sdk-unshielded-wallet';
|
|
21
21
|
export * from '@midnight-ntwrk/wallet-sdk-utilities';
|
|
22
|
+
/**
|
|
23
|
+
* The one thing an application signs with, and the one error it can get back.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Promoted from the internal adapter rather than restated: `Signing` is the vocabulary the ledger-v8 lowering is stated
|
|
27
|
+
* in, and `UnsupportedSignatureKindError` is the same class that lowering raises, so an application catching it here
|
|
28
|
+
* catches exactly what the SDK threw. The module names both ledger versions in `import type` only, so nothing of
|
|
29
|
+
* either is loaded to reach it.
|
|
30
|
+
*/
|
|
31
|
+
export { Signing, UnsupportedSignatureKindError } from '@midnight-ntwrk/wallet-sdk-capabilities/signatures';
|
|
22
32
|
export * as Capabilities from '@midnight-ntwrk/wallet-sdk-capabilities';
|
|
23
33
|
export * as IndexerClient from '@midnight-ntwrk/wallet-sdk-indexer-client';
|
|
24
34
|
export * as NodeClient from '@midnight-ntwrk/wallet-sdk-node-client';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ledger-v8, for an application that builds its own transactions.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* The version every chain is on until it crosses the protocol boundary — mainnet included, until the fork happens. An
|
|
6
|
+
* application authoring transactions for a chain that has not yet forked imports this one, and seals what it built
|
|
7
|
+
* with `WalletTransaction.adopt('Unproven', tx, version)` at a version below the fork.
|
|
8
|
+
*
|
|
9
|
+
* Named for the ledger version rather than for a variant ordinal, so the import line says which rules the bytes follow.
|
|
10
|
+
* See {@link ../ledger/v9} for ledger-v9 and for what authoring costs an application in general; the choice between
|
|
11
|
+
* the two is a property of the chain, and an application that spans the boundary reads the protocol version from the
|
|
12
|
+
* wallet's state and authors accordingly.
|
|
13
|
+
*
|
|
14
|
+
* Deliberately not part of the root barrel: this is WebAssembly, and an application that only carries transactions
|
|
15
|
+
* should not pay for a ledger it never names.
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import * as ledger from '@midnight-ntwrk/wallet-sdk/ledger/v8';
|
|
19
|
+
* import { WalletTransaction } from '@midnight-ntwrk/wallet-sdk';
|
|
20
|
+
*
|
|
21
|
+
* const authored = ledger.Transaction.fromParts(networkId, undefined, undefined, intent);
|
|
22
|
+
* const handle = WalletTransaction.adopt('Unproven', authored, state.activeProtocolVersion);
|
|
23
|
+
* ```;
|
|
24
|
+
*/
|
|
25
|
+
export * from '@midnight-ntwrk/ledger-v8';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
+
// Copyright (C) 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.
|
|
13
|
+
/**
|
|
14
|
+
* Ledger-v8, for an application that builds its own transactions.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* The version every chain is on until it crosses the protocol boundary — mainnet included, until the fork happens. An
|
|
18
|
+
* application authoring transactions for a chain that has not yet forked imports this one, and seals what it built
|
|
19
|
+
* with `WalletTransaction.adopt('Unproven', tx, version)` at a version below the fork.
|
|
20
|
+
*
|
|
21
|
+
* Named for the ledger version rather than for a variant ordinal, so the import line says which rules the bytes follow.
|
|
22
|
+
* See {@link ../ledger/v9} for ledger-v9 and for what authoring costs an application in general; the choice between
|
|
23
|
+
* the two is a property of the chain, and an application that spans the boundary reads the protocol version from the
|
|
24
|
+
* wallet's state and authors accordingly.
|
|
25
|
+
*
|
|
26
|
+
* Deliberately not part of the root barrel: this is WebAssembly, and an application that only carries transactions
|
|
27
|
+
* should not pay for a ledger it never names.
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* import * as ledger from '@midnight-ntwrk/wallet-sdk/ledger/v8';
|
|
31
|
+
* import { WalletTransaction } from '@midnight-ntwrk/wallet-sdk';
|
|
32
|
+
*
|
|
33
|
+
* const authored = ledger.Transaction.fromParts(networkId, undefined, undefined, intent);
|
|
34
|
+
* const handle = WalletTransaction.adopt('Unproven', authored, state.activeProtocolVersion);
|
|
35
|
+
* ```;
|
|
36
|
+
*/
|
|
37
|
+
export * from '@midnight-ntwrk/ledger-v8';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ledger-v9, for an application that builds its own transactions.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Most applications never need this. They ask the wallet for a transfer or a swap, carry what comes back as a
|
|
6
|
+
* `WalletTransaction`, and hand it straight to the next call — and because the handle never names a ledger version,
|
|
7
|
+
* nothing they wrote has to change when the chain crosses the protocol boundary.
|
|
8
|
+
*
|
|
9
|
+
* An application that reaches for `Intent.new` or `Transaction.fromParts` is doing something different: it is
|
|
10
|
+
* authoring, and authoring means choosing which ledger version's rules the bytes follow. That choice cannot be hidden
|
|
11
|
+
* behind a version-free API, so this subpath makes it explicit and importable from the one package the application
|
|
12
|
+
* already depends on. Seal the result with `WalletTransaction.adopt('Unproven', tx, version)` to hand it back.
|
|
13
|
+
*
|
|
14
|
+
* **Which one to import is a property of the chain, not of this release.** Both are shipped, side by side, because both
|
|
15
|
+
* are real: a chain is on ledger-v8 until it forks, and mainnet is on ledger-v8 until then. An authoring path that
|
|
16
|
+
* only ever imports `./ledger/v9` type-checks perfectly and fails at run time, with a `ProtocolVersionMismatchError`,
|
|
17
|
+
* on every chain that has not yet crossed — the wallet refuses a transaction built for a version it is not acting at.
|
|
18
|
+
* An application that must work either side of the boundary reads the protocol version from the wallet's state and
|
|
19
|
+
* authors accordingly.
|
|
20
|
+
*
|
|
21
|
+
* Deliberately not part of the root barrel: this is WebAssembly, and an application that only carries transactions
|
|
22
|
+
* should not pay for a ledger it never names.
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import * as ledger from '@midnight-ntwrk/wallet-sdk/ledger/v9';
|
|
26
|
+
* import { WalletTransaction } from '@midnight-ntwrk/wallet-sdk';
|
|
27
|
+
*
|
|
28
|
+
* const authored = ledger.Transaction.fromParts(networkId, undefined, undefined, intent);
|
|
29
|
+
* const handle = WalletTransaction.adopt('Unproven', authored, state.activeProtocolVersion);
|
|
30
|
+
* ```;
|
|
31
|
+
*/
|
|
32
|
+
export * from '@midnightntwrk/ledger-v9';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
+
// Copyright (C) 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.
|
|
13
|
+
/**
|
|
14
|
+
* Ledger-v9, for an application that builds its own transactions.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Most applications never need this. They ask the wallet for a transfer or a swap, carry what comes back as a
|
|
18
|
+
* `WalletTransaction`, and hand it straight to the next call — and because the handle never names a ledger version,
|
|
19
|
+
* nothing they wrote has to change when the chain crosses the protocol boundary.
|
|
20
|
+
*
|
|
21
|
+
* An application that reaches for `Intent.new` or `Transaction.fromParts` is doing something different: it is
|
|
22
|
+
* authoring, and authoring means choosing which ledger version's rules the bytes follow. That choice cannot be hidden
|
|
23
|
+
* behind a version-free API, so this subpath makes it explicit and importable from the one package the application
|
|
24
|
+
* already depends on. Seal the result with `WalletTransaction.adopt('Unproven', tx, version)` to hand it back.
|
|
25
|
+
*
|
|
26
|
+
* **Which one to import is a property of the chain, not of this release.** Both are shipped, side by side, because both
|
|
27
|
+
* are real: a chain is on ledger-v8 until it forks, and mainnet is on ledger-v8 until then. An authoring path that
|
|
28
|
+
* only ever imports `./ledger/v9` type-checks perfectly and fails at run time, with a `ProtocolVersionMismatchError`,
|
|
29
|
+
* on every chain that has not yet crossed — the wallet refuses a transaction built for a version it is not acting at.
|
|
30
|
+
* An application that must work either side of the boundary reads the protocol version from the wallet's state and
|
|
31
|
+
* authors accordingly.
|
|
32
|
+
*
|
|
33
|
+
* Deliberately not part of the root barrel: this is WebAssembly, and an application that only carries transactions
|
|
34
|
+
* should not pay for a ledger it never names.
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import * as ledger from '@midnight-ntwrk/wallet-sdk/ledger/v9';
|
|
38
|
+
* import { WalletTransaction } from '@midnight-ntwrk/wallet-sdk';
|
|
39
|
+
*
|
|
40
|
+
* const authored = ledger.Transaction.fromParts(networkId, undefined, undefined, intent);
|
|
41
|
+
* const handle = WalletTransaction.adopt('Unproven', authored, state.activeProtocolVersion);
|
|
42
|
+
* ```;
|
|
43
|
+
*/
|
|
44
|
+
export * from '@midnightntwrk/ledger-v9';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@midnight-ntwrk/wallet-sdk-shielded/v2';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
+
// Copyright (C) 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.
|
|
13
|
+
export * from '@midnight-ntwrk/wallet-sdk-shielded/v2';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@midnight-ntwrk/wallet-sdk-unshielded-wallet/v2';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
+
// Copyright (C) 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.
|
|
13
|
+
export * from '@midnight-ntwrk/wallet-sdk-unshielded-wallet/v2';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midnight-ntwrk/wallet-sdk",
|
|
3
3
|
"description": "Barrel package re-exporting all Midnight Wallet SDK packages",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
"types": "./dist/capabilities/balancer.d.ts",
|
|
38
38
|
"import": "./dist/capabilities/balancer.js"
|
|
39
39
|
},
|
|
40
|
+
"./capabilities/codecs": {
|
|
41
|
+
"types": "./dist/capabilities/codecs.d.ts",
|
|
42
|
+
"import": "./dist/capabilities/codecs.js"
|
|
43
|
+
},
|
|
40
44
|
"./capabilities/pendingTransactions": {
|
|
41
45
|
"types": "./dist/capabilities/pendingTransactions.d.ts",
|
|
42
46
|
"import": "./dist/capabilities/pendingTransactions.js"
|
|
@@ -61,6 +65,10 @@
|
|
|
61
65
|
"types": "./dist/dust/v1.d.ts",
|
|
62
66
|
"import": "./dist/dust/v1.js"
|
|
63
67
|
},
|
|
68
|
+
"./dust/v2": {
|
|
69
|
+
"types": "./dist/dust/v2.d.ts",
|
|
70
|
+
"import": "./dist/dust/v2.js"
|
|
71
|
+
},
|
|
64
72
|
"./facade": {
|
|
65
73
|
"types": "./dist/facade.d.ts",
|
|
66
74
|
"import": "./dist/facade.js"
|
|
@@ -69,6 +77,14 @@
|
|
|
69
77
|
"types": "./dist/hd.d.ts",
|
|
70
78
|
"import": "./dist/hd.js"
|
|
71
79
|
},
|
|
80
|
+
"./ledger/v8": {
|
|
81
|
+
"types": "./dist/ledger/v8.d.ts",
|
|
82
|
+
"import": "./dist/ledger/v8.js"
|
|
83
|
+
},
|
|
84
|
+
"./ledger/v9": {
|
|
85
|
+
"types": "./dist/ledger/v9.d.ts",
|
|
86
|
+
"import": "./dist/ledger/v9.js"
|
|
87
|
+
},
|
|
72
88
|
"./indexer-client": {
|
|
73
89
|
"types": "./dist/indexer-client/index.d.ts",
|
|
74
90
|
"import": "./dist/indexer-client/index.js"
|
|
@@ -117,6 +133,10 @@
|
|
|
117
133
|
"types": "./dist/shielded/v1.d.ts",
|
|
118
134
|
"import": "./dist/shielded/v1.js"
|
|
119
135
|
},
|
|
136
|
+
"./shielded/v2": {
|
|
137
|
+
"types": "./dist/shielded/v2.d.ts",
|
|
138
|
+
"import": "./dist/shielded/v2.js"
|
|
139
|
+
},
|
|
120
140
|
"./testing": {
|
|
121
141
|
"types": "./dist/testing.d.ts",
|
|
122
142
|
"import": "./dist/testing.js"
|
|
@@ -129,6 +149,10 @@
|
|
|
129
149
|
"types": "./dist/unshielded/v1.d.ts",
|
|
130
150
|
"import": "./dist/unshielded/v1.js"
|
|
131
151
|
},
|
|
152
|
+
"./unshielded/v2": {
|
|
153
|
+
"types": "./dist/unshielded/v2.d.ts",
|
|
154
|
+
"import": "./dist/unshielded/v2.js"
|
|
155
|
+
},
|
|
132
156
|
"./utilities": {
|
|
133
157
|
"types": "./dist/utilities/index.d.ts",
|
|
134
158
|
"import": "./dist/utilities/index.js"
|
|
@@ -147,22 +171,27 @@
|
|
|
147
171
|
}
|
|
148
172
|
},
|
|
149
173
|
"dependencies": {
|
|
150
|
-
"@midnight-ntwrk/
|
|
151
|
-
"@
|
|
152
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
153
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
154
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
155
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
156
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
157
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
158
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
159
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
160
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
161
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
162
|
-
"@midnight-ntwrk/wallet-sdk-
|
|
174
|
+
"@midnight-ntwrk/ledger-v8": "^8.1.0",
|
|
175
|
+
"@midnightntwrk/ledger-v9": "1.0.0-rc.5",
|
|
176
|
+
"@midnight-ntwrk/wallet-sdk-abstractions": "3.0.0-beta.2",
|
|
177
|
+
"@midnight-ntwrk/wallet-sdk-address-format": "4.0.0-beta.4",
|
|
178
|
+
"@midnight-ntwrk/wallet-sdk-capabilities": "4.0.0-beta.4",
|
|
179
|
+
"@midnight-ntwrk/wallet-sdk-dust-wallet": "5.0.0-beta.4",
|
|
180
|
+
"@midnight-ntwrk/wallet-sdk-facade": "5.0.0-beta.4",
|
|
181
|
+
"@midnight-ntwrk/wallet-sdk-hd": "3.1.0-beta.3",
|
|
182
|
+
"@midnight-ntwrk/wallet-sdk-indexer-client": "2.0.0-beta.2",
|
|
183
|
+
"@midnight-ntwrk/wallet-sdk-node-client": "2.0.0-beta.4",
|
|
184
|
+
"@midnight-ntwrk/wallet-sdk-prover-client": "2.0.0-beta.4",
|
|
185
|
+
"@midnight-ntwrk/wallet-sdk-runtime": "1.1.0-beta.2",
|
|
186
|
+
"@midnight-ntwrk/wallet-sdk-shielded": "4.0.0-beta.4",
|
|
187
|
+
"@midnight-ntwrk/wallet-sdk-unshielded-wallet": "4.0.0-beta.4",
|
|
188
|
+
"@midnight-ntwrk/wallet-sdk-utilities": "1.2.2-beta.0"
|
|
163
189
|
},
|
|
164
190
|
"scripts": {
|
|
165
191
|
"typecheck": "tsc -b ./tsconfig.json --noEmit --force",
|
|
192
|
+
"test": "vitest run",
|
|
193
|
+
"test:unit": "vitest run --project unit --passWithNoTests",
|
|
194
|
+
"test:integration": "vitest run --project integration --passWithNoTests",
|
|
166
195
|
"lint": "eslint --max-warnings 0",
|
|
167
196
|
"format": "prettier --write \"**/*.{ts,js,json,yaml,yml,md}\"",
|
|
168
197
|
"format:check": "prettier --check \"**/*.{ts,js,json,yaml,yml,md}\"",
|