0.0.17 • Published 11 months ago

@metalblockchain/pulsevm-js v0.0.17

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months 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

11 months ago

0.0.16

11 months ago

0.0.15

11 months ago

0.0.14

11 months ago

0.0.13

11 months ago

0.0.12

11 months ago

0.0.11

11 months ago

0.0.10

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago