0.0.17 • Published 1 year ago

@metalblockchain/pulsevm-js v0.0.17

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

PulseVM-JS

JavaScript, TypeScript SDK for PulseVM.

Constructing a transaction

const key = parsePrivateKey(
    'frqNAoTevNse58hUoJMDzPXDbfNicjCGjNz5VDgqqHJbhBBG9',
);

const tx = new Transaction(
    // Unsigned transaction
    new BaseTransaction(
        // Blockchain ID, used to prevent replay attacks on other chains
        // Should be the ID of the chain this VM is running in
        Id.fromString('28fJD1hMz2PSRJKJt7YT41urTPR37rUNUcdeJ8daoiwP6DGnAR'),
        // Array of actions
        [
            new Action(
                // Account name
                new Name('pulse'),
                // Action name
                new Name('newaccount'),
                // Hex encoded action data
                new Bytes(new Uint8Array()),
                // Array of provided authorizations
                [
                    new PermissionLevel(new Name('pulse'), new Name('active'))
                ],
            ),
        ]
    ),
    // Empty array of signatures
    [],
);

// Sign the transaction with your private key
await tx.sign(key);
0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago