1.0.20 • Published 2 years ago

@the-registry/tir v1.0.20

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

The Registry

Empowering Seamless Cross-Platform Payments with PayStrings

In the vast expanse of the decentralized galaxy, where the powers of technology converge with the limitless possibilities of finance, emerges The Registry. 🌌✨ With our groundbreaking PayStrings as NFTS, we have forged cosmic bridges, uniting disparate platforms into a harmonious symphony of cross-platform payments. 💫💸

Learn more here: Socials: https://b.ink/theregistery Website: https://theregistry.app

Methods

Fetch a PayString async

// the PayString - ex; chris$identity-registry-redirected-domain.io
// options: see options interface
async function getPayStringAsync(payString: string, options?: Options): Promise<PaymentInformation | undefined>;

Fetch a PayString debounced, result gets returned in the callback

// callback returns data with a delay
// the PayString - ex; chris$identity-registry-redirected-domain.io
// options: see options interface
// debounce time - set custom time for debounced response (defaults to 300ms)
function getPayStringDebounce(
  callback: (data: PaymentInformation | undefined) => void,
  payString: string,
  options?: Options,
  debounceTime = minDebounceTime,
): void;

Parse a PayString, return undefined if not parseable by protocol standards

function parsePayString(payString: string): string | undefined;

Parse a PayString url, return undefined if not parseable by protocol standards

function parsePayStringUrl(payString: string): URL | undefined;

Splits the PayString to return the prefix and domain, return undefined if not parseable by protocol standards

function splitPayString(payString: string): { prefix: string; domain: string } | undefined;

Converts the PayString to an URL, return undefined if not parseable by protocol standards

function convertPayStringToUrl(payString: string): URL | undefined;

function Converts a PayString URL to a PayString, return undefined if not parseable by protocol standards

convertUrlToPayString(payStringUrl: string): string | undefined

Interfaces

interface PaymentInformation {
  addresses: Address[];
  payId?: string;
  memo?: string;
}
enum AddressDetailsType {
  CryptoAddress = 'CryptoAddressDetails',
  FiatAddress = 'FiatAddressDetails',
}
interface CryptoAddressDetails {
  address: string;
  tag?: string;
}
interface FiatAddressDetails {
  accountNumber: string;
  routingNumber?: string;
}
interface Address {
  paymentNetwork: string;
  environment?: string;
  addressDetailsType: AddressDetailsType;
  addressDetails: CryptoAddressDetails | FiatAddressDetails;
}
// - chain: ex; icp
// - network: ex; mainnet
// - version: ex; 1.0 (paystring version)
interface Options {
  chain?: string;
  environment?: string;
  version?: string;
}
1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago