Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions src/lib/docs/.templates/class.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Description of list of Arguments

- `foo`: bar

### [Options](https://wharfkit.github.io/session/interfaces/SessionOptions.html)
### [Options](https://wharfkit.github.io/js/session/interfaces/SessionOptions.html)

Description of list of Options

Expand All @@ -47,7 +47,7 @@ Brief usage description

- `method`: Description

[class definition](https://wharfkit.github.io/session/classes/Session.html#abiCache).
[class definition](https://wharfkit.github.io/js/session/classes/Session.html#abicache).

### Properties

Expand All @@ -62,4 +62,4 @@ Brief usage description

### TypeDocs

- [Session Documentation](https://wharfkit.github.io/session/classes/Session.html)
- [Session Documentation](https://wharfkit.github.io/js/session/classes/Session.html)
6 changes: 3 additions & 3 deletions src/lib/docs/.templates/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Description of list of Arguments

- `foo`: bar

### [Options](https://wharfkit.github.io/session/interfaces/SessionOptions.html)
### [Options](https://wharfkit.github.io/js/session/interfaces/SessionOptions.html)

Description of list of Options

Expand All @@ -47,7 +47,7 @@ Brief usage description

- `method`: Description

[interface definition](https://wharfkit.github.io/session/interfacees/Session.html#abiCache).
[interface definition](https://wharfkit.github.io/js/session/interfaces/SessionOptions.html).

### Properties

Expand All @@ -62,4 +62,4 @@ Brief usage description

### TypeDocs

- [Session Documentation](https://wharfkit.github.io/session/interfacees/Session.html)
- [Session Documentation](https://wharfkit.github.io/js/session/classes/Session.html)
2 changes: 1 addition & 1 deletion src/lib/docs/.templates/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Commonly used parameters that can be passed this way include:
- `permissionLevel`: A specific [PermissionLevel](/docs/antelope/permission-level) to login with, preventing any user account selection.
- `walletPlugin`: A specific [WalletPlugin](/docs/session-kit/plugin-wallet) to authenticate with, preventing any user wallet selection.

A complete list of all parameters can be found in the [LoginOptions](https://wharfkit.github.io/session/interfaces/LoginOptions.html) documentation.
A complete list of all parameters can be found in the [LoginOptions](https://wharfkit.github.io/js/session/interfaces/LoginOptions.html) documentation.

### Example Override

Expand Down
2 changes: 1 addition & 1 deletion src/lib/docs/Antelope/APIClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const client = new APIClient({ provider })

Once an `APIClient` is established for a given chain, it will give access to a number of predefined API endpoints as method calls.

The list of available methods embedded in the `APIClient` can be found in either the [ChainAPI](https://wharfkit.github.io/antelope/classes/ChainAPI.html) or [HistoryAPI](https://wharfkit.github.io/antelope/classes/HistoryAPI.html) autodocs. The autocompletion helpers in the developer's IDE should also prompt with the available options in either `client.v1.chain` or `client.v1.history`.
The list of available methods embedded in the `APIClient` can be found in either the [ChainAPI](https://wharfkit.github.io/js/antelope/classes/ChainAPI.html) or [HistoryAPI](https://wharfkit.github.io/js/antelope/classes/HistoryAPI.html) autodocs. The autocompletion helpers in the developer's IDE should also prompt with the available options in either `client.v1.chain` or `client.v1.history`.

Every API call made through the `APIClient` returns a promise that must be handled either through `await` or `.then`. The example below illustrates the two ways you could call the `/v1/chain/get_info` API endpoint and return a response.

Expand Down
2 changes: 1 addition & 1 deletion src/lib/docs/Antelope/P2PClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ socket.connect(9876, "jungle4.greymass.com")

This will create a listener and connect it to the desired endpoint.

The next step is setting up the `P2PClient` instance and giving it an instance of a [P2PProvider](https://wharfkit.github.io/antelope/interfaces/P2PProvider.html). A default provider is exported from the [Antelope](/docs/antelope) library and is named [SimpleEnvelopeP2PProvider](https://wharfkit.github.io/antelope/classes/SimpleEnvelopeP2PProvider.html). This provider accepts the `socket` created in the first step and instructs the client to listen to the events it emits.
The next step is setting up the `P2PClient` instance and giving it an instance of a [P2PProvider](https://wharfkit.github.io/js/antelope/interfaces/P2PProvider.html). A default provider is exported from the [Antelope](/docs/antelope) library and is named [SimpleEnvelopeP2PProvider](https://wharfkit.github.io/js/antelope/classes/SimpleEnvelopeP2PProvider.html). This provider accepts the `socket` created in the first step and instructs the client to listen to the events it emits.

```ts
import {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/docs/Releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ slug: index

Each release of the `@wharfkit` packages has a page describing what it contains and how to upgrade a project to it.

## [Wharf 4.0.0](/docs/releases/4-0-0)
## [Wharf 4.0.1](/docs/releases/4-0-1)

Every `@wharfkit` package shares one version number and ships from one repository, so installing any of them resolves the rest to a matching version. The release carries the API changes developed as `@wharfkit/antelope` 2.0, session keys in `@wharfkit/session`, and a signing reliability fix for Anchor on iOS. The release notes also cover [upgrading a project to it](/docs/releases/4-0-0#upgrading).
Every `@wharfkit` package shares one version number and ships from one repository, so installing any of them resolves the rest to a matching version. The release carries the API changes developed as `@wharfkit/antelope` 2.0, session keys in `@wharfkit/session`, and a signing reliability fix for Anchor on iOS. The release notes also cover [upgrading a project to it](/docs/releases/4-0-1#upgrading).
27 changes: 15 additions & 12 deletions src/lib/docs/Releases/4.0.0.md → src/lib/docs/Releases/4.0.1.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
---
title: Wharf 4.0.0
description: What ships in the 4.0.0 release of the @wharfkit packages and how to upgrade a project to it.
title: Wharf 4.0.1
description: What ships in the 4.0.1 release of the @wharfkit packages and how to upgrade a project to it.
category: Releases
published: true
slug: 4-0-0
slug: 4-0-1
order: 1
---

# Wharf 4.0.0
# Wharf 4.0.1

Wharf 4.0.0 is the first release in which every `@wharfkit` package shares one version number, so installing any one of them brings the matching versions of the rest. It also brings session keys to `@wharfkit/session`, the API changes developed as `@wharfkit/antelope` 2.0, and a signing reliability fix for Anchor on iOS.
In Wharf 4.0.1, every `@wharfkit` package shares one version number, so installing any one of them brings the matching versions of the rest. The release also brings session keys to `@wharfkit/session`, the API changes developed as `@wharfkit/antelope` 2.0, and a signing reliability fix for Anchor on iOS.

Package names on npm are unchanged, and every package is developed in [github.com/wharfkit/js](https://github.com/wharfkit/js).

## Upgrading

Set every `@wharfkit` entry in your `package.json` to `^4.0.0`, whatever version it was on before, and reinstall from a clean lockfile:
Set every `@wharfkit` entry in your `package.json` to `^4.0.1`, whatever version it was on before, and reinstall from a clean lockfile:

```json
{
"dependencies": {
"@wharfkit/antelope": "^4.0.0",
"@wharfkit/session": "^4.0.0",
"@wharfkit/wallet-plugin-anchor": "^4.0.0",
"@wharfkit/web-renderer": "^4.0.0"
"@wharfkit/antelope": "^4.0.1",
"@wharfkit/session": "^4.0.1",
"@wharfkit/wallet-plugin-anchor": "^4.0.1",
"@wharfkit/web-renderer": "^4.0.1"
}
}
```
Expand All @@ -32,12 +32,13 @@ Packages in the release depend on each other by exact version, and none declares

Every package requires Node.js 20.19.0 or later, and both of its bundles are compiled to ES2020. webpack 4 and browsers released before March 2020 cannot parse that level; to support them, transpile `@wharfkit` packages in your build. Projects that must stay on an older Node.js version can stay on `@wharfkit/antelope@1`.

After reinstalling, confirm that your project resolves one copy of antelope with `npm ls @wharfkit/antelope` (or `yarn why`, `pnpm why`). The expected result is one entry at `4.0.0`. `@wharfkit/apiclient-leap`, `-telos` and `-wax` are outside the release and depend on an older antelope, so a project using one of them resolves a second copy.
After reinstalling, confirm that your project resolves one copy of antelope with `npm ls @wharfkit/antelope` (or `yarn why`, `pnpm why`). The expected result is one entry at `4.0.1`. `@wharfkit/apiclient-leap`, `-telos` and `-wax` are outside the release and depend on an older antelope, so a project using one of them resolves a second copy.

### Changes to check in your code

- **K1 signatures differ byte for byte** from the ones 1.x produced for the same key and message. They are valid and canonical, and older signatures still verify. Re-record any test that asserts a literal signature string.
- **`PrivateKey.sharedSecret()` returns the full 32 bytes** of the shared x-coordinate, where 1.x stripped leading zero bytes. About one key pair in 256 derives a different secret. For those sessions, Anchor desktop, Anchor Android, Web Authenticator and TackleBox cannot open a request from a 4.0.0 application, and the request expires or fails until the user logs in again. Anchor's option to sign manually or with another device still works in those sessions. Pass `{legacy: true}` to read data you encrypted with 1.x.
- **`PrivateKey.sharedSecret()` returns the full 32 bytes** of the shared x-coordinate, where 1.x stripped leading zero bytes. Pass `{legacy: true}` for the stripped form.
- **A binary extension field (`T$`) absent from the data is left out** of the object or `Struct` instance antelope decodes, matching nodeos, where 1.x set it to `null`. An empty optional field (`T?`) still decodes as `null`. Check any code that tests a decoded extension field for `null`.
- **`Float32.toString()` returns the shortest round-tripping string**, so `1.5` renders as `"1.5"` in place of `"1.5000000"`. Infinity, NaN and negative zero render as nodeos spells them.
- **`SessionKit.restore()` takes a `PartialSerializedSession`**, and the `RestoreArgs` type is removed. Only an explicit `import type {RestoreArgs}` needs editing.
- **`SessionKit.persistSession()` takes options** in place of a boolean: `persistSession(session, {setAsDefault: false})`.
Expand Down Expand Up @@ -91,6 +92,8 @@ Signing with Anchor on the same iOS device completes when Safari brings the user
- `@wharfkit/protocol-scatter` and the four wallet plugins built on it import cleanly under Node.js.
- `@wharfkit/account-creation-plugin-metamask` no longer brings a second copy of antelope.
- `@wharfkit/bundle` ships `@wharfkit/web-ui` in place of `@wharfkit/web-renderer`, adds `@wharfkit/token` and `@wharfkit/roborovski`, and its ES module build is one file that imports correctly.
- `@wharfkit/atomicassets` reads the AtomicMarket v2 royalty endpoints and the marketplace stats endpoint, reports the media-type descriptors on schema fields and the live collection fee on auctions, buyoffers and template buyoffers, and percent-encodes the path segments you pass it, contributed by [robrigo](https://github.com/robrigo).
- `@wharfkit/contract` sends a scope bound of zero to the chain.
- Every package is licensed under `BSD-3-Clause`. `@wharfkit/signing-request` was previously MIT.

### New packages
Expand Down
2 changes: 1 addition & 1 deletion src/lib/docs/SessionKit/Login.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Commonly used parameters that can be passed this way include:
- `permissionLevel`: A specific [PermissionLevel](/docs/antelope/permission-level) to login with, preventing any user account selection.
- `walletPlugin`: A specific [WalletPlugin](/docs/session-kit/plugin-wallet) to authenticate with, preventing any user wallet selection.

A complete list of all parameters can be found in the [LoginOptions](https://wharfkit.github.io/session/interfaces/LoginOptions.html) documentation.
A complete list of all parameters can be found in the [LoginOptions](https://wharfkit.github.io/js/session/interfaces/LoginOptions.html) documentation.

### Example Override

Expand Down
8 changes: 4 additions & 4 deletions src/lib/docs/SessionKit/Session.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const options = {
const session = new Session(args, options)
```

### [Arguments](https://wharfkit.github.io/session/interfaces/SessionArgs.html)
### [Arguments](https://wharfkit.github.io/js/session/interfaces/SessionArgs.html)

The first parameter passed to the `Session` is an object containing all the required configuration data.

Expand All @@ -48,7 +48,7 @@ The first parameter passed to the `Session` is an object containing all the requ
- `permission`: The name of an [Authority](/docs/antelope/authority) defined on the account that the session will use.
- `walletPlugin`: An instance of a [WalletPlugin](/docs/session-kit/plugin-wallet) that allows signing transactions for this session.

### [Options](https://wharfkit.github.io/session/interfaces/SessionOptions.html)
### [Options](https://wharfkit.github.io/js/session/interfaces/SessionOptions.html)

The second parameter is an optional object, with every individual property of the object also being optional. This parameter allows passing additional data to further customize the `Session`.

Expand All @@ -73,7 +73,7 @@ Once a `Session` instance is created, methods can be called to perform specific
- `transact`: The [Transact](/docs/session-kit/transact) method is the most commonly used method on a `Session` instance and is used to sign and broadcast a transaction.
- `serialize`: A method which converts the `Session` into a plain JSON object for storage purposes.

A complete list of all methods can be found in the [class definition](https://wharfkit.github.io/session/classes/Session.html#abiCache).
A complete list of all methods can be found in the [class definition](https://wharfkit.github.io/js/session/classes/Session.html#abicache).

### Properties

Expand All @@ -94,4 +94,4 @@ On any established instance of a `Session`, the following are common properties

### TypeDocs

- [Session Documentation](https://wharfkit.github.io/session/classes/Session.html)
- [Session Documentation](https://wharfkit.github.io/js/session/classes/Session.html)
8 changes: 4 additions & 4 deletions src/lib/docs/SessionKit/SessionKit.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The `SessionKit` class provided by the [Session Kit](/docs/session-kit) is respo

## Creation

When using the `SessionKit` within a web application, the developer will first establish an instance of the class with the required [SessionKitArgs](https://wharfkit.github.io/session/interfaces/SessionKitArgs.html).
When using the `SessionKit` within a web application, the developer will first establish an instance of the class with the required [SessionKitArgs](https://wharfkit.github.io/js/session/interfaces/SessionKitArgs.html).

A simple example for a web application using the [WebRenderer](/docs/session-kit/web-renderer) and [WalletPluginAnchor](https://github.com/wharfkit/wallet-plugin-anchor) would be as follows:

Expand Down Expand Up @@ -40,7 +40,7 @@ const options = {
const sessionKit = new SessionKit(args, options)
```

### [Arguments](https://wharfkit.github.io/session/interfaces/SessionKitArgs.html)
### [Arguments](https://wharfkit.github.io/js/session/interfaces/SessionKitArgs.html)

The first parameter passed to the `SessionKit` is an object containing all the required configuration options.

Expand All @@ -49,7 +49,7 @@ The first parameter passed to the `SessionKit` is an object containing all the r
- `ui`: An instance of a [UserInterface](/docs/session-kit/plugin-user-interface), like the [WebRenderer](/docs/session-kit/web-renderer).
- `walletPlugins`: An array containing at least one [WalletPlugin](/docs/session-kit/plugin-wallet).

### [Options](https://wharfkit.github.io/session/interfaces/SessionKitOptions.html)
### [Options](https://wharfkit.github.io/js/session/interfaces/SessionKitOptions.html)

The second parameter passed would be all of the optional arguments:

Expand Down Expand Up @@ -81,4 +81,4 @@ A number of methods are available on an instance of the `SessionKit`.

### TypeDocs

- [SessionKit Documentation](https://wharfkit.github.io/session/classes/SessionKit.html)
- [SessionKit Documentation](https://wharfkit.github.io/js/session/classes/SessionKit.html)
4 changes: 2 additions & 2 deletions src/lib/docs/SessionKit/Transact.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const result = await session.transact(arguments)

## Arguments

The `transact` call takes an instance of [TransactArgs](https://wharfkit.github.io/session/interfaces/TransactArgs.html), which requires an object that represents a transaction specified in one of four variants.
The `transact` call takes an instance of [TransactArgs](https://wharfkit.github.io/js/session/interfaces/TransactArgs.html), which requires an object that represents a transaction specified in one of four variants.

```ts
interface TransactArgs {
Expand Down Expand Up @@ -125,7 +125,7 @@ interface TransactOptions {

### ABIs

An array of [ABIs](/docs/antelope/abi) can be passed to a specific `transact` call using the [TransactABIDef](https://wharfkit.github.io/session/interfaces/TransactABIDef.html) format.
An array of [ABIs](/docs/antelope/abi) can be passed to a specific `transact` call using the [TransactABIDef](https://wharfkit.github.io/js/session/interfaces/TransactABIDef.html) format.

```ts
interface TransactABIDef {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/docs/SessionKit/TransactPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ type TransactHookMutable = (

The first parameter of a `TransactHookMutable` is the `request` value, which is an instance of a [SigningRequest](https://github.com/greymass/eosio-signing-request/tree/master/src) and represents the transaction at that point in the transaction lifecycle. The second parameter is the `context`, which is the TransactContext instance that was established to represent the state of the current transaction and provide methods to assist in interpreting the request.

The hook function must either return nothing, or return an object that matches the [TransactHookResponse](https://wharfkit.github.io/session/interfaces/TransactHookResponse.html) interface. This requires that it pass back a `request` value, which can either be modified or simply pass back the `request` value it received. This response may also optionally pass back an array of signatures, if the plugin itself was responsible for appending signatures to this upcoming transaction.
The hook function must either return nothing, or return an object that matches the [TransactHookResponse](https://wharfkit.github.io/js/session/interfaces/TransactHookResponse.html) interface. This requires that it pass back a `request` value, which can either be modified or simply pass back the `request` value it received. This response may also optionally pass back an array of signatures, if the plugin itself was responsible for appending signatures to this upcoming transaction.

An example of a mutable hook is as follows:

Expand Down
2 changes: 1 addition & 1 deletion src/lib/docs/SessionKit/TransactResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The results returned from the [APIClient](/docs/antelope/api-client) after succe

### revisions

An instance of [TransactRevisions](https://wharfkit.github.io/session/classes/TransactRevisions.html) which contains a history of modifications made to the transaction through the execution of the included [TransactPlugins](/docs/session-kit/plugin-transact).
An instance of [TransactRevisions](https://wharfkit.github.io/js/session/classes/TransactRevisions.html) which contains a history of modifications made to the transaction through the execution of the included [TransactPlugins](/docs/session-kit/plugin-transact).

### signatures

Expand Down
Loading
Loading