mirror of
https://github.com/wharfkit/session.git
synced 2026-07-23 18:57:27 +00:00
679d30cbd3
* The `ui` option is now required for the SessionKit * Split SessionKit initialization to both "args" and "options" * Move `onSignComplete` to after all signing ops finish * Allow restoring without serialized session The restore method can now be used by just providing an actor, permission, and chainId - and will pull the session data out of the storage adapter to restore. * Track and allow restoring a default account per-chain Each individual chain now tracks a `default` value within its serialized storage, and the `restore()` function can now accept just a chain ID to restore the default account for that chain. * Reapplied 4faab919a3154dc875279e54c3baf9448de7eefa * Version 1.0.0-beta1 * Moved all mock data to its own repository * Updating @wharfkit/mock-data and MOCK_DIR * Fixing ci-test * Updating @wharfkit/mock-data * Allow manually passing in ABIDef for use in Sessions * Version 1.0.0-beta2 * Version 1.0.0-beta3 * Renamed AbiProvider to ABICache since it's an extension of ESR * Better defined ABICacheInterface * Version 1.0.0-beta4 * Prevent uneeded get_info calls when resolving * Linting of tests * Adding tests for placeholder resolution * Adding test data for placeholder resolution * Unused test cleanup * Linting * Removing unused import * Version 1.0.0-beta5 * Replacing @greymass/eosio with @wharfkit/antelope * Version 1.0.0-beta6 * Cleanup of greymass/eosio continued * Version 1.0.0-beta7 * Fixed badge path * Removed internal ABICache and using @wharfkit/abicache * Updating contract kit and abicache to optimize ABI loading * Remove requirement of prefix on storage * Change `appName` from Name to a string Resolves #68 Still accept `NameType` as the parameter to maintain reverse compatibility with older versions and other app formats. * Migrated data to wharfkit/common * Adding test to ensure common chains can be passed * Updating wharfkit/common * Switching to `import type` for some @wharfkit/common elements * Added package description * Update README.md * Updated @wharfkit/common * Version 1.0.0-beta8 * Updating ABICache and Contract Kit * Updating ESR library * Version 1.0.0-beta9 * Dependency cleanup * Updating private key plugin * Version 1.0.0
84 lines
2.6 KiB
TypeScript
84 lines
2.6 KiB
TypeScript
import {Asset, Name, PublicKey, Struct, UInt16, UInt32} from '@wharfkit/antelope'
|
|
|
|
@Struct.type('key_weight')
|
|
export class KeyWeight extends Struct {
|
|
@Struct.field(PublicKey) key!: PublicKey
|
|
@Struct.field(UInt16) weight!: UInt16
|
|
}
|
|
|
|
@Struct.type('permission_level')
|
|
export class PermissionLevel extends Struct {
|
|
@Struct.field(Name) actor!: Name
|
|
@Struct.field(Name) permission!: Name
|
|
}
|
|
|
|
@Struct.type('permission_level_weight')
|
|
export class PermissionLevelWeight extends Struct {
|
|
@Struct.field(PermissionLevel) permission!: PermissionLevel
|
|
@Struct.field(UInt16) weight!: UInt16
|
|
}
|
|
|
|
@Struct.type('wait_weight')
|
|
export class WaitWeight extends Struct {
|
|
@Struct.field(UInt32) wait_sec!: UInt32
|
|
@Struct.field(UInt16) weight!: UInt16
|
|
}
|
|
|
|
@Struct.type('authority')
|
|
export class Authority extends Struct {
|
|
@Struct.field(UInt32) threshold!: UInt32
|
|
@Struct.field(KeyWeight, {array: true}) keys!: KeyWeight[]
|
|
@Struct.field(PermissionLevelWeight, {array: true}) accounts!: PermissionLevelWeight[]
|
|
@Struct.field(WaitWeight, {array: true}) waits!: WaitWeight[]
|
|
}
|
|
|
|
@Struct.type('newaccount')
|
|
export class Newaccount extends Struct {
|
|
@Struct.field(Name) creator!: Name
|
|
@Struct.field(Name) name!: Name
|
|
@Struct.field(Authority) owner!: Authority
|
|
@Struct.field(Authority) active!: Authority
|
|
}
|
|
|
|
@Struct.type('buyrambytes')
|
|
export class Buyrambytes extends Struct {
|
|
@Struct.field(Name) payer!: Name
|
|
@Struct.field(Name) receiver!: Name
|
|
@Struct.field(UInt32) bytes!: UInt32
|
|
}
|
|
|
|
@Struct.type('delegatebw')
|
|
export class Delegatebw extends Struct {
|
|
@Struct.field(Name) from!: Name
|
|
@Struct.field(Name) receiver!: Name
|
|
@Struct.field(Asset) stake_net_quantity!: Asset
|
|
@Struct.field(Asset) stake_cpu_quantity!: Asset
|
|
@Struct.field('bool') transfer!: boolean
|
|
}
|
|
|
|
@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
|
|
}
|
|
|
|
@Struct.type('updateauth')
|
|
export class Updateauth extends Struct {
|
|
@Struct.field(Name) account!: Name
|
|
@Struct.field(Name) permission!: Name
|
|
@Struct.field(Name) parent!: Name
|
|
@Struct.field(Authority) auth!: Authority
|
|
@Struct.field(Name, {extension: true}) authorized_by!: Name
|
|
}
|
|
|
|
@Struct.type('linkauth')
|
|
export class Linkauth extends Struct {
|
|
@Struct.field(Name) account!: Name
|
|
@Struct.field(Name) code!: Name
|
|
@Struct.field(Name) type!: Name
|
|
@Struct.field(Name) requirement!: Name
|
|
@Struct.field(Name, {extension: true}) authorized_by!: Name
|
|
}
|