From 926ecdc059fa6716eef33cf1d21c1546ef6c2ce8 Mon Sep 17 00:00:00 2001 From: aaroncox Date: Wed, 2 Sep 2026 13:38:20 -0700 Subject: [PATCH 1/4] Port the session 1.7.x line --- packages/session/src/encoded.ts | 36 +++ packages/session/src/index-module.ts | 1 + packages/session/src/kit.ts | 385 ++++++++++++++++--------- packages/session/src/session.ts | 54 +++- packages/session/test/tests/kit.ts | 312 +++++++++++++++++++- packages/session/test/tests/session.ts | 92 +++++- 6 files changed, 730 insertions(+), 150 deletions(-) create mode 100644 packages/session/src/encoded.ts diff --git a/packages/session/src/encoded.ts b/packages/session/src/encoded.ts new file mode 100644 index 00000000..5fc722a1 --- /dev/null +++ b/packages/session/src/encoded.ts @@ -0,0 +1,36 @@ +import {Checksum256, Name, Struct} from '@wharfkit/antelope' +import {SerializedSession, Session, SessionType} from './session' + +/** + * A serialized session encoded as an Antelope struct, for transport through a + * URL parameter or a message payload. + */ +@Struct.type('url_encoded_session') +export class URLEncodedSession extends Struct { + @Struct.field(Checksum256) declare chain: Checksum256 + @Struct.field(Name) declare actor: Name + @Struct.field(Name) declare permission: Name + @Struct.field('string') declare walletPlugin: string + @Struct.field('string', {optional: true}) declare data?: string + + static fromSession(data: SessionType): URLEncodedSession { + const session = data instanceof Session ? data.serialize() : data + return new URLEncodedSession({ + chain: session.chain, + actor: session.actor, + permission: session.permission, + walletPlugin: JSON.stringify(session.walletPlugin), + data: JSON.stringify(session.data), + }) + } + + get serialized(): SerializedSession { + return { + chain: this.chain, + actor: this.actor, + permission: this.permission, + walletPlugin: JSON.parse(this.walletPlugin), + data: this.data ? JSON.parse(this.data) : undefined, + } + } +} diff --git a/packages/session/src/index-module.ts b/packages/session/src/index-module.ts index e256cfb0..1767b85a 100644 --- a/packages/session/src/index-module.ts +++ b/packages/session/src/index-module.ts @@ -1,3 +1,4 @@ +export * from './encoded' export * from './kit' export * from './login' export * from './session' diff --git a/packages/session/src/kit.ts b/packages/session/src/kit.ts index 84d263ef..8d488a8c 100644 --- a/packages/session/src/kit.ts +++ b/packages/session/src/kit.ts @@ -1,11 +1,14 @@ import {ChainDefinition, type ChainDefinitionType, type Fetch} from '@wharfkit/common' import type {Contract} from '@wharfkit/contract' import { + Bytes, Checksum256, Checksum256Type, + Name, NameType, PermissionLevel, PermissionLevelType, + Serializer, } from '@wharfkit/antelope' import { @@ -15,7 +18,7 @@ import { LoginPlugin, UserInterfaceWalletPlugin, } from './login' -import {SerializedSession, Session} from './session' +import {PartialSerializedSession, SerializedSession, Session, SessionType} from './session' import {BrowserLocalStorage, SessionStorage} from './storage' import { AbstractTransactPlugin, @@ -37,11 +40,13 @@ import { import {SessionKeyManager} from './sessionkey/manager' import {SessionKeyWalletPlugin} from './sessionkey/wallet' import {SessionKeyConfig} from './sessionkey/types' +import {URLEncodedSession} from './encoded' export interface LoginOptions { arbitrary?: Record // Arbitrary data that will be passed via context to wallet plugin chain?: ChainDefinition | Checksum256Type chains?: Checksum256Type[] + equalityFn?: SerializedSessionEqualityFn loginPlugins?: LoginPlugin[] setAsDefault?: boolean transactPlugins?: TransactPlugin[] @@ -62,12 +67,19 @@ export interface LogoutContext { ui?: UserInterface } -export interface RestoreArgs { - chain: Checksum256Type | ChainDefinition - actor?: NameType - permission?: NameType - walletPlugin?: Record - data?: Record +export interface LogoutOptions { + equalityFn?: SerializedSessionEqualityFn +} + +/** + * A predicate deciding whether two sessions refer to the same thing, used to + * deduplicate sessions in storage and to select which session a logout removes. + */ +export type SerializedSessionEqualityFn = (a: SessionType, b: SessionType) => boolean + +export interface PersistOptions { + setAsDefault?: boolean + equalityFn?: SerializedSessionEqualityFn } export interface SessionKitArgs { @@ -79,8 +91,11 @@ export interface SessionKitArgs { export interface SessionKitOptions { abis?: TransactABIDef[] + acceptUrlSession?: boolean + acceptUrlSessionParam?: string allowModify?: boolean contracts?: Contract[] + equalityFn?: SerializedSessionEqualityFn expireSeconds?: number fetch?: Fetch loginPlugins?: LoginPlugin[] @@ -98,8 +113,11 @@ export interface SessionKitOptions { */ export class SessionKit { readonly abis: TransactABIDef[] = [] + readonly acceptUrlSession: boolean = false + readonly acceptUrlSessionParam: string = 'incomingWharfSession' readonly allowModify: boolean = true readonly appName: string + readonly equalityFn: SerializedSessionEqualityFn = serializedSessionEquals readonly awaitIrreversible: boolean = false readonly broadcastOptions?: BroadcastOptions readonly expireSeconds: number = 120 @@ -133,6 +151,15 @@ export class SessionKit { if (options.abis) { this.abis = [...options.abis] } + if (options.acceptUrlSession) { + this.acceptUrlSession = options.acceptUrlSession + } + if (options.acceptUrlSessionParam) { + this.acceptUrlSessionParam = options.acceptUrlSessionParam + } + if (options.equalityFn) { + this.equalityFn = options.equalityFn + } // Extract any ABIs from the Contract instances provided if (options.contracts) { this.abis.push(...options.contracts.map((c) => ({account: c.account, abi: c.abi}))) @@ -250,6 +277,14 @@ export class SessionKit { return registered.clone ? registered.clone() : registered } + private walletPluginFor(serializedSession: SerializedSession): WalletPlugin | undefined { + const walletPlugin = this.cloneWalletPlugin(serializedSession.walletPlugin.id) + if (walletPlugin && serializedSession.walletPlugin.data) { + walletPlugin.data = serializedSession.walletPlugin.data + } + return walletPlugin + } + /** * Request account creation. */ @@ -544,7 +579,10 @@ export class SessionKit { for (const hook of context.hooks.afterLogin) await hook(context) // Save the session to storage if it has a storage instance. - this.persistSession(session, options?.setAsDefault) + this.persistSession(session, { + setAsDefault: options?.setAsDefault, + equalityFn: options?.equalityFn, + }) // Notify the UI that the login request has completed. await context.ui.onLoginComplete() @@ -561,7 +599,7 @@ export class SessionKit { } } - logoutParams(session: Session | SerializedSession, walletPlugin: WalletPlugin): LogoutContext { + logoutParams(session: SessionType, walletPlugin: WalletPlugin): LogoutContext { if (session instanceof Session) { return { session, @@ -584,20 +622,13 @@ export class SessionKit { } } - async logout(session?: Session | SerializedSession) { + async logout(session?: SessionType, options: LogoutOptions = {}) { if (!this.storage) { throw new Error('An instance of Storage must be provided to utilize the logout method.') } if (session) { - let walletPlugin: WalletPlugin | undefined - if (session instanceof Session) { - walletPlugin = session.walletPlugin - } else { - walletPlugin = this.cloneWalletPlugin(session.walletPlugin.id) - if (walletPlugin && session.walletPlugin.data) { - walletPlugin.data = session.walletPlugin.data - } - } + const walletPlugin = + session instanceof Session ? session.walletPlugin : this.walletPluginFor(session) if (walletPlugin?.logout) { await walletPlugin.logout(this.logoutParams(session, walletPlugin)) @@ -607,7 +638,8 @@ export class SessionKit { const sessions = await this.getSessions() if (sessions) { - const other = sessions.filter((s) => !Session.matches(s, session)) + const equalityFn = options.equalityFn || this.equalityFn + const other = sessions.filter((s) => !equalityFn(s, session)) await this.storage.write('sessions', JSON.stringify(other)) } } else { @@ -616,10 +648,7 @@ export class SessionKit { if (sessions) { await Promise.allSettled( sessions.map((s) => { - const walletPlugin = this.cloneWalletPlugin(s.walletPlugin.id) - if (walletPlugin && s.walletPlugin.data) { - walletPlugin.data = s.walletPlugin.data - } + const walletPlugin = this.walletPluginFor(s) return walletPlugin?.logout ? walletPlugin.logout(this.logoutParams(s, walletPlugin)) : Promise.resolve() @@ -632,74 +661,104 @@ export class SessionKit { } } - async restore(args?: RestoreArgs, options?: LoginOptions): Promise { - // If no args were provided, attempt to default restore the session from storage. - if (!args) { - const data = await this.storage.read('session') - if (data) { - args = JSON.parse(data) - } else { - return - } + /** + * Read a session handed over through the current URL, if one is present. + * + * Requires `acceptUrlSession` and a browser environment. The parameter is + * stripped from the URL once read, so a reload cannot replay it. + */ + restoreFromURL(): SerializedSession | undefined { + if (typeof window === 'undefined') { + return } - - if (!args) { - throw new Error('Either a RestoreArgs object or a Storage instance must be provided.') + const url = new URL(window.location.href) + const urlSessionParam = url.searchParams.get(this.acceptUrlSessionParam) + if (urlSessionParam) { + // Remove the session from the URL to prevent reuse, decodable or not + url.searchParams.delete(this.acceptUrlSessionParam) + window.history.replaceState(null, '', url) + try { + const encodedSession = Serializer.decode({ + data: Bytes.from(urlSessionParam, 'hex'), + type: URLEncodedSession, + }) + return encodedSession.serialized + } catch { + // eslint-disable-next-line no-console -- warn the developer since this may be unintentional + console.warn('Failed to decode session from URL: ' + urlSessionParam) + } } + } - const chainId = Checksum256.from( - args.chain instanceof ChainDefinition ? args.chain.id : args.chain + private canRestore(serializedSession: SerializedSession): boolean { + return ( + !!this.getWalletPlugin(serializedSession.walletPlugin.id) && + this.chains.some((c) => c.id.equals(serializedSession.chain)) ) + } - let serializedSession: SerializedSession - - // Retrieve all sessions from storage - const data = await this.storage.read('sessions') - - if (data) { - // If sessions exist, restore the session that matches the provided args - const sessions = JSON.parse(data) - if (args.actor && args.permission) { - // If all args are provided, return exact match - serializedSession = sessions.find((s: SerializedSession) => { - return ( - args && - chainId.equals(s.chain) && - s.actor === args.actor && - s.permission === args.permission - ) - }) - } else { - // If no actor/permission defined, return based on chain - serializedSession = sessions.find((s: SerializedSession) => { - return args && chainId.equals(s.chain) && s.default - }) + /** + * Find the session to restore when the caller named none: the incoming URL + * session if one is offered, otherwise the default session in storage. + */ + private async restoreWithoutArgs(): Promise { + let serializedSession: SerializedSession | undefined + + if (this.acceptUrlSession) { + const fromURL = this.restoreFromURL() + if (fromURL && this.canRestore(fromURL)) { + serializedSession = fromURL + } else if (fromURL) { + // eslint-disable-next-line no-console -- warn the developer since this may be unintentional + console.warn( + `Ignoring session from URL for chain ${fromURL.chain} and wallet plugin '${fromURL.walletPlugin.id}', which this SessionKit does not support.` + ) } - } else { - // If no sessions were found, but the args contains all the data for a serialized session, use args - if (args.actor && args.permission && args.walletPlugin) { - serializedSession = { - chain: String(chainId), - actor: args.actor, - permission: args.permission, - walletPlugin: { - id: args.walletPlugin.id, - data: args.walletPlugin.data, - }, - data: args.data, - } - } else { - // Otherwise throw an error since we can't establish the session data - throw new Error('No sessions found in storage. A wallet plugin must be provided.') + } + + if (!serializedSession) { + const data = await this.storage.read('session') + if (data) { + serializedSession = JSON.parse(data) } } - // If no session found, return + return serializedSession + } + + /** + * Find the session to restore from the arguments given: the arguments + * themselves when they fully specify a session, otherwise the default + * session in storage for the named chain. + */ + private async restoreWithArgs( + args: PartialSerializedSession + ): Promise { + const chainId = Checksum256.from( + args.chain instanceof ChainDefinition ? args.chain.id : args.chain + ) + let serializedSession = upgradePossibleSerializedSession({...args, chain: chainId}) if (!serializedSession) { - return + const sessions = await this.readAllSessions() + serializedSession = sessions.find((s) => + args.actor && args.permission + ? chainId.equals(s.chain) && + Name.from(s.actor).equals(args.actor) && + Name.from(s.permission).equals(args.permission) + : chainId.equals(s.chain) && s.default + ) } + return serializedSession + } - const walletPlugin = this.cloneWalletPlugin(serializedSession.walletPlugin.id) + /** + * Resolve the wallet plugin a serialized session names, loaded with that + * session's wallet data. + * + * @throws Error if no wallet plugin with that ID is registered + */ + private getWalletPluginFromSerialized(serializedSession: SerializedSession): WalletPlugin { + const walletPlugin = this.walletPluginFor(serializedSession) if (!walletPlugin) { throw new Error( @@ -707,17 +766,16 @@ export class SessionKit { ) } - // Set the wallet data from the serialized session - if (serializedSession.walletPlugin.data) { - walletPlugin.data = serializedSession.walletPlugin.data - } - - // If walletPlugin data was provided by args, override - if (args.walletPlugin && args.walletPlugin.data) { - walletPlugin.data = args.walletPlugin.data - } + return walletPlugin + } - // Create a new session from the provided args. + /** + * Build a live [[Session]] from serialized session data. + */ + private serializedToSession( + serializedSession: SerializedSession, + options: LoginOptions = {} + ): Session { const session = new Session( { chain: this.getChainDefinition(serializedSession.chain), @@ -725,7 +783,7 @@ export class SessionKit { actor: serializedSession.actor, permission: serializedSession.permission, }), - walletPlugin, + walletPlugin: this.getWalletPluginFromSerialized(serializedSession), }, this.getSessionOptions(options) ) @@ -734,28 +792,42 @@ export class SessionKit { session.data = serializedSession.data } - // Save the session to storage if it has a storage instance. - this.persistSession(session, options?.setAsDefault) - - // Return the session return session } + async restore( + args?: PartialSerializedSession, + options?: LoginOptions + ): Promise { + const serializedSession = args + ? await this.restoreWithArgs(args) + : await this.restoreWithoutArgs() + + if (serializedSession) { + const session = this.serializedToSession(serializedSession, options) + + this.persistSession(session, { + setAsDefault: options?.setAsDefault, + equalityFn: options?.equalityFn, + }) + + return session + } + } + async restoreAll(): Promise { const sessions: Session[] = [] const serializedSessions = await this.getSessions() - if (serializedSessions) { - for (const s of serializedSessions) { - const session = await this.restore(s) - if (session) { - sessions.push(session) - } + for (const serializedSession of serializedSessions) { + const session = await this.restore(serializedSession) + if (session) { + sessions.push(session) } } return sessions } - async persistSession(session: Session, setAsDefault = true) { + async persistSession(session: Session, options: PersistOptions = {}) { // TODO: Allow disabling of session persistence via kit options // If no storage exists, do nothing. @@ -767,63 +839,62 @@ export class SessionKit { const serialized = session.serialize() // Specify whether or not this is now the default for the given chain - serialized.default = setAsDefault + serialized.default = options.setAsDefault ?? true - // Set this as the current session for all chains - if (setAsDefault) { + const equalityFn = options.equalityFn || this.equalityFn + + if (serialized.default) { this.storage.write('session', JSON.stringify(serialized)) } // Add the current session to the list of sessions, preventing duplication. const existing = await this.storage.read('sessions') - if (existing) { - const stored = JSON.parse(existing) - const sessions: SerializedSession[] = stored - .filter((s: SerializedSession) => !Session.matches(s, serialized)) - .map((s: SerializedSession): SerializedSession => { - if (session.chain.id.equals(s.chain)) { + const stored: SerializedSession[] = existing ? JSON.parse(existing) : [] + const orderedSessions = [ + ...stored + .filter((s) => !equalityFn(s, serialized)) + .map((s): SerializedSession => { + if (serialized.default && session.chain.id.equals(s.chain)) { s.default = false } return s - }) - - // Merge arrays - const orderedSessions = [...sessions, serialized] - - // Sort sessions by chain, actor, and permission - orderedSessions.sort((a: SerializedSession, b: SerializedSession) => { - const chain = String(a.chain).localeCompare(String(b.chain)) - const actor = String(a.actor).localeCompare(String(b.actor)) - const permission = String(a.permission).localeCompare(String(b.permission)) - return chain || actor || permission - }) - - this.storage.write('sessions', JSON.stringify(orderedSessions)) - } else { - this.storage.write('sessions', JSON.stringify([serialized])) - } + }), + serialized, + ] + + // Sort sessions by chain, actor, and permission + orderedSessions.sort((a: SerializedSession, b: SerializedSession) => { + const chain = String(a.chain).localeCompare(String(b.chain)) + const actor = String(a.actor).localeCompare(String(b.actor)) + const permission = String(a.permission).localeCompare(String(b.permission)) + return chain || actor || permission + }) + + this.storage.write('sessions', JSON.stringify(orderedSessions)) } - async getSessions(): Promise { + /** + * Read every session held in storage, including those whose wallet plugin is + * not registered with this kit. + */ + private async readAllSessions(): Promise { if (!this.storage) { throw new Error('No storage instance is available to retrieve sessions from.') } const data = await this.storage.read('sessions') if (!data) return [] try { - const parsed = JSON.parse(data) - // Only return sessions that have a wallet plugin that is currently registered. - const filtered = parsed.filter((s: SerializedSession) => - this.walletPlugins.some((p) => { - return p.id === s.walletPlugin.id - }) - ) - return filtered + return JSON.parse(data) } catch (e) { throw new Error(`Failed to parse sessions from storage (${e})`) } } + async getSessions(): Promise { + // Only return sessions that have a wallet plugin that is currently registered. + return getSessionsMatchingWalletPlugins(await this.readAllSessions(), this.walletPlugins) + } + getSessionOptions(options?: LoginOptions) { return { abis: this.abis, @@ -842,3 +913,43 @@ export class SessionKit { } } } + +/** + * Filter a list of serialized sessions down to those whose wallet plugin is registered. + */ +export function getSessionsMatchingWalletPlugins( + sessions: SerializedSession[], + walletPlugins: WalletPlugin[] +) { + return sessions.filter((s) => walletPlugins.some((p) => p.id === s.walletPlugin.id)) +} + +/** + * Promote a partially specified session to a full one, when it carries every required field. + */ +export function upgradePossibleSerializedSession( + possible: PartialSerializedSession | undefined +): SerializedSession | undefined { + if ( + possible && + possible.actor !== undefined && + possible.chain !== undefined && + possible.permission !== undefined && + possible.walletPlugin !== undefined + ) { + return { + actor: possible.actor, + chain: possible.chain instanceof ChainDefinition ? possible.chain.id : possible.chain, + permission: possible.permission, + walletPlugin: possible.walletPlugin, + data: possible.data, + } + } +} + +/** + * The default [[SerializedSessionEqualityFn]], matching on chain, actor and permission. + */ +export function serializedSessionEquals(a: SessionType, b: SessionType): boolean { + return Session.matches(a, b) +} diff --git a/packages/session/src/session.ts b/packages/session/src/session.ts index 0152bfbb..3e3d4014 100644 --- a/packages/session/src/session.ts +++ b/packages/session/src/session.ts @@ -43,6 +43,7 @@ import { TransactRevisions, } from './transact' import {SessionStorage} from './storage' +import {URLEncodedSession} from './encoded' import { actionMatchesPermission, buildSendTransaction2Options, @@ -68,6 +69,7 @@ import { export interface SessionArgs { actor?: NameType chain: ChainDefinitionType + data?: Record permission?: NameType permissionLevel?: PermissionLevelType | string walletPlugin: WalletPlugin @@ -104,6 +106,22 @@ export interface SerializedSession { data?: Record } +export type SessionType = Session | SerializedSession + +/** + * A partially specified session, as accepted by [[SessionKit.restore]]. A value + * carrying every required field is used directly; anything less is treated as a + * lookup against the sessions held in storage. + */ +export interface PartialSerializedSession extends Partial> { + chain: Checksum256Type | ChainDefinition +} + +/** + * The encodings [[Session.encode]] can return. + */ +export type SessionEncodingTypes = 'encoded' | 'json' | 'serialized' | 'url' + /** * A representation of a session to interact with a specific blockchain account. */ @@ -142,7 +160,7 @@ export class Session { * @param s2 Session or SerializedSession * @returns boolean indicating if the sessions match */ - static matches(s1: SerializedSession | Session, s2: SerializedSession | Session): boolean { + static matches(s1: SessionType, s2: SessionType): boolean { const ser1 = s1 instanceof Session ? s1.serialize() : s1 const ser2 = s2 instanceof Session ? s2.serialize() : s2 @@ -190,6 +208,10 @@ export class Session { // Set the WalletPlugin for this session this._walletPlugin = args.walletPlugin + if (args.data) { + this._data = args.data + } + // Handle all the optional values provided if (options.appName) { this.appName = String(options.appName) @@ -996,6 +1018,36 @@ export class Session { await this.onPersist(this) } } + + /** + * Encode this session for storage or transport. + * + * @param encoding The representation to return, defaulting to `serialized` + */ + encode(): SerializedSession + encode(encoding: 'encoded'): URLEncodedSession + encode(encoding: 'json'): string + encode(encoding: 'serialized'): SerializedSession + encode(encoding: 'url'): string + encode( + encoding: SessionEncodingTypes = 'serialized' + ): string | SerializedSession | URLEncodedSession { + const serialized = this.serialize() + switch (encoding) { + case 'encoded': + return URLEncodedSession.fromSession(serialized) + case 'json': + return JSON.stringify(serialized) + case 'serialized': + return serialized + case 'url': + return Serializer.encode({ + object: URLEncodedSession.fromSession(serialized), + }).toString('hex') + default: + throw new Error(`Unsupported encoding: ${encoding}`) + } + } } async function processReturnValues( diff --git a/packages/session/test/tests/kit.ts b/packages/session/test/tests/kit.ts index 30cc54e0..cd101fde 100644 --- a/packages/session/test/tests/kit.ts +++ b/packages/session/test/tests/kit.ts @@ -1,5 +1,11 @@ import {assert} from 'chai' -import {Checksum256, PermissionLevel, TimePointSec} from '@wharfkit/antelope' +import { + Checksum256, + Checksum256Type, + PermissionLevel, + Serializer, + TimePointSec, +} from '@wharfkit/antelope' import {WalletPluginPrivateKey} from '@wharfkit/wallet-plugin-privatekey' import { @@ -9,12 +15,15 @@ import { ExplorerDefinition, Logo, Session, + SessionArgs, SessionKit, + SessionType, + URLEncodedSession, UserInterfaceAccountCreationResponse, UserInterfaceLoginResponse, } from '$lib' -import {makeWallet, MockWalletPluginConfigs} from '@wharfkit/mock-data' +import {makeWallet, mockSessionOptions, MockWalletPluginConfigs} from '@wharfkit/mock-data' import {MockTransactPlugin} from '@wharfkit/mock-data' import {makeMockAction} from '@wharfkit/mock-data' import { @@ -34,6 +43,19 @@ const defaultLoginOptions = { permissionLevel: mockPermissionLevel, } +function makeSession(actor: string, overrides: Partial = {}) { + return new Session( + { + actor, + permission: 'test', + chain: mockChainDefinition, + walletPlugin: makeWallet(), + ...overrides, + }, + mockSessionOptions + ) +} + function assertSessionMatchesMockSession(session: Session) { assert.instanceOf(session, Session) assert.equal(session.appName, mockSessionKitArgs.appName) @@ -389,13 +411,26 @@ suite('kit', function () { assert.lengthOf(sessionsAfterLogout, 0) }) test('session param', async function () { - const {session} = await sessionKit.login() - assertSessionMatchesMockSession(session) + const session1 = makeSession('session1') + await sessionKit.persistSession(session1) + + const session2 = makeSession('session2') + await sessionKit.persistSession(session2) + + const session3 = makeSession('session3', {chain: Chains.EOS}) + await sessionKit.persistSession(session3) + const sessionsBeforeLogout = await sessionKit.getSessions() - assert.lengthOf(sessionsBeforeLogout, 1) - await sessionKit.logout(session) + assert.lengthOf(sessionsBeforeLogout, 3) + assert.equal(sessionsBeforeLogout[0].actor, session1.actor) + assert.equal(sessionsBeforeLogout[1].actor, session2.actor) + assert.equal(sessionsBeforeLogout[2].actor, session3.actor) + + await sessionKit.logout(session2) const sessionsAfterLogout = await sessionKit.getSessions() - assert.lengthOf(sessionsAfterLogout, 0) + assert.lengthOf(sessionsAfterLogout, 2) + assert.equal(sessionsAfterLogout[0].actor, session1.actor) + assert.equal(sessionsAfterLogout[1].actor, session3.actor) }) test('serialized session param', async function () { const {session} = await sessionKit.login() @@ -406,8 +441,6 @@ suite('kit', function () { const sessionsAfterLogout = await sessionKit.getSessions() assert.lengthOf(sessionsAfterLogout, 0) }) - }) - suite('restore', function () { test('session', async function () { const {session} = await sessionKit.login() const mockSerializedSession = session.serialize() @@ -424,7 +457,7 @@ suite('kit', function () { }) const {session} = await sessionKit.login() session.data.customField = 'data value' - sessionKit.persistSession(session) + await sessionKit.persistSession(session) const restored = await sessionKit.restore() if (!restored) { throw new Error('Failed to restore session') @@ -529,6 +562,151 @@ suite('kit', function () { assert.isTrue(restoredJUNGLE.chain.id.equals(Chains.Jungle4.id)) } }) + test('session from URL', async function () { + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + acceptUrlSession: true, + storage: new MockStorage(), + }) + + // Mock window object for Node.js environment + if (typeof globalThis.window === 'undefined') { + ;(globalThis as any).window = {} + } + + // Mock window.history for Node.js environment + if (typeof (globalThis as any).window.history === 'undefined') { + ;(globalThis as any).window.history = { + // eslint-disable-next-line @typescript-eslint/no-empty-function + replaceState: () => {}, + } + } + + // Mock window.location with a writable href property + if (typeof (globalThis as any).window.location === 'undefined') { + ;(globalThis as any).window.location = {href: ''} + } else { + try { + ;(globalThis as any).window.location.href = + (globalThis as any).window.location.href || '' + } catch { + ;(globalThis as any).window.location = {href: ''} + } + } + + // Ensure no sessions + const sessions = await sessionKit.restoreAll() + assert.lengthOf(sessions, 0) + + // Set the href to include an incomingWharfSession parameter + window.location.href = + 'https://somewhere.com?incomingWharfSession=73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d104208d9c1754de3000000000090b1ca737b226964223a2277616c6c65742d706c7567696e2d707269766174656b6579222c2264617461223a7b22707269766174654b6579223a225056545f4b315f32355850314c7431527438376879796d6f755369654262676e554541657253317951486939777148433255656b326d677a48227d7d010f7b226669656c64223a22666f6f227d' + + // Attempt to restore the session from the URL + const session = await sessionKit.restore() + if (!session) { + throw new Error('Failed to restore session from URL') + } + + // Ensure session is correct + assert.isDefined(session) + assert.isTrue(session.chain.id.equals(mockChainDefinition.id), 'Incorrect chain') + assert.isTrue(session.actor.equals('wharfkit1111'), 'Incorrect actor') + assert.isTrue(session.permission.equals('test'), 'Incorrect permission') + assert.isTrue( + session.walletPlugin instanceof WalletPluginPrivateKey, + 'Incorrect walletPlugin type' + ) + assert.equal(session.data.field, 'foo', 'Incorrect session data') + assert.equal(session.walletPlugin.id, 'wallet-plugin-privatekey') + assert.equal( + session.walletPlugin.data.privateKey, + 'PVT_K1_25XP1Lt1Rt87hyymouSieBbgnUEAerS1yQHi9wqHC2Uek2mgzH' + ) + + // Ensure session was persisted to storage + const sessionsAfter = await sessionKit.restoreAll() + assert.lengthOf(sessionsAfter, 1) + }) + test('session from URL this kit cannot restore', async function () { + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + acceptUrlSession: true, + storage: new MockStorage(), + }) + const stored = makeSession('session1') + await sessionKit.persistSession(stored) + + const existingWindow = (globalThis as any).window + ;(globalThis as any).window = { + history: {replaceState: () => undefined}, + location: {href: ''}, + } + const craft = (walletPluginId: string, chain: Checksum256Type) => + Serializer.encode({ + object: URLEncodedSession.from({ + chain, + actor: 'incoming1111', + permission: 'active', + walletPlugin: JSON.stringify({id: walletPluginId, data: {}}), + }), + }).toString('hex') + const unsupported = [ + craft('wallet-plugin-unregistered', mockChainDefinition.id), + craft( + 'wallet-plugin-privatekey', + '00000000000000000000000000000000000000000000000000000000deadbeef' + ), + ] + try { + for (const hex of unsupported) { + ;(globalThis as any).window.location.href = + `https://app.test?incomingWharfSession=${hex}` + // Falls back to the stored session rather than throwing + const restored = await sessionKit.restore() + assert.isTrue(restored?.actor.equals('session1')) + } + } finally { + ;(globalThis as any).window = existingWindow + } + }) + test('session from URL that fails to decode', async function () { + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + acceptUrlSession: true, + storage: new MockStorage(), + }) + const existingWindow = (globalThis as any).window + let replaced: string | undefined + ;(globalThis as any).window = { + history: { + replaceState: (_s: unknown, _t: unknown, url: URL) => { + replaced = String(url) + }, + }, + location: {href: 'https://app.test?incomingWharfSession=not-hex-at-all'}, + } + try { + assert.isUndefined(await sessionKit.restore()) + assert.equal(replaced, 'https://app.test/') + } finally { + ;(globalThis as any).window = existingWindow + } + }) + test('session from URL outside a browser', function () { + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + acceptUrlSession: true, + storage: new MockStorage(), + }) + const existing = (globalThis as any).window + delete (globalThis as any).window + try { + assert.isUndefined(sessionKit.restoreFromURL()) + } finally { + ;(globalThis as any).window = existing + } + }) test('no session returns undefined', async function () { const sessionKit = new SessionKit(mockSessionKitArgs, { ...mockSessionKitOptions, @@ -611,6 +789,120 @@ suite('kit', function () { assert.isTrue(sessions[2].actor.equals('mock3')) }) }) + suite('persistSession', function () { + test('persists session data', async function () { + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + storage: new MockStorage(), + }) + const {session} = await sessionKit.login() + const restored = await sessionKit.restore() + if (!restored) { + throw new Error('Failed to restore session') + } + assert.deepEqual(restored.serialize(), session.serialize()) + }) + test('prevent duplicates', async function () { + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + storage: new MockStorage(), + }) + const {session} = await sessionKit.login() + await sessionKit.persistSession(session) + await sessionKit.persistSession(session) + const sessions = await sessionKit.getSessions() + assert.lengthOf(sessions, 1) + }) + test('sets default on new session', async function () { + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + storage: new MockStorage(), + }) + const session1 = makeSession('session1') + await sessionKit.persistSession(session1) + const session2 = makeSession('session2') + await sessionKit.persistSession(session2) + const sessions = await sessionKit.getSessions() + assert.lengthOf(sessions, 2) + assert.equal(sessions[0].default, false) + assert.equal(sessions[1].default, true) + }) + test('prevent default on new session', async function () { + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + storage: new MockStorage(), + }) + const session1 = makeSession('session1') + await sessionKit.persistSession(session1) + const session2 = makeSession('session2') + await sessionKit.persistSession(session2, {setAsDefault: false}) + const sessions = await sessionKit.getSessions() + assert.lengthOf(sessions, 2) + assert.equal(sessions[0].default, true) + assert.equal(sessions[1].default, false) + }) + }) + suite('equalityFn', function () { + test('base equality check', async function () { + // The base equality uses a combination of chain, actor, and permission + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + storage: new MockStorage(), + }) + // Create two sessions for the same chain, actor, and permission but different appIds + const session1 = makeSession('session1', {data: {appId: 'app1'}}) + await sessionKit.persistSession(session1) + const session2 = makeSession('session1', {data: {appId: 'app2'}}) + await sessionKit.persistSession(session2) + const sessions = await sessionKit.getSessions() + // Base equality ignores data like appId, so the pair collapses to one + assert.lengthOf(sessions, 1) + // The second session should have overwritten the first + assert.equal(sessions[0].data?.appId, 'app2') + }) + test('custom equalityFn', async function () { + // This custom rule enforces custom uniqueness based on persisted appId + const equalityFn = (a: SessionType, b: SessionType) => { + const first = a instanceof Session ? a.serialize() : a + const second = b instanceof Session ? b.serialize() : b + return Session.matches(first, second) && first.data?.appId === second.data?.appId + } + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + equalityFn, // Initialize with custom equality function + storage: new MockStorage(), + }) + // Create two sessions for the same user with different appIds + const session1 = makeSession('session1', {data: {appId: 'app1'}}) + await sessionKit.persistSession(session1) + const session2 = makeSession('session1', {data: {appId: 'app2'}}) + await sessionKit.persistSession(session2) + const sessions = await sessionKit.getSessions() + // Ensure the uniqueness rule was applied and both sessions exist + assert.lengthOf(sessions, 2) + assert.equal(sessions[0].data?.appId, 'app1') + assert.equal(sessions[1].data?.appId, 'app2') + }) + test('disable equality', async function () { + // This custom rule disables uniqueness entirely + const equalityFn = () => false + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + equalityFn, // Initialize with custom equality function + storage: new MockStorage(), + }) + // Create two sessions for the same user with different appIds + const session1 = makeSession('session1', {data: {appId: 'app1'}}) + await sessionKit.persistSession(session1) + const session2 = makeSession('session1', {data: {appId: 'app2'}}) + await sessionKit.persistSession(session2) + const sessions = await sessionKit.getSessions() + // Ensure the uniqueness rule was applied and both sessions exist + assert.lengthOf(sessions, 2) + assert.equal(sessions[0].data?.appId, 'app1') + assert.equal(sessions[1].data?.appId, 'app2') + }) + }) suite('setEndpoint', function () { test('able to change api endpoint', async function () { // Start with a Session diff --git a/packages/session/test/tests/session.ts b/packages/session/test/tests/session.ts index f1d3815b..8c304d45 100644 --- a/packages/session/test/tests/session.ts +++ b/packages/session/test/tests/session.ts @@ -1,12 +1,20 @@ import {assert} from 'chai' -import SessionKit, {BaseTransactPlugin, ChainDefinition, Session, SessionOptions} from '$lib' +import SessionKit, { + BaseTransactPlugin, + ChainDefinition, + Session, + SessionOptions, + URLEncodedSession, +} from '$lib' import { ABI, ABIDef, + Bytes, FetchProvider, Name, PermissionLevel, + Serializer, Signature, TimePointSec, } from '@wharfkit/antelope' @@ -37,9 +45,18 @@ const mockTransactOptions = { suite('session', function () { let session: Session + let kit: SessionKit setup(function () { // Establish new session before each test - session = new Session(mockSessionArgs, mockSessionOptions) + session = new Session( + { + ...mockSessionArgs, + data: { + field: 'foo', + }, + }, + mockSessionOptions + ) }) nodejsUsage() suite('construct', function () { @@ -536,4 +553,75 @@ suite('session', function () { assert.equal(provider2.url, 'https://wax.greymass.com') }) }) + suite('encoded', function () { + setup(function () { + // Establish new session kit before each test + kit = new SessionKit( + { + appName: 'demo.app', + chains: [ + { + id: '73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d', + url: 'https://jungle4.greymass.com', + }, + ], + ui: new MockUserInterface(), + walletPlugins: [makeWallet()], + }, + { + fetch: mockFetch, // Required for unit tests + storage: new MockStorage(), + } + ) + }) + test('serialized', async function () { + const serialized = session.encode('serialized') + const fromSerialized = await kit.restore(serialized) + if (!fromSerialized) { + throw new Error('Failed to restore session from serialized') + } + assert.equal( + JSON.stringify(serialized), + JSON.stringify(fromSerialized.encode('serialized')) + ) + assert.deepEqual(serialized, fromSerialized.encode('serialized')) + }) + test('json', async function () { + const serialized = session.encode('serialized') + const json = session.encode('json') + const fromJson = await kit.restore(JSON.parse(json)) + if (!fromJson) { + throw new Error('Failed to restore session from json') + } + assert.equal(JSON.stringify(serialized), JSON.stringify(fromJson.encode('serialized'))) + assert.deepEqual(serialized, fromJson.encode('serialized')) + }) + test('encoded', async function () { + const serialized = session.encode('serialized') + const encoded = session.encode('encoded') + const fromEncoded = await kit.restore(encoded.serialized) + if (!fromEncoded) { + throw new Error('Failed to restore session from encoded') + } + assert.equal( + JSON.stringify(serialized), + JSON.stringify(fromEncoded.encode('serialized')) + ) + assert.deepEqual(serialized, fromEncoded.encode('serialized')) + }) + test('url', async function () { + const serialized = session.encode('serialized') + const url = session.encode('url') + const reconstructed = Serializer.decode({ + data: Bytes.from(url, 'hex'), + type: URLEncodedSession, + }) + const fromUrl = await kit.restore(reconstructed.serialized) + if (!fromUrl) { + throw new Error('Failed to restore session from url') + } + assert.equal(JSON.stringify(serialized), JSON.stringify(fromUrl.encode('serialized'))) + assert.deepEqual(serialized, fromUrl.encode('serialized')) + }) + }) }) From b126d25f8ba4b3d0a6b23d371a926a322a3ea881 Mon Sep 17 00:00:00 2001 From: aaroncox Date: Wed, 2 Sep 2026 13:42:50 -0700 Subject: [PATCH 2/4] Stop logout deleting sessions for unregistered wallet plugins --- packages/session/src/kit.ts | 5 +++-- packages/session/test/tests/kit.ts | 31 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/packages/session/src/kit.ts b/packages/session/src/kit.ts index 8d488a8c..d4cfff0a 100644 --- a/packages/session/src/kit.ts +++ b/packages/session/src/kit.ts @@ -636,8 +636,9 @@ export class SessionKit { await this.storage.remove('session') - const sessions = await this.getSessions() - if (sessions) { + // Every session, not getSessions(): its plugin filter would drop unregistered ones here + const sessions = await this.readAllSessions() + if (sessions.length) { const equalityFn = options.equalityFn || this.equalityFn const other = sessions.filter((s) => !equalityFn(s, session)) await this.storage.write('sessions', JSON.stringify(other)) diff --git a/packages/session/test/tests/kit.ts b/packages/session/test/tests/kit.ts index cd101fde..07a6e2d9 100644 --- a/packages/session/test/tests/kit.ts +++ b/packages/session/test/tests/kit.ts @@ -441,6 +441,37 @@ suite('kit', function () { const sessionsAfterLogout = await sessionKit.getSessions() assert.lengthOf(sessionsAfterLogout, 0) }) + test('retains sessions for unregistered wallet plugins', async function () { + const storage = new MockStorage() + const sessionKit = new SessionKit(mockSessionKitArgs, { + ...mockSessionKitOptions, + storage, + }) + const session = makeSession('session1') + await sessionKit.persistSession(session) + + // Add a session for a wallet plugin this kit does not register + const stored = JSON.parse(String(await storage.read('sessions'))) + stored.push({ + ...stored[0], + actor: 'session2', + walletPlugin: {id: 'wallet-plugin-unregistered', data: {retained: true}}, + default: false, + }) + await storage.write('sessions', JSON.stringify(stored)) + assert.lengthOf(await sessionKit.getSessions(), 1) + + await sessionKit.logout(session) + + const remaining = JSON.parse(String(await storage.read('sessions'))) + assert.lengthOf(remaining, 1) + assert.equal(remaining[0].actor, 'session2') + assert.equal(remaining[0].walletPlugin.id, 'wallet-plugin-unregistered') + assert.deepEqual(remaining[0].walletPlugin.data, {retained: true}) + assert.lengthOf(await sessionKit.getSessions(), 0) + }) + }) + suite('restore', function () { test('session', async function () { const {session} = await sessionKit.login() const mockSerializedSession = session.serialize() From 6317c5de526af93aca8738626b223748b7742e75 Mon Sep 17 00:00:00 2001 From: aaroncox Date: Wed, 2 Sep 2026 14:09:56 -0700 Subject: [PATCH 3/4] Run CI on pull requests and dispatch only --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49532ef3..ca064eb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,16 @@ name: CI on: - push: - branches: [master] pull_request: + workflow_dispatch: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: runs-on: ubuntu-latest From 9ce1af0959efd2f0ad16b5bbe4c3f92b5392aec8 Mon Sep 17 00:00:00 2001 From: aaroncox Date: Wed, 2 Sep 2026 14:33:25 -0700 Subject: [PATCH 4/4] Version 4.0.0-rc6 --- bun.lock | 98 +++++++++---------- package.json | 2 +- packages/abicache/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/account/package.json | 2 +- packages/actionstream/package.json | 2 +- packages/antelope/package.json | 2 +- packages/atomicassets/package.json | 2 +- packages/bundle/README.md | 14 +-- packages/bundle/package.json | 2 +- packages/cli/package.json | 2 +- packages/common/package.json | 2 +- packages/conformance/package.json | 2 +- packages/contract/package.json | 2 +- packages/hyperion/package.json | 2 +- packages/mock-data/package.json | 2 +- packages/msigs/package.json | 2 +- packages/protocol-esr/package.json | 2 +- packages/protocol-scatter/package.json | 2 +- packages/resources/package.json | 2 +- packages/roborovski/package.json | 2 +- packages/sealed-messages/package.json | 2 +- packages/session/package.json | 2 +- packages/signing-request/package.json | 2 +- packages/svelte-components/package.json | 2 +- packages/token/package.json | 2 +- .../transact-plugin-autocorrect/package.json | 2 +- .../transact-plugin-cosigner/package.json | 2 +- .../transact-plugin-explorerlink/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/transact-plugin-mock/package.json | 2 +- .../transact-plugin-msig-propose/package.json | 2 +- .../package.json | 2 +- packages/wallet-plugin-anchor/package.json | 2 +- packages/wallet-plugin-cleos/package.json | 2 +- .../wallet-plugin-cloudwallet/package.json | 2 +- .../wallet-plugin-gatewallet/package.json | 2 +- packages/wallet-plugin-imtoken/package.json | 2 +- packages/wallet-plugin-metamask/package.json | 2 +- packages/wallet-plugin-mimic/package.json | 2 +- packages/wallet-plugin-mock/package.json | 2 +- packages/wallet-plugin-paycash/package.json | 2 +- .../wallet-plugin-privatekey/package.json | 2 +- packages/wallet-plugin-scatter/package.json | 2 +- .../wallet-plugin-tokenpocket/package.json | 2 +- .../package.json | 2 +- packages/web-renderer/package.json | 2 +- packages/web-ui/package.json | 2 +- packages/webauthn/package.json | 2 +- 52 files changed, 106 insertions(+), 106 deletions(-) diff --git a/bun.lock b/bun.lock index 79d1b821..fd912709 100644 --- a/bun.lock +++ b/bun.lock @@ -32,7 +32,7 @@ }, "packages/abicache": { "name": "@wharfkit/abicache", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", "@wharfkit/signing-request": "workspace:*", @@ -44,7 +44,7 @@ }, "packages/account": { "name": "@wharfkit/account", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", "@wharfkit/common": "workspace:*", @@ -60,7 +60,7 @@ }, "packages/account-creation-plugin-anchor": { "name": "@wharfkit/account-creation-plugin-anchor", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -71,7 +71,7 @@ }, "packages/account-creation-plugin-jungle4": { "name": "@wharfkit/account-creation-plugin-jungle4", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -82,7 +82,7 @@ }, "packages/account-creation-plugin-metamask": { "name": "@wharfkit/account-creation-plugin-metamask", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@metamask/providers": "^17.0.0", "@wharfkit/session": "workspace:*", @@ -94,7 +94,7 @@ }, "packages/actionstream": { "name": "@wharfkit/actionstream", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", }, @@ -105,7 +105,7 @@ }, "packages/antelope": { "name": "@wharfkit/antelope", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@noble/curves": "^2.2.0", "@noble/hashes": "^2.2.0", @@ -115,7 +115,7 @@ }, "packages/atomicassets": { "name": "@wharfkit/atomicassets", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", "@wharfkit/common": "workspace:*", @@ -128,7 +128,7 @@ }, "packages/bundle": { "name": "@wharfkit/bundle", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "devDependencies": { "@wharfkit/account": "workspace:*", "@wharfkit/antelope": "workspace:*", @@ -154,7 +154,7 @@ }, "packages/cli": { "name": "@wharfkit/cli", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "bin": { "wharfkit": "./lib/cli.js", }, @@ -178,7 +178,7 @@ }, "packages/common": { "name": "@wharfkit/common", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", }, @@ -189,7 +189,7 @@ }, "packages/conformance": { "name": "@wharfkit/conformance", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "devDependencies": { "@greymass/vert": "^3.0.0", "@types/bun": "^1.0.4", @@ -200,7 +200,7 @@ }, "packages/contract": { "name": "@wharfkit/contract", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/abicache": "workspace:*", "@wharfkit/antelope": "workspace:*", @@ -214,7 +214,7 @@ }, "packages/hyperion": { "name": "@wharfkit/hyperion", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", }, @@ -224,7 +224,7 @@ }, "packages/mock-data": { "name": "@wharfkit/mock-data", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", "@wharfkit/session": "workspace:*", @@ -233,7 +233,7 @@ }, "packages/msigs": { "name": "@wharfkit/msigs", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", }, @@ -243,7 +243,7 @@ }, "packages/protocol-esr": { "name": "@wharfkit/protocol-esr", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@greymass/buoy": "catalog:", "@wharfkit/sealed-messages": "workspace:*", @@ -262,7 +262,7 @@ }, "packages/protocol-scatter": { "name": "@wharfkit/protocol-scatter", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", "eosjs": "20.0.0", @@ -276,7 +276,7 @@ }, "packages/resources": { "name": "@wharfkit/resources", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", "bn.js": "catalog:", @@ -288,7 +288,7 @@ }, "packages/roborovski": { "name": "@wharfkit/roborovski", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", }, @@ -298,7 +298,7 @@ }, "packages/sealed-messages": { "name": "@wharfkit/sealed-messages", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@greymass/miniaes": "^1.0.0", "@wharfkit/antelope": "workspace:*", @@ -309,7 +309,7 @@ }, "packages/session": { "name": "@wharfkit/session", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/abicache": "workspace:*", "@wharfkit/antelope": "workspace:*", @@ -326,14 +326,14 @@ }, "packages/signing-request": { "name": "@wharfkit/signing-request", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", }, }, "packages/svelte-components": { "name": "@wharfkit/svelte-components", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@lucide/svelte": "^0.516.0", "@melt-ui/svelte": "^0.86.6", @@ -380,7 +380,7 @@ }, "packages/token": { "name": "@wharfkit/token", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", "@wharfkit/contract": "workspace:*", @@ -391,7 +391,7 @@ }, "packages/transact-plugin-autocorrect": { "name": "@wharfkit/transact-plugin-autocorrect", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/resources": "workspace:*", "@wharfkit/session": "workspace:*", @@ -404,7 +404,7 @@ }, "packages/transact-plugin-cosigner": { "name": "@wharfkit/transact-plugin-cosigner", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -416,7 +416,7 @@ }, "packages/transact-plugin-explorerlink": { "name": "@wharfkit/transact-plugin-explorerlink", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -428,7 +428,7 @@ }, "packages/transact-plugin-finality-callback": { "name": "@wharfkit/transact-plugin-finality-callback", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -439,7 +439,7 @@ }, "packages/transact-plugin-finality-checker": { "name": "@wharfkit/transact-plugin-finality-checker", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -451,7 +451,7 @@ }, "packages/transact-plugin-mock": { "name": "@wharfkit/transact-plugin-mock", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -463,7 +463,7 @@ }, "packages/transact-plugin-msig-propose": { "name": "@wharfkit/transact-plugin-msig-propose", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -475,7 +475,7 @@ }, "packages/transact-plugin-resource-provider": { "name": "@wharfkit/transact-plugin-resource-provider", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/resources": "workspace:*", "@wharfkit/session": "workspace:*", @@ -490,7 +490,7 @@ }, "packages/wallet-plugin-anchor": { "name": "@wharfkit/wallet-plugin-anchor", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@greymass/buoy": "catalog:", "@wharfkit/antelope": "workspace:*", @@ -511,7 +511,7 @@ }, "packages/wallet-plugin-cleos": { "name": "@wharfkit/wallet-plugin-cleos", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -522,7 +522,7 @@ }, "packages/wallet-plugin-cloudwallet": { "name": "@wharfkit/wallet-plugin-cloudwallet", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -533,7 +533,7 @@ }, "packages/wallet-plugin-gatewallet": { "name": "@wharfkit/wallet-plugin-gatewallet", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/protocol-scatter": "workspace:*", "@wharfkit/session": "workspace:*", @@ -546,7 +546,7 @@ }, "packages/wallet-plugin-imtoken": { "name": "@wharfkit/wallet-plugin-imtoken", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/protocol-scatter": "workspace:*", "@wharfkit/session": "workspace:*", @@ -559,7 +559,7 @@ }, "packages/wallet-plugin-metamask": { "name": "@wharfkit/wallet-plugin-metamask", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@metamask/providers": "^17.0.0", "@wharfkit/session": "workspace:*", @@ -571,7 +571,7 @@ }, "packages/wallet-plugin-mimic": { "name": "@wharfkit/wallet-plugin-mimic", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -582,7 +582,7 @@ }, "packages/wallet-plugin-mock": { "name": "@wharfkit/wallet-plugin-mock", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -594,7 +594,7 @@ }, "packages/wallet-plugin-paycash": { "name": "@wharfkit/wallet-plugin-paycash", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/protocol-esr": "workspace:*", "@wharfkit/session": "workspace:*", @@ -606,7 +606,7 @@ }, "packages/wallet-plugin-privatekey": { "name": "@wharfkit/wallet-plugin-privatekey", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -618,7 +618,7 @@ }, "packages/wallet-plugin-scatter": { "name": "@wharfkit/wallet-plugin-scatter", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/protocol-scatter": "workspace:*", "@wharfkit/session": "workspace:*", @@ -630,7 +630,7 @@ }, "packages/wallet-plugin-tokenpocket": { "name": "@wharfkit/wallet-plugin-tokenpocket", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/protocol-scatter": "workspace:*", "@wharfkit/session": "workspace:*", @@ -642,7 +642,7 @@ }, "packages/wallet-plugin-web-authenticator": { "name": "@wharfkit/wallet-plugin-web-authenticator", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@greymass/buoy": "catalog:", "@wharfkit/antelope": "workspace:*", @@ -661,7 +661,7 @@ }, "packages/web-renderer": { "name": "@wharfkit/web-renderer", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/session": "workspace:*", }, @@ -712,7 +712,7 @@ }, "packages/web-ui": { "name": "@wharfkit/web-ui", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/common": "workspace:*", "@wharfkit/session": "workspace:*", @@ -744,7 +744,7 @@ }, "packages/webauthn": { "name": "@wharfkit/webauthn", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "dependencies": { "@wharfkit/antelope": "workspace:*", "cborg": "^4.5.8", diff --git a/package.json b/package.json index cd8d2385..dc77b4e3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "wharfkit-js", "private": true, - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "workspaces": { "packages": [ "packages/*" diff --git a/packages/abicache/package.json b/packages/abicache/package.json index b12d97b4..ec604ff9 100644 --- a/packages/abicache/package.json +++ b/packages/abicache/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/abicache", "description": "ABI Caching Mechanism for use in Session and Contract Kits", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/abicache", "license": "BSD-3-Clause", "engines": { diff --git a/packages/account-creation-plugin-anchor/package.json b/packages/account-creation-plugin-anchor/package.json index 07a752de..3fc8ffdc 100644 --- a/packages/account-creation-plugin-anchor/package.json +++ b/packages/account-creation-plugin-anchor/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/account-creation-plugin-anchor", "description": "An account creation plugin using the Greymass account creation service", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/account-creation-plugin-anchor", "license": "BSD-3-Clause", "engines": { diff --git a/packages/account-creation-plugin-jungle4/package.json b/packages/account-creation-plugin-jungle4/package.json index face7d7a..c70d0194 100644 --- a/packages/account-creation-plugin-jungle4/package.json +++ b/packages/account-creation-plugin-jungle4/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/account-creation-plugin-jungle4", "description": "Plugin to create a Jungle4 Testnet acccount.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/account-creation-plugin-jungle4", "license": "BSD-3-Clause", "engines": { diff --git a/packages/account-creation-plugin-metamask/package.json b/packages/account-creation-plugin-metamask/package.json index efc2061a..ab67a065 100644 --- a/packages/account-creation-plugin-metamask/package.json +++ b/packages/account-creation-plugin-metamask/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/account-creation-plugin-metamask", "description": "A MetaMask plugin to create EOS accounts using Metamask public keys.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-metamask", "license": "BSD-3-Clause", "engines": { diff --git a/packages/account/package.json b/packages/account/package.json index 9d0269d2..a5ebda49 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/account", "description": "Account kit for Wharf Kit", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/account", "license": "BSD-3-Clause", "engines": { diff --git a/packages/actionstream/package.json b/packages/actionstream/package.json index cae6d80e..7d52de5b 100644 --- a/packages/actionstream/package.json +++ b/packages/actionstream/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/actionstream", "description": "Client library for subscribing to Roborovski action streams", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/actionstream", "license": "BSD-3-Clause", "engines": { diff --git a/packages/antelope/package.json b/packages/antelope/package.json index b95d6860..63b99d9f 100644 --- a/packages/antelope/package.json +++ b/packages/antelope/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/antelope", "description": "Library for working with Antelope powered blockchains.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/antelope", "license": "BSD-3-Clause", "engines": { diff --git a/packages/atomicassets/package.json b/packages/atomicassets/package.json index 0d191955..3f9472cf 100644 --- a/packages/atomicassets/package.json +++ b/packages/atomicassets/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/atomicassets", "description": "AtomicAsset library for Wharf", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/atomicassets", "license": "BSD-3-Clause", "engines": { diff --git a/packages/bundle/README.md b/packages/bundle/README.md index b0ac0964..0e271ca2 100644 --- a/packages/bundle/README.md +++ b/packages/bundle/README.md @@ -5,7 +5,7 @@ A prepackaged bundle of common Wharf libraries, built as a self-contained IIFE ( ## Usage ```html - + ``` @@ -30,7 +30,7 @@ Both URLs above name an exact version and the full file path. jsDelivr serves th Use `https://cdn.jsdelivr.net/npm/@wharfkit/bundle@4/dist/wharf.bundle.js` if you want patch releases without editing the page. The trade is that the bytes are no longer the package's own and no longer eligible for Subresource Integrity. -To add an `integrity` attribute, take the hash for the exact version from `https://data.jsdelivr.com/v1/packages/npm/@wharfkit/bundle@4.0.0-rc5?structure=flat`, and pair it with `crossorigin="anonymous"`, which SRI requires. An `integrity` attribute on a ` ``` -Mixing versions across imports, or adding a package still on the `1.x` line, splits it again. esm.sh takes an explicit pin against that: `?deps=@wharfkit/antelope@4.0.0-rc5` on each top-level URL rewrites the antelope import to one concrete build and propagates into every transitive `@wharfkit/*` request, so it costs one query parameter per import rather than one entry per transitive package. jsDelivr's `+esm` route has no query-parameter equivalent, and its output carries jsDelivr's own warning against pairing it with Subresource Integrity. +Mixing versions across imports, or adding a package still on the `1.x` line, splits it again. esm.sh takes an explicit pin against that: `?deps=@wharfkit/antelope@4.0.0-rc6` on each top-level URL rewrites the antelope import to one concrete build and propagates into every transitive `@wharfkit/*` request, so it costs one query parameter per import rather than one entry per transitive package. jsDelivr's `+esm` route has no query-parameter equivalent, and its output carries jsDelivr's own warning against pairing it with Subresource Integrity. The bundle stays the recommended browser artifact. It is the only one that guarantees a single antelope without a resolver. ## Examples -`public/bundle.html` and `public/esm.html` are runnable examples of both forms, loading the built files next to them. `make` copies them into `dist/`, so open them from there after a build. The same pages ship in the package, at `https://cdn.jsdelivr.net/npm/@wharfkit/bundle@4.0.0-rc5/dist/bundle.html` and `.../dist/esm.html`. +`public/bundle.html` and `public/esm.html` are runnable examples of both forms, loading the built files next to them. `make` copies them into `dist/`, so open them from there after a build. The same pages ship in the package, at `https://cdn.jsdelivr.net/npm/@wharfkit/bundle@4.0.0-rc6/dist/bundle.html` and `.../dist/esm.html`. ## Types diff --git a/packages/bundle/package.json b/packages/bundle/package.json index 3f72ac5b..3bf607f8 100644 --- a/packages/bundle/package.json +++ b/packages/bundle/package.json @@ -1,6 +1,6 @@ { "name": "@wharfkit/bundle", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "description": "A prepackaged bundle of common Wharf libraries re-exported for IIFE or ESM", "license": "BSD-3-Clause", "type": "module", diff --git a/packages/cli/package.json b/packages/cli/package.json index 275d7470..69424a8e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@wharfkit/cli", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "license": "BSD-3-Clause", "homepage": "https://github.com/wharfkit/cli#readme", "description": "Command line utilities for Wharf", diff --git a/packages/common/package.json b/packages/common/package.json index 63a28cae..ab15cdce 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/common", "description": "Common data and functions shared across WharfKit packages", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/common", "license": "BSD-3-Clause", "engines": { diff --git a/packages/conformance/package.json b/packages/conformance/package.json index 570d89e2..52c95de2 100644 --- a/packages/conformance/package.json +++ b/packages/conformance/package.json @@ -1,6 +1,6 @@ { "name": "@wharfkit/conformance", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "type": "module", "license": "BSD-3-Clause", "engines": { diff --git a/packages/contract/package.json b/packages/contract/package.json index f4157bcc..dd3107ec 100644 --- a/packages/contract/package.json +++ b/packages/contract/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/contract", "description": "ContractKit for Wharf", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/contract", "license": "BSD-3-Clause", "engines": { diff --git a/packages/hyperion/package.json b/packages/hyperion/package.json index 543ede6e..126c1db2 100644 --- a/packages/hyperion/package.json +++ b/packages/hyperion/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/hyperion", "description": "API Client to access Hyperion API endpoints", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/hyperion", "license": "BSD-3-Clause", "engines": { diff --git a/packages/mock-data/package.json b/packages/mock-data/package.json index 58ec6b87..c92dec14 100644 --- a/packages/mock-data/package.json +++ b/packages/mock-data/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/mock-data", "description": "Sample data for usage in tests throughout @wharfkit", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/mock-data", "license": "BSD-3-Clause", "engines": { diff --git a/packages/msigs/package.json b/packages/msigs/package.json index dbf75a09..281c9ebc 100644 --- a/packages/msigs/package.json +++ b/packages/msigs/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/msigs", "description": "API Client to access Roborovski msigs API endpoints", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/msigs", "license": "BSD-3-Clause", "engines": { diff --git a/packages/protocol-esr/package.json b/packages/protocol-esr/package.json index a1fa78f0..f4253a9f 100644 --- a/packages/protocol-esr/package.json +++ b/packages/protocol-esr/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/protocol-esr", "description": "Abstract methods useful to all ESR-based wallet plugins", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/protocol-esr", "license": "BSD-3-Clause", "engines": { diff --git a/packages/protocol-scatter/package.json b/packages/protocol-scatter/package.json index efce51f8..e92d7c16 100644 --- a/packages/protocol-scatter/package.json +++ b/packages/protocol-scatter/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/protocol-scatter", "description": "Abstract methods useful to all Scatter-based wallet plugins", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/protocol-scatter", "license": "BSD-3-Clause", "engines": { diff --git a/packages/resources/package.json b/packages/resources/package.json index 27d3ebcc..3766ca31 100644 --- a/packages/resources/package.json +++ b/packages/resources/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/resources", "description": "Library to assist in Antelope-blockchain resource calculations.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/resources", "license": "BSD-3-Clause", "engines": { diff --git a/packages/roborovski/package.json b/packages/roborovski/package.json index 27a24e7d..f0958a9c 100644 --- a/packages/roborovski/package.json +++ b/packages/roborovski/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/roborovski", "description": "API Client to access Roborovski API endpoints", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/roborovski", "license": "BSD-3-Clause", "engines": { diff --git a/packages/sealed-messages/package.json b/packages/sealed-messages/package.json index 99bcf904..939027ee 100644 --- a/packages/sealed-messages/package.json +++ b/packages/sealed-messages/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/sealed-messages", "description": "", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/sealed-messages", "license": "BSD-3-Clause", "engines": { diff --git a/packages/session/package.json b/packages/session/package.json index 4cc69687..40d59db0 100644 --- a/packages/session/package.json +++ b/packages/session/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/session", "description": "Create account-based sessions, perform transactions, and allow users to login using Antelope-based blockchains.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/session", "license": "BSD-3-Clause", "engines": { diff --git a/packages/signing-request/package.json b/packages/signing-request/package.json index d24714c9..bb3a352b 100644 --- a/packages/signing-request/package.json +++ b/packages/signing-request/package.json @@ -1,6 +1,6 @@ { "name": "@wharfkit/signing-request", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "description": "Signing Request (ESR / EEP-7) encoder and decoder for Antelope blockchains", "homepage": "https://github.com/wharfkit/signing-request", "license": "BSD-3-Clause", diff --git a/packages/svelte-components/package.json b/packages/svelte-components/package.json index 883995f9..acd9e86d 100644 --- a/packages/svelte-components/package.json +++ b/packages/svelte-components/package.json @@ -1,6 +1,6 @@ { "name": "@wharfkit/svelte-components", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "description": "Svelte 5 and Tailwind v4 component library for Antelope applications", "license": "BSD-3-Clause", "repository": { diff --git a/packages/token/package.json b/packages/token/package.json index 7f55cbcc..5e464d2f 100644 --- a/packages/token/package.json +++ b/packages/token/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/token", "description": "Library to work with Antelope-blockchain system tokens.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/token", "license": "BSD-3-Clause", "engines": { diff --git a/packages/transact-plugin-autocorrect/package.json b/packages/transact-plugin-autocorrect/package.json index 3a90d06a..db6c10f9 100644 --- a/packages/transact-plugin-autocorrect/package.json +++ b/packages/transact-plugin-autocorrect/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/transact-plugin-autocorrect", "description": "A plugin to correct common issues users experience while performing transactions.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/transact-plugin-autocorrect", "license": "BSD-3-Clause", "engines": { diff --git a/packages/transact-plugin-cosigner/package.json b/packages/transact-plugin-cosigner/package.json index d08efd55..70176656 100644 --- a/packages/transact-plugin-cosigner/package.json +++ b/packages/transact-plugin-cosigner/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/transact-plugin-cosigner", "description": "Automatically cosign transactions to assume resource costs using a noop action.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/transact-plugin-cosigner", "license": "BSD-3-Clause", "engines": { diff --git a/packages/transact-plugin-explorerlink/package.json b/packages/transact-plugin-explorerlink/package.json index 352d71c4..09607234 100644 --- a/packages/transact-plugin-explorerlink/package.json +++ b/packages/transact-plugin-explorerlink/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/transact-plugin-explorerlink", "description": "A transact plugin to display a link to a block explorer after a transaction is broadcast.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/transact-plugin-explorerlink", "license": "BSD-3-Clause", "engines": { diff --git a/packages/transact-plugin-finality-callback/package.json b/packages/transact-plugin-finality-callback/package.json index a4655132..ba80afa5 100644 --- a/packages/transact-plugin-finality-callback/package.json +++ b/packages/transact-plugin-finality-callback/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/transact-plugin-finality-callback", "description": "A template to create plugins for use with @wharfkit/session transact method.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/transact-plugin-finality-callback", "license": "BSD-3-Clause", "engines": { diff --git a/packages/transact-plugin-finality-checker/package.json b/packages/transact-plugin-finality-checker/package.json index 1119599f..cc550030 100644 --- a/packages/transact-plugin-finality-checker/package.json +++ b/packages/transact-plugin-finality-checker/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/transact-plugin-finality-checker", "description": "A template to create plugins for use with @wharfkit/session transact method.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/transact-plugin-finality-checker", "license": "BSD-3-Clause", "engines": { diff --git a/packages/transact-plugin-mock/package.json b/packages/transact-plugin-mock/package.json index 810ce325..7b2a74cc 100644 --- a/packages/transact-plugin-mock/package.json +++ b/packages/transact-plugin-mock/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/transact-plugin-mock", "description": "A mock TransactPlugin to simulate specific events.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/transact-plugin-mock", "license": "BSD-3-Clause", "engines": { diff --git a/packages/transact-plugin-msig-propose/package.json b/packages/transact-plugin-msig-propose/package.json index a6645e95..1f8dd201 100644 --- a/packages/transact-plugin-msig-propose/package.json +++ b/packages/transact-plugin-msig-propose/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/transact-plugin-msig-propose", "description": "A template to create plugins for use with @wharfkit/session transact method.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "private": true, "homepage": "https://github.com/wharfkit/transact-plugin-msig-propose", "license": "BSD-3-Clause", diff --git a/packages/transact-plugin-resource-provider/package.json b/packages/transact-plugin-resource-provider/package.json index 98db7bef..f99eccb7 100644 --- a/packages/transact-plugin-resource-provider/package.json +++ b/packages/transact-plugin-resource-provider/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/transact-plugin-resource-provider", "description": "Plugin to automatically provide network resources for transactions using the Resource Provider implementation standard.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/transact-plugin-resource-provider", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-anchor/package.json b/packages/wallet-plugin-anchor/package.json index 26741c21..aaf9c5d7 100644 --- a/packages/wallet-plugin-anchor/package.json +++ b/packages/wallet-plugin-anchor/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-anchor", "description": "An Anchor plugin for use with @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-anchor", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-cleos/package.json b/packages/wallet-plugin-cleos/package.json index 6c34d6c0..0908c011 100644 --- a/packages/wallet-plugin-cleos/package.json +++ b/packages/wallet-plugin-cleos/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-cleos", "description": "A template to create wallet plugins for use with @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-cleos", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-cloudwallet/package.json b/packages/wallet-plugin-cloudwallet/package.json index 418213b2..9e871541 100644 --- a/packages/wallet-plugin-cloudwallet/package.json +++ b/packages/wallet-plugin-cloudwallet/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-cloudwallet", "description": "A WalletPlugin for My Cloud Wallet for use within the @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-cloudwallet", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-gatewallet/package.json b/packages/wallet-plugin-gatewallet/package.json index d46d2e48..1c8274c6 100644 --- a/packages/wallet-plugin-gatewallet/package.json +++ b/packages/wallet-plugin-gatewallet/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-gatewallet", "description": "A template to create wallet plugins for use with @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-template", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-imtoken/package.json b/packages/wallet-plugin-imtoken/package.json index 087d033f..38d9d6af 100644 --- a/packages/wallet-plugin-imtoken/package.json +++ b/packages/wallet-plugin-imtoken/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-imtoken", "description": "A template to create wallet plugins for use with @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-imtoken", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-metamask/package.json b/packages/wallet-plugin-metamask/package.json index 28c43522..23e5f245 100644 --- a/packages/wallet-plugin-metamask/package.json +++ b/packages/wallet-plugin-metamask/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-metamask", "description": "A MetaMask plugin for use with @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-metamask", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-mimic/package.json b/packages/wallet-plugin-mimic/package.json index 601dc6ce..1c1c9513 100644 --- a/packages/wallet-plugin-mimic/package.json +++ b/packages/wallet-plugin-mimic/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-mimic", "description": "A template to create wallet plugins for use with @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "private": true, "homepage": "https://github.com/wharfkit/wallet-plugin-mimic", "license": "BSD-3-Clause", diff --git a/packages/wallet-plugin-mock/package.json b/packages/wallet-plugin-mock/package.json index 090a7ed3..6e96b023 100644 --- a/packages/wallet-plugin-mock/package.json +++ b/packages/wallet-plugin-mock/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-mock", "description": "A mock wallet for developers to use while building web applications.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-mock", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-paycash/package.json b/packages/wallet-plugin-paycash/package.json index bf20ef0c..b1461130 100644 --- a/packages/wallet-plugin-paycash/package.json +++ b/packages/wallet-plugin-paycash/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-paycash", "description": "A Wharf wallet plugin for the PayCash wallet", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-paycash", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-privatekey/package.json b/packages/wallet-plugin-privatekey/package.json index af014c03..88134fb1 100644 --- a/packages/wallet-plugin-privatekey/package.json +++ b/packages/wallet-plugin-privatekey/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-privatekey", "description": "A template to create wallet plugins for use with @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-privatekey", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-scatter/package.json b/packages/wallet-plugin-scatter/package.json index 29926996..eba74d7c 100644 --- a/packages/wallet-plugin-scatter/package.json +++ b/packages/wallet-plugin-scatter/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-scatter", "description": "A WalletPlugin for the Scatter wallet for use within the @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-scatter", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-tokenpocket/package.json b/packages/wallet-plugin-tokenpocket/package.json index b2eb41dc..8e64dbeb 100644 --- a/packages/wallet-plugin-tokenpocket/package.json +++ b/packages/wallet-plugin-tokenpocket/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-tokenpocket", "description": "A WalletPlugin for the TokenPocket wallet for use within the @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-tokenpocket", "license": "BSD-3-Clause", "engines": { diff --git a/packages/wallet-plugin-web-authenticator/package.json b/packages/wallet-plugin-web-authenticator/package.json index d96793f1..93edfe4c 100644 --- a/packages/wallet-plugin-web-authenticator/package.json +++ b/packages/wallet-plugin-web-authenticator/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/wallet-plugin-web-authenticator", "description": "A Web Authenticator wallet plugin for use with @wharfkit/session.", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/wharfkit/wallet-plugin-web-authenticator", "license": "BSD-3-Clause", "engines": { diff --git a/packages/web-renderer/package.json b/packages/web-renderer/package.json index b94dbb3e..56cce7fc 100644 --- a/packages/web-renderer/package.json +++ b/packages/web-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@wharfkit/web-renderer", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "description": "", "license": "BSD-3-Clause", "engines": { diff --git a/packages/web-ui/package.json b/packages/web-ui/package.json index ca124355..61060c05 100644 --- a/packages/web-ui/package.json +++ b/packages/web-ui/package.json @@ -1,6 +1,6 @@ { "name": "@wharfkit/web-ui", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "description": "Modern embedded UI renderer for WharfKit SessionKit", "type": "module", "license": "BSD-3-Clause", diff --git a/packages/webauthn/package.json b/packages/webauthn/package.json index b1fa0777..89e484b2 100644 --- a/packages/webauthn/package.json +++ b/packages/webauthn/package.json @@ -1,7 +1,7 @@ { "name": "@wharfkit/webauthn", "description": "WebAuthn helpers for antelope core", - "version": "4.0.0-rc5", + "version": "4.0.0-rc6", "homepage": "https://github.com/greymass/eosio-webauthn", "license": "BSD-3-Clause", "engines": {