mirror of
https://github.com/wharfkit/session.git
synced 2026-07-21 10:02:11 +00:00
1.1.0 Release (#75)
* Added MOCK_DIR to coverage build * Allow passing a `ChainDefinition` to login as `chain` * Remove broken browser test build * Allow passing in Contract instances for ABI caching * Version 1.1.0-rc1 * Version 1.1.0-rc2 * Updating dependencies * Updated tests for compressed transactions * Added package resolution for next build * Moved ABICache mechanisms out to its own function Also implemented caching from embedded Action objects from new wharfkit/antelope release. * Updating dependencies and tests for ABI caching * Each `WalletPlugin` may optionally return an `IdentityProof` Related to #72 * Allow calling `restore` with a `ChainDefinition` Fixes #71 * Updating Antelope library * New test account * New `setAsDefault` parameter during login Allows the developer during a `login` call to specify whether or not this account should be the new default for `restore`. Defaults to true. * Support for Account Creation Plugins (#84) * chore: added account-creation plugins * fix: getting createAccount method working * fix: fixed prompts * fix: adding account creation plugins to context * fix: adding account creation method to ui interface * chore: added onAccountCreateComplete * Ran `make format` * Linting * Require a name for creation services * Mocked account creation methods in tests * Linting * Removed selected plugin from context * Swapped chain to Checksum256Type * Removed chains * Linting * Removed chains from options This adds a lot of complexity for very little gain in the account creation flow. * Reworked createAccount flow * Version 1.1.0-rc3 * Allow developer to override chain/plugin for Account Creation * Version 1.1.0-rc4 * Filter chains based on plugin capabilities, if set --------- Co-authored-by: Aaron Cox <aaron@greymass.com> * Updating dependencies for 1.1.0 * Added missing mock data --------- Co-authored-by: Daniel Fugere <danielfugere28@gmail.com>
This commit is contained in:
@@ -18,7 +18,7 @@ test/watch: node_modules
|
||||
${BIN}/mocha --watch ${MOCHA_OPTS} ${TEST_FILES} --no-timeout --grep '$(grep)'
|
||||
|
||||
build/coverage: ${SRC_FILES} ${TEST_FILES} node_modules
|
||||
@TS_NODE_PROJECT='./test/tsconfig.json' \
|
||||
@TS_NODE_PROJECT='./test/tsconfig.json' MOCK_DIR='./test/data' \
|
||||
${BIN}/nyc ${NYC_OPTS} --reporter=html \
|
||||
${BIN}/mocha ${MOCHA_OPTS} -R nyan ${TEST_FILES}
|
||||
|
||||
@@ -57,11 +57,16 @@ build/docs: $(SRC_FILES) node_modules
|
||||
--includeVersion --hideGenerator --readme none \
|
||||
src/index.ts
|
||||
|
||||
build/pages: build/coverage build/docs build/browser.html
|
||||
# build/pages: build/coverage build/docs build/browser.html
|
||||
# @mkdir -p build/pages
|
||||
# @cp -r build/docs/* build/pages/
|
||||
# @cp -r build/coverage build/pages/coverage
|
||||
# @cp build/browser.html build/pages/tests.html
|
||||
|
||||
build/pages: build/coverage build/docs
|
||||
@mkdir -p build/pages
|
||||
@cp -r build/docs/* build/pages/
|
||||
@cp -r build/coverage build/pages/coverage
|
||||
@cp build/browser.html build/pages/tests.html
|
||||
|
||||
.PHONY: deploy-pages
|
||||
deploy-pages: | clean lib build/pages node_modules
|
||||
|
||||
+9
-9
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@wharfkit/session",
|
||||
"description": "Create account-based sessions, perform transactions, and allow users to login using Antelope-based blockchains.",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0-rc4",
|
||||
"homepage": "https://github.com/wharfkit/session",
|
||||
"license": "BSD-3-Clause",
|
||||
"main": "lib/session.js",
|
||||
@@ -17,15 +17,15 @@
|
||||
"prepare": "make"
|
||||
},
|
||||
"dependencies": {
|
||||
"@wharfkit/abicache": "^1.1.1",
|
||||
"@wharfkit/antelope": "^0.7.3",
|
||||
"@wharfkit/common": "^1.1.0",
|
||||
"@wharfkit/signing-request": "^3.0.0",
|
||||
"@wharfkit/abicache": "^1.2.0",
|
||||
"@wharfkit/antelope": "^1.0.0",
|
||||
"@wharfkit/common": "^1.2.0",
|
||||
"@wharfkit/signing-request": "^3.1.0",
|
||||
"pako": "^2.0.4",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"@wharfkit/antelope": "^0.7.3"
|
||||
"@wharfkit/antelope": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
@@ -42,10 +42,10 @@
|
||||
"@types/node": "^18.7.18",
|
||||
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
||||
"@typescript-eslint/parser": "^5.20.0",
|
||||
"@wharfkit/contract": "^0.3.3",
|
||||
"@wharfkit/mock-data": "^1.0.1",
|
||||
"@wharfkit/contract": "^0.4.2",
|
||||
"@wharfkit/mock-data": "^1.0.2",
|
||||
"@wharfkit/transact-plugin-resource-provider": "^1.0.0-beta1",
|
||||
"@wharfkit/wallet-plugin-privatekey": "^1.0.0-beta1",
|
||||
"@wharfkit/wallet-plugin-privatekey": "^1.0.0",
|
||||
"chai": "^4.3.4",
|
||||
"eslint": "^8.13.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
import {APIClient, FetchProvider, NameType, Struct} from '@wharfkit/antelope'
|
||||
import {Logo} from '@wharfkit/common'
|
||||
import type {ChainDefinition, Fetch, LocaleDefinitions} from '@wharfkit/common'
|
||||
import {UserInterface} from '.'
|
||||
|
||||
/**
|
||||
* The static configuration of an [[AccountCreationPlugin]].
|
||||
*/
|
||||
export interface AccountCreationPluginConfig {
|
||||
/**
|
||||
* Indicates if the plugin requires the user to manually select the blockchain to create an account on.
|
||||
*/
|
||||
requiresChainSelect: boolean
|
||||
/**
|
||||
* If set, indicates which blockchains are compatible with this [[AccountCreationPlugin]].
|
||||
*/
|
||||
supportedChains?: ChainDefinition[]
|
||||
}
|
||||
|
||||
/**
|
||||
* The metadata of an [[AccountCreationPlugin]].
|
||||
*/
|
||||
@Struct.type('account_creation_plugin_metadata')
|
||||
export class AccountCreationPluginMetadata extends Struct {
|
||||
/**
|
||||
* A display name for the account creation service that is presented to users.
|
||||
*/
|
||||
@Struct.field('string') declare name: string
|
||||
/**
|
||||
* A description to further identify the account creation service for users.
|
||||
*/
|
||||
@Struct.field('string', {optional: true}) declare description?: string
|
||||
/**
|
||||
* Account creation service branding.
|
||||
*/
|
||||
@Struct.field(Logo, {optional: true}) declare logo?: Logo
|
||||
/**
|
||||
* Link to the homepage for the account creation service.
|
||||
*/
|
||||
@Struct.field('string', {optional: true}) declare homepage?: string
|
||||
|
||||
static from(data) {
|
||||
return new AccountCreationPluginMetadata({
|
||||
...data,
|
||||
logo: data.logo ? Logo.from(data.logo) : undefined,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for createAccount call.
|
||||
**/
|
||||
export interface CreateAccountOptions {
|
||||
accountName?: NameType
|
||||
chain?: ChainDefinition
|
||||
pluginId?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* The response for a createAccount call.
|
||||
*/
|
||||
export interface CreateAccountResponse {
|
||||
chain: ChainDefinition
|
||||
accountName: NameType
|
||||
}
|
||||
|
||||
export interface CreateAccountContextOptions {
|
||||
accountCreationPlugins?: AccountCreationPlugin[]
|
||||
appName?: NameType
|
||||
// client: APIClient
|
||||
chain?: ChainDefinition
|
||||
chains?: ChainDefinition[]
|
||||
fetch: Fetch
|
||||
ui: UserInterface
|
||||
uiRequirements?: UserInterfaceAccountCreationRequirements
|
||||
}
|
||||
|
||||
export interface UserInterfaceAccountCreationRequirements {
|
||||
requiresChainSelect: boolean
|
||||
requiresPluginSelect: boolean
|
||||
}
|
||||
|
||||
export class CreateAccountContext {
|
||||
accountCreationPlugins: AccountCreationPlugin[] = []
|
||||
appName?: string
|
||||
chain?: ChainDefinition
|
||||
chains?: ChainDefinition[]
|
||||
fetch: Fetch
|
||||
ui: UserInterface
|
||||
uiRequirements: UserInterfaceAccountCreationRequirements = {
|
||||
requiresChainSelect: true,
|
||||
requiresPluginSelect: true,
|
||||
}
|
||||
|
||||
constructor(options: CreateAccountContextOptions) {
|
||||
this.appName = String(options.appName)
|
||||
if (options.chains) {
|
||||
this.chains = options.chains
|
||||
}
|
||||
if (options.chain) {
|
||||
this.chain = options.chain
|
||||
}
|
||||
this.fetch = options.fetch
|
||||
this.ui = options.ui
|
||||
if (options.accountCreationPlugins) {
|
||||
this.accountCreationPlugins = options.accountCreationPlugins
|
||||
}
|
||||
if (options.uiRequirements) {
|
||||
this.uiRequirements = options.uiRequirements
|
||||
}
|
||||
}
|
||||
|
||||
getClient(chain: ChainDefinition): APIClient {
|
||||
return new APIClient({provider: new FetchProvider(chain.url, {fetch: this.fetch})})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface which all 3rd party account creation plugins must implement.
|
||||
*/
|
||||
|
||||
export interface AccountCreationPlugin {
|
||||
/** A URL friendly (lower case, no spaces, etc) ID for this plugin - Used in serialization */
|
||||
get id(): string
|
||||
|
||||
/** A display name for the account creation service that is presented to users. */
|
||||
get name(): string
|
||||
|
||||
/** The [[SessionKit]] configuration parameters for this [[WalletPlugin]]. */
|
||||
config: AccountCreationPluginConfig
|
||||
/** Any translations this plugin requires */
|
||||
translations?: LocaleDefinitions
|
||||
|
||||
/**
|
||||
* Request the [[AccountCreationPlugin]] to create a new account.
|
||||
*
|
||||
* @param context The [[AccountCreationContext]] for the [[WalletPlugin]] to use.
|
||||
*/
|
||||
create(options: CreateAccountContext): Promise<CreateAccountResponse>
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstract class which all 3rd party [[AccountCreation]] implementations may extend.
|
||||
*/
|
||||
export abstract class AbstractAccountCreationPlugin implements AccountCreationPlugin {
|
||||
config: AccountCreationPluginConfig = {
|
||||
requiresChainSelect: true,
|
||||
}
|
||||
metadata: AccountCreationPluginMetadata = new AccountCreationPluginMetadata({})
|
||||
translations?: LocaleDefinitions
|
||||
abstract get id(): string
|
||||
abstract get name(): string
|
||||
abstract create(options: CreateAccountOptions): Promise<CreateAccountResponse>
|
||||
}
|
||||
@@ -6,3 +6,4 @@ export * from './transact'
|
||||
export * from './ui'
|
||||
export * from './utils'
|
||||
export * from './wallet'
|
||||
export * from './account-creation'
|
||||
|
||||
+178
-12
@@ -1,3 +1,5 @@
|
||||
import {ChainDefinition, type ChainDefinitionType, type Fetch} from '@wharfkit/common'
|
||||
import type {Contract} from '@wharfkit/contract'
|
||||
import {
|
||||
Checksum256,
|
||||
Checksum256Type,
|
||||
@@ -6,8 +8,6 @@ import {
|
||||
PermissionLevel,
|
||||
PermissionLevelType,
|
||||
} from '@wharfkit/antelope'
|
||||
import {ChainDefinition} from '@wharfkit/common'
|
||||
import type {ChainDefinitionType, Fetch} from '@wharfkit/common'
|
||||
|
||||
import {
|
||||
AbstractLoginPlugin,
|
||||
@@ -28,11 +28,18 @@ import {
|
||||
import {WalletPlugin, WalletPluginLoginResponse, WalletPluginMetadata} from './wallet'
|
||||
import {UserInterface} from './ui'
|
||||
import {getFetch} from './utils'
|
||||
import {
|
||||
AccountCreationPlugin,
|
||||
CreateAccountContext,
|
||||
CreateAccountOptions,
|
||||
CreateAccountResponse,
|
||||
} from './account-creation'
|
||||
|
||||
export interface LoginOptions {
|
||||
chain?: Checksum256Type
|
||||
chain?: ChainDefinition | Checksum256Type
|
||||
chains?: Checksum256Type[]
|
||||
loginPlugins?: LoginPlugin[]
|
||||
setAsDefault?: boolean
|
||||
transactPlugins?: TransactPlugin[]
|
||||
transactPluginsOptions?: TransactPluginsOptions
|
||||
permissionLevel?: PermissionLevelType | string
|
||||
@@ -46,7 +53,7 @@ export interface LoginResult {
|
||||
}
|
||||
|
||||
export interface RestoreArgs {
|
||||
chain: Checksum256Type
|
||||
chain: Checksum256Type | ChainDefinition
|
||||
actor?: NameType
|
||||
permission?: NameType
|
||||
walletPlugin?: Record<string, any>
|
||||
@@ -62,12 +69,14 @@ export interface SessionKitArgs {
|
||||
export interface SessionKitOptions {
|
||||
abis?: TransactABIDef[]
|
||||
allowModify?: boolean
|
||||
contracts?: Contract[]
|
||||
expireSeconds?: number
|
||||
fetch?: Fetch
|
||||
loginPlugins?: LoginPlugin[]
|
||||
storage?: SessionStorage
|
||||
transactPlugins?: TransactPlugin[]
|
||||
transactPluginsOptions?: TransactPluginsOptions
|
||||
accountCreationPlugins?: AccountCreationPlugin[]
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,6 +95,7 @@ export class SessionKit {
|
||||
readonly transactPluginsOptions: TransactPluginsOptions = {}
|
||||
readonly ui: UserInterface
|
||||
readonly walletPlugins: WalletPlugin[]
|
||||
readonly accountCreationPlugins: AccountCreationPlugin[] = []
|
||||
|
||||
constructor(args: SessionKitArgs, options: SessionKitOptions = {}) {
|
||||
// Save the appName to the SessionKit instance
|
||||
@@ -106,6 +116,10 @@ export class SessionKit {
|
||||
if (options.abis) {
|
||||
this.abis = [...options.abis]
|
||||
}
|
||||
// Extract any ABIs from the Contract instances provided
|
||||
if (options.contracts) {
|
||||
this.abis.push(...options.contracts.map((c) => ({account: c.account, abi: c.abi})))
|
||||
}
|
||||
// Establish default plugins for login flow
|
||||
if (options.loginPlugins) {
|
||||
this.loginPlugins = options.loginPlugins
|
||||
@@ -135,6 +149,11 @@ export class SessionKit {
|
||||
if (options.transactPluginsOptions) {
|
||||
this.transactPluginsOptions = options.transactPluginsOptions
|
||||
}
|
||||
|
||||
// Establish default plugins for account creation
|
||||
if (options.accountCreationPlugins) {
|
||||
this.accountCreationPlugins = options.accountCreationPlugins
|
||||
}
|
||||
}
|
||||
|
||||
getChainDefinition(id: Checksum256Type, override?: ChainDefinition[]): ChainDefinition {
|
||||
@@ -142,11 +161,143 @@ export class SessionKit {
|
||||
const chainId = Checksum256.from(id)
|
||||
const chain = chains.find((c) => c.id.equals(chainId))
|
||||
if (!chain) {
|
||||
throw new Error(`No chain defined with the ID of: ${chainId}`)
|
||||
throw new Error(`No chain defined with an ID of: ${chainId}`)
|
||||
}
|
||||
return chain
|
||||
}
|
||||
|
||||
/**
|
||||
* Request account creation.
|
||||
*/
|
||||
async createAccount(options?: CreateAccountOptions): Promise<CreateAccountResponse> {
|
||||
try {
|
||||
if (this.accountCreationPlugins.length === 0) {
|
||||
throw new Error('No account creation plugins available.')
|
||||
}
|
||||
|
||||
// Eestablish defaults based on options
|
||||
let chain = options?.chain
|
||||
let requiresChainSelect = !chain
|
||||
let requiresPluginSelect = !options?.pluginId
|
||||
|
||||
let accountCreationPlugin: AccountCreationPlugin | undefined
|
||||
|
||||
// Developer specified a plugin during createAccount call
|
||||
if (options?.pluginId) {
|
||||
requiresPluginSelect = false
|
||||
|
||||
// Find the plugin
|
||||
accountCreationPlugin = this.accountCreationPlugins.find(
|
||||
(p) => p.id === options.pluginId
|
||||
)
|
||||
|
||||
// Ensure the plugin exists
|
||||
if (!accountCreationPlugin) {
|
||||
throw new Error('Invalid account creation plugin selected.')
|
||||
}
|
||||
|
||||
// Override the chain selection requirement based on the plugin
|
||||
if (accountCreationPlugin?.config.requiresChainSelect !== undefined) {
|
||||
requiresChainSelect = accountCreationPlugin?.config.requiresChainSelect
|
||||
}
|
||||
|
||||
// If the plugin does not require chain select and has one supported chain, set it as the default
|
||||
if (
|
||||
!accountCreationPlugin.config.requiresChainSelect &&
|
||||
accountCreationPlugin.config.supportedChains &&
|
||||
accountCreationPlugin.config.supportedChains.length === 1
|
||||
) {
|
||||
chain = accountCreationPlugin.config.supportedChains[0]
|
||||
}
|
||||
}
|
||||
|
||||
// The chains available to select from, based on the Session Kit
|
||||
let chains = this.chains
|
||||
|
||||
// If a plugin is selected, filter the chains available down to only the ones supported by the plugin
|
||||
if (accountCreationPlugin && accountCreationPlugin?.config.supportedChains?.length) {
|
||||
chains = chains.filter((availableChain) => {
|
||||
return accountCreationPlugin?.config.supportedChains?.find((c) => {
|
||||
return c.id.equals(availableChain.id)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const context = new CreateAccountContext({
|
||||
accountCreationPlugins: this.accountCreationPlugins,
|
||||
appName: this.appName,
|
||||
chain,
|
||||
chains,
|
||||
fetch: this.fetch,
|
||||
ui: this.ui,
|
||||
uiRequirements: {
|
||||
requiresChainSelect,
|
||||
requiresPluginSelect,
|
||||
},
|
||||
})
|
||||
|
||||
// If UI interaction is required before triggering the plugin
|
||||
if (requiresPluginSelect || requiresChainSelect) {
|
||||
// Call the UI with the context
|
||||
const response = await context.ui.onAccountCreate(context)
|
||||
|
||||
// Set pluginId based on options first, then response
|
||||
const pluginId = options?.pluginId || response.pluginId
|
||||
|
||||
// Ensure we have a pluginId
|
||||
if (!pluginId) {
|
||||
throw new Error('No account creation plugin selected.')
|
||||
}
|
||||
|
||||
// Determine plugin selected based on response
|
||||
accountCreationPlugin = context.accountCreationPlugins.find(
|
||||
(p) => p.id === pluginId
|
||||
)
|
||||
if (!accountCreationPlugin) {
|
||||
throw new Error('No account creation plugin selected.')
|
||||
}
|
||||
|
||||
// If the plugin does not require chain select and has one supported chain, set it as the default
|
||||
if (
|
||||
!accountCreationPlugin.config.requiresChainSelect &&
|
||||
accountCreationPlugin.config.supportedChains &&
|
||||
accountCreationPlugin.config.supportedChains.length === 1
|
||||
) {
|
||||
context.chain = accountCreationPlugin.config.supportedChains[0]
|
||||
}
|
||||
|
||||
// Set chain based on response
|
||||
if (response.chain) {
|
||||
context.chain = this.getChainDefinition(response.chain, context.chains)
|
||||
}
|
||||
|
||||
// Ensure a chain was selected and is supported by the plugin
|
||||
if (accountCreationPlugin.config.requiresChainSelect && !context.chain) {
|
||||
throw new Error(
|
||||
`Account creation plugin (${pluginId}) requires chain selection, and no chain was selected.`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure a plugin was selected
|
||||
if (!accountCreationPlugin) {
|
||||
throw new Error('No account creation plugin selected')
|
||||
}
|
||||
|
||||
// Call the account creation plugin with the context
|
||||
const accountCreationData = await accountCreationPlugin.create(context)
|
||||
|
||||
// Notify the UI we're done
|
||||
await context.ui.onAccountCreateComplete()
|
||||
|
||||
// Return the data
|
||||
return accountCreationData
|
||||
} catch (error: any) {
|
||||
await this.ui.onError(error)
|
||||
throw new Error(error)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a session from an account.
|
||||
*
|
||||
@@ -183,7 +334,11 @@ export class SessionKit {
|
||||
|
||||
// Predetermine chain (if possible) to prevent uneeded UI interactions.
|
||||
if (options && options.chain) {
|
||||
context.chain = this.getChainDefinition(options.chain, context.chains)
|
||||
if (options.chain instanceof ChainDefinition) {
|
||||
context.chain = options.chain
|
||||
} else {
|
||||
context.chain = this.getChainDefinition(options.chain, context.chains)
|
||||
}
|
||||
context.uiRequirements.requiresChainSelect = false
|
||||
} else if (context.chains.length === 1) {
|
||||
context.chain = context.chains[0]
|
||||
@@ -283,7 +438,7 @@ 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)
|
||||
this.persistSession(session, options?.setAsDefault)
|
||||
|
||||
// Notify the UI that the login request has completed.
|
||||
await context.ui.onLoginComplete()
|
||||
@@ -343,6 +498,10 @@ export class SessionKit {
|
||||
throw new Error('Either a RestoreArgs object or a Storage instance must be provided.')
|
||||
}
|
||||
|
||||
const chainId = Checksum256.from(
|
||||
args.chain instanceof ChainDefinition ? args.chain.id : args.chain
|
||||
)
|
||||
|
||||
let serializedSession: SerializedSession
|
||||
|
||||
// Retrieve all sessions from storage
|
||||
@@ -356,7 +515,7 @@ export class SessionKit {
|
||||
serializedSession = sessions.find((s: SerializedSession) => {
|
||||
return (
|
||||
args &&
|
||||
s.chain === args.chain &&
|
||||
chainId.equals(s.chain) &&
|
||||
s.actor === args.actor &&
|
||||
s.permission === args.permission
|
||||
)
|
||||
@@ -364,14 +523,14 @@ export class SessionKit {
|
||||
} else {
|
||||
// If no actor/permission defined, return based on chain
|
||||
serializedSession = sessions.find((s: SerializedSession) => {
|
||||
return args && s.chain === args.chain && s.default
|
||||
return args && chainId.equals(s.chain) && s.default
|
||||
})
|
||||
}
|
||||
} 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: args.chain,
|
||||
chain: String(chainId),
|
||||
actor: args.actor,
|
||||
permission: args.permission,
|
||||
walletPlugin: {
|
||||
@@ -385,6 +544,11 @@ export class SessionKit {
|
||||
}
|
||||
}
|
||||
|
||||
// If no session found, return
|
||||
if (!serializedSession) {
|
||||
return
|
||||
}
|
||||
|
||||
// Ensure a WalletPlugin was found with the provided ID.
|
||||
const walletPlugin = this.walletPlugins.find((p) => {
|
||||
if (!args) {
|
||||
@@ -423,7 +587,7 @@ export class SessionKit {
|
||||
)
|
||||
|
||||
// Save the session to storage if it has a storage instance.
|
||||
this.persistSession(session)
|
||||
this.persistSession(session, options?.setAsDefault)
|
||||
|
||||
// Return the session
|
||||
return session
|
||||
@@ -458,7 +622,9 @@ export class SessionKit {
|
||||
serialized.default = setAsDefault
|
||||
|
||||
// Set this as the current session for all chains
|
||||
this.storage.write('session', JSON.stringify(serialized))
|
||||
if (setAsDefault) {
|
||||
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')
|
||||
|
||||
+57
-17
@@ -1,3 +1,6 @@
|
||||
import type {ChainDefinitionType, Fetch, LocaleDefinitions} from '@wharfkit/common'
|
||||
import type {Contract} from '@wharfkit/contract'
|
||||
|
||||
import zlib from 'pako'
|
||||
import {
|
||||
APIClient,
|
||||
@@ -14,7 +17,6 @@ import {
|
||||
TransactionType,
|
||||
} from '@wharfkit/antelope'
|
||||
import {ChainDefinition} from '@wharfkit/common'
|
||||
import type {ChainDefinitionType, Fetch, LocaleDefinitions} from '@wharfkit/common'
|
||||
import {
|
||||
ChainId,
|
||||
RequestDataV2,
|
||||
@@ -62,6 +64,7 @@ export interface SessionOptions {
|
||||
allowModify?: boolean
|
||||
appName?: NameType
|
||||
broadcast?: boolean
|
||||
contracts?: Contract[]
|
||||
expireSeconds?: number
|
||||
fetch?: Fetch
|
||||
storage?: SessionStorage
|
||||
@@ -127,6 +130,10 @@ export class Session {
|
||||
if (options.abis) {
|
||||
this.abis = [...options.abis]
|
||||
}
|
||||
// Extract any ABIs from the Contract instances provided
|
||||
if (options.contracts) {
|
||||
this.abis.push(...options.contracts.map((c) => ({account: c.account, abi: c.abi})))
|
||||
}
|
||||
if (options.allowModify !== undefined) {
|
||||
this.allowModify = options.allowModify
|
||||
}
|
||||
@@ -343,21 +350,7 @@ export class Session {
|
||||
: this.broadcast
|
||||
|
||||
// The abi provider to use for this transaction, falling back to the session instance
|
||||
const abiCache = options?.abiCache || this.abiCache
|
||||
|
||||
// Collect all the ABIs that have been passed in manually
|
||||
const abiDefs: TransactABIDef[] = [...this.abis]
|
||||
if (options?.abis) {
|
||||
// If we have ABIs in the options, add them.
|
||||
abiDefs.push(...options.abis)
|
||||
}
|
||||
|
||||
// If an array of ABIs are provided, set them on the abiCache
|
||||
if (abiCache['setAbi']) {
|
||||
abiDefs.forEach((def: TransactABIDef) => abiCache['setAbi'](def.account, def.abi))
|
||||
} else {
|
||||
throw new Error('Custom `abiCache` does not support `setAbi` method.')
|
||||
}
|
||||
const abiCache = this.getMergedAbiCache(args, options)
|
||||
|
||||
// The TransactPlugins to use for this transaction, falling back to the session instance
|
||||
const transactPlugins = options?.transactPlugins || this.transactPlugins
|
||||
@@ -376,7 +369,7 @@ export class Session {
|
||||
appName: this.appName,
|
||||
chain: this.chain,
|
||||
client: this.client,
|
||||
createRequest: (args: TransactArgs) => this.createRequest(args, abiCache),
|
||||
createRequest: (a: TransactArgs) => this.createRequest(a, abiCache),
|
||||
fetch: this.fetch,
|
||||
permissionLevel: this.permissionLevel,
|
||||
storage: this.storage,
|
||||
@@ -596,4 +589,51 @@ export class Session {
|
||||
})
|
||||
return prefixed
|
||||
}
|
||||
|
||||
getMergedAbiCache(args: TransactArgs, options?: TransactOptions): ABICacheInterface {
|
||||
const abiCache = options?.abiCache || this.abiCache
|
||||
|
||||
// If the abiCache supports appending ABIs, merge all from args/options
|
||||
if (!abiCache['setAbi']) {
|
||||
throw new Error('Custom `abiCache` does not support `setAbi` method.')
|
||||
}
|
||||
|
||||
// Append all ABIs that exist on the Session
|
||||
this.abis.forEach((def: TransactABIDef) => abiCache.setAbi(def.account, def.abi))
|
||||
|
||||
if (options?.abis) {
|
||||
// If we have ABIs from the TransactOptions, append
|
||||
options.abis.forEach((def: TransactABIDef) => abiCache.setAbi(def.account, def.abi))
|
||||
}
|
||||
|
||||
if (options?.contracts) {
|
||||
// Append ABIs from any Contract instances
|
||||
options.contracts.forEach((c) => abiCache.setAbi(c.account, c.abi))
|
||||
}
|
||||
|
||||
if (args.action && args.action['abi']) {
|
||||
// Merge any partial ABIs from the action
|
||||
abiCache.setAbi(args.action.account, args.action['abi'], true)
|
||||
}
|
||||
|
||||
if (args.actions) {
|
||||
args.actions.forEach((action) => {
|
||||
if (action['abi']) {
|
||||
// Merge any partial ABIs from the actions
|
||||
abiCache.setAbi(action.account, action['abi'], true)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (args.transaction && args.transaction.actions) {
|
||||
args.transaction.actions.forEach((action) => {
|
||||
if (action['abi']) {
|
||||
// Merge any partial ABIs from the transaction
|
||||
abiCache.setAbi(action.account, action['abi'], true)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return abiCache
|
||||
}
|
||||
}
|
||||
|
||||
+7
-1
@@ -1,3 +1,6 @@
|
||||
import type {ChainDefinition, Fetch, LocaleDefinitions} from '@wharfkit/common'
|
||||
import type {Contract} from '@wharfkit/contract'
|
||||
|
||||
import zlib from 'pako'
|
||||
import {
|
||||
ABIDef,
|
||||
@@ -13,7 +16,6 @@ import {
|
||||
Signature,
|
||||
} from '@wharfkit/antelope'
|
||||
import {ABICacheInterface} from '@wharfkit/abicache'
|
||||
import type {ChainDefinition, Fetch, LocaleDefinitions} from '@wharfkit/common'
|
||||
import {
|
||||
ResolvedSigningRequest,
|
||||
ResolvedTransaction,
|
||||
@@ -220,6 +222,10 @@ export interface TransactOptions {
|
||||
* Chain to use when configured with multiple chains.
|
||||
*/
|
||||
chain?: Checksum256Type
|
||||
/**
|
||||
* An array of Contract instances to cache for this call
|
||||
*/
|
||||
contracts?: Contract[]
|
||||
/**
|
||||
* The number of seconds in the future this transaction will expire.
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,7 @@ import type {Cancelable, LocaleDefinitions} from '@wharfkit/common'
|
||||
|
||||
import {LoginOptions} from './kit'
|
||||
import {LoginContext} from './login'
|
||||
import {CreateAccountContext} from './index-module'
|
||||
|
||||
/**
|
||||
* The arguments for a [[UserInterface.prompt]] call.
|
||||
@@ -36,6 +37,14 @@ export interface UserInterfaceLoginResponse {
|
||||
walletPluginIndex: number
|
||||
}
|
||||
|
||||
/**
|
||||
* The response for an account creation call of a [[UserInterface]].
|
||||
*/
|
||||
export type UserInterfaceAccountCreationResponse = {
|
||||
chain?: Checksum256Type // If account creation can only be done on one chain.
|
||||
pluginId?: string // The id of the plugin that was selected (if more than one plugin was available).
|
||||
}
|
||||
|
||||
/**
|
||||
* The options to pass to [[UserInterface.translate]].
|
||||
*/
|
||||
@@ -61,6 +70,12 @@ export interface UserInterface {
|
||||
login(context: LoginContext): Promise<UserInterfaceLoginResponse>
|
||||
/** Inform the UI that an error has occurred */
|
||||
onError: (error: Error) => Promise<void>
|
||||
/** Inform the UI that an account creation process has started */
|
||||
onAccountCreate: (
|
||||
context: CreateAccountContext
|
||||
) => Promise<UserInterfaceAccountCreationResponse>
|
||||
/** Inform the UI that a account creation call has completed **/
|
||||
onAccountCreateComplete: () => Promise<void>
|
||||
/** Inform the UI that a login call has started **/
|
||||
onLogin: () => Promise<void>
|
||||
/** Inform the UI that a login call has completed **/
|
||||
@@ -95,6 +110,10 @@ export interface UserInterface {
|
||||
export abstract class AbstractUserInterface implements UserInterface {
|
||||
abstract login(context: LoginContext): Promise<UserInterfaceLoginResponse>
|
||||
abstract onError(error: Error): Promise<void>
|
||||
abstract onAccountCreate(
|
||||
context: CreateAccountContext
|
||||
): Promise<UserInterfaceAccountCreationResponse>
|
||||
abstract onAccountCreateComplete(): Promise<void>
|
||||
abstract onLogin(options?: LoginOptions): Promise<void>
|
||||
abstract onLoginComplete(): Promise<void>
|
||||
abstract onTransact(): Promise<void>
|
||||
|
||||
+2
-1
@@ -1,7 +1,7 @@
|
||||
import {Checksum256, Checksum256Type, PermissionLevel, Signature, Struct} from '@wharfkit/antelope'
|
||||
import {Logo} from '@wharfkit/common'
|
||||
import type {LocaleDefinitions} from '@wharfkit/common'
|
||||
import {ResolvedSigningRequest} from '@wharfkit/signing-request'
|
||||
import {IdentityProof, ResolvedSigningRequest} from '@wharfkit/signing-request'
|
||||
|
||||
import {LoginContext} from './login'
|
||||
import {TransactContext} from './transact'
|
||||
@@ -72,6 +72,7 @@ export class WalletPluginMetadata extends Struct {
|
||||
export interface WalletPluginLoginResponse {
|
||||
chain: Checksum256
|
||||
permissionLevel: PermissionLevel
|
||||
identityProof?: IdentityProof
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"request": {
|
||||
"path": "https://jungle4.greymass.com/v1/resource_provider/request_transaction",
|
||||
"params": {
|
||||
"method": "POST",
|
||||
"body": "{\"ref\":\"unittest\",\"request\":\"esr://gmNgZJKo801VLz737sgCBiBgBBEMrwxCGy6bxsS-9HFhDHDhuHmw1PcxWGLCxlMcDRsnxsWq9Z4CqQUA\",\"signer\":{\"actor\":\"wharfkit1125\",\"permission\":\"test\"}}"
|
||||
}
|
||||
},
|
||||
"status": 400,
|
||||
"json": {
|
||||
"code": 400,
|
||||
"message": "A fee would be required to pay for this transaction and the account has insufficient balance.",
|
||||
"data": {}
|
||||
},
|
||||
"text": "{\"code\":400,\"message\":\"A fee would be required to pay for this transaction and the account has insufficient balance.\",\"data\":{}}"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"request": {
|
||||
"path": "https://jungle4.greymass.com/v1/chain/send_transaction",
|
||||
"params": {
|
||||
"method": "POST",
|
||||
"body": "{\"signatures\":[\"SIG_K1_KA8Pk3FprCgnRJiwuagttm6Bg6zZWc6uuNMcy3dgMKPUeRHxFRPq7ePuRriU4uVq5FgHxF9yWBJKm1kVRE4VwYFxoZ2e7s\",\"SIG_K1_KbgCQP6NzhojH4oV2D5rxhHDFhcesdbmUKQWn12sFbdR2BaB2BW3FtwaMMG2mLqsQSCWJshiG1p6uM6jpZbueuGvXxj1xZ\"],\"compression\":1,\"packed_context_free_data\":\"789c63000000010001\",\"packed_trx\":\"789c9b63f635997be29f4eb64006560606a600cdb912d22fafa632800090c32830350e2ee0f3ccc0958161599309f32b8350203f5cd7e6ec594601378e9b074b7d1f83b54cd878ca0226006483694606086071f50f06d1e2e519894569d999250a99c50a2519a90a49a9c5250a36c60c00f3a02b3a\"}"
|
||||
}
|
||||
},
|
||||
"status": 500,
|
||||
"json": {
|
||||
"code": 500,
|
||||
"message": "Internal Service Error",
|
||||
"error": {
|
||||
"code": 3040005,
|
||||
"name": "expired_tx_exception",
|
||||
"what": "Expired Transaction",
|
||||
"details": [
|
||||
{
|
||||
"message": "expired transaction d3b4cd18587d6a1756aef7e5b387c1e85f5cc48a43b81ca124a6ea554efa3b0f, expiration 2023-02-21T21:24:44.000, block time 2023-08-30T00:17:24.500",
|
||||
"file": "producer_plugin.cpp",
|
||||
"line_number": 658,
|
||||
"method": "process_incoming_transaction_async"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"text": "{\"code\":500,\"message\":\"Internal Service Error\",\"error\":{\"code\":3040005,\"name\":\"expired_tx_exception\",\"what\":\"Expired Transaction\",\"details\":[{\"message\":\"expired transaction d3b4cd18587d6a1756aef7e5b387c1e85f5cc48a43b81ca124a6ea554efa3b0f, expiration 2023-02-21T21:24:44.000, block time 2023-08-30T00:17:24.500\",\"file\":\"producer_plugin.cpp\",\"line_number\":658,\"method\":\"process_incoming_transaction_async\"}]}}"
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
{
|
||||
"request": {
|
||||
"path": "https://jungle4.greymass.com/v1/chain/send_transaction",
|
||||
"params": {
|
||||
"method": "POST",
|
||||
"body": "{\"signatures\":[\"SIG_K1_JvVkzME9L8qvkUscx36kU7FFABggB4PhX92Q6m78gktFtm5GWCZwKk7PxCgtWKvVhnMm7TfSmsesHg4mZo92egufu48oTn\"],\"compression\":1,\"packed_context_free_data\":\"789c63000000010001\",\"packed_trx\":\"789cf3ef7e97b26846aef68a250c40c0c8b0acc984f9954128901dae6b73f62ca38013c7cd83a5be8f41b20c13369eb28009346c9c1817abd67bca92152cc5c0e2ea1f0ca2c5cb33128bd2b2334b14328b154a32521592528b4b146c8c19005125213e\"}"
|
||||
}
|
||||
},
|
||||
"status": 202,
|
||||
"json": {
|
||||
"transaction_id": "c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796",
|
||||
"processed": {
|
||||
"id": "c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796",
|
||||
"block_num": 95197675,
|
||||
"block_time": "2023-08-30T00:18:32.000",
|
||||
"producer_block_id": null,
|
||||
"receipt": {
|
||||
"status": "executed",
|
||||
"cpu_usage_us": 3142,
|
||||
"net_usage_words": 18
|
||||
},
|
||||
"elapsed": 3142,
|
||||
"net_usage": 144,
|
||||
"scheduled": false,
|
||||
"action_traces": [
|
||||
{
|
||||
"action_ordinal": 1,
|
||||
"creator_action_ordinal": 0,
|
||||
"closest_unnotified_ancestor_action_ordinal": 0,
|
||||
"receipt": {
|
||||
"receiver": "eosio.token",
|
||||
"act_digest": "c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8",
|
||||
"global_sequence": 127426064,
|
||||
"recv_sequence": 4804223,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"wharfkit1111",
|
||||
636
|
||||
]
|
||||
],
|
||||
"code_sequence": 2,
|
||||
"abi_sequence": 2
|
||||
},
|
||||
"receiver": "eosio.token",
|
||||
"act": {
|
||||
"account": "eosio.token",
|
||||
"name": "transfer",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "wharfkit1111",
|
||||
"permission": "test"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"from": "wharfkit1111",
|
||||
"to": "teamgreymass",
|
||||
"quantity": "0.1337 EOS",
|
||||
"memo": "wharfkit is the best <3"
|
||||
},
|
||||
"hex_data": "104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33"
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 1435,
|
||||
"console": "",
|
||||
"trx_id": "c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796",
|
||||
"block_num": 95197675,
|
||||
"block_time": "2023-08-30T00:18:32.000",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
},
|
||||
{
|
||||
"action_ordinal": 2,
|
||||
"creator_action_ordinal": 1,
|
||||
"closest_unnotified_ancestor_action_ordinal": 1,
|
||||
"receipt": {
|
||||
"receiver": "wharfkit1111",
|
||||
"act_digest": "c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8",
|
||||
"global_sequence": 127426065,
|
||||
"recv_sequence": 214,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"wharfkit1111",
|
||||
637
|
||||
]
|
||||
],
|
||||
"code_sequence": 2,
|
||||
"abi_sequence": 2
|
||||
},
|
||||
"receiver": "wharfkit1111",
|
||||
"act": {
|
||||
"account": "eosio.token",
|
||||
"name": "transfer",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "wharfkit1111",
|
||||
"permission": "test"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"from": "wharfkit1111",
|
||||
"to": "teamgreymass",
|
||||
"quantity": "0.1337 EOS",
|
||||
"memo": "wharfkit is the best <3"
|
||||
},
|
||||
"hex_data": "104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33"
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 11,
|
||||
"console": "",
|
||||
"trx_id": "c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796",
|
||||
"block_num": 95197675,
|
||||
"block_time": "2023-08-30T00:18:32.000",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
},
|
||||
{
|
||||
"action_ordinal": 3,
|
||||
"creator_action_ordinal": 1,
|
||||
"closest_unnotified_ancestor_action_ordinal": 1,
|
||||
"receipt": {
|
||||
"receiver": "teamgreymass",
|
||||
"act_digest": "c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8",
|
||||
"global_sequence": 127426066,
|
||||
"recv_sequence": 827,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"wharfkit1111",
|
||||
638
|
||||
]
|
||||
],
|
||||
"code_sequence": 2,
|
||||
"abi_sequence": 2
|
||||
},
|
||||
"receiver": "teamgreymass",
|
||||
"act": {
|
||||
"account": "eosio.token",
|
||||
"name": "transfer",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "wharfkit1111",
|
||||
"permission": "test"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"from": "wharfkit1111",
|
||||
"to": "teamgreymass",
|
||||
"quantity": "0.1337 EOS",
|
||||
"memo": "wharfkit is the best <3"
|
||||
},
|
||||
"hex_data": "104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33"
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 356,
|
||||
"console": "",
|
||||
"trx_id": "c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796",
|
||||
"block_num": 95197675,
|
||||
"block_time": "2023-08-30T00:18:32.000",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
}
|
||||
],
|
||||
"account_ram_delta": null,
|
||||
"except": null,
|
||||
"error_code": null
|
||||
}
|
||||
},
|
||||
"text": "{\"transaction_id\":\"c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796\",\"processed\":{\"id\":\"c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796\",\"block_num\":95197675,\"block_time\":\"2023-08-30T00:18:32.000\",\"producer_block_id\":null,\"receipt\":{\"status\":\"executed\",\"cpu_usage_us\":3142,\"net_usage_words\":18},\"elapsed\":3142,\"net_usage\":144,\"scheduled\":false,\"action_traces\":[{\"action_ordinal\":1,\"creator_action_ordinal\":0,\"closest_unnotified_ancestor_action_ordinal\":0,\"receipt\":{\"receiver\":\"eosio.token\",\"act_digest\":\"c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8\",\"global_sequence\":127426064,\"recv_sequence\":4804223,\"auth_sequence\":[[\"wharfkit1111\",636]],\"code_sequence\":2,\"abi_sequence\":2},\"receiver\":\"eosio.token\",\"act\":{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1111\",\"permission\":\"test\"}],\"data\":{\"from\":\"wharfkit1111\",\"to\":\"teamgreymass\",\"quantity\":\"0.1337 EOS\",\"memo\":\"wharfkit is the best <3\"},\"hex_data\":\"104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"},\"context_free\":false,\"elapsed\":1435,\"console\":\"\",\"trx_id\":\"c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796\",\"block_num\":95197675,\"block_time\":\"2023-08-30T00:18:32.000\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"},{\"action_ordinal\":2,\"creator_action_ordinal\":1,\"closest_unnotified_ancestor_action_ordinal\":1,\"receipt\":{\"receiver\":\"wharfkit1111\",\"act_digest\":\"c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8\",\"global_sequence\":127426065,\"recv_sequence\":214,\"auth_sequence\":[[\"wharfkit1111\",637]],\"code_sequence\":2,\"abi_sequence\":2},\"receiver\":\"wharfkit1111\",\"act\":{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1111\",\"permission\":\"test\"}],\"data\":{\"from\":\"wharfkit1111\",\"to\":\"teamgreymass\",\"quantity\":\"0.1337 EOS\",\"memo\":\"wharfkit is the best <3\"},\"hex_data\":\"104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"},\"context_free\":false,\"elapsed\":11,\"console\":\"\",\"trx_id\":\"c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796\",\"block_num\":95197675,\"block_time\":\"2023-08-30T00:18:32.000\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"},{\"action_ordinal\":3,\"creator_action_ordinal\":1,\"closest_unnotified_ancestor_action_ordinal\":1,\"receipt\":{\"receiver\":\"teamgreymass\",\"act_digest\":\"c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8\",\"global_sequence\":127426066,\"recv_sequence\":827,\"auth_sequence\":[[\"wharfkit1111\",638]],\"code_sequence\":2,\"abi_sequence\":2},\"receiver\":\"teamgreymass\",\"act\":{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1111\",\"permission\":\"test\"}],\"data\":{\"from\":\"wharfkit1111\",\"to\":\"teamgreymass\",\"quantity\":\"0.1337 EOS\",\"memo\":\"wharfkit is the best <3\"},\"hex_data\":\"104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"},\"context_free\":false,\"elapsed\":356,\"console\":\"\",\"trx_id\":\"c67ee5bf9285f280d96943d910d600eb4a20b2893b25807164120625cad0a796\",\"block_num\":95197675,\"block_time\":\"2023-08-30T00:18:32.000\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"}],\"account_ram_delta\":null,\"except\":null,\"error_code\":null}}"
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
{
|
||||
"request": {
|
||||
"path": "https://jungle4.greymass.com/v1/chain/send_transaction",
|
||||
"params": {
|
||||
"method": "POST",
|
||||
"body": "{\"signatures\":[\"SIG_K1_K9Ac3ndrXYAxjPbGnYJRJ7xm3zx32aRUGYW7JmRCPbpTdQJCSCScfah9MVHyoMoKBgzybHbc8BpjxBdHiX1v89fCZiX4X3\",\"SIG_K1_K1SUGcpWPszPE6NMWcqL2wr3VtRmojUK6NvVcw3Vy8MZdEUCRfZxJk5pVgJdvrXJsVJottnhm1U1HziebGBqdFz89mGSsc\"],\"compression\":1,\"packed_context_free_data\":\"789c63000000010001\",\"packed_trx\":\"789c0be879976234d39cc5259d81958181294073ae84f4cbaba90c2000e4300a4c8d830bf83c3370656058d664c2fcca2014c80fd7b5397b9651c08de3e6c152dfc7602d13369eb2800900d9609a910102585cfd8341b478794662515a7666894266b1424946aa42526a7189828d3103008d782a77\"}"
|
||||
}
|
||||
},
|
||||
"status": 202,
|
||||
"json": {
|
||||
"transaction_id": "e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77",
|
||||
"processed": {
|
||||
"id": "e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77",
|
||||
"block_num": 95197831,
|
||||
"block_time": "2023-08-30T00:19:50.000",
|
||||
"producer_block_id": null,
|
||||
"receipt": {
|
||||
"status": "executed",
|
||||
"cpu_usage_us": 258,
|
||||
"net_usage_words": 22
|
||||
},
|
||||
"elapsed": 258,
|
||||
"net_usage": 176,
|
||||
"scheduled": false,
|
||||
"action_traces": [
|
||||
{
|
||||
"action_ordinal": 1,
|
||||
"creator_action_ordinal": 0,
|
||||
"closest_unnotified_ancestor_action_ordinal": 0,
|
||||
"receipt": {
|
||||
"receiver": "greymassnoop",
|
||||
"act_digest": "7e44678e9aa77c87176ebec3185e93569fd2768bc7d0d5a4e6506a955add5863",
|
||||
"global_sequence": 127426234,
|
||||
"recv_sequence": 197,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"greymassfuel",
|
||||
181
|
||||
]
|
||||
],
|
||||
"code_sequence": 0,
|
||||
"abi_sequence": 1
|
||||
},
|
||||
"receiver": "greymassnoop",
|
||||
"act": {
|
||||
"account": "greymassnoop",
|
||||
"name": "noop",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "greymassfuel",
|
||||
"permission": "cosign"
|
||||
}
|
||||
],
|
||||
"data": ""
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 11,
|
||||
"console": "",
|
||||
"trx_id": "e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77",
|
||||
"block_num": 95197831,
|
||||
"block_time": "2023-08-30T00:19:50.000",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
},
|
||||
{
|
||||
"action_ordinal": 2,
|
||||
"creator_action_ordinal": 0,
|
||||
"closest_unnotified_ancestor_action_ordinal": 0,
|
||||
"receipt": {
|
||||
"receiver": "eosio.token",
|
||||
"act_digest": "1857230261daaec7550bdf7b841708fd94a3c2027fa67c47033d582da956ea7c",
|
||||
"global_sequence": 127426235,
|
||||
"recv_sequence": 4804224,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"wharfkit1131",
|
||||
120
|
||||
]
|
||||
],
|
||||
"code_sequence": 2,
|
||||
"abi_sequence": 2
|
||||
},
|
||||
"receiver": "eosio.token",
|
||||
"act": {
|
||||
"account": "eosio.token",
|
||||
"name": "transfer",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "wharfkit1131",
|
||||
"permission": "test"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"from": "wharfkit1131",
|
||||
"to": "wharfkittest",
|
||||
"quantity": "0.0001 EOS",
|
||||
"memo": "wharfkit is the best <3"
|
||||
},
|
||||
"hex_data": "104608d9c1754de390b1cad9c1754de3010000000000000004454f53000000001777686172666b6974206973207468652062657374203c33"
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 45,
|
||||
"console": "",
|
||||
"trx_id": "e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77",
|
||||
"block_num": 95197831,
|
||||
"block_time": "2023-08-30T00:19:50.000",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
},
|
||||
{
|
||||
"action_ordinal": 3,
|
||||
"creator_action_ordinal": 2,
|
||||
"closest_unnotified_ancestor_action_ordinal": 2,
|
||||
"receipt": {
|
||||
"receiver": "wharfkit1131",
|
||||
"act_digest": "1857230261daaec7550bdf7b841708fd94a3c2027fa67c47033d582da956ea7c",
|
||||
"global_sequence": 127426236,
|
||||
"recv_sequence": 43,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"wharfkit1131",
|
||||
121
|
||||
]
|
||||
],
|
||||
"code_sequence": 2,
|
||||
"abi_sequence": 2
|
||||
},
|
||||
"receiver": "wharfkit1131",
|
||||
"act": {
|
||||
"account": "eosio.token",
|
||||
"name": "transfer",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "wharfkit1131",
|
||||
"permission": "test"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"from": "wharfkit1131",
|
||||
"to": "wharfkittest",
|
||||
"quantity": "0.0001 EOS",
|
||||
"memo": "wharfkit is the best <3"
|
||||
},
|
||||
"hex_data": "104608d9c1754de390b1cad9c1754de3010000000000000004454f53000000001777686172666b6974206973207468652062657374203c33"
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 12,
|
||||
"console": "",
|
||||
"trx_id": "e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77",
|
||||
"block_num": 95197831,
|
||||
"block_time": "2023-08-30T00:19:50.000",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
},
|
||||
{
|
||||
"action_ordinal": 4,
|
||||
"creator_action_ordinal": 2,
|
||||
"closest_unnotified_ancestor_action_ordinal": 2,
|
||||
"receipt": {
|
||||
"receiver": "wharfkittest",
|
||||
"act_digest": "1857230261daaec7550bdf7b841708fd94a3c2027fa67c47033d582da956ea7c",
|
||||
"global_sequence": 127426237,
|
||||
"recv_sequence": 314,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"wharfkit1131",
|
||||
122
|
||||
]
|
||||
],
|
||||
"code_sequence": 2,
|
||||
"abi_sequence": 2
|
||||
},
|
||||
"receiver": "wharfkittest",
|
||||
"act": {
|
||||
"account": "eosio.token",
|
||||
"name": "transfer",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "wharfkit1131",
|
||||
"permission": "test"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"from": "wharfkit1131",
|
||||
"to": "wharfkittest",
|
||||
"quantity": "0.0001 EOS",
|
||||
"memo": "wharfkit is the best <3"
|
||||
},
|
||||
"hex_data": "104608d9c1754de390b1cad9c1754de3010000000000000004454f53000000001777686172666b6974206973207468652062657374203c33"
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 11,
|
||||
"console": "",
|
||||
"trx_id": "e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77",
|
||||
"block_num": 95197831,
|
||||
"block_time": "2023-08-30T00:19:50.000",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
}
|
||||
],
|
||||
"account_ram_delta": null,
|
||||
"except": null,
|
||||
"error_code": null
|
||||
}
|
||||
},
|
||||
"text": "{\"transaction_id\":\"e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77\",\"processed\":{\"id\":\"e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77\",\"block_num\":95197831,\"block_time\":\"2023-08-30T00:19:50.000\",\"producer_block_id\":null,\"receipt\":{\"status\":\"executed\",\"cpu_usage_us\":258,\"net_usage_words\":22},\"elapsed\":258,\"net_usage\":176,\"scheduled\":false,\"action_traces\":[{\"action_ordinal\":1,\"creator_action_ordinal\":0,\"closest_unnotified_ancestor_action_ordinal\":0,\"receipt\":{\"receiver\":\"greymassnoop\",\"act_digest\":\"7e44678e9aa77c87176ebec3185e93569fd2768bc7d0d5a4e6506a955add5863\",\"global_sequence\":127426234,\"recv_sequence\":197,\"auth_sequence\":[[\"greymassfuel\",181]],\"code_sequence\":0,\"abi_sequence\":1},\"receiver\":\"greymassnoop\",\"act\":{\"account\":\"greymassnoop\",\"name\":\"noop\",\"authorization\":[{\"actor\":\"greymassfuel\",\"permission\":\"cosign\"}],\"data\":\"\"},\"context_free\":false,\"elapsed\":11,\"console\":\"\",\"trx_id\":\"e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77\",\"block_num\":95197831,\"block_time\":\"2023-08-30T00:19:50.000\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"},{\"action_ordinal\":2,\"creator_action_ordinal\":0,\"closest_unnotified_ancestor_action_ordinal\":0,\"receipt\":{\"receiver\":\"eosio.token\",\"act_digest\":\"1857230261daaec7550bdf7b841708fd94a3c2027fa67c47033d582da956ea7c\",\"global_sequence\":127426235,\"recv_sequence\":4804224,\"auth_sequence\":[[\"wharfkit1131\",120]],\"code_sequence\":2,\"abi_sequence\":2},\"receiver\":\"eosio.token\",\"act\":{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1131\",\"permission\":\"test\"}],\"data\":{\"from\":\"wharfkit1131\",\"to\":\"wharfkittest\",\"quantity\":\"0.0001 EOS\",\"memo\":\"wharfkit is the best <3\"},\"hex_data\":\"104608d9c1754de390b1cad9c1754de3010000000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"},\"context_free\":false,\"elapsed\":45,\"console\":\"\",\"trx_id\":\"e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77\",\"block_num\":95197831,\"block_time\":\"2023-08-30T00:19:50.000\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"},{\"action_ordinal\":3,\"creator_action_ordinal\":2,\"closest_unnotified_ancestor_action_ordinal\":2,\"receipt\":{\"receiver\":\"wharfkit1131\",\"act_digest\":\"1857230261daaec7550bdf7b841708fd94a3c2027fa67c47033d582da956ea7c\",\"global_sequence\":127426236,\"recv_sequence\":43,\"auth_sequence\":[[\"wharfkit1131\",121]],\"code_sequence\":2,\"abi_sequence\":2},\"receiver\":\"wharfkit1131\",\"act\":{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1131\",\"permission\":\"test\"}],\"data\":{\"from\":\"wharfkit1131\",\"to\":\"wharfkittest\",\"quantity\":\"0.0001 EOS\",\"memo\":\"wharfkit is the best <3\"},\"hex_data\":\"104608d9c1754de390b1cad9c1754de3010000000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"},\"context_free\":false,\"elapsed\":12,\"console\":\"\",\"trx_id\":\"e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77\",\"block_num\":95197831,\"block_time\":\"2023-08-30T00:19:50.000\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"},{\"action_ordinal\":4,\"creator_action_ordinal\":2,\"closest_unnotified_ancestor_action_ordinal\":2,\"receipt\":{\"receiver\":\"wharfkittest\",\"act_digest\":\"1857230261daaec7550bdf7b841708fd94a3c2027fa67c47033d582da956ea7c\",\"global_sequence\":127426237,\"recv_sequence\":314,\"auth_sequence\":[[\"wharfkit1131\",122]],\"code_sequence\":2,\"abi_sequence\":2},\"receiver\":\"wharfkittest\",\"act\":{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1131\",\"permission\":\"test\"}],\"data\":{\"from\":\"wharfkit1131\",\"to\":\"wharfkittest\",\"quantity\":\"0.0001 EOS\",\"memo\":\"wharfkit is the best <3\"},\"hex_data\":\"104608d9c1754de390b1cad9c1754de3010000000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"},\"context_free\":false,\"elapsed\":11,\"console\":\"\",\"trx_id\":\"e1e4bf564e36d7b9c1f4813c069974484772b74ee2e8e20336c906c6fd536e77\",\"block_num\":95197831,\"block_time\":\"2023-08-30T00:19:50.000\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"}],\"account_ram_delta\":null,\"except\":null,\"error_code\":null}}"
|
||||
}
|
||||
@@ -6,17 +6,6 @@
|
||||
"body": "{\"ref\":\"unittest\",\"request\":\"esr://gmMsfmIRpc7x7DpLh8nvg-zz9VdvrLYRihbJ-mIxXW5CYY4vA8OyJhPmVwahDAwM4bo2Z88yCrhx3DxY6vuYAQQmbDxlARMAssE0IwMEsLj6B4No8fKMxKK07MwShcxihZKMVIWk1OISBRtjoBQA\",\"signer\":{\"actor\":\"wharfkit1131\",\"permission\":\"test\"}}"
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"access-control-allow-headers": "X-Requested-With,Accept,Content-Type,Origin",
|
||||
"access-control-allow-methods": "OPTIONS, GET, POST, GET, POST, OPTIONS",
|
||||
"access-control-allow-origin": "*",
|
||||
"access-control-request-method": "*",
|
||||
"connection": "close",
|
||||
"content-length": "740",
|
||||
"date": "Tue, 21 Feb 2023 21:19:43 GMT",
|
||||
"host": "jungle4.greymass.com",
|
||||
"server": "nginx/1.18.0 (Ubuntu)"
|
||||
},
|
||||
"status": 200,
|
||||
"json": {
|
||||
"code": 200,
|
||||
@@ -24,9 +13,9 @@
|
||||
"request": [
|
||||
"transaction",
|
||||
{
|
||||
"expiration": "2023-02-21T21:24:44",
|
||||
"ref_block_num": 37131,
|
||||
"ref_block_prefix": 1359383036,
|
||||
"expiration": "2023-08-30T00:24:48",
|
||||
"ref_block_num": 39218,
|
||||
"ref_block_prefix": 1732510775,
|
||||
"max_net_usage_words": 0,
|
||||
"max_cpu_usage_ms": 5,
|
||||
"delay_sec": 0,
|
||||
@@ -59,10 +48,10 @@
|
||||
}
|
||||
],
|
||||
"signatures": [
|
||||
"SIG_K1_KA8Pk3FprCgnRJiwuagttm6Bg6zZWc6uuNMcy3dgMKPUeRHxFRPq7ePuRriU4uVq5FgHxF9yWBJKm1kVRE4VwYFxoZ2e7s"
|
||||
"SIG_K1_K9Ac3ndrXYAxjPbGnYJRJ7xm3zx32aRUGYW7JmRCPbpTdQJCSCScfah9MVHyoMoKBgzybHbc8BpjxBdHiX1v89fCZiX4X3"
|
||||
],
|
||||
"version": null
|
||||
}
|
||||
},
|
||||
"text": "{\"code\":200,\"data\":{\"request\":[\"transaction\",{\"expiration\":\"2023-02-21T21:24:44\",\"ref_block_num\":37131,\"ref_block_prefix\":1359383036,\"max_net_usage_words\":0,\"max_cpu_usage_ms\":5,\"delay_sec\":0,\"context_free_actions\":[],\"actions\":[{\"account\":\"greymassnoop\",\"name\":\"noop\",\"authorization\":[{\"actor\":\"greymassfuel\",\"permission\":\"cosign\"}],\"data\":\"\"},{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1131\",\"permission\":\"test\"}],\"data\":\"104608d9c1754de390b1cad9c1754de3010000000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"}],\"transaction_extensions\":[]}],\"signatures\":[\"SIG_K1_KA8Pk3FprCgnRJiwuagttm6Bg6zZWc6uuNMcy3dgMKPUeRHxFRPq7ePuRriU4uVq5FgHxF9yWBJKm1kVRE4VwYFxoZ2e7s\"],\"version\":null}}"
|
||||
"text": "{\"code\":200,\"data\":{\"request\":[\"transaction\",{\"expiration\":\"2023-08-30T00:24:48\",\"ref_block_num\":39218,\"ref_block_prefix\":1732510775,\"max_net_usage_words\":0,\"max_cpu_usage_ms\":5,\"delay_sec\":0,\"context_free_actions\":[],\"actions\":[{\"account\":\"greymassnoop\",\"name\":\"noop\",\"authorization\":[{\"actor\":\"greymassfuel\",\"permission\":\"cosign\"}],\"data\":\"\"},{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1131\",\"permission\":\"test\"}],\"data\":\"104608d9c1754de390b1cad9c1754de3010000000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"}],\"transaction_extensions\":[]}],\"signatures\":[\"SIG_K1_K9Ac3ndrXYAxjPbGnYJRJ7xm3zx32aRUGYW7JmRCPbpTdQJCSCScfah9MVHyoMoKBgzybHbc8BpjxBdHiX1v89fCZiX4X3\"],\"version\":null}}"
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
{
|
||||
"request": {
|
||||
"path": "https://jungle4.greymass.com/v1/chain/send_transaction",
|
||||
"params": {
|
||||
"method": "POST",
|
||||
"body": "{\"signatures\":[\"SIG_K1_KhJnW4ZNfhksc8eNVLfMT3nkHqPQWtxLfZe2nemDy4EkPWbUsJpe5Hy4jjWiWXhgDPWcxjTtYUSnvyRb8Fkyo7y7Gp89Mf\"],\"compression\":1,\"packed_context_free_data\":\"789c63000000010001\",\"packed_trx\":\"789c93a8f34d552f3ef7eec8020620606458d664c2fcca2014c80ed7b5397b9651c089e3e6c152dfc7205986091b4f59c0041a364e8c8b55eb3d65c90a96626071f50f06d1e2e519894569d999250a99c50a2519a90a49a9c5250a36c60c002eef20f6\"}"
|
||||
}
|
||||
},
|
||||
"status": 202,
|
||||
"json": {
|
||||
"transaction_id": "d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2",
|
||||
"processed": {
|
||||
"id": "d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2",
|
||||
"block_num": 107639927,
|
||||
"block_time": "2023-11-10T00:47:29.500",
|
||||
"producer_block_id": null,
|
||||
"receipt": {
|
||||
"status": "executed",
|
||||
"cpu_usage_us": 163,
|
||||
"net_usage_words": 18
|
||||
},
|
||||
"elapsed": 163,
|
||||
"net_usage": 144,
|
||||
"scheduled": false,
|
||||
"action_traces": [
|
||||
{
|
||||
"action_ordinal": 1,
|
||||
"creator_action_ordinal": 0,
|
||||
"closest_unnotified_ancestor_action_ordinal": 0,
|
||||
"receipt": {
|
||||
"receiver": "eosio.token",
|
||||
"act_digest": "c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8",
|
||||
"global_sequence": 141669535,
|
||||
"recv_sequence": 4838671,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"wharfkit1111",
|
||||
939
|
||||
]
|
||||
],
|
||||
"code_sequence": 3,
|
||||
"abi_sequence": 3
|
||||
},
|
||||
"receiver": "eosio.token",
|
||||
"act": {
|
||||
"account": "eosio.token",
|
||||
"name": "transfer",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "wharfkit1111",
|
||||
"permission": "test"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"from": "wharfkit1111",
|
||||
"to": "teamgreymass",
|
||||
"quantity": "0.1337 EOS",
|
||||
"memo": "wharfkit is the best <3"
|
||||
},
|
||||
"hex_data": "104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33"
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 68,
|
||||
"console": "",
|
||||
"trx_id": "d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2",
|
||||
"block_num": 107639927,
|
||||
"block_time": "2023-11-10T00:47:29.500",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
},
|
||||
{
|
||||
"action_ordinal": 2,
|
||||
"creator_action_ordinal": 1,
|
||||
"closest_unnotified_ancestor_action_ordinal": 1,
|
||||
"receipt": {
|
||||
"receiver": "wharfkit1111",
|
||||
"act_digest": "c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8",
|
||||
"global_sequence": 141669536,
|
||||
"recv_sequence": 315,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"wharfkit1111",
|
||||
940
|
||||
]
|
||||
],
|
||||
"code_sequence": 3,
|
||||
"abi_sequence": 3
|
||||
},
|
||||
"receiver": "wharfkit1111",
|
||||
"act": {
|
||||
"account": "eosio.token",
|
||||
"name": "transfer",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "wharfkit1111",
|
||||
"permission": "test"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"from": "wharfkit1111",
|
||||
"to": "teamgreymass",
|
||||
"quantity": "0.1337 EOS",
|
||||
"memo": "wharfkit is the best <3"
|
||||
},
|
||||
"hex_data": "104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33"
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 2,
|
||||
"console": "",
|
||||
"trx_id": "d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2",
|
||||
"block_num": 107639927,
|
||||
"block_time": "2023-11-10T00:47:29.500",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
},
|
||||
{
|
||||
"action_ordinal": 3,
|
||||
"creator_action_ordinal": 1,
|
||||
"closest_unnotified_ancestor_action_ordinal": 1,
|
||||
"receipt": {
|
||||
"receiver": "teamgreymass",
|
||||
"act_digest": "c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8",
|
||||
"global_sequence": 141669537,
|
||||
"recv_sequence": 964,
|
||||
"auth_sequence": [
|
||||
[
|
||||
"wharfkit1111",
|
||||
941
|
||||
]
|
||||
],
|
||||
"code_sequence": 3,
|
||||
"abi_sequence": 3
|
||||
},
|
||||
"receiver": "teamgreymass",
|
||||
"act": {
|
||||
"account": "eosio.token",
|
||||
"name": "transfer",
|
||||
"authorization": [
|
||||
{
|
||||
"actor": "wharfkit1111",
|
||||
"permission": "test"
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"from": "wharfkit1111",
|
||||
"to": "teamgreymass",
|
||||
"quantity": "0.1337 EOS",
|
||||
"memo": "wharfkit is the best <3"
|
||||
},
|
||||
"hex_data": "104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33"
|
||||
},
|
||||
"context_free": false,
|
||||
"elapsed": 4,
|
||||
"console": "",
|
||||
"trx_id": "d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2",
|
||||
"block_num": 107639927,
|
||||
"block_time": "2023-11-10T00:47:29.500",
|
||||
"producer_block_id": null,
|
||||
"account_ram_deltas": [],
|
||||
"except": null,
|
||||
"error_code": null,
|
||||
"return_value_hex_data": ""
|
||||
}
|
||||
],
|
||||
"account_ram_delta": null,
|
||||
"except": null,
|
||||
"error_code": null
|
||||
}
|
||||
},
|
||||
"text": "{\"transaction_id\":\"d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2\",\"processed\":{\"id\":\"d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2\",\"block_num\":107639927,\"block_time\":\"2023-11-10T00:47:29.500\",\"producer_block_id\":null,\"receipt\":{\"status\":\"executed\",\"cpu_usage_us\":163,\"net_usage_words\":18},\"elapsed\":163,\"net_usage\":144,\"scheduled\":false,\"action_traces\":[{\"action_ordinal\":1,\"creator_action_ordinal\":0,\"closest_unnotified_ancestor_action_ordinal\":0,\"receipt\":{\"receiver\":\"eosio.token\",\"act_digest\":\"c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8\",\"global_sequence\":141669535,\"recv_sequence\":4838671,\"auth_sequence\":[[\"wharfkit1111\",939]],\"code_sequence\":3,\"abi_sequence\":3},\"receiver\":\"eosio.token\",\"act\":{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1111\",\"permission\":\"test\"}],\"data\":{\"from\":\"wharfkit1111\",\"to\":\"teamgreymass\",\"quantity\":\"0.1337 EOS\",\"memo\":\"wharfkit is the best <3\"},\"hex_data\":\"104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"},\"context_free\":false,\"elapsed\":68,\"console\":\"\",\"trx_id\":\"d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2\",\"block_num\":107639927,\"block_time\":\"2023-11-10T00:47:29.500\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"},{\"action_ordinal\":2,\"creator_action_ordinal\":1,\"closest_unnotified_ancestor_action_ordinal\":1,\"receipt\":{\"receiver\":\"wharfkit1111\",\"act_digest\":\"c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8\",\"global_sequence\":141669536,\"recv_sequence\":315,\"auth_sequence\":[[\"wharfkit1111\",940]],\"code_sequence\":3,\"abi_sequence\":3},\"receiver\":\"wharfkit1111\",\"act\":{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1111\",\"permission\":\"test\"}],\"data\":{\"from\":\"wharfkit1111\",\"to\":\"teamgreymass\",\"quantity\":\"0.1337 EOS\",\"memo\":\"wharfkit is the best <3\"},\"hex_data\":\"104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"},\"context_free\":false,\"elapsed\":2,\"console\":\"\",\"trx_id\":\"d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2\",\"block_num\":107639927,\"block_time\":\"2023-11-10T00:47:29.500\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"},{\"action_ordinal\":3,\"creator_action_ordinal\":1,\"closest_unnotified_ancestor_action_ordinal\":1,\"receipt\":{\"receiver\":\"teamgreymass\",\"act_digest\":\"c2f86a0c8286083bb52db5e87893c5c6d0873746cf099d82d97e216bec6cdcf8\",\"global_sequence\":141669537,\"recv_sequence\":964,\"auth_sequence\":[[\"wharfkit1111\",941]],\"code_sequence\":3,\"abi_sequence\":3},\"receiver\":\"teamgreymass\",\"act\":{\"account\":\"eosio.token\",\"name\":\"transfer\",\"authorization\":[{\"actor\":\"wharfkit1111\",\"permission\":\"test\"}],\"data\":{\"from\":\"wharfkit1111\",\"to\":\"teamgreymass\",\"quantity\":\"0.1337 EOS\",\"memo\":\"wharfkit is the best <3\"},\"hex_data\":\"104208d9c1754de380b1915e5d268dca390500000000000004454f53000000001777686172666b6974206973207468652062657374203c33\"},\"context_free\":false,\"elapsed\":4,\"console\":\"\",\"trx_id\":\"d21652c09fa67f2353d074aa5cb00d6e2691b1160a5ea41d630fdd33614d11c2\",\"block_num\":107639927,\"block_time\":\"2023-11-10T00:47:29.500\",\"producer_block_id\":null,\"account_ram_deltas\":[],\"except\":null,\"error_code\":null,\"return_value_hex_data\":\"\"}],\"account_ram_delta\":null,\"except\":null,\"error_code\":null}}"
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"request": {
|
||||
"path": "https://jungle4.greymass.com/v1/chain/get_info",
|
||||
"params": {
|
||||
"method": "GET"
|
||||
}
|
||||
},
|
||||
"status": 200,
|
||||
"json": {
|
||||
"server_version": "905c5cc9",
|
||||
"chain_id": "73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d",
|
||||
"head_block_num": 107639924,
|
||||
"last_irreversible_block_num": 107639591,
|
||||
"last_irreversible_block_id": "066a732716f05307ceeec4a0899b01ddb12b169f70a2444879532f133eb5b6b9",
|
||||
"head_block_id": "066a747425213e93c296f19037bdf9b4c45e293103cdde6fe78d5f2a55d6b1d7",
|
||||
"head_block_time": "2023-11-10T00:47:28.000",
|
||||
"head_block_producer": "lioninjungle",
|
||||
"virtual_block_cpu_limit": 200000000,
|
||||
"virtual_block_net_limit": 1048576000,
|
||||
"block_cpu_limit": 200000,
|
||||
"block_net_limit": 1048576,
|
||||
"server_version_string": "v3.1.3",
|
||||
"fork_db_head_block_num": 107639924,
|
||||
"fork_db_head_block_id": "066a747425213e93c296f19037bdf9b4c45e293103cdde6fe78d5f2a55d6b1d7",
|
||||
"server_full_version_string": "v3.1.3-905c5cc900b4e88aed4ab6912009127bf9f4f140",
|
||||
"total_cpu_weight": "120613297879319",
|
||||
"total_net_weight": "117529300001371",
|
||||
"earliest_available_block_num": 107463372,
|
||||
"last_irreversible_block_time": "2023-11-10T00:44:41.500"
|
||||
},
|
||||
"text": "{\"server_version\":\"905c5cc9\",\"chain_id\":\"73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d\",\"head_block_num\":107639924,\"last_irreversible_block_num\":107639591,\"last_irreversible_block_id\":\"066a732716f05307ceeec4a0899b01ddb12b169f70a2444879532f133eb5b6b9\",\"head_block_id\":\"066a747425213e93c296f19037bdf9b4c45e293103cdde6fe78d5f2a55d6b1d7\",\"head_block_time\":\"2023-11-10T00:47:28.000\",\"head_block_producer\":\"lioninjungle\",\"virtual_block_cpu_limit\":200000000,\"virtual_block_net_limit\":1048576000,\"block_cpu_limit\":200000,\"block_net_limit\":1048576,\"server_version_string\":\"v3.1.3\",\"fork_db_head_block_num\":107639924,\"fork_db_head_block_id\":\"066a747425213e93c296f19037bdf9b4c45e293103cdde6fe78d5f2a55d6b1d7\",\"server_full_version_string\":\"v3.1.3-905c5cc900b4e88aed4ab6912009127bf9f4f140\",\"total_cpu_weight\":\"120613297879319\",\"total_net_weight\":\"117529300001371\",\"earliest_available_block_num\":107463372,\"last_irreversible_block_time\":\"2023-11-10T00:44:41.500\"}"
|
||||
}
|
||||
@@ -5,40 +5,28 @@
|
||||
"method": "POST"
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"access-control-allow-headers": "X-Requested-With,Accept,Content-Type,Origin",
|
||||
"access-control-allow-methods": "GET, POST, OPTIONS",
|
||||
"access-control-allow-origin": "*",
|
||||
"connection": "close",
|
||||
"content-length": "964",
|
||||
"content-type": "application/json",
|
||||
"date": "Wed, 07 Dec 2022 22:38:13 GMT",
|
||||
"host": "jungle4.greymass.com",
|
||||
"server": "nginx/1.18.0 (Ubuntu)",
|
||||
"x-cached": "EXPIRED"
|
||||
},
|
||||
"status": 200,
|
||||
"json": {
|
||||
"server_version": "9efc569a",
|
||||
"server_version": "905c5cc9",
|
||||
"chain_id": "73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d",
|
||||
"head_block_num": 49482042,
|
||||
"last_irreversible_block_num": 49481715,
|
||||
"last_irreversible_block_id": "02f307f36a10eed228ab7a8d06e7a98d17be6ea3985c27585c8f791a6d29effb",
|
||||
"head_block_id": "02f3093a95ed306eec725281aab13ddb26fb38646e737e6765de6d9050c23b43",
|
||||
"head_block_time": "2022-12-07T22:38:13.500",
|
||||
"head_block_producer": "gorillapower",
|
||||
"head_block_num": 95197673,
|
||||
"last_irreversible_block_num": 95197346,
|
||||
"last_irreversible_block_id": "05ac98a210f532f86d2ba8a4b7566535e84826f8bcdfbcddf46a085401055ea2",
|
||||
"head_block_id": "05ac99e9acc66b4c381ce4321e9b9b57ffae75ca4d838af3dcaa4a3b1e3665fb",
|
||||
"head_block_time": "2023-08-30T00:18:31.000",
|
||||
"head_block_producer": "hippopotamus",
|
||||
"virtual_block_cpu_limit": 200000000,
|
||||
"virtual_block_net_limit": 1048576000,
|
||||
"block_cpu_limit": 200000,
|
||||
"block_net_limit": 1048576,
|
||||
"server_version_string": "v3.2.0",
|
||||
"fork_db_head_block_num": 49482042,
|
||||
"fork_db_head_block_id": "02f3093a95ed306eec725281aab13ddb26fb38646e737e6765de6d9050c23b43",
|
||||
"server_full_version_string": "v3.2.0-9efc569ae5eed75a6dd6c6ada67ef80eb3bbf366",
|
||||
"total_cpu_weight": "120460592801659",
|
||||
"total_net_weight": "117529135293359",
|
||||
"earliest_available_block_num": 49307590,
|
||||
"last_irreversible_block_time": "2022-12-07T22:35:29.500"
|
||||
"server_version_string": "v3.1.3",
|
||||
"fork_db_head_block_num": 95197673,
|
||||
"fork_db_head_block_id": "05ac99e9acc66b4c381ce4321e9b9b57ffae75ca4d838af3dcaa4a3b1e3665fb",
|
||||
"server_full_version_string": "v3.1.3-905c5cc900b4e88aed4ab6912009127bf9f4f140",
|
||||
"total_cpu_weight": "120605076979422",
|
||||
"total_net_weight": "117529273589365",
|
||||
"earliest_available_block_num": 95018734,
|
||||
"last_irreversible_block_time": "2023-08-30T00:15:47.500"
|
||||
},
|
||||
"text": "{\"server_version\":\"9efc569a\",\"chain_id\":\"73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d\",\"head_block_num\":49482042,\"last_irreversible_block_num\":49481715,\"last_irreversible_block_id\":\"02f307f36a10eed228ab7a8d06e7a98d17be6ea3985c27585c8f791a6d29effb\",\"head_block_id\":\"02f3093a95ed306eec725281aab13ddb26fb38646e737e6765de6d9050c23b43\",\"head_block_time\":\"2022-12-07T22:38:13.500\",\"head_block_producer\":\"gorillapower\",\"virtual_block_cpu_limit\":200000000,\"virtual_block_net_limit\":1048576000,\"block_cpu_limit\":200000,\"block_net_limit\":1048576,\"server_version_string\":\"v3.2.0\",\"fork_db_head_block_num\":49482042,\"fork_db_head_block_id\":\"02f3093a95ed306eec725281aab13ddb26fb38646e737e6765de6d9050c23b43\",\"server_full_version_string\":\"v3.2.0-9efc569ae5eed75a6dd6c6ada67ef80eb3bbf366\",\"total_cpu_weight\":\"120460592801659\",\"total_net_weight\":\"117529135293359\",\"earliest_available_block_num\":49307590,\"last_irreversible_block_time\":\"2022-12-07T22:35:29.500\"}"
|
||||
"text": "{\"server_version\":\"905c5cc9\",\"chain_id\":\"73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d\",\"head_block_num\":95197673,\"last_irreversible_block_num\":95197346,\"last_irreversible_block_id\":\"05ac98a210f532f86d2ba8a4b7566535e84826f8bcdfbcddf46a085401055ea2\",\"head_block_id\":\"05ac99e9acc66b4c381ce4321e9b9b57ffae75ca4d838af3dcaa4a3b1e3665fb\",\"head_block_time\":\"2023-08-30T00:18:31.000\",\"head_block_producer\":\"hippopotamus\",\"virtual_block_cpu_limit\":200000000,\"virtual_block_net_limit\":1048576000,\"block_cpu_limit\":200000,\"block_net_limit\":1048576,\"server_version_string\":\"v3.1.3\",\"fork_db_head_block_num\":95197673,\"fork_db_head_block_id\":\"05ac99e9acc66b4c381ce4321e9b9b57ffae75ca4d838af3dcaa4a3b1e3665fb\",\"server_full_version_string\":\"v3.1.3-905c5cc900b4e88aed4ab6912009127bf9f4f140\",\"total_cpu_weight\":\"120605076979422\",\"total_net_weight\":\"117529273589365\",\"earliest_available_block_num\":95018734,\"last_irreversible_block_time\":\"2023-08-30T00:15:47.500\"}"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"request": {
|
||||
"path": "https://jungle4.greymass.com/v1/resource_provider/request_transaction",
|
||||
"params": {
|
||||
"method": "POST",
|
||||
"body": "{\"ref\":\"unittest\",\"request\":\"esr://gmNgZPLvfpeyaEau9oolDEDACCIYXhmENlw2jYl96ePCGODCcfNgqe9jsMSEjac4GjZOjItV6z0FUgsA\",\"signer\":{\"actor\":\"wharfkit1125\",\"permission\":\"test\"}}"
|
||||
}
|
||||
},
|
||||
"status": 400,
|
||||
"json": {
|
||||
"code": 400,
|
||||
"message": "A fee would be required to pay for this transaction and the account has insufficient balance.",
|
||||
"data": {}
|
||||
},
|
||||
"text": "{\"code\":400,\"message\":\"A fee would be required to pay for this transaction and the account has insufficient balance.\",\"data\":{}}"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"request": {
|
||||
"path": "https://jungle4.greymass.com/v1/chain/send_transaction",
|
||||
"params": {
|
||||
"method": "POST",
|
||||
"body": "{\"signatures\":[\"SIG_K1_KAfPB24wkbqNpJbLxZg6gagtsCUAZzcZpXLYMQDrdanzNWf9LisnTz2PS79DDQ9EkuxFFE6uMmN1XcH6soafctfW2tLL3i\"],\"compression\":1,\"packed_context_free_data\":\"789c63000000010001\",\"packed_trx\":\"789cf3139b98fc995d6375552f031030322c6b32617e65100a6487ebda9c3dcb28e0c471f360a9ef63902cc3848da72c60020d1b27c6c5aaf59eb264054b31b0b8fa078368f1f28cc4a2b4eccc1285cc6285928c5485a4d4e212051b630600ddca2020\"}"
|
||||
}
|
||||
},
|
||||
"status": 500,
|
||||
"json": {
|
||||
"code": 500,
|
||||
"message": "Internal Service Error",
|
||||
"error": {
|
||||
"code": 3040005,
|
||||
"name": "expired_tx_exception",
|
||||
"what": "Expired Transaction",
|
||||
"details": [
|
||||
{
|
||||
"message": "expired transaction 9f9f40ae7609c4ab0530ea6121c1ae0970c0c5b8491dd10f0dea2d8398e5de9f, expiration 2022-12-07T22:40:14.000, block time 2023-08-30T00:17:24.000",
|
||||
"file": "producer_plugin.cpp",
|
||||
"line_number": 658,
|
||||
"method": "process_incoming_transaction_async"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"text": "{\"code\":500,\"message\":\"Internal Service Error\",\"error\":{\"code\":3040005,\"name\":\"expired_tx_exception\",\"what\":\"Expired Transaction\",\"details\":[{\"message\":\"expired transaction 9f9f40ae7609c4ab0530ea6121c1ae0970c0c5b8491dd10f0dea2d8398e5de9f, expiration 2022-12-07T22:40:14.000, block time 2023-08-30T00:17:24.000\",\"file\":\"producer_plugin.cpp\",\"line_number\":658,\"method\":\"process_incoming_transaction_async\"}]}}"
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
import {Action, Asset, Name, Serializer, Session, SessionKit, Struct, Transaction} from '$lib'
|
||||
|
||||
import {makeClient, mockSessionArgs, mockSessionOptions} from '@wharfkit/mock-data'
|
||||
import {makeMockAction} from '@wharfkit/mock-data'
|
||||
import {mockSessionKitArgs, mockSessionKitOptions} from '@wharfkit/mock-data'
|
||||
|
||||
// Generated contract
|
||||
import EosioToken from '$test/utils/tokencontract'
|
||||
|
||||
const defaultAction = makeMockAction('caching test')
|
||||
const json = Serializer.objectify(defaultAction)
|
||||
|
||||
suite('contractkit integration', function () {
|
||||
suite('passing in a contract instance', function () {
|
||||
test('session kit', async function () {
|
||||
const tokenContract = new EosioToken.Contract({
|
||||
client: makeClient('https://eos.greymass.com'),
|
||||
})
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
contracts: [tokenContract],
|
||||
})
|
||||
const {session} = await sessionKit.login()
|
||||
await session.transact({action: json}, {broadcast: false})
|
||||
})
|
||||
test('session', async function () {
|
||||
const tokenContract = new EosioToken.Contract({
|
||||
client: makeClient('https://eos.greymass.com'),
|
||||
})
|
||||
const session = new Session(mockSessionArgs, {
|
||||
...mockSessionOptions,
|
||||
contracts: [tokenContract],
|
||||
})
|
||||
await session.transact({action: json}, {broadcast: false})
|
||||
})
|
||||
test('session.transact', async function () {
|
||||
const tokenContract = new EosioToken.Contract({
|
||||
client: makeClient('https://eos.greymass.com'),
|
||||
})
|
||||
const session = new Session(mockSessionArgs, mockSessionOptions)
|
||||
await session.transact({action: json}, {broadcast: false, contracts: [tokenContract]})
|
||||
})
|
||||
})
|
||||
suite('embedded ABIs', function () {
|
||||
suite('using structs', function () {
|
||||
test('action', async function () {
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
})
|
||||
const {session} = await sessionKit.login()
|
||||
await session.transact({action: defaultAction}, {broadcast: false})
|
||||
})
|
||||
test('actions', async function () {
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
})
|
||||
const {session} = await sessionKit.login()
|
||||
|
||||
@Struct.type('open')
|
||||
class Open extends Struct {
|
||||
@Struct.field(Name) owner!: Name
|
||||
@Struct.field(Asset.Symbol) symbol!: Asset.Symbol
|
||||
@Struct.field(Name) ram_payer!: Name
|
||||
}
|
||||
|
||||
await session.transact(
|
||||
{
|
||||
actions: [
|
||||
Action.from({
|
||||
account: 'eosio.token',
|
||||
name: 'open',
|
||||
authorization: [
|
||||
{actor: '............1', permission: '............2'},
|
||||
],
|
||||
data: Open.from({
|
||||
owner: session.actor,
|
||||
symbol: '4,EOS',
|
||||
ram_payer: session.actor,
|
||||
}),
|
||||
}),
|
||||
defaultAction,
|
||||
],
|
||||
},
|
||||
{broadcast: false}
|
||||
)
|
||||
})
|
||||
test('transaction', async function () {
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
})
|
||||
const {session} = await sessionKit.login()
|
||||
|
||||
@Struct.type('open')
|
||||
class Open extends Struct {
|
||||
@Struct.field(Name) owner!: Name
|
||||
@Struct.field(Asset.Symbol) symbol!: Asset.Symbol
|
||||
@Struct.field(Name) ram_payer!: Name
|
||||
}
|
||||
|
||||
const info = await session.client.v1.chain.get_info()
|
||||
const header = info.getTransactionHeader()
|
||||
|
||||
const transaction = Transaction.from({
|
||||
...header,
|
||||
actions: [
|
||||
Action.from({
|
||||
account: 'eosio.token',
|
||||
name: 'open',
|
||||
authorization: [{actor: '............1', permission: '............2'}],
|
||||
data: Open.from({
|
||||
owner: session.actor,
|
||||
symbol: '4,EOS',
|
||||
ram_payer: session.actor,
|
||||
}),
|
||||
}),
|
||||
defaultAction,
|
||||
],
|
||||
})
|
||||
|
||||
await session.transact(
|
||||
{
|
||||
transaction,
|
||||
},
|
||||
{broadcast: false}
|
||||
)
|
||||
})
|
||||
})
|
||||
suite('using contractkit', function () {
|
||||
test('action', async function () {
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
})
|
||||
const {session} = await sessionKit.login()
|
||||
|
||||
const tokenContract = new EosioToken.Contract({
|
||||
client: makeClient('https://eos.greymass.com'),
|
||||
})
|
||||
|
||||
const action = tokenContract.action('transfer', {
|
||||
from: session.actor,
|
||||
to: 'wharfkitest',
|
||||
quantity: '0.0001 EOS',
|
||||
memo: 'test',
|
||||
})
|
||||
|
||||
await session.transact({action}, {broadcast: false})
|
||||
})
|
||||
test('actions', async function () {
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
})
|
||||
const {session} = await sessionKit.login()
|
||||
|
||||
const tokenContract = new EosioToken.Contract({
|
||||
client: makeClient('https://eos.greymass.com'),
|
||||
})
|
||||
|
||||
const action1 = tokenContract.action('open', {
|
||||
owner: session.actor,
|
||||
symbol: '4,EOS',
|
||||
ram_payer: session.actor,
|
||||
})
|
||||
|
||||
const action2 = tokenContract.action('transfer', {
|
||||
from: session.actor,
|
||||
to: 'wharfkitest',
|
||||
quantity: '0.0001 EOS',
|
||||
memo: 'test',
|
||||
})
|
||||
|
||||
await session.transact({actions: [action1, action2]}, {broadcast: false})
|
||||
})
|
||||
test('transaction', async function () {
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
})
|
||||
const {session} = await sessionKit.login()
|
||||
|
||||
const tokenContract = new EosioToken.Contract({
|
||||
client: makeClient('https://eos.greymass.com'),
|
||||
})
|
||||
|
||||
const action1 = tokenContract.action('open', {
|
||||
owner: session.actor,
|
||||
symbol: '4,EOS',
|
||||
ram_payer: session.actor,
|
||||
})
|
||||
|
||||
const action2 = tokenContract.action('transfer', {
|
||||
from: session.actor,
|
||||
to: 'wharfkitest',
|
||||
quantity: '0.0001 EOS',
|
||||
memo: 'test',
|
||||
})
|
||||
|
||||
const info = await session.client.v1.chain.get_info()
|
||||
const header = info.getTransactionHeader()
|
||||
const transaction = Transaction.from({
|
||||
...header,
|
||||
actions: [action1, action2],
|
||||
})
|
||||
|
||||
await session.transact({transaction}, {broadcast: false})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
Logo,
|
||||
Session,
|
||||
SessionKit,
|
||||
UserInterfaceAccountCreationResponse,
|
||||
UserInterfaceLoginResponse,
|
||||
} from '$lib'
|
||||
|
||||
@@ -363,6 +364,104 @@ suite('kit', function () {
|
||||
}
|
||||
assertSessionMatchesMockSession(restored)
|
||||
})
|
||||
test('session by chain id (checksum256)', async function () {
|
||||
// New kit w/ empty storage
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
storage: new MockStorage(),
|
||||
})
|
||||
// Login 3 times
|
||||
await sessionKit.login({
|
||||
chain: Chains.WAX.id,
|
||||
permissionLevel: PermissionLevel.from('mock1@interface'),
|
||||
})
|
||||
await sessionKit.login({
|
||||
chain: Chains.Jungle4.id,
|
||||
permissionLevel: PermissionLevel.from('mock2@interface'),
|
||||
})
|
||||
await sessionKit.login({
|
||||
chain: Chains.EOS.id,
|
||||
permissionLevel: PermissionLevel.from('mock3@interface'),
|
||||
})
|
||||
// Restore all sessions
|
||||
const sessions = await sessionKit.restoreAll()
|
||||
// Assert 3 sessions restored
|
||||
assert.lengthOf(sessions, 3)
|
||||
assert.instanceOf(sessions[0], Session)
|
||||
assert.isTrue(sessions[0].actor.equals('mock1'))
|
||||
assert.isTrue(sessions[0].chain.id.equals(Chains.WAX.id))
|
||||
assert.instanceOf(sessions[1], Session)
|
||||
assert.isTrue(sessions[1].actor.equals('mock2'))
|
||||
assert.isTrue(sessions[1].chain.id.equals(Chains.Jungle4.id))
|
||||
assert.instanceOf(sessions[2], Session)
|
||||
assert.isTrue(sessions[2].actor.equals('mock3'))
|
||||
assert.isTrue(sessions[2].chain.id.equals(Chains.EOS.id))
|
||||
|
||||
const restoredEOS = await sessionKit.restore({chain: Chains.EOS.id})
|
||||
assert.isDefined(restoredEOS)
|
||||
if (restoredEOS) {
|
||||
assert.instanceOf(restoredEOS, Session)
|
||||
assert.isTrue(restoredEOS.actor.equals('mock3'))
|
||||
assert.isTrue(restoredEOS.chain.id.equals(Chains.EOS.id))
|
||||
}
|
||||
|
||||
const restoredJUNGLE = await sessionKit.restore({chain: Chains.Jungle4.id})
|
||||
assert.isDefined(restoredJUNGLE)
|
||||
if (restoredJUNGLE) {
|
||||
assert.instanceOf(restoredJUNGLE, Session)
|
||||
assert.isTrue(restoredJUNGLE.actor.equals('mock2'))
|
||||
assert.isTrue(restoredJUNGLE.chain.id.equals(Chains.Jungle4.id))
|
||||
}
|
||||
})
|
||||
test('session by chain id (ChainDefinition)', async function () {
|
||||
// New kit w/ empty storage
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
storage: new MockStorage(),
|
||||
})
|
||||
// Login 3 times
|
||||
await sessionKit.login({
|
||||
chain: Chains.WAX.id,
|
||||
permissionLevel: PermissionLevel.from('mock1@interface'),
|
||||
})
|
||||
await sessionKit.login({
|
||||
chain: Chains.Jungle4.id,
|
||||
permissionLevel: PermissionLevel.from('mock2@interface'),
|
||||
})
|
||||
await sessionKit.login({
|
||||
chain: Chains.EOS.id,
|
||||
permissionLevel: PermissionLevel.from('mock3@interface'),
|
||||
})
|
||||
// Restore all sessions
|
||||
const sessions = await sessionKit.restoreAll()
|
||||
// Assert 3 sessions restored
|
||||
assert.lengthOf(sessions, 3)
|
||||
assert.instanceOf(sessions[0], Session)
|
||||
assert.isTrue(sessions[0].actor.equals('mock1'))
|
||||
assert.isTrue(sessions[0].chain.id.equals(Chains.WAX.id))
|
||||
assert.instanceOf(sessions[1], Session)
|
||||
assert.isTrue(sessions[1].actor.equals('mock2'))
|
||||
assert.isTrue(sessions[1].chain.id.equals(Chains.Jungle4.id))
|
||||
assert.instanceOf(sessions[2], Session)
|
||||
assert.isTrue(sessions[2].actor.equals('mock3'))
|
||||
assert.isTrue(sessions[2].chain.id.equals(Chains.EOS.id))
|
||||
|
||||
const restoredEOS = await sessionKit.restore({chain: Chains.EOS})
|
||||
assert.isDefined(restoredEOS)
|
||||
if (restoredEOS) {
|
||||
assert.instanceOf(restoredEOS, Session)
|
||||
assert.isTrue(restoredEOS.actor.equals('mock3'))
|
||||
assert.isTrue(restoredEOS.chain.id.equals(Chains.EOS.id))
|
||||
}
|
||||
|
||||
const restoredJUNGLE = await sessionKit.restore({chain: Chains.Jungle4})
|
||||
assert.isDefined(restoredJUNGLE)
|
||||
if (restoredJUNGLE) {
|
||||
assert.instanceOf(restoredJUNGLE, Session)
|
||||
assert.isTrue(restoredJUNGLE.actor.equals('mock2'))
|
||||
assert.isTrue(restoredJUNGLE.chain.id.equals(Chains.Jungle4.id))
|
||||
}
|
||||
})
|
||||
test('no session returns undefined', async function () {
|
||||
const sessionKit = new SessionKit(mockSessionKitArgs, {
|
||||
...mockSessionKitOptions,
|
||||
@@ -496,6 +595,12 @@ suite('kit', function () {
|
||||
walletPluginIndex: 999999,
|
||||
}
|
||||
}
|
||||
onAccountCreate(): Promise<UserInterfaceAccountCreationResponse> {
|
||||
throw new Error('Not implemented in mock UI')
|
||||
}
|
||||
onAccountCreateComplete(): Promise<void> {
|
||||
throw new Error('Not implemented in mock UI')
|
||||
}
|
||||
}
|
||||
const sessionKit = new SessionKit(
|
||||
{
|
||||
|
||||
+13
-1
@@ -3,7 +3,11 @@ import {assert} from 'chai'
|
||||
import type {LocaleDefinitions} from '@wharfkit/common'
|
||||
import {MockUserInterface} from '@wharfkit/mock-data'
|
||||
|
||||
import {UserInterface, UserInterfaceTranslateOptions} from 'src/ui'
|
||||
import {
|
||||
UserInterface,
|
||||
UserInterfaceAccountCreationResponse,
|
||||
UserInterfaceTranslateOptions,
|
||||
} from 'src/ui'
|
||||
|
||||
const mockLocaleDefinitions: LocaleDefinitions = {
|
||||
en: {
|
||||
@@ -34,6 +38,14 @@ class ImplementedUI extends MockUserInterface {
|
||||
}
|
||||
return this.localeDefinitions.en[key] || options?.default || `[[${key} not localized]]`
|
||||
}
|
||||
|
||||
onAccountCreate(): Promise<UserInterfaceAccountCreationResponse> {
|
||||
throw new Error('Not implemented in mock UI')
|
||||
}
|
||||
|
||||
onAccountCreateComplete(): Promise<void> {
|
||||
throw new Error('Not implemented in mock UI')
|
||||
}
|
||||
}
|
||||
|
||||
suite('ui', function () {
|
||||
|
||||
@@ -14,4 +14,7 @@
|
||||
| wharfkit1125@test | ❌ | ❌ | ❌ | ❌ |
|
||||
| wharfkit1131@test | ✅ | ❌ | ❌ | ✅ |
|
||||
| wharfkit1132@test | ❌ | ❌ | ❌ | ✅ |
|
||||
| wharfkit1133@test | ✅ | ✅ | ✅ | ✅ |
|
||||
| wharfkitnoop@cosign | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
Note: wharfkit1133 is unique in that its active key is the same as the testing key
|
||||
|
||||
@@ -128,6 +128,13 @@ const accounts: AccountDefinition[] = [
|
||||
netStake: undefined,
|
||||
ramBytes: 10000,
|
||||
},
|
||||
{
|
||||
name: 'wharfkit1133',
|
||||
balance: '5.0000 EOS',
|
||||
cpuStake: '1.0000 EOS',
|
||||
netStake: '1.0000 EOS',
|
||||
ramBytes: 10000,
|
||||
},
|
||||
{
|
||||
name: 'wharfkit1151',
|
||||
balance: '5.0000 EOS',
|
||||
@@ -183,7 +190,11 @@ async function createAccount(
|
||||
threshold: 1,
|
||||
keys: [
|
||||
{
|
||||
key: controlKey,
|
||||
// Override active key for wharfkit1133
|
||||
// this will be used in auth tests
|
||||
key: Name.from(account.name).equals('wharfkit1133')
|
||||
? testKey
|
||||
: controlKey,
|
||||
weight: 1,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
import {ABI, Action, Asset, AssetType, Blob, Name, NameType, Struct} from '@wharfkit/antelope'
|
||||
import {ActionOptions, Contract as BaseContract, ContractArgs, PartialBy} from '@wharfkit/contract'
|
||||
export namespace EosioToken {
|
||||
export const abiBlob = Blob.from(
|
||||
'DmVvc2lvOjphYmkvMS4yAAgHYWNjb3VudAABB2JhbGFuY2UFYXNzZXQFY2xvc2UAAgVvd25lcgRuYW1lBnN5bWJvbAZzeW1ib2wGY3JlYXRlAAIGaXNzdWVyBG5hbWUObWF4aW11bV9zdXBwbHkFYXNzZXQOY3VycmVuY3lfc3RhdHMAAwZzdXBwbHkFYXNzZXQKbWF4X3N1cHBseQVhc3NldAZpc3N1ZXIEbmFtZQVpc3N1ZQADAnRvBG5hbWUIcXVhbnRpdHkFYXNzZXQEbWVtbwZzdHJpbmcEb3BlbgADBW93bmVyBG5hbWUGc3ltYm9sBnN5bWJvbAlyYW1fcGF5ZXIEbmFtZQZyZXRpcmUAAghxdWFudGl0eQVhc3NldARtZW1vBnN0cmluZwh0cmFuc2ZlcgAEBGZyb20EbmFtZQJ0bwRuYW1lCHF1YW50aXR5BWFzc2V0BG1lbW8Gc3RyaW5nBgAAAAAAhWlEBWNsb3NlAAAAAACobNRFBmNyZWF0ZQAAAAAAAKUxdgVpc3N1ZQAAAAAAADBVpQRvcGVuAAAAAACo67K6BnJldGlyZQAAAABXLTzNzQh0cmFuc2ZlcgACAAAAOE9NETIDaTY0AAAHYWNjb3VudAAAAAAAkE3GA2k2NAAADmN1cnJlbmN5X3N0YXRzAAAAAA=='
|
||||
)
|
||||
export const abi = ABI.from(abiBlob)
|
||||
export class Contract extends BaseContract {
|
||||
constructor(args: PartialBy<ContractArgs, 'abi' | 'account'>) {
|
||||
super({
|
||||
client: args.client,
|
||||
abi: abi,
|
||||
account: Name.from('eosio.token'),
|
||||
})
|
||||
}
|
||||
action<T extends 'close' | 'create' | 'issue' | 'open' | 'retire' | 'transfer'>(
|
||||
name: T,
|
||||
data: ActionNameParams[T],
|
||||
options?: ActionOptions
|
||||
): Action {
|
||||
return super.action(name, data, options)
|
||||
}
|
||||
table<T extends 'accounts' | 'stat'>(name: T, scope?: NameType) {
|
||||
return super.table(name, scope, TableMap[name])
|
||||
}
|
||||
}
|
||||
export interface ActionNameParams {
|
||||
close: ActionParams.Close
|
||||
create: ActionParams.Create
|
||||
issue: ActionParams.Issue
|
||||
open: ActionParams.Open
|
||||
retire: ActionParams.Retire
|
||||
transfer: ActionParams.Transfer
|
||||
}
|
||||
export namespace ActionParams {
|
||||
export interface Close {
|
||||
owner: NameType
|
||||
symbol: Asset.SymbolType
|
||||
}
|
||||
export interface Create {
|
||||
issuer: NameType
|
||||
maximum_supply: AssetType
|
||||
}
|
||||
export interface Issue {
|
||||
to: NameType
|
||||
quantity: AssetType
|
||||
memo: string
|
||||
}
|
||||
export interface Open {
|
||||
owner: NameType
|
||||
symbol: Asset.SymbolType
|
||||
ram_payer: NameType
|
||||
}
|
||||
export interface Retire {
|
||||
quantity: AssetType
|
||||
memo: string
|
||||
}
|
||||
export interface Transfer {
|
||||
from: NameType
|
||||
to: NameType
|
||||
quantity: AssetType
|
||||
memo: string
|
||||
}
|
||||
}
|
||||
export namespace Types {
|
||||
@Struct.type('account')
|
||||
export class Account extends Struct {
|
||||
@Struct.field(Asset)
|
||||
balance!: Asset
|
||||
}
|
||||
@Struct.type('close')
|
||||
export class Close extends Struct {
|
||||
@Struct.field(Name)
|
||||
owner!: Name
|
||||
@Struct.field(Asset.Symbol)
|
||||
symbol!: Asset.Symbol
|
||||
}
|
||||
@Struct.type('create')
|
||||
export class Create extends Struct {
|
||||
@Struct.field(Name)
|
||||
issuer!: Name
|
||||
@Struct.field(Asset)
|
||||
maximum_supply!: Asset
|
||||
}
|
||||
@Struct.type('currency_stats')
|
||||
export class CurrencyStats extends Struct {
|
||||
@Struct.field(Asset)
|
||||
supply!: Asset
|
||||
@Struct.field(Asset)
|
||||
max_supply!: Asset
|
||||
@Struct.field(Name)
|
||||
issuer!: Name
|
||||
}
|
||||
@Struct.type('issue')
|
||||
export class Issue extends Struct {
|
||||
@Struct.field(Name)
|
||||
to!: Name
|
||||
@Struct.field(Asset)
|
||||
quantity!: Asset
|
||||
@Struct.field('string')
|
||||
memo!: string
|
||||
}
|
||||
@Struct.type('open')
|
||||
export class Open extends Struct {
|
||||
@Struct.field(Name)
|
||||
owner!: Name
|
||||
@Struct.field(Asset.Symbol)
|
||||
symbol!: Asset.Symbol
|
||||
@Struct.field(Name)
|
||||
ram_payer!: Name
|
||||
}
|
||||
@Struct.type('retire')
|
||||
export class Retire extends Struct {
|
||||
@Struct.field(Asset)
|
||||
quantity!: Asset
|
||||
@Struct.field('string')
|
||||
memo!: string
|
||||
}
|
||||
@Struct.type('transfer')
|
||||
export class Transfer extends Struct {
|
||||
@Struct.field(Name)
|
||||
from!: Name
|
||||
@Struct.field(Name)
|
||||
to!: Name
|
||||
@Struct.field(Asset)
|
||||
quantity!: Asset
|
||||
@Struct.field('string')
|
||||
memo!: string
|
||||
}
|
||||
}
|
||||
const TableMap = {
|
||||
accounts: Types.Account,
|
||||
stat: Types.CurrencyStats,
|
||||
}
|
||||
}
|
||||
export default EosioToken
|
||||
@@ -1271,15 +1271,26 @@
|
||||
pako "^2.0.4"
|
||||
tslib "^2.1.0"
|
||||
|
||||
"@wharfkit/antelope@^0.7.3":
|
||||
version "0.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/antelope/-/antelope-0.7.3.tgz#408f6c587f4f5990d4b55596c10be2e976798641"
|
||||
integrity sha512-pyUmuXUpLQh1RVpJVIcbVUHTwV/DQ+MI0nlfWDBHIICdYf6XidZtQmaHB7JEXiFzlS8T7S9Xc5VOTOQU8dnl3Q==
|
||||
"@wharfkit/abicache@^1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/abicache/-/abicache-1.2.0.tgz#f67f7bbd854adc443c3e363d5fbe3d27ac4f8383"
|
||||
integrity sha512-1+564ODM1KhUs7chE8KpYhnxShuPLC1MvqYcXVuLosxXXwcYC4IiJ1V3VuikLG+xfBDp1GZivGjHQwv1awE2Zw==
|
||||
dependencies:
|
||||
"@wharfkit/antelope" "^1.0.0"
|
||||
"@wharfkit/signing-request" "^3.1.0"
|
||||
pako "^2.0.4"
|
||||
tslib "^2.1.0"
|
||||
|
||||
"@wharfkit/antelope@^0.7.3", "@wharfkit/antelope@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/antelope/-/antelope-1.0.0.tgz#c3057b70575991be5de3aea19e0c474614783c80"
|
||||
integrity sha512-gwc6L3AzceN/menx9HCV22Ekd3it1wRruY6dIkyfCaV2UBGmfvIVJ3wPaDi4Ppj2k50b86ShSSHdd52jOFd+dg==
|
||||
dependencies:
|
||||
bn.js "^4.11.9"
|
||||
brorand "^1.1.0"
|
||||
elliptic "^6.5.4"
|
||||
hash.js "^1.0.0"
|
||||
pako "^2.1.0"
|
||||
tslib "^2.0.3"
|
||||
|
||||
"@wharfkit/common@^1.1.0":
|
||||
@@ -1289,31 +1300,38 @@
|
||||
dependencies:
|
||||
tslib "^2.1.0"
|
||||
|
||||
"@wharfkit/contract@^0.3.3":
|
||||
version "0.3.3"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/contract/-/contract-0.3.3.tgz#4bdc0a02d574be5281160f7c35afde607fcba3d4"
|
||||
integrity sha512-idzn0PLU0M7ZfcUe2NqYLRmf4iuzEcxUFr9h9vikuvQLbfLo+g9Xb7mIIwGfdiZdlefXMyC+DAFkNloX8IMV7Q==
|
||||
"@wharfkit/common@^1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/common/-/common-1.2.0.tgz#147f783f2ba5cc6fa7dd75863ba98dd05880a9aa"
|
||||
integrity sha512-me/BN8D/4UPkY7yt+4v+E/z62PVj4VKY5+iRb7zoWv0epbW4o4nC6Oer8kBVL7xWC6Guucaol3hkxkTMgrnwlQ==
|
||||
dependencies:
|
||||
tslib "^2.1.0"
|
||||
|
||||
"@wharfkit/contract@^0.4.2":
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/contract/-/contract-0.4.2.tgz#cec2ca9585bf1c63b9458089cbd0388b727b800f"
|
||||
integrity sha512-jSnxaaIy8ZyXljfO2DrR7ytG7VFZX6ml8b6tncZE7GvkPpEt3zEfR3YJmUfYCvbwJTn5Zk6/EWtIl5YTrEaxOA==
|
||||
dependencies:
|
||||
"@wharfkit/abicache" "^1.1.1"
|
||||
"@wharfkit/antelope" "^0.7.3"
|
||||
"@wharfkit/signing-request" "^3.0.0"
|
||||
tslib "^2.1.0"
|
||||
|
||||
"@wharfkit/mock-data@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/mock-data/-/mock-data-1.0.1.tgz#98714437b58f906a1be1755110c7d1e1540edaa7"
|
||||
integrity sha512-9yGS8TiGz06kPmgO6gqpAw2cGik2NJTwBsirMKPWY78/qk9AWb7tMH8sNqQKJozQ+WiXVU3ahYd9t3bLB/f3uQ==
|
||||
"@wharfkit/mock-data@^1.0.2":
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/mock-data/-/mock-data-1.0.2.tgz#81d6327c76032b40e5acf209d507cf6ca2a3ae9f"
|
||||
integrity sha512-Mbf/rZX2dqj5r+h+6NcRsDfRdHZ5OWEk0oIZ6iarXEBV65jmODoLdZlS906m9ndC1bi1ewCm/276JDimIqtLkQ==
|
||||
dependencies:
|
||||
"@wharfkit/antelope" "^0.7.3"
|
||||
"@wharfkit/session" "^1.0.0-beta9"
|
||||
"@wharfkit/wallet-plugin-privatekey" "^1.0.0-beta1"
|
||||
"@wharfkit/session" "^1.0.0"
|
||||
"@wharfkit/wallet-plugin-privatekey" "^1.0.0"
|
||||
node-fetch "^2.6.1"
|
||||
tslib "^2.1.0"
|
||||
|
||||
"@wharfkit/session@^1.0.0-beta9":
|
||||
version "1.0.0-beta9"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/session/-/session-1.0.0-beta9.tgz#854c7b019658328169e0893ab98b6b1efabe0edc"
|
||||
integrity sha512-ixPX0MrE/5vwxYym2j82lVVsEJSaCAHqgjd05AV/Iv+2o9QlTulN1LaAajCKJXzyT1bMwyI2dP+v7+dgKlVtRA==
|
||||
"@wharfkit/session@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/session/-/session-1.0.0.tgz#09c60d01a6185ab2e451d34462d84de2d7013220"
|
||||
integrity sha512-wXmvOVBZ1Rp/9HPUzGPaD/vpGXv2FCNgl8JRLopKgKPHkkEX/u4untshHR8AwSc0ZitjOlv6ubR2h9/UW8h6ug==
|
||||
dependencies:
|
||||
"@wharfkit/abicache" "^1.1.1"
|
||||
"@wharfkit/antelope" "^0.7.3"
|
||||
@@ -1330,6 +1348,14 @@
|
||||
"@wharfkit/antelope" "^0.7.3"
|
||||
tslib "^2.0.3"
|
||||
|
||||
"@wharfkit/signing-request@^3.1.0":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/signing-request/-/signing-request-3.1.0.tgz#7883f0b2350c6fe3446d2b8733dd7d0004f01911"
|
||||
integrity sha512-aVWV9Z3o77uDrFSR3wC78c1e/QNkfi3IxZbGzMizvoYTYPKHgHs1F6Go/1oe0Dlo/kEB9tgckFviccUqrK987w==
|
||||
dependencies:
|
||||
"@wharfkit/antelope" "^1.0.0"
|
||||
tslib "^2.0.3"
|
||||
|
||||
"@wharfkit/transact-plugin-resource-provider@^1.0.0-beta1":
|
||||
version "1.0.0-beta1"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/transact-plugin-resource-provider/-/transact-plugin-resource-provider-1.0.0-beta1.tgz#63e998d8e2ce00b44885bfc81cfc8326e9294720"
|
||||
@@ -1337,10 +1363,10 @@
|
||||
dependencies:
|
||||
tslib "^2.1.0"
|
||||
|
||||
"@wharfkit/wallet-plugin-privatekey@^1.0.0-beta1":
|
||||
version "1.0.0-beta1"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/wallet-plugin-privatekey/-/wallet-plugin-privatekey-1.0.0-beta1.tgz#1205f311c915a064d3e9c0a7d80c1f475df86ec0"
|
||||
integrity sha512-F6m2t9977OH31SsCRQUZIAHacgQdoqxQw0WxQGsdO/7fXmkLd6DTzRIjHtVQs/4RtHLMMWTs8Zs6akDTo/M9dA==
|
||||
"@wharfkit/wallet-plugin-privatekey@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@wharfkit/wallet-plugin-privatekey/-/wallet-plugin-privatekey-1.0.0.tgz#2600cce1117ce9391c8078649e05ceaf93780f1d"
|
||||
integrity sha512-V+/7T/cwoHM8fDaM3MZ1DFKrX2+NddBkkWJ8BIFfmEZnGR1W8Qr77t+piOP0/6UM2etmuZh98XLwZS33vORQ0A==
|
||||
dependencies:
|
||||
tslib "^2.1.0"
|
||||
|
||||
@@ -2916,7 +2942,7 @@ package-hash@^4.0.0:
|
||||
lodash.flattendeep "^4.4.0"
|
||||
release-zalgo "^1.0.0"
|
||||
|
||||
pako@^2.0.4:
|
||||
pako@^2.0.4, pako@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86"
|
||||
integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==
|
||||
|
||||
Reference in New Issue
Block a user