Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onflow/sdk-build-get-account

Package Overview
Dependencies
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/sdk-build-get-account - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

4

CHANGELOG.md

@@ -5,4 +5,8 @@ ### Unreleased

### 0.0.1 -- 2020-10-08
- 2020-10-08 -- Auto cast addresses with sansPrefix
### 0.0.0 -- 2020-09-29
- 2020-09-29 -- Initial port from sdk.

2

dist/sdk-build-get-account.js

@@ -1,2 +0,2 @@

var n=require("@onflow/interaction");exports.getAccount=function(t){return n.pipe([n.makeGetAccount,function(e){return e.accountAddr=t,n.Ok(e)}])};
var e=require("@onflow/interaction"),n=require("@onflow/util-address");exports.getAccount=function(r){return e.pipe([e.makeGetAccount,function(t){return t.accountAddr=n.sansPrefix(r),e.Ok(t)}])};
//# sourceMappingURL=sdk-build-get-account.js.map

@@ -1,2 +0,2 @@

import{pipe as o,makeGetAccount as n,Ok as r}from"@onflow/interaction";function t(t){return o([n,o=>(o.accountAddr=t,r(o))])}export{t as getAccount};
import{pipe as o,makeGetAccount as r,Ok as t}from"@onflow/interaction";import{sansPrefix as n}from"@onflow/util-address";function i(i){return o([r,o=>(o.accountAddr=n(i),t(o))])}export{i as getAccount};
//# sourceMappingURL=sdk-build-get-account.modern.js.map

@@ -1,2 +0,2 @@

import{pipe as n,makeGetAccount as o,Ok as r}from"@onflow/interaction";function t(t){return n([o,function(n){return n.accountAddr=t,r(n)}])}export{t as getAccount};
import{pipe as o,makeGetAccount as r,Ok as n}from"@onflow/interaction";import{sansPrefix as t}from"@onflow/util-address";function i(i){return o([r,function(o){return o.accountAddr=t(i),n(o)}])}export{i as getAccount};
//# sourceMappingURL=sdk-build-get-account.module.js.map

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@onflow/interaction")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction"],n):n((e=e||self).sdkBuildGetAccount={},e.interaction)}(this,function(e,n){e.getAccount=function(e){return n.pipe([n.makeGetAccount,function(t){return t.accountAddr=e,n.Ok(t)}])}});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@onflow/interaction"),require("@onflow/util-address")):"function"==typeof define&&define.amd?define(["exports","@onflow/interaction","@onflow/util-address"],n):n((e=e||self).sdkBuildGetAccount={},e.interaction,e.utilAddress)}(this,function(e,n,t){e.getAccount=function(e){return n.pipe([n.makeGetAccount,function(o){return o.accountAddr=t.sansPrefix(e),n.Ok(o)}])}});
//# sourceMappingURL=sdk-build-get-account.umd.js.map
{
"name": "@onflow/sdk-build-get-account",
"version": "0.0.0",
"version": "0.0.1",
"description": "Flow JS SDK Builder -- Get Account",

@@ -27,3 +27,4 @@ "license": "Apache-2.0",

"dependencies": {
"@onflow/interaction": "0.0.10"
"@onflow/interaction": "0.0.10",
"@onflow/util-address": "0.0.0"
},

@@ -30,0 +31,0 @@ "source": "src/index.js",

import {pipe, makeGetAccount, Ok} from "@onflow/interaction"
import {sansPrefix} from "@onflow/util-address"

@@ -7,3 +8,3 @@ export function getAccount(addr) {

ix => {
ix.accountAddr = addr
ix.accountAddr = sansPrefix(addr)
return Ok(ix)

@@ -10,0 +11,0 @@ }

@@ -1,3 +0,21 @@

test("placeholder", () => {
expect(0).toBe(0)
import {interaction} from "@onflow/interaction"
import {sansPrefix, withPrefix} from "@onflow/util-address"
import {getAccount} from "./index.js"
const ADDRESS = "0xf117a8efa34ffd58"
describe("address as input", () => {
test("sansPrefix", async () => {
const addr = sansPrefix(ADDRESS)
const result = await getAccount(addr)(interaction())
expect(result.accountAddr).toBe(sansPrefix(ADDRESS))
})
test("withPrefix", async () => {
const addr = withPrefix(ADDRESS)
const result = await getAccount(addr)(interaction())
expect(result.accountAddr).toBe(sansPrefix(ADDRESS))
})
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc