Skip to content

Instantly share code, notes, and snippets.

View nadiaalicante1's full-sized avatar

Nadia Kuhrina C. Alicante nadiaalicante1

View GitHub Profile
@aaroncox
aaroncox / cosign_noop.js
Created December 11, 2019 01:19
The first action to include in a transaction to use Greymass Fuel
const cosign_noop = {
account: 'greymassnoop',
name: 'noop',
authorization: [
{
actor: 'greymassfuel',
permission: 'cosign',
}
],
data: {}
@aaroncox
aaroncox / authorityprovider.js
Last active March 15, 2024 14:57
Using a custom authority provider within eosjs for Greymass Fuel
// A custom cosigner AuthorityProvider for EOSJS v2
// This provider overrides the checks on all keys,
// allowing a partially signed transaction to be
// broadcast to the API node.
class CosignAuthorityProvider {
async getRequiredKeys(args) {
const { transaction } = args;
// Iterate over the actions and authorizations
transaction.actions.forEach((action, ti) => {
action.authorization.forEach((auth, ai) => {