Skip to content

Commit 679d30c

Browse files
authored
v1.0.0 (#5)
* The `ui` option is now required for the SessionKit * Split SessionKit initialization to both "args" and "options" * Move `onSignComplete` to after all signing ops finish * Allow restoring without serialized session The restore method can now be used by just providing an actor, permission, and chainId - and will pull the session data out of the storage adapter to restore. * Track and allow restoring a default account per-chain Each individual chain now tracks a `default` value within its serialized storage, and the `restore()` function can now accept just a chain ID to restore the default account for that chain. * Reapplied 4faab91 * Version 1.0.0-beta1 * Moved all mock data to its own repository * Updating @wharfkit/mock-data and MOCK_DIR * Fixing ci-test * Updating @wharfkit/mock-data * Allow manually passing in ABIDef for use in Sessions * Version 1.0.0-beta2 * Version 1.0.0-beta3 * Renamed AbiProvider to ABICache since it's an extension of ESR * Better defined ABICacheInterface * Version 1.0.0-beta4 * Prevent uneeded get_info calls when resolving * Linting of tests * Adding tests for placeholder resolution * Adding test data for placeholder resolution * Unused test cleanup * Linting * Removing unused import * Version 1.0.0-beta5 * Replacing @greymass/eosio with @wharfkit/antelope * Version 1.0.0-beta6 * Cleanup of greymass/eosio continued * Version 1.0.0-beta7 * Fixed badge path * Removed internal ABICache and using @wharfkit/abicache * Updating contract kit and abicache to optimize ABI loading * Remove requirement of prefix on storage * Change `appName` from Name to a string Resolves #68 Still accept `NameType` as the parameter to maintain reverse compatibility with older versions and other app formats. * Migrated data to wharfkit/common * Adding test to ensure common chains can be passed * Updating wharfkit/common * Switching to `import type` for some @wharfkit/common elements * Added package description * Update README.md * Updated @wharfkit/common * Version 1.0.0-beta8 * Updating ABICache and Contract Kit * Updating ESR library * Version 1.0.0-beta9 * Dependency cleanup * Updating private key plugin * Version 1.0.0
1 parent 13205e1 commit 679d30c

55 files changed

Lines changed: 3737 additions & 1367 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"root": true,
3-
"ignorePatterns": ["lib/*", "node_modules/**"],
3+
"ignorePatterns": ["lib/*", "tests/*", "node_modules/**"],
44
"extends": [
55
"eslint:recommended",
66
"plugin:@typescript-eslint/eslint-recommended",

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ lib: ${SRC_FILES} package.json tsconfig.json node_modules rollup.config.js
1010

1111
.PHONY: test
1212
test: node_modules
13-
@TS_NODE_PROJECT='./test/tsconfig.json' \
13+
@TS_NODE_PROJECT='./test/tsconfig.json' MOCK_DIR='./test/data' \
1414
${BIN}/mocha ${MOCHA_OPTS} ${TEST_FILES} --no-timeout --grep '$(grep)'
1515

1616
test/watch: node_modules
@@ -28,13 +28,13 @@ coverage: build/coverage
2828

2929
.PHONY: ci-test
3030
ci-test: node_modules
31-
@TS_NODE_PROJECT='./test/tsconfig.json' \
31+
@TS_NODE_PROJECT='./test/tsconfig.json' MOCK_DIR='./test/data' \
3232
${BIN}/nyc ${NYC_OPTS} --reporter=text \
3333
${BIN}/mocha ${MOCHA_OPTS} -R list ${TEST_FILES}
3434

3535
.PHONY: check
3636
check: node_modules
37-
@${BIN}/eslint src --ext .ts --max-warnings 0 --format unix && echo "Ok"
37+
@${BIN}/eslint src test --ext .ts --max-warnings 0 --format unix && echo "Ok"
3838

3939
.PHONY: format
4040
format: node_modules

README.md

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
11
# @wharfkit/session
22

3-
[![Unit Tests](https://github.com/wharfkit/session/actions/workflows/test.yml/badge.svg)](https://github.com/wharfkit/session/actions/workflows/test.yml?query=branch%3Amain)
3+
[![Unit Tests](https://github.com/wharfkit/session/actions/workflows/test.yml/badge.svg)](https://github.com/wharfkit/session/actions/workflows/test.yml?query=branch%3Amaster)
44

55
###### Session Kit - An Antelope blockchain session management toolkit
66

77
Authenticate and persist sessions using blockchain accounts within JavaScript and TypeScript applications. Each session can be used to interact with smart contracts using the authenticated account.
88

9-
## IN DEVELOPMENT
10-
11-
This library is in very early development and everything is subject to change.
12-
13-
The [`master`](https://github.com/wharfkit/session) branch will contain early release builds of the Session Kit and will be published under the `beta` tag on npm. The [`dev`](https://github.com/wharfkit/session/tree/dev) branch will be the staging area for the next release, and all pull requests should be made against [`dev`](https://github.com/wharfkit/session/tree/dev).
14-
15-
No releases have yet been published of any version. Refer to the WharfKit organization on npm for all releases:
16-
17-
https://www.npmjs.com/org/wharfkit
18-
199
## Installation
2010

21-
The `@wharfkit/session` package is distributed as a module on [npm](https://www.npmjs.com/package/PACKAGE).
11+
The `@wharfkit/session` package is distributed on [npm](https://www.npmjs.com/package/@wharfkit/session).
2212

2313
```
2414
yarn add @wharfkit/session
@@ -28,9 +18,7 @@ npm install --save @wharfkit/session
2818

2919
## Usage
3020

31-
TODO
32-
33-
See [unit tests](https://github.com/wharfkit/session/tree/main/test) for usage examples during early development.
21+
Please refer to the documentation on [wharfkit.com](https://dev.wharfkit-website.pages.dev/docs).
3422

3523
## Autodocs
3624

@@ -41,18 +29,18 @@ See [unit tests](https://github.com/wharfkit/session/tree/main/test) for usage e
4129

4230
You need [Make](https://www.gnu.org/software/make/), [node.js](https://nodejs.org/en/) and [yarn](https://classic.yarnpkg.com/en/docs/install) installed.
4331

44-
**All development should be done based on the [dev](https://github.com/wharfkit/session/tree/dev) branch.**
32+
The [`master`](https://github.com/wharfkit/session) branch will contain production release builds of the Session Kit. The [`dev`](https://github.com/wharfkit/session/tree/dev) branch will be where all development is performed and act as the staging area for the next release. All pull requests should be made against [`dev`](https://github.com/wharfkit/session/tree/dev).
4533

46-
Clone the repository and run `make` to checkout all dependencies and build the project. The tests can be run using `make test` and can be continously tested during development with `make test/watch`.
34+
Clone the repository and run `make` to checkout all dependencies and build the project. The tests can be run using `make test` and can be continuously tested during development with `make test/watch`.
4735

4836
See the [Makefile](./Makefile) for other useful targets.
4937

5038
Before submitting a pull request make sure to run `make check` and `make format`.
5139

5240
## Dependencies
5341

54-
- [@greymass/eosio](https://github.com/greymass/eosio): Core library to provide Antelope data types.
55-
- [eosio-signing-request](https://github.com/greymass/eosio-signing-request): Antelope Signing Request Protocol.
42+
- [@wharfkit/antelope](https://github.com/wharfkit/antelope): Core library to provide Antelope data types.
43+
- [@wharfkit/signing-request](https://github.com/wharfkit/signing-request): Signing request protocol for Antelope blockchains.
5644
- [pako](https://github.com/nodeca/pako): zlib javascript port, used to compress signing requests.
5745

5846
---

package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@wharfkit/session",
3-
"description": "DESCRIPTION",
4-
"version": "0.5.1",
3+
"description": "Create account-based sessions, perform transactions, and allow users to login using Antelope-based blockchains.",
4+
"version": "1.0.0",
55
"homepage": "https://github.com/wharfkit/session",
66
"license": "BSD-3-Clause",
77
"main": "lib/session.js",
@@ -17,13 +17,15 @@
1717
"prepare": "make"
1818
},
1919
"dependencies": {
20-
"@greymass/eosio": "^0.6.10",
21-
"eosio-signing-request": "^2.5.3",
20+
"@wharfkit/abicache": "^1.1.1",
21+
"@wharfkit/antelope": "^0.7.3",
22+
"@wharfkit/common": "^1.1.0",
23+
"@wharfkit/signing-request": "^3.0.0",
2224
"pako": "^2.0.4",
2325
"tslib": "^2.1.0"
2426
},
2527
"resolutions": {
26-
"@greymass/eosio": "^0.6.10"
28+
"@wharfkit/antelope": "^0.7.3"
2729
},
2830
"devDependencies": {
2931
"@babel/preset-env": "^7.20.2",
@@ -40,7 +42,10 @@
4042
"@types/node": "^18.7.18",
4143
"@typescript-eslint/eslint-plugin": "^5.20.0",
4244
"@typescript-eslint/parser": "^5.20.0",
43-
"@wharfkit/wallet-plugin-privatekey": "^0.3.0-ui-13",
45+
"@wharfkit/contract": "^0.3.3",
46+
"@wharfkit/mock-data": "^1.0.1",
47+
"@wharfkit/transact-plugin-resource-provider": "^1.0.0-beta1",
48+
"@wharfkit/wallet-plugin-privatekey": "^1.0.0-beta1",
4449
"chai": "^4.3.4",
4550
"eslint": "^8.13.0",
4651
"eslint-config-prettier": "^8.1.0",
@@ -59,6 +64,6 @@
5964
"typedoc": "^0.23.14",
6065
"typedoc-plugin-mermaid": "^1.10.0",
6166
"typescript": "^4.1.2",
62-
"yarn-deduplicate": "^6.0.1"
67+
"yarn-deduplicate": "^6.0.2"
6368
}
6469
}

src/abi.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/index-module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
export * from './abi'
21
export * from './kit'
32
export * from './login'
43
export * from './session'
54
export * from './storage'
65
export * from './transact'
7-
export * from './types'
86
export * from './ui'
97
export * from './utils'
108
export * from './wallet'

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ import {SessionKit} from './index-module'
66
export default SessionKit
77

88
// expose dependencies
9-
export * from 'eosio-signing-request'
10-
export * from '@greymass/eosio'
9+
export * from '@wharfkit/antelope'
10+
export * from '@wharfkit/abicache'
11+
export * from '@wharfkit/common'
12+
export * from '@wharfkit/signing-request'

0 commit comments

Comments
 (0)