3.x release (#37)

* Starting migration to Wharfkit namespace and libs

* Version 3.0.0-beta1

* Updating package name

* Version 3.1.0-rc1

* Updating to @wharfkit/antelope 1.0.0

* Removing embedded ABIs in an unideal way until fixes are implemented

* Version 3.1.0
This commit is contained in:
Aaron Cox
2023-11-07 12:39:41 -08:00
committed by GitHub
parent ffe7458abb
commit 653dea0a94
8 changed files with 55 additions and 41 deletions
+7 -7
View File
@@ -1,12 +1,12 @@
{
"name": "eosio-signing-request",
"version": "2.5.3",
"description": "EOSIO Signing Request (ESR / EEP-7) encoder and decoder",
"name": "@wharfkit/signing-request",
"version": "3.1.0",
"description": "Signing Request (ESR / EEP-7) encoder and decoder for Antelope blockchains",
"homepage": "https://github.com/greymass/eosio-signing-request",
"license": "MIT",
"main": "lib/esr.js",
"module": "lib/esr.m.js",
"types": "lib/esr.d.ts",
"main": "lib/signing-request.js",
"module": "lib/signing-request.m.js",
"types": "lib/signing-request.d.ts",
"sideEffects": false,
"files": [
"src/*",
@@ -16,7 +16,7 @@
"prepare": "make"
},
"dependencies": {
"@greymass/eosio": "^0.6.0",
"@wharfkit/antelope": "^1.0.0",
"tslib": "^2.0.3"
},
"devDependencies": {
+1 -1
View File
@@ -11,7 +11,7 @@ import {
TypeAlias,
UInt8,
Variant,
} from '@greymass/eosio'
} from '@wharfkit/antelope'
import {ChainIdVariant} from './chain-id'
+1 -1
View File
@@ -5,7 +5,7 @@ import {
TypeAlias,
UInt8,
Variant,
} from '@greymass/eosio'
} from '@wharfkit/antelope'
/** Chain ID aliases. */
export enum ChainName {
+1 -1
View File
@@ -15,7 +15,7 @@ import {
TimePointSec,
TimePointType,
Transaction,
} from '@greymass/eosio'
} from '@wharfkit/antelope'
import {IdentityV3} from './abi'
import {ChainId, ChainIdType} from './chain-id'
+18 -10
View File
@@ -33,7 +33,7 @@ import {
UInt32Type,
UInt8,
VarUInt,
} from '@greymass/eosio'
} from '@wharfkit/antelope'
import * as base64u from './base64u'
import {ChainAlias, ChainId, ChainIdType, ChainIdVariant, ChainName} from './chain-id'
@@ -936,14 +936,16 @@ export class SigningRequest {
data = Serializer.encode({object: id})
authorization = [id.permission]
}
return [
Action.from({
const action = Action.from({
account: '',
name: 'identity',
authorization,
data,
}),
]
})
// TODO: The way payloads are encoded is including the ABI, which isn't what we want
// This needs to be resolved in wharfkit/antelope, and then the delete call here should be removed
delete action.abi
return [action]
} else {
// eslint-disable-next-line prefer-const
let {scope, permission} = req.value as IdentityV3
@@ -951,14 +953,16 @@ export class SigningRequest {
permission = PlaceholderAuth
}
const data = Serializer.encode({object: {scope, permission}, type: IdentityV3})
return [
Action.from({
const action = Action.from({
account: '',
name: 'identity',
authorization: [permission],
data,
}),
]
})
// TODO: The way payloads are encoded is including the ABI, which isn't what we want
// This needs to be resolved in wharfkit/antelope, and then the delete call here should be removed
delete action.abi
return [action]
}
}
case 'transaction':
@@ -1246,7 +1250,11 @@ function encodeAction(action: AnyAction, abis: Record<string, ABIDef>): Action {
if (!abi) {
throw new Error(`Missing ABI for ${action.account}`)
}
return Action.from(action, abi)
const data = Action.from(action, abi)
// TODO: The way payloads are encoded is including the ABI, which isn't what we want
// This needs to be resolved in wharfkit/antelope, and then the delete call here should be removed
delete data.abi
return data
}
function isIdentity(action: AnyAction) {
+1 -1
View File
@@ -12,7 +12,7 @@ import {
SigningRequestEncodingOptions,
} from '../src'
import * as TSModule from '../src'
import {Name, PrivateKey, Serializer, Signature, UInt64} from '@greymass/eosio'
import {Name, PrivateKey, Serializer, Signature, UInt64} from '@wharfkit/antelope'
import {IdentityProof} from '../src/identity-proof'
let {SigningRequest, PlaceholderAuth, PlaceholderName} = TSModule
+1 -1
View File
@@ -1,7 +1,7 @@
import {readdirSync as readdir, readFileSync as readfile} from 'fs'
import {join as joinPath} from 'path'
import {AbiProvider} from '../../src'
import {Name} from '@greymass/eosio'
import {Name} from '@wharfkit/antelope'
// To add an ABI for testing run (in project root):
// CONTRACT=eosio.token; cleos -u https://eos.greymass.com get abi $CONTRACT > test/abis/$CONTRACT.json
+17 -11
View File
@@ -212,17 +212,6 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"
"@greymass/eosio@^0.6.0":
version "0.6.1"
resolved "https://registry.yarnpkg.com/@greymass/eosio/-/eosio-0.6.1.tgz#2af601b6f38a37cb3c78b62d80fd293b80814f62"
integrity sha512-K9VmejZmXHczuLBdQzEQayzISEG/s1PQ9awNf3nMeiVOnmjC5jnw/qNatY1PDpVhXsu+FcW59EAoCEWpuKnrfA==
dependencies:
bn.js "^4.11.9"
brorand "^1.1.0"
elliptic "^6.5.4"
hash.js "^1.0.0"
tslib "^2.0.3"
"@humanwhocodes/config-array@^0.9.2":
version "0.9.5"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7"
@@ -459,6 +448,18 @@
resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==
"@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"
acorn-jsx@^5.3.1:
version "5.3.2"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
@@ -1750,6 +1751,11 @@ package-hash@^4.0.0:
lodash.flattendeep "^4.4.0"
release-zalgo "^1.0.0"
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==
parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"