Skip to content

Commit

Permalink
feat: add the models and transaction crafter logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ori-shem-tov committed Sep 28, 2023
1 parent 1189a50 commit 89da82e
Show file tree
Hide file tree
Showing 20 changed files with 5,303 additions and 31 deletions.
7 changes: 5 additions & 2 deletions examples/cjs/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
const pkg = require( '@algorandfoundation/transaction-crafter')
const { AlgorandTransactionCrafter } = require('@algorandfoundation/transaction-crafter')

console.log(pkg)
let atc = new AlgorandTransactionCrafter('testnet-v1.0', 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=')
let pay = atc.pay(123, 'R2HYOMCQIIVZLYYSVQ7RRDME5QB2NNACNIYEYIIN3NCTEKHEVE4RJRNWN4', 'R2HYOMCQIIVZLYYSVQ7RRDME5QB2NNACNIYEYIIN3NCTEKHEVE4RJRNWN4')
//console.log(Buffer.from(pay.get().encode()).toString('base64'))
console.log(pay)
9 changes: 9 additions & 0 deletions examples/cjs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions examples/esm/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import * as pkg from '@algorandfoundation/transaction-crafter'

console.log(pkg)
import { AlgorandTransactionCrafter } from '@algorandfoundation/transaction-crafter'

let atc = new AlgorandTransactionCrafter('testnet-v1.0', 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=')
let pay = atc.pay(123, 'R2HYOMCQIIVZLYYSVQ7RRDME5QB2NNACNIYEYIIN3NCTEKHEVE4RJRNWN4', 'R2HYOMCQIIVZLYYSVQ7RRDME5QB2NNACNIYEYIIN3NCTEKHEVE4RJRNWN4')
//console.log(Buffer.from(pay.get().encode()).toString('base64'))
console.log(pay)
9 changes: 9 additions & 0 deletions examples/esm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions examples/ts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { AlgorandTransactionCrafter } from '@algorandfoundation/transaction-crafter'

const atc = new AlgorandTransactionCrafter("testnet-v1.0", "wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=")
let pay = atc.pay(123, 'R2HYOMCQIIVZLYYSVQ7RRDME5QB2NNACNIYEYIIN3NCTEKHEVE4RJRNWN4', 'R2HYOMCQIIVZLYYSVQ7RRDME5QB2NNACNIYEYIIN3NCTEKHEVE4RJRNWN4')
//console.log(Buffer.from(pay.get().encode()).toString('base64'))
console.log(pay)
227 changes: 227 additions & 0 deletions examples/ts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions examples/ts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "ts",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "ts-node index.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@algorandfoundation/transaction-crafter": "file:../.."
},
"devDependencies": {
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
}
}
Loading

0 comments on commit 89da82e

Please sign in to comment.