@algorandfoundation/algokit-utils 1.0.0-beta.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/account.d.ts +91 -0
  2. package/account.d.ts.map +1 -0
  3. package/account.js +158 -0
  4. package/account.js.map +1 -0
  5. package/amount.d.ts +8 -0
  6. package/amount.d.ts.map +1 -0
  7. package/amount.js +24 -0
  8. package/amount.js.map +1 -0
  9. package/app.d.ts +108 -0
  10. package/app.d.ts.map +1 -0
  11. package/app.js +423 -0
  12. package/app.js.map +1 -0
  13. package/application-client.d.ts +10 -0
  14. package/application-client.d.ts.map +1 -0
  15. package/application-client.js +15 -0
  16. package/application-client.js.map +1 -0
  17. package/deploy-app.d.ts +93 -0
  18. package/deploy-app.d.ts.map +1 -0
  19. package/deploy-app.js +410 -0
  20. package/deploy-app.js.map +1 -0
  21. package/index.d.ts +14 -0
  22. package/index.d.ts.map +1 -0
  23. package/index.js +5 -2
  24. package/index.js.map +1 -0
  25. package/indexer-lookup.d.ts +31 -0
  26. package/indexer-lookup.d.ts.map +1 -0
  27. package/indexer-lookup.js +96 -0
  28. package/indexer-lookup.js.map +1 -0
  29. package/localnet.d.ts +54 -0
  30. package/localnet.d.ts.map +1 -0
  31. package/localnet.js +121 -0
  32. package/localnet.js.map +1 -0
  33. package/network-client.d.ts +93 -0
  34. package/network-client.d.ts.map +1 -0
  35. package/network-client.js +182 -0
  36. package/network-client.js.map +1 -0
  37. package/package.json +3 -3
  38. package/testing/account.d.ts +14 -0
  39. package/testing/account.d.ts.map +1 -0
  40. package/testing/account.js +31 -0
  41. package/testing/account.js.map +1 -0
  42. package/testing/fixtures/algokit-log-capture-fixture.d.ts +19 -0
  43. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +1 -0
  44. package/testing/fixtures/algokit-log-capture-fixture.js +43 -0
  45. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -0
  46. package/testing/fixtures/algorand-fixture.d.ts +20 -0
  47. package/testing/fixtures/algorand-fixture.d.ts.map +1 -0
  48. package/testing/fixtures/algorand-fixture.js +49 -0
  49. package/testing/fixtures/algorand-fixture.js.map +1 -0
  50. package/testing/fixtures/index.d.ts +3 -0
  51. package/testing/fixtures/index.d.ts.map +1 -0
  52. package/testing/fixtures/index.js +19 -0
  53. package/testing/fixtures/index.js.map +1 -0
  54. package/testing/index.d.ts +6 -0
  55. package/testing/index.d.ts.map +1 -0
  56. package/testing/index.js +22 -0
  57. package/testing/index.js.map +1 -0
  58. package/testing/indexer.d.ts +12 -0
  59. package/testing/indexer.d.ts.map +1 -0
  60. package/testing/indexer.js +39 -0
  61. package/testing/indexer.js.map +1 -0
  62. package/testing/test-logger.d.ts +39 -0
  63. package/testing/test-logger.d.ts.map +1 -0
  64. package/testing/test-logger.js +69 -0
  65. package/testing/test-logger.js.map +1 -0
  66. package/testing/transaction-logger.d.ts +29 -0
  67. package/testing/transaction-logger.d.ts.map +1 -0
  68. package/testing/transaction-logger.js +71 -0
  69. package/testing/transaction-logger.js.map +1 -0
  70. package/transaction.d.ts +80 -0
  71. package/transaction.d.ts.map +1 -0
  72. package/transaction.js +256 -0
  73. package/transaction.js.map +1 -0
  74. package/transfer.d.ts +21 -0
  75. package/transfer.d.ts.map +1 -0
  76. package/transfer.js +65 -0
  77. package/transfer.js.map +1 -0
  78. package/types/account.d.ts +52 -0
  79. package/types/account.d.ts.map +1 -0
  80. package/types/account.js +86 -0
  81. package/types/account.js.map +1 -0
  82. package/types/algo-http-client-with-retry.d.ts +14 -0
  83. package/types/algo-http-client-with-retry.d.ts.map +1 -0
  84. package/types/algo-http-client-with-retry.js +62 -0
  85. package/types/algo-http-client-with-retry.js.map +1 -0
  86. package/types/algod.d.ts +137 -0
  87. package/types/algod.d.ts.map +1 -0
  88. package/types/algod.js +3 -0
  89. package/types/algod.js.map +1 -0
  90. package/types/amount.d.ts +20 -0
  91. package/types/amount.d.ts.map +1 -0
  92. package/types/amount.js +37 -0
  93. package/types/amount.js.map +1 -0
  94. package/types/app.d.ts +279 -0
  95. package/types/app.d.ts.map +1 -0
  96. package/types/app.js +32 -0
  97. package/types/app.js.map +1 -0
  98. package/types/application-client.d.ts +229 -0
  99. package/types/application-client.d.ts.map +1 -0
  100. package/types/application-client.js +470 -0
  101. package/types/application-client.js.map +1 -0
  102. package/types/appspec.d.ts +77 -0
  103. package/types/appspec.d.ts.map +1 -0
  104. package/types/appspec.js +15 -0
  105. package/types/appspec.js.map +1 -0
  106. package/types/config.d.ts +15 -0
  107. package/types/config.d.ts.map +1 -0
  108. package/types/config.js +27 -0
  109. package/types/config.js.map +1 -0
  110. package/types/indexer.d.ts +313 -0
  111. package/types/indexer.d.ts.map +1 -0
  112. package/types/indexer.js +25 -0
  113. package/types/indexer.js.map +1 -0
  114. package/types/logging.d.ts +13 -0
  115. package/types/logging.d.ts.map +1 -0
  116. package/types/logging.js +27 -0
  117. package/types/logging.js.map +1 -0
  118. package/types/logic-error.d.ts +33 -0
  119. package/types/logic-error.d.ts.map +1 -0
  120. package/types/logic-error.js +46 -0
  121. package/types/logic-error.js.map +1 -0
  122. package/types/network-client.d.ts +11 -0
  123. package/types/network-client.d.ts.map +1 -0
  124. package/types/network-client.js +3 -0
  125. package/types/network-client.js.map +1 -0
  126. package/types/testing.d.ts +89 -0
  127. package/types/testing.d.ts.map +1 -0
  128. package/types/testing.js +3 -0
  129. package/types/testing.js.map +1 -0
  130. package/types/transaction.d.ts +67 -0
  131. package/types/transaction.d.ts.map +1 -0
  132. package/types/transaction.js +3 -0
  133. package/types/transaction.js.map +1 -0
  134. package/types/transfer.d.ts +32 -0
  135. package/types/transfer.d.ts.map +1 -0
  136. package/types/transfer.js +3 -0
  137. package/types/transfer.js.map +1 -0
  138. package/types/urlTokenBaseHTTPClient.d.ts +41 -0
  139. package/types/urlTokenBaseHTTPClient.d.ts.map +1 -0
  140. package/types/urlTokenBaseHTTPClient.js +151 -0
  141. package/types/urlTokenBaseHTTPClient.js.map +1 -0
@@ -0,0 +1,137 @@
1
+ import { EncodedSignedTransaction } from 'algosdk';
2
+ /** The response from the pending transaction API @see https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2transactionspendingtxid */
3
+ export interface PendingTransactionResponse {
4
+ /**
5
+ * The application id if the transaction was found and it created an
6
+ * application.
7
+ */
8
+ 'application-index'?: number;
9
+ /**
10
+ * The number of the asset's unit that were transferred to the close-to address.
11
+ */
12
+ 'asset-closing-amount'?: number;
13
+ /**
14
+ * The asset id if the transaction was found and it created an asset.
15
+ */
16
+ 'asset-index'?: number;
17
+ /**
18
+ * Rewards in microalgos applied to the close remainder to account.
19
+ */
20
+ 'close-rewards'?: number;
21
+ /**
22
+ * Closing amount for the transaction.
23
+ */
24
+ 'closing-amount'?: number;
25
+ /**
26
+ * The round where this transaction was confirmed, if present.
27
+ */
28
+ 'confirmed-round'?: number;
29
+ /**
30
+ * (gd) Global state key/value changes for the application being executed by this
31
+ * transaction.
32
+ */
33
+ 'global-state-delta'?: Record<string, EvalDelta>[];
34
+ /**
35
+ * Inner transactions produced by application execution.
36
+ */
37
+ 'inner-txns'?: PendingTransactionResponse[];
38
+ /**
39
+ * (ld) Local state key/value changes for the application being executed by this
40
+ * transaction.
41
+ */
42
+ 'local-state-delta'?: Record<string, EvalDelta>[];
43
+ /**
44
+ * (lg) Logs for the application being executed by this transaction.
45
+ */
46
+ logs?: Uint8Array[];
47
+ /** Indicates that the transaction was kicked out of this node's transaction pool (and specifies why that happened).
48
+ * An empty string indicates the transaction wasn't kicked out of this node's txpool due to an error. */
49
+ 'pool-error': string;
50
+ /**
51
+ * Rewards in µALGOs applied to the receiver account.
52
+ */
53
+ 'receiver-rewards'?: number;
54
+ /**
55
+ * Rewards in µALGOs applied to the sender account.
56
+ */
57
+ 'sender-rewards'?: number;
58
+ /**
59
+ * The raw signed transaction.
60
+ */
61
+ txn: EncodedSignedTransaction;
62
+ }
63
+ /** Represents a TEAL value delta @see https://developer.algorand.org/docs/rest-apis/algod/v2/#evaldelta */
64
+ export type EvalDelta = {
65
+ /**
66
+ * Value `1` refers to **bytes**, value `2` refers to **uint**
67
+ */
68
+ action: 1;
69
+ /**
70
+ * Bytes value.
71
+ */
72
+ bytes: string;
73
+ } | {
74
+ /**
75
+ * Value `1` refers to **bytes**, value `2` refers to **uint**
76
+ */
77
+ action: 2;
78
+ /**
79
+ * Uint value.
80
+ */
81
+ uint: number | bigint;
82
+ };
83
+ /** The response from the application API @see https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2applicationsapplication-id */
84
+ export interface ApplicationResponse {
85
+ id: number;
86
+ params: ApplicationParams;
87
+ }
88
+ /** Stores the global information associated with an application @see https://developer.algorand.org/docs/rest-apis/algod/v2/#applicationparams */
89
+ export interface ApplicationParams {
90
+ /** Address of the account that created the app */
91
+ creator: string;
92
+ /** Base64 encoded TEAL approval program */
93
+ 'approval-program': string;
94
+ /** Base64 encoded TEAL clear state program */
95
+ 'clear-state-program': string;
96
+ /** The amount of extra program pages available to this app. */
97
+ 'extra-program-pages'?: number;
98
+ /** Current global state values */
99
+ 'global-state'?: {
100
+ key: string;
101
+ value: TealValue;
102
+ }[];
103
+ /** Global state schema */
104
+ 'global-state-schema'?: ApplicationStateSchema;
105
+ /** Local state schema */
106
+ 'local-state-schema'?: ApplicationStateSchema;
107
+ }
108
+ /**
109
+ * Represents a TEAL value @see https://developer.algorand.org/docs/rest-apis/algod/v2/#tealvalue
110
+ */
111
+ export type TealValue = {
112
+ /**
113
+ * (tt) value type. Value `1` refers to **bytes**, value `2` refers to **uint**
114
+ */
115
+ type: 1;
116
+ /**
117
+ * (tb) bytes value.
118
+ */
119
+ bytes: string;
120
+ } | {
121
+ /**
122
+ * (tt) value type. Value `1` refers to **bytes**, value `2` refers to **uint**
123
+ */
124
+ type: 2;
125
+ /**
126
+ * (ui) uint value.
127
+ */
128
+ uint: number | bigint;
129
+ };
130
+ /** Specifies maximums on the number of each type that may be stored @see https://developer.algorand.org/docs/rest-apis/algod/v2/#applicationstateschema */
131
+ export interface ApplicationStateSchema {
132
+ /** [nbs] num of byte slices */
133
+ 'num-byte-slice': number;
134
+ /** [nui] num of uints */
135
+ 'num-uint': number;
136
+ }
137
+ //# sourceMappingURL=algod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"algod.d.ts","sourceRoot":"","sources":["../../src/types/algod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAElD,+IAA+I;AAC/I,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAA;IAClD;;OAEG;IACH,YAAY,CAAC,EAAE,0BAA0B,EAAE,CAAA;IAC3C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAA;IACjD;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,EAAE,CAAA;IACnB;4GACwG;IACxG,YAAY,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,GAAG,EAAE,wBAAwB,CAAA;CAC9B;AAED,2GAA2G;AAC3G,MAAM,MAAM,SAAS,GACjB;IACE;;OAEG;IACH,MAAM,EAAE,CAAC,CAAA;IACT;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd,GACD;IACE;;OAEG;IACH,MAAM,EAAE,CAAC,CAAA;IAET;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB,CAAA;AAEL,0IAA0I;AAC1I,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,iBAAiB,CAAA;CAC1B;AAED,kJAAkJ;AAClJ,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAA;IACf,2CAA2C;IAC3C,kBAAkB,EAAE,MAAM,CAAA;IAC1B,8CAA8C;IAC9C,qBAAqB,EAAE,MAAM,CAAA;IAC7B,+DAA+D;IAC/D,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,kCAAkC;IAClC,cAAc,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,EAAE,CAAA;IACpD,0BAA0B;IAC1B,qBAAqB,CAAC,EAAE,sBAAsB,CAAA;IAC9C,yBAAyB;IACzB,oBAAoB,CAAC,EAAE,sBAAsB,CAAA;CAC9C;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB;IACE;;OAEG;IACH,IAAI,EAAE,CAAC,CAAA;IACP;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd,GACD;IACE;;OAEG;IACH,IAAI,EAAE,CAAC,CAAA;IAEP;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB,CAAA;AAEL,2JAA2J;AAC3J,MAAM,WAAW,sBAAsB;IACrC,+BAA+B;IAC/B,gBAAgB,EAAE,MAAM,CAAA;IACxB,yBAAyB;IACzB,UAAU,EAAE,MAAM,CAAA;CACnB"}
package/types/algod.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=algod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"algod.js","sourceRoot":"","sources":["../../src/types/algod.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ /** Wrapper class to ensure safe, explicit conversion between µAlgos, Algos and numbers */
2
+ export declare class AlgoAmount {
3
+ private amountInMicroAlgos;
4
+ /** Return the amount as a number in µAlgos */
5
+ get microAlgos(): number;
6
+ /** Return the amount as a number in Algos */
7
+ get algos(): number;
8
+ constructor(amount: {
9
+ algos: number;
10
+ } | {
11
+ microAlgos: number;
12
+ });
13
+ toString(): string;
14
+ valueOf(): number;
15
+ /** Create a @see {AlgoAmount} object representing the given number of Algos */
16
+ static Algos(amount: number): AlgoAmount;
17
+ /** Create a @see {AlgoAmount} object representing the given number of µAlgos */
18
+ static MicroAlgos(amount: number): AlgoAmount;
19
+ }
20
+ //# sourceMappingURL=amount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amount.d.ts","sourceRoot":"","sources":["../../src/types/amount.ts"],"names":[],"mappings":"AAEA,0FAA0F;AAC1F,qBAAa,UAAU;IACrB,OAAO,CAAC,kBAAkB,CAAA;IAE1B,8CAA8C;IAC9C,IAAI,UAAU,WAEb;IAED,6CAA6C;IAC7C,IAAI,KAAK,WAER;gBAEW,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE;IAI9D,QAAQ,IAAI,MAAM;IAIlB,OAAO,IAAI,MAAM;IAIjB,+EAA+E;IAC/E,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM;IAI3B,gFAAgF;IAChF,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM;CAGjC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AlgoAmount = void 0;
7
+ const algosdk_1 = __importDefault(require("algosdk"));
8
+ /** Wrapper class to ensure safe, explicit conversion between µAlgos, Algos and numbers */
9
+ class AlgoAmount {
10
+ /** Return the amount as a number in µAlgos */
11
+ get microAlgos() {
12
+ return this.amountInMicroAlgos;
13
+ }
14
+ /** Return the amount as a number in Algos */
15
+ get algos() {
16
+ return algosdk_1.default.microalgosToAlgos(this.amountInMicroAlgos);
17
+ }
18
+ constructor(amount) {
19
+ this.amountInMicroAlgos = 'microAlgos' in amount ? amount.microAlgos : algosdk_1.default.algosToMicroalgos(amount.algos);
20
+ }
21
+ toString() {
22
+ return `${this.microAlgos.toLocaleString('en-US')} µALGO${this.microAlgos === 1 ? '' : 's'}`;
23
+ }
24
+ valueOf() {
25
+ return this.microAlgos;
26
+ }
27
+ /** Create a @see {AlgoAmount} object representing the given number of Algos */
28
+ static Algos(amount) {
29
+ return new AlgoAmount({ algos: amount });
30
+ }
31
+ /** Create a @see {AlgoAmount} object representing the given number of µAlgos */
32
+ static MicroAlgos(amount) {
33
+ return new AlgoAmount({ microAlgos: amount });
34
+ }
35
+ }
36
+ exports.AlgoAmount = AlgoAmount;
37
+ //# sourceMappingURL=amount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amount.js","sourceRoot":"","sources":["../../src/types/amount.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6B;AAE7B,0FAA0F;AAC1F,MAAa,UAAU;IAGrB,8CAA8C;IAC9C,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,kBAAkB,CAAA;IAChC,CAAC;IAED,6CAA6C;IAC7C,IAAI,KAAK;QACP,OAAO,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IAC3D,CAAC;IAED,YAAY,MAAkD;QAC5D,IAAI,CAAC,kBAAkB,GAAG,YAAY,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAChH,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA;IAC9F,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAED,+EAA+E;IAC/E,MAAM,CAAC,KAAK,CAAC,MAAc;QACzB,OAAO,IAAI,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;IAC1C,CAAC;IAED,gFAAgF;IAChF,MAAM,CAAC,UAAU,CAAC,MAAc;QAC9B,OAAO,IAAI,UAAU,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAA;IAC/C,CAAC;CACF;AAlCD,gCAkCC"}
package/types/app.d.ts ADDED
@@ -0,0 +1,279 @@
1
+ import { ABIArgument, ABIMethod, ABIMethodParams, ABIType, ABIValue, Address, SourceMap, SuggestedParams, Transaction } from 'algosdk';
2
+ import { SendTransactionFrom, SendTransactionParams, SendTransactionResult, TransactionNote, TransactionToSign } from './transaction';
3
+ /** The name of the TEAL template variable for deploy-time immutability control */
4
+ export declare const UPDATABLE_TEMPLATE_NAME = "TMPL_UPDATABLE";
5
+ /** The name of the TEAL template variable for deploy-time permanence control */
6
+ export declare const DELETABLE_TEMPLATE_NAME = "TMPL_DELETABLE";
7
+ /** The app create/update ARC-2 transaction note prefix */
8
+ export declare const APP_DEPLOY_NOTE_DAPP = "ALGOKIT_DEPLOYER";
9
+ /** The maximum number of bytes in a single app code page */
10
+ export declare const APP_PAGE_MAX_SIZE = 2048;
11
+ /** First 4 bytes of SHA-512/256 hash of "return" for retrieving ABI return values */
12
+ export declare const ABI_RETURN_PREFIX: Uint8Array;
13
+ /** Information about an Algorand app */
14
+ export interface AppReference {
15
+ /** The id of the app */
16
+ appId: number;
17
+ /** The Algorand address of the account associated with the app */
18
+ appAddress: string;
19
+ }
20
+ /**
21
+ * A grouping of the app ID and name of the box in an Uint8Array
22
+ */
23
+ export interface BoxReference {
24
+ /**
25
+ * A unique application id
26
+ */
27
+ appId: number;
28
+ /**
29
+ * Name of box to reference
30
+ */
31
+ name: Uint8Array | string;
32
+ }
33
+ /**
34
+ * App call args with raw values (minus some processing like encoding strings as binary)
35
+ */
36
+ export interface RawAppCallArgs {
37
+ /** The address of any accounts to load in */
38
+ accounts?: (string | Address)[];
39
+ /** Any application arguments to pass through */
40
+ appArgs?: (Uint8Array | string)[];
41
+ /** Any box references to load */
42
+ boxes?: BoxReference[];
43
+ /** IDs of any apps to load into the foreignApps array */
44
+ apps?: number[];
45
+ /** IDs of any assets to load into the foreignAssets array */
46
+ assets?: number[];
47
+ /** The optional lease for the transaction */
48
+ lease?: string | Uint8Array;
49
+ }
50
+ export type ABIAppCallArg = ABIArgument | TransactionToSign | Transaction;
51
+ /**
52
+ * App call args for an ABI call
53
+ */
54
+ export interface ABIAppCallArgs {
55
+ /** The ABI method to call, either:
56
+ * * `method_name` e.g. `hello`; or
57
+ * * `method_signature` e.g. `hello(string)string`
58
+ **/
59
+ method: ABIMethodParams | ABIMethod;
60
+ /** The ABI args to pass in */
61
+ args: ABIAppCallArg[];
62
+ /** The optional lease for the transaction */
63
+ lease?: string | Uint8Array;
64
+ /** Any box references to load either as the box name (if for the current app) or the reference with app id */
65
+ boxes?: (BoxReference | Uint8Array | string)[];
66
+ }
67
+ /** Arguments to pass to an app call either:
68
+ * * The raw app call values to pass through into the transaction (after processing); or
69
+ * * An ABI method definition (method and args)
70
+ **/
71
+ export type AppCallArgs = RawAppCallArgs | ABIAppCallArgs;
72
+ /** Base interface for common data passed to an app create or update. */
73
+ interface CreateOrUpdateAppParams extends SendTransactionParams {
74
+ /** The account (with private key loaded) that will send the µALGOs */
75
+ from: SendTransactionFrom;
76
+ /** The approval program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
77
+ approvalProgram: Uint8Array | string;
78
+ /** The clear state program as raw teal (string) or compiled teal, base 64 encoded as a byte array (Uint8Array) */
79
+ clearStateProgram: Uint8Array | string;
80
+ /** Optional transaction parameters */
81
+ transactionParams?: SuggestedParams;
82
+ /** The (optional) transaction note */
83
+ note?: TransactionNote;
84
+ /** The arguments passed in to the app call */
85
+ args?: AppCallArgs;
86
+ }
87
+ /** Parameters that are passed in when creating an app. */
88
+ export interface CreateAppParams extends CreateOrUpdateAppParams {
89
+ /** The storage schema to request for the created app */
90
+ schema: AppStorageSchema;
91
+ }
92
+ /** Parameters that are passed in when updating an app. */
93
+ export interface UpdateAppParams extends CreateOrUpdateAppParams {
94
+ /** The id of the app to update */
95
+ appId: number;
96
+ }
97
+ export interface AppCallParams extends SendTransactionParams {
98
+ /** The id of the app to call */
99
+ appId: number;
100
+ /** The type of call, everything except create (@see createApp ) and update (@see updateApp ) */
101
+ callType: 'optin' | 'closeout' | 'clearstate' | 'delete' | 'normal';
102
+ /** The account to make the call from */
103
+ from: SendTransactionFrom;
104
+ /** Optional transaction parameters */
105
+ transactionParams?: SuggestedParams;
106
+ /** The (optional) transaction note */
107
+ note?: TransactionNote;
108
+ /** The arguments passed in to the app call */
109
+ args?: AppCallArgs;
110
+ }
111
+ /** Parameters representing the storage schema of an app. */
112
+ export interface AppStorageSchema {
113
+ /** Restricts number of ints in per-user local state */
114
+ localInts: number;
115
+ /** Restricts number of byte slices in per-user local state */
116
+ localByteSlices: number;
117
+ /** Restricts number of ints in global state */
118
+ globalInts: number;
119
+ /** Restricts number of byte slices in global state */
120
+ globalByteSlices: number;
121
+ /** Any extra pages that are needed for the smart contract; if left blank then the right number of pages will be calculated based on the teal code size */
122
+ extraPages?: number;
123
+ }
124
+ /** Information about a compiled teal program */
125
+ export interface CompiledTeal {
126
+ /** Original TEAL code */
127
+ teal: string;
128
+ /** The compiled code */
129
+ compiled: string;
130
+ /** The has returned by the compiler */
131
+ compiledHash: string;
132
+ /** The base64 encoded code as a byte array */
133
+ compiledBase64ToBytes: Uint8Array;
134
+ /** Source map from the compilation */
135
+ sourceMap: SourceMap;
136
+ }
137
+ /** Result from calling an app */
138
+ export interface AppCallTransactionResult extends SendTransactionResult {
139
+ /** If an ABI method was called the processed return value */
140
+ return?: ABIReturn;
141
+ }
142
+ /** The return value of an ABI method call */
143
+ export type ABIReturn = {
144
+ rawReturnValue: Uint8Array;
145
+ returnValue: ABIValue;
146
+ decodeError: undefined;
147
+ } | {
148
+ rawReturnValue: undefined;
149
+ returnValue: undefined;
150
+ decodeError: Error;
151
+ };
152
+ /**
153
+ * The payload of the metadata to add to the transaction note when deploying an app, noting it will be prefixed with @see {APP_DEPLOY_NOTE_PREFIX}.
154
+ */
155
+ export interface AppDeployMetadata {
156
+ /** The unique name identifier of the app within the creator account */
157
+ name: string;
158
+ /** The version of app that is / will be deployed */
159
+ version: string;
160
+ /** Whether or not the app is deletable / permanent / unspecified */
161
+ deletable?: boolean;
162
+ /** Whether or not the app is updatable / immutable / unspecified */
163
+ updatable?: boolean;
164
+ }
165
+ /** The metadata that can be collected about a deployed app */
166
+ export interface AppMetadata extends AppReference, AppDeployMetadata {
167
+ /** The round the app was created */
168
+ createdRound: number;
169
+ /** The last round that the app was updated */
170
+ updatedRound: number;
171
+ /** The metadata when the app was created */
172
+ createdMetadata: AppDeployMetadata;
173
+ /** Whether or not the app is deleted */
174
+ deleted: boolean;
175
+ }
176
+ /** A lookup of name -> Algorand app for a creator */
177
+ export interface AppLookup {
178
+ creator: Readonly<string>;
179
+ apps: Readonly<{
180
+ [name: string]: AppMetadata;
181
+ }>;
182
+ }
183
+ /** Dictionary of deploy-time parameters to replace in a teal template.
184
+ *
185
+ * Note: Looks for `TMPL_{parameter}` for template replacements i.e. you can leave out the `TMPL_`.
186
+ *
187
+ */
188
+ export interface TealTemplateParams {
189
+ [key: string]: string | bigint | number | Uint8Array;
190
+ }
191
+ /** What action to perform when deploying an app and an update is detected in the TEAL code */
192
+ export declare enum OnUpdate {
193
+ /** Fail the deployment */
194
+ Fail = 0,
195
+ /** Update the app */
196
+ UpdateApp = 1,
197
+ /** Delete the app and create a new one in its place */
198
+ ReplaceApp = 2
199
+ }
200
+ /** What action to perform when deploying an app and a breaking schema change is detected */
201
+ export declare enum OnSchemaBreak {
202
+ /** Fail the deployment */
203
+ Fail = 0,
204
+ /** Delete the app and create a new one in its place */
205
+ ReplaceApp = 1
206
+ }
207
+ /** The parameters to deploy an app */
208
+ export interface AppDeploymentParams extends Omit<CreateAppParams, 'args' | 'note' | 'skipSending' | 'skipWaiting'> {
209
+ /** The deployment metadata */
210
+ metadata: AppDeployMetadata;
211
+ /** Any deploy-time parameters to replace in the TEAL code */
212
+ deployTimeParams?: TealTemplateParams;
213
+ /** What action to perform if a schema break is detected */
214
+ onSchemaBreak?: 'replace' | 'fail' | OnSchemaBreak;
215
+ /** What action to perform if a TEAL update is detected */
216
+ onUpdate?: 'update' | 'replace' | 'fail' | OnUpdate;
217
+ /** Optional cached value of the existing apps for the given creator */
218
+ existingDeployments?: AppLookup;
219
+ /** Any args to pass to any create transaction that is issued as part of deployment */
220
+ createArgs?: AppCallArgs;
221
+ /** Any args to pass to any update transaction that is issued as part of deployment */
222
+ updateArgs?: AppCallArgs;
223
+ /** Any args to pass to any delete transaction that is issued as part of deployment */
224
+ deleteArgs?: AppCallArgs;
225
+ }
226
+ /** The result of compiling the approval and clear TEAL for an app */
227
+ export interface AppCompilationResult {
228
+ /** The compilation result of approval */
229
+ compiledApproval: CompiledTeal;
230
+ /** The compilation result of clear */
231
+ compiledClear: CompiledTeal;
232
+ }
233
+ /** Object holding app state values */
234
+ export interface AppState {
235
+ [key: string]: {
236
+ value: number | bigint;
237
+ keyRaw: Uint8Array;
238
+ keyBase64: string;
239
+ } | {
240
+ value: string;
241
+ valueRaw: Uint8Array;
242
+ valueBase64: string;
243
+ keyRaw: Uint8Array;
244
+ keyBase64: string;
245
+ };
246
+ }
247
+ /** The name of a box storage box */
248
+ export interface BoxName {
249
+ /** Name in UTF-8 */
250
+ name: string;
251
+ /** Name in binary bytes */
252
+ nameRaw: Uint8Array;
253
+ /** Name in Base64 */
254
+ nameBase64: string;
255
+ }
256
+ /**
257
+ * Parameters to get and decode a box value as an ABI type.
258
+ */
259
+ export interface BoxValueRequestParams {
260
+ /** The ID of the app return box names for */
261
+ appId: number;
262
+ /** The name of the box to return either as a string, binary array or @see BoxName */
263
+ boxName: string | Uint8Array | BoxName;
264
+ /** The ABI type to decode the value using */
265
+ type: ABIType;
266
+ }
267
+ /**
268
+ * Parameters to get and decode a box value as an ABI type.
269
+ */
270
+ export interface BoxValuesRequestParams {
271
+ /** The ID of the app return box names for */
272
+ appId: number;
273
+ /** The names of the boxes to return either as a string, binary array or @see BoxName */
274
+ boxNames: (string | Uint8Array | BoxName)[];
275
+ /** The ABI type to decode the value using */
276
+ type: ABIType;
277
+ }
278
+ export {};
279
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/types/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtI,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAErI,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,mBAAmB,CAAA;AAEvD,gFAAgF;AAChF,eAAO,MAAM,uBAAuB,mBAAmB,CAAA;AAEvD,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AAEtD,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,OAAO,CAAA;AAErC,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,YAAqC,CAAA;AAEnE,wCAAwC;AACxC,MAAM,WAAW,YAAY;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;QACtB,MAAM,EAAE,UAAU,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;KAClB,GACD;QACE,KAAK,EAAE,MAAM,CAAA;QACb,QAAQ,EAAE,UAAU,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,UAAU,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACN;AAED,oCAAoC;AACpC,MAAM,WAAW,OAAO;IACtB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,2BAA2B;IAC3B,OAAO,EAAE,UAAU,CAAA;IACnB,qBAAqB;IACrB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAA;IACtC,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,wFAAwF;IACxF,QAAQ,EAAE,CAAC,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,EAAE,CAAA;IAC3C,6CAA6C;IAC7C,IAAI,EAAE,OAAO,CAAA;CACd"}
package/types/app.js ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OnSchemaBreak = exports.OnUpdate = exports.ABI_RETURN_PREFIX = exports.APP_PAGE_MAX_SIZE = exports.APP_DEPLOY_NOTE_DAPP = exports.DELETABLE_TEMPLATE_NAME = exports.UPDATABLE_TEMPLATE_NAME = void 0;
4
+ /** The name of the TEAL template variable for deploy-time immutability control */
5
+ exports.UPDATABLE_TEMPLATE_NAME = 'TMPL_UPDATABLE';
6
+ /** The name of the TEAL template variable for deploy-time permanence control */
7
+ exports.DELETABLE_TEMPLATE_NAME = 'TMPL_DELETABLE';
8
+ /** The app create/update ARC-2 transaction note prefix */
9
+ exports.APP_DEPLOY_NOTE_DAPP = 'ALGOKIT_DEPLOYER';
10
+ /** The maximum number of bytes in a single app code page */
11
+ exports.APP_PAGE_MAX_SIZE = 2048;
12
+ /** First 4 bytes of SHA-512/256 hash of "return" for retrieving ABI return values */
13
+ exports.ABI_RETURN_PREFIX = new Uint8Array([21, 31, 124, 117]);
14
+ /** What action to perform when deploying an app and an update is detected in the TEAL code */
15
+ var OnUpdate;
16
+ (function (OnUpdate) {
17
+ /** Fail the deployment */
18
+ OnUpdate[OnUpdate["Fail"] = 0] = "Fail";
19
+ /** Update the app */
20
+ OnUpdate[OnUpdate["UpdateApp"] = 1] = "UpdateApp";
21
+ /** Delete the app and create a new one in its place */
22
+ OnUpdate[OnUpdate["ReplaceApp"] = 2] = "ReplaceApp";
23
+ })(OnUpdate = exports.OnUpdate || (exports.OnUpdate = {}));
24
+ /** What action to perform when deploying an app and a breaking schema change is detected */
25
+ var OnSchemaBreak;
26
+ (function (OnSchemaBreak) {
27
+ /** Fail the deployment */
28
+ OnSchemaBreak[OnSchemaBreak["Fail"] = 0] = "Fail";
29
+ /** Delete the app and create a new one in its place */
30
+ OnSchemaBreak[OnSchemaBreak["ReplaceApp"] = 1] = "ReplaceApp";
31
+ })(OnSchemaBreak = exports.OnSchemaBreak || (exports.OnSchemaBreak = {}));
32
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/types/app.ts"],"names":[],"mappings":";;;AAGA,kFAAkF;AACrE,QAAA,uBAAuB,GAAG,gBAAgB,CAAA;AAEvD,gFAAgF;AACnE,QAAA,uBAAuB,GAAG,gBAAgB,CAAA;AAEvD,0DAA0D;AAC7C,QAAA,oBAAoB,GAAG,kBAAkB,CAAA;AAEtD,4DAA4D;AAC/C,QAAA,iBAAiB,GAAG,IAAI,CAAA;AAErC,qFAAqF;AACxE,QAAA,iBAAiB,GAAG,IAAI,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAoMnE,8FAA8F;AAC9F,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,0BAA0B;IAC1B,uCAAI,CAAA;IACJ,qBAAqB;IACrB,iDAAS,CAAA;IACT,uDAAuD;IACvD,mDAAU,CAAA;AACZ,CAAC,EAPW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAOnB;AAED,4FAA4F;AAC5F,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,0BAA0B;IAC1B,iDAAI,CAAA;IACJ,uDAAuD;IACvD,6DAAU,CAAA;AACZ,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB"}