@tari-project/tarijs 0.6.0 → 0.9.0
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/.github/PULL_REQUEST_TEMPLATE.md +2 -12
- package/Dockerfile +2 -2
- package/README.md +1 -1
- package/docusaurus/tari-docs/docs/provider-vs-signer.md +27 -0
- package/docusaurus/tari-docs/docs/wallet/submit-transaction/build-execute-request.md +0 -2
- package/docusaurus/tari-docs/docs/wallet/submit-transaction/transaction-builder/inputs.md +0 -1
- package/docusaurus/tari-docs/package-lock.json +17964 -0
- package/docusaurus/tari-docs/package.json +2 -2
- package/package.json +1 -1
- package/packages/builders/package.json +3 -2
- package/packages/builders/src/helpers/index.ts +1 -1
- package/packages/builders/src/helpers/submitTransaction.ts +26 -31
- package/packages/builders/src/helpers/workspace.ts +32 -15
- package/packages/builders/src/index.ts +1 -2
- package/packages/builders/src/transaction/TransactionBuilder.ts +105 -38
- package/packages/builders/src/transaction/TransactionRequest.ts +30 -38
- package/packages/indexer_provider/package.json +1 -1
- package/packages/metamask_signer/package.json +1 -1
- package/packages/metamask_signer/src/index.ts +12 -19
- package/packages/tari_permissions/package.json +1 -1
- package/packages/tari_permissions/src/tari_permissions.ts +1 -17
- package/packages/tari_provider/package.json +1 -1
- package/packages/tari_signer/package.json +1 -1
- package/packages/tari_universe/package.json +1 -1
- package/packages/tarijs/package.json +1 -1
- package/packages/tarijs/src/index.ts +0 -8
- package/packages/tarijs/test/integration-tests/wallet_daemon/json_rpc_provider.spec.ts +74 -44
- package/packages/tarijs_types/package.json +1 -1
- package/packages/tarijs_types/src/SubstateDiff.ts +0 -4
- package/packages/tarijs_types/src/SubstateType.ts +1 -1
- package/packages/tarijs_types/src/TransactionResult.ts +2 -8
- package/packages/tarijs_types/src/TransactionStatus.ts +7 -7
- package/packages/tarijs_types/src/helpers/txResult.ts +8 -11
- package/packages/tarijs_types/src/index.ts +1 -16
- package/packages/tarijs_types/src/signer.ts +6 -11
- package/packages/wallet_daemon/package.json +1 -1
- package/packages/wallet_daemon/src/signer.ts +12 -25
- package/packages/wallet_daemon/src/webrtc.ts +3 -3
- package/packages/walletconnect/package.json +1 -1
- package/packages/walletconnect/src/index.ts +14 -28
- package/pnpm-workspace.yaml +2 -2
- package/scripts/check_versions.sh +2 -2
- package/scripts/set_package_versions.sh +39 -0
- package/packages/tarijs_types/src/FinalizeResult.ts +0 -17
- package/packages/tarijs_types/src/Instruction.ts +0 -36
- package/packages/tarijs_types/src/SubstateRequirement.ts +0 -6
- package/packages/tarijs_types/src/Transaction.ts +0 -16
- package/packages/tarijs_types/src/UnsignedTransaction.ts +0 -14
- package/packages/tarijs_types/src/VersionedSubstateId.ts +0 -6
|
@@ -7,21 +7,11 @@ Motivation and Context
|
|
|
7
7
|
How Has This Been Tested?
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
What process can a PR reviewer use to test or verify this change?
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<!-- Checklist -->
|
|
14
|
-
<!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit
|
|
15
|
-
tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. -->
|
|
16
|
-
|
|
17
|
-
|
|
18
10
|
Breaking Changes
|
|
19
11
|
---
|
|
20
12
|
|
|
21
13
|
- [x] None
|
|
22
|
-
- [ ]
|
|
23
|
-
- [ ] Requires hard fork
|
|
24
|
-
- [ ] Other - Please specify
|
|
14
|
+
- [ ] Please specify
|
|
25
15
|
|
|
26
16
|
<!-- Does this include a breaking change? If so, include this line as a footer -->
|
|
27
|
-
<!-- BREAKING CHANGE:
|
|
17
|
+
<!-- BREAKING CHANGE: Describe the breaking change -->
|
package/Dockerfile
CHANGED
|
@@ -19,9 +19,9 @@ RUN apt-get update && apt-get install -y \
|
|
|
19
19
|
&& /bin/bash -c "source ~/.bashrc && source ~/.profile"
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
# Clone tari-
|
|
22
|
+
# Clone tari-ootle repo at the same level (required for building)
|
|
23
23
|
WORKDIR /
|
|
24
|
-
RUN git clone https://github.com/tari-project/tari-
|
|
24
|
+
RUN git clone https://github.com/tari-project/tari-ootle.git
|
|
25
25
|
|
|
26
26
|
# Set up project
|
|
27
27
|
WORKDIR /app
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Please read the [TODO](TODO.md) file for upcoming features.
|
|
|
12
12
|
|
|
13
13
|
## Library building
|
|
14
14
|
|
|
15
|
-
You must have the [tari-
|
|
15
|
+
You must have the [tari-ootle](https://github.com/tari-project/tari-ootle) repo cloned at the same folder level as this repo.
|
|
16
16
|
|
|
17
17
|
### Option 1: Local Build
|
|
18
18
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
title: Providers vs Signers
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Introduction to Providers and Signers
|
|
7
|
+
|
|
8
|
+
Tari.js provides two methods of interaction with the Ootle via built-in providers and signers.
|
|
9
|
+
|
|
10
|
+
## What is a provider?
|
|
11
|
+
|
|
12
|
+
A provider provides a bridge of communication between the application and the Ootle network for the purpose of retrieving publically accessible information from the chain. The provider allows a developer to call information from the Ootle without necessarily requiring a wallet or performing a transaction. Likewise, this means that a developer cannot use a provider to write or commit changes to the Ootle network.
|
|
13
|
+
|
|
14
|
+
In Tari.js, the `Indexer Provider` class is provided for this purpose. You can read more about [the Provider here](./providers/indexer-provider.md).
|
|
15
|
+
|
|
16
|
+
## What is a signer?
|
|
17
|
+
|
|
18
|
+
A signer provides for one or more methods for authenticating a transaction or action, and for accessing additional functionality for interacting with the Ootle. In this way, a signer allows the user to perform specific actions via a verifiable manner.
|
|
19
|
+
|
|
20
|
+
Tari.js provides three different signers for interacting with the Ootle, depending on the client you are using to interact with the Ootle. All of these utilise the `TariSigner` interface:
|
|
21
|
+
|
|
22
|
+
- **WalletConnect Signer**: This class is to be used to connect a wallet that is compatible with the WalletConnect protocol to your application.
|
|
23
|
+
- **Tari Universe Signer**: This class relies on the use of the Ootle wallet built into the [Tari Universe](https://airdrop.tari.com) application.
|
|
24
|
+
- **Tari Wallet Daemon Signer** this class uses the Tari Wallet Daemon service for facilitating transactions, account management and more.
|
|
25
|
+
|
|
26
|
+
You can read more about the [signers here](./category/signers)
|
|
27
|
+
|
|
@@ -20,11 +20,9 @@ The transaction request has additional parameters. Therefore, you build it using
|
|
|
20
20
|
const isDryRun = false;
|
|
21
21
|
const inputRefs = undefined; // Obsolete
|
|
22
22
|
const network = Network.LocalNet;
|
|
23
|
-
const requiredSubstates = []; // Soon to be retired. Use `builder.withInputs()` instead.
|
|
24
23
|
const submitTransactionRequest = buildTransactionRequest(
|
|
25
24
|
transaction,
|
|
26
25
|
account.account_id,
|
|
27
|
-
requiredSubstates,
|
|
28
26
|
inputRefs,
|
|
29
27
|
isDryRun,
|
|
30
28
|
network
|