0.2.30 • Published 5 days ago

babbage-protomap v0.2.30

Weekly downloads
-
License
Open BSV License
Repository
-
Last release
5 days ago

ProtoMap

npm version

ProtoMap is a library designed to resolve protocol permissions within the MetaNet ecosystem. At its core, ProtoMap empowers users with precise insights into the specific data that applications request when seeking protocol permissions. Beyond abstract protocol IDs, ProtoMap reveals concrete details such as names, icons, descriptions, and protocol documentation links.

This transparency equips MetaNet users to make informed decisions about granting access to their personal information. Navigate data permissions with confidence, thanks to simple integration of ProtoMap.

Installation

Simply use npm to include ProtoMap in your project:

npm install babbage-protomap

Usage

You can easily register and resolve protocols by following the example code below.

Note: You must have your MetaNet Client running in order for this to work!

import { ProtoMap } from 'babbage-protomap'

const init = async () => {
    const protoMap = new ProtoMap()
    
    // Register a new protocol
    await protoMap.registerNewProtocol(
        1, 
        'social apps', 
        'Social Apps Protocol', 
        'uhrp://abcdefg', 
        'The social media application protocol', 
        'https://projectbabbage.com'
    )

    // Resolve protocol information using registryOperator, securityLevel, and protocolID
    const protocolInfo = await protoMap.resolveProtocol(
        '032e5bd6b837cfb30208bbb1d571db9ddf2fb1a7b59fb4ed2a31af632699f770a1', 
        1,
        'social apps'
    )
    console.log(protocolInfo)
    /**
     * Example Response
     {
            securityLevel: '1',
            protocolID: 'social apps',
            name: 'Social Apps Protocol',
            iconURL: 'uhrp://abcdefg',
            description: 'The social media application protocol',
            documentationURL: 'https://projectbabbage.com',
            registryOperator: '032e5bd6b837cfb30208bbb1d571db9ddf2fb1a7b59fb4ed2a31af632699f770a1'
       }
    **/
}
init()

API

Table of Contents

ProtoMap

Make informed decisions about who can access your personal information

Parameters

  • config ConfederacyConfig

registerNewProtocol

Registers a new protocol

Parameters

Returns Promise\

resolveProtocol

Resolves a protocol from it's metadata

Parameters
  • registryOperator string the operator of the protocol registration to resolve
  • securityLevel (0 | 1 | 2) determines the set permission level of this protocol
  • protocolID string identifier with this protocol registration
  • confederacyURL the Confederacy host of the overlay where the UTXO is tracked

Returns Promise\

listOwnRegistryEntries

Gets all the protocol registry entries from a user's basket

Returns Promise\

revokeOwnRegistryEntry

Revokes a owned protocol registration

Parameters
  • entry ProtoMapRecord protocol registration entry to revoke

Returns Promise\

License

The license for the code in this repository is the Open BSV License

0.2.30

5 days ago

0.2.29

7 days ago

0.2.28

9 days ago

0.2.27

12 days ago

0.2.26

13 days ago

0.2.25

13 days ago

0.2.24

15 days ago

0.2.23

22 days ago

0.2.22

23 days ago

0.2.21

1 month ago

0.2.20

1 month ago

0.2.19

1 month ago

0.2.18

1 month ago

0.2.17

1 month ago

0.2.16

1 month ago

0.2.15

1 month ago

0.2.14

1 month ago

0.2.13

2 months ago

0.2.12

2 months ago

0.2.11

2 months ago

0.2.10

2 months ago

0.2.9

2 months ago

0.2.8

2 months ago

0.2.7

2 months ago

0.2.6

2 months ago

0.2.5

2 months ago

0.2.1

3 months ago

0.2.0

3 months ago

0.2.3

3 months ago

0.2.2

3 months ago

0.2.4

3 months ago

0.1.42

3 months ago

0.1.41

3 months ago

0.1.40

3 months ago

0.1.38

3 months ago

0.1.39

3 months ago

0.1.37

3 months ago

0.1.36

3 months ago

0.1.35

3 months ago

0.1.34

3 months ago

0.1.33

3 months ago

0.1.31

3 months ago

0.1.32

3 months ago

0.1.30

3 months ago

0.1.29

3 months ago

0.1.28

3 months ago

0.1.27

4 months ago

0.1.26

4 months ago

0.1.25

4 months ago

0.1.24

4 months ago

0.1.23

4 months ago

0.1.22

4 months ago

0.1.20

4 months ago

0.1.21

4 months ago

0.1.19

4 months ago

0.1.18

4 months ago

0.1.17

5 months ago

0.1.16

5 months ago

0.1.15

5 months ago

0.1.14

5 months ago

0.1.13

5 months ago

0.1.12

5 months ago

0.1.10

5 months ago

0.1.11

5 months ago

0.1.8

5 months ago

0.1.9

5 months ago

0.1.7

5 months ago

0.1.6

5 months ago

0.1.5

6 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago